on 2023 Jun 22 9:56 PM
Hi experts!
I'd like to replace many products to one specific value via CI-DS.
MATERIAL1 --> PRODUCT_A
MATERIAL2 --> PRODUCT_A
MATERIAL3 --> PRODUCT_A
MATERIAL4 --> PRODUCT_A
I have the option to replace using replace_substr(MapIn.PRDID,'MATERIAL1','PRODUCT_A') but I don't know how to use it for many products at once.
Is there a CI-DS command to replace it all at once?
Best regards,
Victor Leao
Hi peter.casper !
I think your proposed solution is the best way to make it!
Anyways, considering the simplicity of my requirement, I decided to use the replace_substr as mentioned in the KBA 2007254 - How to Resolve Special Character Errors when loading data to SAP Sales and Operations Planning.
replace_substr(
replace_substr(
replace_substr(table.PRDID,'MATERIAL1','PRODUCT_A'),
'MATERIAL2', 'PRODUCT_A' ),
'MATERIAL3', 'PRODUCT_A' ),
It's not the best, but it fits the simple requirement.
Thanks a lot!
Best regards!
Victor Leao
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Victor Leao,
are you striving for a static replacement, i.e. a more or less fixed list of material numbers to be replaced, or would you like to be more flexible in regards to mapping/replacement functionality?
Anyways I would recommend to create a lookup table w/ MATNR | SUBST_MATNR which should be connected via left outer join to your root table. Now you can apply the following logic for MATNR:
IFTHENELSE(LookupTable.SUBST_MATNR) != NULL, LookupTable.SUBST_MATNR, RootTable.MATERIAL)
BR, Peter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello peter.casper !
In fact, I'm striving for a static replacement. The material list is not supposed to change.
Thank you so much for your attention!
Victor
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
10 | |
5 | |
3 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.