cancel
Showing results for 
Search instead for 
Did you mean: 

calling multiple BAPI's

Former Member
0 Kudos

Hi,

I need to call BAPI_PLANNEDORDER_CREATE and soon after, i need to call BAPI_TRANSACTION_COMMIT.

We are PI 7.0 SP 14. So there is an option to call the Commit BAPI directly from the RFC Receiver channel. This however does not work and throws the error "Parameter RETURN has type "BAPIRETURN1" which is unknown" .

Just to try, we created a Z Bapi which has both the above bapi's. This works fine without any issues.

I am using the HTTP client with Qos BE to send the message to PI.

Any help is appreciated.

Regards,

Balaji

Accepted Solutions (1)

Accepted Solutions (1)

kkram
Contributor
0 Kudos

Balaji

Please refer question 10 of note 730870. The return table from the called BAPI can only be BAPIRETURN, BAPIRET1 or BAPIRET2. Looks like the one that is returned by BAPI_PLANNEDORDER_CREATE is BAPIRETURN1 which is not expected by the RFC adapter. Only activating the commit work flag in your adapter tries to parse the return table and hence the failure.

This is strange and I would suggest raising a OSS note or check if there is a correction already.

KK

Former Member
0 Kudos

Hi Krishna,

Thanks for the reply. Yes, the return type of the BAPI_PLANNEDORDER_CREATE is BAPIRETURN1. This is in my Interface Mapping as well. But is there anything i can add in the rfc receiver adapter in the Table section or anywhere, that it understands the return from the BAPI_TRANSACTION_COMMIT bapi?

We dont want to use a wrapper.

Thanks,

Balaji

kkram
Contributor
0 Kudos

Balaji

See if you can do a response mapping from BAPIRETURN1 to BAPIRETURN. The RFC adapter will have no issues in that case.

Update: Please ignore my suggestion above. I think wrapping it a Z BAPI is your option. You might try to raise a OSS message as well.

KK

Edited by: Krishnakumar Ramamoorthy on Sep 24, 2008 7:29 PM

Former Member
0 Kudos

Hi,

Here is what i ended up doing, upon raising a OSS with SAP and also from suggestions on SDN:

1) create a ZBAPI (ZBAPI_PLANNEDORDER_CREATE)

2) change its RETURN from BAPIRETURN1 to BAPIRET1. We choose BAPIRET1 because its structure is same as BAPIRETURN1.

3) import this to Repository.

4) change the Receiver Determination, Interface Mapping and Receiver Agreement.

5) check the "Commit Handling for Single BAPI Calls" in the Advanced Mode of the RFC Receiver Adapter.

This works fine.

Please note that, by this approach we are still doing the commit from PI.

Many of you might ask, when we are doing a ZBAPI why not just add the BAPI_TRANSACTION_COMMIT to it.

Well, the above is one more way to do it.

If this is a bad programming practice, or something not recommended, please let me know so that we alter this and i do not recommend this to anyone else in the future.

Also Note: the same is the solution for my other question raised -

Thanks,

Balaji

Edited by: Balaji M on Oct 9, 2008 3:21 PM

Answers (2)

Answers (2)

Former Member
0 Kudos

I agree with Krishna and Rama, your choice will be to create a ZRFC that includes the bapi call and the commit work statement, if the return structure of the standard Bapi is not supported by PI, then some ABAP lines can take care of it... like moving from one structure to another.

Regards.

G

Former Member
0 Kudos

Hi,

You would need to write a wrapper RFC in your backend that contains all your BAPI's plus the BAPI commit call and use this wrapper in your XI scenario

Refer this link

http://publib.boulder.ibm.com/infocenter/wpfhelp/v6r1m0/index.jsp?topic=/com.bowstreet.designer.doc/...

http://help.sap.com/saphelp_nw04/helpdata/en/c8/e80440a832e369e10000000a155106/frameset.htm

Regards,

Surya