SAP Function Modules

RV_INVOICE_DOCUMENT_ADD SAP Function module







RV_INVOICE_DOCUMENT_ADD 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_DOCUMENT_ADD 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_DOCUMENT_ADD - RV INVOICE DOCUMENT ADD





CALL FUNCTION 'RV_INVOICE_DOCUMENT_ADD' "
  EXPORTING
    vbsk_i =                    " vbsk
*   with_posting = ' '          "
*   without_refresh = ' '       "
*   preisfindungsart = 'A'      "
*   i_no_vblog = ' '            "
*   i_no_nast = ' '             "
*   i_no_pricing = ' '          "
*   i_no_fi_doc = ' '           "
*   i_blart = SPACE             " tvfk-blart
*   is_fi_add_input =           " sdfi_s_add_input
  IMPORTING
    vbsk_e =                    " vbsk
  TABLES
    xkomfk =                    " komfk
    xkomv =                     " komv
    xthead =                    " theadvb
    xvbfs =                     " vbfs
    xvbpa =                     " vbpavb
    xvbrk =                     " vbrkvb
    xvbrp =                     " vbrpvb
    xvbss =                     " vbss
    .  "  RV_INVOICE_DOCUMENT_ADD

ABAP code example for Function Module RV_INVOICE_DOCUMENT_ADD





The ABAP code below is a full code listing to execute function module RV_INVOICE_DOCUMENT_ADD 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_vbsk_e  TYPE VBSK ,
it_xkomfk  TYPE STANDARD TABLE OF KOMFK,"TABLES PARAM
wa_xkomfk  LIKE LINE OF it_xkomfk ,
it_xkomv  TYPE STANDARD TABLE OF KOMV,"TABLES PARAM
wa_xkomv  LIKE LINE OF it_xkomv ,
it_xthead  TYPE STANDARD TABLE OF THEADVB,"TABLES PARAM
wa_xthead  LIKE LINE OF it_xthead ,
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_xvbss  TYPE STANDARD TABLE OF VBSS,"TABLES PARAM
wa_xvbss  LIKE LINE OF it_xvbss .

DATA(ld_vbsk_i) = 'Check type of data required'.
DATA(ld_with_posting) = 'some text here'.
DATA(ld_without_refresh) = 'some text here'.
DATA(ld_preisfindungsart) = 'some text here'.
DATA(ld_i_no_vblog) = 'some text here'.
DATA(ld_i_no_nast) = 'some text here'.
DATA(ld_i_no_pricing) = 'some text here'.
DATA(ld_i_no_fi_doc) = 'some text here'.

SELECT single BLART
FROM TVFK
INTO @DATA(ld_i_blart).

DATA(ld_is_fi_add_input) = 'Check type of data required'.

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

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

"populate fields of struture and append to itab
append wa_xthead to it_xthead.

"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_xvbss to it_xvbss. . CALL FUNCTION 'RV_INVOICE_DOCUMENT_ADD' EXPORTING vbsk_i = ld_vbsk_i * with_posting = ld_with_posting * without_refresh = ld_without_refresh * preisfindungsart = ld_preisfindungsart * i_no_vblog = ld_i_no_vblog * i_no_nast = ld_i_no_nast * i_no_pricing = ld_i_no_pricing * i_no_fi_doc = ld_i_no_fi_doc * i_blart = ld_i_blart * is_fi_add_input = ld_is_fi_add_input IMPORTING vbsk_e = ld_vbsk_e TABLES xkomfk = it_xkomfk xkomv = it_xkomv xthead = it_xthead xvbfs = it_xvbfs xvbpa = it_xvbpa xvbrk = it_xvbrk xvbrp = it_xvbrp xvbss = it_xvbss . " RV_INVOICE_DOCUMENT_ADD
IF SY-SUBRC EQ 0. "All OK 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_vbsk_e  TYPE VBSK ,
ld_vbsk_i  TYPE VBSK ,
it_xkomfk  TYPE STANDARD TABLE OF KOMFK ,
wa_xkomfk  LIKE LINE OF it_xkomfk,
ld_with_posting  TYPE STRING ,
it_xkomv  TYPE STANDARD TABLE OF KOMV ,
wa_xkomv  LIKE LINE OF it_xkomv,
ld_without_refresh  TYPE STRING ,
it_xthead  TYPE STANDARD TABLE OF THEADVB ,
wa_xthead  LIKE LINE OF it_xthead,
ld_preisfindungsart  TYPE STRING ,
it_xvbfs  TYPE STANDARD TABLE OF VBFS ,
wa_xvbfs  LIKE LINE OF it_xvbfs,
ld_i_no_vblog  TYPE STRING ,
it_xvbpa  TYPE STANDARD TABLE OF VBPAVB ,
wa_xvbpa  LIKE LINE OF it_xvbpa,
ld_i_no_nast  TYPE STRING ,
it_xvbrk  TYPE STANDARD TABLE OF VBRKVB ,
wa_xvbrk  LIKE LINE OF it_xvbrk,
ld_i_no_pricing  TYPE STRING ,
it_xvbrp  TYPE STANDARD TABLE OF VBRPVB ,
wa_xvbrp  LIKE LINE OF it_xvbrp,
ld_i_no_fi_doc  TYPE STRING ,
it_xvbss  TYPE STANDARD TABLE OF VBSS ,
wa_xvbss  LIKE LINE OF it_xvbss,
ld_i_blart  TYPE TVFK-BLART ,
ld_is_fi_add_input  TYPE SDFI_S_ADD_INPUT .

ld_vbsk_i = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_xkomfk to it_xkomfk.
ld_with_posting = 'some text here'.

"populate fields of struture and append to itab
append wa_xkomv to it_xkomv.
ld_without_refresh = 'some text here'.

"populate fields of struture and append to itab
append wa_xthead to it_xthead.
ld_preisfindungsart = 'some text here'.

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

"populate fields of struture and append to itab
append wa_xvbpa to it_xvbpa.
ld_i_no_nast = 'some text here'.

"populate fields of struture and append to itab
append wa_xvbrk to it_xvbrk.
ld_i_no_pricing = 'some text here'.

"populate fields of struture and append to itab
append wa_xvbrp to it_xvbrp.
ld_i_no_fi_doc = 'some text here'.

"populate fields of struture and append to itab
append wa_xvbss to it_xvbss.

SELECT single BLART
FROM TVFK
INTO ld_i_blart.

ld_is_fi_add_input = 'Check type of data required'.

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_DOCUMENT_ADD or its description.