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

How to create grid based on select options

How can i create alv grid based on select options example username and date.

select options date: 01.01.2014 to 04.01.2014

username: username1 and username2

Grid should look something like this:

01.01.2014 02.01.2014 03.01.2014 04.01.2014

username1 5 4.2

username2 3 4

Numbers 5, 4.2,3,4 are the values of one column of given table.

Thanks in advance

Moderator Message: FAQ - Dynamic internal tables. Un-marking this discussion as a question. Please read the SCN rules of engagement

Message was edited by: Kesavadas Thekkillath

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 Jan 06, 2014 at 08:30 AM

    Hi,

    The ALV Grid control is a flexible tool for displaying lists. The tool provides common list operations as

    generic functions and can be enhanced by self-defined options.

    The ALV Grid control is used to build non-hierarchical, interactive, and modern-design lists. As a

    control, it is a component that is installed on the local PC.

    Please refer this link

    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/e8a1d690-0201-0010-b7ad-d9719a415907?overridelayout=t…

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 06, 2014 at 02:31 PM

    Hi,

    You will need to transpose your given table to a dynamic one that will hold 1 column for the username as a key and 1 column for each day in the given period....

    What have you tried? where are you stucked?

    Br,

    Manu.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 06, 2014 at 03:09 PM

    Hi,

    Create dynamic table for date.

    CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE SCN has a lot of document about this method.

    Then fill your table with data for username.

    you need table like this :

    userdate1date2date3date4username1325

    this is very easy with CREATE_DYNAMIC_TABLE

    then you can assign your data to created table.

    here is the example:

    http://scn.sap.com/message/14468651#14468651

    You need to assign field by field.

    Regards

    Tolga

    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.