Application Development 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: 

ADD CULOMN REMAKS IN FUNCTION MODULE ZPI_IB_PO

0 Kudos

Hai guys,

i want to add column remaks in function ZPI_IB_PO, and call function BAPI_PO_CREATE1 , but the output not show, please correct my code.

  data: POH_TEXT_HEADER type BAPIMEPOTEXTHEADER.
poh_headerx-doc_date = it_datapo-budat.
    IF ct_datapo-zreturn eq 'N'.
      poh_headerx-DOC_TYPE = 'NB'.
    ENDIF.
    IF ct_datapo-zreturn eq 'Y'.
      poh_headerx-DOC_TYPE = 'ZPOR'.
    ENDIF.
    POH_TEXT_HEADER-PO_NUMBER = IT_ZPI_TR_PO_H-EBELN.
    POH_TEXT_HEADER-TEXT_LINE = IT_DATAPO-ZREMAKS.
    POH_TEXT_HEADER-PO_ITEM = IT_DATAPO-EBELP.
 call function 'BAPI_PO_CREATE1'
 exporting
 POHEADER = poh_header
 POHEADERX = poh_headerx
 POTEXTHEADER = POH_TEXT_HEADER
 importing
 EXPPURCHASEORDER = po_ebeln
 tables
 POITEM = po_item
 POSCHEDULE = po_item_schedule
 POITEMX = po_itemx
 POSCHEDULEX = po_item_schedulex
 return = po_ret.
 call function 'BAPI_TRANSACTION_COMMIT'
 exporting
 wait = 'X'.
3 REPLIES 3

FredericGirod
Active Contributor

Did you set ? (I think this is your REMARK)

poh_headerx-text_line = abap_true.

0 Kudos

TEXT-LINE IN POH_TEXT_HEADER

So do not forget to populated the poh_headerx as this

poh_headerx-text_line = abap_true.