SAP CY_INIT_PROFILE Function Module for Initialize profiles during capacity planning









CY_INIT_PROFILE is a standard cy init profile SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Initialize profiles during capacity planning processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.


See here to view full function module documentation and code listing for cy init profile FM, simply by entering the name CY_INIT_PROFILE into the relevant SAP transaction such as SE37 or SE38.

Function Group: CYFI
Program Name: SAPLCYFI
Main Program: SAPLCYFI
Appliation area: M
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function CY_INIT_PROFILE pattern details

In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.
CALL FUNCTION 'CY_INIT_PROFILE'"Initialize profiles during capacity planning
EXPORTING
IRC65A = "I/O fields for SAPMC65A (capacity planning)
PROFIL_ID = "ID of a user-spec. profile in the table for overall profiles

IMPORTING
DARPROFIL = "Structure of the indicators in an option profile
DARPROF_ID = "ID of a user-spec. profile in the table for option profiles
GRAPROFIL = "Structure for indicators in an overall profile
GRAPROF_ID = "ID of a user-spec. profile in the tab. for graphics profiles
LISPROFIL = "Structure for indicators in a list profile
LISPROF_ID = "List profile
SETPROFIL = "Structure for the sets and dates specified in a sel. profile
SETPROF_ID = "ID of a user-spec. profile in the tab. for selectn. profiles
.



IMPORTING Parameters details for CY_INIT_PROFILE

IRC65A - I/O fields for SAPMC65A (capacity planning)

Data type: RC65A
Optional: No
Call by Reference: No ( called with pass by value option)

PROFIL_ID - ID of a user-spec. profile in the table for overall profiles

Data type: TCY06-PROFIL_ID
Optional: No
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for CY_INIT_PROFILE

DARPROFIL - Structure of the indicators in an option profile

Data type: CYDARPROF
Optional: No
Call by Reference: No ( called with pass by value option)

DARPROF_ID - ID of a user-spec. profile in the table for option profiles

Data type: TCY06-DARPROF_ID
Optional: No
Call by Reference: No ( called with pass by value option)

GRAPROFIL - Structure for indicators in an overall profile

Data type: CYGRAPROF
Optional: No
Call by Reference: No ( called with pass by value option)

GRAPROF_ID - ID of a user-spec. profile in the tab. for graphics profiles

Data type: TCY06-GRAPROF_ID
Optional: No
Call by Reference: No ( called with pass by value option)

LISPROFIL - Structure for indicators in a list profile

Data type: CYLISPROF
Optional: No
Call by Reference: No ( called with pass by value option)

LISPROF_ID - List profile

Data type: TCY06-LISPROF_ID
Optional: No
Call by Reference: No ( called with pass by value option)

SETPROFIL - Structure for the sets and dates specified in a sel. profile

Data type: CYSETPROF
Optional: No
Call by Reference: No ( called with pass by value option)

SETPROF_ID - ID of a user-spec. profile in the tab. for selectn. profiles

Data type: TCY06-SETPROF_ID
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for CY_INIT_PROFILE Function Module

The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than 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 newer method of declaring data variables on the fly. 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), which i why i have stuck to the origianl for this example.

DATA:
lv_irc65a  TYPE RC65A, "   
lv_darprofil  TYPE CYDARPROF, "   
lv_profil_id  TYPE TCY06-PROFIL_ID, "   
lv_darprof_id  TYPE TCY06-DARPROF_ID, "   
lv_graprofil  TYPE CYGRAPROF, "   
lv_graprof_id  TYPE TCY06-GRAPROF_ID, "   
lv_lisprofil  TYPE CYLISPROF, "   
lv_lisprof_id  TYPE TCY06-LISPROF_ID, "   
lv_setprofil  TYPE CYSETPROF, "   
lv_setprof_id  TYPE TCY06-SETPROF_ID. "   

  CALL FUNCTION 'CY_INIT_PROFILE'  "Initialize profiles during capacity planning
    EXPORTING
         IRC65A = lv_irc65a
         PROFIL_ID = lv_profil_id
    IMPORTING
         DARPROFIL = lv_darprofil
         DARPROF_ID = lv_darprof_id
         GRAPROFIL = lv_graprofil
         GRAPROF_ID = lv_graprof_id
         LISPROFIL = lv_lisprofil
         LISPROF_ID = lv_lisprof_id
         SETPROFIL = lv_setprofil
         SETPROF_ID = lv_setprof_id
. " CY_INIT_PROFILE




ABAP code using 7.40 inline data declarations to call FM CY_INIT_PROFILE

The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.

 
 
"SELECT single PROFIL_ID FROM TCY06 INTO @DATA(ld_profil_id).
 
"SELECT single DARPROF_ID FROM TCY06 INTO @DATA(ld_darprof_id).
 
 
"SELECT single GRAPROF_ID FROM TCY06 INTO @DATA(ld_graprof_id).
 
 
"SELECT single LISPROF_ID FROM TCY06 INTO @DATA(ld_lisprof_id).
 
 
"SELECT single SETPROF_ID FROM TCY06 INTO @DATA(ld_setprof_id).
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!