Skip to Content
-1

How to make selection screen fields invisible based on internal table data?

Hi experts,

Could you please suggest me how to make " bottling line" parameters based on the internal table data. lets say there are different bottling lines for a plant. some plants are having 2 bottling lines and some 3. want to make invisible other bottling lines based on plant data. i have attached the image. below is my code.

SELECTION-SCREEN : BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.

PARAMETERS: p_werks TYPE ztpp_overhead-werks OBLIGATORY,
p_empcat TYPE ztpp_overhead-zpp_head_id OBLIGATORY,
p_date TYPE ztpp_overhead-zpp_cons_date OBLIGATORY,
p_shift TYPE ztpp_overhead-shift OBLIGATORY.

SELECTION-SCREEN : END OF BLOCK b1.

SELECTION-SCREEN : BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.

PARAMETERS: p_line1 TYPE zscenario AS LISTBOX VISIBLE LENGTH 10,
p_line2 TYPE zscenario AS LISTBOX VISIBLE LENGTH 10,
p_line3 TYPE zscenario AS LISTBOX VISIBLE LENGTH 10,
p_line4 TYPE zscenario AS LISTBOX VISIBLE LENGTH 10.

SELECTION-SCREEN : END OF BLOCK b2.

SELECTION-SCREEN : BEGIN OF BLOCK b3 WITH FRAME TITLE text-003.

PARAMETERS: p_file TYPE rlgrap-filename .

SELECTION-SCREEN : END OF BLOCK b3.

AT SELECTION-SCREEN.

AT SELECTION-SCREEN OUTPUT.


SELECT werks zline_no zline_type FROM zthr_line_master
INTO TABLE it_zthr_line_master
WHERE werks = p_werks.

LOOP AT it_zthr_line_master INTO wa_zthr_line_master.

LOOP AT SCREEN.

MODIFY SCREEN.

ENDLOOP.

ENDLOOP.

image1.png (9.0 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Nov 29, 2017 at 01:07 PM

    Put your code between LOOP AT SCREEN and ENDLOOP in the PBO of the selection screen. Where are you stuck (camparing trailing number in fieldname with number of lines?)

    Add comment
    10|10000 characters needed characters exceeded

    • What part of code aren't you able to write: setting SCREEN-INVISIBLE in the LOOP AT SCREEN/MODIFY SCREEN/ENDLOOP loop extracting the Nr from the fieldname and comparing with the nr of field to display (max number of lines in the plant selection I suppose) or what?

  • Nov 29, 2017 at 05:03 PM

    Hey,

    I think you can get something from here, here and here and the list goes on and on.

    Add comment
    10|10000 characters needed characters exceeded