Skip to Content
-1

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

Nov 29, 2017 at 11:09 AM

50

avatar image

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)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Raymond Giuseppi
Nov 29, 2017 at 01:07 PM
0

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?)

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

Hi Raymond,

Thnaks for the reply. My internal table " it_zthr_line_master" is having bottling lines data based on plant. i want to make my line parameters visible based on internal table data. if internal table is having 2 bottling lines then p_line1 and p_line2 should be visible and other 2 should be invisible.

0

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?

0
Iftah Peretz
Nov 29, 2017 at 05:03 PM
0

Hey,

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

Share
10 |10000 characters needed characters left characters exceeded