SAP Function Modules

RV_YVBAPF_CREATE SAP Function module







RV_YVBAPF_CREATE 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_YVBAPF_CREATE into the relevant SAP transaction such as SE37 or SE80.

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


Pattern for FM RV_YVBAPF_CREATE - RV YVBAPF CREATE





CALL FUNCTION 'RV_YVBAPF_CREATE' "
  EXPORTING
    vbeln =                     " vbak-vbeln    Document number, for which table i
  TABLES
    fxvbapf =                   " vbapf         Corresponds to YVBAPF (ALTER situa
    fxvbfa =                    " vbfavb        Corresponds to XVBFA
    fyvbfa =                    " vbfavb        Corresponds to YVBFA
    .  "  RV_YVBAPF_CREATE

ABAP code example for Function Module RV_YVBAPF_CREATE





The ABAP code below is a full code listing to execute function module RV_YVBAPF_CREATE 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:
it_fxvbapf  TYPE STANDARD TABLE OF VBAPF,"TABLES PARAM
wa_fxvbapf  LIKE LINE OF it_fxvbapf ,
it_fxvbfa  TYPE STANDARD TABLE OF VBFAVB,"TABLES PARAM
wa_fxvbfa  LIKE LINE OF it_fxvbfa ,
it_fyvbfa  TYPE STANDARD TABLE OF VBFAVB,"TABLES PARAM
wa_fyvbfa  LIKE LINE OF it_fyvbfa .


SELECT single VBELN
FROM VBAK
INTO @DATA(ld_vbeln).


"populate fields of struture and append to itab
append wa_fxvbapf to it_fxvbapf.

"populate fields of struture and append to itab
append wa_fxvbfa to it_fxvbfa.

"populate fields of struture and append to itab
append wa_fyvbfa to it_fyvbfa. . CALL FUNCTION 'RV_YVBAPF_CREATE' EXPORTING vbeln = ld_vbeln TABLES fxvbapf = it_fxvbapf fxvbfa = it_fxvbfa fyvbfa = it_fyvbfa . " RV_YVBAPF_CREATE
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_vbeln  TYPE VBAK-VBELN ,
it_fxvbapf  TYPE STANDARD TABLE OF VBAPF ,
wa_fxvbapf  LIKE LINE OF it_fxvbapf,
it_fxvbfa  TYPE STANDARD TABLE OF VBFAVB ,
wa_fxvbfa  LIKE LINE OF it_fxvbfa,
it_fyvbfa  TYPE STANDARD TABLE OF VBFAVB ,
wa_fyvbfa  LIKE LINE OF it_fyvbfa.


SELECT single VBELN
FROM VBAK
INTO ld_vbeln.


"populate fields of struture and append to itab
append wa_fxvbapf to it_fxvbapf.

"populate fields of struture and append to itab
append wa_fxvbfa to it_fxvbfa.

"populate fields of struture and append to itab
append wa_fyvbfa to it_fyvbfa.

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