2015 Nov 12 10:37 PM
For each field in the EMIGALL migration object, if I write a custom ABAP rule I have values such as $C$, $S$ -- I understand these are inbound and load values, respectively. So if I want to reference to another field/column in the same structure, and if the load structure has multiple Generation fields, how can the coding be done? Is EMIGALL flexible enough so I can reference to the object instance rather than the field only?
I hope I am making myself clear.
2015 Nov 13 3:29 AM
Hi David,
Yes it is possible to reference the field in the structure which has multiple generation fields.
Your structure should start with Z_.
For Example in the CONNOBJ migration object if you want to fill the Postal code taking region as reference.You should write the rule as below.
If Z_ADDR_DATA-REGION = 'XX'.
MOVE 'XXXXX-XXXX' TO Z_ADDR_DATA-POSTAL_CODE1.
ELSEIF Z_ADDR_DATA-REGION = 'YY'.
MOVE 'YYYYY-YYYY' TO Z_ADDR_DATA-POSTAL_CODE1.
ELSE.
MOVE 'ZZZZZ-ZZZZ' TO Z_ADDR_DATA-POSTAL_CODE1.
ENDIF.
MOVE Z_ADDR_DATA-POSTAL_CODE1 TO ADDR_DATA-POSTAL_CODE1.
Hope this helps.
Regards,
Chandandeep.
2015 Nov 13 3:29 AM
Hi David,
Yes it is possible to reference the field in the structure which has multiple generation fields.
Your structure should start with Z_.
For Example in the CONNOBJ migration object if you want to fill the Postal code taking region as reference.You should write the rule as below.
If Z_ADDR_DATA-REGION = 'XX'.
MOVE 'XXXXX-XXXX' TO Z_ADDR_DATA-POSTAL_CODE1.
ELSEIF Z_ADDR_DATA-REGION = 'YY'.
MOVE 'YYYYY-YYYY' TO Z_ADDR_DATA-POSTAL_CODE1.
ELSE.
MOVE 'ZZZZZ-ZZZZ' TO Z_ADDR_DATA-POSTAL_CODE1.
ENDIF.
MOVE Z_ADDR_DATA-POSTAL_CODE1 TO ADDR_DATA-POSTAL_CODE1.
Hope this helps.
Regards,
Chandandeep.