Skip to Content
0
Sep 02, 2020 at 07:54 AM

SEL-SCREEN COMMENT only loading after first execution of report

81 Views

Hello,

I am trying to write a small report used for printing a smartform. I used the instruction "SELECTION-SCREEN COMMENT" to display a text next to the selection fields and the text is defined in the report. Strangely, the texts are blank when I initially start the report. But as soon as I enter the first value and hit enter the texts appears.

I'm sure that I made a very basic mistake, but I can't find it. I would be very happy if someone could take a quick look at my code:

REPORT z_k_we_label_print_test.

TABLES lqua.
DATA: ls_lqua              TYPE lqua.

SELECTION-SCREEN BEGIN OF BLOCK 1 WITH FRAME.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT (32) a1line1 FOR FIELD s_lenum.
SELECT-OPTIONS: s_lenum FOR lqua-lenum NO-EXTENSION NO INTERVALS.
a1line1 = 'Lagereinheit'.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK 1.
**Block 2 Auflösung Drucker
SELECTION-SCREEN BEGIN OF BLOCK 2 WITH FRAME.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT (30) b1line1 FOR FIELD p_300.
PARAMETERS :     p_300  RADIOBUTTON GROUP rad1 default 'X'.
b1line1 = '300 DPI'.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT (30) b1line2 FOR FIELD p_200.
PARAMETERS :     p_200  RADIOBUTTON GROUP rad1.
b1line2 = '200 DPI'.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK 2.
**Block 3 Ausgabegerät
SELECTION-SCREEN BEGIN OF BLOCK 3 WITH FRAME.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT (32) a1line2 FOR FIELD p_padest.
PARAMETERS p_padest LIKE tsp03-padest MATCHCODE OBJECT h_tsp03 OBLIGATORY. " MEMORY ID pde.
a1line2 = 'Ausgabegerät'.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK 3.

CALL SELECTION-SCREEN 1000. 

START-OF-SELECTION.

PERFORM get_data.
PERFORM print_form.

INCLUDE zles_k_we_label_print_test_f01.

I tried to set the text variables beforehand but then I get the "has already been declared" error.

Best regards,

Niklas