Hi Aman,
I recently tried to achieve the same but arrived to the conclusion that you can't fill a different set of fields in one transformation depending on the value of a field of a received record (even with different rule groups).
I was giving some hope on field routines with a SKIP_VALUE exception but the issue was that the SKIP_VALUE (when applied to a characteristic) is equivalent to a SKIP_RECORD. Thus, skipping a value in a field routine makes the entire record to be skipped.
So I ended with 2 transformations (in your case for each subtype).
Regards,
FCI
Hi Aman,
Can you Please try this routine
Data: wa_result_package like line of result_package.
wa_result_package like line st_result_package.
loop at result_package into wa_result_package
if wa_result_package-subtype = '1'.
wa_result_package-pcity = result_package-pcity
wa_result_package-paddress = result_package-paddress
wa_result_package-wladdress = ' '
wa_result_package-wl_city = ' '
elseif
wa_result_package-subtype = '5'.
wa_result_package-pcity = ' '
wa_result_package-paddress = ' '
wa_result_package-wladdress = result_package-pcity
wa_result_package-wl_city = result_package-paddress
endif.
modify result_package from wa_result_package.
endloop.
Add comment