Skip to Content

BAPI_PO_CREATE to BAPI_PO_CREATE1; how to?

Hello gurus,

I'm working on an old custom interface FM (on a backend system) which substancially acts as a "wrapper" for the BAPI_PO_CREATE.

In details, the code processes an input, does some check on some conditions, then launch the BAPI_PO_CREATE fm in order to create a Purchase order. This is used to interface a third party system with SAP backends.

Now, the aim is to substitute the call to the BAPI_PO_CREATE (obsolete) with BAPI_PO_CREATE1. As far as I've seen, the latter allows to manage more data and also structures and types used are different from the older one.

So I wonder and ask if there's a sort of howto or standard FM to manage data conversion in order to successfully swap the call from BAPI_PO_CREATE with a newer call of BAPI_PO_CREATE1.

I searched a bit on the forum and web but didn't find anything related to this task 😔

Thanks in advance for your help.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Jun 08, 2010 at 08:40 AM

    Hi,

    Have a look at note 1054029. It contains FM EHSWA_112_PO_BAPI_CONVERT which does what you need. It converts from old structures to new structures. Even if you don't look at that FM it shouldn't be that hard. BAPI_PO_CREATE1 provides additional functionality but I guess that it covers all functionality from BAPI_PO_CREATE. So you just need to figure out mapping from old structures to new structures. Unfortunately, they changed field names but field types should be same.

    Cheers

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 08, 2010 at 08:56 AM

    You can use transaction BDBS to generate a mapping module between two structures.

    (ref: [Converting Between Int. and Ext. Data Formats and Structures|http://help.sap.com/erp2005_ehp_03/helpdata/EN/a5/3ec9594ac011d1894e0000e829fbbd/frameset.htm] in [BAPI Programming Guide Reference (CA-BFA)|http://help.sap.com/erp2005_ehp_03/helpdata/EN/a5/3ec8074ac011d1894e0000e829fbbd/frameset.htm])

    Regards,

    Raymond

    Add comment
    10|10000 characters needed characters exceeded