on 05-06-2020 6:17 PM
Hello Experts,
I have 2 REGION property in my bw Iinfoobject:. Region1 and Region2. to get the Master data from BW info Object the region depends on the HEADQUARTER.
IF HQ is 0,blank or NA then REGION 1, else REGION2. The problem is that REGION1 and REGION2 also need a conversion when it is blank I have to fill NO_REGION.
I have tried in my tranformation file plenty combinations, one of them is:
REGION= *IF(HD=*str() then REGION1;HD=*str(0) then REGION1; HD=*str(NA) then REGION1; REGION2
Other option
REGION= *IF(HD=*str() then REGION1;HD=*str(0) then REGION1; HD=*str(NA) then REGION1;REGION1=*str() then *str(NO_REGION); REGION2=*str() then *str(NO_REGION); REGION2)
I have tried concatenations and more options in the transformation, what make me think that I need a conversion. But when trying conversion the blank row does not work. I PUT all my conversion (siince I need to convert REGION CODE to Description) and at the end I tryied
EXTERNAL INTERNAL
* NO_REGION
But it does not take the NO_REGION.
I have tried also
EXTERNAL INTERNAL
* js:%external%.replace("","NO_REGION")
But seems it is not taking the JAVA script.
any ideas what I am doing wrong.
Thanks for the comments.
Best Regards.
Use some prefix in transformation:
REGION= *IF(HD=*str() then *str(R_)+REGION1;HD=*str(0) then *str(R_)+REGION1; HD=*str(NA) then *str(R_)+REGION1; *str(R_)+REGION2
Then in conversion file:
EXTERNAL INTERNAL
R_ NO_REGION
R_01 NORTH
R_02 CENTER
...
Easy!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the comments Vadim,
HQ= BLANK then Region1
HQ=0 then Region1
HQ=NA then Region1
HQ= * then Region 2.
For Region1 or Region2 conversion: (Region 1 and Region2 have the same rules) blank is not working.
01 NORTH
02 CENTER
03 SOUTH
04 OTHER
BLANK -> NO_REGION ( have tried * NO_REGION but it does not work).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
15 | |
4 | |
2 | |
1 | |
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.