Skip to Content
author's profile photo Former Member
Former Member

Refresh ALV with a new value

Hi everyone,

I'm using OO ALV in a report. I've created a button on the ALV toolbar. When the user hits this button I'm doing some calculation and producing an info (I) message to the user. When the user hits enter on this info popup, I've to update one column of the ALV with new values. Has anyone done something similar? Which method to use on handle_user_command? I'm currently using Class CL_GUI_ALV_GRID. Can someone please post the code for this specific function?

Thanks and regards,

Sougata.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 11, 2005 at 12:20 PM

    Hi Sougata,

    From what you say, since you are using an Information Message, irrespective of whether the user wants it or not, the ALV Grid has to be updated with the calculations that you do. He cannot choose to cancel the operation. Am I correct?

    If yes, then all you need to do is to update the ALV output table with the calculations that you have done and call the method refresh_table_display.

    Hope this is what you are looking for.

    Regards,

    Anand Mandalika.

    P.S: If you are happy with the answer, click the Yellow Start icon near the response and reward the points you deem fit for the response.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 11, 2005 at 01:16 PM

    Hi Sougata,

    I believe that the after the info message you are updating the ALV grid value. Then try these out,

    to update the ALV grid,

    call method addressbook_grid->set_ready_for_input

    exporting

    i_ready_for_input = 1. " Sets to edit mode

    data : w_intab1 like table of zc1address with header line .

    • Here update is performed using a work area

    • you can also specify the partcular column and update it.

    update zc1address from table t_intab1.

    if sy-subrc = 0.

    message i000. " success message

    else.

    message i001. " unsuccess message

    endif.

    • refreshing the grid to display the modified values

    call method addressbook_grid->refresh_table_display.

    • sets ALV grid to display mode.

    call method addressbook_grid->set_ready_for_input

    exporting

    i_ready_for_input = 0.

    Hope that will help you to have a try.

    Thanks and Regards,

    Kathirvel.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thank you both for answering. It was quite simple actually. I didn't even have to do

      call method addressbook_grid->set_ready_for_input

      I just modified the internal table with new values and called

      call method grid->refresh_table_display....and that did the job.

      THanks again.

      Regards,

      Sougata.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.