2016 Jul 18 7:31 AM
Hello,
I have a requirement where I need to read Billing Document data during Output type processing in VF01. I get Billing doc. no. as NAST-OBJKY.
I tried to use FM RV_INVOICE_DOCUMENT_READ and also class CL_WCB_BILL_BUFFER_FOR_PPF, but no results.
The Output type is "Special Function" assigned to custom Program/ Routine. In debug, I see only Billing document number, but I require more data like Sales area and Customer number to post Credit Memo Request (VBRK/ VBRP/ VBPA).
Please Help.
Kr,
Maninder
2016 Jul 18 9:35 AM
2016 Jul 18 9:48 AM
Hi
FM RV_BILLING_PRINT_VIEW returns the current data of the bill
2016 Jul 18 9:43 AM
Use the billing doc number and get corresponding doc via VBFA. Then from vbfa, get the details from each main table for so/delivery/invoice/etc.
2016 Jul 19 11:10 PM
If you are using "Special Function" it means you need to write your own code. Since the changes are already committed to the database at that time, you can use SELECT, just like in any other program. What exactly is the issue here?
FYI - RV_BILLING_PRINT_VIEW is not released.
2016 Jul 20 10:57 AM
2016 Jul 20 3:20 PM
2016 Jul 20 3:33 PM
From SAP ERP ENHANCE PACKAGE 6.04/NW7.01 to 6.06/NW7.31 too.
Regards,
Raymond
2016 Jul 20 4:05 PM
Thanks very much
I have ever noticed that: that fm has status NOT RELEASED in my system too.
I suppose SAP doesn't support the fm RV_BILLING_PRINT_VIEW anymore because the print of the bill is managed by smartform now, so it should mean to use the print program RLB_INVOICE and fmLB_BIL_INV_OUTP_READ_PRTDATA
But the old print program RVADIN01 still uses the fm RV_BILLING_PRINT_VIEW and it works (I've prints from 46C),
so that means theoretically that fm can't be replaced....but it works for the moment
2016 Jul 20 7:15 AM
Hello Maninder,
You can use FM - LB_BIL_INV_OUTP_READ_PRTDATA to get the details.
2016 Jul 20 3:25 PM
LB_BIL_INV_OUTP_READ_PRTDATA makes sense if you need data in the format of data type LBBIL_INVOICE that is used in the standard form interfaces. It's not exactly the most user-friendly format (you have to get all those embedded tables from it), so still I believe OP might be better off with some short custom code. If only we knew what OP is doing exactly...
2016 Jul 20 4:55 PM
Hi,
use FM - RV_INVOICE_DOCUMENT_READ , just check the Activity you are using.
try with activity = '04' or '01' and pass the billing document no to vbrk_i -vbeln and no_nast = 'X' .
Try this and check?
2024 Apr 18 12:26 PM
I am not sure if you got the answer already, but try using (SAPMV60A)XVBRK or (SAPMV60A)XVBRP.
2024 Apr 18 1:01 PM
See how it's done in SAP standard output types e.g. RD00. The output type is processed with the ENTRY routine of the SD_INVOICE_PRINT01 program. The billing document data is fetched with the RV_BILLING_PRINT_VIEW function - routine GET_DATA of the same program:
ls_comwa-mandt = sy-mandt.
ls_comwa-spras = gs_nast-spras.
ls_comwa-kunde = gs_nast-parnr.
ls_comwa-parvw = gs_nast-parvw.
if gs_nast-objky+10(6) ne space.
ls_comwa-vbeln = gs_nast-objky+16(10).
else.
ls_comwa-vbeln = gs_nast-objky.
endif.
*--- Call the famous print view
call function 'RV_BILLING_PRINT_VIEW'
exporting
comwa = ls_comwa
importing
kopf = gs_interface-head_detail-vbdkr
tables
pos = lt_vbdpr
exceptions
terms_of_payment_not_in_t052 = 1
error_message = 2
others = 3.
Best regards
Dominik Tylczynski