2013 Nov 13 1:36 PM
In Custom FM, I'm posting the invoice using "BAPI_INCOMINGINVOICE_CREATE". The Import, Export and Tables of custom FM are similiar to BAPI_INCOMINGINVOICE_CREATE. But now the requirement is to hold the invoice using MRM_INVOICE_PARK which is totally different structure.
In BAPI_INCOMINGINVOICE_CREATE, I'm able to find Headerdata, Itemdata, accountingdata, GLdata, Materialdata and Taxdata.
Where can these data in MRM_INVOICE_PARK'
call function 'BAPI_INCOMINGINVOICE_CREATE'
exporting
headerdata = l_header
importing
invoicedocnumber = invoicedocnumber
fiscalyear = fiscalyear
tables
itemdata = t_item
accountingdata = t_accounting
glaccountdata = t_glaccount
materialdata = t_material
return = t_bapiret.
Instead I wanna use
CALL FUNCTION 'MRM_INVOICE_PARK'
EXPORTING
I_RBKPV = lws_rbkpv
I_XUPDA = 'I'
I_RBSTAT_NEW = 'D'
TI_DRSEG = lint_drseg
TI_SELBEST = lint_selbest
IMPORTING
E_BELNR = lw_belnr
E_GJAHR = lw_gjhar
TABLES
Headerdata can be mapped to I_RBKPV in MRM
Itemdata, accountingdata, GLdata, Materialdata and Taxdata are there in Table TE_ACCIT
How can i map the fields from BAPI_INCOMINGINVOICE_CREATE to MRM_INVOICE_PARK?
2013 Nov 14 8:08 AM
Hi,
To park the document you can use the FM BAPI_INCOMINGINVOICE_PARK , this function module is the same structure of BAPI_INCOMINGINVOICE_CREATE.
Note that inside BAPI_INCOMINGINVOICE_PARK, the function module MRM_INVOICE_PARK is called.
Check inside the FM BAPI_INCOMINGINVOICE_PARK:
Include: LMRM_BAPIF29
Line No: 428 the FM MRM_INVOICE_PARK
Thanks,
Kiran.
2013 Nov 14 8:08 AM
Hi,
To park the document you can use the FM BAPI_INCOMINGINVOICE_PARK , this function module is the same structure of BAPI_INCOMINGINVOICE_CREATE.
Note that inside BAPI_INCOMINGINVOICE_PARK, the function module MRM_INVOICE_PARK is called.
Check inside the FM BAPI_INCOMINGINVOICE_PARK:
Include: LMRM_BAPIF29
Line No: 428 the FM MRM_INVOICE_PARK
Thanks,
Kiran.
2013 Nov 15 1:13 PM
Thanks for the information kiran.
I used BAPI_INCOMINGINVOICE_PARK as you said but after the invoice document number generated, I'm able to find the status of invoice in RBKP table as 'A' (Parked)
But my requirement is to Hold the invoice i.e. D (Entered and Held)
Any information regarding this one? Do we have some flag to be set before calling this BAPI?
2013 Nov 15 1:22 PM
2013 Nov 16 10:44 AM
Hi,
You can use the function module BAPI_INCOMINGINVOICE_CREATE1 .
The above function module is the same structre of BAPI_INCOMINGINVOICE_PARK.
DONT FORGET TO PASS THE
INVOICESTATUS = 'D'.
2013 Nov 18 6:47 AM
Hi Kiran,
I couldn't find the BAPI_INCOMINGINVOICE_CREATE1 in SAP ECC 6.0 version.
2013 Nov 18 7:06 AM
Hi Karthikeyan,
This FM is only available in 6.05, I think you are using 6.0.
In this case you have the only option to use FM MRM_INVOICE_PARK. I did not find any of the BAPI now!
Let me check the structures mapping from BAPI to MRM*
Thanks,
Kiran
2013 Nov 19 4:59 AM
Hi,
Is it possible to share your code! So will check for mapping!
2013 Nov 19 9:37 AM
2013 Nov 19 9:56 AM
Hi,
You can view the contact details in my profile.
What is mean by non-PO?
2013 Nov 19 12:22 PM
2013 Nov 20 5:41 AM
2013 Nov 25 11:08 AM
* call function 'BAPI_INCOMINGINVOICE_CREATE'
* exporting
* headerdata = l_header
* importing
* invoicedocnumber = invoicedocnumber
* fiscalyear = fiscalyear
* tables
* itemdata = t_item
* accountingdata = t_accounting
* glaccountdata = t_glaccount
* materialdata = t_material
* return = t_bapiret.
*** Header Data
lws_rbkpv-blart = l_header-doc_type.
lws_rbkpv-bldat = l_header-doc_date.
lws_rbkpv-budat = l_header-pstng_date.
lws_rbkpv-xblnr = l_header-ref_doc_no.
lws_rbkpv-waers = l_header-currency.
lws_rbkpv-rmwwr = l_header-gross_amount.
lws_rbkpv-bktxt = l_header-header_txt.
lws_rbkpv-ername = l_header-person_ext.
lws_rbkpv-usnam = sy-uname.
lws_rbkpv-bukrs = l_header-comp_code. "'4314'.
lws_rbkpv-tcode = 'MIRO'.
lws_rbkpv-vgart = 'RD'.
lws_rbkpv-zterm = l_header-pmnttrms. "'P030'.
lws_rbkpv-lifnr = l_header-diff_inv. "'0010005264'.
lws_rbkpv-gjahr = '2013'.
lws_rbkpv-xrech = l_header-invoice_ind. "'X'.
lws_rbkpv-zfbdt = l_header-bline_date. " Baseline Date for Due Date Calculation
lws_rbkpv-zlspr = l_header-pmnt_block. " Payment Block Key
lws_rbkpv-ername = l_header-person_ext. " Entered by external system user
lws_rbkpv-zlsch = l_header-pymt_meth. " Payment Method
lws_rbkpv-uzawe = l_header-pmtmthsupl. " Payment Method Supplement
lws_rbkpv-sgtxt = l_header-item_text. " Item Text
CALL FUNCTION 'MRM_INVOICE_PARK'
EXPORTING
i_rbkpv = lws_rbkpv
i_xupda = 'I'
i_rbstat_new = 'D'
ti_drseg = lint_drseg
ti_selbest = lint_selbest
IMPORTING
e_belnr = lw_belnr
e_gjahr = lw_gjhar
EXCEPTIONS
invalid_status = 1
update_impossible = 2
user_exit = 3
OTHERS = 4.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ELSE.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
ENDIF.
I'm using MRM_INVOICE_PARK only, I have done the mapping for Header data alone
but I'm not sure about other accounting, GL, Material and Tax data
Any idea on this on this mapping Kiran?
2013 Nov 14 9:07 AM
Hi,
in order to hold the document have a look at:
program SAPMF05A
include MF05AI00_BELEG_MERKEN
Module PAI BELEG_MERKEN
CALL FUNCTION 'SAVE_TEMP_DOCUMENT'
Best regards.