Skip to Content
-1

Second Selection Screen no multiselection

Jun 12, 2017 at 03:57 PM

67

avatar image

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 !

10 |10000 characters needed characters left characters exceeded

What is exactly your question?

0

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.

0
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Kevin Milovic Jun 13, 2017 at 02:42 PM
0

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.

Share
10 |10000 characters needed characters left characters exceeded
umayaraja b Jun 13, 2017 at 03:09 AM
0

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

Show 1 Share
10 |10000 characters needed characters left characters exceeded

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 !

0