SAP SO_OBJECT_PREPARE_FOR_SEND Function Module for
SO_OBJECT_PREPARE_FOR_SEND is a standard so object prepare for send SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 so object prepare for send FM, simply by entering the name SO_OBJECT_PREPARE_FOR_SEND into the relevant SAP transaction such as SE37 or SE38.
Function Group: SOE2
Program Name: SAPLSOE2
Main Program: SAPLSOE2
Appliation area: S
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function SO_OBJECT_PREPARE_FOR_SEND 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 'SO_OBJECT_PREPARE_FOR_SEND'".
EXPORTING
OBJECT_OUT = "Object in SAPconnect form
SENDER = "Sender's SAP name
* MESSAGE_TYPE = 'M' "Status or document message
IMPORTING
RECEIVE_INFO = "Information about the send operation
DOCUMENT_DATA = "Document header data
TABLES
RECEIVERS = "Recipient (Office)
RECIPIENT_ADDRS = "Recipient (SAPconnect)
PACKING_LIST = "Descriptive list for transport tables
OBJECT_HEADER = "Specific header entries
CONTENTS_BIN = "Binary contents
CONTENTS_TXT = "ASCII contents
* CONTENTS_HEX = "
OBJECT_PARA = "SET/GET parameter of the main document
OBJECT_PARB = "Processing parameter of the main document
EXCEPTIONS
ERR_SEND_PROC_NOT_FOUND = 1 X_ERROR = 2
IMPORTING Parameters details for SO_OBJECT_PREPARE_FOR_SEND
OBJECT_OUT - Object in SAPconnect form
Data type: SX_OBJECTOptional: No
Call by Reference: Yes
SENDER - Sender's SAP name
Data type: SX_ADDRESSOptional: No
Call by Reference: No ( called with pass by value option)
MESSAGE_TYPE - Status or document message
Data type: SX_MSGTYPEDefault: 'M'
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for SO_OBJECT_PREPARE_FOR_SEND
RECEIVE_INFO - Information about the send operation
Data type: SXRECINFI1Optional: No
Call by Reference: No ( called with pass by value option)
DOCUMENT_DATA - Document header data
Data type: SXDOCCHGI1Optional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for SO_OBJECT_PREPARE_FOR_SEND
RECEIVERS - Recipient (Office)
Data type: SXEXTRECI1Optional: No
Call by Reference: No ( called with pass by value option)
RECIPIENT_ADDRS - Recipient (SAPconnect)
Data type: SX_RECIPIENT_TABOptional: No
Call by Reference: No ( called with pass by value option)
PACKING_LIST - Descriptive list for transport tables
Data type: SOPCKLSTI1Optional: No
Call by Reference: No ( called with pass by value option)
OBJECT_HEADER - Specific header entries
Data type: SOLIOptional: No
Call by Reference: No ( called with pass by value option)
CONTENTS_BIN - Binary contents
Data type: SOLIOptional: No
Call by Reference: No ( called with pass by value option)
CONTENTS_TXT - ASCII contents
Data type: SOLIOptional: No
Call by Reference: No ( called with pass by value option)
CONTENTS_HEX -
Data type: SOLIXOptional: Yes
Call by Reference: Yes
OBJECT_PARA - SET/GET parameter of the main document
Data type: SOPARAI1Optional: No
Call by Reference: No ( called with pass by value option)
OBJECT_PARB - Processing parameter of the main document
Data type: SOPARBI1Optional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
ERR_SEND_PROC_NOT_FOUND - Send operation not found
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
X_ERROR - Unknown error / database inconsistency
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for SO_OBJECT_PREPARE_FOR_SEND 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_receivers | TYPE STANDARD TABLE OF SXEXTRECI1, " | |||
| lv_object_out | TYPE SX_OBJECT, " | |||
| lv_receive_info | TYPE SXRECINFI1, " | |||
| lv_err_send_proc_not_found | TYPE SXRECINFI1, " | |||
| lv_sender | TYPE SX_ADDRESS, " | |||
| lv_x_error | TYPE SX_ADDRESS, " | |||
| lv_document_data | TYPE SXDOCCHGI1, " | |||
| lt_recipient_addrs | TYPE STANDARD TABLE OF SX_RECIPIENT_TAB, " | |||
| lv_message_type | TYPE SX_MSGTYPE, " 'M' | |||
| lt_packing_list | TYPE STANDARD TABLE OF SOPCKLSTI1, " | |||
| lt_object_header | TYPE STANDARD TABLE OF SOLI, " | |||
| lt_contents_bin | TYPE STANDARD TABLE OF SOLI, " | |||
| lt_contents_txt | TYPE STANDARD TABLE OF SOLI, " | |||
| lt_contents_hex | TYPE STANDARD TABLE OF SOLIX, " | |||
| lt_object_para | TYPE STANDARD TABLE OF SOPARAI1, " | |||
| lt_object_parb | TYPE STANDARD TABLE OF SOPARBI1. " |
|   CALL FUNCTION 'SO_OBJECT_PREPARE_FOR_SEND' " |
| EXPORTING | ||
| OBJECT_OUT | = lv_object_out | |
| SENDER | = lv_sender | |
| MESSAGE_TYPE | = lv_message_type | |
| IMPORTING | ||
| RECEIVE_INFO | = lv_receive_info | |
| DOCUMENT_DATA | = lv_document_data | |
| TABLES | ||
| RECEIVERS | = lt_receivers | |
| RECIPIENT_ADDRS | = lt_recipient_addrs | |
| PACKING_LIST | = lt_packing_list | |
| OBJECT_HEADER | = lt_object_header | |
| CONTENTS_BIN | = lt_contents_bin | |
| CONTENTS_TXT | = lt_contents_txt | |
| CONTENTS_HEX | = lt_contents_hex | |
| OBJECT_PARA | = lt_object_para | |
| OBJECT_PARB | = lt_object_parb | |
| EXCEPTIONS | ||
| ERR_SEND_PROC_NOT_FOUND = 1 | ||
| X_ERROR = 2 | ||
| . " SO_OBJECT_PREPARE_FOR_SEND | ||
ABAP code using 7.40 inline data declarations to call FM SO_OBJECT_PREPARE_FOR_SEND
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.| DATA(ld_message_type) | = 'M'. | |||
Search for further information about these or an SAP related objects