SAP Function Modules

J_7L_VBRP_FILTER SAP Function module







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

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


Pattern for FM J_7L_VBRP_FILTER - J 7L VBRP FILTER





CALL FUNCTION 'J_7L_VBRP_FILTER' "
  EXPORTING
    matnr =                     " mara-matnr    Material Number
*   mtart =                     " mara-mtart    Material Type
    vbrk =                      " vbrk          Billing header
    vbrp =                      " vbrp          Billing Item
    spart =                     " vbrp-spart    Division
*   j_7lc08 =                   " j_7lc08
  IMPORTING
    filter_ok =                 " bapimisc-char1
    filter_dftyp =              " j_7lc45-dftyp  Data Filter Type
    filter_typ =                " c
    filter_value =              " c
    filter_mode =               " j_7lc08-kzfkart  Set operation
* TABLES
*   t_j_7lc04 =                 " j_7lc04
*   t_j_7lc05 =                 " j_7lc05
*   t_j_7lc06 =                 " j_7lc06
*   t_j_7lc07 =                 " j_7lc07
*   t_j_7lc28 =                 " j_7lc28
  EXCEPTIONS
    NOT_IN_RANGE = 1            "               Obsolete
    PARAMETER_MISSING = 2       "               Wrong Input Parameter
    MATERIAL_NOT_EXISTENT = 3   "               Material does not exist
    .  "  J_7L_VBRP_FILTER

ABAP code example for Function Module J_7L_VBRP_FILTER





The ABAP code below is a full code listing to execute function module J_7L_VBRP_FILTER 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_filter_ok  TYPE BAPIMISC-CHAR1 ,
ld_filter_dftyp  TYPE J_7LC45-DFTYP ,
ld_filter_typ  TYPE C ,
ld_filter_value  TYPE C ,
ld_filter_mode  TYPE J_7LC08-KZFKART ,
it_t_j_7lc04  TYPE STANDARD TABLE OF J_7LC04,"TABLES PARAM
wa_t_j_7lc04  LIKE LINE OF it_t_j_7lc04 ,
it_t_j_7lc05  TYPE STANDARD TABLE OF J_7LC05,"TABLES PARAM
wa_t_j_7lc05  LIKE LINE OF it_t_j_7lc05 ,
it_t_j_7lc06  TYPE STANDARD TABLE OF J_7LC06,"TABLES PARAM
wa_t_j_7lc06  LIKE LINE OF it_t_j_7lc06 ,
it_t_j_7lc07  TYPE STANDARD TABLE OF J_7LC07,"TABLES PARAM
wa_t_j_7lc07  LIKE LINE OF it_t_j_7lc07 ,
it_t_j_7lc28  TYPE STANDARD TABLE OF J_7LC28,"TABLES PARAM
wa_t_j_7lc28  LIKE LINE OF it_t_j_7lc28 .


SELECT single MATNR
FROM MARA
INTO @DATA(ld_matnr).


SELECT single MTART
FROM MARA
INTO @DATA(ld_mtart).

DATA(ld_vbrk) = 'Check type of data required'.
DATA(ld_vbrp) = 'Check type of data required'.

SELECT single SPART
FROM VBRP
INTO @DATA(ld_spart).

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

"populate fields of struture and append to itab
append wa_t_j_7lc04 to it_t_j_7lc04.

"populate fields of struture and append to itab
append wa_t_j_7lc05 to it_t_j_7lc05.

"populate fields of struture and append to itab
append wa_t_j_7lc06 to it_t_j_7lc06.

"populate fields of struture and append to itab
append wa_t_j_7lc07 to it_t_j_7lc07.

"populate fields of struture and append to itab
append wa_t_j_7lc28 to it_t_j_7lc28. . CALL FUNCTION 'J_7L_VBRP_FILTER' EXPORTING matnr = ld_matnr * mtart = ld_mtart vbrk = ld_vbrk vbrp = ld_vbrp spart = ld_spart * j_7lc08 = ld_j_7lc08 IMPORTING filter_ok = ld_filter_ok filter_dftyp = ld_filter_dftyp filter_typ = ld_filter_typ filter_value = ld_filter_value filter_mode = ld_filter_mode * TABLES * t_j_7lc04 = it_t_j_7lc04 * t_j_7lc05 = it_t_j_7lc05 * t_j_7lc06 = it_t_j_7lc06 * t_j_7lc07 = it_t_j_7lc07 * t_j_7lc28 = it_t_j_7lc28 EXCEPTIONS NOT_IN_RANGE = 1 PARAMETER_MISSING = 2 MATERIAL_NOT_EXISTENT = 3 . " J_7L_VBRP_FILTER
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 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_filter_ok  TYPE BAPIMISC-CHAR1 ,
ld_matnr  TYPE MARA-MATNR ,
it_t_j_7lc04  TYPE STANDARD TABLE OF J_7LC04 ,
wa_t_j_7lc04  LIKE LINE OF it_t_j_7lc04,
ld_filter_dftyp  TYPE J_7LC45-DFTYP ,
ld_mtart  TYPE MARA-MTART ,
it_t_j_7lc05  TYPE STANDARD TABLE OF J_7LC05 ,
wa_t_j_7lc05  LIKE LINE OF it_t_j_7lc05,
ld_filter_typ  TYPE C ,
ld_vbrk  TYPE VBRK ,
it_t_j_7lc06  TYPE STANDARD TABLE OF J_7LC06 ,
wa_t_j_7lc06  LIKE LINE OF it_t_j_7lc06,
ld_filter_value  TYPE C ,
ld_vbrp  TYPE VBRP ,
it_t_j_7lc07  TYPE STANDARD TABLE OF J_7LC07 ,
wa_t_j_7lc07  LIKE LINE OF it_t_j_7lc07,
ld_filter_mode  TYPE J_7LC08-KZFKART ,
ld_spart  TYPE VBRP-SPART ,
it_t_j_7lc28  TYPE STANDARD TABLE OF J_7LC28 ,
wa_t_j_7lc28  LIKE LINE OF it_t_j_7lc28,
ld_j_7lc08  TYPE J_7LC08 .


SELECT single MATNR
FROM MARA
INTO ld_matnr.


"populate fields of struture and append to itab
append wa_t_j_7lc04 to it_t_j_7lc04.

SELECT single MTART
FROM MARA
INTO ld_mtart.


"populate fields of struture and append to itab
append wa_t_j_7lc05 to it_t_j_7lc05.
ld_vbrk = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_j_7lc06 to it_t_j_7lc06.
ld_vbrp = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_j_7lc07 to it_t_j_7lc07.

SELECT single SPART
FROM VBRP
INTO ld_spart.


"populate fields of struture and append to itab
append wa_t_j_7lc28 to it_t_j_7lc28.
ld_j_7lc08 = '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 J_7L_VBRP_FILTER or its description.