SAP Function Modules

CY_PLANNING_TABLE SAP Function module







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

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


Pattern for FM CY_PLANNING_TABLE - CY PLANNING TABLE





CALL FUNCTION 'CY_PLANNING_TABLE' "
  EXPORTING
    pltfunction =               " cycrhd_tab-funktion1  Function of/for planning table, not obj-relat
*   pltmessage =                " cyfcmsg       Message area
    profile_id =                " tcy30-profile_id  Structure of overall profile
*   wait_for_input = 'X'        " net_graph-flag
  IMPORTING
    pltfunction =               " cycrhd_tab-funktion1  Function of/for planning table, not obj-relat
  TABLES
*   cyafko_tab =                " cyafko_tab    Object table order master data
*   cyafvg_tab =                " cyafvg_tab    Object table transactions
*   cybdgr_tab =                " cybdgr_tab    selected lines with funct. from table section
    cybed_gru =                 " cybed_gru     Requirements grouping table
*   cycrhd_tab =                " cycrhd_tab    Object table work centers
    cygru_ein =                 " cygru_ein     Group individual requirements
*   cykako_tab =                " cykako_tab    Object table capacity
*   cykbed_tab =                " cykbed_tab    Object table capacity requirements
*   cyplaf_tab =                " cyplaf_tab    Object table planned order
*   cygru_mat_tab =             " cyint_gru_mat_tab
    .  "  CY_PLANNING_TABLE

ABAP code example for Function Module CY_PLANNING_TABLE





The ABAP code below is a full code listing to execute function module CY_PLANNING_TABLE 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_pltfunction  TYPE CYCRHD_TAB-FUNKTION1 ,
it_cyafko_tab  TYPE STANDARD TABLE OF CYAFKO_TAB,"TABLES PARAM
wa_cyafko_tab  LIKE LINE OF it_cyafko_tab ,
it_cyafvg_tab  TYPE STANDARD TABLE OF CYAFVG_TAB,"TABLES PARAM
wa_cyafvg_tab  LIKE LINE OF it_cyafvg_tab ,
it_cybdgr_tab  TYPE STANDARD TABLE OF CYBDGR_TAB,"TABLES PARAM
wa_cybdgr_tab  LIKE LINE OF it_cybdgr_tab ,
it_cybed_gru  TYPE STANDARD TABLE OF CYBED_GRU,"TABLES PARAM
wa_cybed_gru  LIKE LINE OF it_cybed_gru ,
it_cycrhd_tab  TYPE STANDARD TABLE OF CYCRHD_TAB,"TABLES PARAM
wa_cycrhd_tab  LIKE LINE OF it_cycrhd_tab ,
it_cygru_ein  TYPE STANDARD TABLE OF CYGRU_EIN,"TABLES PARAM
wa_cygru_ein  LIKE LINE OF it_cygru_ein ,
it_cykako_tab  TYPE STANDARD TABLE OF CYKAKO_TAB,"TABLES PARAM
wa_cykako_tab  LIKE LINE OF it_cykako_tab ,
it_cykbed_tab  TYPE STANDARD TABLE OF CYKBED_TAB,"TABLES PARAM
wa_cykbed_tab  LIKE LINE OF it_cykbed_tab ,
it_cyplaf_tab  TYPE STANDARD TABLE OF CYPLAF_TAB,"TABLES PARAM
wa_cyplaf_tab  LIKE LINE OF it_cyplaf_tab ,
it_cygru_mat_tab  TYPE STANDARD TABLE OF CYINT_GRU_MAT_TAB,"TABLES PARAM
wa_cygru_mat_tab  LIKE LINE OF it_cygru_mat_tab .


DATA(ld_pltfunction) = some text here
DATA(ld_pltmessage) = 'Check type of data required'.

SELECT single PROFILE_ID
FROM TCY30
INTO @DATA(ld_profile_id).


DATA(ld_wait_for_input) = some text here

"populate fields of struture and append to itab
append wa_cyafko_tab to it_cyafko_tab.

"populate fields of struture and append to itab
append wa_cyafvg_tab to it_cyafvg_tab.

"populate fields of struture and append to itab
append wa_cybdgr_tab to it_cybdgr_tab.

"populate fields of struture and append to itab
append wa_cybed_gru to it_cybed_gru.

"populate fields of struture and append to itab
append wa_cycrhd_tab to it_cycrhd_tab.

"populate fields of struture and append to itab
append wa_cygru_ein to it_cygru_ein.

"populate fields of struture and append to itab
append wa_cykako_tab to it_cykako_tab.

"populate fields of struture and append to itab
append wa_cykbed_tab to it_cykbed_tab.

"populate fields of struture and append to itab
append wa_cyplaf_tab to it_cyplaf_tab.

"populate fields of struture and append to itab
append wa_cygru_mat_tab to it_cygru_mat_tab. . CALL FUNCTION 'CY_PLANNING_TABLE' EXPORTING pltfunction = ld_pltfunction * pltmessage = ld_pltmessage profile_id = ld_profile_id * wait_for_input = ld_wait_for_input IMPORTING pltfunction = ld_pltfunction TABLES * cyafko_tab = it_cyafko_tab * cyafvg_tab = it_cyafvg_tab * cybdgr_tab = it_cybdgr_tab cybed_gru = it_cybed_gru * cycrhd_tab = it_cycrhd_tab cygru_ein = it_cygru_ein * cykako_tab = it_cykako_tab * cykbed_tab = it_cykbed_tab * cyplaf_tab = it_cyplaf_tab * cygru_mat_tab = it_cygru_mat_tab . " CY_PLANNING_TABLE
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_pltfunction  TYPE CYCRHD_TAB-FUNKTION1 ,
ld_pltfunction  TYPE CYCRHD_TAB-FUNKTION1 ,
it_cyafko_tab  TYPE STANDARD TABLE OF CYAFKO_TAB ,
wa_cyafko_tab  LIKE LINE OF it_cyafko_tab,
ld_pltmessage  TYPE CYFCMSG ,
it_cyafvg_tab  TYPE STANDARD TABLE OF CYAFVG_TAB ,
wa_cyafvg_tab  LIKE LINE OF it_cyafvg_tab,
ld_profile_id  TYPE TCY30-PROFILE_ID ,
it_cybdgr_tab  TYPE STANDARD TABLE OF CYBDGR_TAB ,
wa_cybdgr_tab  LIKE LINE OF it_cybdgr_tab,
ld_wait_for_input  TYPE NET_GRAPH-FLAG ,
it_cybed_gru  TYPE STANDARD TABLE OF CYBED_GRU ,
wa_cybed_gru  LIKE LINE OF it_cybed_gru,
it_cycrhd_tab  TYPE STANDARD TABLE OF CYCRHD_TAB ,
wa_cycrhd_tab  LIKE LINE OF it_cycrhd_tab,
it_cygru_ein  TYPE STANDARD TABLE OF CYGRU_EIN ,
wa_cygru_ein  LIKE LINE OF it_cygru_ein,
it_cykako_tab  TYPE STANDARD TABLE OF CYKAKO_TAB ,
wa_cykako_tab  LIKE LINE OF it_cykako_tab,
it_cykbed_tab  TYPE STANDARD TABLE OF CYKBED_TAB ,
wa_cykbed_tab  LIKE LINE OF it_cykbed_tab,
it_cyplaf_tab  TYPE STANDARD TABLE OF CYPLAF_TAB ,
wa_cyplaf_tab  LIKE LINE OF it_cyplaf_tab,
it_cygru_mat_tab  TYPE STANDARD TABLE OF CYINT_GRU_MAT_TAB ,
wa_cygru_mat_tab  LIKE LINE OF it_cygru_mat_tab.


ld_pltfunction = some text here

"populate fields of struture and append to itab
append wa_cyafko_tab to it_cyafko_tab.
ld_pltmessage = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_cyafvg_tab to it_cyafvg_tab.

SELECT single PROFILE_ID
FROM TCY30
INTO ld_profile_id.


"populate fields of struture and append to itab
append wa_cybdgr_tab to it_cybdgr_tab.

ld_wait_for_input = some text here

"populate fields of struture and append to itab
append wa_cybed_gru to it_cybed_gru.

"populate fields of struture and append to itab
append wa_cycrhd_tab to it_cycrhd_tab.

"populate fields of struture and append to itab
append wa_cygru_ein to it_cygru_ein.

"populate fields of struture and append to itab
append wa_cykako_tab to it_cykako_tab.

"populate fields of struture and append to itab
append wa_cykbed_tab to it_cykbed_tab.

"populate fields of struture and append to itab
append wa_cyplaf_tab to it_cyplaf_tab.

"populate fields of struture and append to itab
append wa_cygru_mat_tab to it_cygru_mat_tab.

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