cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping Error

Former Member
0 Kudos

Hi...

I am trying to do Soap to JDBC to Soap scenario using stored procedure. While executing the scenario, the request is passed to JDBC and the Table got executed. I am not getting the response back.from that table i need to get the invoiceid feild back. How to get that? i am trying to do that, but it is showing some mapping problem. Could you please help in this issue.

Below is the JDBC response structure.

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

<ns0:JDBC_Response xmlns:ns0="http://InvoiceProcessing">

<JDBCResponse>

<InvoiceId>16</InvoiceId>

</JDBCResponse>

</ns0:JDBC_Response>

Below is the target structure.

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

<ns0:File_Response xmlns:ns0="http://InvoiceProcessing">

<FileResponse>

<InvoiceId>16</InvoiceId>

</FileResponse>

Can you please tell where i had done wrong? Is the JDBC Resposne structre is correct?

Thanks & Regards,

Leela

</ns0:File_Response>

Accepted Solutions (1)

Accepted Solutions (1)

dharamveer_gaur2
Active Contributor
0 Kudos

have to tested your mapping and done mapping mandatory field.

refer SAP Notes – 804124, 807000

Former Member
0 Kudos

Hi...

I have tested the mapping and it is working fine.

Regards,

Leela

former_member181985
Active Contributor
0 Kudos

Hi,

I suspect that the structure defined for JDBC response is incorrect.

Since your scenario is SOAP to JDBC, check the Response Message in MONI. Under PIPELINE step CallAdapter--> check the payload structure.

You have to define this structure for your JDBC response.

Thanks,

Gujjeti.

Former Member
0 Kudos

Hi Praveen,

i have seen the payload in the call adapter. It is not displaying in the xml format. Some problem in tha structure itself.

The below is the payload which is in the call adapter.

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

<ns0:MT_StoredProcedure_response xmlns:ns0="http://InvoiceProcessing">

<EXECUTE_response>

<response_1>

<update_count>1</update_count>

</response_1>

<response_2>

<row>

<>37</>

</row>

</response_2>

</EXECUTE_response>

</ns0:MT_StoredProcedure_response>

Could ypu please tell how to create the structure for the above payload. I think the above payload is not in the correct form. Please help in this isue.

Thanks & Regards,

Leela

Former Member
0 Kudos

Hi,

Have you created the Response structure properly.

As said above you need to add the _response to the Message type then try it once.

Go throgh the following blog to create the Response message structure for JDBC.

Regards

Goli Sridhar

Answers (6)

Answers (6)

Former Member
0 Kudos

Hi friends, Thanks for your replies. The Problem is with the Stored Procedure. First it is returning only the feild value not the feild name. Now i have changed the stored procedure. After that it is working fine.

And the mapping error is , i have changed the JDBC response structure based on the Payload which was generated in SXMB_moni---call adapter.

Then my mapping issue was solved.

former_member181985
Active Contributor
0 Kudos

Good to hear............:)

dharamveer_gaur2
Active Contributor
0 Kudos

Look your stored procedure there is no out parameter that can return result of select.

execute your procedure from oracle client, i think it would not work.

Former Member
0 Kudos

Hi Gaur,

I have executed the Stored Procedure in the SQL server. It is returning the value.

Thanks & Regards,

Leela

Former Member
0 Kudos

Hi,

Have you tested the response mapping in the Test Mapping in the Message Mapping?

Are you getting any error in the Test Mapping.

Regards

Goli Sridhar

Former Member
0 Kudos

Hi Sridhar,

I have tested the reponse mapping in Test mapping. It is wroking fine.

Thanks & Regards,

Leela

Former Member
0 Kudos

HI

Is this same you have another thread ??

Thanks

Gaurav

Former Member
0 Kudos

Yes

Former Member
0 Kudos

HI,

If you are having the mandatory field in the Response target structure then change it to 0..unbound and then try to execute the scenario.

Regards

Goli Sridhar

dharamveer_gaur2
Active Contributor
0 Kudos

As i told how you are returning Invoice ID from your stored procedure, r u using cursor variable?

could you paste your stored procedure code.

Former Member
0 Kudos

Hi Gaur,

We are not using any cursor variable.

Below is the Stored Procedure code we are using.

Details:

CREATE PROCEDURE sp_EnterInvoice

(@invoiceRefNumber varchar(50),@vendorName varchar(200),@currency varchar(50),@invoiceDate dateTime,@poNumber varchar(100),@poDate dateTime,@invoiceAmount float,@paymentTerms varchar(10),@approvalStatus varchar(1),@createdBy varchar(100),@createdDate dateTime,@customerProcess varchar(10))

As

INSERT INTO [InvoiceMain]([InvoiceReferenceNumber],[VendorName],[Currency],[InvoiceDate],[PONumber],[PODate],[InvoiceAmount],[PaymentTerms],[ApprovalStatus],[CreatedBy],[CreatedDate],[CustomerProcess])VALUES(@invoiceRefNumber,@vendorName,@currency,@invoiceDate,@poNumber,@poDate,@invoiceAmount,@paymentTerms,@approvalStatus,@createdBy,@createdDate,@customerProcess)

SELECT MAX(InvoiceId) FROM [InvoiceMain]

dharamveer_gaur2
Active Contributor
0 Kudos

Why not using lookup to get field from table.

you are using stored procedure so to get response back have to return field from their.

If you are returning only update_count or insert _count then it can be done easily but in case any field from table then need to use cursor variable.so you require oracle expert.

It would be better to use lookup

Former Member
0 Kudos

Hi Gaur,

From the response, i need only the InvocieId , not the update_count.

I have defined my response structure as below.

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

<ns0:MT_StoredProcedure_response xmlns:ns0="http://InvoiceProcessing">

<Statement_response>

<response_2>

<row>

<InvoiceId/>

</row>

</response_2>

</Statement_response>

</ns0:MT_StoredProcedure_response>

Should i make any changes to the reponse structure? Could you please help in this issue.

Thanks & Regards,

Leela

Former Member
0 Kudos

HI,

Your response structure is looking correct.

Execute the stored procedure on the database and check whether it is returning the value?

The error is because of Mandatory filed in the target response structure is not getting the value.

Regards

Goli Sridhar

Former Member
0 Kudos

Hi Sridhar,

I have executed the stored procedure and it is returning the value also. Even from the scenario, i have executed. The Request part is working fine. The table got updated. After updating, i need the InvocieId feild from the table to return back.

Thanks & Regards,

Leela

dharamveer_gaur2
Active Contributor
0 Kudos

hi

this is mapping error

change occurance of your field

Former Member
0 Kudos

Hi Gaur,

I have changed the occurance as 0---unbounded.

But getting the same error.

Regards,

Leela

dharamveer_gaur2
Active Contributor
0 Kudos

Hi

Change your Response Message Type name

it must be contain response word in message type name at end(Case sensitive not even Response)

Former Member
0 Kudos

Hi Gaur,

Thanks for respose.I have changed the Resposne to response and executed.Eventhough it is showing the same error.

The SOAP response indicates that an error occurred:

System Error

<detail><s:SystemError xmlns:s="http://sap.com/xi/WebService/xi2.0"><context></context><code>MAPPING.EXCEPTION_DURING_EXECUTE</code><text>com.sap.aii.utilxi.misc.api.BaseRuntimeException thrown during application mapping com/sap/xi/tf/_MM_Invoice_: Fatal Error: com.sap.engine.lib.xml.parser.Parser~</text></s:SystemError></detail>

Thanks & Regards,

Leela