cancel
Showing results for 
Search instead for 
Did you mean: 

1040:SRT: Wrong message type: ("expected: {} for CPI IDoc outbound Scenario

sugata_bagchi2
Active Contributor
0 Kudos

Hello Experts,

We are currently sending Customized DELVRY07 to an API-based application and upon receiving the API response we are mapping that response into a different type of IDoc SHPCON and sending it back to sap. Along with this we are also sending a SYSTA01 IDoc to update the original oubound DELVRY07 IDoc. However, after sending this response back to SAP we are getting into 02 status for the initial IDoc.

Problem with SOAP class

1040:SRT: Wrong message type: ("expected: {}ZPOI022_DELVRY07Response")

In order to handle this situation, I have added a groovy script before the end step to change the camelhttp status response code to 200 and manually added a IDoc response payload. But it is still failing with the same error. I have found this blog which says the similar thing - https://blogs.sap.com/2020/01/13/changing-fault-message-of-outbound-idocs-sent-from-ecc-to-sap-cpi/

In S4, when checked the TCODE - SRTUTIL for error log I can see the error generated for the payload response sent as SYSTAT01.
Please see the attached screenshots.

2023-08-02-1-29-48.jpg

error.jpg

srtutil.jpg

Thanks

Sugata

Accepted Solutions (1)

Accepted Solutions (1)

sugata_bagchi2
Active Contributor
0 Kudos

Hi All,
I have identified the issue:

the issue was : I was sending a SYSTAT01 IDoc to SAP to update the original IDoc which was in turn giving me back the response from S4 with the IDoc transfer id etc. and because of this IDoc type sent to S4. there is a header set to the message - SapIDocType as SYSTAT01. SO, after the request REply of sending the SYSTAT01 IDoc the header is set to this value and now I was sending the Original Source IDoc (DELVRY07)response but the header was still carrying the SYSTAT01 as SapIDocType , and that is why the IDoc status failed with 02. I used a content modifer to change that header value to my original source IDocType and it worked - IDoc didn't go to status 02.

Thanks

Sugataimage-2023-08-02-at-33338-pm.jpegimage-2023-08-02-at-33454-pm.jpegimage-2023-08-02-at-33454-pm.jpeg

Answers (0)