Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Hi

Hi,

I had made a report with some fields along with a checkbox. I have also added a checkbox to each line and created a custom button in the PF-status. Now when I click this button all the checkboxes should be checked. Its just a report and the checkbox is given as a field in an internal table. The report is not a dialog program. So please help me how to achieve this. Thanks In Advance..

Vicky

Tags:
replied

Hi,

Look at sample program which is working as per your

requirement.

REPORT YUP_CHECKBOX.

DATA:BEGIN OF ITAB OCCURS 0.

INCLUDE STRUCTURE SFLIGHT.

DATA: CHECK(1),

END OF ITAB.

DATA:L_TABIX TYPE SY-TABIX.

START-OF-SELECTION.

SELECT * FROM SFLIGHT

INTO TABLE ITAB

UP TO 10 ROWS .

*

*

LOOP AT ITAB.

WRITE:/ ITAB-CHECK AS CHECKBOX ,ITAB-CONNID.

ENDLOOP.

SET PF-STATUS 'TEST'.

AT USER-COMMAND.

CASE SY-UCOMM.

WHEN 'SELE'.

LOOP AT ITAB.

L_TABIX = SY-TABIX.

READ TABLE ITAB INDEX L_TABIX.

IF SY-SUBRC = 0.

ITAB-CHECK = 'X'.

MODIFY ITAB INDEX L_TABIX TRANSPORTING CHECK.

ENDIF.

ENDLOOP.

LOOP AT ITAB.

WRITE:/ ITAB-CHECK AS CHECKBOX ,ITAB-CONNID.

ENDLOOP.

WHEN 'BACK' OR 'CANC' OR 'EXIT'.

LEAVE PROGRAM.

ENDCASE.

Please mark point incase answer is helpful

Thanks,

Pramod

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question