SAP Function Modules

LASP_INITIALIZEDISPLAY SAP Function module







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

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


Pattern for FM LASP_INITIALIZEDISPLAY - LASP INITIALIZEDISPLAY





CALL FUNCTION 'LASP_INITIALIZEDISPLAY' "
  EXPORTING
    t001w_is =                  " t001w         Plant
    horizon_is =                " lasp_interval_st  Period of Examination
*   tspp0_is =                  " tspp0         Planning Profile
*   tspp1_is =                  " tspp1         Planning procedure
*   tspg0_is =                  " tspg0         Visualization Profile
*   mode_iv = 'X'               " c             Change/Display
*   control_iv = ' '            " net_graph-flag
*   jview_iv = ' '              " tspg1-jview
  IMPORTING
    winid_ev =                  " net_graph-winid
* TABLES
*   ldlhd_it =                  " ldlhd
*   mt61d_it =                  " mt61d
*   mkal_it =                   " mkal
*   plaf_it =                   " plaf          Planned Orders
*   linechange_tt =             " lasp_linechange_ta
  EXCEPTIONS
    WINID_INVALID = 1           "
    INVALID_LASP_INITIALIZE = 2  "              Error During Initialization
    ERROR_LASP_SEQUENCING = 3   "               Error in Scheduling
    .  "  LASP_INITIALIZEDISPLAY

ABAP code example for Function Module LASP_INITIALIZEDISPLAY





The ABAP code below is a full code listing to execute function module LASP_INITIALIZEDISPLAY 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_winid_ev  TYPE NET_GRAPH-WINID ,
it_ldlhd_it  TYPE STANDARD TABLE OF LDLHD,"TABLES PARAM
wa_ldlhd_it  LIKE LINE OF it_ldlhd_it ,
it_mt61d_it  TYPE STANDARD TABLE OF MT61D,"TABLES PARAM
wa_mt61d_it  LIKE LINE OF it_mt61d_it ,
it_mkal_it  TYPE STANDARD TABLE OF MKAL,"TABLES PARAM
wa_mkal_it  LIKE LINE OF it_mkal_it ,
it_plaf_it  TYPE STANDARD TABLE OF PLAF,"TABLES PARAM
wa_plaf_it  LIKE LINE OF it_plaf_it ,
it_linechange_tt  TYPE STANDARD TABLE OF LASP_LINECHANGE_TA,"TABLES PARAM
wa_linechange_tt  LIKE LINE OF it_linechange_tt .

DATA(ld_t001w_is) = 'Check type of data required'.
DATA(ld_horizon_is) = 'Check type of data required'.
DATA(ld_tspp0_is) = 'Check type of data required'.
DATA(ld_tspp1_is) = 'Check type of data required'.
DATA(ld_tspg0_is) = 'Check type of data required'.
DATA(ld_mode_iv) = 'Check type of data required'.

DATA(ld_control_iv) = some text here

SELECT single JVIEW
FROM TSPG1
INTO @DATA(ld_jview_iv).


"populate fields of struture and append to itab
append wa_ldlhd_it to it_ldlhd_it.

"populate fields of struture and append to itab
append wa_mt61d_it to it_mt61d_it.

"populate fields of struture and append to itab
append wa_mkal_it to it_mkal_it.

"populate fields of struture and append to itab
append wa_plaf_it to it_plaf_it.

"populate fields of struture and append to itab
append wa_linechange_tt to it_linechange_tt. . CALL FUNCTION 'LASP_INITIALIZEDISPLAY' EXPORTING t001w_is = ld_t001w_is horizon_is = ld_horizon_is * tspp0_is = ld_tspp0_is * tspp1_is = ld_tspp1_is * tspg0_is = ld_tspg0_is * mode_iv = ld_mode_iv * control_iv = ld_control_iv * jview_iv = ld_jview_iv IMPORTING winid_ev = ld_winid_ev * TABLES * ldlhd_it = it_ldlhd_it * mt61d_it = it_mt61d_it * mkal_it = it_mkal_it * plaf_it = it_plaf_it * linechange_tt = it_linechange_tt EXCEPTIONS WINID_INVALID = 1 INVALID_LASP_INITIALIZE = 2 ERROR_LASP_SEQUENCING = 3 . " LASP_INITIALIZEDISPLAY
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_winid_ev  TYPE NET_GRAPH-WINID ,
ld_t001w_is  TYPE T001W ,
it_ldlhd_it  TYPE STANDARD TABLE OF LDLHD ,
wa_ldlhd_it  LIKE LINE OF it_ldlhd_it,
ld_horizon_is  TYPE LASP_INTERVAL_ST ,
it_mt61d_it  TYPE STANDARD TABLE OF MT61D ,
wa_mt61d_it  LIKE LINE OF it_mt61d_it,
ld_tspp0_is  TYPE TSPP0 ,
it_mkal_it  TYPE STANDARD TABLE OF MKAL ,
wa_mkal_it  LIKE LINE OF it_mkal_it,
ld_tspp1_is  TYPE TSPP1 ,
it_plaf_it  TYPE STANDARD TABLE OF PLAF ,
wa_plaf_it  LIKE LINE OF it_plaf_it,
ld_tspg0_is  TYPE TSPG0 ,
it_linechange_tt  TYPE STANDARD TABLE OF LASP_LINECHANGE_TA ,
wa_linechange_tt  LIKE LINE OF it_linechange_tt,
ld_mode_iv  TYPE C ,
ld_control_iv  TYPE NET_GRAPH-FLAG ,
ld_jview_iv  TYPE TSPG1-JVIEW .

ld_t001w_is = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_ldlhd_it to it_ldlhd_it.
ld_horizon_is = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_mt61d_it to it_mt61d_it.
ld_tspp0_is = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_mkal_it to it_mkal_it.
ld_tspp1_is = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_plaf_it to it_plaf_it.
ld_tspg0_is = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_linechange_tt to it_linechange_tt.
ld_mode_iv = 'Check type of data required'.

ld_control_iv = some text here

SELECT single JVIEW
FROM TSPG1
INTO ld_jview_iv.

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