cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping after a RFC call

Former Member
0 Kudos

Hello,

I just tried to enhance with some error report my scenario that was:

File (XML) -> RFC (BAPI_EMPLOYEE_GETDATA) - > File (XML)

As in the request file I have the PERNR, an employee is uniquely identified. I want now to send back an error message in my response file if for example the PERNR is linked to nobody.

I can map the error message taht is in RETURN/MESSAGE but I would need also to send the requested PERNR so the external system can figure out which employee is having trouble.

I use a BPM that has a Receive step, then I can add a container operation to store the PERNR in a Simple Type container variable. The next step is the Synchronous Send step for the BAPI call and finally the Send step for the response File.

I can't figure how to place back the PERNR in the error response message. Does any one of you see how to do that ?

Cheers,

greg

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

> I can map the error message taht is in RETURN/MESSAGE but I would need also to send the requested PERNR so the external system can figure out which employee is having trouble.

>

In the response create another element that will have PERNR along with the error msg.

> I use a BPM that has a Receive step, then I can add a container operation to store the PERNR in a Simple Type container variable. The next step is the Synchronous Send step for the BAPI call and finally the Send step for the response File.

Once you have that element in response, you can map it back finally.

Answers (1)

Answers (1)

justin_santhanam
Active Contributor
0 Kudos

Gregorio,

After Synch Step, you will have transformation step ,correct?

Now create mapping program, whose sources are

Your actual Incoming message and RFC Response message ---> Target Message.

The concept in N:1 Multimapping.

Outbound Interface + RFC Response ---> Target.

PS: I asked you to choose Outbound Interface , coz you can get PERNR from the Outbound message.

Hope it helps!

raj.

Former Member
0 Kudos

I see the N:1 mapping stuff, I have never done that in XSLT, so any link is welcome.

But I can't understand why selecting the Outbound ?

Maybe a precision, my incoming and outbound message are from the Message Type (I have an action field that changes)

Outbound Interface + RFC Response ---> Target.

PS: I asked you to choose Outbound Interface , coz you can get PERNR from the Outbound message.

justin_santhanam
Active Contributor
0 Kudos

Gregorio,

Why you want to go for XSLT? Don't want you to do in normal message mapping?

raj.

Former Member
0 Kudos

Hi raj,

I need XSLT because I have to set some special namespaces that I figured out only to work with XSLT.

If the BAPI call is successful, I have the EmployeID in the BAPI.response, so my outgoing message contains it, has a field for it. What I need is to get the requested one when their is an error such as No criteria matching

So from the previous post, I should do an 2:1 mapping from my incoming request and the BAPI.response. Mapping the error message from the BAPI.response and the requested PERNR from the request.