How to display output in a single line?

Hi
im getting the out put in the following way
100006        1120             01
                                      02
                                      03
100007        1410            01
                                     02
                                     03
but i want the output as follows
100006         1120           01,02,03
100007          1410          01,02,03
Can any body tell me the code for this?

Hi Dilip
this is my full code
im not getting the proper out put..
eg : i have material 1000002 for this 3 inspection types are there 01,02,03
                            1000003 for this 1 inspection types are there 05
following program giving me the out put as
                            1000002      1410          03
                            1000003       2140         05
                                                               01
                                                               02
                                                               03
                                                               05
but i want the output as follows
                          1000002          1410        01
                                                               02
                                                               03
                          1000003          2140       05
can u help me on this also?
TABLES:MARC.
TYPE-POOLS: SLIS.
SELECTION-SCREEN:BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-T01.
  SELECT-OPTIONS:S_MATNR FOR MARC-MATNR.
  PARAMETERS:P_WERKS TYPE MARC-WERKS.
  SELECTION-SCREEN:END OF BLOCK B1.
  TYPES:BEGIN OF TYPE_FINAL,
        ART TYPE QMAT-ART,
        MATNR TYPE MARC-MATNR,
        WERKS TYPE MARC-WERKS,
        END OF TYPE_FINAL,
        BEGIN OF TYPE_QMAT,
        ART TYPE QMAT-ART,
        MATNR TYPE QMAT-MATNR,
        END OF TYPE_QMAT.
DATA:IT_FINAL TYPE TABLE OF TYPE_FINAL,
      WA_FINAL LIKE LINE OF IT_FINAL,
      I_FINAL TYPE TABLE OF TYPE_FINAL,
      IT_QMAT TYPE TABLE OF TYPE_QMAT,
      WA_QMAT LIKE LINE OF IT_QMAT.
      DATA: i_FCAT TYPE TABLE OF SLIS_FIELDCAT_ALV,
            W_FCAT TYPE SLIS_FIELDCAT_ALV.
field-symbols: <fs_fin> TYPE TYPE_FINAL.
  START-OF-SELECTION.
  PERFORM GET_DATA.
  PERFORM PROCESS_DATA.
  PERFORM DISPLAY_DATA.
form GET_DATA .
  SELECT MATNR
         WERKS
    FROM MARC
    INTO CORRESPONDING FIELDS OF TABLE IT_FINAL
    WHERE MATNR IN S_MATNR.
    IF IT_FINAL[] IS NOT INITIAL.
      SELECT ART
             MATNR
             WERKS
        FROM QMAT
        INTO CORRESPONDING FIELDS OF TABLE IT_QMAT
        FOR ALL ENTRIES IN IT_FINAL
        WHERE MATNR = IT_FINAL-MATNR
        AND WERKS = IT_FINAL-WERKS.
    ENDIF.
    SORT IT_FINAL BY
    MATNR
    WERKS
    ART.
    DELETE ADJACENT DUPLICATES FROM IT_FINAL COMPARING
    MATNR
    WERKS
    ART.
endform.                    " GET_DATA
form PROCESS_DATA .
move it_final to i_final.
REFRESH IT_FINAL.
LOOP AT I_FINAL assigning <fs_fin>.
LOOP AT IT_QMAT INTO WA_QMAT where MATNR = <fs_fin>-MATNR.
                               P_werks = <fs_fin>-werks.
*REFRESH i_final.
IF sy-subrc eq 0.
<fs_fin>-ART = WA_QMAT-ART.
APPEND <fs_fin>-ART TO i_final.
ENDIF.
  ENDLOOP.
ENDLOOP.
form DISPLAY_DATA .
W_FCAT-FIELDNAME = 'MATNR '.
W_FCAT-SELTEXT_M = 'MATERIAL NUMBER'.
W_FCAT-OUTPUTLEN = '18'.
APPEND W_FCAT TO I_FCAT.
W_FCAT-FIELDNAME = 'WERKS'.
W_FCAT-SELTEXT_M = 'PLANT'.
W_FCAT-OUTPUTLEN = '04'.
APPEND W_FCAT TO I_FCAT.
W_FCAT-FIELDNAME = 'ART'.
W_FCAT-SELTEXT_M = 'INSPECTION TYPE'.
W_FCAT-OUTPUTLEN = '08'.
APPEND W_FCAT TO I_FCAT.
                 " DISPLAY_DATA
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
   I_CALLBACK_PROGRAM = SY-REPID
   IT_FIELDCAT = I_FCAT[]
   I_DEFAULT = 'X'
   I_SAVE = 'A'
  TABLES
    t_outtab = i_final[].
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
  EXPORTING
    input         = WA_FINAL-MATNR.
endform.
FORM BUILD_FCAT USING FIELD TYPE SLIS_FIELDNAME
                      TEXT TYPE  dd03p-scrtext_m
                      LENGTH TYPE dd03p-outputlen.
  W_FCAT-FIELDNAME = FIELD.
  W_FCAT-SELTEXT_M = TEXT.
  W_FCAT-OUTPUTLEN = LENGTH.
  APPEND W_FCAT TO i_FCAT.
  CLEAR W_FCAT.
  ENDFORM.
thanks & Regards
Smitha

Similar Messages

  • Displaying items in a single line in ALV grid using  ALV_TOP_OF_PAGE.

    Hello Guys,
    I am having a problem in displaying items in a single line in the ALV Grid using event ALV_TOP_OF_PAGE.
    My requirement is to group items on a single line i.e. in the example below, Vendor code and posting date are on the same line. The next line the prints Vendor Name and Document no.
    Vendor Code: 123123                               Posting Date : 01.01.2011
    Vendor Name: ABCD                                 Document No: 152246598.
    Here is my code in subroutine 'ALV_TOP_OF_PAGE', 
      wa_list_comments-typ = 'S'. 
      wa_list_comments-key = ''.
      wa_list_comments-info = 'Vendor Code'.
      APPEND wa_list_comments TO it_list_comments.
      wa_list_comments-typ = 'S'. 
      wa_list_comments-key = ''.
      wa_list_comments-info = 'Posting Date'.
      APPEND wa_list_comments TO it_list_comments.
    The above code prints in the following format i.e one below the other,
    Vendor Code: 123123                              
    Posting Date : 01.01.2011.
    I also tried using HTML_TOP_OF_PAGE, but it didn't work.
    Can anybody please help me out with this.
    Regards,
    Danish.

    Hi Danish,
    Your problem is with the alignment and you need some fix positions .
    The solution i feel is u can use as below :
    In CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    use 
    i_callback_html_top_of_page       = 'HTML_TOP_OF_PAGE'.
    Now on calling routine call use cl_dd_document class :
    FORM html_top_of_page USING document TYPE REF TO cl_dd_document .
    data : doctable TYPE REF TO cl_dd_table_element,
              col1_t1 TYPE REF TO cl_dd_area,
              col2_t1 TYPE REF TO cl_dd_area,
              col1_t2 TYPE REF TO cl_dd_area,
              col2_t2 TYPE REF TO cl_dd_area.
    add quick table with five columns
        CALL METHOD lw_document->add_table
          EXPORTING
            no_of_columns               = 2
            border                      = '0'
         cell_background_transparent = ' '
            width                       = '100%'
          IMPORTING
            table                       = doctable.
    Filling columns in row
        CALL METHOD doctable->add_column
          EXPORTING
            width  = '40%'
          IMPORTING
            column = col1_t1.
    Filling columns in row
        CALL METHOD doctable->add_column
          EXPORTING
            width  = '60%'
          IMPORTING
            column = col2_t1.* Filling columns in row
    Call method doctable->new_row.
        CALL METHOD doctable->add_column
          EXPORTING
            width  = '40%'
          IMPORTING
            column = col1_t2.
    Filling columns in row
        CALL METHOD doctable->add_column
          EXPORTING
            width  = '60%'
          IMPORTING
            column = col2_t2.
    *Now adding the texts
    lw_text1 = 'your first text'
    CALL METHOD col1_t1->add_text
          EXPORTING
            text = lw_text.
    *Similarly add text for other columns
    *Adujust % in width to adjust the column as required
    Endform.
    Hope this will solve your problem .

  • How to display values and new char line (blank line)

    Hi,
    In database, one field contains values followed by new character lines (blank lines) after blank lines there is no values. Finally, I would say the field contains values and blank lines. Every thing is fine in database.
    In Crystal Reports the field is displaying only values. Need to display values and blank line.
    User is asking after values new character lines (blank line) to be shown. They enter like that in an application. The user doubt is why report is not showing what they enter in the application.
    In detail explanation, front end tool is ASP.NET and backend is SQL Server.
    User enter some values in note field, after that they hit enter button in the same field, cursor will go next line...user may hit u2018enter buttonu2019 more than 5 times. So note field contain values and some blank lines which are created by after hitting enter button.
    If user opens the application, they could see values plus blank lines in the note field.
    They are fine with the application.
    In Crystal Reports, the note field shows only values.
    User is questioning that why we could not see in report we enter.
    I checked in .Net application and SQL server database it is fine. It is displaying values and blank line.
    Please help me out how to display values followed by blank lines in Crystal Reports - the way they enter in the application.
    Thanks and Regards,
    Manjunath N. Jogin

    Hi,
    Sharonmat,
    I tried as you suggested. It is still displaying only values.
    I would like to explain again.
    it is not exactly null values.
    In .Net application it is called 'new char line'.
    it shows those many lines look like null.
    it is working fine in database.
    Why it is not working in Crystal Reports? I am wondering...
    Thanks for your suggestion.
    Debi,
    User may enter any number of blank lines or they may not enter blank lines.
    That is the reason I can not always give more height or blank text object.
    Thanks for your suggestion.
    Please suggest me some more suggestions,
    Thanks and Regards,
    Manjunath N. Jogin

  • How to display 7 values of  single field in row wise.

    hi,
    how to display 7 values of  single field in row wise.
    thankx in advance.

    hi ,
    do it like this :
    1 Place ur UI element in tranparent container with Layout as Row Data and Layout Data as Row Head Data
    2 Ur first  UI , which contains the first value as Row Head Data ,
    3 Others as Row Data
    u can do it with Matrix Data as well
    if u want to give space , u can use HORIZONTAL GUTTER and set its width to medium / large / Xlarge
    also there is a UI element "INVISIBLE ELEMENT" ,
    1 u can use this UI element to provide space between ur other UI elements in the view
    2 u can insert a text element as well , and in the Text property of the element press ALT + 0160.
    u can give the space bw UIs as desired.
    regards,
    amit

  • HOW TO CREATE 2 PARAMETER IN SINGLE LINE.

    Please do NOT POST IN ALL CAPITALS
    HI,
    HOW TO CREATE TWO PARAMETERS IN A SINGLE LINE AND THE INPUT HAS TO BE DISPLAYED IT IN A POP UP BOX. THIS IS MY TRAINING TASK HELP ME TO SOLVE IT.
    REGARDS,
    SREERAM
    Edited by: Matt on Mar 19, 2009 1:26 PM

    hi,
    SELECTION-SCREEN BEGIN OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(10) text-001.
    PARAMETERS:
    p_carrid TYPE spfli-carrid.
    SELECTION-SCREEN COMMENT 30(10) text-002.
    Parameter p_connid TYPE spfli-connid.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK b1.
    Radio buttons in a single line.
    SELECTION-SCREEN BEGIN OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(10) text-001.
    PARAMETERS p_rad RADIOBUTTON GROUP grp.
    SELECTION-SCREEN COMMENT 30(10) text-002.
    Parameter p_rad1 RADIOBUTTON GROUP grp.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK b1
    Thanks
    Sharath

  • How to avoid output file and error lines when condition does not match

    Hi Experts
    A customer want to send purchase order files to several vendors and each vendor has their own requirement to content and file format. I have prepared scenarios for each vendor and a template is (conditionally) called when CardCode matches. It works fine, - PO file is generated when CardCode matches, but error lines are written to SAP B1 Control Center each time CardCode does not match the one defined in a scenario (100 or more times per day). Problem is that these error lines does not get automatic deleted. Conditional processing are made in this way:
    Result Message in SAP B1 Control Center when CardCode does not match:
    I tried to avoid an error line in SAP B1 Control Center when CardCode does not match in this way:
    Then no error lines are written to SAP B1 Control Center, but an output file is generated each time (order file when CardCode matches and an empty file when CardCode does not match).
    Any suggestions on how to avoid both errors types (error lines in SAP B1 Control Center and empty output files)?
    Or - can lines in SAP B1 Control Center be automatic deleted?
    Regards
    Steen

    Hi Steen,
    using <b1im_skip> should be the right approach, if you're working with B1 OUTBOUND.
    Following extract form the B1i help describes the usage to skip the outbound processing:
    1.1 Skipping Outbound Processing
    If you do not want to hand over the message to the receiver system, the scenario step can create a special tag that indicates to generic processing in the integration framework to skip the message processing.
    Add the following to the final transformation atom (atom0):
    <b1im_skip xmlns= ”” info=”my info” msglog=”true” msgout="yes">
    If the integration framework skips the message, it puts the message log information to the Filtered section, if the message log is switched on. The result message contains the Message skipped by vBIU logic information.
    info
    To display an individual message, define it using the info attribute.
    msglog
    If you want to avoid an entry in the message log, introduce the msglog attribute and set it to false.
    msgout
    To display the skip information in the Success section of the message log, use the msgout attribute and set it to yes.
    In case you don't want any MsgLogEntry in case of a skipped message, please enter the following in final atom0:
    <xsl:template name="transform">
    <xsl:attribute name="pltype">xml</xsl:attribute>
    <xsl:choose>
    <xsl:when test="$msg/BOM/BO/Documents/row/CardCode=&apos;C20000&apos;">
    <xsl:call-template name="transform2"/>
    </xsl:when>
    <xsl:otherwise>
    <b1im_skip info="skipped" msglog="false"/>
    </xsl:otherwise>
    </xsl:choose>
    </xsl:template>
    Best regards
    Bastian

  • How to display the the tablix column lines upto footer in rdlc report

    How  to display the the column lines upto footer in rdlc report.If data are less it should go upto bottom (footer) based on data.
    For Example.I have 2 items.it should display 2 items and lines should continue upto footer.
         | S.No| Name      |    Qty   |    Active   |  UNIT  | Amount |
         |   1   |  A            |     1      |       4       |   34    |   43       |
         |   2   |  B            |     6      |       3       |   23    |   45       |
         |        |                |             |                |           |    
             |
         |        |                |             |                |           |    
             | 
         |        |                |             |                |           |    
             |  
         |        |                |             |                |           |    
             |
                                   Footer                 
    If I have 5 items.it should display 5 items and lines should continue upto footer.
         | S.No| Name      |    Qty   |    Active   |  UNIT  | Amount |
         |   1   |  A            |     1      |       4       |   34    |   43       |
         |   2   |  B            |     6      |       3       |   23    |   45       |
         |   3   |  C            |             |       4       |   47    |   56       |
         |   4   |  D            |     3      |                |   56    |   47       |  
         |   5   |  E            |     4      |       4       |   45    |   45       |
         |        |                |             |                |           |    
             |
         |        |                |             |                |           |    
             |
                                   Footer                 
    like that it should be adjust based on data length.
    please help me how to do it in RDLC (asp.net and c#).....
    Your help would be highly appreciated!
    Thank you very much in advance!

    Hi M.S.GopalKrish,
    According to your description, it seems that you want to make the tablix rows to fill page size? We can configure the text box height size to work around the issue.
    Use this method, we need to calculate the average height size of the text box in the tablix. For more details, please see:
    We can use
    RowNumber() function to calculate the row number of the tablix.
    Calculate the page height size of the tablix in Property windows.
    Use the page height size divided by row number. We can get the average height size of the text box.
    Hope this helps.
    Regards,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • How to display output parameters in storedprocedures in front end?

    hi all ,thank you for all the support.
    Now i want your help .Here below i have given the general format of stored procedure we are using in our application . In procedure we are catching the exception and assigning to an output variable P_STATUS .
    If any exception occurs ,How we display this caught exception from front end that means how we display the exception in front end .We are using VB.NET and VS 2005 and Oracle 9i for development.
    CREATE OR REPLACE PROCEDURE SELECTINTERVALS
    P_MINVAL INTEGER,
    P_MAXVAL INTEGER,
    P_INTERVAL     INTEGER,
    P_USERID VARCHAR2,
    P_STATUS OUT VARCHAR2
    AS
    BEGIN
              SELECT STATEMENT or INSERT STATEMENT     
    EXCEPTION
              WHEN OTHERS THEN
              ROLLBACK;
              P_STATUS:=SQLERRM;
    END;
    If anybody knows, please help me
    thanks & regards

    Both methods are wrong. Returning error/exit codes for the reasons I've stated above.
    As for handling the exception... If you want to propagate the exception, then DO NOT CHANGE IT INTO A MEANINGLESS USER EXCEPTION!
    This is useless:
    WHEN OTHERS THEN
    ROLLBACK;
    P_STATUS:=SQLERRM;
    RAISE_APPLICATION_ERROR(-20011, SQLERRM);
    Why it is meaningless? Because the caller now has to parse the error message to determine just what the actual root exception was... as the root exception number has been replaced with a meaningless number.
    This is meaningful and (almost) correct:
    [pre]
    when OTHERS then
    rollback;
    raise; -- re-raise the exception
    PS. It makes better sense to trap the actual exception like no data found, duplicate PK violations, etc... it seldom makes sense to trap all other exceptions and then do something like a rollback.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How to Issue Output for a Single Handling Unit from Shipment

    Hi,
    I would like to know how to issue an Output for a Single Handling Unit from Shipment, i mean i have attached an output type 'ZPN0' (Customised) to a Handling unit in the Tcode VT03N to a Handling Unit.
    VT03N>click on Handling unit icon> select a handling unit --> go to Extras --> Output --> give the Out put type (maintained)) -- > saved.
    Once i come back --> i did not find any option / icon to issue the output from VT03N for handling unit. We have an option to issue output for the Entire Shipment.
    Tried alternative by going to VT70, give the shipment no, and output type for handling unit. When executed, Getting a message "No Messages Found".
    let me know how to issue the output for a handling unit of the shipment. Only Handling Unit & not the entire shipment.
    Regards,
    Swapna

    Dear Swapna ,
    maintain out put type for handling units in V V 61

  • Getting output in a single line

    hi to alll
    i want to get output of a column in single line seprated by comma
    like in emp table i have ename column . i need out put like
    scott,king,....,..
    thanx in advance

    In 10g you could use the COLLECT aggegrator to get close:
    select deptno
    , cast(collect(ename) as string_table) staff
    from emp
    group
    by deptno
    where string_table has been defined as
    create type string_table as table of varchar2(40)
    Alternative, you can use Data Cartridge to define a new Aggregator that allows queries like:
    select d.dname
    , count(d.dname)
    , Amisvarchar2Sum(e.ename)
    from dept d , emp e
    where e.deptno = d.deptno
    group by d.dname
    where Amisvarchar2Sum is the user defined aggreation operator. The results are like:
    RESEARCH 4 ALLEN,SCOTT,BLAKE
    SALES 3 KING,BRUCE
    etc.
    See here: Oracle Data Cartridge - Extending the Database at http://technology.amis.nl/blog/index.php?p=34 for a description.
    I hope this will help you.
    Lucas

  • How to display output without fieldnames in write statements

    hi,
    can any one tell how to get output with all fields values of a table without writing fieldnames in write statement.
    giv proper code for this task.Thaks in advance.

    hiii
    if you want to write just values then you can use write statement only ..no need to do anything else.simply write as follows
    LOOP AT t_customer INTO fs_customer.
      WRITE:/ fs_customer-customer_no,
              fs_customer-customer_name,
              fs_customer-customer_amount.
    ENDLOOP
    reward if useful
    thx
    twinkal

  • How to display mapviewer labels in two lines instead of one?

    Hi,
    I have been using the addJDBCTheme to display the map along with the labels as follows:
    mapviewer.addJDBCTheme("aaa","a", "SELECT geom, col1 || ':' || col2 label_value from table_name","GEOM","","styleName","label_value","T.ROAD NAME" ,false);
    So the label is displayed as col1Value:col2Value.
    Now I need to display the label as follows:
    col1Value
    col2Value
    I tried using this
    mapviewer.addJDBCTheme("aaa","a", "SELECT geom, col1 || chr(10) || col2 label_value from table_name","GEOM","","styleName","label_value","T.ROAD NAME" ,false);
    But it doesnt work. This displays col1Valuecol2Value
    So I tried using this:
    mapviewer.addJDBCTheme("aaa","a", "SELECT geom, col1 label_value from table_name UNION ALL SELECT geom, col2 label_value from table_name","GEOM","","styleName","label_value","T.ROAD NAME" ,false);
    This actually works. Meaning it displays the label in two lines. But the two lines are almost attached together, there is no space between them at all. It is sometimes very difficult to read.
    Would really appreciate any suggestions to resolve this issue.
    Is there any other solution to display a label in two lines? I tried changing the label style to set the line-height. But that does'nt work either.
    Lakshmi

    Multiline label aren't supported as yet.
    JayantDoes MapViewer 10.1.3 (the latest version for present) support it?

  • Output shows the single line

    Dear All
    I have a form which shows the output for only one line for a give parameter. But when the same query is copied from the form it shows all 36 rows in backend. i think the issue is becuse of property palette.
    Kindly update it.
    regards
    Arifuddin
    Edited by: user11309801 on Feb 13, 2011 3:17 AM

    Ask your question at the Forms Forum @ Forms

  • How to display output only sort format in alv

    Hi Experts,
    I have one problem in alv output display. I'm developing alv report for orders raised during the period.I want to display each order wise value(netwr) and order quatity (kwmeng) . i set 8 radio buttons one radio btn click then i want output ex.in grid display click on sort then each order wise calculate the value and quantity . that particular data to display when click on radio button.
    ex:click on sort in grid display.
    (branch) (order no)     (quantity)   (value)                        (BSTNK)
    AMUM     0000003354     2             10                                    3,271
    AMUM     0000003354     1              10                                    6,542
                                                       (above qty sum 2+1=3)  
    (SUM) =   AMUM       0000003354            3                       20            9,813
    HIP2         0000003362     2           5     17,810
    HIP2             0000003362     1          5     23,075
    (sum) = HIP2          0000003362                 10           40,885
    i display output in alv griddisplay.client asking one rb put in selection screen i want output like above only sum col.
    when i click one radio button output is come like (sum) above.
    Please help me.
    Thanks & Regards,
    Balakrishna Gajula

    hi you need to use sortinfo for your requirement.
    ie see the below code.
    "declare sortinfo at data declaration
    data:   wa_sort     type slis_sortinfo_alv,      "''' add this
                layout      type slis_layout_alv.          "add this
    ""make the below changes in your fieldcat
      wa_fieldcat-tabname   = 'FINAL'.
      wa_fieldcat-seltext_m = 'Td - Rvdt'.
      wa_fieldcat-fieldname = 'QUANTITY'.
      wa_fieldcat-do_sum    = 'X'.          """"""add this to your  *QUANTITY field*
      append wa_fieldcat to it_fieldcat.
      clear wa_fieldcat.
      wa_fieldcat-tabname   = 'FINAL'.
      wa_fieldcat-seltext_m = 'temp''.
      wa_fieldcat-fieldname = 'VALUE'.
      wa_fieldcat-do_sum    = 'X'.             """"""add this to your  *VALUE field*
      append wa_fieldcat to it_fieldcat.
      clear wa_fieldcat.
    """"" you need to add this after workarea of fieldcat
      wa_sort-fieldname =  'BRANCH'.  " Here Branch indicates the fieldname
      wa_sort-subtot    = 'X'.
      append wa_sort to it_sort.
      clear wa_sort.
      wa_sort-fieldname = 'ORDERNO'.
      append wa_sort to it_sort.
      clear wa_sort.
    " in your alv fm add sortinfo
      call function 'REUSE_ALV_GRID_DISPLAY'
        exporting
          i_callback_program = sy-cprog
          is_layout          = layout
          it_fieldcat        = it_fieldcat
          it_sort            = it_sort                   """""""""add this
        tables
          t_outtab           = final                   " your internal table name
        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.
    This solves your purpose.
    Regards,
    koolspy.

  • How to display output with 5min & 10min averages?

    Hi I’ve Data Like below in SqlServer Table
    DateTimeMin
    Field
    Value
    2014-10-09 11:01:00
    some
    1
    2014-10-09 11:02:00
    some
    2
    2014-10-09 11:03:00
    some
    3
    2014-10-09 11:04:00
    some
    4
    2014-10-09 11:05:00
    some
    5
    2014-10-09 11:06:00
    some
    6
    2014-10-09 11:07:00
    some
    7
    2014-10-09 11:08:00
    some
    8
    2014-10-09 11:09:00
    some
    9
    2014-10-09 11:10:00
    some
    10
    If I Run a query, I need Output like below (5 minute average)
    DateTimeMin
    Field
    Value
    2014-10-09 11:05:00
    some
    3
    2014-10-09 11:10:00
    some
    8
    If it’s 10 minute average, I need output like below
    DateTimeMin
    Field
    Value
    2014-10-09 11:10:00
    some
    5.5
    at where clause, I've to use  DateTimeMin between
    2014-10-09 11:01:00 and 2014-10-09 11:10:00
    Please advise, how?

    Hi Visakh
    at present I'm getting output like below
    ID
    DateTimeMin
    Value
    1
    2014-10-09 11:05:00
    3
    2
    2014-10-09 11:10:00
    8
    How to get output like below(I need to add the Field Column)
    ID
    DateTimeMin
    Field
    Value
    1
    2014-10-09 11:05:00
    some
    3
    2
    2014-10-09 11:10:00
    some
    8
    I tried several ways, but unable to get it(The Field Data is same from min 1 to 10)

Maybe you are looking for