SAP Function Modules

J_7L_UFH_KOMPONENTENMENGE SAP Function module







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

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


Pattern for FM J_7L_UFH_KOMPONENTENMENGE - J 7L UFH KOMPONENTENMENGE





CALL FUNCTION 'J_7L_UFH_KOMPONENTENMENGE' "
  EXPORTING
    entnr =                     " j_7le01-entnr  Vendor
    entna =                     " j_7le01-entna  Recycling Partner
    land1 =                     " j_7le01-land1  Country
*   bukrs =                     " j_7le02-bukrs  Company Code
*   pformel =                   " j_7le17-pformel  Price Formula
*   gruppe =                    " j_7lc46-gruppe  Group
*   kvfm_keys =                 " j_7lkvfm_keys  REA Declaration: Communication Structure Key
*   datum = SY-DATUM            " sy-datum      Validity Date
*   waerk =                     " j_7lv1k-waerk  SD Document Currency
*   waere =                     " j_7lp01-waere  Recycling Partner Currency
*   waera =                     " j_7lp01-waera  Alternative Currency for Company Code REA
*   xpost = ' '                 " bapimisc-char1
*   rbukr =                     " j_7lc02-rbukr  Company Code: Article and Recycling Partner Master
*   landr =                     " j_7lc10-landr  REA Reference Country
* TABLES
*   i_fraktionen =              " j_7lkb3
  CHANGING
    j_7lkp01_in_out =           " j_7lkp01      REA Communication Structure Price Calculation
  EXCEPTIONS
    PFORMEL_ERROR = 1           "
    .  "  J_7L_UFH_KOMPONENTENMENGE

ABAP code example for Function Module J_7L_UFH_KOMPONENTENMENGE





The ABAP code below is a full code listing to execute function module J_7L_UFH_KOMPONENTENMENGE 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_i_fraktionen  TYPE STANDARD TABLE OF J_7LKB3,"TABLES PARAM
wa_i_fraktionen  LIKE LINE OF it_i_fraktionen .

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

SELECT single ENTNR
FROM J_7LE01
INTO @DATA(ld_entnr).


SELECT single ENTNA
FROM J_7LE01
INTO @DATA(ld_entna).


SELECT single LAND1
FROM J_7LE01
INTO @DATA(ld_land1).


SELECT single BUKRS
FROM J_7LE02
INTO @DATA(ld_bukrs).


SELECT single PFORMEL
FROM J_7LE17
INTO @DATA(ld_pformel).


SELECT single GRUPPE
FROM J_7LC46
INTO @DATA(ld_gruppe).

DATA(ld_kvfm_keys) = 'Check type of data required'.
DATA(ld_datum) = '20210129'.

SELECT single WAERK
FROM J_7LV1K
INTO @DATA(ld_waerk).


SELECT single WAERE
FROM J_7LP01
INTO @DATA(ld_waere).


SELECT single WAERA
FROM J_7LP01
INTO @DATA(ld_waera).


DATA(ld_xpost) = some text here

SELECT single RBUKR
FROM J_7LC02
INTO @DATA(ld_rbukr).


SELECT single LANDR
FROM J_7LC10
INTO @DATA(ld_landr).


"populate fields of struture and append to itab
append wa_i_fraktionen to it_i_fraktionen. . CALL FUNCTION 'J_7L_UFH_KOMPONENTENMENGE' EXPORTING entnr = ld_entnr entna = ld_entna land1 = ld_land1 * bukrs = ld_bukrs * pformel = ld_pformel * gruppe = ld_gruppe * kvfm_keys = ld_kvfm_keys * datum = ld_datum * waerk = ld_waerk * waere = ld_waere * waera = ld_waera * xpost = ld_xpost * rbukr = ld_rbukr * landr = ld_landr * TABLES * i_fraktionen = it_i_fraktionen CHANGING j_7lkp01_in_out = ld_j_7lkp01_in_out EXCEPTIONS PFORMEL_ERROR = 1 . " J_7L_UFH_KOMPONENTENMENGE
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "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_j_7lkp01_in_out  TYPE J_7LKP01 ,
ld_entnr  TYPE J_7LE01-ENTNR ,
it_i_fraktionen  TYPE STANDARD TABLE OF J_7LKB3 ,
wa_i_fraktionen  LIKE LINE OF it_i_fraktionen,
ld_entna  TYPE J_7LE01-ENTNA ,
ld_land1  TYPE J_7LE01-LAND1 ,
ld_bukrs  TYPE J_7LE02-BUKRS ,
ld_pformel  TYPE J_7LE17-PFORMEL ,
ld_gruppe  TYPE J_7LC46-GRUPPE ,
ld_kvfm_keys  TYPE J_7LKVFM_KEYS ,
ld_datum  TYPE SY-DATUM ,
ld_waerk  TYPE J_7LV1K-WAERK ,
ld_waere  TYPE J_7LP01-WAERE ,
ld_waera  TYPE J_7LP01-WAERA ,
ld_xpost  TYPE BAPIMISC-CHAR1 ,
ld_rbukr  TYPE J_7LC02-RBUKR ,
ld_landr  TYPE J_7LC10-LANDR .

ld_j_7lkp01_in_out = '20210129'.

SELECT single ENTNR
FROM J_7LE01
INTO ld_entnr.


"populate fields of struture and append to itab
append wa_i_fraktionen to it_i_fraktionen.

SELECT single ENTNA
FROM J_7LE01
INTO ld_entna.


SELECT single LAND1
FROM J_7LE01
INTO ld_land1.


SELECT single BUKRS
FROM J_7LE02
INTO ld_bukrs.


SELECT single PFORMEL
FROM J_7LE17
INTO ld_pformel.


SELECT single GRUPPE
FROM J_7LC46
INTO ld_gruppe.

ld_kvfm_keys = '20210129'.
ld_datum = '20210129'.

SELECT single WAERK
FROM J_7LV1K
INTO ld_waerk.


SELECT single WAERE
FROM J_7LP01
INTO ld_waere.


SELECT single WAERA
FROM J_7LP01
INTO ld_waera.


ld_xpost = some text here

SELECT single RBUKR
FROM J_7LC02
INTO ld_rbukr.


SELECT single LANDR
FROM J_7LC10
INTO ld_landr.

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