Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Compare two work areas of same structure and capture columns having different values

sidda1196
Explorer
0 Kudos

Hi team,

I have two work areas wa_old and wa_new. Now I want to compare both the work areas and figure out which column values are different.

This is something like printing the Old values and modified values over an email to the user. I can fetch from CDPOS, but is there any way I can get the values with the work areas available during run time rather than fetching from DB table.

2 REPLIES 2

FredericGirod
Active Contributor

CDPOS is a good idea, check how SAP do this checking the code of the FM generated for CDPOS feed. (it is inside macro)

Sandra_Rossi
Active Contributor

Are you looking for this?

IF wa_old-comp1 <> wa_new-comp1 
  OR wa_old-comp2 <> wa_new-comp2
  ...