SAP Function Modules

GRAPH_STRUCTURAL SAP Function module - SAP Structural Graphics: ABAP/4 Interface







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

Associated Function Group: GSUX
Released Date: 03.01.1995
Processing type: Remote-Enabled
remote enabled module settings


Pattern for FM GRAPH_STRUCTURAL - GRAPH STRUCTURAL





CALL FUNCTION 'GRAPH_STRUCTURAL' "SAP Structural Graphics: ABAP/4 Interface
* EXPORTING
*   addshapes = SPACE           " gsux-flag     'X': Activate more object shapes
*   editable = 'X'              " gsux-flag     'X': Structure can be changed
*   extactbar = SPACE           " gsux-flag     'X': Extend the menu bar
*   focus = 'X'                 " gsux-flag     'X': Window is placed in foreground
*   newformat = 'X'             " gsux-flag      New data format
*   pattern = SPACE             " gsuobjc-object  Comparison sample
*   pwdid = SPACE               " gsux-applid   Standard dialog parameter
*   refresh = SPACE             " gsux-flag     'X': Previous structure is deleted fully
*   so_contents = SPACE         " sood1-objdes  SAPoffice: Subtitle of generated document
*   so_receiver = SPACE         " soud3-sapnam  SAPoffice: Recipient of generated document
*   so_send = SPACE             " gsux-flag     'X': Send graphic as an SAPoffice document
*   so_title = SPACE            " sood1-objnam  SAPoffice: Document description
*   status = SPACE              " gsux-type     Standard dialog parameter (=STAT)
*   super = SPACE               " gsux-flag     Standard dialog parameter
*   tboxopen = SPACE            " gsux-flag     'X': Toolbox is opened at the start
*   tboxposx = SPACE            " tgsux-tbposx  Horizontal position of the tool box
*   tboxposy = SPACE            " tgsux-tbposy  Vertical position of the toolbox
*   tboxsizex = SPACE           " tgsux-tbsizex  Width of the toolbox
*   tboxsizey = SPACE           " tgsux-tbsizey  Height of the toolbox
*   tboxtitle = SPACE           " gsux-mtitle   Toolbox: Window title
*   thelptext = SPACE           " gsux-stitle   Toolbox: Text for docu button
*   appltitle = SPACE           " gsux-ltitle   Window title
*   toolstitle = SPACE          " gsux-mtitle   Toolbox: Title for tool list
*   tsetstitle = SPACE          " gsux-mtitle   Toolbox: Title for tool groups
*   version30a = 'X'            " gsux-flag      Version 30A
*   winid = SPACE               " gsux-applid   Standard dialog parameter
*   winposx = SPACE             " tgsux-winposx  Horizontal window position
*   winposy = SPACE             " tgsux-winposy  Vertical window position
*   winsizex = SPACE            " tgsux-winsizex  Window width
*   winsizey = SPACE            " tgsux-winsizey  Window height
*   viewtitle = SPACE           " gsux-ltitle   View heading
  IMPORTING
    m_typ =                     " gsux-type     Standard dialog parameter
    rwnid =                     " gsux-applid   Standard dialog parameter
  TABLES
    objects =                   " gsuobjc       Object table
  EXCEPTIONS
    GET_TABLEINFO_FAILED = 1    "               Error accessing table information
    NO_OBJECTS = 2              "               Object table is empty
    .  "  GRAPH_STRUCTURAL

ABAP code example for Function Module GRAPH_STRUCTURAL





The ABAP code below is a full code listing to execute function module GRAPH_STRUCTURAL 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_m_typ  TYPE GSUX-TYPE ,
ld_rwnid  TYPE GSUX-APPLID ,
it_objects  TYPE STANDARD TABLE OF GSUOBJC,"TABLES PARAM
wa_objects  LIKE LINE OF it_objects .


DATA(ld_addshapes) = some text here

DATA(ld_editable) = some text here

DATA(ld_extactbar) = some text here

DATA(ld_focus) = some text here

DATA(ld_newformat) = some text here

DATA(ld_pattern) = some text here

DATA(ld_pwdid) = some text here

DATA(ld_refresh) = some text here

DATA(ld_so_contents) = some text here

DATA(ld_so_receiver) = some text here

DATA(ld_so_send) = some text here

DATA(ld_so_title) = some text here

DATA(ld_status) = some text here

DATA(ld_super) = some text here

DATA(ld_tboxopen) = some text here

SELECT single TBPOSX
FROM TGSUX
INTO @DATA(ld_tboxposx).


SELECT single TBPOSY
FROM TGSUX
INTO @DATA(ld_tboxposy).


SELECT single TBSIZEX
FROM TGSUX
INTO @DATA(ld_tboxsizex).


SELECT single TBSIZEY
FROM TGSUX
INTO @DATA(ld_tboxsizey).


DATA(ld_tboxtitle) = some text here

DATA(ld_thelptext) = some text here

DATA(ld_appltitle) = some text here

DATA(ld_toolstitle) = some text here

DATA(ld_tsetstitle) = some text here

DATA(ld_version30a) = some text here

DATA(ld_winid) = some text here

SELECT single WINPOSX
FROM TGSUX
INTO @DATA(ld_winposx).


SELECT single WINPOSY
FROM TGSUX
INTO @DATA(ld_winposy).


SELECT single WINSIZEX
FROM TGSUX
INTO @DATA(ld_winsizex).


SELECT single WINSIZEY
FROM TGSUX
INTO @DATA(ld_winsizey).


DATA(ld_viewtitle) = some text here

"populate fields of struture and append to itab
append wa_objects to it_objects. . CALL FUNCTION 'GRAPH_STRUCTURAL' * EXPORTING * addshapes = ld_addshapes * editable = ld_editable * extactbar = ld_extactbar * focus = ld_focus * newformat = ld_newformat * pattern = ld_pattern * pwdid = ld_pwdid * refresh = ld_refresh * so_contents = ld_so_contents * so_receiver = ld_so_receiver * so_send = ld_so_send * so_title = ld_so_title * status = ld_status * super = ld_super * tboxopen = ld_tboxopen * tboxposx = ld_tboxposx * tboxposy = ld_tboxposy * tboxsizex = ld_tboxsizex * tboxsizey = ld_tboxsizey * tboxtitle = ld_tboxtitle * thelptext = ld_thelptext * appltitle = ld_appltitle * toolstitle = ld_toolstitle * tsetstitle = ld_tsetstitle * version30a = ld_version30a * winid = ld_winid * winposx = ld_winposx * winposy = ld_winposy * winsizex = ld_winsizex * winsizey = ld_winsizey * viewtitle = ld_viewtitle IMPORTING m_typ = ld_m_typ rwnid = ld_rwnid TABLES objects = it_objects EXCEPTIONS GET_TABLEINFO_FAILED = 1 NO_OBJECTS = 2 . " GRAPH_STRUCTURAL
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 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_m_typ  TYPE GSUX-TYPE ,
ld_addshapes  TYPE GSUX-FLAG ,
it_objects  TYPE STANDARD TABLE OF GSUOBJC ,
wa_objects  LIKE LINE OF it_objects,
ld_rwnid  TYPE GSUX-APPLID ,
ld_editable  TYPE GSUX-FLAG ,
ld_extactbar  TYPE GSUX-FLAG ,
ld_focus  TYPE GSUX-FLAG ,
ld_newformat  TYPE GSUX-FLAG ,
ld_pattern  TYPE GSUOBJC-OBJECT ,
ld_pwdid  TYPE GSUX-APPLID ,
ld_refresh  TYPE GSUX-FLAG ,
ld_so_contents  TYPE SOOD1-OBJDES ,
ld_so_receiver  TYPE SOUD3-SAPNAM ,
ld_so_send  TYPE GSUX-FLAG ,
ld_so_title  TYPE SOOD1-OBJNAM ,
ld_status  TYPE GSUX-TYPE ,
ld_super  TYPE GSUX-FLAG ,
ld_tboxopen  TYPE GSUX-FLAG ,
ld_tboxposx  TYPE TGSUX-TBPOSX ,
ld_tboxposy  TYPE TGSUX-TBPOSY ,
ld_tboxsizex  TYPE TGSUX-TBSIZEX ,
ld_tboxsizey  TYPE TGSUX-TBSIZEY ,
ld_tboxtitle  TYPE GSUX-MTITLE ,
ld_thelptext  TYPE GSUX-STITLE ,
ld_appltitle  TYPE GSUX-LTITLE ,
ld_toolstitle  TYPE GSUX-MTITLE ,
ld_tsetstitle  TYPE GSUX-MTITLE ,
ld_version30a  TYPE GSUX-FLAG ,
ld_winid  TYPE GSUX-APPLID ,
ld_winposx  TYPE TGSUX-WINPOSX ,
ld_winposy  TYPE TGSUX-WINPOSY ,
ld_winsizex  TYPE TGSUX-WINSIZEX ,
ld_winsizey  TYPE TGSUX-WINSIZEY ,
ld_viewtitle  TYPE GSUX-LTITLE .


ld_addshapes = some text here

"populate fields of struture and append to itab
append wa_objects to it_objects.

ld_editable = some text here

ld_extactbar = some text here

ld_focus = some text here

ld_newformat = some text here

ld_pattern = some text here

ld_pwdid = some text here

ld_refresh = some text here

ld_so_contents = some text here

ld_so_receiver = some text here

ld_so_send = some text here

ld_so_title = some text here

ld_status = some text here

ld_super = some text here

ld_tboxopen = some text here

SELECT single TBPOSX
FROM TGSUX
INTO ld_tboxposx.


SELECT single TBPOSY
FROM TGSUX
INTO ld_tboxposy.


SELECT single TBSIZEX
FROM TGSUX
INTO ld_tboxsizex.


SELECT single TBSIZEY
FROM TGSUX
INTO ld_tboxsizey.


ld_tboxtitle = some text here

ld_thelptext = some text here

ld_appltitle = some text here

ld_toolstitle = some text here

ld_tsetstitle = some text here

ld_version30a = some text here

ld_winid = some text here

SELECT single WINPOSX
FROM TGSUX
INTO ld_winposx.


SELECT single WINPOSY
FROM TGSUX
INTO ld_winposy.


SELECT single WINSIZEX
FROM TGSUX
INTO ld_winsizex.


SELECT single WINSIZEY
FROM TGSUX
INTO ld_winsizey.


ld_viewtitle = some text here

SAP Documentation for FM GRAPH_STRUCTURAL


The function module GRAPH_STRUCTURAL serves as the graphics driver for the SAP Structural Graphics. Structural Graphics allows you to display ...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 GRAPH_STRUCTURAL or its description.