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

ALV grid display

Hello all,

Date is the main selection criteria in my selection screen

Once the user gets the ALV grid display output screen, he should be able to forward or backward the date

so accordingly the display changes

So req is, i should create two pushbuttons in that ALV grid display output screen where user can forward or backward the date directly, no need to go back to the selection screen once again

How can i handle this......

sample code plz..

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Aug 30, 2006 at 02:22 PM

    Instead of creating push buttons , u can make the date fields as editable fields and create F4 help for the date fields so that you can select the dates

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 30, 2006 at 02:24 PM

    Hi Johnn, you can accomplish this by using the CL_GUI_ALV_GRID class and embeding the ALV Grid in a screen container. Then add your buttons to the application toolbar by creating your gui status, then when the user clicks one of the buttons, get the new data and "Refresh" the ALV grid using the REFRESH method.

    Regards,

    Rich Heilman

    Add a comment
    10|10000 characters needed characters exceeded

    • ?

      You are filling this internal table with data at some point in your program. I assume that you are filling it based on some date. When you click on the "forward" button you now want to fill the internal table with data for the new date calculated when you push the button right? So do the same select statement which filled the ALV grid internal table eariler, only with this new date.

      Or am I missing something.

      Regards,

      Rich Heilman

  • author's profile photo Former Member
    Former Member
    Posted on Aug 30, 2006 at 02:29 PM

    HI,

    You need to REFRESH In the ALV,

    In ALV, to refresh the table you have to call the method "refresh_table_display".

    It has the syntax very similar to creating the table.

    It has two parameters. In the first one, you can mention if you want to refresh only the data (the icons are not refreshed)

    or

    if you want to refresh only the icons around the grid (the data is not refreshed - this option is mostly not used in day to day applications).

    the synatx is :-

    call method grid (name of grid )->refresh_table_display

    exporting

    IS_STABLE = <STRUCT OF TYPE LVC_S_STBL> (THIS IS FOR DATA REFRESHING)

    I_SOFT_REFRESH = <VARIABLE OF CHAR 01> (THIS IS FOR ICON REFRESHING).

    See the below link for Autorefresh Example program:

    http://www.sap-basis-abap.com/abap/auto-refresh-alv-list.htm

    similarly you can write the program,

    Look at the Thread also:

    refresh-alv-without-abap-objects

    Regards

    Sudheer

    Add a comment
    10|10000 characters needed characters exceeded

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.