SAP Function Modules

KGAL_CREATE_CYCLE SAP Function module







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

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


Pattern for FM KGAL_CREATE_CYCLE - KGAL CREATE CYCLE





CALL FUNCTION 'KGAL_CREATE_CYCLE' "
* EXPORTING
*   testrun = SPACE             " rkga2u-test
  TABLES
    it811c =                    " t811c
    it811s =                    " t811s
    it811k =                    " t811k
*   it811f =                    " t811f
*   it811l =                    " t811l
    error_log =                 " bapiret2
    .  "  KGAL_CREATE_CYCLE

ABAP code example for Function Module KGAL_CREATE_CYCLE





The ABAP code below is a full code listing to execute function module KGAL_CREATE_CYCLE 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:
it_it811c  TYPE STANDARD TABLE OF T811C,"TABLES PARAM
wa_it811c  LIKE LINE OF it_it811c ,
it_it811s  TYPE STANDARD TABLE OF T811S,"TABLES PARAM
wa_it811s  LIKE LINE OF it_it811s ,
it_it811k  TYPE STANDARD TABLE OF T811K,"TABLES PARAM
wa_it811k  LIKE LINE OF it_it811k ,
it_it811f  TYPE STANDARD TABLE OF T811F,"TABLES PARAM
wa_it811f  LIKE LINE OF it_it811f ,
it_it811l  TYPE STANDARD TABLE OF T811L,"TABLES PARAM
wa_it811l  LIKE LINE OF it_it811l ,
it_error_log  TYPE STANDARD TABLE OF BAPIRET2,"TABLES PARAM
wa_error_log  LIKE LINE OF it_error_log .


DATA(ld_testrun) = some text here

"populate fields of struture and append to itab
append wa_it811c to it_it811c.

"populate fields of struture and append to itab
append wa_it811s to it_it811s.

"populate fields of struture and append to itab
append wa_it811k to it_it811k.

"populate fields of struture and append to itab
append wa_it811f to it_it811f.

"populate fields of struture and append to itab
append wa_it811l to it_it811l.

"populate fields of struture and append to itab
append wa_error_log to it_error_log. . CALL FUNCTION 'KGAL_CREATE_CYCLE' * EXPORTING * testrun = ld_testrun TABLES it811c = it_it811c it811s = it_it811s it811k = it_it811k * it811f = it_it811f * it811l = it_it811l error_log = it_error_log . " KGAL_CREATE_CYCLE
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_testrun  TYPE RKGA2U-TEST ,
it_it811c  TYPE STANDARD TABLE OF T811C ,
wa_it811c  LIKE LINE OF it_it811c,
it_it811s  TYPE STANDARD TABLE OF T811S ,
wa_it811s  LIKE LINE OF it_it811s,
it_it811k  TYPE STANDARD TABLE OF T811K ,
wa_it811k  LIKE LINE OF it_it811k,
it_it811f  TYPE STANDARD TABLE OF T811F ,
wa_it811f  LIKE LINE OF it_it811f,
it_it811l  TYPE STANDARD TABLE OF T811L ,
wa_it811l  LIKE LINE OF it_it811l,
it_error_log  TYPE STANDARD TABLE OF BAPIRET2 ,
wa_error_log  LIKE LINE OF it_error_log.


ld_testrun = some text here

"populate fields of struture and append to itab
append wa_it811c to it_it811c.

"populate fields of struture and append to itab
append wa_it811s to it_it811s.

"populate fields of struture and append to itab
append wa_it811k to it_it811k.

"populate fields of struture and append to itab
append wa_it811f to it_it811f.

"populate fields of struture and append to itab
append wa_it811l to it_it811l.

"populate fields of struture and append to itab
append wa_error_log to it_error_log.

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