cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping

Former Member
0 Kudos

I am trying to map BAPI RETURN to output structure.. I have no problems when BAPI returns an error message..

If successfully processed, RETURN table is empty.. but I still need to update my output structure...

How do I handle this?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi SSG,

You can create a wrapper function (where u call ur BAPI)over this which can return a value as you will need at least something to be returned for the Interface to work.

Regards

Vijaya

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi,

Check exists in node functions and I think that will solve your problem.

Thanks,

Prateek

Former Member
0 Kudos

Hi,

Could you tell us how you solved this?

Did you use a wraper?

Regards,

Smitha.

Former Member
0 Kudos

My RETURN structure was always sent as 'Output'. The problem was 'item' was not getting sent, when the BAPI was successful. I noticed that BAPI always returns only one error..

so I mapped my 'RETURN' node to my output structure (instead of item node) thereby limiting my output table to one row (positive/negative)..

Smitha, Is there a node function that checks for existence of node? If there is, we can probably implement your solution.. otherwise I think wrapper may be the only way.. I will keep the thread open for now..

Former Member
0 Kudos

Hi SSG,

Node function 'exists' gives you this functionality.

Regards

Vijaya

moorthy
Active Contributor
0 Kudos

HI,

You can use node "exists" function for this. Write If logic , if node exists map it otherwise map with constant to the node.so that you will get the output structure any point.

Regards,

Moorthy

Former Member
0 Kudos

Hi,

there is a node function "exists". I guess it can be done.

Regards,

Smitha

Former Member
0 Kudos

Hi guys,

Instead of a wrapper can't we solve this with a simple graphical mapping?

Check if the header corresponding to the return table is present, and if so, there was an error.

If there is no header, then we consider it to be successful, and the tags in the output structure can be mapped to constants. Right?

Regards,

Smitha.

Former Member
0 Kudos

Hi,

Create RFC wrapper function to your BAPI, before returning the value check the table and if it is empty fill up the success value.

In most of the cases BAPI returns the success value, which BAPI you are using. Just for info -:)

Thanks,

Prateek

moorthy
Active Contributor
0 Kudos

Hi,

Make sure that you are exporting some values to BAPI so that it will come to XI and update your output strcture.

Regards,

Moorthy