cancel
Showing results for 
Search instead for 
Did you mean: 

Only constant values populate in target payload

Former Member
0 Kudos

Hi all,

I have a File to RFC scenario that attempts to post invoices via BAPI_ACC_GL_POSTING_POST.

The source values are populating the payload (see below) but the only values in the target payload are constants supplied in the mapping.

I have tested the mapping in the designer. Both the message mapping tester and the interface mappings tester populate the target field values with the source values. I can supply the mapping text if needed.

Any thoughts?

Thanks,

Troy

Source payload in sxmb_moni:

<?xml version="1.0" encoding="utf-8" ?>

- <ns:MT_Sales_Tran_Invoice xmlns:ns="urn:http://freemanco.com/xi/sales_tran1.0">

- <Invoice>

- <invoice_header>

<Event>000000000142319</Event>

<Branch>0112</Branch>

<Transaction_Date>20070509</Transaction_Date>

<Record_Type>IN</Record_Type>

<Company>01</Company>

<Customer>0000100002</Customer>

<Invoice_No>336</Invoice_No>

<Amount>13500</Amount>

<Tax_Amount>0</Tax_Amount>

</invoice_header>

- <invoice_detail>

<Record_Type>ID</Record_Type>

<Invoice_Number>336</Invoice_Number>

<Quantity>100</Quantity>

<Net_Amount>13500</Net_Amount>

<Discount_Pct>0</Discount_Pct>

<Order_key>446</Order_key>

<Order_Item_Key>1</Order_Item_Key>

<GL_account>410010</GL_account>

<Sequence_No>0000000001</Sequence_No>

</invoice_detail>

</Invoice>

</ns:MT_Sales_Tran_Invoice>

Target payload in sxmb_moni:

<?xml version="1.0" encoding="UTF-8" ?>

- <ns1:BAPI_ACC_GL_POSTING_POST xmlns:ns1="urn:sap-com:document:sap:rfc:functions">

- <DOCUMENTHEADER>

<USERNAME>george</USERNAME>

<COMP_CODE>01</COMP_CODE>

<DOC_TYPE>DR</DOC_TYPE>

</DOCUMENTHEADER>

<ACCOUNTGL />

<CURRENCYAMOUNT />

<RETURN />

</ns1:BAPI_ACC_GL_POSTING_POST>

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Ahmad,

While Testing Message mapping in IR it is not mandatory to provide this.

I have tried this when I got same error.It works.

While posting message the tag is manadtory but not while testing.

Thanks,

Beena.

Former Member
0 Kudos

hey

thanx for correcting me,but in actual scenario he definitely needs the main tag(and even u agree to this)so the method of removing the tag won't solve his problem coz that will always be present in actual run.the probelm is special characters for which UTF-8 is not capable of .

he might be getting some special characters and to solve that the encoding must be changed.

thanx

ahmad

Answers (4)

Answers (4)

Former Member
0 Kudos

Thanks for all of the help!!

The mapping was not consistent with the file adaptor fields.

Troy

Former Member
0 Kudos

Troy,

Remove <?xml version="1.0" encoding="UTF-8" ?> while testing the message mapping.

Thanks,

Beena.

Former Member
0 Kudos

Hey

>>Remove <?xml version="1.0" encoding="UTF-8" ?> while testing the message mapping

why?the XML structure wont be valid if u remove this

thanx

ahmad

Former Member
0 Kudos

The error is gone and now the testing matches the payload in sxmb_moni.

Only the constants are showing up in the target values.

Obviously a problem with the mapping.

Troy

Former Member
0 Kudos

Hey

yeah,the problem is ur message mapping.check ur message mapping thoroughly

thanx

ahmad

Former Member
0 Kudos

Hi,

Try to test the message mapping using payload in sxmb_moni.

Check if there is any mismatch in namespace (in structure and the payload in sxmb_moni).

Thanks,

Beena.

Former Member
0 Kudos

Beena,

You may be on to something...

When I run the sxmb_moni payload in the message mapping tester I get this error:

17:36:32 Start of test

Fatal Error: com.sap.engine.lib.xml.parser.ParserException: XML Declaration not allowed here.(:main:, row:1, col:7) com.sap.aii.utilxi.misc.api.BaseRuntimeException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException: XML Declaration not allowed here.(:main:, row:1, col:7)

Here is the exact xml from sxmb_moni:

<?xml version="1.0" encoding="utf-8" ?>

<ns:MT_Sales_Tran_Invoice xmlns:ns="urn:http://freemanco.com/xi/sales_tran1.0">

<Invoice>

<invoice_header>

<Event>000000000142319</Event>

<Branch>0112</Branch>

<Transaction_Date>20070509</Transaction_Date>

<Record_Type>IN</Record_Type>

<Company>01</Company>

<Customer>0000100002</Customer>

<Invoice_No>336</Invoice_No>

<Amount>13500</Amount>

<Tax_Amount>0</Tax_Amount>

<Username>thompt</Username>

</invoice_header>

<invoice_detail>

<Record_Type>ID</Record_Type>

<Invoice_Number>336</Invoice_Number>

<Quantity>100</Quantity>

<Net_Amount>13500</Net_Amount>

<Discount_Pct>0</Discount_Pct>

<Order_key>446</Order_key>

<Order_Item_Key>1</Order_Item_Key>

<GL_account>410010</GL_account>

<Sequence_No>0000000001</Sequence_No>

</invoice_detail>

</Invoice>

</ns:MT_Sales_Tran_Invoice>

Former Member
0 Kudos

Hey

ur XML payload has some special characters,try to open this XML in notepad or in MSWord and track those special characters,u can also change the encoding to ISO-8859-1 and then test ur mapping again

thanx

ahmad

Former Member
0 Kudos

Troy,

Are you getting the values in message mapping?

---Satish

Former Member
0 Kudos

Satish,

Yes, when I test the message mapping in the designer with the same values, they populate the target fields.

When I check the message in sxmb_moni, only the constants are populated.

Troy

Former Member
0 Kudos

Troy,

Check whether you have disabled the fields or if you use any node funcitons check whether you are having any suppress values etc.

Can you please send a screenshot of your mapping with mapped fields to my id satishguntaka@gmail.com

---Satish