SAP Function Modules

PD_STRUCTURAL_GRAPHICS SAP Function module - Call SAP Structural Graphics







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

Associated Function Group: PDSU
Released Date: 23.06.1995
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM PD_STRUCTURAL_GRAPHICS - PD STRUCTURAL GRAPHICS





CALL FUNCTION 'PD_STRUCTURAL_GRAPHICS' "Call SAP Structural Graphics
* EXPORTING
*   context_id =                " t77gc-contextid  Context ID
*   index =                     " gdstr-pstru   Pointer on root object (evaluated structure)
*   eval_path =                 " pchdy-wegid   Evaluation path for structural evaluation
*   statuses = '1'              " pchdy-svect   Status vector for structural evaluation
*   begin_date = SY-DATUM       " pchdy-begda   Start of structural evaluation
*   end_date = SY-DATUM         " pchdy-endda   End of structural evaluation
*   tdepth = 0                  " pchdy-depth   Technical depth for structural evaluation
*   activate = ' '              " pchdy-activ   Activation flag for structural evaluation
*   no_recurs_objects = ' '     " hrrhas-recurs
*   data_status = '1'           " pchdy-istat   Data status for structural evaluation
*   load_pd_toolbox = 'X'       "               'X': toolbox is loaded
*   load_pd_profiles = 'X'      "               'X': design is loaded
*   callback_program =          " trdir-name    Program that contains the callback routines
*   callback_objects =          "               Callback routine for objects
*   callback_toolbox =          "               Callback routine for toolbox
*   callback_profiles =         "               Callback routine for profiles
*   callback_interaction =      "               Callback routine for interaktion
* TABLES
*   pd_objects =                " hrealo        PD root objects for structural evaluation
  EXCEPTIONS
    NO_OBJECTS_AVAILABLE = 1    "               No objects available
    .  "  PD_STRUCTURAL_GRAPHICS

ABAP code example for Function Module PD_STRUCTURAL_GRAPHICS





The ABAP code below is a full code listing to execute function module PD_STRUCTURAL_GRAPHICS 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:
it_pd_objects  TYPE STANDARD TABLE OF HREALO,"TABLES PARAM
wa_pd_objects  LIKE LINE OF it_pd_objects .


SELECT single CONTEXTID
FROM T77GC
INTO @DATA(ld_context_id).


DATA(ld_index) = 123

DATA(ld_eval_path) = some text here

DATA(ld_statuses) = some text here

DATA(ld_begin_date) = 20210129

DATA(ld_end_date) = 20210129

DATA(ld_tdepth) = Check type of data required

DATA(ld_activate) = some text here

DATA(ld_no_recurs_objects) = some text here

DATA(ld_data_status) = some text here
DATA(ld_load_pd_toolbox) = 'some text here'.
DATA(ld_load_pd_profiles) = 'some text here'.

SELECT single NAME
FROM TRDIR
INTO @DATA(ld_callback_program).

DATA(ld_callback_objects) = 'some text here'.
DATA(ld_callback_toolbox) = 'some text here'.
DATA(ld_callback_profiles) = 'some text here'.
DATA(ld_callback_interaction) = 'some text here'.

"populate fields of struture and append to itab
append wa_pd_objects to it_pd_objects. . CALL FUNCTION 'PD_STRUCTURAL_GRAPHICS' * EXPORTING * context_id = ld_context_id * index = ld_index * eval_path = ld_eval_path * statuses = ld_statuses * begin_date = ld_begin_date * end_date = ld_end_date * tdepth = ld_tdepth * activate = ld_activate * no_recurs_objects = ld_no_recurs_objects * data_status = ld_data_status * load_pd_toolbox = ld_load_pd_toolbox * load_pd_profiles = ld_load_pd_profiles * callback_program = ld_callback_program * callback_objects = ld_callback_objects * callback_toolbox = ld_callback_toolbox * callback_profiles = ld_callback_profiles * callback_interaction = ld_callback_interaction * TABLES * pd_objects = it_pd_objects EXCEPTIONS NO_OBJECTS_AVAILABLE = 1 . " PD_STRUCTURAL_GRAPHICS
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "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_context_id  TYPE T77GC-CONTEXTID ,
it_pd_objects  TYPE STANDARD TABLE OF HREALO ,
wa_pd_objects  LIKE LINE OF it_pd_objects,
ld_index  TYPE GDSTR-PSTRU ,
ld_eval_path  TYPE PCHDY-WEGID ,
ld_statuses  TYPE PCHDY-SVECT ,
ld_begin_date  TYPE PCHDY-BEGDA ,
ld_end_date  TYPE PCHDY-ENDDA ,
ld_tdepth  TYPE PCHDY-DEPTH ,
ld_activate  TYPE PCHDY-ACTIV ,
ld_no_recurs_objects  TYPE HRRHAS-RECURS ,
ld_data_status  TYPE PCHDY-ISTAT ,
ld_load_pd_toolbox  TYPE STRING ,
ld_load_pd_profiles  TYPE STRING ,
ld_callback_program  TYPE TRDIR-NAME ,
ld_callback_objects  TYPE STRING ,
ld_callback_toolbox  TYPE STRING ,
ld_callback_profiles  TYPE STRING ,
ld_callback_interaction  TYPE STRING .


SELECT single CONTEXTID
FROM T77GC
INTO ld_context_id.


"populate fields of struture and append to itab
append wa_pd_objects to it_pd_objects.

ld_index = 123

ld_eval_path = some text here

ld_statuses = some text here

ld_begin_date = 20210129

ld_end_date = 20210129

ld_tdepth = Check type of data required

ld_activate = some text here

ld_no_recurs_objects = some text here

ld_data_status = some text here
ld_load_pd_toolbox = 'some text here'.
ld_load_pd_profiles = 'some text here'.

SELECT single NAME
FROM TRDIR
INTO ld_callback_program.

ld_callback_objects = 'some text here'.
ld_callback_toolbox = 'some text here'.
ld_callback_profiles = 'some text here'.
ld_callback_interaction = 'some text here'.

SAP Documentation for FM PD_STRUCTURAL_GRAPHICS


Structural Graphics for Displaying and Editing PD Structures and Objects ...See here for full SAP fm documentation

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