05-31-2007 8:03 PM
Hello everybody,
I need to create Credit / Debit memo invoices and for this I try to use FM GN_INVOICE_CREATE in my Z program, please let me know if it is correct way to go?
As well I need to create list of Credit / Debit memo invoices, how to achieve this?
Thanks in advance.
Usefull answers will be awarded.
Regards, M.
05-31-2007 8:20 PM
You can use RV_INVOICE_CREATE for credit memo and debit memo
list of credit and debit memo - use this FM - RV_INVOICE_LIST_CREATE
see the below sample code
refresh: XKOMFK, XKOMV,
XTHEAD, XVBFS,
XVBPA, XVBRK,
XVBRP, XVBSS.
clear : XKOMFK, XKOMV,
XTHEAD, XVBFS,
XVBPA, XVBRK,
XVBRP, XVBSS,
VBSK_I.
VBSK_I-SMART = 'F'.
XKOMFK-VBELN = v_deliv.
XKOMFK-VBTYP = 'J'.
APPEND XKOMFK.
CALL FUNCTION 'RV_INVOICE_CREATE'
EXPORTING
VBSK_I = VBSK_I
WITH_POSTING = 'C'
TABLES
XKOMFK = XKOMFK
XKOMV = XKOMV
XTHEAD = XTHEAD
XVBFS = XVBFS
XVBPA = XVBPA
XVBRK = XVBRK
XVBRP = XVBRP
XVBSS = XVBSS.
if sy-subrc eq 0.
COMMIT WORK.
flag = 'X'.
else.
message i011 with p_vbeln.
endif.
Reward Points if it is helpful
Thanks
Seshu
05-31-2007 8:20 PM
You can use RV_INVOICE_CREATE for credit memo and debit memo
list of credit and debit memo - use this FM - RV_INVOICE_LIST_CREATE
see the below sample code
refresh: XKOMFK, XKOMV,
XTHEAD, XVBFS,
XVBPA, XVBRK,
XVBRP, XVBSS.
clear : XKOMFK, XKOMV,
XTHEAD, XVBFS,
XVBPA, XVBRK,
XVBRP, XVBSS,
VBSK_I.
VBSK_I-SMART = 'F'.
XKOMFK-VBELN = v_deliv.
XKOMFK-VBTYP = 'J'.
APPEND XKOMFK.
CALL FUNCTION 'RV_INVOICE_CREATE'
EXPORTING
VBSK_I = VBSK_I
WITH_POSTING = 'C'
TABLES
XKOMFK = XKOMFK
XKOMV = XKOMV
XTHEAD = XTHEAD
XVBFS = XVBFS
XVBPA = XVBPA
XVBRK = XVBRK
XVBRP = XVBRP
XVBSS = XVBSS.
if sy-subrc eq 0.
COMMIT WORK.
flag = 'X'.
else.
message i011 with p_vbeln.
endif.
Reward Points if it is helpful
Thanks
Seshu
05-31-2007 8:48 PM
Seshu,
thanks for your input, it is very helpfull.
The thing is that I am new to ABAP so not sure about the parametres of RV_INVOICE_CREATE and RV_INVOICE_LIST_CREATE...
My Z program has to create a Credit / Debit memo with total values, so I need to know what does the parametres of RV_INVOICE_CREATE mean in order to pass needed values to FM.
The same with list of invoices - do not know too much about the parametres and could not find info on the internet...
It is urgent for me...
Help would be very appreciated.
Kind regards, M.
05-31-2007 8:58 PM