SAP Function Modules

BAPI_SLS_COM_SET_COMMENT SAP Function module - Import Comment







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

Associated Function Group: SLSB
Released Date: Not Released
Processing type: Remote-Enabled
remote enabled module settings


Pattern for FM BAPI_SLS_COM_SET_COMMENT - BAPI SLS COM SET COMMENT





CALL FUNCTION 'BAPI_SLS_COM_SET_COMMENT' "Import Comment
  EXPORTING
    p_evid =                    " sls_bapibo-eveid  Object ID
    p_no_tem =                  " sls_event-no_tem  PAW - Event  either from TEM or not
  IMPORTING
    return =                    " bapiret1      Return parameter
* TABLES
*   p_cevent =                  " sls_sceve     Structure: Comments for an event
*   p_cxet =                    " sls_scxet     Structure: Comments for an event / test assignment
*   p_cpet =                    " sls_scpet     Structure: Comments for an event / test / participant assign
*   p_critem =                  " sls_scrite    Structure: Comments for an event / test / participant assign
    .  "  BAPI_SLS_COM_SET_COMMENT

ABAP code example for Function Module BAPI_SLS_COM_SET_COMMENT





The ABAP code below is a full code listing to execute function module BAPI_SLS_COM_SET_COMMENT 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_return  TYPE BAPIRET1 ,
it_p_cevent  TYPE STANDARD TABLE OF SLS_SCEVE,"TABLES PARAM
wa_p_cevent  LIKE LINE OF it_p_cevent ,
it_p_cxet  TYPE STANDARD TABLE OF SLS_SCXET,"TABLES PARAM
wa_p_cxet  LIKE LINE OF it_p_cxet ,
it_p_cpet  TYPE STANDARD TABLE OF SLS_SCPET,"TABLES PARAM
wa_p_cpet  LIKE LINE OF it_p_cpet ,
it_p_critem  TYPE STANDARD TABLE OF SLS_SCRITE,"TABLES PARAM
wa_p_critem  LIKE LINE OF it_p_critem .


DATA(ld_p_evid) = Check type of data required

SELECT single NO_TEM
FROM SLS_EVENT
INTO @DATA(ld_p_no_tem).


"populate fields of struture and append to itab
append wa_p_cevent to it_p_cevent.

"populate fields of struture and append to itab
append wa_p_cxet to it_p_cxet.

"populate fields of struture and append to itab
append wa_p_cpet to it_p_cpet.

"populate fields of struture and append to itab
append wa_p_critem to it_p_critem. . CALL FUNCTION 'BAPI_SLS_COM_SET_COMMENT' EXPORTING p_evid = ld_p_evid p_no_tem = ld_p_no_tem IMPORTING return = ld_return * TABLES * p_cevent = it_p_cevent * p_cxet = it_p_cxet * p_cpet = it_p_cpet * p_critem = it_p_critem . " BAPI_SLS_COM_SET_COMMENT
IF SY-SUBRC EQ 0. "All OK 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:
ld_return  TYPE BAPIRET1 ,
ld_p_evid  TYPE SLS_BAPIBO-EVEID ,
it_p_cevent  TYPE STANDARD TABLE OF SLS_SCEVE ,
wa_p_cevent  LIKE LINE OF it_p_cevent,
ld_p_no_tem  TYPE SLS_EVENT-NO_TEM ,
it_p_cxet  TYPE STANDARD TABLE OF SLS_SCXET ,
wa_p_cxet  LIKE LINE OF it_p_cxet,
it_p_cpet  TYPE STANDARD TABLE OF SLS_SCPET ,
wa_p_cpet  LIKE LINE OF it_p_cpet,
it_p_critem  TYPE STANDARD TABLE OF SLS_SCRITE ,
wa_p_critem  LIKE LINE OF it_p_critem.


ld_p_evid = Check type of data required

"populate fields of struture and append to itab
append wa_p_cevent to it_p_cevent.

SELECT single NO_TEM
FROM SLS_EVENT
INTO ld_p_no_tem.


"populate fields of struture and append to itab
append wa_p_cxet to it_p_cxet.

"populate fields of struture and append to itab
append wa_p_cpet to it_p_cpet.

"populate fields of struture and append to itab
append wa_p_critem to it_p_critem.

SAP Documentation for FM BAPI_SLS_COM_SET_COMMENT


This BAPI FM imports all the comments at the event level, event-test level, event-test-participant level, item level and checks whether the ...See here for full SAP fm documentation





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