cancel
Showing results for 
Search instead for 
Did you mean: 

XI mapping question

Former Member
0 Kudos

Hello,

I have a situation that I need to run Z-BAPI function before starting mapping in XI. Let me explain scenario with more information.

1. I need to update a order in the SAP. The order may or may not exists in the SAP.

2. We have a Z-BAPI function that checks if Order exists in the SAP.

3. The mapping shall takes place upon sucessfully finding the Order in the SAP. Incase no Order found, mapping should not be done.

4. The sender sends multiple orders at same time and incase if an order was not in SAP, Mapping should not takes place and move on to next order.

Now my question is what/how exactly I need to do to avaoid mapping incase an Order has not found and move on to next order in the queue.

Please let me know.

Thank you,

Balaji

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Balaji,

Just for understanding....

You are interested in generating outputs only for Order exist in R/3 system..right?

I mean do not want to generate XI output in case order do not exist but at the same time it will generate output for remaining orders which exist in the R/3 system..right?

If so...mean you are not interested whether it runs mapping or not..

In this case using graphical mapping you can check if order exist in R/3 system( In UDF you can call your ZBAPI to check ) and base on the output of your function module you can decide whether to generate header node or not...

Let me know if you need more details.

Nilesh

Answers (2)

Answers (2)

former_member194677
Participant
0 Kudos

Hi Balaji,

Just write a RFC look up at node level and pass the flag if the order is present in SAP.

if the order is present in SAP then the node will be generated otherwise it will move on to next order.

Regards

Santosh

Former Member
0 Kudos

Hi,

You can use a BPM.

1) BPM Receive Step - say the input file has 10 orders

2) Multimapping (if the Outbound MI is not a Synchronous), for splitting the message to have 10 messages with the order number in the structure the Z_Bapi accepts. 3) Start Block to send in one message at a time

4) Synchronous Send (use Abstract - sync MI --- this will have an MT in the response)

5) start Switch with condition - check MI --> response MT field, for the availability of Order - lets say, the field is Flag as , 0 = available, 1 = not available.

5.1) the upper branch, - say indicates 0, will have a Interface Mapping that will be a Asynch send to R/3

5.2) do nothing. - means, no action is taken if the return of the BAPI is 1--- or you can choose to trigger alert.

Regard,

Balaji.M

Former Member
0 Kudos

Hi Balaji,

As you defined the scenario that, once data is existed in the table it sholud accept the to be updated messages from sender system otherwise skip the message and goto next... Now here we can adopt simplest method that move all the messages to R/3 system internal table and write a code in report program with loop ... endloop or select ... endselect

Sudheer

Former Member
0 Kudos

Hi,

use a RFC look up in a UDF to acieve this. pass all the orders from the source message which returns you the orders that exist. in this case if you find orders exist you go ahead creating a target root node otherwise throw an exception