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: 

Update ALV Report screen by using a check box triggered by push button

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Pavan_Golesar
Active Participant
0 Kudos

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 REPLIES 12

Pavan_Golesar
Active Participant
0 Kudos

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

0 Kudos

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.

0 Kudos

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.

0 Kudos

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.

0 Kudos

Thanks Dengyong Zhang,

It worked!! In case of Multiple Check boxes it is unable to write that code!!It suits for one Check box.

Pavan_Golesar
Active Participant
0 Kudos

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.

0 Kudos

Don't forget to implement a FORM subroutine after giving the subroutine in 'I_Callback_User_Command' parameter

Regards: Pavan Golesar

Pavan_Golesar
Active Participant
0 Kudos

hey if i had answer the question satisfactorily you may choose as correct answer & close the thread.. 🙂

Thanks & Regards: Pavan Golesar

0 Kudos

Thank you Pavan Golesar.

0 Kudos

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.

ipravir
Active Contributor
0 Kudos

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.

Former Member
0 Kudos

I appreciate your help Praveer Kumar Sen