Skip to Content

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

check box for this entire row

HI Gurus,

i am having a screen where i am displaying the vbeln netwr erdat details ,here my requirement is

to have a check box for this entire row,how to create checkbox for this entire row?

we are having checkbox tool in screenpainter if we use that does it applicable for the entire row?

and when i check a any row and click a push button i should display this checked row details in the next screen,how to catch the checked row details?

Regards ,

Vijay.

Tags:
Former Member
Former Member replied

Hi Vijaya,

I hope your requirement is that you want check box for selecting each row.

In TABLE CONTROL, a column shiuld be dedicated for row selection. Then only the entire row can be selected. This column name should be mentioned in the 'SELECTION FIELD' property of the table control as 'WA_DATA-SEL' where WA_DATA is the workarea and SEL is the field dedicated for row selection.

We can do like this, whenever the checkbox is clicked, the corresponding 'SEL' value must be set,

Here, CHECK BOX is set to indicate the selection for us. The SEL is set to indicate the table control that show this row as selected.

Do as follow;

1. Declare two additional fields of single charater length in your internal table.

2. Assign one of this field in the 'SELECTION FIELD' property of the table control.

3. Make another field as checkbox and assign FUNCTION CODE for this checkbox.

4. In processing of this FUNCTION CODE, just LOOP the internal table with condition WHERE CHK = 'X' and MODIFY SEL as 'X'.

    LOOP AT GT_TC_TSTCT INTO GW_TC_TSTCT.
      IF GW_TC_TSTCT-CHK = 'X' AND
        GW_TC_TSTCT-SEL IS INITIAL.
        GW_TC_TSTCT-SEL = 'X'.
        MODIFY GT_TC_TSTCT FROM GW_TC_TSTCT.
      ELSEIF GW_TC_TSTCT-CHK IS INITIAL AND
        GW_TC_TSTCT-SEL = 'X'.
        GW_TC_TSTCT-SEL = ' '.
        MODIFY GT_TC_TSTCT FROM GW_TC_TSTCT.
      ENDIF.
    ENDLOOP.

Here, the field CHK is the checkbox for our row selection. SEL is the field assigned in 'SELECTION FIELD' of the table control.

Try this.

Regards,

R.Nagarajan.

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