SAP Function Modules

RV_XVBUP_MAINTAIN_LFGSA SAP Function module







RV_XVBUP_MAINTAIN_LFGSA 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_XVBUP_MAINTAIN_LFGSA 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_XVBUP_MAINTAIN_LFGSA - RV XVBUP MAINTAIN LFGSA





CALL FUNCTION 'RV_XVBUP_MAINTAIN_LFGSA' "
  EXPORTING
    f_posnr =                   " vbap-posnr    Item number
    f_vbeln =                   " vbak-vbeln    Document number
    f_xvbap_sortiert =          "               X = items table is sorted (XVBAP)
*   f_kwmeng_diff =             " vbap-kwmeng
  TABLES
    fxvbap =                    " vbapvb        Corresponds to XVBAP.
    fxvbapf =                   " vbapf         Corresponds to XVBAPF
    fxvbup =                    " vbupvb        Corresponds to XVBUP
    fyvbup =                    " vbupvb        Corresponds to YVBUP
    .  "  RV_XVBUP_MAINTAIN_LFGSA

ABAP code example for Function Module RV_XVBUP_MAINTAIN_LFGSA





The ABAP code below is a full code listing to execute function module RV_XVBUP_MAINTAIN_LFGSA 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_fxvbap  TYPE STANDARD TABLE OF VBAPVB,"TABLES PARAM
wa_fxvbap  LIKE LINE OF it_fxvbap ,
it_fxvbapf  TYPE STANDARD TABLE OF VBAPF,"TABLES PARAM
wa_fxvbapf  LIKE LINE OF it_fxvbapf ,
it_fxvbup  TYPE STANDARD TABLE OF VBUPVB,"TABLES PARAM
wa_fxvbup  LIKE LINE OF it_fxvbup ,
it_fyvbup  TYPE STANDARD TABLE OF VBUPVB,"TABLES PARAM
wa_fyvbup  LIKE LINE OF it_fyvbup .


SELECT single POSNR
FROM VBAP
INTO @DATA(ld_f_posnr).


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

DATA(ld_f_xvbap_sortiert) = 'some text here'.

SELECT single KWMENG
FROM VBAP
INTO @DATA(ld_f_kwmeng_diff).


"populate fields of struture and append to itab
append wa_fxvbap to it_fxvbap.

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

"populate fields of struture and append to itab
append wa_fxvbup to it_fxvbup.

"populate fields of struture and append to itab
append wa_fyvbup to it_fyvbup. . CALL FUNCTION 'RV_XVBUP_MAINTAIN_LFGSA' EXPORTING f_posnr = ld_f_posnr f_vbeln = ld_f_vbeln f_xvbap_sortiert = ld_f_xvbap_sortiert * f_kwmeng_diff = ld_f_kwmeng_diff TABLES fxvbap = it_fxvbap fxvbapf = it_fxvbapf fxvbup = it_fxvbup fyvbup = it_fyvbup . " RV_XVBUP_MAINTAIN_LFGSA
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_f_posnr  TYPE VBAP-POSNR ,
it_fxvbap  TYPE STANDARD TABLE OF VBAPVB ,
wa_fxvbap  LIKE LINE OF it_fxvbap,
ld_f_vbeln  TYPE VBAK-VBELN ,
it_fxvbapf  TYPE STANDARD TABLE OF VBAPF ,
wa_fxvbapf  LIKE LINE OF it_fxvbapf,
ld_f_xvbap_sortiert  TYPE STRING ,
it_fxvbup  TYPE STANDARD TABLE OF VBUPVB ,
wa_fxvbup  LIKE LINE OF it_fxvbup,
ld_f_kwmeng_diff  TYPE VBAP-KWMENG ,
it_fyvbup  TYPE STANDARD TABLE OF VBUPVB ,
wa_fyvbup  LIKE LINE OF it_fyvbup.


SELECT single POSNR
FROM VBAP
INTO ld_f_posnr.


"populate fields of struture and append to itab
append wa_fxvbap to it_fxvbap.

SELECT single VBELN
FROM VBAK
INTO ld_f_vbeln.


"populate fields of struture and append to itab
append wa_fxvbapf to it_fxvbapf.
ld_f_xvbap_sortiert = 'some text here'.

"populate fields of struture and append to itab
append wa_fxvbup to it_fxvbup.

SELECT single KWMENG
FROM VBAP
INTO ld_f_kwmeng_diff.


"populate fields of struture and append to itab
append wa_fyvbup to it_fyvbup.

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