Ansicht
Dokumentation

POPUP_TO_DECIDE_LIST - Dialog box for choosing from a list without diagnosis

POPUP_TO_DECIDE_LIST - Dialog box for choosing from a list without diagnosis

PERFORM Short Reference   CL_GUI_FRONTEND_SERVICES - Frontend Services  
This documentation is copyright by SAP AG.
SAP E-Book

1. Function

Create a Popup to choose among any number of (up to 25) options. The options can appear in the Popup as checkboxes or radio buttons. In the first case you can return several chosen lines, you can specify the maximum allowed number of choices.

The title can be up to 40 characters in length, the options 40 characters and the texts 50 characters.

To ensure that the variable text can be translated :

  • use consecutive numbered texts, so that the translator can tell which texts belong together.
  • do not reuse phrases, make another copy.
  • specify the maximum allowed length.

2. Example calls

A centered Popup allowing the choice of up to two of three possible answers is to be created (Creditor, Material, Account). The third option is to be chosen by default.


DATA: BEGIN OF SPOPLIST OCCURS 15.
INCLUDE STRUCTURE SPOPLI.
DATA: END OF SPOPLIST.
DATA: ANTWORT TYPE C.

SPOPLIST-VAROPTION = 'Creditor'(001).
APPEND SPOPLIST.
SPOPLIST-VAROPTION = 'Material'(002).
APPEND SPOPLIST.
SPOPLIST-VAROPTION = 'Account '(003).
SPOPLIST-SELFLAG = 'X'.

CALL FUNCTION 'POPUP_TO_DECIDE_LIST'
EXPORTING TITEL = 'Possible entra: Order'(a01)
TEXTLINE1 = 'By which criteria'(b01)
TEXTLINE2 = 'should orders'(b02)
TEXTLINE3 = 'be selected?'(b03)
MARK_MAX = 2
MARK_FLAG = 'X'
IMPORTING ANSWER = ANTWORT
TABLES T_SPOPLI = SPOPLIST
EXCEPTIONS TOO_MUCH_ANSWERS = 1
TOO_MUCH_MARKS = 2.

IF SY-SUBRC = 2.
WRITE: 'Too many answers chosen.'.
ENDIF.
IF ANTWORT = 'A'.
WRITE: 'Popup canceled.'.
ELSE.
WRITE: 'Options chosen:'.
LOOP AT SPOPLI WHERE SELFLAG = 'X'.
WRITE /SPOPLI-VAROPTION.
ENDLOOP.
ENDIF.





Parameters

ANSWER
CURSORLINE
DISPLAY_ONLY
MARK_FLAG
MARK_MAX
START_COL
START_ROW
TEXTLINE1
TEXTLINE2
TEXTLINE3
TITEL
T_SPOPLI

Exceptions

NOT_ENOUGH_ANSWERS
TOO_MUCH_ANSWERS
TOO_MUCH_MARKS

Function Group

SPO5

General Material Data   BAL Application Log Documentation  
This documentation is copyright by SAP AG.

Length: 3667 Date: 20240523 Time: 132957     sap01-206 ( 36 ms )