cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping Issue- XSD (schema to BAPI)

Former Member
0 Kudos

Hi XI Experts ,

Scenario : XSD (Schema priovided by external partners ->XI-> SAP BAPI) of PO Creation (ZBAPI of :BAPI_PO_CREATE1)

-When the Cost centre data is 100% ,the GL ACCOUNT , Cost centre , Quantity , PO ITEM , Cost Area should come in one Item Node of : PO_ACCOUNT of BAPI

-When Cost Centre data is split into 60% , 40% in Source , thE values should occur in 2 item nodeS , 1Item with 60,00 Data

2 item(SECOND ITEM) with 40,00 data

I have used Remove context , Split by value and target looks fine.

But the Quanity , PO_ITEM value does't spilt into both the items. The Quanity , PO_ITEM is only in the first item node.

how do I get the values in both item node under :POACCOUNT

Thsi is sample Quanity xml (Part of Source structure):

<TotalQuantity>

<Quantity>

<QuantityValue>1.000</QuantityValue>

<UnitOfMeasurement>

<UOMCoded>EA</UOMCoded>

</UnitOfMeasurement>

</Quantity>

</TotalQuantity>

Currently this is how traget looks like

<POACCOUNT>

<item>

<PO_ITEM>00001</PO_ITEM><SERIAL_NO>0001</SERIAL_NO><QUANTITY>1.000</QUANTITY><DISTR_PERC>60.00</DISTR_PERC><GL_ACCOUNT>0005423100</GL_ACCOUNT><COSTCENTER>0000000313</COSTCENTER><CO_AREA>0510</CO_AREA>

</item>

<item>

<SERIAL_NO>0002</SERIAL_NO><DISTR_PERC>40.00</DISTR_PERC><GL_ACCOUNT>0005423100</GL_ACCOUNT><COSTCENTER>0000000318</COSTCENTER><CO_AREA>0510</CO_AREA>

</item>

</POACCOUNT>

Here PO_ITEM(0001) , Qaunity is missing in second item node and this is needed for me to occur to create PO in SAP.

You input is highly appreciated.

Thank you ,

Vara

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi,

if i understood u correctly..u want PO_ITEM and quantity in both the line items as 00001 and1.000 respectively...

if yes the go for "useoneasmany" function.

Thanks

Amit

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Amit ,

I tried the logic :

If ReferenceCoded Item| EQUALS | Constant(Percent) |if without else then RefNum ( Substring extract 40.00%, 60.00%) | Remove Context | Split by Value(Each Value) | DISTR_PERC (Percentage field of BAPI)

This worked if there are two cost centre purchase data which passed gets split into 2line items

Thank you ,

Best Regards,

Varalakshmi