SAP Function Modules

RV_INVOICE_PRICING_PREPARE SAP Function module







RV_INVOICE_PRICING_PREPARE is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name RV_INVOICE_PRICING_PREPARE into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: V60A
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM RV_INVOICE_PRICING_PREPARE - RV INVOICE PRICING PREPARE





CALL FUNCTION 'RV_INVOICE_PRICING_PREPARE' "
  EXPORTING
    vbrk_i =                    " vbrk          Billing header
    vbrp_i =                    " vbrp          Billing item
*   i_xvckey = ' '              "
  IMPORTING
    komk_e =                    " komk          Pricing header
    komp_e =                    " komp          Pricing item
  TABLES
    xkomfk =                    " komfk         Document status log
    xvbfs =                     " vbfs          Log detail
    xvbpa =                     " vbpavb        Partner
    xvbrk =                     " vbrkvb        Dummy billing header
    xvbrp =                     " vbrpvb        Dummy billing item
*   xkomv =                     " komv          Pricing: Communications Condition Record
  EXCEPTIONS
    NO_T001W = 1                "               See the log table
    NO_TVAP = 2                 "               See the log table
    NO_TVKO = 3                 "               See the log table
    NO_TVTA = 4                 "               See the log table
    .  "  RV_INVOICE_PRICING_PREPARE

ABAP code example for Function Module RV_INVOICE_PRICING_PREPARE





The ABAP code below is a full code listing to execute function module RV_INVOICE_PRICING_PREPARE including all data declarations. The code uses the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the original method of declaring data variables up front. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8).

DATA:
ld_komk_e  TYPE KOMK ,
ld_komp_e  TYPE KOMP ,
it_xkomfk  TYPE STANDARD TABLE OF KOMFK,"TABLES PARAM
wa_xkomfk  LIKE LINE OF it_xkomfk ,
it_xvbfs  TYPE STANDARD TABLE OF VBFS,"TABLES PARAM
wa_xvbfs  LIKE LINE OF it_xvbfs ,
it_xvbpa  TYPE STANDARD TABLE OF VBPAVB,"TABLES PARAM
wa_xvbpa  LIKE LINE OF it_xvbpa ,
it_xvbrk  TYPE STANDARD TABLE OF VBRKVB,"TABLES PARAM
wa_xvbrk  LIKE LINE OF it_xvbrk ,
it_xvbrp  TYPE STANDARD TABLE OF VBRPVB,"TABLES PARAM
wa_xvbrp  LIKE LINE OF it_xvbrp ,
it_xkomv  TYPE STANDARD TABLE OF KOMV,"TABLES PARAM
wa_xkomv  LIKE LINE OF it_xkomv .

DATA(ld_vbrk_i) = 'Check type of data required'.
DATA(ld_vbrp_i) = 'Check type of data required'.
DATA(ld_i_xvckey) = 'some text here'.

"populate fields of struture and append to itab
append wa_xkomfk to it_xkomfk.

"populate fields of struture and append to itab
append wa_xvbfs to it_xvbfs.

"populate fields of struture and append to itab
append wa_xvbpa to it_xvbpa.

"populate fields of struture and append to itab
append wa_xvbrk to it_xvbrk.

"populate fields of struture and append to itab
append wa_xvbrp to it_xvbrp.

"populate fields of struture and append to itab
append wa_xkomv to it_xkomv. . CALL FUNCTION 'RV_INVOICE_PRICING_PREPARE' EXPORTING vbrk_i = ld_vbrk_i vbrp_i = ld_vbrp_i * i_xvckey = ld_i_xvckey IMPORTING komk_e = ld_komk_e komp_e = ld_komp_e TABLES xkomfk = it_xkomfk xvbfs = it_xvbfs xvbpa = it_xvbpa xvbrk = it_xvbrk xvbrp = it_xvbrp * xkomv = it_xkomv EXCEPTIONS NO_T001W = 1 NO_TVAP = 2 NO_TVKO = 3 NO_TVTA = 4 . " RV_INVOICE_PRICING_PREPARE
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 3. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 4. "Exception "Add code for exception here ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_komk_e  TYPE KOMK ,
ld_vbrk_i  TYPE VBRK ,
it_xkomfk  TYPE STANDARD TABLE OF KOMFK ,
wa_xkomfk  LIKE LINE OF it_xkomfk,
ld_komp_e  TYPE KOMP ,
ld_vbrp_i  TYPE VBRP ,
it_xvbfs  TYPE STANDARD TABLE OF VBFS ,
wa_xvbfs  LIKE LINE OF it_xvbfs,
ld_i_xvckey  TYPE STRING ,
it_xvbpa  TYPE STANDARD TABLE OF VBPAVB ,
wa_xvbpa  LIKE LINE OF it_xvbpa,
it_xvbrk  TYPE STANDARD TABLE OF VBRKVB ,
wa_xvbrk  LIKE LINE OF it_xvbrk,
it_xvbrp  TYPE STANDARD TABLE OF VBRPVB ,
wa_xvbrp  LIKE LINE OF it_xvbrp,
it_xkomv  TYPE STANDARD TABLE OF KOMV ,
wa_xkomv  LIKE LINE OF it_xkomv.

ld_vbrk_i = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_xkomfk to it_xkomfk.
ld_vbrp_i = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_xvbfs to it_xvbfs.
ld_i_xvckey = 'some text here'.

"populate fields of struture and append to itab
append wa_xvbpa to it_xvbpa.

"populate fields of struture and append to itab
append wa_xvbrk to it_xvbrk.

"populate fields of struture and append to itab
append wa_xvbrp to it_xvbrp.

"populate fields of struture and append to itab
append wa_xkomv to it_xkomv.

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name RV_INVOICE_PRICING_PREPARE or its description.