SAP Function Modules

CO_SD_INTERNAL_ORDER_SCHEDULE SAP Function module







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

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


Pattern for FM CO_SD_INTERNAL_ORDER_SCHEDULE - CO SD INTERNAL ORDER SCHEDULE





CALL FUNCTION 'CO_SD_INTERNAL_ORDER_SCHEDULE' "
  EXPORTING
*   plaf_imp =                  " plaf
*   sauf_imp =                  " sauf
*   caufvd_imp =                " caufvd
*   mdsct_imp =                 " mdsct
*   cx_marc_imp =               " cx_marc
    i_kbed_typkz =              " kbed-typkz
*   i_selid =                   " tca43-sel_id
*   i_verid =                   " rcpse-verid
*   tcx00_imp =                 " tcx00
*   t436a_imp =                 " t436a
*   i_time_arbpt =              " mdstats-arbpt
*   i_time_einzt =              " mdstats-einzt
*   i_flg_lead_time_sched = 'X'  "
*   i_flg_capacities_det = 'X'  "
*   i_flg_activities_det = ' '  "
*   i_flg_keep_bt = ' '         "
*   i_flg_only_bt = ' '         "
*   i_flg_protocol = 'X'        "
*   i_flg_perf = SPACE          " c
*   i_flg_called_f_mrp = ' '    "
  IMPORTING
    plaf_exp =                  " plaf
    sauf_exp =                  " sauf
    caufvd_exp =                " caufvd
    e_time_arbpt =              " mdstats-arbpt
    e_time_einzt =              " mdstats-einzt
    e_aufnr =                   " afko-aufnr
    e_fenv1 =                   " afvv-fsedd
    e_fstv1 =                   " afvv-fsavd
    e_senv1 =                   " afvv-ssedd
    e_sstv1 =                   " afvv-ssavd
* TABLES
*   t_cxplmz =                  " cxplmz
*   t_cxlst =                   " cxlst
*   t_mdpm =                    " mdpm
  EXCEPTIONS
    PLAN_ERROR = 1              "
    PLAN_NOT_FOUND = 2          "
    TCA43_NOT_FOUND = 3         "
    NO_SCHED_PARAMETERS = 4     "
    .  "  CO_SD_INTERNAL_ORDER_SCHEDULE

ABAP code example for Function Module CO_SD_INTERNAL_ORDER_SCHEDULE





The ABAP code below is a full code listing to execute function module CO_SD_INTERNAL_ORDER_SCHEDULE 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_plaf_exp  TYPE PLAF ,
ld_sauf_exp  TYPE SAUF ,
ld_caufvd_exp  TYPE CAUFVD ,
ld_e_time_arbpt  TYPE MDSTATS-ARBPT ,
ld_e_time_einzt  TYPE MDSTATS-EINZT ,
ld_e_aufnr  TYPE AFKO-AUFNR ,
ld_e_fenv1  TYPE AFVV-FSEDD ,
ld_e_fstv1  TYPE AFVV-FSAVD ,
ld_e_senv1  TYPE AFVV-SSEDD ,
ld_e_sstv1  TYPE AFVV-SSAVD ,
it_t_cxplmz  TYPE STANDARD TABLE OF CXPLMZ,"TABLES PARAM
wa_t_cxplmz  LIKE LINE OF it_t_cxplmz ,
it_t_cxlst  TYPE STANDARD TABLE OF CXLST,"TABLES PARAM
wa_t_cxlst  LIKE LINE OF it_t_cxlst ,
it_t_mdpm  TYPE STANDARD TABLE OF MDPM,"TABLES PARAM
wa_t_mdpm  LIKE LINE OF it_t_mdpm .

DATA(ld_plaf_imp) = 'Check type of data required'.
DATA(ld_sauf_imp) = 'Check type of data required'.
DATA(ld_caufvd_imp) = 'Check type of data required'.
DATA(ld_mdsct_imp) = 'Check type of data required'.
DATA(ld_cx_marc_imp) = 'Check type of data required'.

SELECT single TYPKZ
FROM KBED
INTO @DATA(ld_i_kbed_typkz).


SELECT single SEL_ID
FROM TCA43
INTO @DATA(ld_i_selid).


DATA(ld_i_verid) = some text here
DATA(ld_tcx00_imp) = 'Check type of data required'.
DATA(ld_t436a_imp) = 'Check type of data required'.

DATA(ld_i_time_arbpt) = 123

DATA(ld_i_time_einzt) = 123
DATA(ld_i_flg_lead_time_sched) = 'some text here'.
DATA(ld_i_flg_capacities_det) = 'some text here'.
DATA(ld_i_flg_activities_det) = 'some text here'.
DATA(ld_i_flg_keep_bt) = 'some text here'.
DATA(ld_i_flg_only_bt) = 'some text here'.
DATA(ld_i_flg_protocol) = 'some text here'.
DATA(ld_i_flg_perf) = 'Check type of data required'.
DATA(ld_i_flg_called_f_mrp) = 'some text here'.

"populate fields of struture and append to itab
append wa_t_cxplmz to it_t_cxplmz.

"populate fields of struture and append to itab
append wa_t_cxlst to it_t_cxlst.

"populate fields of struture and append to itab
append wa_t_mdpm to it_t_mdpm. . CALL FUNCTION 'CO_SD_INTERNAL_ORDER_SCHEDULE' EXPORTING * plaf_imp = ld_plaf_imp * sauf_imp = ld_sauf_imp * caufvd_imp = ld_caufvd_imp * mdsct_imp = ld_mdsct_imp * cx_marc_imp = ld_cx_marc_imp i_kbed_typkz = ld_i_kbed_typkz * i_selid = ld_i_selid * i_verid = ld_i_verid * tcx00_imp = ld_tcx00_imp * t436a_imp = ld_t436a_imp * i_time_arbpt = ld_i_time_arbpt * i_time_einzt = ld_i_time_einzt * i_flg_lead_time_sched = ld_i_flg_lead_time_sched * i_flg_capacities_det = ld_i_flg_capacities_det * i_flg_activities_det = ld_i_flg_activities_det * i_flg_keep_bt = ld_i_flg_keep_bt * i_flg_only_bt = ld_i_flg_only_bt * i_flg_protocol = ld_i_flg_protocol * i_flg_perf = ld_i_flg_perf * i_flg_called_f_mrp = ld_i_flg_called_f_mrp IMPORTING plaf_exp = ld_plaf_exp sauf_exp = ld_sauf_exp caufvd_exp = ld_caufvd_exp e_time_arbpt = ld_e_time_arbpt e_time_einzt = ld_e_time_einzt e_aufnr = ld_e_aufnr e_fenv1 = ld_e_fenv1 e_fstv1 = ld_e_fstv1 e_senv1 = ld_e_senv1 e_sstv1 = ld_e_sstv1 * TABLES * t_cxplmz = it_t_cxplmz * t_cxlst = it_t_cxlst * t_mdpm = it_t_mdpm EXCEPTIONS PLAN_ERROR = 1 PLAN_NOT_FOUND = 2 TCA43_NOT_FOUND = 3 NO_SCHED_PARAMETERS = 4 . " CO_SD_INTERNAL_ORDER_SCHEDULE
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 ELSEIF SY-SUBRC EQ 4. "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_plaf_exp  TYPE PLAF ,
it_t_cxplmz  TYPE STANDARD TABLE OF CXPLMZ ,
wa_t_cxplmz  LIKE LINE OF it_t_cxplmz,
ld_plaf_imp  TYPE PLAF ,
it_t_cxlst  TYPE STANDARD TABLE OF CXLST ,
wa_t_cxlst  LIKE LINE OF it_t_cxlst,
ld_sauf_imp  TYPE SAUF ,
ld_sauf_exp  TYPE SAUF ,
ld_caufvd_imp  TYPE CAUFVD ,
it_t_mdpm  TYPE STANDARD TABLE OF MDPM ,
wa_t_mdpm  LIKE LINE OF it_t_mdpm,
ld_caufvd_exp  TYPE CAUFVD ,
ld_mdsct_imp  TYPE MDSCT ,
ld_e_time_arbpt  TYPE MDSTATS-ARBPT ,
ld_cx_marc_imp  TYPE CX_MARC ,
ld_e_time_einzt  TYPE MDSTATS-EINZT ,
ld_e_aufnr  TYPE AFKO-AUFNR ,
ld_i_kbed_typkz  TYPE KBED-TYPKZ ,
ld_e_fenv1  TYPE AFVV-FSEDD ,
ld_i_selid  TYPE TCA43-SEL_ID ,
ld_e_fstv1  TYPE AFVV-FSAVD ,
ld_i_verid  TYPE RCPSE-VERID ,
ld_tcx00_imp  TYPE TCX00 ,
ld_e_senv1  TYPE AFVV-SSEDD ,
ld_t436a_imp  TYPE T436A ,
ld_e_sstv1  TYPE AFVV-SSAVD ,
ld_i_time_arbpt  TYPE MDSTATS-ARBPT ,
ld_i_time_einzt  TYPE MDSTATS-EINZT ,
ld_i_flg_lead_time_sched  TYPE STRING ,
ld_i_flg_capacities_det  TYPE STRING ,
ld_i_flg_activities_det  TYPE STRING ,
ld_i_flg_keep_bt  TYPE STRING ,
ld_i_flg_only_bt  TYPE STRING ,
ld_i_flg_protocol  TYPE STRING ,
ld_i_flg_perf  TYPE C ,
ld_i_flg_called_f_mrp  TYPE STRING .


"populate fields of struture and append to itab
append wa_t_cxplmz to it_t_cxplmz.
ld_plaf_imp = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_cxlst to it_t_cxlst.
ld_sauf_imp = 'Check type of data required'.
ld_caufvd_imp = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_mdpm to it_t_mdpm.
ld_mdsct_imp = 'Check type of data required'.
ld_cx_marc_imp = 'Check type of data required'.

SELECT single TYPKZ
FROM KBED
INTO ld_i_kbed_typkz.


SELECT single SEL_ID
FROM TCA43
INTO ld_i_selid.


ld_i_verid = some text here
ld_tcx00_imp = 'Check type of data required'.
ld_t436a_imp = 'Check type of data required'.

ld_i_time_arbpt = 123

ld_i_time_einzt = 123
ld_i_flg_lead_time_sched = 'some text here'.
ld_i_flg_capacities_det = 'some text here'.
ld_i_flg_activities_det = 'some text here'.
ld_i_flg_keep_bt = 'some text here'.
ld_i_flg_only_bt = 'some text here'.
ld_i_flg_protocol = 'some text here'.
ld_i_flg_perf = 'Check type of data required'.
ld_i_flg_called_f_mrp = 'some text here'.

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