12-26-2014 3:17 AM
Hi experts,
I am writing a ALV report in which i am displaying a check box with input fields corresponding to it.
Actually the usage of the check boxes is, I have a push button on the Application tool bar. If the user check the particular check box and enters the value in input field .After pressing the push-button the value entered in input field should be updated in ALV report.
Please help me in doing so.
Waiting for your replays.
Thanks in advance,
Se38
12-26-2014 3:54 AM
Hey, Its will be more understandable if you could specify your requirement a bit more clearer.
What actually you are trying to achieve ?
- Pavan Golesar
12-26-2014 3:54 AM
Hey, Its will be more understandable if you could specify your requirement a bit more clearer.
What actually you are trying to achieve ?
- Pavan Golesar
12-26-2014 4:06 AM
Thanks Pavan Golesar,
When I select Material check box and enter the value corresponding to it,the entered material value should be updated in ALV report for the selected record when Update button is pressed.Please see the screen.
12-26-2014 4:29 AM
Thanks in Advance Pavan Golesar,
When I select Material check box and enter the value corresponding to it,the entered material value should be updated in ALV report for the selected record when Update button is pressed.Please see the screen.
12-26-2014 5:48 AM
Hi
In PAI of this module program, you have a 'USER_COMMAND' module, right?
So in this module, response the function code of 'UPDATE' button.
IF checkbox for material is checked.
lv_fieldName = 'MATNR'.
CALL METHOD grid->get_selected_rows
IMPORTING
et_index_rows = i_rowindex.
LOOP AT i_rowindex.
ASSIGN COMPONENT lv_fieldName of strucutre wa_itab TO <fs>.
MODIFY output_itab from wa_itab INDEX i_rowindex-index.
ENDLOOP.
CALL METHOD grid->refresh_table_display().
ENDIF.
12-29-2014 12:14 PM
Thanks Dengyong Zhang,
It worked!! In case of Multiple Check boxes it is unable to write that code!!It suits for one Check box.
12-26-2014 4:32 AM
OK,
Its quite fishy as why you are taking checkbox for this event. If i was to advice you, i suggest you to try to check if the textbox field is empty(is initial) or not.
Logic:
Its and interactive ALV program logic as user interacts with the report.Firstly, if you have a function code assigned to the 'Update Grid' button on the application tool bar then use the 'i_callback_user_command' parameter of the FM 'Reuse_alv_grid_display' to make it an interactive report.
12-26-2014 4:35 AM
Don't forget to implement a FORM subroutine after giving the subroutine in 'I_Callback_User_Command' parameter
Regards: Pavan Golesar
12-26-2014 5:33 AM
hey if i had answer the question satisfactorily you may choose as correct answer & close the thread.. 🙂
Thanks & Regards: Pavan Golesar
12-26-2014 5:48 AM
12-26-2014 6:03 AM
Welcome , I just wanted to contribute to people in query.. I do these for rejuvenating knowledge purpose.. Thanks for post.. !
Visit My Website: abaper.weebly.com
add me on Facebook.. ( Pavan Golesar | Facebook ) -Don't for get to say SCN.SAP.com reference ..
Regards: Pavan Golesar
Message was edited by: Pavan Golesar @ abaper.weebly.com
Message was edited by: Pavan Golesar from COEP College, Pune, India.
12-26-2014 5:48 AM
Hi,
I think you are using module pool programming.
And CL_GUI_ALV_GRID class to display the information in ALV grid.
You can use the below code to update the information in ALV grid.
In PAI
If usr_alv object is not initial.
call method usr_alv_obj->refresh_table_display
importing
soft* = 'X'
endif.
In PBO
Update your Internal table information as per your logic based on the Selected Check Boxes.
Regards.
Praveer.
12-26-2014 6:50 AM