cancel
Showing results for 
Search instead for 
Did you mean: 

Field routine to pick PO data

0 Kudos
87

Dear Experts,

My PSA data is picking up PO doc from ebeln and yyebeln. In some cases where ebeln is blank I need it to pick yyebeln. Please see the screenshot below. Please advice on the code to be written to take data from psa to dso to get the blank fields. Thanks a lot for your help.

View Entire Topic
former_member183519
Contributor
0 Kudos

Hello Ksharma,

you can use below code  in start routine.

LOOP AT SOURCE_PACKAGE assigning <source_fields>.

if <source_fields>-ebeln is not initial.

<source_fields>-DSO_PURCHASING_DOC_FIELD = <source_fields>-ebeln.

else.

<source_fields>-DSO_PURCHASING_DOC_FIELD = <source_fields>- yyebeln..

endif.

ENDLOOP.

Regards,

Hitesh