`
`The following Help Topics are available:
`Introduction
`The following topics each describe the function modules you can use to call a particular graphics
`program:
`
`~ ..............................
`
`.................................................................... i .............................
`
`i ..........................
`
`The following sections deal with special function modules. These are the only function modules that
`call no graphics program at all. GRAPH_ACTION and GRAPH_DIALOG provide generalized
`programming capabilities. GRAPH_RECEIVE is a utility function module for dialog programming.
`
`................................................................. ~ .............................
`,.T.b.e..GRAP.H...DIALO.GEu[I.~.ti.o.rI.Modu[e.
`,.T.b.e..G.RAP.H...R E.G EI.V..E.F..gn ~ti.o.J~.M.odul.e.
`D.ial.o .P..r.o. ramm~n
`Sample Programs are provided for most applications. These programs demonstrate function
`module calls and the use of the dialog parameters. You can use these programs as models for
`programming your own graphics applications.
`
`For Help on Help, Press F1
`
`Version
`.Cop..yrLq.bt
`
`SAP-00004756
`
`
`
`Version
`Prepared for R/3 Release 2.2.
`August 94
`
`SAP-00004757
`
`
`
`Copyrights
`
`@1994 SAP AG. All rights reserved.
`Neither this documentation nor any part of it may be copied or reproduced in any form or by any
`means or translated into another language, without the prior consent of SAP AG.
`SAP AG makes no warranties or representations with respect to the content hereof and specifically
`disclaims any implied warranties of merchantability or fitness for any particular purpose. SAP AG
`assumes no responsibility for any errors that may appear in this document. The information
`contained in this document is subject to change without notice. SAP AG reserves the right to
`make any such changes without obligation to notify any person of such revision or changes. SAP
`AG makes no commitment to keep the information contained herein up to date.
`
`SAP-00004758
`
`
`
` lntroduction
`
`SAP Graphics is a series of graphics programs that run on SAP workstations. These programs are
`listed in the following table.
`SAP Graphics programs and what they are used for.
`Graphics program name Graphing capabilities
`
`SAP Business Graphics
`SAP Hierarchy
`SAP Pushbutton Graphics
`SAP Text Matrix
`SAP Statistics
`SAP Gantt Chart
`SAP HPGL Display
`SAP Network Graphics
`SAP Portfolio Graphics
`
`Diagrams, charts, etc
`Hierarchical data
`Pushbutton pads,
`Text windows
`Statistical data in curves
`Time planning information
`Graphic data in HPGL format
`Network graphs
`Comparative business trends
`
`ABAP/4 programs running on an R/3 application server can start up these graphics programs on
`the frontend and send them data for display.
`This guide describes the programming interface between the ABAP/4 program and graphics
`program. This interface consists of a set of graphics function modules: most call a particular
`graphics program, but a few perform general functions.
`These function modules are listed in the following table, according to the graphics program each
`calls.
`SAP Graphics programs and function modules
`Graphics program Function modules
`
`SAP Business Graphics
`
`SAP Hierarchy
`
`SAP Pushbutton Graphics
`
`SAP Statistics
`
`SAP Gantt Chart
`
`GRAPH 2D
`GRAPH 3D
`GRAPH MATRIX 2D
`GRAPH MATRIX 3D
`GRAPH MATRIX 4D
`GRAPH MATRIX
`GRAPH BUSG MENU SET
`
`GRAPH_HIERARCHY
`GRAPH HIERARCHY MENUE
`
`GRAPH_BUTTON_MATRIX
`GRAPH BUTTON MENUE
`
`STAT GRAPH
`STAT GRAPH REF
`
`GANTT DIAGRAMM
`GRAPH GANTT
`
`SAP HPGL Display
`
`GRAPH_HPGL
`
`SAP-00004759
`
`
`
`SAP Text Matrix
`
`TEXT MATRIX
`
`SAP Network Graphics
`
`CNET_GRAPHIC_HIERARCHY
`CNET GRAPHIC NETWORK
`
`SAP Portfolio Graphics
`
`GRAPH_PORT
`
`GRAPH_ACTION
`(none)
`GRAPH_DIALOG
`(none)
`GRAPH_RECEIVE
`(none)
`GET_xxxx_PARAM
`(none)
`The graphics function modules call the relevant graphics program directly (for example
`GRAPH_MATRIX_4D). Other function modules perform utility functions and do not call a specific
`graphics program (GRAPH_ACTION, GRAPH_RECEIVE, and the GET_xxxx_PARAM modules).
`The distinction is important because the utility function modules interact closely with the functions
`modules that call a graphics program.
`This section contains the following topics:
`
`SAP-00004760
`
`
`
`Programming Interactive Applications
`
`ABAP/4 programs calling the graphics function modules and the utility function modules can
`provide the online user with extensive interactive capabilities. The online user can open multiple
`windows, each with a different graphics program running in it, and enter input to any of them.
`To make these interactions possible, the function modules perform all the communications tasks
`needed to carry on the dialog between the application program and the graphics program. In
`addition, the modules execute the following operations:
`¯ open a window on the user’s desktop
`¯
`start up the graphics program in the window
`¯
`send data to the running graphics program
`¯
`receive messages from the graphics program
`¯
`report the messages back to the ABAP/4 program
`Thus, the function module is the mediator (see the following figure) in all communication between
`the ABAP/4 program and the graphics program.
`
`R/3 Application Server
`
`Frontend
`
`ABAP/4
`program
`("CALL STAT_ G RAPH")
`
`"CALLFUN CTION
`GRAPH_RECEIVE"
`
`("CALLFUNCTION
`GET_STAT_PARAM" )
`
`G rap h ic s
`function
`module
`(STAT_ G RAPH )
`
`GRAPH_
`RECEIVE
`
`[
`
`GET_xxxx_
`PARAM
`(GET_STAT_
`PARAM)
`
`Graphics
`program
`(SAP Statistios )
`
`When reading this guide, it is important to keep the above diagram in mind. The sections in this
`guide make continual reference to the three participants (ABAP/4 program, function module, and
`graphics program) in the story. Keeping firmly in mind which programs are responsible for which
`actions will greatly ease your programming efforts.
`
`SAP-00004761
`
`
`
`The SAP Business Graphics Function Modules
`
`The SAP Business Graphics program generates a business graph (bar chart, pie chart, and so on)
`in two-dimensional and three-dimensional views. The online user can modify the display using
`menu options.
`A typical business graph looks as shown in the following figure.
`
`SAP-00004762
`
`
`
`Adriani
`~ Refrigerators
`~vea.~
`
`SAP-00004763
`
`
`
`
`
`.R_arame1e_r__D_e_ss:_r'
`
`.ti9n
`
`
`
`§am _|.e..Br.Q _am..u.s1n ..QRABl:I RE.QEIyE..ans1..Ql.=.]'
`,\l.\l.itI.1.D1al.o.,g,1
`
`BAR!-\M_..Qall.19..B.MAI.anc1.Bu.$§ .
`
`
`SAP-00004764
`SAP-00004764
`
`
`
`Functions for Drawing Business Graphics
`
`You can call SAP Hierarchy from an ABAP/4 program, and generate such a business graphic at the
`user’s workstation terminal. Your program specifies the data and calls one of the following function
`modules:
`GRAPH 2D
`GRAPH 3D
`GRAPH MATRIX 2D
`GRAPH MATRIX 3D
`GRAPH MATRIX 4D
`GRAPH MATRIX
`The basic difference between these modules is ease of use. All the GRAPH MATRIX function
`modules are more flexible but also more complicated to use.
`¯ You can call all of the GRAPH_MATRIX modules with large data tables, and indicate which
`parts of the table you want graphed.
`By contrast, the GRAPH_2D and GRAPH_3D function modules graph all the data you send.
`¯ You can set the initial display options with the GRAPH_MATRIX modules. These are the same
`display options that an online user sets using menus.
`With the GRAPH_2D and GRAPH_3D function modules, you get initial displays with the default
`display options. However, the online user can reset these options as desired.
`
`SAP-00004765
`
`
`
`Special Purpose Functions
`
`There is one SAP Business Graphics function that does not itself draw business graphics:
`¯ GRAPH BUSG MENU SET
`This function module is used to define special features in a business graphic. To use the function,
`you must call it before calling one of the function modules listed above. (See the topic on
`GRAPH_BUSG_MENU_SET for more information.)
`
`SAP-00004766
`
`
`
`Program Interactive Applications
`
`If your ABAP/4 program allows the online user to open multiple windows or enter data with the
`mouse or keyboard, the application is interactive.
`You are provided with two mechanisms for controlling the interaction between ABAP/4 program and
`online user:
`Graphics function modules with dialog parameters
`(Parameters STAT, M_TYP, PWDID, SUPER, WINID and RWNID)
`Graphics function modules with dialog parameters
`(Parameters STAT, PWDID, SUPER, and WINID)
`plus utility function modules ¯
`GRAPH_RECEIVE (with dialog parameters ACTIVATE_RAISE, ERRORCODE, MCODE,
`and RWNID)
`GET xxxx PARAM
`For new programs, you should use only the second mechanism, graphics function modules with the
`utility function modules.
`Note
`Do not use both mechanisms together in a program.
`For more information, see .l~!a!o ..P.ro..rarn.m.!n.
`
`SAP-00004767
`
`
`
`The GRAPH 2D Function Module
`
`The GRAPH_2D function module calls the SAP Business Graphics program. You send it a list of
`values, which are displayed in two-dimensional view.
`The following table contains a list of all possible parameters you can use with this function module.
`Of this list, only the DATA table parameter is required.
`Parameters used with GRAPH 2D
`Name
`Status
`
`Initial Value
`
`SPACE
`SPACE
`SPACE
`SPACE
`SPACE
`SPACE
`(Do NotUse)
`SPACE
`SPACE
`SPACE
`SPACE
`SPACE
`SPACE
`’50’
`’50’
`(Do NotUse)
`
`INBUF **
`INFORM
`MAI L_ALLOW
`PWDID **
`STAT **
`SUPER **
`TIMER
`TITL
`TYPE
`VALT
`WDID
`WINID **
`WINPOS
`WINSZX
`WINSZY
`X_OPT
`B_KEY
`B_TYP
`M_TYP **
`MOD_COL
`MOD_ROW
`MOD_VAL
`RBUFF **
`RWNID **
`DATA
`
`Import
`Import
`Import
`Import
`Import
`Import
`Import
`Import
`Import
`Import
`Import
`Import
`Import
`Import
`Import
`Import
`Export
`Export
`Export
`Export
`Export
`Export
`Export
`Export
`Internal Table
`
`Note: ** denotes a dialog parameter
`
`SAP-00004768
`
`
`
`The GRAPH 3D Function Module
`
`The GRAPH_3D function module calls the SAP Business Graphics program. You send it a table of
`values, which are displayed in three-dimensional view.
`The following table contains a list of all possible parameters you can use with this function module.
`Of this list, only the DATA table parameter is required.
`Parameters used with GRAPH 3D
`Name
`Status
`
`Initial Value
`
`SPACE
`SPACE
`SPACE
`SPACE
`SPACE
`SPACE
`SPACE
`(Do Not Use)
`SPACE
`SPACE
`SPACE
`SPACE
`SPACE
`SPACE
`’50’
`’50’
`(Do Not Use)
`
`DIM1 ,DIM2
`INBUF **
`IN FORM
`MAIL_ALLOW
`PWDID **
`STAT **
`SUPER **
`TIMER
`TITL
`TYPE
`VALT
`WDID
`WINID **
`WINPOS
`WINSZX
`WINSZY
`X_OPT
`
`B_KEY
`B_TYP
`M_TYP **
`
`Import
`Import
`Import
`Import
`Import
`Import
`Import
`Import
`Import
`Import
`Import
`Import
`Import
`Import
`Import
`Import
`Import
`
`Export
`Export
`Export
`
`Note: ** denotes a dialog parameter
`MOD_COL
`Export
`Export
`MOD_ROW
`Export
`MOD_VAL
`RBUFF **
`Export
`RWNID **
`Export
`
`DATA
`
`Internal Table
`
`Note: ** denotes a dialog parameter
`
`GRAPH_3D provides the means to name individual rows in a graph (the DATA parameter), but not
`individual columns. Parameters DIM1 and DIM2 are available for naming the row and column axes,
`but if this is not enough, use the GRAPH_MATRIX_3D function module.
`
`SAP-00004769
`
`
`
`The GRAPH MATRIX 2D Function Module
`
`The GRAPH_MATRIX_2D function module calls SAP Business Graphics and generates a
`two-dimensional view of your data. You can send a full table of values, and further parameters
`telling which part of the table to display.
`The following table contains a list of all possible parameters you can use with this function module.
`Parameters used with GRAPH MATRIX 2D
`Name
`Status
`
`Initial Value
`
`SPACE
`SPACE
`SPACE
`SPACE
`SPACE
`SPACE
`SPACE
`SPACE
`(Do Not Use)
`SPACE
`SPACE
`SPACE
`SPACE
`SPACE
`’50’
`’50’
`(Do Not Use)
`
`INBUF **
`IN FORM
`MAIL_ALLOW
`NCOL
`NROW
`PWDID **
`STAT **
`SUPER **
`TIMER
`TITL
`VALT
`WDID
`WINID **
`WINPOS
`WINSZX
`WINSZY
`X_OPT
`
`B_KEY
`B_TYP
`M_TYP **
`
`Import
`Import
`Import
`Import
`Import
`Import
`Import
`Import
`Import
`Import
`Import
`Import
`Import
`Import
`Import
`Import
`Import
`
`Export
`Export
`Export
`
`Note: ** denotes a dialog parameter
`Export
`MOD_COL
`MOD_ROW
`Export
`Export
`MOD_VAL
`Export
`RBUFF **
`RWNID **
`Export
`
`DATA
`OPTS
`TCOL
`
`Internal Table
`Internal Table
`Internal Table
`
`Note: ** denotes a dialog parameter
`
`Of the above list, only the DATA, OPTS and TCOL parameters are required.
`
`SAP-00004770
`
`
`
`The GRAPH MATRIX 3D Function Module
`
`The GRAPH_MATRIX_3D function module calls SAP Business Graphics with data for display in a
`three-dimensional graph. You can send a full table of values, and further parameters telling which
`part of the table to display.
`The following table contains a list of all possible parameters you can use with this function module.
`Parameters used with GRAPH MATRIX 3D
`Name
`Status
`
`Intial Value
`
`SPACE
`SPACE
`SPACE
`SPACE
`SPACE
`SPACE
`SPACE
`SPACE
`(Do Not Use)
`SPACE
`SPACE
`SPACE
`SPACE
`SPACE
`’50’
`’50’
`(Do Not Use)
`
`(continued)
`
`COL1,COL2,...COL6 Import
`DIM1 ,DIM2
`Import
`Import
`INBUF **
`Import
`IN FORM
`Import
`MAIL_ALLOW
`PWDID **
`Import
`STAT **
`Import
`Import
`SUPER **
`TIMER
`Import
`TITL
`Import
`VALT
`Import
`Import
`WDID
`WINID **
`Import
`WINPOS
`Import
`WINSZX
`Import
`Import
`WINSZY
`Import
`X_OPT
`
`B_KEY
`B_TYP
`M_TYP **
`MOD_COL
`MOD_ROW
`
`Export
`Export
`Export
`Export
`Export
`
`Note: ** denotes a dialog parameter
`
`MOD_VAL
`RBUFF **
`RWNID **
`
`DATA
`OPTS
`
`Export
`Export
`Export
`
`Internal Table
`Internal Table
`
`Note: ** denotes a dialog parameter
`
`Of the above list, only the DATA, OPTS and at least one of the COLn (COL1, COL2 ..... COL6)
`parameters are required.
`
`SAP-00004771
`
`
`
`The GRAPH MATRIX 4D Function Module
`
`The GRAPH_MATRIX_4D function module calls SAP Business Graphics with "four-dimensional"
`data for display in a graph. This four-dimensional graph is actually a series of three-dimensional
`graphs you can page through on the screen. Each 3D graph is identified by page, and the elements
`in it are identified by row and column.
`The chief parameter (DATA) is a table of values, and further parameters tell which part of the table
`to display. You can use other parameters to set display options.
`The following table contains a list of all possible parameters you can use with this function module.
`Parameters used with GRAPH MATRIX 4D
`Name
`Status
`
`Inital Value
`
`SPACE
`SPACE
`SPACE
`SPACE
`SPACE
`SPACE
`SPACE
`SPACE
`SPACE
`(Do Not
`SPACE
`SPACE
`SPACE
`SPACE
`SPACE
`’50’
`
`Use)
`
`(continued)
`
`’50’
`(Do Not Use)
`
`DIM1 ,DIM2,DIM3
`DIM1_1 ...DIM1_6
`DIM2_1 ...DIM2_6
`INBUF **
`IN FORM
`MAIL_ALLOW
`PWDID **
`STAT **
`SUPER **
`TIMER
`TITL
`VALT
`WDID
`WINID **
`WINPOS
`WINSZX
`
`Import
`Import
`Import
`Import
`Import
`Import
`Import
`Import
`Import
`Import
`Import
`Import
`Import
`Import
`Import
`Import
`
`Note: ** denotes a dialog parameter
`
`WINSZY
`X_OPT
`
`B_KEY
`B_TYP
`M_TYP **
`MOD_COL
`MOD_ROW
`MOD_VAL
`RBUFF **
`RWNID **
`
`Import
`Import
`
`Export
`Export
`Export
`Export
`Export
`Export
`Export
`Export
`
`SAP-00004772
`
`
`
`DATA
`OPTS
`
`Internal Table
`Internal Table
`
`Note: ** denotes a dialog parameter
`
`Of the above list, the DATA, OPTS, at least one of the DIM1_1 ...DIM1_6 parameters are required
`and at least one of the DIM2_1 ...DIM2_6 parameters are required.
`
`SAP-00004773
`
`
`
`The GRAPH MATRIX Function Module
`
`The GRAPH_MATRIX function module is the most general-purpose of the SAP Business Graphics
`function modules.
`With this module, you can send data in the same "four-dimensional" format described for
`GRAPH_MATRIX_4D. A graph of four-dimensional data is actually a series of three-dimensional
`graphs you can page through on the screen. Each 3D graph is identified by page, and the elements
`in it are identified by row and column.
`The chief parameter (DATA) is a table of values, and further parameters tell which part of the table
`to display. You can use other parameters to set display options.
`The following table contains a list of all possible parameters you can use with this function module.
`Parameters used with GRAPH MATRIX
`Name
`Status
`
`Initial Value
`
`SPACE
`SPACE
`SPACE
`SPACE
`SPACE
`SPACE
`Do Not Use
`SPACE
`SPACE
`(Do Not Use)
`SPACE
`SPACE
`SPACE
`SPACE
`
`(Continued)
`SPACE
`’50’
`’50’
`(Do Not Use)
`
`Import
`DIM1 ,DIM2,DIM3
`Import
`INBUF **
`Import
`IN FORM
`Import
`MAIL_ALLOW
`MAX1 ,MAX2,MAX3 Import
`PWDID **
`Import
`Import
`SET_FOCUS
`Import
`STAT **
`Import
`SUPER **
`TIMER
`Import
`Import
`TITL
`Import
`VALT
`Import
`WDID
`WINID **
`Import
`
`WINPOS
`WINSZX
`WINSZY
`X_OPT
`
`B_KEY
`B_TYP
`
`M_TYP **
`MOD_COL
`MOD_ROW
`MOD_VAL
`RBUFF **
`
`RWNID **
`
`Import
`Import
`Import
`Import
`
`Export
`Export
`
`Export
`Export
`Export
`Export
`Export
`
`Export
`
`SAP-00004774
`
`
`
`Internal Table
`DATA
`Internal Table
`OPTS
`TDIM1 ,TDIM2,TDIM3 Internal Table
`
`Note: ** denotes a dialog parameter
`
`Of the above list, the DATA, OPTS, TDIM1, TDIM2, and TDIM3 parameters are required.
`
`SAP-00004775
`
`
`
`KThe GRAPH BUSG MENU SET Function Module
`
`The GRAPH_BUSG_MENU_SET function module is a special-purpose routine that lets you define
`a graphics toolbox. A toolbox is a row of buttons that appears in the business graphics window with
`specified labels. The user can click on a toolbox button, and SAP Business Graphics reports the
`selection back to the ABAP/4 program.
`An ABAP/4 program must call GRAPH_BUSG_MENU_SET before calling the function module for
`which the toolbox is to be defined. GRAPH_BUSG_MENU_SET itself does not open a graphics
`window; it merely records the toolbox information in static storage. The next SAP Business
`Graphics function module you call (that opens a window or triggers a screen update) will find this
`information and display toolbox buttons in the window.
`You can only use GRAPH_BUSG_MENU_SET to place buttons in a single window. If you want in
`other BUSG windows (existing or not yet opened), you must call GRAPH_BUSG_MENU_SET
`again.
`To call GRAPH_BUSG_MENU_SET, your program provides a single table parameter containing
`labels for the toolbox buttons. If the online user clicks on one of these buttons, the function module
`reports this to the ABAP/4 program in the B_TYP and B_KEY parameters. (B_TYP=’C’ and B_KEY
`contains the index (in MENU_TAB) for the button pressed.)
`You cannot use GRAPH_BUSG_MENU_SET to wait for input: the STAT parameter is not allowed
`with this function module.
`The following table contains a list of all possible parameters you can use with this function module.
`Parameters used with GRAPH MATRIX
`Name
`Status
`
`Initial Value
`
`MENU TAB
`
`Internal Table
`
`SAP-00004776
`
`
`
`The GET BUSG PARAM Function Module
`
`i
`
`i
`
`The GET_BUSG_PARAM function module calls SAP Business Graphics to get export parameters
`set to their proper values. Use GET_BUSG_PARAM when the ABAP/4 program has received
`return values of MCOD E=’I’ and RWNID=’BUSGn’. See .T.he....G.R...A..P...H....IR.E..C.E.J..V.EEun..c..ti.Qn...Mo.d.u.te.
`for more information.
`The following figure contains a list of the parameters you can use with this function module.
`Parameters used with GET BUSG PARAM
`i
`i
`Name
`Status
`Initial Value
`
`B_KEY
`B_TYP
`CUA_ID
`MOD_COL
`MOD_ROW
`MOD_VAL
`
`Export
`Export
`Export
`Export
`Export
`Export
`
`SAP-00004777
`
`
`
`KParameter Description
`
`Many of the parameters described below refer to menu options available to the online user in SAP
`Business Graphics. Sending these parameters to the function module allows the ABAP/4 program
`to control how the graph looks when it appears on the screen.
`Setting these parameters however only affects the initial appearance of the graph. Once the
`window has opened, the online user can reset all the options using the menu options.
`For a discussion of each menu option and how to use it, see SAP Graphics: User’s Guide.
`B KEY
`The B_KEY parameter returns the name of the key pressed when the user enters any keyboard
`input other than the Enter-key.
`This parameter is only meaningful if the B_TYP parameter contains the value ’K’.
`B TYP
`This parameter tells the type of message received by the waiting function module from the
`graphics module. The ABAP/4 program can use the contents of B_TYP to determine what kind
`of input the user entered. Possible values are:
`’E’ The user pressed the Enter-key on the keyboard.
`’K’ The user pressed a key other than Enter on the keyboard. (B_KEY contains the key).
`’C’ The user clicked on a toolbar button. (B_KEY provides the index for the in MENU_TAB.)
`’S’ The user selected an item in the graph. (MOD_ROW and MOD_COL identify the item).
`’M’The user modified the value of a graph item. (MOD_ROW and MOD_COL identity the item;
`MOD_VAL gives the new value).
`COL1, COL2, COL3, COL4, COL5, COL6 [GRAPH_MATRIX_3D only]
`These parameters perform two functions:
`¯ They contain text strings for labelling columns.
`¯ They tell whether a particular column is to be displayed or not.
`A column of data is not displayed if the corresponding COLn field is either not included in the
`call to the function module, or is included but contains an empty string.
`Thus any given COLn parameter is optional. However, you must include at least one of them to
`get any display at all.
`DATA [GRAPH_2D only]
`The DATA table provides the function module with the data for the graph. Each row in the table
`has two fields:
`¯ Data text: to label the given data value in the graph. This field is a string of any length.
`¯ Data value: a numeric value to be represented in the graph. This field can be of type P or
`F.
`DATA may contain at most 32 rows.
`DATA [GRAPH_3D only]
`The DATA table provides the function module with the data for the graph. Each row in the table
`has the following fields:
`¯ Data text: to label the given data values in the graph. This field is a string of any length.
`
`SAP-00004778
`
`
`
`¯ Up to six data values: the numeric values to be represented in the graph. These fields can
`be of type P or F.
`DATA may contain at most 32 rows.
`DATA [GRAPH_MATRIX_2D only]
`The DATA table provides the function module with the data for the graph. Each row in the table
`has the following fields:
`¯ Data text: a label for this row of data values in the graph. This field is a character string of
`any length.
`¯ Up to 9 data values: the numeric values to be represented in the graph. These fields can be
`of type P or F.
`Every row in DATA must contain the same number of data values, since these values form the
`columns of the graph. There can be no more than 32 rows in the table.
`You choose which row or column you want to display using the NROW or NCOL parameters.
`DATA [GRAPH_MATRIX_3D only]
`The DATA table provides the function module with the data for the graph. Each row in the table
`has the following fields:
`¯ Data text: a label for this row of data values in the graph. This field is a character string of
`any length.
`¯ Any number of data values: the numeric values to be represented in the graph. These
`fields can be of type P or F.
`GRAPH_MATRIX_3D can only display six columns of data in a graph. You can, however,
`include more than six numeric values in a DATA row. If you do, only the first six will be
`interpreted as belonging to this row.
`This allows ABAP/4 programs to send the same table to both GRAPH_MATRIX_3D and
`GRAPH_MATRIX_4D. In the latter, all values after the first six in a row are interpreted as
`successive columns in a page of data. (See the DATA description for GRAPH_MATRIX_4D).
`Every row in DATA must contain the same number of data values, since these values form the
`columns of the graph. There can be no more than 32 rows in the table.
`You choose which columns you want to display using the COLn parameters.
`DATA [GRAPH_MATRIX_4D only]
`The DATA table provides the function module with the data for the graph.
`DATA has a different structure for GRAPH MATRIX 4D than it does for the 2D and 3D function
`modules. It is also different from the DATA structure described used for GRAPH MATRIX.
`Each row in the DATA table represents a page of the graph: all the rows and columns depicted
`on that page. Thus, each row in DATA contains the following fields:
`Data text: a label for the items in this DATA row. This text gives the name of an individual
`page in the graph. This field is a character string of any length.
`Up to 36 data values: the numeric values to be represented. All the numeric values in this
`DATA row belong to a single page in the graph. These fields can be of type P or F.
`This is the layout of the DATA parameter for GRAPH_MATRIX_4D, labelling where the rows,
`columns and pages of the graph occur in the rows and columns of the table:
`
`Page1 ~ 111...611 121...621 ~ 161...661
`Page2 112...612 122...622 162...662
`
`SAP-00004779
`
`
`
`Page3
`Page4
`
`TEXT 113... 613
`TEXT 114... 614
`
`123...623
`124...624
`
`... 163...663
`... 164...664
`
`Each three-digit number in the diagram gives the xyz coordinates of the element in the graph.
`The dimensions of the graph are as follows:
`x = row number (6)
`(Dimension 1)
`y = column number
`(1 ..6) (Dimension 2)
`z = page number (1 ..32)
`(Dimension 3)
`The maximum dimensions of the graph are thus 6x6x32. Other requirements on the structure of
`the DATA table are:
`¯ You need not provide all 6 graph columns (dimension 2).
`¯
`If you provide a graph column, you must provide all six row values (dimension 1) for that
`column.
`¯ You need not provide all 32 graph pages (dimension 3)
`These requirements for DATA do not mean you must display all elements of DATA in the graph.
`You can use the parameters DIM1_1 ..... DIM1_6, and DIM2_1 ..... DIM2_6 to tell the function
`module which rows (dimension 1) and columns (dimension 2) you want to display. However, you
`cannot choose pages (dimension 3) in this way: SAP Business Graphics graphs every page in
`the DATA parameter.
`DATA [GRAPH_MATRIX only]
`The DATA table provides the function module with the data for the graph.
`DATA has a different structure than for any of the other SAP Business Graphics function
`modules. For GRAPH_MATRIX, DATA is a large one-dimensional table. Values in this table
`vary first by row number, then by column number, and lastly by page number.
`For example, suppose the input contains 4 rows, 5 columns and 6 pages. The data values,
`identified below by the coordinates (Page, Column, Row), would occur in the following order:
`(1,1,1)
`
`(1,1,4)
`(1,2,1)
`
`(1,2,4)
`
`(1,5,4)
`
`(6,5,4)
`Note that this (Page, Column, Row) representation is different from the one given in the DATA
`table for GRAPH_MATRIX_4D. In that table, the coordinates are given in (Row, Column, Page)
`order.
`DIM1, DIM2 [GRAPH_3D only]
`The DIM1 parameter gives the name of the rows as a set. This name is used to label the row
`axis of the 3D graph. Names of individual rows are given in the data text fields in each element
`of the DATA parameter.
`The DIM2 parameter gives the name of the columns as a set. This name is used to label the
`
`SAP-00004780
`
`
`
`column axis of the 3D graph. You cannot give the names of individual columns.
`DIM1, DIM2 [GRAPH_MATRIX_3D only]
`The DIM1 parameter gives the collective name for the rows as a set. This name is used to label
`the row axis of the 3D graph. Names of individual rows are given in the data text fields in each
`element of the DATA parameter.
`The DIM2 parameter gives the collective name for the columns as a set. This name is used to
`label the column axis of the 3D graph. Names of individual columns are given in the COLn
`parameters.
`Both DIM1 and DIM2 are optional parameters.
`DIM1, DIM2, DIM3 [GRAPH_MATRIX_4D only]
`These three parameters provide the heading text for the rows, columns and pages in the DATA
`table. DIM1 is the name of the rows, DIM2 of the columns, and DIM3 of the pages.
`Individual rows, columns or pages are named by the DIM1_1 ....DIM1_6 and DIM2_1 ....DIM2_6
`parameters.
`DIM1, DIM2, DIM3 [GRAPH_MATRIX only]
`These three parameters provide the heading text for the rows, columns and pages in the DATA
`table. DIM1 is the name of the rows, DIM2 of the columns, and DIM3 of the pages.
`Individual rows, columns or pages are named using the TDIM1, TDIM2 and TDIM3 parameters.
`DIM1_1, DIM1_2, DIM1_3, DIM1_4, DIM1_5, DIM1_6
`DIM2_1, DIM2_2, DIM2_3, DIM2_4, DIM2_5, DIM2_6 [GRAPH_MATRIX_4D only]
`These parameters provide the names of individual rows (DIMI_n) and columns (DIM2_n). They
`serve a second function by telling which parts of DATA to display in the graph. If you don’t use
`one of these parameters, or if you use it with a value of SPACE, the corresponding row or
`column is not displayed.
`INBUF
`The INBUF parameter is an older parameter that is no longer needed. Do not use it for new
`programs.
`"How the ABAP/4 program should handle return parameters" in .D..i.a.!..o.q..P..r..o._. r..a..m....m..Ln., explains
`current requirements.
`INFORM
`The INFORM parameter tells the function module whether to accept input from the online user
`and inform the ABAP/4 program about it. This input can take three forms:
`¯ pressing keyboard keys
`¯ selecting (clicking on) an object in the graph
`¯ modifying numerical values for graph objects, either by using the mouse to expand the
`object’s size, or by entering an exact value in the modification window.
`For SAP Business Graphics, INFORM can have values ’1’ to ’7’, depending on which user input
`the function module should report on:
`’1’
`Keyboard input
`Selection of a graph object
`’2’
`Keyboard and selection
`’3’
`Modifications to numerical values
`’4’
`Keyboard and modification
`’5’
`Selection and modification
`’6’
`All three
`’7’
`
`SAP-00004781
`
`
`
`For each of these values, the function module reports these events. If INFORM is any other
`value, the function module does not report them, regardless of whether the online user makes
`the actions or not.
`The relevant function modules report this activity using the B_TYP (values ’C’,’S’, ’M’ only),
`B_KEY, MOD_ROW, MOD_COL, and MOD_VAL parameters.
`For more information on programming interactive graphics, see .~,m,m)~,n.g
`MAIL ALLOW
`i
`This parameter tells the graphics program to allow the user to send office mail. The mail option
`is offered in the Graphic menu and must be enabled by the calling ABAP/4 program. The value
`’X’ enables the mail option; any other value disables it.
`MAX1, MAX2, MAX3 [GRAPH_MATRIX only]
`These parameters tell the total number of rows (MAX1), columns (MAX2), and pages (MAX3) in
`the data. All three parameters are optional.
`Using MAX1, MAX2, MAX3 allows you to fill in fewer entries in the TDIM1, TDIM2, TDIM3
`tables, if you want. Not using MAX1, MAX2, MAX3 means you must fully fill the TDIM1, TDIM2,
`TDIM3 parameters. See the topic on the TDIM1, TDIM2, TDIM3 parameters, later in this section
`for more information.
`M TYP
`i
`This is a dialog parameter which should not be used with the graphics function module in new
`programs.
`In existing programs, the graphics function module uses the M_TYP parameter to report
`messages from the graphics program back to the ABAP/4 program.
`If a program allowed the online user to open multiple windows, select graph objects or enter
`keyboard input, you may have needed to use this parameter.
`For more information, see "Dialog Programming Using The Dialog Parameters" in
`
`In new programs, you should use the utility function modules. Instead of using M_TYP, set the
`MCODE parameter in GRAPH_RECEIVE. For more information, see The GRAPH RECEIVE
`..F..u..n..c.tj..Q..n..M.o...d..u.Le..
`MENU_TAB [GRAPH_BUSG_MENU_SET only]
`This table is a single-column table of text labels for toolbox buttons. A button is created in the
`graphics window for each MENU_TAB entry. MENU_TAB entries may be up to 80 characters in
`length.
`(If needed, you can pass a multi-column table. In this case, the first field must be the one that
`provides text labels.)
`MOD_ROW, MOD_COL
`These parameters have valid data in them only if the B_TYP parameter contains ’S’ or ’M’. Each
`parameter identifies the row number (MOD_ROW) or column number (MOD_COL) for the graph
`item selected or modified by the user.
`MOD_ROW must be a valid row number: greater than zero and no greater than the number of
`rows in the DATA table.
`MOD_COL must be a valid column number: greater than zero and no greater than the number
`of columns in the DATA table. (The number of columns is the number of numerical values in a
`DATA row.)
`SAP delivers two demonstration programs (GRBUSG_M and GRBUSGM3) with the SAP
`
`SAP-00004782
`
`
`
`System. You can use these programs as examples, if desired.
`MOD VAL
`The MOD_VAL parameter has valid data in it only if the B_TYP parameter contains ’M’. In this
`case, MOD_VAL gives the new value that the user entered for the selected graph item.
`MOD_ROW and MOD_COL identify the row and column number for the graph item modified.
`NCOL, NROW [GRAPH_MATRIX_2D only]
`See NROW, NCOL parameters.
`NROW, NCOL [GRAPH_MATRIX_2D only]
`The NROW parameter identifies the row of the DATA table that you want displayed. The value
`in NROW must be a valid row number: greater than zero and no greater than the number of
`rows in the table.
`The NCOL parameter identifies the column of the DATA table that you want displayed. The
`value in NCOL must be a valid column number: greater than zero and no greater than the
`number of columns in the DATA table. The number of columns is the number of numerical
`values in a DATA row.
`NCOL may not be larger than nine, no matter how many columns you have in DATA.
`GRAPH_MATRIX_2D can only display single rows or columns. If you use both NCOL and
`NROWtogether, NCOL will be used, and NROW ignored. If you use neither, the first column of
`the table is displayed by default.
`OPTS
`This parameter