Hi Harvey,
What document type should I use ?
This is part of upgrade from 4.7 to ECC6 and I'm trying to replace bdc for transaction MRHG with BAPI_INCOMINGINVOICE_CREATE1.
The BDC is populated with document type 'RE'.
This is the current code.
...
CLEAR: headerdata-INVOICE_IND. " Post Credit Memo
headerdata-doc_type = 'RE'. " doc type
headerdata-REF_DOC_NO = it13_vbrp-vbeln. " reference (inv num)
...
CALL FUNCTION 'BAPI_INCOMINGINVOICE_CREATE1'
EXPORTING
HEADERDATA = headerdata
* ADDRESSDATA =
* INVOICESTATUS = '5'
IMPORTING
INVOICEDOCNUMBER = lv_invoicedocnumber
FISCALYEAR = lv_fiscalyear
TABLES
ITEMDATA = t_itemdata
ACCOUNTINGDATA = t_accountingdata
GLACCOUNTDATA = t_glaccountdata
MATERIALDATA = t_materialdata
TAXDATA = t_taxdata
WITHTAXDATA = t_withtaxdata
VENDORITEMSPLITDATA = t_vendoritemsplitdata
RETURN = t_return
EXTENSIONIN = t_extensionin
EXTENSIONOUT = t_extensionout
TM_ITEMDATA = t_tm_itemdata.
The old BDC code:
* Screen 1. Enter invoice: initial screen
ecs_bdc_begin 'SAPMM08R' '0100'.
...
ecs_bdc_field 'BKPF-BLART' " doc type
'RE'.
CALL TRANSACTION 'MRHG'...