09-22-2006 11:13 AM
Dear friends,
I have a ALV Grid Report with a Check Box for each row . I need to display EDIT Icon and Execute Icon on the Application Toolbar.
When I select the checkbox and press the Edit Button on the application toolbar the user should be able to edit the one of the column in that line.
could anyone send give the detail coding for the above.
Regards
Karthik
09-22-2006 11:23 AM
Then the user press the EDIT button make a flag = 'X' in PAI.
Check this flag eq 'X' in PBO and call the get_frontend_fieldcatalog
CALL METHOD o_gridin->get_frontend_fieldcatalog
IMPORTING
et_fieldcatalog = i_fcatin.
It will give u the field catalog which is there in the ALV.
Then change the field catalog ie for which field u want the column to be edited. (Make EDIT = 'X')
READ TABLE i_fcatin INTO wa_fcatin
WITH KEY fieldname = p_fieldname.
IF sy-subrc EQ 0.
wa_fcatin-edit = 'X'.
MODIFY i_fcatin FROM wa_fcatin
TRANSPORTING edit
WHERE fieldname = p_fieldname.
ENDIF.
Then use the set_frontend_fieldcatalog to change the field catalog.
CALL METHOD o_gridin->set_frontend_fieldcatalog
EXPORTING
it_fieldcatalog = i_fcatin.
Refresh the ALV.
Prakash.
09-22-2006 11:27 AM
You can do one thing, when the user clicks on the edit button take him to some other screen with same ALV but only shoing the selected lines with some columns in editable mode.
Here user can edit it and reprocess the records. And again display the previous screen with updated data.
Hope this helps.