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: 

Second Selection Screen no multiselection

Former Member
0 Kudos

Hello Sap Community,

im doing my internship and working on a big program. I Have 2 alvs and 2 selection screen. The first one is working fine and takes me to the alv. The alv than takes me to the next selection screen (but here if i click on multiselection nothing happens) i can search only for matnr the rest is not really working. But i can run and search from the selection screen and it takes me to the next alv. So actually its doing its job but not all. I want also to specify my selection e.g. Filter for matnr AND SERNR. Now only matnr is working.

Here the code.

SELECTION-SCREEN BEGIN OF SCREEN 0200 AS SUBSCREEN.
PARAMETERS: o_matnr TYPE matnr.
PARAMETERS: o_sernr TYPE risa0-sernr.
*SELECT-OPTIONS: o_sernr FOR zpplock-sernr.
SELECT-OPTIONS: o_user FOR zpplock-uname.
SELECT-OPTIONS: o_date FOR zpplock-datum.
PARAMETERS: o_zlock TYPE zpplock-zlock.
SELECT-OPTIONS: o_zreas FOR zpplock-zlock_reason.
SELECT-OPTIONS: o_time FOR zpplock-uzeit.
SELECTION-SCREEN END OF SCREEN 0200.

There i tried to take diffrent tables and whatever but still doesnt working. The O_matnr is being passed by the previous alv. So i tried to specify my selection screen and search for MATNR AND SERNR and than i noticed its not working correctly. If i press enter, nothing happens (and nothing gets deleted)

FORM get_data.
SELECT * FROM zpplock INTO TABLE gt_zpplock WHERE matnr = o_matnr.
ENDFORM.

So I tried


SELECT * FROM zpplock INTO TABLE gt_zpplock WHERE matnr = o_matnr OR sernr = o_sernr.
ENDFORM.


But its not working thanks for your help and time a lot !

1 ACCEPTED SOLUTION

Former Member
0 Kudos

SOLVED:

now the selection screen works properly !

I didnt call the subscreen in the PAI !!! Still thanks for your help guys !

PROCESS BEFORE OUTPUT.
module status_0550.
CALL SUBSCREEN 0200 INCLUDING sy-repid number.

PROCESS AFTER INPUT.
CALL SUBSCREEN 0200.
MODULE USER_COMMAND_0550.

5 REPLIES 5

Former Member
0 Kudos

hi kevin,

in your interactive alv report function module ( REUSE_ALV_GRID_DISPLAY ) just pass

I_CALLBACK_USER_COMMAND = 'USER_COMMAND'

then create a form for 'USER_COMMAND'

like below

FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
                        RS_SELFIELD TYPE SLIS_SELFIELD.
  CASE R_UCOMM.
    WHEN '&IC1'. "standard Function code for doubel click
      READ TABLE "internal table name " INTO WA_MARA INDEX RS_SELFIELD-TABINDEX.
      IF SY-SUBRC = 0.
        SET PARAMETER ID 'MAT' FIELD WA_MARA-MATNR.        "set parameter id mat is matnr parameter id 
        CALL TRANSACTION 't-code' AND SKIP FIRST SCREEN.      "call transaction
      ENDIF.
  ENDCASE.
ENDFORM.   

regards,

Umayaraja.B

0 Kudos

Thanks umayaraja for your help but will this fix my selection screen ?
its just a command for double click right ?

I think my question is not good asked im sorry, but its kind of difficult to explain, i mean the programm is all working but its just keeps on deleting my values when i press enter in the second selection screen. I saw some other complaining but i think its because i implemented it as a subscreen ... Could this be a possibility ? That the selection screen is not working properly because of the subscreens and dypros etc. ?


thank you !

Sandra_Rossi
Active Contributor
0 Kudos

What is exactly your question?

Former Member
0 Kudos

My Question is how to fix my second selection screen. I just cant click on the Multiple Selection and I wanna know why its not working properly like my 1st Selection Screen. I can put my matnr in it, but thats all i can do. I cannot work with the other fields, If i put something in the other field and press enter, everything gets deleted, except my matnr. And my matnr is being passed from the alv with this code :

ELSEIF pv_ucomm EQ gc_history.
READ TABLE gt_list INTO sel_row
INDEX ps_selfield-tabindex.
o_matnr = sel_row-matnr.

Former Member
0 Kudos

SOLVED:

now the selection screen works properly !

I didnt call the subscreen in the PAI !!! Still thanks for your help guys !

PROCESS BEFORE OUTPUT.
module status_0550.
CALL SUBSCREEN 0200 INCLUDING sy-repid number.

PROCESS AFTER INPUT.
CALL SUBSCREEN 0200.
MODULE USER_COMMAND_0550.