Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Read Billing data in Output type processing

Former Member
0 Kudos

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

13 REPLIES 13

Former Member
0 Kudos

??

0 Kudos

Hi

FM  RV_BILLING_PRINT_VIEW returns the current data of the bill

Former Member
0 Kudos

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.

Jelena
Active Contributor
0 Kudos

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.

Former Member
0 Kudos

Hi

RV_BILLING_PRINT_VIEW is not released? In which release?

Jelena
Active Contributor
0 Kudos

In EHP6 (7.31):

0 Kudos

From SAP ERP ENHANCE PACKAGE 6.04/NW7.01 to 6.06/NW7.31 too.

Regards,

Raymond

Former Member
0 Kudos

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

Former Member
0 Kudos

Hello Maninder,

You can use FM - LB_BIL_INV_OUTP_READ_PRTDATA  to get the details.

0 Kudos

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...

former_member202957
Contributor
0 Kudos

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?

Afroze_Ali
Newcomer
0 Kudos

I am not sure if you got the answer already, but try using (SAPMV60A)XVBRK or (SAPMV60A)XVBRP.

DominikTylczyn
Active Contributor
0 Kudos

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