SAP EHPRC_RCS_RS02_CMPSUB_READ Function Module for Read real substances for campaign









EHPRC_RCS_RS02_CMPSUB_READ is a standard ehprc rcs rs02 cmpsub read SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Read real substances for campaign 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 ehprc rcs rs02 cmpsub read FM, simply by entering the name EHPRC_RCS_RS02_CMPSUB_READ into the relevant SAP transaction such as SE37 or SE38.

Function Group: EHPRC_RCS_RS02
Program Name: SAPLEHPRC_RCS_RS02
Main Program: SAPLEHPRC_RCS_RS02
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:



Function EHPRC_RCS_RS02_CMPSUB_READ 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 'EHPRC_RCS_RS02_CMPSUB_READ'"Read real substances for campaign
EXPORTING
* IV_REGLIST = "Regularized or customer list
* IV_FLG_NUMBER_CONVERSION = ESP1_TRUE "Flag for number conversion
IS_SCOPE = "Scope for real substance

IMPORTING
EV_FLG_ERROR = "

TABLES
IT_RECN = "Sequential Number of Data Record
* ET_RECN_MATNR = "Assignment of real substance and material
* ET_REALSUB = "Real substance data
* ET_CUSTOMER_USEINFO = "Customer use information
* ET_RETURN = "Return parameter
.



IMPORTING Parameters details for EHPRC_RCS_RS02_CMPSUB_READ

IV_REGLIST - Regularized or customer list

Data type: EHFND_REGLIST
Optional: Yes
Call by Reference: No ( called with pass by value option)

IV_FLG_NUMBER_CONVERSION - Flag for number conversion

Data type: BAPISTDTYP-BOOLEAN
Default: ESP1_TRUE
Optional: Yes
Call by Reference: No ( called with pass by value option)

IS_SCOPE - Scope for real substance

Data type: EHPRCS_RS_SCOPE_OBJSUB
Optional: No
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for EHPRC_RCS_RS02_CMPSUB_READ

EV_FLG_ERROR -

Data type: BAPISTDTYP-BOOLEAN
Optional: No
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for EHPRC_RCS_RS02_CMPSUB_READ

IT_RECN - Sequential Number of Data Record

Data type: EHPRCS_RECN
Optional: No
Call by Reference: No ( called with pass by value option)

ET_RECN_MATNR - Assignment of real substance and material

Data type: EHPRCS_RS_MA_MATNR
Optional: Yes
Call by Reference: No ( called with pass by value option)

ET_REALSUB - Real substance data

Data type: EHPRCS_RS_REALSUB
Optional: Yes
Call by Reference: No ( called with pass by value option)

ET_CUSTOMER_USEINFO - Customer use information

Data type: EHPRCS_LOG_CUST_USEINFO
Optional: Yes
Call by Reference: No ( called with pass by value option)

ET_RETURN - Return parameter

Data type: BAPIRET2
Optional: Yes
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for EHPRC_RCS_RS02_CMPSUB_READ 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:
lt_it_recn  TYPE STANDARD TABLE OF EHPRCS_RECN, "   
lv_iv_reglist  TYPE EHFND_REGLIST, "   
lv_ev_flg_error  TYPE BAPISTDTYP-BOOLEAN, "   
lt_et_recn_matnr  TYPE STANDARD TABLE OF EHPRCS_RS_MA_MATNR, "   
lv_iv_flg_number_conversion  TYPE BAPISTDTYP-BOOLEAN, "   ESP1_TRUE
lv_is_scope  TYPE EHPRCS_RS_SCOPE_OBJSUB, "   
lt_et_realsub  TYPE STANDARD TABLE OF EHPRCS_RS_REALSUB, "   
lt_et_customer_useinfo  TYPE STANDARD TABLE OF EHPRCS_LOG_CUST_USEINFO, "   
lt_et_return  TYPE STANDARD TABLE OF BAPIRET2. "   

  CALL FUNCTION 'EHPRC_RCS_RS02_CMPSUB_READ'  "Read real substances for campaign
    EXPORTING
         IV_REGLIST = lv_iv_reglist
         IV_FLG_NUMBER_CONVERSION = lv_iv_flg_number_conversion
         IS_SCOPE = lv_is_scope
    IMPORTING
         EV_FLG_ERROR = lv_ev_flg_error
    TABLES
         IT_RECN = lt_it_recn
         ET_RECN_MATNR = lt_et_recn_matnr
         ET_REALSUB = lt_et_realsub
         ET_CUSTOMER_USEINFO = lt_et_customer_useinfo
         ET_RETURN = lt_et_return
. " EHPRC_RCS_RS02_CMPSUB_READ




ABAP code using 7.40 inline data declarations to call FM EHPRC_RCS_RS02_CMPSUB_READ

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 BOOLEAN FROM BAPISTDTYP INTO @DATA(ld_ev_flg_error).
 
 
"SELECT single BOOLEAN FROM BAPISTDTYP INTO @DATA(ld_iv_flg_number_conversion).
DATA(ld_iv_flg_number_conversion) = ESP1_TRUE.
 
 
 
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!