SAP J_7L_CUST2_PFORMEL Function Module for NOTRANSL: REA Preisformel (Template)
J_7L_CUST2_PFORMEL is a standard j 7l cust2 pformel SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for NOTRANSL: REA Preisformel (Template) processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.
See here to view full function module documentation and code listing for j 7l cust2 pformel FM, simply by entering the name J_7L_CUST2_PFORMEL into the relevant SAP transaction such as SE37 or SE38.
Function Group: J7LPF
Program Name: SAPLJ7LPF
Main Program: SAPLJ7LPF
Appliation area: V
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function J_7L_CUST2_PFORMEL pattern details
In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.CALL FUNCTION 'J_7L_CUST2_PFORMEL'"NOTRANSL: REA Preisformel (Template).
EXPORTING
ENTNR = "Vendor
* WAERE = "Recycling Partner Currency
* WAERA = "Alternative Currency for Company Code REA
* XPOST = ' ' "
* RBUKR = "Company Code: Article and Recycling Partner Master
* LANDR = "REA Reference Country
ENTNA = "Recycling Partner
LAND1 = "Country
* BUKRS = "Company Code
* PFORMEL = "Price Formula
* GRUPPE = "Group
* KVFM_KEYS = "
* DATUM = SY-DATUM "Validity Date
* WAERK = "SD Document Currency
CHANGING
J_7LKP01_IN_OUT = "REA Communication Structure Price Calculation
TABLES
* I_FRAKTIONEN = "
EXCEPTIONS
PFORMEL_ERROR = 1
IMPORTING Parameters details for J_7L_CUST2_PFORMEL
ENTNR - Vendor
Data type: J_7LE01-ENTNROptional: No
Call by Reference: Yes
WAERE - Recycling Partner Currency
Data type: J_7LP01-WAEREOptional: Yes
Call by Reference: Yes
WAERA - Alternative Currency for Company Code REA
Data type: J_7LP01-WAERAOptional: Yes
Call by Reference: Yes
XPOST -
Data type: BAPIMISC-CHAR1Default: ' '
Optional: Yes
Call by Reference: Yes
RBUKR - Company Code: Article and Recycling Partner Master
Data type: J_7LC02-RBUKROptional: Yes
Call by Reference: Yes
LANDR - REA Reference Country
Data type: J_7LC10-LANDROptional: Yes
Call by Reference: Yes
ENTNA - Recycling Partner
Data type: J_7LE01-ENTNAOptional: No
Call by Reference: Yes
LAND1 - Country
Data type: J_7LE01-LAND1Optional: No
Call by Reference: Yes
BUKRS - Company Code
Data type: J_7LE02-BUKRSOptional: Yes
Call by Reference: Yes
PFORMEL - Price Formula
Data type: J_7LE17-PFORMELOptional: Yes
Call by Reference: Yes
GRUPPE - Group
Data type: J_7LC46-GRUPPEOptional: Yes
Call by Reference: Yes
KVFM_KEYS -
Data type: J_7LKVFM_KEYSOptional: Yes
Call by Reference: Yes
DATUM - Validity Date
Data type: SY-DATUMDefault: SY-DATUM
Optional: Yes
Call by Reference: Yes
WAERK - SD Document Currency
Data type: J_7LV1K-WAERKOptional: Yes
Call by Reference: Yes
CHANGING Parameters details for J_7L_CUST2_PFORMEL
J_7LKP01_IN_OUT - REA Communication Structure Price Calculation
Data type: J_7LKP01Optional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for J_7L_CUST2_PFORMEL
I_FRAKTIONEN -
Data type: J_7LKB3Optional: Yes
Call by Reference: Yes
EXCEPTIONS details
PFORMEL_ERROR -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for J_7L_CUST2_PFORMEL Function Module
The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than 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 newer method of declaring data variables on the fly. 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), which i why i have stuck to the origianl for this example.| DATA: | ||||
| lv_entnr | TYPE J_7LE01-ENTNR, " | |||
| lt_i_fraktionen | TYPE STANDARD TABLE OF J_7LKB3, " | |||
| lv_pformel_error | TYPE J_7LKB3, " | |||
| lv_j_7lkp01_in_out | TYPE J_7LKP01, " | |||
| lv_waere | TYPE J_7LP01-WAERE, " | |||
| lv_waera | TYPE J_7LP01-WAERA, " | |||
| lv_xpost | TYPE BAPIMISC-CHAR1, " ' ' | |||
| lv_rbukr | TYPE J_7LC02-RBUKR, " | |||
| lv_landr | TYPE J_7LC10-LANDR, " | |||
| lv_entna | TYPE J_7LE01-ENTNA, " | |||
| lv_land1 | TYPE J_7LE01-LAND1, " | |||
| lv_bukrs | TYPE J_7LE02-BUKRS, " | |||
| lv_pformel | TYPE J_7LE17-PFORMEL, " | |||
| lv_gruppe | TYPE J_7LC46-GRUPPE, " | |||
| lv_kvfm_keys | TYPE J_7LKVFM_KEYS, " | |||
| lv_datum | TYPE SY-DATUM, " SY-DATUM | |||
| lv_waerk | TYPE J_7LV1K-WAERK. " |
|   CALL FUNCTION 'J_7L_CUST2_PFORMEL' "NOTRANSL: REA Preisformel (Template) |
| EXPORTING | ||
| ENTNR | = lv_entnr | |
| WAERE | = lv_waere | |
| WAERA | = lv_waera | |
| XPOST | = lv_xpost | |
| RBUKR | = lv_rbukr | |
| LANDR | = lv_landr | |
| ENTNA | = lv_entna | |
| LAND1 | = lv_land1 | |
| BUKRS | = lv_bukrs | |
| PFORMEL | = lv_pformel | |
| GRUPPE | = lv_gruppe | |
| KVFM_KEYS | = lv_kvfm_keys | |
| DATUM | = lv_datum | |
| WAERK | = lv_waerk | |
| CHANGING | ||
| J_7LKP01_IN_OUT | = lv_j_7lkp01_in_out | |
| TABLES | ||
| I_FRAKTIONEN | = lt_i_fraktionen | |
| EXCEPTIONS | ||
| PFORMEL_ERROR = 1 | ||
| . " J_7L_CUST2_PFORMEL | ||
ABAP code using 7.40 inline data declarations to call FM J_7L_CUST2_PFORMEL
The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.| "SELECT single ENTNR FROM J_7LE01 INTO @DATA(ld_entnr). | ||||
| "SELECT single WAERE FROM J_7LP01 INTO @DATA(ld_waere). | ||||
| "SELECT single WAERA FROM J_7LP01 INTO @DATA(ld_waera). | ||||
| "SELECT single CHAR1 FROM BAPIMISC INTO @DATA(ld_xpost). | ||||
| DATA(ld_xpost) | = ' '. | |||
| "SELECT single RBUKR FROM J_7LC02 INTO @DATA(ld_rbukr). | ||||
| "SELECT single LANDR FROM J_7LC10 INTO @DATA(ld_landr). | ||||
| "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). | ||||
| "SELECT single DATUM FROM SY INTO @DATA(ld_datum). | ||||
| DATA(ld_datum) | = SY-DATUM. | |||
| "SELECT single WAERK FROM J_7LV1K INTO @DATA(ld_waerk). | ||||
Search for further information about these or an SAP related objects