11-01-2007 3:29 PM
hi,
How to extend bapi_po_change useing extensionin and extensionout.
11-01-2007 4:51 PM
Take a look at the documentation for the BAPI it gives good information:
The following user exits (function modules) are available for the BAPI BAPI BAPI_PO_CHANGE:
EXIT_SAPL2012_002 (at start of BAPI)
EXIT_SAPL2012_004 (at end of BAPI)
These exits belong to the enhancement SAPL2012 (see also transaction codes SMOD and CMOD).
There is also the option of populating customer-specific fields for header, item, or account assignment data via the parameter EXTENSIONIN.
11-01-2007 5:20 PM
when i execute the program, the debugger is not stooping at the above mentioned exit.
the below is the code.
data: lt_poaccount like bapimepoaccount occurs 0 with header line,
lt_poaccountx like bapimepoaccountx occurs 0 with header line,
return type bapiret2 occurs 0 with header line,
poitem like bapimepoitem occurs 0 with header line,
poitemx like bapimepoitem occurs 0 with header line,
extin like bapiparex occurs 0 with header line,
extou like bapiparex occurs 0 with header line.
poitem-po_item = '0010'.
poitemx-po_item = '0010'.
poitem-vendrbatch = 12322.
poitemx-vendrbatch = 'X'.
poitem-ematerial = 'TEST'.
poitemx-ematerial = 'X'.
poitem-grant_nbr = 'GRANT_NBR'.
poitemx-grant_nbr = 'X'.
poitem-no_more_gr = 'NO_MORE'.
poitemx-no_more_gr = 'X'.
append poitem.
append poitemx.
extin-structure = 'BAPI_TE_MEPOITEM'.
extin-valuepart1 = 'EAN_UPC'.
append extin.
lt_poaccount-po_item = '0010'.
lt_poaccountx-po_item = '0010'.
lt_poaccount-serial_no = '0001'.
lt_poaccountx-serial_no = '0001'.
lt_poaccount-gr_rcpt = '176'.
lt_poaccountx-gr_rcpt = 'X'.
append lt_poaccount.
append lt_poaccountx.
data: po_num type ebeln.
po_num = 7600000285.
call function 'BAPI_PO_CHANGE'
exporting
purchaseorder = po_num
tables
return = return
poitem = poitem
poitemx = poitemx
poaccount = lt_poaccount
poaccountx = lt_poaccountx
extensionin = extin
extensionout = extou
.
if sy-subrc eq 0.
call function 'BAPI_TRANSACTION_COMMIT'.
endif.
**
write 😕 'a'.
11-01-2007 5:28 PM
I believe the exists are for enjoy purchase orders. Have you created a project in CMOD for the exit and activated it????