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

BAPI_PO_CREATE

Former Member
0 Likes
716

Hello,

I am Using BAPI_PO_CREATE to create PO from Basic IDOC type PORDCR04.

One of the Segments of this IDOC type has been extended with 'Z' segment containing two fields 'Unit of Net weight' and 'Total Net weight'. I want to pass the value of these fields in the BAPI and want to update the fields GEWEI and NTGEW in table EKPO and it should be displayed in the PO (ME23N) as well .

I tried finding some fields in BAPI_PO_CREATE (via Se37) but there is no field available for these. How this is possible (pass the value to BAPI and update in DB tables) ?

/Manik

2 REPLIES 2
Read only

Former Member
0 Likes
491

Hi Manik,

You will have to copy the standard FM (IDOC_INPUT_PORDCR) to accomplish this, as Z-segment are not read.

Regards,

John.

Read only

Former Member
0 Likes
491

Hi,

Copy the standard function module and call the BAPI:

  • call BAPI-function in this system *

CALL FUNCTION 'BAPI_PO_CREATE'

EXPORTING

PO_HEADER = PO_HEADER

PO_HEADER_ADD_DATA = PO_HEADER_ADD_DATA

HEADER_ADD_DATA_RELEVANT = HEADER_ADD_DATA_RELEVANT

PO_ADDRESS = PO_ADDRESS

SKIP_ITEMS_WITH_ERROR = SKIP_ITEMS_WITH_ERROR

ITEM_ADD_DATA_RELEVANT = ITEM_ADD_DATA_RELEVANT

IMPORTING

PURCHASEORDER = PURCHASEORDER

TABLES

PO_ITEMS = PO_ITEMS

PO_ITEM_ADD_DATA = PO_ITEM_ADD_DATA

PO_ITEM_SCHEDULES = PO_ITEM_SCHEDULES

PO_ITEM_ACCOUNT_ASSIGNMENT = PO_ITEM_ACCOUNT_ASSIGNMENT

PO_ITEM_TEXT = PO_ITEM_TEXT

RETURN = RETURN

PO_LIMITS = PO_LIMITS

PO_CONTRACT_LIMITS = PO_CONTRACT_LIMITS

PO_SERVICES = PO_SERVICES

PO_SRV_ACCASS_VALUES = PO_SRV_ACCASS_VALUES

PO_SERVICES_TEXT = PO_SERVICES_TEXT

PO_BUSINESS_PARTNER = PO_BUSINESS_PARTNER

EXTENSIONIN = EXTENSIONIN

POADDRDELIVERY = POADDRDELIVERY

EXCEPTIONS

OTHERS = 1.

regards

Aveek