cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping Context Issue - Line item values are getting mixed

sntamilselvan
Explorer
0 Kudos

Hi Experts,


URGENT! Action Needed.


I need <PRODUCTID SUPPLIER> to be in respective line items.

For ex:- If <productid> is filled in all line items it works perfect (values are Mapped to respective line item).

ProductID on PO

ProductID on XML

19252

19252

159594

159594

191196

191196

14321

14321

But, if <ProductID> is missed in some line items,then there is some mishap. Actually, If it is empty value I want same to be present in respective line item but here in below example <Product ID> line item 40 is getting populated in line item 20.

Line Item

ProductID on PO

ProductID on XML

10

TEST VENDOR PRODUCT ID

TEST VENDOR PRODUCT ID

20

TEST VENDOR PRODUCT ID 2

30

40

TEST VENDOR PRODUCT ID 2

50

60

Kindly help me on this issue !

  Current mapping logic (Screenshot attached) for this <Product ID supplier> :-

if QUALF = 002 then value of IDTNR should be mapped to ProductIDSupplier.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Selvan,

Raise the context for Qualf and IDTNR to higher context above ProductID node.

You can remove 'Remove context' function after if block now.

Regards,

Pranav

sntamilselvan
Explorer
0 Kudos

Hi Ram,

Thanks a lot. It works..

Answers (3)

Answers (3)

sntamilselvan
Explorer
0 Kudos

Hi Guys,

Thanks for the Effort taken.

Need your help on this below thread also,

http://scn.sap.com/thread/3464462

Harish
Active Contributor
0 Kudos

Hi Tamil,

Why are you using remove context in the map? you can add the map with default in place of remove context.

Regards,

Harish

sntamilselvan
Explorer
0 Kudos

Hi Harish,

If i replace Remove conetxt with Mapwithdefault then i get correct 1st line item but next line items are empty value with the presence of the Tag <Product ID supplier>. originally, i need to skip them if they are empty value.

former_member184720
Active Contributor
0 Kudos

Hi Tamil- try using mapwithdefault function for qualf & idtnr

sntamilselvan
Explorer
0 Kudos

Hi Hareesh,

Thanks.

I have used two Mapwithdefault between QUALF and IDTNR maped them to IF and THEN respectively. i dont see any difference.

Former Member
0 Kudos

Hello,

>>Actually, If it is empty value I want same to be present in respective line item but here in below example <Product ID> line item 40 is getting populated in line item 20.


I assume, you want blank xml tag to be created for ProductId** in case qualf in the corresponding line item in not 002?

If yes, then instead of IfwithoutElse, you can use IfThenElse (and also remove "removeContext" and SPB) and in the > "Else" part map Constant() + map IDTNR with "Then" part ( just to be on a safer side u can keep map with default as it is)


Thanks

Amit Srivastava