Skip to Content
0
Former Member
Jun 19, 2009 at 02:33 PM

'BAPI_ACC_INVOICE_RECEIPT_POST'

317 Views

hwo can i generate automaticly docheader-obj_key = 'test1'. using BAPI without fill it in the code program ? ( i use this BAPI in BDC for FB60 transaction)

*************************************************************************************

docheader-obj_type = 'BKPFF'.

docheader-obj_key = 'test1'.

docheader-username = sy-uname.

docheader-comp_code = '0050'. " Company Code

docheader-fisc_year = '2006'. " Fiscal Year

CALL FUNCTION 'BAPI_ACC_INVOICE_RECEIPT_POST'

EXPORTING

DOCUMENTHEADER = GD_DOCUMENTHEADER

CUSTOMERCPD = GD_CUSTOMERCPD

IMPORTING

OBJ_TYPE = obj_type

OBJ_KEY = obj_key

OBJ_SYS = obj_sys

TABLES

ACCOUNTPAYABLE = IT_ACCOUNTPAYABLE

ACCOUNTGL = IT_ACCOUNTGL

ACCOUNTTAX = IT_ACCOUNTTAX

CURRENCYAMOUNT = IT_CURRENCYAMOUNT

PURCHASEORDER = IT_PURCHASEORDER

PURCHASEAMOUNT = IT_PURCHASEAMOUNT

RETURN = IT_RETURN

CRITERIA = IT_CRITERIA

VALUEFIELD = IT_VALUEFIELD