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: 

Need Api that can create pop-up with selection

Former Member
0 Kudos

HI All ,

I'm using the follwoing FM POPUP_GET_VALUES to create pop-up for user ,

and i wonder if there is diffrent API that i can use for pop-up

with parameters like multiple selection like we have in SE11 when user want

to add another parameters to his selection .

Regards

Chris

1 ACCEPTED SOLUTION

Clemenss
Active Contributor
0 Kudos

Hi ChrisGW,

if I understand you, free selections is what can do the trick:

CALL FUNCTION 'FREE_SELECTIONS_INIT'
* Display free selection dialog
CALL FUNCTION 'FREE_SELECTIONS_DIALOG'

This is just a hint what to start with, the rest is in SAP (where-used-list), SCN and google.

Regards,

Clemens

9 REPLIES 9

Former Member
0 Kudos

Hi Chris,

You can use REUSE_ALV_POPUP_TO_SELECT.

Regards,

Jovito

0 Kudos

HI dsouzajovito

Thanks but i need pop-up that user can insert data to it like multiple selection and not a output pop-up

Regards

Chris

0 Kudos

Hi,

REUSE_ALV_POPUP_TO_SELECT is used for multiple selections.

Firstly, have a field type c in your output table.

Second, mention this fieldname while calling REUSE_ALV_POPUP_TO_SELECT .

TYPES:  BEGIN OF ty_fields,
          select TYPE c, "Selection Field in output table
          fieldname TYPE slis_fieldcat_alv-fieldname,
        END OF ty_fields

  CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'
        EXPORTING
          i_title              = 'Change Fields'
          i_zebra              = 'X'
          i_checkbox_fieldname = 'SELECT'
          i_tabname            = 'IT_FIELDS'
          it_fieldcat          = it_fieldcat
        TABLES
          t_outtab             = it_fields
        EXCEPTIONS
          program_error        = 1
          OTHERS               = 2.
      IF sy-subrc ne 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.

0 Kudos

Have a look at this sample program.

PROGRAM test.

TYPE-POOLS: slis.
TYPES : BEGIN OF tty_output,
          select TYPE c,
          num TYPE i,
        END OF tty_output.

DATA: it_output TYPE TABLE OF tty_output,
      wa_output TYPE tty_output,
      inum TYPE i VALUE 0,
      it_fieldcat TYPE slis_t_fieldcat_alv,
      wa_fieldcat TYPE slis_fieldcat_alv.

WHILE inum < 10.
  wa_output-num = inum.
  APPEND wa_output TO it_output.
  inum = inum + 1.
ENDWHILE.

wa_fieldcat-fieldname = 'SELECT'.
wa_fieldcat-tabname = 'IT_OUTPUT'.
wa_fieldcat-seltext_m = 'SELECT'.
APPEND wa_fieldcat TO it_fieldcat.
wa_fieldcat-fieldname = 'NUM'.
wa_fieldcat-seltext_m = 'NUMBER'.
APPEND wa_fieldcat TO it_fieldcat.


CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'
  EXPORTING
   i_checkbox_fieldname          = 'SELECT'
    i_tabname                     = 'IT_OUTPUT'
   it_fieldcat                   = it_fieldcat
  TABLES
    t_outtab                      = it_output
 EXCEPTIONS
   program_error                 = 1
   OTHERS                        = 2
          .
IF sy-subrc ne 0.
  MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
          WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.

LOOP AT it_output INTO wa_output WHERE select IS NOT INITIAL.
  WRITE : / wa_output-num.
ENDLOOP.

0 Kudos

HI Dsouzajovito

This is help , thank you !

I can use it but i think that SAP provide an API since when i look at se11 and press F4 in the first line (table line )

i have ALV popup that ask me to put a table .in the right side i have the button ( in yellow ) for multiple selection

which have common template for all the multiple selection ( select single value ,select ranges and exclude )

which FM or method is opened when i press on the yellow button ?

Since its popup its a problem to debug it and find the right API .

Regards

Chris

0 Kudos

There is no API behind standard (selection screen) select-options. Should it be a pop-up window? Or just your regular selection screen select options? Where and how do you want to use this select options? In a report? Hope not the latter one, because that would make this a basic question. Of in a dialog program? For both, there are a lot of posts to be found on SCN.

BTW: SE11 uses these exact select options on the selection screen.

0 Kudos

Hi Chris,

I think what you are looking for is a search help.

Try this [link|http://help.sap.com/saphelp_46c/helpdata/en/cf/21ee2b446011d189700000e8322d00/frameset.htm].

Regards,

Jovito

Former Member
0 Kudos

Hi,

If you want to call the pop up to accept values why dont you create 1 selection screen and call it on perticular event.


selection-screen begin of screen 0111 as window.
  select-options : s_vbeln for vbak-vbeln.
selection-screen end of screen 0111.

MODULE USER_COMMAND_1003 INPUT.
if sy-ucomm = 'POP'.
    call selection-screen 0111 starting at 40 30 ending at 80 40.
endif.
ENDMODULE. 

Thanks,

Anmol.

Clemenss
Active Contributor
0 Kudos

Hi ChrisGW,

if I understand you, free selections is what can do the trick:

CALL FUNCTION 'FREE_SELECTIONS_INIT'
* Display free selection dialog
CALL FUNCTION 'FREE_SELECTIONS_DIALOG'

This is just a hint what to start with, the rest is in SAP (where-used-list), SCN and google.

Regards,

Clemens