on 05-16-2007 10:39 PM
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>
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
Thanks for all of the help!!
The mapping was not consistent with the file adaptor fields.
Troy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Troy,
Remove <?xml version="1.0" encoding="UTF-8" ?> while testing the message mapping.
Thanks,
Beena.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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>
Troy,
Are you getting the values in message mapping?
---Satish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
96 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.