SAP Function Modules

SAMPLE_PROCESS_CSUL_010 SAP Function module







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

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


Pattern for FM SAMPLE_PROCESS_CSUL_010 - SAMPLE PROCESS CSUL 010





CALL FUNCTION 'SAMPLE_PROCESS_CSUL_010' "
  IMPORTING
    es_return =                 " bapiret2
* TABLES
*   it_stko_api02 =             " stko_api02
*   it_stpo_api02 =             " stpo_api02
*   ct_stpo_api01 =             " stpo_api01
*   ct_stpo_api03 =             " stpo_api03
*   ct_stko =                   " bapibomstk
*   ct_stpo =                   " bapibomstp
*   ct_stas =                   " bapibomsta
* CHANGING
*   cs_mbom =                   " csap_mbom
*   cs_stko_api01 =             " stko_api01
*   cs_mast =                   " bapibommst
*   cs_stzu =                   " bapibomstz
    .  "  SAMPLE_PROCESS_CSUL_010

ABAP code example for Function Module SAMPLE_PROCESS_CSUL_010





The ABAP code below is a full code listing to execute function module SAMPLE_PROCESS_CSUL_010 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_es_return  TYPE BAPIRET2 ,
it_it_stko_api02  TYPE STANDARD TABLE OF STKO_API02,"TABLES PARAM
wa_it_stko_api02  LIKE LINE OF it_it_stko_api02 ,
it_it_stpo_api02  TYPE STANDARD TABLE OF STPO_API02,"TABLES PARAM
wa_it_stpo_api02  LIKE LINE OF it_it_stpo_api02 ,
it_ct_stpo_api01  TYPE STANDARD TABLE OF STPO_API01,"TABLES PARAM
wa_ct_stpo_api01  LIKE LINE OF it_ct_stpo_api01 ,
it_ct_stpo_api03  TYPE STANDARD TABLE OF STPO_API03,"TABLES PARAM
wa_ct_stpo_api03  LIKE LINE OF it_ct_stpo_api03 ,
it_ct_stko  TYPE STANDARD TABLE OF BAPIBOMSTK,"TABLES PARAM
wa_ct_stko  LIKE LINE OF it_ct_stko ,
it_ct_stpo  TYPE STANDARD TABLE OF BAPIBOMSTP,"TABLES PARAM
wa_ct_stpo  LIKE LINE OF it_ct_stpo ,
it_ct_stas  TYPE STANDARD TABLE OF BAPIBOMSTA,"TABLES PARAM
wa_ct_stas  LIKE LINE OF it_ct_stas .

DATA(ld_cs_mbom) = 'Check type of data required'.
DATA(ld_cs_stko_api01) = 'Check type of data required'.
DATA(ld_cs_mast) = 'Check type of data required'.
DATA(ld_cs_stzu) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_it_stko_api02 to it_it_stko_api02.

"populate fields of struture and append to itab
append wa_it_stpo_api02 to it_it_stpo_api02.

"populate fields of struture and append to itab
append wa_ct_stpo_api01 to it_ct_stpo_api01.

"populate fields of struture and append to itab
append wa_ct_stpo_api03 to it_ct_stpo_api03.

"populate fields of struture and append to itab
append wa_ct_stko to it_ct_stko.

"populate fields of struture and append to itab
append wa_ct_stpo to it_ct_stpo.

"populate fields of struture and append to itab
append wa_ct_stas to it_ct_stas. . CALL FUNCTION 'SAMPLE_PROCESS_CSUL_010' IMPORTING es_return = ld_es_return * TABLES * it_stko_api02 = it_it_stko_api02 * it_stpo_api02 = it_it_stpo_api02 * ct_stpo_api01 = it_ct_stpo_api01 * ct_stpo_api03 = it_ct_stpo_api03 * ct_stko = it_ct_stko * ct_stpo = it_ct_stpo * ct_stas = it_ct_stas * CHANGING * cs_mbom = ld_cs_mbom * cs_stko_api01 = ld_cs_stko_api01 * cs_mast = ld_cs_mast * cs_stzu = ld_cs_stzu . " SAMPLE_PROCESS_CSUL_010
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_cs_mbom  TYPE CSAP_MBOM ,
ld_es_return  TYPE BAPIRET2 ,
it_it_stko_api02  TYPE STANDARD TABLE OF STKO_API02 ,
wa_it_stko_api02  LIKE LINE OF it_it_stko_api02,
ld_cs_stko_api01  TYPE STKO_API01 ,
it_it_stpo_api02  TYPE STANDARD TABLE OF STPO_API02 ,
wa_it_stpo_api02  LIKE LINE OF it_it_stpo_api02,
ld_cs_mast  TYPE BAPIBOMMST ,
it_ct_stpo_api01  TYPE STANDARD TABLE OF STPO_API01 ,
wa_ct_stpo_api01  LIKE LINE OF it_ct_stpo_api01,
ld_cs_stzu  TYPE BAPIBOMSTZ ,
it_ct_stpo_api03  TYPE STANDARD TABLE OF STPO_API03 ,
wa_ct_stpo_api03  LIKE LINE OF it_ct_stpo_api03,
it_ct_stko  TYPE STANDARD TABLE OF BAPIBOMSTK ,
wa_ct_stko  LIKE LINE OF it_ct_stko,
it_ct_stpo  TYPE STANDARD TABLE OF BAPIBOMSTP ,
wa_ct_stpo  LIKE LINE OF it_ct_stpo,
it_ct_stas  TYPE STANDARD TABLE OF BAPIBOMSTA ,
wa_ct_stas  LIKE LINE OF it_ct_stas.

ld_cs_mbom = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_it_stko_api02 to it_it_stko_api02.
ld_cs_stko_api01 = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_it_stpo_api02 to it_it_stpo_api02.
ld_cs_mast = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_ct_stpo_api01 to it_ct_stpo_api01.
ld_cs_stzu = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_ct_stpo_api03 to it_ct_stpo_api03.

"populate fields of struture and append to itab
append wa_ct_stko to it_ct_stko.

"populate fields of struture and append to itab
append wa_ct_stpo to it_ct_stpo.

"populate fields of struture and append to itab
append wa_ct_stas to it_ct_stas.

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