2009 Jun 23 7:52 AM
I have a mapping file where i have the source n target structure,field and value.Also the mapping rule in an internal table
example:
Source-structure source-field source-field-value rule target-structure target-field target_value
abc fielda X MOVE XYZ field1
Also I have source structure with values in 2nd internal table.
I have a third empty internal table with target fields.
Now based on the above two internal tables(mapping rule in 1st internal table and values from the 2nd internal table) I have to fill the 3rd internal table.Can anyone suggest some logic how can I proceed with this?
I have a mapping file where i have the source n target structure,field and value.Also the mapping rule in an internal table
example:
Source-structure source-field source-field-value rule target-structure target-field target_value
abc fielda X MOVE XYZ field1
Also I have source structure with values in 2nd internal table.
I have a third empty internal table with target fields.
Now based on the above two internal tables(mapping rule in 1st internal table and values from the 2nd internal table) I have to fill the 3rd internal table.Can anyone suggest some logic how can I proceed with this?
2009 Jun 23 8:06 AM
Hi,
Based on the source fields and target fields and using the mapping rules, you can build the complete program using the SUBROUTINE POOLS.
This subroutine pool will be a kind of program will get generated and executed at run time. It will fulfill your requirement.
Search SCN or Google for creation and usage of Subroutine pool.
Regards,
Santhosh.
2009 Jun 23 9:55 AM
Hi,
Loop at itab1.
read table itab2 with key rule = itab1-rule.
if sy-subrc = 0.
move-corresponding itab1 to itab3.
move-corresponding itab2 to itab3.
append itab3.
clear itab3.
endif.
Endloop.
Regards,
Kumar Bandanadham
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |