on 08-23-2017 11:53 AM
Hello,
Currently I have a datasource with fields start date, end date, employee, subtype, address, city.
DSO created has primary keys : start date, end date, employee, subtype and data fields : p-address, p-city, wl-address, wl-city.
My requirement is that if in source record, subtype = 1, it should populate all primary keys and p-address, p-city and ignore other records. if subtype = 5, it should populate all primary keys with wl-address, wl-city and skip rest records
I have tried using rule group but skip records is not working and no data is going forward.
How can we achieve skipping records based on multiple conditions. If possible without abap routines.
warm regards,
BW
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Fredric,
How are you able to create two transformations ? When I try to create another transformation from same datasource to to DSO , it says transformation already exists.
Currently I have to populate 5 fields based on 5 Action Types ( coming from a single field ). I mean for each action type how can create one transformation ? Tried with Infosource also but from one single datasource to one single DSO multiple transformations are not working giving error. Please suggest.
warm regards,
AMAN
User | Count |
---|---|
76 | |
10 | |
10 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.