Skip to Content
0
Jan 31, 2005 at 12:07 PM

BAPI_PO_CREATE1 and EXTENSIONIN structure

2404 Views

Hi to all ,

i have one problem with standard BAPI_PO_CREATE1 bapi function (release 4.7).

I've enabled one enjoy field in transaction ME21N called 'ZZINVERS'. The field works good (i mean that if i valorize it and i save the order - with me21n/me22n strandard transaction - , the value is also saved in EKPO-ZZINVERS field).

The problem is: if i try to valorize the field with BAPI, this doesn't work.

For this task, i use the "extensionin" table in this way (the field, is at position level - table ekpo, include structure CI_EKPODB):

DATA:
 bapi_te_mepoitem LIKE bapi_te_mepoitem. 
 
 bapi_te_mepoitem-po_item = '00010'.
 bapi_te_mepoitem-zzinvers = 'X'.

 MOVE 'BAPI_TE_MEPOITEM' TO l_extensionin-structure.
 MOVE  bapi_te_mepoitem  TO l_extensionin-valuepart1.
 APPEND l_extensionin.

CALL FUNCTION 'BAPI_PO_CREATE1'
  EXPORTING
    poheader         = l_poheader
    poheaderx        = l_poheaderx
  IMPORTING
    exppurchaseorder = e_exppurchaseorder
  TABLES
    return           = l_return
    poitem           = l_poitem
    poitemx          = l_poitemx
    poaccount        = l_poaccount
    poaccountx       = l_poaccountx
    extensionin      = l_extensionin. "<-- here the   struture to valorize the enjoy customer field.

The order is create good, but the field EKPO-ZZINVERS is not valorize to 'X'. Where i go wrong ??

I've already searched in OSS, but i didn't find any note.

Could one of u help me ??

Thx a lot in advice.

Andrea