Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Urgent: about the checkbox in OOP ALV report

former_member249594
Participant
0 Kudos

Hi Experts,

I had use OOP method to display my ALV report. In the report I have a checkbox for each line. I had set this check box use below statements:

gt_fieldcat_record-tabname = 'GT_ISSUE_INT'.

gt_fieldcat_record-fieldname = 'CHECKBOX'.

gt_fieldcat_record-checkbox = 'X'.

gt_fieldcat_record-edit = 'X'.

APPEND gt_fieldcat_record.

When I press the save button, then I will save the lines to my Z-table which its GT_ISSUE_INT-CHECKBOX = 'X'.

Now I click the checkbox to select several lines in my ALV report and then press save, but it do not work. Then I check the internal table GT_ISSUE_INT in debugger, I found the GT_ISSUE_INT-CHECKBOX = ' '. Above statements is not correct for the checkbox?? Or I need additional statements to move 'X' to GT_ISSUE_INT-CHECKBOX?? Please help!!!Thanks.

1 ACCEPTED SOLUTION

uwe_schieferstein
Active Contributor
0 Kudos

Hello Joe

Assuming that you are using CL_GUI_ALV_GRID then you have to call method <b>go_grid->check_changed_data( ) at PAI </b> of the dynpro displaying the ALV list in order to retrieve the data from the frontend (= ALV list) to your backend (= itab in ABAP program).

Place this method call as one of the first statements within your USER_COMMAND module (PAI) and the save will work.

For more details please refer to threads:

Regards

Uwe

4 REPLIES 4

uwe_schieferstein
Active Contributor
0 Kudos

Hello Joe

Assuming that you are using CL_GUI_ALV_GRID then you have to call method <b>go_grid->check_changed_data( ) at PAI </b> of the dynpro displaying the ALV list in order to retrieve the data from the frontend (= ALV list) to your backend (= itab in ABAP program).

Place this method call as one of the first statements within your USER_COMMAND module (PAI) and the save will work.

For more details please refer to threads:

Regards

Uwe

Former Member
0 Kudos

Hi,

If u want to read check box status from list, need to call function module explicitly.

see the sample code:

case sy-ucomm.

when 'SAVE'.

Data ref1 type ref to cl_gui_alv_grid.

CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'

IMPORTING

E_GRID = ref1.

call method ref1->check_changed_data.

loop at GT_ISSUE_INT to workarea.

____ continue writing ur code.

function module read the data from list . and save the changes that made on list.

when u debug, u can see the check box status as 'X' after exucut\ing this fm and method.

reward if helpful.

regards,

swapna

former_member249594
Participant
0 Kudos

Hi All, Thanks and my issue have been solved.

Best Regards

Joe