SAP SEND_S1REJECT Function Module for Create and send S1REJECT message









SEND_S1REJECT is a standard send s1reject SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Create and send S1REJECT message 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 send s1reject FM, simply by entering the name SEND_S1REJECT into the relevant SAP transaction such as SE37 or SE38.

Function Group: ADSPC06
Program Name: SAPLADSPC06
Main Program: SAPLADSPC06
Appliation area: S
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function SEND_S1REJECT 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 'SEND_S1REJECT'"Create and send S1REJECT message
EXPORTING
MES_TYP = "Message Type
ERROR = "Error number
* PAR1 = "
* PAR2 = "
* PAR3 = "
* PAR4 = "

TABLES
FLATFILE = "Spec2000 message file
MSG = "Spec2000 message
IN_FILE = "Edited SPEC2000 file
ORIG_SPEC_FILE = "Original SPEC2000 file

EXCEPTIONS
ERROR_CREATING_S2K_IDOC = 1 S1REJECT_FOR_S1REJECT = 2
.



IMPORTING Parameters details for SEND_S1REJECT

MES_TYP - Message Type

Data type: EDIDC-MESTYP
Optional: No
Call by Reference: Yes

ERROR - Error number

Data type: SPCERROR-ERRNO
Optional: No
Call by Reference: Yes

PAR1 -

Data type: SY-MSGV1
Optional: Yes
Call by Reference: Yes

PAR2 -

Data type: SY-MSGV2
Optional: Yes
Call by Reference: Yes

PAR3 -

Data type: SY-MSGV3
Optional: Yes
Call by Reference: Yes

PAR4 -

Data type: SY-MSGV4
Optional: Yes
Call by Reference: Yes

TABLES Parameters details for SEND_S1REJECT

FLATFILE - Spec2000 message file

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

MSG - Spec2000 message

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

IN_FILE - Edited SPEC2000 file

Data type:
Optional: No
Call by Reference: Yes

ORIG_SPEC_FILE - Original SPEC2000 file

Data type:
Optional: No
Call by Reference: Yes

EXCEPTIONS details

ERROR_CREATING_S2K_IDOC -

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

S1REJECT_FOR_S1REJECT -

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for SEND_S1REJECT 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_mes_typ  TYPE EDIDC-MESTYP, "   
lt_flatfile  TYPE STANDARD TABLE OF EDIDC, "   
lv_error_creating_s2k_idoc  TYPE EDIDC, "   
lt_msg  TYPE STANDARD TABLE OF EDIDC, "   
lv_error  TYPE SPCERROR-ERRNO, "   
lv_s1reject_for_s1reject  TYPE SPCERROR, "   
lv_par1  TYPE SY-MSGV1, "   
lt_in_file  TYPE STANDARD TABLE OF SY, "   
lv_par2  TYPE SY-MSGV2, "   
lt_orig_spec_file  TYPE STANDARD TABLE OF SY, "   
lv_par3  TYPE SY-MSGV3, "   
lv_par4  TYPE SY-MSGV4. "   

  CALL FUNCTION 'SEND_S1REJECT'  "Create and send S1REJECT message
    EXPORTING
         MES_TYP = lv_mes_typ
         ERROR = lv_error
         PAR1 = lv_par1
         PAR2 = lv_par2
         PAR3 = lv_par3
         PAR4 = lv_par4
    TABLES
         FLATFILE = lt_flatfile
         MSG = lt_msg
         IN_FILE = lt_in_file
         ORIG_SPEC_FILE = lt_orig_spec_file
    EXCEPTIONS
        ERROR_CREATING_S2K_IDOC = 1
        S1REJECT_FOR_S1REJECT = 2
. " SEND_S1REJECT




ABAP code using 7.40 inline data declarations to call FM SEND_S1REJECT

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 MESTYP FROM EDIDC INTO @DATA(ld_mes_typ).
 
 
 
 
"SELECT single ERRNO FROM SPCERROR INTO @DATA(ld_error).
 
 
"SELECT single MSGV1 FROM SY INTO @DATA(ld_par1).
 
 
"SELECT single MSGV2 FROM SY INTO @DATA(ld_par2).
 
 
"SELECT single MSGV3 FROM SY INTO @DATA(ld_par3).
 
"SELECT single MSGV4 FROM SY INTO @DATA(ld_par4).
 


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!