SAP Tutorials Blog

 

 


 

REPORT  ysap_selectionscreen_window.



TABLES: pa0002.


DATA: BEGIN OF stru,

      pernr TYPE pa0002-pernr,

      vorna TYPE pa0002-vorna,

      nachn TYPE pa0002-nachn,

      END OF stru.


DATA: itab LIKE TABLE OF stru  WITH HEADER LINE.

*      wa like stru.


DATA: BEGIN OF icols OCCURS 0.

        INCLUDE STRUCTURE help_value.

DATA: END OF icols.



icols-tabname = 'PA0002'.

icols-fieldname = 'PERNR'.

icols-selectflag = 'X'.

APPEND icols.

icols-tabname = 'PA0002'.

icols-fieldname = 'VORNA'.

APPEND icols.

icols-tabname = 'PA0002'.

icols-fieldname = 'NACHN'.

APPEND icols.


SELECTION-SCREEN BEGIN OF SCREEN 100.


SELECT-OPTIONS: pernr FOR pa0002-pernr.


SELECTION-SCREEN END OF SCREEN 100.


CALL SELECTION-SCREEN 100 STARTING AT 5 20 ENDING AT 50 20.


SELECT * FROM pa0002   WHERE pernr IN pernr.


  MOVE-CORRESPONDING pa0002 TO itab.


  APPEND itab.


ENDSELECT.


LOOP AT itab." into wa.


  CALL FUNCTION 'MD_POPUP_SHOW_INTERNAL_TABLE'

    EXPORTING

      title         = 'SAP'

* IMPORTING

*   INDEX         =

    TABLES

      values        = itab

      columns       = icols

   EXCEPTIONS

     leave         = 1

     OTHERS        = 2

            .

  IF sy-subrc <> 0.

* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

  ENDIF.


ENDLOOP.



Serkan AKKAVAK

Computer Engineer BSc

SAP Department Manager

Contact : serkurumsal@yandex.com