TYPE-POOLS: SLIS.
TABLES: USR01.
DATA: IT_USR01 TYPE STANDARD TABLE OF USR01 INITIAL SIZE 0,
WA_USR01 TYPE USR01.
*Structure declaration for output
TYPES : BEGIN OF TY_OUTPUT,
BNAME TYPE USR01-BNAME,
CHECKBOX(1),
END OF TY_OUTPUT.
*Internal table and work area declaration for output in pop up
DATA : IT_OUTPUT TYPE TABLE OF TY_OUTPUT INITIAL SIZE 0,
WA_OUTPUT TYPE TY_OUTPUT.
*Internal table and workarea declaration for alv dialog display
DATA : IT_DISPLAY TYPE STANDARD TABLE OF TY_OUTPUT INITIAL SIZE 0,
WA_DISPLAY TYPE TY_OUTPUT.
DATA:LS_FIELDCAT TYPE SLIS_FIELDCAT_ALV,
LT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
LS_FIELDCATLOG TYPE SLIS_FIELDCAT_ALV,
LT_FIELDCATLOG TYPE SLIS_T_FIELDCAT_ALV,
LT_LAYOUT TYPE SLIS_LAYOUT_ALV.
PERFORM POPUP_DISPLAY.
*&---------------------------------------------------------------------*
*& Form POPUP_DISPLAY
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
FORM POPUP_DISPLAY .
IF IT_USR01 IS INITIAL.
SELECT BNAME INTO TABLE IT_USR01 FROM USR01 .
LOOP AT IT_USR01 INTO WA_USR01.
MOVE-CORRESPONDING WA_USR01 TO WA_OUTPUT.
APPEND WA_OUTPUT TO IT_OUTPUT.
CLEAR WA_OUTPUT.
ENDLOOP.
CLEAR LS_FIELDCAT.
LS_FIELDCAT-ROW_POS = '1'.
LS_FIELDCAT-COL_POS = '1'.
LS_FIELDCAT-FIELDNAME = 'CHECKBOX'.
LS_FIELDCAT-TABNAME = 'IT_OUTPUT'.
LS_FIELDCAT-SELTEXT_M = 'SEÇ'.
APPEND LS_FIELDCAT TO LT_FIELDCAT.
CLEAR LS_FIELDCAT.
LS_FIELDCAT-ROW_POS = '1'.
LS_FIELDCAT-COL_POS = '2'.
LS_FIELDCAT-FIELDNAME = 'BNAME'.
LS_FIELDCAT-TABNAME = 'IT_OUTPUT'.
LS_FIELDCAT-SELTEXT_M = 'KULLANICI'.
LS_FIELDCAT-OUTPUTLEN = 50.
APPEND LS_FIELDCAT TO LT_FIELDCAT.
ENDIF.
* Display data in a POPUP
CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'
EXPORTING
I_ZEBRA = 'X'
IT_FIELDCAT = LT_FIELDCAT
I_TABNAME = 'IT_OUTPUT'
I_CHECKBOX_FIELDNAME = 'CHECKBOX'
TABLES
T_OUTTAB = IT_OUTPUT.
*Appending the selected infotypes only to internal table
LOOP AT IT_OUTPUT INTO WA_OUTPUT
WHERE CHECKBOX = 'X'.
*Do something here...
ENDLOOP.
ENDFORM.
10 Ağustos 2011 Çarşamba
SAP/ABAP: REUSE_ALV_POPUP_TO_SELECT
Kaydol:
Kayıt Yorumları (Atom)
İnsdroid
Sabahtan beri çatada çutada çatada çutada… Bitmedi yine de… Neyse, yolumuz uzun, toparlıyorum çantamı, adaptörü falan tıkıştırıyorum bir şe...
-
Why do we need to change status of a request? Let's imagine, you have a workbench request and you already relased linked task in it....
-
Metasploitable is a kind of vulnerable Linux virtual machine image for penetration testing. It is Debian 32bit based operation system, and r...
-
* DATA : * ls_object_identity TYPE borident , * lo_gos TYPE REF TO cl_gos_document_service . * ls_object_identi...
Hiç yorum yok:
Yorum Gönder