Skip to Content
avatar image
Former Member

Pass variable From ALV to Select Screen / Just parameter to select screen works

So i did an ALV where my matnr should be passed to my Select Screen into the Select-Options.


I can pass the value from the alv with this Code to my selection screen.

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


But my problem is, if i change O_matnr to Select-Options e.g. Select-Options: matnr for ...
and the above code to
o_matnr-low = sel_row-matnr
the value is not passed anymore.


MY selection-screen:

SELECTION-SCREEN BEGIN OF SCREEN 0200 AS SUBSCREEN.
*SELECT-OPTIONS: o_matnr FOR zpplock-matnr.
PARAMETERS: o_matnr TYPE zpplock-matnr.
SELECT-OPTIONS: o_sernr FOR risa0-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.

I let the debugger go over it and my matnr gets written in the o_matnr-low field but its never getting displayed
So i Hope you can help me thanks for your time and help !

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    Jun 13, 2017 at 09:43 PM

    Are you also setting "I" and "EQ" in your select options?

    append value #( sign = 'I' option = 'EQ' low = sel_row-matnr ) to o_matnr.
    Add comment
    10|10000 characters needed characters exceeded

    • You really should start with some ABAP basics first ...

  • avatar image
    Former Member
    Jun 13, 2017 at 04:41 PM

    AT Selection screen output, event is only place that let you show the field. Make sure its been called & when its called fields are updated.

    Thanks

    Anand

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 14, 2017 at 02:06 PM

    What is actually your requirement??

    If you need the same select option like function you can opt for RANGES.

    So that you can assign the values to the ranges and get the same functionality like the select-option

    but you have to write code to fill the RANGES.

    Else try playing with the memory to achieve your work.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 14, 2017 at 08:26 AM
    -3

    hi kevin,

    "o_matnr-low = sel_row-matnr" is wrong statement for while use select option ,just " o_matnr-low IN sel_row-matnr " type like that it will fetch record based on select option ( low an high).

    regards,

    Umayaraja.B

    Add comment
    10|10000 characters needed characters exceeded