Display only first value of the repeated values  in ALV report

Hi,
Test Data
Doc No   Net Val   billing Doc value Qty
1000      2000.00    567850.00
1000      2000.00    567850.00
1000      2000.00    567850.00
2000      6000.00    767850.00
In this type of ALV Report in which only the First field value of the repeated value  should be displayed.
Doc No   Net Val   billing Doc value Qty
1000      2000.00    567850.00
2000      6000.00    767850.00
I can display document value as like expected result in SORT ORDER in LAYOUT but the Quantity value,Net value  which cannot be done in SORT ORDER in LAYOUT.
Please tell me the suitable solution.

For a Sales Order there are two Invoice.
Sales doc     Invoice No    Billed Qty    Net value                     Qtywith  material no
5000              900             234774.00    456.00000                 65             123
                                         234774.00    456.00000                 25             456
                                         234774.00    456.00000                 35             898
                                         234774.00    456.00000                 20             496
                      901            634774.00    256.00000                 50               746
                                        634774.00    256.00000                 10               456
                                        634774.00    256.00000                 20               545
                                        634774.00    256.00000                 30               869
I  need to print this billed Qty and Net value  only once in first line and it should not be deleted.
I need the result like this
Sales doc     Invoice No    Billed Qty    Net value                     Qtywith          material no
5000              900             234774.00    456.00000                 65                     123
                                                                                25                     456
                                                                                35                     898
                                                                                20                     496
5001              901            634774.00    256.00000                 50                       746
                                                                                10                       456
                                                                                20                       545
                                                                                30                       869               
The same value should not be repeated for Billed Qty and Net Value.
I can do that for Sales doc in sort order in layout but i couldn't do for Billed qty and Net Value.
Please  help.

Similar Messages

  • How to get the text field in the header for only first page of the report

    Hi,
    I am developing reports in BI Publisher Enterprise where i am facing problem i.e., i have to get some text field in header,for only first page in the result but it is displaying in all the other pages of the report in result.So,please if you have any idea of how to solve it, please reply.It is required as early as possible.
    Thanks in Advance

    Invalid path? What are you doing? Writing the report output to an invalid directory?
    Where are your terms and conditions? It would be very easy just to put them in a database table and select them in your report query.

  • Tree hierarchy of time displays only first character

    The Database is Teradata and I am using OBIEE 11g.
    I have time hierarchy and I have used this tree in reports. But when I drill down on the tree, only first letters of the caption are displayed not entire string.
    Eg: instead of Q1-2010, just Q gets displayed next to the + sign.
    If I drill on quarter, instead of showing "April", it shows "A".
    If I just display the column or the column is in form of the usual 10g drill down, then it is fine.
    Could anyone suggest a solution for this ?

    This happens to be a bug in obiee 11g. SR has been raised.

  • Restrict WERKS values in the output of simple ALV(using REUSE_GRID_DISPLAY

    Hi ,
    I have one  requirement as follows:-
    --> I want to restrict WERKS values in the output of simple ALV(using REUSE_GRID_DISPLAY).
    currently the values ae displayed from standard search-help.
    I want to fields WERKS(MRP Type) values from table T001W with field VKFLZ = 'B'.
    Now the fieltered values should be displaeyd in ALV output.
    I was thinking of using the event, but i cannot find appropriate event where i can code my changes...please suggest
    Thanks in Advance.

    Hi Sandeep,
        I have the events in IT_EVENTS table.
        None of them i find suitable event for restrcition of F4 vaues in field werks.
        CALLER_EXIT
    USER_COMMAND
    TOP_OF_PAGE
    TOP_OF_COVERPAGE
    END_OF_COVERPAGE
    FOREIGN_TOP_OF_PAG
    FOREIGN_END_OF_PAG
    PF_STATUS_SET
    LIST_MODIFY
    TOP_OF_LIST
    END_OF_PAGE
    END_OF_LIST
    AFTER_LINE_OUTPUT
    BEFORE_LINE_OUTPUT
    REPREP_SEL_MODIFY
    SUBTOTAL_TEXT
    GROUPLEVEL_CHANGE.
    Please suggest, what other options we can have on this.
    Thanks in Advance.

  • Display only one variable in the header and not column in WAD

    Hi All,
    my requirement is to be able to display only one variable in the report output header and hide the others. I am able to display all by using the INFO FIELD ITEM and saying variable display ON - but the requirement is very specific for only one variable display.
    how can i achieve this ?
    Thanks,
    Shweta

    Hi,
    You can insert a text item and Turn off the others or Hide these from Filter pane I have done that and then use that query for your WAD.
    Steps:
    1. Uncheck all the variables from your Design item in Analyzer.
    2. Insert a New Text Item and check the Variable you want to display.
    3. Go back and run the Query.
    Even you can change the position in the Query and Save as a workbook.Let me know ,if this works.
    ~AK

  • Function module that can give the last value or the highest value of a key

    hi,
    Is there any function module that can give the last value or the highest value of a key feild in a z table.
    regards,
    johnson

    Hi ,
    We have  aggregate functions in SQL. Some of the functions are as follows.
    MAX(col ) Determines the maximum value of the value in the column col in the resulting set or in the current group.
    MIN( col ) Determines the minimum value of the content of the column col in the resulting set or in the current group.
    AVG(  col ) Determines the average value of the content of the column col in the resulting set or in the current group. The data type of the column has to be numerical.
    SUM( col ) Determines the sum of the content of the column col in the resulting set or in the current group. The data type of the column has to be numerical.
    COUNT( col ) Determines the number of different values in the column col in the resulting set or in the current group.
    For further details , type the function name name and press F1 for further help.
    Eg: select count(mantr) from mara into workarea where condition.
    Reward points if helpful.
    Thanks and Regards.

  • HT1199 Im traveling abroad and while I  have refused the IOS7 upgrade my iPad is now lock.  The display only reflecting iTunes and the USB cable images.  Now I can not access my photos and or my email.  Anyway I can reset without connecting to my computer

    Im traveling abroad and while I  have refused the IOS7 upgrade my iPad is now lock.  The display only reflecting iTunes and the USB cable images.  Now I can not access my photos and or my email.  Anyway I can reset without connecting to my computer?

    penny175 wrote:
    Anyway I can reset without connecting to my computer?
    No. Not without access to a computer running iTunes. You do want to use your own computer so that you can restore from your backup and sync your own content back from iTunes.

  • Is there any way to get an ipod to display only complete albums in the albums list?

    is there any way to get an ipod to display only complete albums in the albums list (rather than every album represented by every song on the ipod)?

    Sounds like there is some discrepancies in the tagging in iTunes.  See this page for more information.
    Grouping Tracks Into Albums
    B-rock

  • Need to display data on the right side in the header area of alv report.

    hi experts,
                       I want to display data in the header area of alv report on the right side  . I have already used function for events on the header side data is getting displayed on the left side .but i want data to be displayed on the right side.
    regards,
    andrews.

    Hi,
    Hope this below code helps you.
    Take care,
    Çağatay.
    * build header for alv
    FORM top_of_page_split USING r_top TYPE REF TO cl_dd_document.
    DATA: s_tab TYPE sdydo_text_table,
          c_area TYPE REF TO cl_dd_area,
          text TYPE sdydo_text_element.
    TYPES: BEGIN OF tab_text,
    text TYPE sdydo_text_element,
    END OF tab_text.
    DATA: i_text TYPE TABLE OF tab_text.
    DATA: w_text TYPE tab_text.
    CALL METHOD r_top->initialize_document.
    CALL METHOD r_top->vertical_split
    EXPORTING
    split_area = r_top
    split_width = '70%'
    IMPORTING
    right_area = c_area.
    CONCATENATE sy-datum+4(2)
    sy-datum+6(2)
    sy-datum(4)
    INTO date1.
    CONCATENATE 'DATE'  date1
    INTO w_text-text
    SEPARATED BY ':'.
    APPEND w_text TO i_text.
    CONCATENATE 'time:' sy-uzeit INTO w_text .
    APPEND w_text TO i_text.
    CONCATENATE 'uesr:' sy-uname INTO w_text .
    APPEND w_text TO i_text.
    CONCATENATE 'local date:' sy-datlo INTO w_text .
    APPEND w_text TO i_text.
    CONCATENATE 'time zone:' sy-zonlo INTO w_text .
    APPEND w_text TO i_text.
    s_tab[] = i_text[].
    CALL METHOD c_area->add_text
    EXPORTING
    text_table = s_tab
    fix_lines = 'X'
    sap_fontsize = cl_dd_document=>medium
    sap_emphasis = cl_dd_document=>strong.
    CALL METHOD r_top->add_gap
    EXPORTING
    width = 60.
    text = 'THIS IS REPORT HEADING'.
    CALL METHOD r_top->add_text
    EXPORTING
    text = text
    sap_emphasis = 'STRONG'.
    CALL METHOD r_top->new_line.
    CALL METHOD r_top->add_gap
    EXPORTING
    width = 70.
    text = 'THIS IS REPORT HEADING1'.
    CALL METHOD r_top->add_text
    EXPORTING
    text = text
    sap_emphasis = 'STRONG'.
    CALL METHOD r_top->new_line.
    CALL METHOD r_top->add_gap
    EXPORTING
    width = 80.
    text = 'THIS IS REPORT HEADING2'.
    CALL METHOD r_top->add_text
    EXPORTING
    text = text
    sap_emphasis = 'STRONG'.
    CALL METHOD r_top->new_line.
    text = 'Report Subheading1'.
    CALL METHOD r_top->add_text
    EXPORTING
    text = text
    sap_emphasis = 'NORMAL'.
    CALL METHOD r_top->new_line.
    text = 'Report Subheading2'.
    CALL METHOD r_top->add_text
    EXPORTING
    text = text
    sap_emphasis = 'NORMAL'.
    CALL METHOD r_top->new_line.
    text = 'Report Subheading3'.
    CALL METHOD r_top->add_text
    EXPORTING
    text = text
    sap_emphasis = 'NORMAL'.
    CALL METHOD r_top->new_line.
    ENDFORM. "TOP_OF_PAGE_SPLIT

  • How to get  the actual data in ALV report

    I am doing some upgradation work   in that i am using Submit  & And return and  also i am using some function modules like LIST FROM MEMORY , LIST TO TXT wnd WRITE LIST , it gives output in normal list format , But i need to print in ALV report .
    With the use of set table for 1st display i got the  ALV report   but not with actual data, (some junk value is showing) , So can any 1 suggest me how to get  the  actual data in ALV report, With the use of  Any Function Module or with Coding,
    with regards,

    Hi Saravana
    I am sure you must be getting the values in tables of table parameters from every FM.
    consolidate the values from tables of all FMs in one table and built ALV for that table only.
    I hope this way you can show the actual data in ALV.
    thanks
    Lalit

  • Plz send me the code of interctive ALV report

    Hi
    plz send me the code of interctive ALV report
    thanks in advance
    rachu

    Hi
    <u><b>For More alv report examples check  these Tcodes <i>LIBS, BIBS</i>Here u can find more number of examples on alv reports of different kinds</b></u>
    Check this sample code
    TYPE-POOLS: SLIS.
    *type declaration for values from ekko
    TYPES: BEGIN OF I_EKKO,
           EBELN LIKE EKKO-EBELN,
           AEDAT LIKE EKKO-AEDAT,
           BUKRS LIKE EKKO-BUKRS,
           BSART LIKE EKKO-BSART,
           LIFNR LIKE EKKO-LIFNR,
           END OF I_EKKO.
    DATA: IT_EKKO TYPE STANDARD TABLE OF I_EKKO INITIAL SIZE 0,
          WA_EKKO TYPE I_EKKO.
    *type declaration for values from ekpo
    TYPES: BEGIN OF I_EKPO,
           EBELN LIKE EKPO-EBELN,
           EBELP LIKE EKPO-EBELP,
           MATNR LIKE EKPO-MATNR,
           MENGE LIKE EKPO-MENGE,
           MEINS LIKE EKPO-MEINS,
           NETPR LIKE EKPO-NETPR,
           END OF I_EKPO.
    DATA: IT_EKPO TYPE STANDARD TABLE OF I_EKPO INITIAL SIZE 0,
          WA_EKPO TYPE I_EKPO .
    *variable for Report ID
    DATA: V_REPID LIKE SY-REPID .
    *declaration for fieldcatalog
    DATA: I_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
          WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
    DATA: IT_LISTHEADER TYPE SLIS_T_LISTHEADER.
    * declaration for events table where user comand or set PF status will
    * be defined
    DATA: V_EVENTS TYPE SLIS_T_EVENT,
          WA_EVENT TYPE SLIS_ALV_EVENT.
    * declartion for layout
    DATA: ALV_LAYOUT TYPE SLIS_LAYOUT_ALV.
    * declaration for variant(type of display we want)
    DATA: I_VARIANT TYPE DISVARIANT,
          I_VARIANT1 TYPE DISVARIANT,
          I_SAVE(1) TYPE C.
    *PARAMETERS : p_var TYPE disvariant-variant.
    *Title displayed when the alv list is displayed
    DATA:  I_TITLE_EKKO TYPE LVC_TITLE VALUE 'FIRST LIST DISPLAYED'.
    DATA:  I_TITLE_EKPO TYPE LVC_TITLE VALUE 'SECONDRY LIST DISPLAYED'.
    INITIALIZATION.
      V_REPID = SY-REPID.
      PERFORM BUILD_FIELDCATLOG.
      PERFORM EVENT_CALL.
      PERFORM POPULATE_EVENT.
    START-OF-SELECTION.
      PERFORM DATA_RETRIEVAL.
      PERFORM BUILD_LISTHEADER USING IT_LISTHEADER.
      PERFORM DISPLAY_ALV_REPORT.
    *&      Form  BUILD_FIELDCATLOG
    *       Fieldcatalog has all the field details from ekko
    FORM BUILD_FIELDCATLOG.
      WA_FIELDCAT-TABNAME = 'IT_EKKO'.
      WA_FIELDCAT-FIELDNAME = 'EBELN'.
      WA_FIELDCAT-SELTEXT_M = 'PO NO.'.
      APPEND WA_FIELDCAT TO I_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-TABNAME = 'IT_EKKO'.
      WA_FIELDCAT-FIELDNAME = 'AEDAT'.
      WA_FIELDCAT-SELTEXT_M = 'DATE.'.
      APPEND WA_FIELDCAT TO I_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-TABNAME = 'IT_EKKO'.
      WA_FIELDCAT-FIELDNAME = 'BUKRS'.
      WA_FIELDCAT-SELTEXT_M = 'COMPANY CODE'.
      APPEND WA_FIELDCAT TO I_FIELDCAT.
      CLEAR WA_FIELDCAT.
    WA_FIELDCAT-TABNAME = 'IT_EKKO'.
      WA_FIELDCAT-FIELDNAME = 'BUKRS'.
      WA_FIELDCAT-SELTEXT_M = 'DOCMENT TYPE'.
      APPEND WA_FIELDCAT TO I_FIELDCAT.
      CLEAR WA_FIELDCAT.
    WA_FIELDCAT-TABNAME = 'IT_EKKO'.
      WA_FIELDCAT-FIELDNAME = 'LIFNR'.
      WA_FIELDCAT-NO_OUT    = 'X'.
      WA_FIELDCAT-SELTEXT_M = 'VENDOR CODE'.
      APPEND WA_FIELDCAT TO I_FIELDCAT.
      CLEAR WA_FIELDCAT.
    ENDFORM.                    "BUILD_FIELDCATLOG
    *&      Form  EVENT_CALL
    *   we get all events - TOP OF PAGE or USER COMMAND in table v_events
    FORM EVENT_CALL.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
       EXPORTING
         I_LIST_TYPE           = 0
       IMPORTING
         ET_EVENTS             = V_EVENTS
    *  EXCEPTIONS
    *    LIST_TYPE_WRONG       = 1
    *    OTHERS                = 2
      IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    "EVENT_CALL
    *&      Form  POPULATE_EVENT
    *      Events populated for TOP OF PAGE & USER COMAND
    FORM POPULATE_EVENT.
      READ TABLE V_EVENTS INTO WA_EVENT WITH KEY NAME = 'TOP_OF_PAGE'.
      IF SY-SUBRC EQ 0.
        WA_EVENT-FORM = 'TOP_OF_PAGE'.
        MODIFY V_EVENTS FROM WA_EVENT TRANSPORTING FORM WHERE NAME =
    WA_EVENT-FORM.
      ENDIF.
      READ TABLE V_EVENTS INTO WA_EVENT WITH KEY NAME = 'USER_COMMAND'.
      IF SY-SUBRC EQ 0.
        WA_EVENT-FORM = 'USER_COMMAND'.
        MODIFY V_EVENTS FROM WA_EVENT TRANSPORTING FORM WHERE NAME =
    WA_EVENT-NAME.
      ENDIF.
    ENDFORM.                    "POPULATE_EVENT
    *&      Form  data_retrieval
    *   retreiving values from the database table ekko
    FORM DATA_RETRIEVAL.
      SELECT EBELN AEDAT BUKRS BSART LIFNR FROM EKKO INTO TABLE IT_EKKO.
    ENDFORM.                    "data_retrieval
    *&      Form  bUild_listheader
    *       text
    *      -->I_LISTHEADEtext
    FORM BUILD_LISTHEADER USING I_LISTHEADER TYPE SLIS_T_LISTHEADER.
      DATA HLINE TYPE SLIS_LISTHEADER.
      HLINE-INFO = 'this is my first alv pgm'.
      HLINE-TYP = 'H'.
    ENDFORM.                    "build_listheader
    *&      Form  display_alv_report
    *       text
    FORM DISPLAY_ALV_REPORT.
      V_REPID = SY-REPID.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
         I_CALLBACK_PROGRAM                = V_REPID
    *   I_CALLBACK_PF_STATUS_SET          = ' '
         I_CALLBACK_USER_COMMAND           = 'USER_COMMAND'
         I_CALLBACK_TOP_OF_PAGE            = 'TOP_OF_PAGE'
         I_GRID_TITLE                      = I_TITLE_EKKO
    *   I_GRID_SETTINGS                   =
    *   IS_LAYOUT                         = ALV_LAYOUT
         IT_FIELDCAT                       = I_FIELDCAT[]
    *   IT_EXCLUDING                      =
    *   IT_SPECIAL_GROUPS                 =
    *   IT_SORT                           =
    *   IT_FILTER                         =
    *   IS_SEL_HIDE                       =
    *     i_default                         = 'ZLAY1'
         I_SAVE                            = 'A'
    *     is_variant                        = i_variant
         IT_EVENTS                         = V_EVENTS
        TABLES
          T_OUTTAB                          = IT_EKKO
    * EXCEPTIONS
    *   PROGRAM_ERROR                     = 1
    *   OTHERS                            = 2
      IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    "display_alv_report
    *&      Form  TOP_OF_PAGE
    *       text
    FORM TOP_OF_PAGE.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          IT_LIST_COMMENTARY       = IT_LISTHEADER
    *    i_logo                   =
    *    I_END_OF_LIST_GRID       =
    ENDFORM.                    "TOP_OF_PAGE
    *&      Form  USER_COMMAND
    *       text
    *      -->R_UCOMM    text
    *      -->,          text
    *      -->RS_SLEFIELDtext
    FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
    RS_SELFIELD TYPE SLIS_SELFIELD.
      CASE R_UCOMM.
        WHEN '&IC1'.
          READ TABLE IT_EKKO INTO WA_EKKO INDEX RS_SELFIELD-TABINDEX.
          PERFORM BUILD_FIELDCATLOG_EKPO.
          PERFORM EVENT_CALL_EKPO.
          PERFORM POPULATE_EVENT_EKPO.
          PERFORM DATA_RETRIEVAL_EKPO.
          PERFORM BUILD_LISTHEADER_EKPO USING IT_LISTHEADER.
          PERFORM DISPLAY_ALV_EKPO.
      ENDCASE.
    ENDFORM.                    "user_command
    *&      Form  BUILD_FIELDCATLOG_EKPO
    *       text
    FORM BUILD_FIELDCATLOG_EKPO.
      WA_FIELDCAT-TABNAME = 'IT_EKPO'.
      WA_FIELDCAT-FIELDNAME = 'EBELN'.
      WA_FIELDCAT-SELTEXT_M = 'PO NO.'.
      APPEND WA_FIELDCAT TO I_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-TABNAME = 'IT_EKPO'.
      WA_FIELDCAT-FIELDNAME = 'EBELP'.
      WA_FIELDCAT-SELTEXT_M = 'LINE NO'.
      APPEND WA_FIELDCAT TO I_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-TABNAME = 'I_EKPO'.
      WA_FIELDCAT-FIELDNAME = 'MATNR'.
      WA_FIELDCAT-SELTEXT_M = 'MATERIAL NO.'.
      APPEND WA_FIELDCAT TO I_FIELDCAT.
      CLEAR WA_FIELDCAT.
    WA_FIELDCAT-TABNAME = 'I_EKPO'.
      WA_FIELDCAT-FIELDNAME = 'MENGE'.
      WA_FIELDCAT-SELTEXT_M = 'QUANTITY'.
      APPEND WA_FIELDCAT TO I_FIELDCAT.
      CLEAR WA_FIELDCAT.
    WA_FIELDCAT-TABNAME = 'I_EKPO'.
      WA_FIELDCAT-FIELDNAME = 'MEINS'.
      WA_FIELDCAT-SELTEXT_M = 'UOM'.
      APPEND WA_FIELDCAT TO I_FIELDCAT.
      CLEAR WA_FIELDCAT.
    WA_FIELDCAT-TABNAME = 'I_EKPO'.
      WA_FIELDCAT-FIELDNAME = 'NETPR'.
      WA_FIELDCAT-SELTEXT_M = 'PRICE'.
      APPEND WA_FIELDCAT TO I_FIELDCAT.
      CLEAR WA_FIELDCAT.
    ENDFORM.                    "BUILD_FIELDCATLOG_EKPO
    *&      Form  event_call_ekpo
    *   we get all events - TOP OF PAGE or USER COMMAND in table v_events
    FORM EVENT_CALL_EKPO.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
       EXPORTING
         I_LIST_TYPE           = 0
       IMPORTING
         ET_EVENTS             = V_EVENTS
    * EXCEPTIONS
    *   LIST_TYPE_WRONG       = 1
    *   OTHERS                = 2
      IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    "event_call_ekpo
    *&      Form  POPULATE_EVENT
    *        Events populated for TOP OF PAGE & USER COMAND
    FORM POPULATE_EVENT_EKPO.
      READ TABLE V_EVENTS INTO WA_EVENT WITH KEY NAME = 'TOP_OF_PAGE'.
      IF SY-SUBRC EQ 0.
        WA_EVENT-FORM = 'TOP_OF_PAGE'.
        MODIFY V_EVENTS FROM WA_EVENT TRANSPORTING FORM WHERE NAME =
    WA_EVENT-FORM.
      ENDIF.
      ENDFORM.                    "POPULATE_EVENT
    *&      Form  TOP_OF_PAGE
    *       text
    FORM F_TOP_OF_PAGE.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          IT_LIST_COMMENTARY       = IT_LISTHEADER
    *    i_logo                   =
    *    I_END_OF_LIST_GRID       =
    ENDFORM.                    "TOP_OF_PAGE
    *&      Form  USER_COMMAND
    *       text
    *      -->R_UCOMM    text
    *      -->,          text
    *      -->RS_SLEFIELDtext
    *retreiving values from the database table ekko
    FORM DATA_RETRIEVAL_EKPO.
    SELECT EBELN EBELP MATNR MENGE MEINS NETPR FROM EKPO INTO TABLE IT_EKPO.
    ENDFORM.
    FORM BUILD_LISTHEADER_EKPO USING I_LISTHEADER TYPE SLIS_T_LISTHEADER.
    DATA: HLINE1 TYPE SLIS_LISTHEADER.
    HLINE1-TYP = 'H'.
    HLINE1-INFO = 'CHECKING PGM'.
    ENDFORM.
    FORM DISPLAY_ALV_EKPO.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    *   I_INTERFACE_CHECK                 = ' '
    *   I_BYPASSING_BUFFER                = ' '
    *   I_BUFFER_ACTIVE                   = ' '
       I_CALLBACK_PROGRAM                = V_REPID
    *   I_CALLBACK_PF_STATUS_SET          = ' '
    *   I_CALLBACK_USER_COMMAND           = 'F_USER_COMMAND'
       I_CALLBACK_TOP_OF_PAGE            = 'TOP_OF_PAGE'
    *   I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
    *   I_CALLBACK_HTML_END_OF_LIST       = ' '
    *   I_STRUCTURE_NAME                  =
    *   I_BACKGROUND_ID                   = ' '
       I_GRID_TITLE                      = I_TITLE_EKPO
    *   I_GRID_SETTINGS                   =
    *   IS_LAYOUT                         =
       IT_FIELDCAT                       = I_FIELDCAT[]
    *   IT_EXCLUDING                      =
    *   IT_SPECIAL_GROUPS                 =
    *   IT_SORT                           =
    *   IT_FILTER                         =
    *   IS_SEL_HIDE                       =
    *   I_DEFAULT                         =
       I_SAVE                            = 'A'
    *   IS_VARIANT                        =
       IT_EVENTS                         = V_EVENTS
      TABLES
        T_OUTTAB                          = IT_EKPO
    EXCEPTIONS
       PROGRAM_ERROR                     = 1
       OTHERS                            = 2
    IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDFORM.
    Try this links...
    http://www.****************/Tutorials/ALV/ALVMainPage.htm
    Simple ALV report
    http://www.sapgenie.com/abap/controls/alvgrid.htm
    http://wiki.ittoolbox.com/index.php/Code:Ultimate_ALV_table_toolbox
    ALV
    1. Please give me general info on ALV.
    http://www.sapfans.com/forums/viewtopic.php?t=58286
    http://www.sapfans.com/forums/viewtopic.php?t=76490
    http://www.sapfans.com/forums/viewtopic.php?t=20591
    http://www.sapfans.com/forums/viewtopic.php?t=66305 - this one discusses which way should you use - ABAP Objects calls or simple function modules.
    2. How do I program double click in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=11601
    http://www.sapfans.com/forums/viewtopic.php?t=23010
    3. How do I add subtotals (I have problem to add them)...
    http://www.sapfans.com/forums/viewtopic.php?t=20386
    http://www.sapfans.com/forums/viewtopic.php?t=85191
    http://www.sapfans.com/forums/viewtopic.php?t=88401
    http://www.sapfans.com/forums/viewtopic.php?t=17335
    4. How to add list heading like top-of-page in ABAP lists?
    http://www.sapfans.com/forums/viewtopic.php?t=58775
    http://www.sapfans.com/forums/viewtopic.php?t=60550
    http://www.sapfans.com/forums/viewtopic.php?t=16629
    5. How to print page number / total number of pages X/XX in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=29597 (no direct solution)
    6. ALV printing problems. The favourite is: The first page shows the number of records selected but I don't need this.
    http://www.sapfans.com/forums/viewtopic.php?t=64320
    http://www.sapfans.com/forums/viewtopic.php?t=44477
    7. How can I set the cell color in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=52107
    8. How do I print a logo/graphics in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=81149
    http://www.sapfans.com/forums/viewtopic.php?t=35498
    http://www.sapfans.com/forums/viewtopic.php?t=5013
    9. How do I create and use input-enabled fields in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=84933
    http://www.sapfans.com/forums/viewtopic.php?t=69878
    10. How can I use ALV for reports that are going to be run in background?
    http://www.sapfans.com/forums/viewtopic.php?t=83243
    http://www.sapfans.com/forums/viewtopic.php?t=19224
    11. How can I display an icon in ALV? (Common requirement is traffic light icon).
    http://www.sapfans.com/forums/viewtopic.php?t=79424
    http://www.sapfans.com/forums/viewtopic.php?t=24512
    12. How can I display a checkbox in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=88376
    http://www.sapfans.com/forums/viewtopic.php?t=40968
    http://www.sapfans.com/forums/viewtopic.php?t=6919
    Reward all helpful answers
    Regards
    Pavan
    Message was edited by:
            Pavan praveen

  • How to find out the total, subtotal in alv report

    hi dears,
    how to find out the total, subtotal in alv report?
    pls tell me logic ,
    i will be waiting for eply
    regards
    eswar

    Hi,
    <b>ALV Grid List with sub-totals</b>
    REPORT z_demo_alv_sort.
    * This program lists orders (VBAK) with sort and sub-total for        *
    * 'sold-to-party' (KUNNR) and 'Sales organization' (VKORG)            *
    TABLES : vbak.
    TYPE-POOLS: slis.                      " ALV Global types
    SELECT-OPTIONS :
      s_vkorg FOR vbak-vkorg,              " Sales organization
      s_kunnr FOR vbak-kunnr,              " Sold-to party
      s_vbeln FOR vbak-vbeln.              " Sales document
    SELECTION-SCREEN :
      SKIP, BEGIN OF LINE,COMMENT 5(27) v_1 FOR FIELD p_max.
    PARAMETERS p_max(2) TYPE n DEFAULT '20' OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    DATA:
      BEGIN OF gt_vbak OCCURS 0,
        vkorg LIKE vbak-vkorg,             " Sales organization
        kunnr LIKE vbak-kunnr,             " Sold-to party
        vbeln LIKE vbak-vbeln,             " Sales document
        netwr LIKE vbak-netwr,             " Net Value of the Sales Order
        waerk LIKE vbak-waerk,             " Document currency
      END OF gt_vbak.
    INITIALIZATION.
      v_1 = 'Maximum of records to read'.
    START-OF-SELECTION.
      PERFORM f_read_data.
      PERFORM f_display_data.
    *      Form  f_read_data
    FORM f_read_data.
      SELECT * INTO CORRESPONDING FIELDS OF TABLE gt_vbak
               FROM vbak
                 UP TO p_max ROWS
              WHERE kunnr IN s_kunnr
                AND vbeln IN s_vbeln
                AND vkorg IN s_vkorg.
    ENDFORM.                               " F_READ_DATA
    *      Form  f_display_data
    FORM f_display_data.
      DEFINE m_fieldcat.
        add 1 to ls_fieldcat-col_pos.
        ls_fieldcat-fieldname   = &1.
        ls_fieldcat-ref_tabname = 'VBAK'.
        ls_fieldcat-do_sum      = &2.
        ls_fieldcat-cfieldname  = &3.
        append ls_fieldcat to lt_fieldcat.
      END-OF-DEFINITION.
      DEFINE m_sort.
        add 1 to ls_sort-spos.
        ls_sort-fieldname = &1.
        ls_sort-up        = 'X'.
        ls_sort-subtot    = &2.
        append ls_sort to lt_sort.
      END-OF-DEFINITION.
      DATA:
        ls_fieldcat TYPE slis_fieldcat_alv,
        lt_fieldcat TYPE slis_t_fieldcat_alv,
        lt_sort     TYPE slis_t_sortinfo_alv,
        ls_sort     TYPE slis_sortinfo_alv,
        ls_layout   TYPE slis_layout_alv.
      m_fieldcat 'VKORG' ''  ''.
      m_fieldcat 'KUNNR' ''  ''.
      m_fieldcat 'VBELN' ''  ''.
      m_fieldcat 'NETWR' 'X' 'WAERK'.
      m_fieldcat 'WAERK' ''  ''.
      m_sort 'VKORG' 'X'.                  " Sort by vkorg and subtotal
      m_sort 'KUNNR' 'X'.                  " Sort by kunnr and subtotal
      m_sort 'VBELN' ''.                   " Sort by vbeln
      ls_layout-cell_merge = 'X'.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
                is_layout   = ls_layout
                it_fieldcat = lt_fieldcat
                it_sort     = lt_sort
           TABLES
                t_outtab    = gt_vbak.
    ENDFORM.                               " F_DISPLAY_DATA
    ***************** END OF PROGRAM Z_DEMO_ALV_SORT **********************
    Regards
    Sudheer

  • How to add the double headings in Alv Report.

    Hi All,
    Plz suggest me how to add the double headings in ALv Report.
    Ram

    Hi,
    Try out this program....
    REPORT  ypm_historycard_rep.
    TYPE-POOLS : slis.
    DATA : it_cbm TYPE STANDARD TABLE OF mara.
    DATA : it_layout TYPE STANDARD TABLE OF slis_layout_alv WITH HEADER LINE,
           wa_fcat TYPE slis_fieldcat_alv,
           it_fcat TYPE slis_t_fieldcat_alv.
    START-OF-SELECTION.
      SELECT  *
      FROM  mara
      INTO CORRESPONDING FIELDS OF TABLE  it_cbm
      where matnr = 'D80K7'.
    END-OF-SELECTION.
      it_layout-zebra = 'X'.
      it_layout-colwidth_optimize = 'X'.
      it_layout-f2code = '&ETA'.
      APPEND it_layout.
      DEFINE macro4fcat.
        wa_fcat-col_pos = &1.
        wa_fcat-fieldname = &2.
        wa_fcat-tabname = &3.
        wa_fcat-seltext_l = &4.
        append wa_fcat to it_fcat.
        clear wa_fcat.
      END-OF-DEFINITION.
      macro4fcat    '1'  'MATNR'         'IT_CBM'   'MATERIAL NO'    .
      DESCRIBE TABLE it_cbm.
      IF sy-ucomm = '&F03'.
        MESSAGE 'hi hello good morning "press enter button" this is quiz' TYPE 'S'.
      ENDIF.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
      EXPORTING
      i_callback_program                = sy-repid
    i_callback_html_top_of_page       = 'HTML_TOP_OF_PAGE'
      is_layout                         = it_layout
      it_fieldcat                       = it_fcat
       i_save                            = 'A'
      TABLES
      t_outtab                          = it_cbm
      EXCEPTIONS
      program_error                     = 1
      OTHERS                            = 2
      IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    *&      Form  html_top_of_page
    *       text
    *      -->TOP        text
    FORM html_top_of_page USING top TYPE REF TO cl_dd_document.
      DATA: l_text(255) TYPE c.
      DATA: text1(255)  TYPE c.
      DATA: t_header TYPE REF TO cl_dd_table_element ,
            wa_header TYPE REF TO cl_dd_table_area.
      CALL METHOD top->add_gap
        EXPORTING
          width = 10.
      CALL METHOD top->add_text
      EXPORTING
        text          = 'hello'
        sap_style     = 'HEADING'
    CALL METHOD top->add_gap
        EXPORTING
          width = 20.
      CALL METHOD top->add_text
      EXPORTING
        text          = 'HOW ARE YOU'
        sap_style     = 'HEADING'.
        CALL METHOD TOP->new_line
    *      EXPORTING
    *        repeat =
        CALL METHOD top->add_gap
        EXPORTING
          width = 50.
      CALL METHOD top->add_text
      EXPORTING
        text          = '____________________________________________________________'
        sap_style     = 'HEADING'.
        CALL METHOD TOP->new_line
    *      EXPORTING
    *        repeat =
        CALL METHOD top->add_gap
        EXPORTING
          width = 90.
      CALL METHOD top->add_text
      EXPORTING
        text          = 'YOU CAN TRY LIKE THIS'
        sap_style     = 'HEADING'.
    ENDFORM.                    "html_top_of_page
    Regards
    Debarshi

  • How to get the total pages in ALV report?

    Hi guys,
    Since I used page breaks can somebody please help me on how to get the total pages in ALV report?sincerely please...thanks guys.

    automatic display total page.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/e8a1d690-0201-0010-b7ad-d9719a415907
    r

  • Values not getting displayed from first page of the report.

    Values in the report is getting displayed from second page.
    First page in the report only displaying the report title and column names.
    Secone page onwards, data and column names are generated.
    Can any one please help me, with the cause of the problem.

    what reporting tool?
    Interactive Reporting
    Financial Reporting

Maybe you are looking for