11-29-2017 11:09 AM
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.
11-29-2017 1: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?)
11-30-2017 5:34 AM
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.
11-30-2017 6:23 AM
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?
11-29-2017 5:03 PM