cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping some fields in 1 item

Former Member
0 Kudos

Hi all

I have this problem. I receieve this xml file:

<DESCRIPTION_DE />

<DESCRIPTION_FR />

<DESCRIPTION_IE />

<b><DESCRIPTION_PL>TEST PLOISH</DESCRIPTION_PL></b>

<DESCRIPTION_UK />

In this case I need to create a tag like the follow way

ITEM

<b>LAND1 = PL</b>

CTRYTXT = TEST PLOISH

But if I receieve the same file xml but with another order (like that)

<b><DESCRIPTION_DE > test languaje DE </ DESCRIPTION_DE ></b>

<DESCRIPTION_FR />

<DESCRIPTION_IE />

<DESCRIPTION_PL />

<DESCRIPTION_UK />

I need to create the next tag

ITEM

<b>LAND1 = DE</b> CTRYTXT = test languaje DE

In the original xml file, the name of the tag is different and the value too, but i need to mapping this tag at the same field in a BAPI.

Thks. BR

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Jose,

Also you can use like this:

for Land1:

If (DESCRIPTION_DE)-Not-Null then send DE to Land1 else

if (DESCRIPTION_FR)-Not-Null then send FR to Land1 else

if (DESCRIPTION_IE)-Not-Null then send IE to Land1 else

if (DESCRIPTION_PL)-Not-Null then send PL to Land1 else

if (DESCRIPTION_UK)-Not-Null then send UK.

The same logic holds true for CTRYTXT also but pass the source instead of constant.

---Satish

Former Member
0 Kudos

Jose,

Then use 5 if statements like nested if.

---Satish

Former Member
0 Kudos

hey

what about if u receive values in both

<DESCRIPTION_DE />

<DESCRIPTION_PL/>

thanx

ahmad

Former Member
0 Kudos

Hi Amhad

The thing is that we always receive 5 tags and only one of them with information

BR