cancel
Showing results for 
Search instead for 
Did you mean: 

How to update the Sent Idoc Status based on the Response From Webservice

Former Member
0 Kudos

Hi All,

I have to develop Idoc--SOAP Sync Process Scenario Using BPM .

I have configured every thing using BPM and mapped

MATMAS----SOAP Request

SOAP Resp----STATUS.SYSTAT01

In R/3 the Main Idoc Number(MATMAS) Status needs to be update , but it is creating the new Idoc with STATUS.SYSTAT01.

I have used STATUS.SYSTAT01 Idoc to Update the status of the Original idoc based on the Response that is coming from webservice .

I was posted the same thread a days ago and there Bhavesh suggested me some sugessions.

iam unable to follow OR not able to clear my self on this.

Please suggest me or give some over view kind of thing on this

Regards

Accepted Solutions (1)

Accepted Solutions (1)

sunil_singh13
Active Contributor
0 Kudos

Suman,

In BPM you can use the messages previosly received at any step in BPM.

Now in mapping you have to select two messages one will be Resp from WS and other will be the MATMAS structure.

Use IDOC number of MATMAS and pass it to IDOC NO of Target Structure.

Use this maaping after u get Response from WS.

And the ststus of corresponding IDOC no will be updated.

Thanks

Sunil Singh

Former Member
0 Kudos

Hi Sunil,

Thank you for valuable reply from you....

I have some more confussions here

1) I will do Request Mapping MATMAS----SOAP Request(There is no change in this)

2) I will mapp the response of SOAP first and next i will mapp the MATMAS Idoc number to Idoc

number which is there in the SYSTAT.

3) Do i need to change any changes to my present BPM configuration..

Receive step(Async, IdocReq)-Send step(Sync, Idoc req & Idoc Res)--Send(Async,Idoc Res)

And also how the status of the MATMAS Idoc will be Updated by mapping the Idoc number of MATMAS in the Response Mapping???On which Basis this will be

Regards

sunil_singh13
Active Contributor
0 Kudos

Hi Suman,

1) I will do Request Mapping MATMAS----SOAP Request(There is no change in this)

Right

2) I will mapp the response of SOAP first and next i will mapp the MATMAS Idoc number to Idoc

number which is there in the SYSTAT.

No need to use two Explicit Mapping. Can be Done using Multimapping. First Remove the Mapping of response from Interface mapping in IR. i.e. You will have SOAP RESPONSE just after the Synch call. Now use Transformation Step just After the Synch call. in that use mapping in which you have taken Soap response and MATMAS Structure together in the Source side(You can specify multiple Source Structure in Mappping).

Take Status Structure in Target Side . Do the Neddful mapping.

And use this Interface mapping in the transformation step.

3) Do i need to change any changes to my present BPM configuration..

Receive step(Async, IdocReq)-Send step(Sync, Idoc req & Idoc Res)--Send(Async,Idoc Res)

You have to use One More Transformation step

Receive step(Async, IdocReq)---Send step(Sync, Idoc req & Idoc Res) ->Transformation(Soap Response +Matmas -> STATUS) -


Send(Async,Idoc Res)

As this structure will contain the data that will be returned by your R/3 along with IDOC number.

You will map that IDOC no to IDOC no in STATUS.

These IDOC no are unique fields. When STATUS with same IDOC will come the status of that Perticular IDOC no will be Updated.

Thanks

Sunil Singh

Former Member
0 Kudos

Hi Suman

I have not seen the previous post from you. But what i can understand is you want to update the status for the IDOC.

As per my knowledge the when you deal with Standard SAP IDOC you need to return the IDOC number to set the staus SYSTAT

May be that is the reason you have been told to do so. I think you should take help from a functional person on this. Material master IDOC also will be able to do so.There are some specific number codes for the status that you need to send back to show success or failure

You are using BPM and you need to send the response from webservice as well as IDOC number hence for response you need to have N:1 mapping in BPM to SYSTAT target message

Receive step(Async, IdocReq)-Send step(Sync, Idoc req & Idoc Res)--Send(Async,Idoc Res)

This looks correct the mapping you need to do at the last send step is N:1

With this you can configured the ALEAUD01 message in the R/3 system and scheduled the RBDSTATE program to run periodically to get the status update from IDOC

Thanks

Gaurav

Former Member
0 Kudos

Hi Sunil,

I have done the following

1)Mapped MATMAS Req----SOAP Request

2)In Response Mapping.....Source as took SOAP response & in messages TAB added the Idoc of MATMAS also(Multi Mapp) .

Didnt changed any Occurences here & Completed the Mapping

3)Created Interface Mapping and here.....Source Interface as Abstract Idoc's Sync Inteface

.......Target Interface as Sync SOAP MI

And Provided all the Request & Response Mappings.

While Activating the IM -


getting this Error

Activation of the change list canceled Check result for Interface Mapping IM_IDOC_POS_Req_Res | http://sapretail-pos.com/outbound: Response mapping program Message Mapping MM_POS_IDOC_Response | http://sapretail-pos.com/outbound does not match the target interface. The mapping program has source message IDoc MATMAS.MATMAS03 | urn:sap-com:document:sap:idoc:messages at position 2. However, the target interface does not have a target message at position 2. Mapping program Message Mapping MM_POS_IDOC_Response | http://sapretail-pos.com/outbound does not match the interface mapping. The number or frequencies of source or target messages for the message mapping are not identical to the number or frequencies of source or target interfaces.

Regards

sunil_singh13
Active Contributor
0 Kudos

Hi Suman,

You must be specifying the Multimapping in Response tab of interface.

Instead dont specify any mapping in Response tab.

Use transformation step. and in transformation step specify your mapping through Interface mapping.

It will be easy to understand what u r exactly doing if u can send me screen shot of your Interface mapping.

Else i will send u screen shot how it should be done

Thanks

Sunil Singh

Former Member
0 Kudos

Hi Sunil,

Thanks for your valuable reply on this...

I have done as you said for Interface mapping and Activated...

I have created the following MI's

MI_Idoc_req_Abs------MATMAS Idoc

MI_Idoc_Res_Abs------STATUS Idoc

MI_Idoc_Req_Res_Abs-----MATMAS + STATUS

MI_SOAP_Req_Res------ SOAP req +Res

Now in Integration process i have done like this----

Receive(Async, Idoc req)---Send(Sync, idoc Req, Idoc Res)-Transformation(Interface mapping,??)-Send(Async,Idoc res)

In Transformation step i have mentione the Interface mapping after that, it is asking for Soruce & Target messages.

What i have to specify here.....

Regards

sunil_singh13
Active Contributor
0 Kudos

Hi Suman,

As you have mentioned 2 source messages and one target message in the target side.

you would have taken 2 source operation and one target operation in your interface mapping and would have selected the corresponding message mapping featuring the listed message the corresponding mapping.

When you use this Interface mapping in property pane of transformation step it should ask you for two source Message interfaces and one target message interface if it is not so then you have to rework on your Interface mapping.

Select the Soap response and Matmas in Source and status in Target.

If you can send me screen shot i can help u in better way

(If possible :O) )

Thanks

Sunil Singh

Former Member
0 Kudos

Hi Sunil,

Sunil Wrote

Hi Suman,

You must be specifying the Multimapping in Response tab of interface.

Instead dont specify any mapping in Response tab.

But now you are saying that

As you have mentioned 2 source messages and one target message in the target side.

you would have taken 2 source operation and one target operation in your interface mapping and would have selected the corresponding message mapping featuring the listed message the corresponding mapping.

Iam totally confused Sunil.

In the previous reply you said that dont select any thing (Response Mapping)in Interface mapping for Response TAB

But now in this reply you are saying like this....

Regards

sunil_singh13
Active Contributor
0 Kudos

OHHHHh....

:O)

I think i have took some short cut while explanning :). (Kidding)

You must be specifying the Multimapping in Response tab of interface.

Instead dont specify any mapping in Response tab.

in u r previous development you were converting the response to STATUS in response tab of your Interface mapping.

As you have not used any transformation before the synch step it means you had used this interface mapping in interface detrmination of your ID.

So to not alter your configuration i said

Instead dont specify any mapping in Response tab.

now u need not to change anything in ID part. Also your response tab will not contain any mapping as you want the SOAP response as it is.(You can do the one to one mapping and specify that in Response tab but as structure is same it is not required).

When you use any transformation step in its property tab it will ask you for Interface mapping. So you have to develop another interface mapping that you will; specify in Propety TAb of Transformation step.

That will conatin the SOAP Response and MATMAS in Source and STATUS in Target side.

When you save this it will show you two message in source side and one message in target side in the Bottom pane . And in Between them you will have the option for specifying message mapping

Here you have to specify your multimapping that you have developed.

Now your Interface mapping for transformation step is complete just save and activate it.

Now you have to mention this IM in property Tab of Transformation Step. As soon as you selct the right IM it will give you option for specifying two source structure and one target structure of Abstract type so select the appropiate one.

Thanks

Sunil Singh

Former Member
0 Kudos

Hi,

Created the following MI's

MI_Idoc_req_Abs------MATMAS Idoc

MI_Idoc_Res_Abs------STATUS Idoc

MI_Idoc_Req_Res_Abs-----MATMAS + STATUS

MI_SOAP_Req_Res------ SOAP req +Res

Didn't created any Abstract interfaces For SOAP

In Mapping::

Request Mapping(MATMAS Idoc)----


-


Soap Request

Response Mapping---Soap Response

-


MATMAS Idoc -


STATUS Idoc

In Interface Mapping::

1) Select the Sync source Interface and the target MATMAS Idoc

Do Read Interfaces

Do Need full for Request TAB and Leave Blank for Response TAB

2) Create One more Interface mapping with source MI's one as soap Response and the second one as MATMAS Idoc & the target as STATUS Idoc

Do Read Interfaces and save

Here do i need to create any Abstract Interface for SOAP Response apart from the above mentioned MI's list???? , why because in this Interface mapping i have to mention the source MI's.

>>Now you have to mention this IM in property Tab of Transformation Step. As soon as you selct the right IM it will give you option for specifying two source structure and one target structure of Abstract type so select the appropiate one.

Do i need to create one more Abstract MI for SOAP Response Structure inorder to select source & target structures here???

Can you give some more clarity in this step....

Regards

sunil_singh13
Active Contributor
0 Kudos

Hi Suman,

It is clearly mentioned in SAP help that "SAP Intermediate Documents (IDOCS) are EDI like documents that are asynchronous in nature."

So Your Scenario is Asynch(receive) - Synch(WS call) -Transformation (Multimapping)- Asynch(Send to R/3).

now go in this way:

you can develop all the message Interfaces of Abstract catagory (not manditory )

MI_AA_MATMAS -> Abstract Asynchronous message interface for your Matmas IDOC

MI_AS_SOAP_ReqandResp -> Abstarct Syncronous MI for SOAP request and response.

MI_AA_STATUS ->Abstract Asyncronous MI for Status Idoc

MI_AA_SOAP_Req -> Abstarct Asyncronous MI for SOAP request .

MI_AA_SOAP_Res -> Abstarct Asyncronous MI for SOAP response .

Thats all in Message interface.

your first reciever :

(This will receive the message asynchronously from R/3)

create a conatainer varaiable (say preceive) and assign it message interface MI_AA_MATMAS

Now in thw Propert TAB of this step: give this message name.

Step2: Synchronous call :

create container Variable psoaprequest and psoapresponse give abstract message interface MI_AA_SOAP_Req and MI_AA_SOAP_Req resp.

Now in thw Propert TAB of this step:

Synchronous Interface : MI_AS_SOAP_ReqandResp

Request Message : psoaprequest

Response Message: psoapresponse

Transformation Step :

Here you will specify Interface Mapping that will conatain Multimapping between Synch Response - MATMAs and STATUS

Let's name it as IM_ResandMatmasToStatus

create a container variable as pstatus and assign it abstract interface MI_AA_STATUS.

In Property pan of this step :

Interface mapping :IM_ResandMatmasToStatus

Source Message :psoapresponse

preceive

(IT will ask you for two source messages as IM selected in this transformation has 2 source messages)

Target Message :pstatus

Send step:

Select a message as pstatus.

thats all in IR.

If have doubt in ID just let me know.

Thanks

Sunil Singh

Answers (0)