Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Pop-up List

Former Member
0 Kudos

Hi All,

Please, execute the MSC3 tcode,

Input Plant, Batch, (other required fields),

Hit enter..

Click on Classification from the application tool bar

then click on LIST icon, on the bottom-right corner...

it's displaying the LIST in Pop-UP window...

How to get it..

I have tryed in two ways,

1. call screen 9300 starting at 02 03 ending at 89 11.

In this case, WRITE can't work...

2. leave to list-processing and return to screen 9200.

Write works, but no Pop-up........

Please, pass some hint...

Thanks,

KalChand

1 ACCEPTED SOLUTION

Former Member
0 Kudos

You should be able to write a list in a popup dialog screen without problems... there's plenty of SAP examples e.g. in function group KYEP there is a screen 300 which is uses as "blank canvas" to write a list onto... you can also take the approach of using "suppress dialog" in the PBO and write the list in the PAI.

Jonathan

6 REPLIES 6

Former Member
0 Kudos

Try 'REUSE_ALV_POPUP_TO_SELECT' to display data in the popup window.

If you are using OO ABAP, then use CL_GUI_ALV_GRID class to display the data.

Hope this helps.

Thanks,

Balaji

Former Member
0 Kudos

You should be able to write a list in a popup dialog screen without problems... there's plenty of SAP examples e.g. in function group KYEP there is a screen 300 which is uses as "blank canvas" to write a list onto... you can also take the approach of using "suppress dialog" in the PBO and write the list in the PAI.

Jonathan

0 Kudos

hi Jonathan,

I have gone through the function group KYEP, checked the 300 screen.

Is there any report/program which uses this screen/function group, so that, it would be easy to check the values.

Note: Hi others, sorry, I am working with 3.1 ver., I can't use ALV's...

Thanks for your help,

KalChand

0 Kudos

No, sorry - I just picked that at random as an example... The concept is generally the same though i.e. define a dynpro that has no fields and with the dialog window attribute set, and call it with the "starting at / ending at" to get it as a popup... and then either (a) in the PBO leave to list processing and write the list, or (b) my preference is to have the PBO just issue a suppress dialog and do the leave to list processing and write list in the PAI... I general define the user-command and top-of-page event handlers in the "top" include for the function group.

Jonathan

0 Kudos

hi Jonathan,

I have tried as you told,

it's working.

Thanks,

Kal Chand

venkat_o
Active Contributor
0 Kudos

Hi Chand,

Have a look at this sample program to create popup list using ALV.

REPORT  zvenkat_alv_popup.
**********************************************************************
* Declarations.
**********************************************************************
** Types
TYPES:
      BEGIN OF t_p0001,
*        checkbox TYPE c,
        pernr    TYPE p0001-pernr,
        ename    TYPE p0001-ename,
      END OF t_p0001.
** Work Areas
DATA:
     w_p0001 TYPE t_p0001.
* Internal tables
DATA:
     i_p0001 TYPE STANDARD TABLE OF t_p0001.
*&---------------------------------------------------------------------*
* ALV Declarations
*----------------------------------------------------------------------*
* Types Pools
TYPE-POOLS:
slis.
* Types
TYPES:
   t_fieldcat         TYPE slis_fieldcat_alv,
   t_events           TYPE slis_alv_event,
   t_layout           TYPE slis_layout_alv.
* Workareas
DATA:
   w_fieldcat         TYPE t_fieldcat,
   w_events           TYPE t_events,
   w_layout           TYPE t_layout.
* Internal Tables
DATA:
   i_fieldcat         TYPE STANDARD TABLE OF t_fieldcat,
   i_events           TYPE STANDARD TABLE OF t_events.

**********************************************************************
* start-of-selection.
**********************************************************************
START-OF-SELECTION.
  PERFORM get_data.
**********************************************************************
* end-of-selection.
**********************************************************************
END-OF-SELECTION.

  PERFORM display_data.
*&---------------------------------------------------------------------*
*&      Form  get_data
*&---------------------------------------------------------------------*
FORM get_data .

  SELECT pernr ename
    FROM pa0001
    INTO CORRESPONDING FIELDS OF TABLE i_p0001 UP TO 10 ROWS.

ENDFORM.                    " get_data
*&---------------------------------------------------------------------*
*&      Form  display_data
*&---------------------------------------------------------------------*
FORM display_data .

  PERFORM build_fieldcatalog.
  PERFORM display_data_alv.
ENDFORM.                    " display_data
*&---------------------------------------------------------------------*
*&      Form  display_data_alv
*&---------------------------------------------------------------------*
FORM display_data_alv .
  DATA:
        l_program TYPE sy-repid.
  l_program = sy-repid.

  CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'
    EXPORTING
      i_title            = 'XYZ'
      i_tabname          = 'I_P0001'
      it_fieldcat        = i_fieldcat
      i_callback_program = l_program
    TABLES
      t_outtab           = i_p0001.
  IF sy-subrc <>  0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.

ENDFORM.                    " display_data_alv
*&---------------------------------------------------------------------*
*&      Form  build_fieldcatalog
*&---------------------------------------------------------------------*
FORM build_fieldcatalog .

  CLEAR: w_fieldcat,
         i_fieldcat[].
  w_fieldcat-fieldname = 'PERNR'.
  w_fieldcat-tabname   = 'I_P0001'.
  w_fieldcat-seltext_m = 'Emp No'.
  APPEND w_fieldcat TO i_fieldcat.
  CLEAR w_fieldcat.

  w_fieldcat-fieldname = 'ENAME'.
  w_fieldcat-tabname   = 'I_P0001'.
  w_fieldcat-seltext_m = 'Name'.
  APPEND w_fieldcat TO i_fieldcat.
  CLEAR w_fieldcat.
ENDFORM.                    " build_fieldcatalog

Regards,

Venkat.O