cancel
Showing results for 
Search instead for 
Did you mean: 

How to Convert Blanks in Conversion files QUESTION

former_member182305
Active Participant
0 Kudos

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.

former_member186338
Active Contributor
0 Kudos

Please provide a table with all possible combinations of HQ and expected result...

Not transformation lines, but some table!!!

Not clear, what do you want to achieve!

Accepted Solutions (1)

Accepted Solutions (1)

former_member186338
Active Contributor
0 Kudos

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!

former_member182305
Active Participant
0 Kudos

😮

Wow!!!! Did not think of it. You are right !!!!!!! It worked.

Thank you very much!!!!!

Answers (1)

Answers (1)

former_member182305
Active Participant
0 Kudos

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).