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.

Similar Messages

  • How to display output with 3 levels in ALV

    He experts,
         I have on classical report & it output is with 3 levels, like
               Ex:  material no<Level-1>
                            customer no<Level-2>
                                                date<Level-3>.
             For this i used 2 select staments within select & endselect statmens.
    Now i want to display in ALV. I can't use Hierarchy FM for this bcoz more than 2 levels.
    Plz help on this
    Regards.

    Hi Kumar,
    Thanks for response
      Here i don't need drill down capability....
                   is it possible to diplay <level-1>  <level-2>   <level-3> by using ALV Grid FM. If not alternative solutions
    Regards.

  • Display output page by page in ALV

    HI all,
    can anyone pls tell me how to display output page by page in ALV
    this is urgent..
    Thanks

    Hi,
    if your case is like there sales orders,items.
    you want to prints all sales order+its items in one page
    then
    you need to build sort table.
        L_SPOS                 = L_SPOS + 1.
        IT_SORT_DATA-SPOS      = L_SPOS.
        IT_SORT_DATA-FIELDNAME = 'VBELN'.
        IT_SORT_DATA-TABNAME   = 'IT_DISPLAY'.
        IT_SORT_DATA-DOWN      = 'X'.
        IT_SORT_DATA-GROUP = '*'. "this is for page break
        APPEND IT_SORT_DATA.
        CLEAR IT_SORT_DATA.
    pass this sort info to alv fm.
    regards
    vijay

  • Idoc-xi-file scenario.  how to display file in html format

    I am not sure whether this is a valid question.........but want to confirm as it was asked by somebody
    In idoc-xi-file scenario.......  how to display file in html format ??
    Thanks in advance
    Kumar

    Hi Vijayakumar,
    Thanks for your reply !! You mean to say I got to use XSLT mapping and also .htm and .html extension together to produce the html file ?? or it is sufficient to use any one of them to produce the html file ??
    Regards
    Kumar

  • How to display 2 lines of fieldcat in alv

    hi,all.
       I wonder how to display 2 lines of fieldcat in alv,no matter grid,list ,oo.   whatever.
       thanks in anvance.

    Hi,
    it's only possible in alv-list (3 lines).
    A.

  • How to display subtotals in separate column in alv report?

    hi,
    I am displayed the subtotals  for QUantity field BDMNG in Reuse_alv_grid_display  in the same column.
    but I want to display subtotal in separate column.
    How to display subtotals in separate column in alv report?
    thanks&regards.
    samba.k

    Hi
    As far as i know you can't do this,the option you have is to create one more column (subtotal) and populate it by manual calculation at every subtotal (not alv subtotal but yours) .
    Best Regards
    Yossi

  • How to display multi line headings in procedural alv report

    Hi experts,
    How to display multi line heading in alv( procedural alv report) report.
    some columns single line and some columns multi line in the same report.
    ex: 
                  solvent consumed          solvent recovered
                   fresh |   recovery             recovery | spent                            batch no                         storage
    I am using procedural alv .pls give me idea.

    Hi Ram,
    Check the sample report [how to display multi line headings in procedural alv report|http://sample-code-abap.blogspot.com/2008/01/printing-multiple-line-header-and.html]
    Thanks,
    Duy

  • 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 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

  • Thunderbolt Display output only 800 x 600!!?!?!?!

    Just got the Mac Book Pro Quad Core, 15", 8 gig ram.
    I'm using the display output adapter in the Tunderbolt port. It outputs and syncs to my Image Pro switcher, but the options for the display output for the external only go up to 800 x 600.
    Anyone know anything about this?
    My old MacBook Pro could go up to the full resolution with the same video switcher and the same mini display output adapter.

    It's possible that the switcher isn't compatible. Safe to presume that without the switcher you can achieve the desired resolution?

  • How to display "Metadata Only" field in Update Form

    Hi,
    I have added the below configuration in Config.cfg file to make Primary File non mandatory,
    AllowPrimaryMetaFile=true
    suppressAlternateFile=true
    createPrimaryMetaFile=true
    After restarting the server it displayed "Metadata only" fileld upon selecting Primary File became non mandatory, but while updating the Content this field is not getting displayed, rather it is displaying Original File field and Primary File became mandatory.
    Could you please let me know how to make Primary File non mandatory (otherwise displaying "Metadata only") in Update form. Appreciate your help on this. Thank you.
    Thanks,
    Ashok

    Hi Srinath,
    Thank you for responding, here we need to make Primary File non mandatory by displaying "Metadata only" field. we achieved this in Check In form, we need the same in Update Form.
    From the Kyle blog, he specified that option to completely hide Primary File but our requirement is making non mandatory by introducing metadata only field.
    Thanks,
    Ashok

  • Could not display output in PDF format from a RDF file

    Hi all,
    I'm calling a report file (.RDF) from the browser using RWCGI.EXE, and specified the output in PDF format, but it always asking me to download the active-X for the PDF file generated by the report. I have Adobe Acrobat Reader installed on my machine, what could be the problem?
    thanks in advance.

    I had the same problem.
    As a quick fix, what I enventually did, if you are using WebDB and CGI, is to create an alias in the cgicmd.dat file.
    It worked after.
    Example of line:
    ===============
    web41pdf: report=web_41.rdf server=Rep60_Z11734 userid=DEMO6I/DEMO6I@PERSOEM destype=cache desformat=PDF tolerance=1440
    Then you call the URL http://<web site>/rw60cgi?web41pdf
    Yet I would be glad to understand why I also get this message.
    Philippe Dalmas.

  • How to regenerate output in XML format after having assigned RTF Template

    1. I created a concurrent request to get the output in XML data format
    2. Having created RTF File and assigned Data Definition and Template through XML Administartor Responsibility
    3. Now I want to make changes in Data Definition XML File, However I need to get the output file in XML data format, However Concurrent Request is not allowing me to get the XML output because Template is already assigned for the output and not able to de-assign template file from concurrent request.
    For some reason in XML publisher, the end date for Template is disable, I am not able to update end date for template.
    Is there any way to create an output in XML format through concurrent request after Template File is assigned to create an output? I will appreciate your help.

    This is for people who want to know more in detail. Problem is if you put end date then you have to recreate an entry and then have to go through the same process. However I have found a way to use the same file,
    Get the template_id by running the following query
    select * from xdo_templates_b
    where template_code = 'TEMPLATE_CODE'
    Run the following query to update the end_date to some previous date value
    update xdo_templates_b
    set end_date = to_date('6/9/2011','mm/dd/yyyy')
    where template_id = 162
    After that when you run request through concurrent request, it will not show the default template assigned to concurrent request. Run the request, output will be created in XML format.
    Run the following query to use the template again
    update xdo_templates_b
    set end_date = null
    where template_id = 162
    Edited by: user9941374 on Jun 10, 2011 9:20 AM

  • 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)

  • How to display Cleared/open item symbol' in alv?

    Hi Experts,
                 I am developing ALV report like faglb03,additionaly including some fields as per user requirement.here i want to display " Cleared/open item symbol' in alv.Can anyone tel me how to do this.In which and how it is stored in table?
    Thanks in Advance!

    [Formatting Column Contents|http://help.sap.com/saphelp_nw04/helpdata/en/ff/4649a6f17411d2b486006094192fe3/frameset.htm]
    check the documentation for ICON , check the table ICON for more symbols
    [Sample code of alv list|http://www.sap-img.com/abap/regarding-icon-display-in-alv.htm]]

Maybe you are looking for

  • Upgrading from OSX 10.4.9 to OSX 10.6.8 on old Mac Book Pro (2nd computer)

    Greetings I was wondering what the steps and cautions are to upgrade from OSX 10.4.11 on an old Mac Book Pro (2nd computer for shared use in household for emails, etc.) 2.33 Inel Core 2 Duo to OSX 10.6.8 or highest that I can?

  • Material attachment list

    Hello, I want to get the attachment list for a material. There are classes available to the attachemtn list as popup but I want to get this value in an internal table. Can anyone help. Thanks in advance Ramesh

  • I'm having problems with Z10

    Hello all. I'm a technology lover and I also Blackberry phones. I'm using the Z10, it is a great phone, but I have a little problem, when I access the site online games, I can not play this game on my phone thoaij. I do not know why, but you can try

  • Problem with BADI in MEANS transaction

    I am using ADDRESS1_SAVED method of BADI ,ADDRESS_UPDATE to make telephone numbers mandatory, if the field is empty, an error message comes as i have coded, but as i re-enter the correct value, there comes an internal error message that "Internal err

  • Native Supplicant "NAK requesting to use PEAP instead"

    Hello, We have a Cisco ISE infrastructure in place and we're experiencing seemingly random occurrences of users failing authentication because they're trying PEAP vs EAP. Does anyone know if it is possible to force the native Windows supplicant to us