Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Components with BAPI_PO_CREATE1

Former Member
0 Likes
1,072

Hi,

I'm posting PO orders using BAPI_PO_CREATE1. These orders have also components that are correctly saved using the BAPI structure POCOMPONENTS in BAPI_PO_CREATE1.

The problem is that I need to save also the storage location at component level, but this information is not provided in the component structure.

Does anyone know how to solve this problem?

Thank you very much

Paola

3 REPLIES 3
Read only

Former Member
0 Likes
696

U do find a storage location in structure BAPIMEPOITEM (item level). Isn't the component linked to this via the item number (PO_ITEM) ?

Read only

Former Member
0 Likes
696

Yes I know,

the problem is that in this case the storage location at component level is different from the storage location at ITEM level, so I cannot link my component to the storage location in POITEM.

Paola

Read only

0 Likes
696

I see from the date that you may have already figured this out. I haven't tried this, but in other BAPI instances when I need a field not provided in the tables I use the Extension for the BAPI and put code into the exit to update the proper table fields. That exit is executed before the program commits all the table updates. There is some extra work to set this all up. The comments from an FI BAPI I used go like this:

  • Comments on how to activate the BAPI exit.

  • Implementing the Business Transaction Event (BTE, also OPEN FI) RWBAPI01 with enhancement structure EXTENSION1 at BAPI_ACC_DOCUMENT_POST. It is possible to change the accounting document in this case.

  • Access: Transaction FIBF:

  • 1. Call the menu path "Settings > Products -> ...of a customer" and create a product that mirrors the function which is to be mapped in the BTE.

  • 2. Create a function module that contains the same interface, such as example module SAMPLE_INTERFACE_RWBAPI01.

  • 3. Call menu path "Settings -> Process function modules > ...of a customer" enter process = RWBAPI01, the function module created and the product.

  • 4. Finally, activate the product you have created in the first step so that the module will run.

After this in the exit code you loop the table ACCIT and use the extension information to update the ACCIT field for your table.

I can send an example.