SAP Function POPUP_GET_VALUES_USER_BUTTONS - Dialog box for requesting values and offering user pushbuttons

Parameter Reference Type Length Default Optional Text
F1_FORMNAME 0 SPACE X Name of the external subroutine for F1 help
F1_PROGRAMNAME TRDIR-NAME C 40 SPACE X Name of the module pool from F1_FORMNAME
F4_FORMNAME 0 SPACE X Name of the external subroutine for F4 help
F4_PROGRAMNAME TRDIR-NAME C 40 SPACE X Name of the module pool from F4_FORMNAME
FIRST_PUSHBUTTON SVALBUTTON-BUTTONTEXT C 20 SPACE X Text of the first additional pushbutton
FORMNAME 0 Name of the external subroutine for processing
ICON_BUTTON_1 ICON-NAME C 30 X
ICON_BUTTON_2 ICON-NAME C 30 X
ICON_OK_PUSH ICON-NAME C 30 X
NO_CHECK_FOR_FIXED_VALUES 0 SPACE X Flag: Deactivate check on fixed values (X)
OK_PUSHBUTTONTEXT SVALBUTTON-BUTTONTEXT C 20 Standard pushbutton text
POPUP_TITLE 0 Text of title line
PROGRAMNAME TRDIR-NAME C 40 Name of the module pool from FORMNAME
QUICKINFO_BUTTON_1 SMP_DYNTXT-TEXT C 40 SPACE X
QUICKINFO_BUTTON_2 SMP_DYNTXT-TEXT C 40 SPACE X
QUICKINFO_OK_PUSH SMP_DYNTXT-TEXT C 40 SPACE X
SECOND_PUSHBUTTON SVALBUTTON-BUTTONTEXT C 20 SPACE X Text of the second additional pushbutton
START_COLUMN 0 '5' X Start column of the dialog box
START_ROW 0 '5' X Start line of the dialog box

Parameter Reference Type Length Text
RETURNCODE 0 User response

Parameter Reference Length Optional Text
FIELDS SVAL 278 Table fields, values and attributes

Exception Text
ERROR_IN_FIELDS FIELDS were transferred incorrectly


INCLUDE 'DOCU_HAS_TO_BE_ELABORATED' OBJECT DOKU ID TX
Functions
INCLUDE 'POPUP_GET_VALUES_BASE' OBJECT DOKU ID TX
As well as the standard pushbutton, you can choose to offer one or twoadditional pushbuttons.
The user input is sent to an external subroutine (user exit), which mustbe specified in the interface of this function module. The interface ofthis subroutine must contain the following:
  • the table FIELDS

  • the OkCode (to distinguish which pushbutton was pressed)

  • an error structure

  • a flag which indicates whether the dialog box should be closed
  • after leaving the sub-routine. X
    The external sub-routine analyzes the OkCodes and executes theappropriate functions. The error structure contains an error message ifan error occurs.
    The function module carries out the following tasks:
    analyzes the flag and the error message
    ends the processing
    sends the dialog box again, with or without an error message
    offers the fields for input again
    RESET N1
    It is also possible to specify user exits for the F1 and F4 help, if thestandard F1 and F4 help are not to be displayed.
    The function modules can be used:
    • to capture values which are not to be checked simply against the
    • database,
      • to capture values for copying objects,

      • to support prototyping,

      • Examples
        The program RSSPO450 contains an example.
        Notes
        • The user exits can contain any processing. In particular, the dialog
        • boxes for this function group can be called.
          INCLUDE 'POPUP_GET_VALUES_NOTES_02' OBJECT DOKU ID TX
          The user action is returned in the parameter. Theparameter can take the following values:
          • " " (Space)

          • The user wants to perform the action, the user exit did notreturn errors, FIELDS contains the input values
            • "A"

            • The user has cancelled the action, FIELDS contains theoriginal values
              The parameter must contain the name of the external subroutine forF1 help unless the standard F1 help is to be displayed. The formroutine must be defined as follows:
              FORM USING TABNAME FIELDNAME.
              * Display F1 help for field TABNAME-FIELDNAME
              ENDFORM.
              The parameter must contain the name of the program or module poolwhere the form routine F1_FORMNAME defined unless the standardF1 help is to be displayed.
              The parameter must contain the name of the external subroutine for F4help unless the standard F4 help is to be displayed. The form routinemust be defined as follows:
              FORM USING TABNAME FIELDNAME DISPLAY
              CHANGING RETURNCODE VALUE.
              * Display F4 help for field TABNAME-FIELDNAME
              * If DISPLAY is passed on with 'X', the values may not be displayed
              * but can only be displayed, for example, for the F4 help of
              * non-input fields.
              * In the field RETURNCODE specify whether the user has canceled the
              * action ('A') or selected a field (SPACE).
              * The selected value must be passed in the field VALUE.
              ENDFORM.
              The parameter must contain the name of the program or module poolin which the form routine F4_FORMNAME is defined unless the standardF4 help is to be displayed.
              The field must contain the text of the second additional pushbutton. Upto 10 characters are available. If no text is passed on, no secondpushbutton is displayed.
              The form routine is used to handle OK-codes. FORMNAME contains thename of the external subroutine (user exit) called up when the eventPAI occurs after the values entered have been passed on.The form routine must be defined as follows:
              FORM TABLES FIELDS STRUCTURE SVAL
              USING OK_CODE
              CHANGING ERROR STRUCTURE SVALE
              SHOW_POPUP.
              • FIELDS contains the values entered by the user.

              • OK_CODE contains one of the following values:

              • 'FURT'
                The user has pressed the standard pushbutton.
                'COD1'
                The user has pressed the first additional pushbutton.
                'COD2'
                The user has pressed the second additional pushbutton.
                • ERROR must contain the error information after an error.

                • SHOW_POPUP must contain one of the following values:

                • ' ' (space)
                  The dialog box is not displayed after completion of the subroutine. Thefunction module is completed. Any error message that may have beenpassed on is not output.
                  'X'
                  The dialog box is displayed after completion of the subroutine. Thefunction module is not completed.
                  * The coding may look like this:
                  * Taking over the values from FIELDS into internal structures
                  * Evaluating the function code
                  * Processing the internal structure, maybe call other dialog boxes
                  IF error .
                  Handle error
                  ENDIF.
                  ENDFORM.
                  INCLUDE 'SPO_PAR_NO_CHECK_FOR_FIXED_V' OBJECT DOKU ID TX
                  The field must contain the text of the standard pushbuttons.Up to 10 characters are available.
                  Dialog box title line text. It must be translatable (e.g. use numberedtexts).
                  The parameter must contain the name of the program or module poolin which the form routine FORMNAME is defined.
                  The field must contain the text of the first additional pushbutton. Upto 10 characters are are available. If no text is passed on, nopushbutton is provided.
                  Column in which the dialog box starts. Default value 5.
                  Row in which the dialog box starts. Default value 5.
                  The table contains the fields, values and attributes for the layout ofthe dialog box. The fields appear in the sequence that they have in theFIELDS table. One line must be filled for each field in the dialog box:
                  • TABNAME (table name)

                  • The table must be active in the Data Dictionary.
                    • FIELDNAME (name of the field to be displayed)

                    • The field must belong to the table TABNAME. If a field is to appeartwice, the second field must be passed with '*' before the table name(for example, *T001).
                      • VALUE (field value)

                      • VALUE can be assigned a value when the function module is called. Thisvalue is displayed. If the user does not cancel the action, VALUEcontains the value entered by the user.
                        INCLUDE 'FU_POPUP_GET_VALUES_1' OBJECT DOKU ID TX
                        • FIELD_ATTR (field attribute)

                        • The field attribute determines the layout attribute of the field andmust have one of the following values:
                          " " (Space) normal display, ready for input
                          "01" highlighted, ready for input
                          "02" normal display, protected against input
                          "03" highlighted, protected against input
                          "04" field is not displayed
                          • FIELD_OBL (obligatory)

                          • This flag determines whether the field is obligatory and must have oneof the following values:
                            " " (Space) The field is optional
                            "X" The field is obligatory
                            • FIELDTEXT (keyword)

                            • In FIELDTEXT the keyword of the field can be specified if thedictionary keyword is not to be used.
                              • COMP_CODE

                              • The field is not required for this function module.
                                • COMP_TAB

                                • The field is not required for this function module.
                                  • COMP_FIELD

                                  • The field is not required for this function module.
                                    • NOVALUEHLP

                                    • This flag specifies whether the possible entries help button should bedisplayed, and must have one of the following values.
                                      " " = The possible entries help button is always displayed
                                      "X" = The possible entries help button is not displayed