SAP Function Modules

GCC_ORDER_CREATE SAP Function module







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

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


Pattern for FM GCC_ORDER_CREATE - GCC ORDER CREATE





CALL FUNCTION 'GCC_ORDER_CREATE' "
  EXPORTING
    i_orext =                   " orext         CO order fields for external data transfer
    i_strategy_sequence =       " sr_slist      Strategy Sequences for Automatic Generation of SETC
    i_settlement_profile =      " aprof         Settlement Profile
    i_cost_collector =          " cl_iaom_cost_collector
*   i_order_create = 'X'        " bapi0012_gen-testrun
*   i_srule_create = 'X'        " bapi0012_gen-testrun
*   i_test_flag = SPACE         " bapi0012_gen-testrun
*   i_coas =                    " coas
*   i_order_read = SPACE        " bapi0012_gen-testrun  Read Order
*   i_srule_date_of_cut = '00000000'  " datum   Date
*   i_srule_cut_and_create = ' '  " iaom_settlement_rule_change
  IMPORTING
    e_objnr =                   " j_objnr       Temporary Object Number
    e_kauf_index =              " kauf-auf_index
    e_coas =                    " coas          Generated Table for View COAS
  EXCEPTIONS
    SRULE_CREATE_ERROR = 1      "
    ORDER_CREATE_ERROR = 2      "
    STATUS_CHANGE_ERROR = 3     "
    .  "  GCC_ORDER_CREATE

ABAP code example for Function Module GCC_ORDER_CREATE





The ABAP code below is a full code listing to execute function module GCC_ORDER_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_e_objnr  TYPE J_OBJNR ,
ld_e_kauf_index  TYPE KAUF-AUF_INDEX ,
ld_e_coas  TYPE COAS .

DATA(ld_i_orext) = 'Check type of data required'.
DATA(ld_i_strategy_sequence) = 'Check type of data required'.
DATA(ld_i_settlement_profile) = 'Check type of data required'.
DATA(ld_i_cost_collector) = 'Check type of data required'.

DATA(ld_i_order_create) = some text here

DATA(ld_i_srule_create) = some text here

DATA(ld_i_test_flag) = some text here
DATA(ld_i_coas) = 'Check type of data required'.

DATA(ld_i_order_read) = some text here
DATA(ld_i_srule_date_of_cut) = 'Check type of data required'.
DATA(ld_i_srule_cut_and_create) = 'Check type of data required'. . CALL FUNCTION 'GCC_ORDER_CREATE' EXPORTING i_orext = ld_i_orext i_strategy_sequence = ld_i_strategy_sequence i_settlement_profile = ld_i_settlement_profile i_cost_collector = ld_i_cost_collector * i_order_create = ld_i_order_create * i_srule_create = ld_i_srule_create * i_test_flag = ld_i_test_flag * i_coas = ld_i_coas * i_order_read = ld_i_order_read * i_srule_date_of_cut = ld_i_srule_date_of_cut * i_srule_cut_and_create = ld_i_srule_cut_and_create IMPORTING e_objnr = ld_e_objnr e_kauf_index = ld_e_kauf_index e_coas = ld_e_coas EXCEPTIONS SRULE_CREATE_ERROR = 1 ORDER_CREATE_ERROR = 2 STATUS_CHANGE_ERROR = 3 . " GCC_ORDER_CREATE
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 3. "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:
ld_e_objnr  TYPE J_OBJNR ,
ld_i_orext  TYPE OREXT ,
ld_e_kauf_index  TYPE KAUF-AUF_INDEX ,
ld_i_strategy_sequence  TYPE SR_SLIST ,
ld_e_coas  TYPE COAS ,
ld_i_settlement_profile  TYPE APROF ,
ld_i_cost_collector  TYPE CL_IAOM_COST_COLLECTOR ,
ld_i_order_create  TYPE BAPI0012_GEN-TESTRUN ,
ld_i_srule_create  TYPE BAPI0012_GEN-TESTRUN ,
ld_i_test_flag  TYPE BAPI0012_GEN-TESTRUN ,
ld_i_coas  TYPE COAS ,
ld_i_order_read  TYPE BAPI0012_GEN-TESTRUN ,
ld_i_srule_date_of_cut  TYPE DATUM ,
ld_i_srule_cut_and_create  TYPE IAOM_SETTLEMENT_RULE_CHANGE .

ld_i_orext = 'Check type of data required'.
ld_i_strategy_sequence = 'Check type of data required'.
ld_i_settlement_profile = 'Check type of data required'.
ld_i_cost_collector = 'Check type of data required'.

ld_i_order_create = some text here

ld_i_srule_create = some text here

ld_i_test_flag = some text here
ld_i_coas = 'Check type of data required'.

ld_i_order_read = some text here
ld_i_srule_date_of_cut = 'Check type of data required'.
ld_i_srule_cut_and_create = 'Check type of data required'.

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