SAP Function Modules

SBCOMS_SEND_REQUEST_CREATE SAP Function module







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

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


Pattern for FM SBCOMS_SEND_REQUEST_CREATE - SBCOMS SEND REQUEST CREATE





CALL FUNCTION 'SBCOMS_SEND_REQUEST_CREATE' "
* EXPORTING
*   copy_object = SPACE         " sonv-flag
*   outbox_flag = 'S'           " soud-outfl
*   owner = SPACE               " soud-usrnam   Owner of object
*   originator =                " soos1-recextnam  Direct external address as recipient
*   originator_type =           " soos1-recesc  Specification of recipient type
  IMPORTING
    send_request =              " cl_send_request_bcs  Send Request
    facade =                    " cl_bcs
    multiple_documents =        " sonv-flag
    originator_id =             " soudk
* TABLES
*   objcont =                   " soli          Document Contents
*   objects =                   " sood4         SAPoffice: Interface for send screen and MOM
*   objhead =                   " soli          SAPoffice: line, length 255
*   objpara =                   " selc          ABAP/4: Old structure of selection table
*   objparb =                   " soop1         SAPoffice: Parameter for Dialog Modules
*   receivers =                 " soos1         SAPoffice: recipient with attributes
*   packing_list =              " soxpl         SAPoffice: Description of Imported Object Components
*   att_head =                  " soli          SAPoffice: line, length 255
*   att_cont =                  " soli          SAPoffice: line, length 255
*   note_text =                 " soli          SAPoffice: line, length 255
*   link_list =                 " soxll         SAPoffice: Link list structure
*   application_object =        " swotobjid     Structure for Object ID
*   send_requests =             " bcsy_sr
*   content_hex =               " solix
* CHANGING
*   folder_id =                 " soodk
*   object_id =                 " soodk         Existing object: ID of object
*   object_type =               " sood-objtp    New object: Object type
*   object_hd_change =          " sood1         New object: General header data
*   object_fl_change =          " sofm1         New object: Folder information
  EXCEPTIONS
    X_ERROR = 1                 "               Internal Error
    .  "  SBCOMS_SEND_REQUEST_CREATE

ABAP code example for Function Module SBCOMS_SEND_REQUEST_CREATE





The ABAP code below is a full code listing to execute function module SBCOMS_SEND_REQUEST_CREATE 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:
ld_send_request  TYPE CL_SEND_REQUEST_BCS ,
ld_facade  TYPE CL_BCS ,
ld_multiple_documents  TYPE SONV-FLAG ,
ld_originator_id  TYPE SOUDK ,
it_objcont  TYPE STANDARD TABLE OF SOLI,"TABLES PARAM
wa_objcont  LIKE LINE OF it_objcont ,
it_objects  TYPE STANDARD TABLE OF SOOD4,"TABLES PARAM
wa_objects  LIKE LINE OF it_objects ,
it_objhead  TYPE STANDARD TABLE OF SOLI,"TABLES PARAM
wa_objhead  LIKE LINE OF it_objhead ,
it_objpara  TYPE STANDARD TABLE OF SELC,"TABLES PARAM
wa_objpara  LIKE LINE OF it_objpara ,
it_objparb  TYPE STANDARD TABLE OF SOOP1,"TABLES PARAM
wa_objparb  LIKE LINE OF it_objparb ,
it_receivers  TYPE STANDARD TABLE OF SOOS1,"TABLES PARAM
wa_receivers  LIKE LINE OF it_receivers ,
it_packing_list  TYPE STANDARD TABLE OF SOXPL,"TABLES PARAM
wa_packing_list  LIKE LINE OF it_packing_list ,
it_att_head  TYPE STANDARD TABLE OF SOLI,"TABLES PARAM
wa_att_head  LIKE LINE OF it_att_head ,
it_att_cont  TYPE STANDARD TABLE OF SOLI,"TABLES PARAM
wa_att_cont  LIKE LINE OF it_att_cont ,
it_note_text  TYPE STANDARD TABLE OF SOLI,"TABLES PARAM
wa_note_text  LIKE LINE OF it_note_text ,
it_link_list  TYPE STANDARD TABLE OF SOXLL,"TABLES PARAM
wa_link_list  LIKE LINE OF it_link_list ,
it_application_object  TYPE STANDARD TABLE OF SWOTOBJID,"TABLES PARAM
wa_application_object  LIKE LINE OF it_application_object ,
it_send_requests  TYPE STANDARD TABLE OF BCSY_SR,"TABLES PARAM
wa_send_requests  LIKE LINE OF it_send_requests ,
it_content_hex  TYPE STANDARD TABLE OF SOLIX,"TABLES PARAM
wa_content_hex  LIKE LINE OF it_content_hex .

DATA(ld_folder_id) = 'Check type of data required'.
DATA(ld_object_id) = 'Check type of data required'.

SELECT single OBJTP
FROM SOOD
INTO @DATA(ld_object_type).

DATA(ld_object_hd_change) = 'Check type of data required'.
DATA(ld_object_fl_change) = 'Check type of data required'.

DATA(ld_copy_object) = some text here

SELECT single OUTFL
FROM SOUD
INTO @DATA(ld_outbox_flag).


SELECT single USRNAM
FROM SOUD
INTO @DATA(ld_owner).


DATA(ld_originator) = Check type of data required

DATA(ld_originator_type) = some text here

"populate fields of struture and append to itab
append wa_objcont to it_objcont.

"populate fields of struture and append to itab
append wa_objects to it_objects.

"populate fields of struture and append to itab
append wa_objhead to it_objhead.

"populate fields of struture and append to itab
append wa_objpara to it_objpara.

"populate fields of struture and append to itab
append wa_objparb to it_objparb.

"populate fields of struture and append to itab
append wa_receivers to it_receivers.

"populate fields of struture and append to itab
append wa_packing_list to it_packing_list.

"populate fields of struture and append to itab
append wa_att_head to it_att_head.

"populate fields of struture and append to itab
append wa_att_cont to it_att_cont.

"populate fields of struture and append to itab
append wa_note_text to it_note_text.

"populate fields of struture and append to itab
append wa_link_list to it_link_list.

"populate fields of struture and append to itab
append wa_application_object to it_application_object.

"populate fields of struture and append to itab
append wa_send_requests to it_send_requests.

"populate fields of struture and append to itab
append wa_content_hex to it_content_hex. . CALL FUNCTION 'SBCOMS_SEND_REQUEST_CREATE' * EXPORTING * copy_object = ld_copy_object * outbox_flag = ld_outbox_flag * owner = ld_owner * originator = ld_originator * originator_type = ld_originator_type IMPORTING send_request = ld_send_request facade = ld_facade multiple_documents = ld_multiple_documents originator_id = ld_originator_id * TABLES * objcont = it_objcont * objects = it_objects * objhead = it_objhead * objpara = it_objpara * objparb = it_objparb * receivers = it_receivers * packing_list = it_packing_list * att_head = it_att_head * att_cont = it_att_cont * note_text = it_note_text * link_list = it_link_list * application_object = it_application_object * send_requests = it_send_requests * content_hex = it_content_hex * CHANGING * folder_id = ld_folder_id * object_id = ld_object_id * object_type = ld_object_type * object_hd_change = ld_object_hd_change * object_fl_change = ld_object_fl_change EXCEPTIONS X_ERROR = 1 . " SBCOMS_SEND_REQUEST_CREATE
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:
it_objcont  TYPE STANDARD TABLE OF SOLI ,
wa_objcont  LIKE LINE OF it_objcont,
ld_copy_object  TYPE SONV-FLAG ,
ld_send_request  TYPE CL_SEND_REQUEST_BCS ,
ld_folder_id  TYPE SOODK ,
ld_facade  TYPE CL_BCS ,
it_objects  TYPE STANDARD TABLE OF SOOD4 ,
wa_objects  LIKE LINE OF it_objects,
ld_object_id  TYPE SOODK ,
ld_outbox_flag  TYPE SOUD-OUTFL ,
it_objhead  TYPE STANDARD TABLE OF SOLI ,
wa_objhead  LIKE LINE OF it_objhead,
ld_owner  TYPE SOUD-USRNAM ,
ld_object_type  TYPE SOOD-OBJTP ,
ld_multiple_documents  TYPE SONV-FLAG ,
ld_originator  TYPE SOOS1-RECEXTNAM ,
ld_originator_id  TYPE SOUDK ,
ld_object_hd_change  TYPE SOOD1 ,
it_objpara  TYPE STANDARD TABLE OF SELC ,
wa_objpara  LIKE LINE OF it_objpara,
ld_originator_type  TYPE SOOS1-RECESC ,
it_objparb  TYPE STANDARD TABLE OF SOOP1 ,
wa_objparb  LIKE LINE OF it_objparb,
ld_object_fl_change  TYPE SOFM1 ,
it_receivers  TYPE STANDARD TABLE OF SOOS1 ,
wa_receivers  LIKE LINE OF it_receivers,
it_packing_list  TYPE STANDARD TABLE OF SOXPL ,
wa_packing_list  LIKE LINE OF it_packing_list,
it_att_head  TYPE STANDARD TABLE OF SOLI ,
wa_att_head  LIKE LINE OF it_att_head,
it_att_cont  TYPE STANDARD TABLE OF SOLI ,
wa_att_cont  LIKE LINE OF it_att_cont,
it_note_text  TYPE STANDARD TABLE OF SOLI ,
wa_note_text  LIKE LINE OF it_note_text,
it_link_list  TYPE STANDARD TABLE OF SOXLL ,
wa_link_list  LIKE LINE OF it_link_list,
it_application_object  TYPE STANDARD TABLE OF SWOTOBJID ,
wa_application_object  LIKE LINE OF it_application_object,
it_send_requests  TYPE STANDARD TABLE OF BCSY_SR ,
wa_send_requests  LIKE LINE OF it_send_requests,
it_content_hex  TYPE STANDARD TABLE OF SOLIX ,
wa_content_hex  LIKE LINE OF it_content_hex.


"populate fields of struture and append to itab
append wa_objcont to it_objcont.

ld_copy_object = some text here
ld_folder_id = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_objects to it_objects.
ld_object_id = 'Check type of data required'.

SELECT single OUTFL
FROM SOUD
INTO ld_outbox_flag.


"populate fields of struture and append to itab
append wa_objhead to it_objhead.

SELECT single USRNAM
FROM SOUD
INTO ld_owner.


SELECT single OBJTP
FROM SOOD
INTO ld_object_type.


ld_originator = Check type of data required
ld_object_hd_change = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_objpara to it_objpara.

ld_originator_type = some text here

"populate fields of struture and append to itab
append wa_objparb to it_objparb.
ld_object_fl_change = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_receivers to it_receivers.

"populate fields of struture and append to itab
append wa_packing_list to it_packing_list.

"populate fields of struture and append to itab
append wa_att_head to it_att_head.

"populate fields of struture and append to itab
append wa_att_cont to it_att_cont.

"populate fields of struture and append to itab
append wa_note_text to it_note_text.

"populate fields of struture and append to itab
append wa_link_list to it_link_list.

"populate fields of struture and append to itab
append wa_application_object to it_application_object.

"populate fields of struture and append to itab
append wa_send_requests to it_send_requests.

"populate fields of struture and append to itab
append wa_content_hex to it_content_hex.

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