‎2010 Feb 22 2:10 PM
Hi ,
I have two structure of same type
Data:
xlfal type lfal ,
ylfal type lfal .
Now my requirement is to clear the all field values which are same in both structures and retain only those values which are distinct
please let me know if u have some function module
‎2010 Feb 22 2:45 PM
Hi,
try this:
FIELD-SYMBOLS: <fsx>, <fsy>.
do.
ASSIGN COMPONENT sy-index OF STRUCTURE xlfal to <fsx>.
if sy-subrc ne 0.
exit.
endif.
ASSIGN COMPONENT sy-index OF STRUCTURE ylfal to <fsy>.
if <fsx> eq <fsy>.
clear: <fsx>, <fsy>.
endif.
enddo.
Edited by: Jörg Wulf on Feb 22, 2010 4:02 PM
‎2010 Feb 22 2:45 PM
Hi,
try this:
FIELD-SYMBOLS: <fsx>, <fsy>.
do.
ASSIGN COMPONENT sy-index OF STRUCTURE xlfal to <fsx>.
if sy-subrc ne 0.
exit.
endif.
ASSIGN COMPONENT sy-index OF STRUCTURE ylfal to <fsy>.
if <fsx> eq <fsy>.
clear: <fsx>, <fsy>.
endif.
enddo.
Edited by: Jörg Wulf on Feb 22, 2010 4:02 PM
‎2010 Feb 24 6:41 AM
Hi ,
your solution has solved my problem . Thank you very much .
I have awarded you with maximum points . Thank you once again