ALV SUBTOTAL (Change at summation Level)

Hi All,
I need to add some code at the subtotal level of the ALV report output. My output shound look something like this.
     FLD1     FLD2     FLD3     FLD4
     A1     B1     1     AA
     A1     B1     2     BB
<i><b>Sum     A1     B1     3     C</b></i>
     A1     B2     11     D1
     A1     B2     22     D2
<i><b>Sum     A1     B2     33     CD</b></i>
     B1     B1     1     D1
<i><b>Sum     B1     B1     1     CCD</b></i>
     B1     B2     5     D1     
<i><b>Sum     B1     B2     5     CCDD</b></i>
I should be able insert a summation level into the output so that the FLD4 can be changed based on the total of FLD3 at the summation level.
Please let me know if this is a possibility atleast.
Thanks in advance..!
Jr.
Message was edited by: Jr Abaper

You need to build a sort table with feild you want to have for subtoal by setting one of attributes subtot    = 'X'.
Data:
      dt_sortcat TYPE slis_t_sortinfo_alv,    "table - sort table
       ds_sortcat LIKE LINE OF dt_sortcat,     "structure-sort structure
  ds_sortcat-spos      = '1'.
  ds_sortcat-fieldname = 'VBELN'.
  ds_sortcat-tabname   = 'IT_DATA'.
  ds_sortcat-up        = 'X'.
  ds_sortcat-down      = space.
  ds_sortcat-subtot    = 'X'.
  APPEND ds_sortcat TO dt_sortcat.
   ds_sortcat-spos      = '2'.
  ds_sortcat-fieldname = 'POSNR'.
  ds_sortcat-tabname   = 'IT_DATA'.
  ds_sortcat-up        = 'X'.
  ds_sortcat-down      = space.
  APPEND ds_sortcat TO dt_sortcat.
and pass the sort table to the exporting parameter IT_SORT of the REUSE_ALV_GRID_DISPLAY function module.
For Demo programs: Go to se38 and enter BCALV* and press F4 key you will get list of ALV demo programs
Message was edited by: Sid

Similar Messages

  • Specify Summation levels in ALV thru coding

    My Alv is sub-totaling on the basis of say FIELD_A.
    I am getting orange colored row showing subtotal at each new FIELD_A. till this point no problem.
    When ALV is on my screen and I go to the following Menu path:
    Settings > Summation levels > Define Drilldown >
    A popup window with title "Sum Steps [Specify Breakdown]" displays and I have selected the row "FIELD_A" and pressed button copy.
    Now my display changed to ALV with only "orange colored row " and that is what I want.
    I want the program to start with this kind of display and I want to achieve the same through code  (not variant though)

    Hi
    You should manage it by filling the parameter for sorting table.
    DATA: LT_SORT TYPE LVC_S_SORT.
    DATA: GT_SORT TYPE LVC_T_SORT.
    LT_SORT-FIELDNAME = 'FIELDA'.
    LT_SORT-UP        = 'X'.
    LT_SORT-GROUP     = '*'.
    LT_SORT-SUBTOT    = 'X'.
    LT_SORT-COMP      = 'X'. <----If you want to compress the output.
    append lt_SORT to gt_sort.
    Max
    Message was edited by: max bianchi

  • How to change default compatibility level

    How can one change the default setting for Compatibility, under Password Security - Setting. Default in Acrobat 8 is "Acrobat 5.0 and later". I would like to change this to "Acrobat 7.0 and later".

    Hi,
    You cannot change the logging level which comes in console output.
    The log configuration you have modified using EM, will change the soa log configuration. You can access the SOA logs at $DOMAIN_HOME/servers/soa_server1/logs/soa_server1-diagnostics.log file. This is the file, SOA used to store its component logs.

  • Changing the Dunning level and reports for Dunning

    How can I change the 'Dunning level' for line items in the 'Dunning History/Dunning overview'? I have read in help.sap that I can change it, but am not able to find where I could do that.
    link: http://help.sap.com/erp2005_ehp_03/helpdata/EN/bc/2127c4265911d286d6006008bbc8e8/frameset.htm (In 3rd para).
    Can anyone tell me if there are any reports available to view the 'Dunning list'(other than Dunning History in F150).
    Also, Our client needs a report which shows a list of all 'customers' and 'line items' Blocked for Dunning.
    Please give me your suggestions ASAP.
    Thanks
    Edited by: sapfan 20062007 on May 3, 2008 10:39 PM

    Thanks .
    I'm looking at running the ALFS editor . I'm in WebAS 7.00 . The Themes/templates and brand colours on the left frame does appear but the bsp page does not appear . used the standard bsp page which appears as a default ( bsp add it05 ) . The error message is as follows
    The following error text was processed in the system:
    BSP Exception: Das Objekt entrypoint.htm_sap-themeRoot=/sap/public/bc/ur/design2002/themes/alfs1000101F5FFFA2F4F4F2929296F8FAF3F5F7F in der URL /sap/bc/bsp/sap/it05/entrypoint.htm&sap-themeRoot=%2fsap%2fpublic%2fbc%2fur%2fdesign2002%2fthemes%2falfs1000101F5FFFA2F4F4F2929296F8FAF3F5F7F ist nicht gültig.
    But if I run the bsp application manually then the right theme does get picked up . I made the entry in the bspthemeroot table and put in the alfs parameter in the above url ( 1000101F5FFFA2F4F4F2929296F8FAF3F5F7F  ) . The bsp application works fine but not the alfs editor . Any ideas ?

  • I need to change the input level and I can not open the track info pane in the new garageband. Can you help me?

    I have tried the help menu. It only shows how to open the track info pane in the old garageband. It shows the info button, which is not in garageband anymore. I need to open the track info pane to change the input level. If there is another way to do this please tell me.

    Open the "Smart Controls" for your track, and then press the Info button .
    The "record level" slider is at the top of the Info panel below the track heads.

  • Exporting a project with multiple audio tracks changes the loudness level regardless of export format

    I recently had to submit a TVC and discovered that premiere was changing the loudness level after export, when the TVC failed the quality check.
    I checked the audio loudness of other formats that I had exported and the same thing had happened the audio loudness, it had changed.
    After a bit of troubleshooting I found a workaround. I mixdown all of the tracks in adobe audtion to one track and then imported it into premeire.
    Once I did this the audio loudness was not changed after exporting.
    Workflow for when it didn't work.
    I used edit in adobe audtion for the audio tracks from premiere.
    Matched the audio to the loudness level I wanted, and then saved each track.
    Export from premiere.
    To Check Audio Loudness
    Bring in exported file into new premiere project
    Edit the audio in adobe audtion.
    Drag the audio file into match audio to check loudness level.
    I am using
    Adobe Premiere Pro CC v8.1
    Windows 7 on PC
    Please fix this adobe.

    I recently had to submit a TVC and discovered that premiere was changing the loudness level after export, when the TVC failed the quality check.
    I checked the audio loudness of other formats that I had exported and the same thing had happened the audio loudness, it had changed.
    I have never experienced that or had any need for a work around.
    What did your Broadcast Quality Control pick up on?
    Audio Levels and Loudness are two different things in this regard.

  • How to change the source level in java Studio creator

    Hi,
    I am using Sun Java Studio Creator 2 Update 1 IDE, in this IDE how to change the source level to 1.5 for an existing project.
    Thanks in advance,
    Rajesh.

    Hi!
    Unfortunately Sun Java Studio Creator 2 Update 1 doesn't support 1.5 source level. But You can try to download NetBeans IDE (from http://www.netbeans.org) and there with Visual Web project You will find the same functionality as for Creator. And 1.5 source level is supported by NetBeans.
    Thanks,
    Roman.

  • File change for highest level page home page

    file change for highest level page home page
    When I got these files
    I would type server/mywork/bkb
    These files are in the server under the folders mywork/bkb
    When I type server/mywork/bkb
    The my index page would show up
    That’s fine.
    Now, I created a page called highestpage.cfm
    The purpose is for me to put the link myindex.cfm and it
    works fine.
    But my problem that I am really still confused is
    It will show up when I type server/mywork/bkb/ myindex.cfm
    But my goal is not to type that far off.
    I just want to type I type server/mywork/bkb/ without
    myindex.cfm
    And still will lead me to I type server/mywork/bkb/
    myindex.cfm
    Just like the earlier version
    server/mywork/bkb that lead me to myindex.cfm
    but only now will lead me to highestpage.cfm
    I hope I am expressing my self correctly.
    Thanks for understanding

    If I understand your situation correctly, you can accomplish
    this by setting the default web page names in your web server,
    whatever that might be - Apache, IIS, etc. The web server will have
    some default file names (web pages) that it will serve if no
    specific file is requested. this is often index.html, index.cfm,
    etc. You want to add myindex.cfm to that list.

  • Changing Billing Schedule Level for OM originated Service Contracts

    Hi,
    When we create a Service Contract from Order Management, the Billing Schedule Level is always set to Top Level and only one Billing Stream gets created.
    Can we get the Billing Schedule Level changed to other Levels viz., Equal Amount or Covered Level using any setups.
    Has anyone did any customization/extension to be able to change the Billing Schedule Level.
    The basic requirement is to have multiple billing streams for the contract, created from Order Management.
    Gurus, any ideas/suggestions to get this accomodated.

    Sid,
    I don't think you are on the right track (in my opinion). You are right that we can only create service contract from the order management (service or Extended Warranty Lines).
    If I understood correctly, you sell electronic subscriptions (like my internet service I have at home) and you are looking for way to take it from the order management so that you can bill it from Contracts and not from OM. As this is electronic service, looks like you do not have fulfill any tangible product (like magazines) from contracts. Hence you do not care about the schedule for the contract shipments. Is that correct?
    As this is not something Oracle offers (I did not find anyway), you may want to consider extending OM workflow or a batch program to create a subscription contract once the order line is fulfilled (not the program where we create service contract). This way you have flexibility to create the contract the way you want it.
    But you can always create a service contract covering a subscription item as covered product. Like I have internet service as subscription but they cover me for any incidental visits of technicians for this subscription charging me some amount every month.
    Thanks
    Nagamohan

  • Changing Billing Schedule Level for Service Contracts created in OM

    Hi,
    When we create a Service Contract from Order Management, the Billing Schedule Level is always set to Top Level and only one Billing Stream gets created.
    Can we get the Billing Schedule Level changed to other Levels viz., Equal Amount or Covered Level using any setups.
    Has anyone did any customization/extension to be able to change the Billing Schedule Level.
    The basic requirement is to have multiple billing streams for the contract, created from Order Management.
    Gurus, any ideas/suggestions to get this accomodated.

    Sid,
    I don't think you are on the right track (in my opinion). You are right that we can only create service contract from the order management (service or Extended Warranty Lines).
    If I understood correctly, you sell electronic subscriptions (like my internet service I have at home) and you are looking for way to take it from the order management so that you can bill it from Contracts and not from OM. As this is electronic service, looks like you do not have fulfill any tangible product (like magazines) from contracts. Hence you do not care about the schedule for the contract shipments. Is that correct?
    As this is not something Oracle offers (I did not find anyway), you may want to consider extending OM workflow or a batch program to create a subscription contract once the order line is fulfilled (not the program where we create service contract). This way you have flexibility to create the contract the way you want it.
    But you can always create a service contract covering a subscription item as covered product. Like I have internet service as subscription but they cover me for any incidental visits of technicians for this subscription charging me some amount every month.
    Thanks
    Nagamohan

  • Error during transport-Structure change at field level (convert table /BIC)

    Hi,
    I am trying to transport from DEV to Test when I encountered this error.
    The tables are both consistent when I checked with SE14.
    Start of the after-import method RS_CUBE_AFTER_IMPORT for object type(s) CUBE (Activation Mode)
    Error/warning in dict. activator, detailed log    > Detail
    Structure change at field level (convert table /BIC/DZCRUSDI026)
    Table /BIC/DZCRUSDI026 could not be activated
    Return code..............: 8
    Following tables must be converted
    DDIC Object TABL /BIC/DZCRUSDI026 has not been activated
    Error when activating InfoCube ZCRUSDI02
    Error/warning in dict. activator, detailed log    > Detail
    Structure change at field level (convert table /BIC/DZCRUSDI023)
    Structure change at field level (convert table /BIC/FZCRUSDI02)
    Table /BIC/DZCRUSDI023 could not be activated
    Table /BIC/FZCRUSDI02 could not be activated
    Return code..............: 8
    Following tables must be converted
    DDIC Object TABL /BIC/DZCRUSDI023 has not been activated
    Error when resetting InfoCube ZCRUSDI02 to the active version
    How do I resolve this
    thanks

    Hi,
    There are no Inactive objects in the cube in DEV system. Also must of the changes I made in Test are already in the cube in TEST But the cube is not active.
    SAP proposed that the cube be activated manually but is not a good procedure to activate in TEST system.
    Error when resetting InfoCube ZCRUSDI02 to the active version
    Message no. RSO410
    Diagnosis
    Errors arose when activating InfoCube ZCRUSDI02. An active version already existed before the activation.
    System Response
    InfoCube ZCRUSDI02 could not be reset to the old active version. Since the generated objects no longer correspond to the old active version, they were reset to inactive.
    Procedure
    The old active version of InfoCube ZCRUSDI02 can no longer be used. Remove the cause of the activation error and activate InfoCube ZCRUSDI02 anew.
    thanks

  • Alv subtotal

    HI all,
    I need subtotal based on 2 fields one is matnr and the other one is vben but i am getting subtotals based on only matnr but not on vbeln what could be the problem?
    it_sort-fieldname = 'VBELN'.
    IT_SORT-TABNAME = 'GI_FINAL'.
    IT-SORT-SPOS = '1'.
    IT_SORT-SUBTOT = 'X'.
    IT-SORT-UP = 'X'.
    APPEND IT-SORT.
    it_sort-fieldname = 'MATNR'.
    IT_SORT-TABNAME = 'GI_FINAL'.
    IT-SORT-SPOS = '1'.
    IT_SORT-SUBTOT = 'X'.
    IT-SORT-UP = 'X'.
    APPEND IT-SORT.
    Please refer the above code and suggest me
    what exact purpose of spos here?
    Thanks&Regards
    mahsh

    Hi,
    Herewith i am sending the sample coding for the ALV SUBTOTAL report.
    REPORT  YMS_ALVSUBTOTAL.
    *REPORT z_alv_sub_totals .
    TYPE-POOLS: slis.
    DATA: BEGIN OF it_output OCCURS 0,
              var1(8) TYPE n,
              var2(10),
              var3 TYPE I,
          END OF it_output.
    DATA: it_fieldcat TYPE slis_t_fieldcat_alv,
           t_fieldcat TYPE slis_fieldcat_alv,
          it_sort TYPE slis_t_sortinfo_alv,
          t_sort TYPE slis_sortinfo_alv,
          v_repid LIKE sy-repid.
    INITIALIZATION.
      v_repid = sy-repid.
    START-OF-SELECTION.
      PERFORM get_data.
      PERFORM sort_fields.
      PERFORM fill_fieldcat.
      PERFORM list_display.
    *&      Form  GET_DATA
          text
    -->  p1        text
    <--  p2        text
    FORM get_data.
      it_output-var1 = 1000.
      it_output-var2 = 'anupama'.
      it_output-var3 = '10000'.
      APPEND it_output.
      CLEAR it_output.
      it_output-var1 = 1000.
      it_output-var2 = 'siddhu'.
      it_output-var3 = '20000'.
      APPEND it_output.
      CLEAR it_output.
      it_output-var1 = 1000.
      it_output-var2 = 'chinni'.
      it_output-var3 = '100000'.
      APPEND it_output.
      CLEAR it_output.
      it_output-var1 = 2000.
      it_output-var2 = 'chicchu'.
      it_output-var3 = '10000'.
      APPEND it_output.
      CLEAR it_output.
      it_output-var1 = 2000.
      it_output-var2 = 'candy'.
      it_output-var3 = '10000'.
      APPEND it_output.
      CLEAR it_output.
      it_output-var1 = 1000.
      it_output-var2 = 'anupama'.
      it_output-var3 = '10000'.
      APPEND it_output.
      CLEAR it_output.
      it_output-var1 = 4000.
      it_output-var2 = 'anupama'.
      it_output-var3 = '10000'.
      APPEND it_output.
      CLEAR it_output.
    ENDFORM.                    " GET_DATA
    *&      Form  fill_fieldcat
          text
    -->  p1        text
    <--  p2        text
    FORM fill_fieldcat.
      PERFORM fill_fields USING: 'IT_OUTPUT' 'VAR1' 'Variable 1' ' ',
                                 'IT_OUTPUT' 'VAR2' 'Variable 2' ' ',
                                 'IT_OUTPUT' 'VAR3' 'Variable 3' 'X'.
    ENDFORM.                    " fill_fieldcat
    *&      Form  fill_fields
          text
         -->P_0146   text
         -->P_0147   text
         -->P_0148   text
         -->P_0149   text
    FORM fill_fields USING    value(tabname) TYPE slis_tabname
                              value(fieldname) TYPE slis_fieldname
                              value(seltext_m) LIKE dd03p-scrtext_m
                              value(do_sum) TYPE c.
      t_fieldcat-tabname = tabname.
      t_fieldcat-fieldname = fieldname.
      t_fieldcat-seltext_m  = seltext_m.
      IF do_sum = 'X'.
        t_fieldcat-datatype = 'CURR'.
      ENDIF.
      t_fieldcat-do_sum = do_sum.
      APPEND t_fieldcat TO it_fieldcat.
      CLEAR t_fieldcat.
    ENDFORM.                    " fill_fields
    *&      Form  list_display
          text
    -->  p1        text
    <--  p2        text
    FORM list_display.
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
       EXPORTING
         i_callback_program             = v_repid
         it_fieldcat                    = it_fieldcat
         it_sort                        = it_sort[]
       TABLES
          t_outtab                       = it_output
       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.                    " list_display
    *&      Form  sort_fields
          text
    -->  p1        text
    <--  p2        text
    FORM sort_fields.
      t_sort-fieldname = 'VAR1'.
      t_sort-tabname = 'IT_OUTPUT'.
      t_sort-spos = 1.
      t_sort-up = 'X'.
      t_sort-subtot = 'X'.
      APPEND t_sort TO it_sort.
      CLEAR t_sort.
      t_sort-fieldname = 'VAR3'.
      t_sort-tabname = 'IT_OUTPUT'.
      t_sort-spos = 2.
      t_sort-up = 'X'.
      APPEND t_sort TO it_sort.
      CLEAR t_sort.
    ENDFORM.                    " sort_fields
    Hope it will helps to u.
    Thanks,
    Shankar

  • TS1485 change the permission level for iTunes and iTunesHelper to allow full access. how do i do this

    How do i change the permission level for Itunes

    I have actually been using Amazon cloud for a while now and never had this problem. Actually, I think I did get locked out once and was able to get back in by contacting support and answering some questions. This option isn't available with Apple.. They lock you out for 90 days regardless of whether you can verify your ID. I know this because I contacted them recently and they verified my identity exhaustively and then said 'sorry-there's nothing we can do and you are not  getting a refund for time lost.'  I think I understand why the policy is there, but I think it's ridiculous that they make no exceptions even when the mistake is on their side, which I'm pretty sure it is in my case.

  • Please helpme "Cannot change transaction isolation level in the middle of "

    sorry my english helpme!!
    i am trying to insert a registry n a table in postgresql throght JAVA STUDIO CREATOR and i got the next error
    Cannot change transaction isolation level in the middle of a transaction
    helpme thanks you

    Duplicate post. Answered in the other thread.
    http://forum.java.sun.com/thread.jspa?threadID=5115855

  • Changing Transaction Isolation level in crxi2

    Post Author: Ralphred
    CA Forum: Data Connectivity and SQL
    I have a connection to a Progress 9 database and if any user is modifying a record it gets locked down and my reports cannot run.
    I want to be able to still read all the records and run the report whether other users are logged in and modifying records. I don't need them to be clean, I can use "dirty" records for this report.
    Is changing the Transaction level to Read Unconditional the best solution or should I go about this some other way. Also, If changing the level is the proper way to go how would I go about doing that?
    I am using Crystal Reports XI r2 connecting to Progress 9d database.
    Thank you

    Post Author: synapsevampire
    CA Forum: Data Connectivity and SQL
    Are you using ODBC?
    Does the ODBC driver allow for changing this?
    if not, then using a Command Object (listed as Add Command under your datasource) allows you to paste in SQL, so you can enter the syntax for allowing dirty reads and then the SQL to pull the rows.
    -k

Maybe you are looking for

  • How do i connect my macbook pro to tv?

    How do i connecyt my macbook pro to my tv so i can stream video from the internet?

  • Lcds 2.5.1 with Flex 3?

    We are running lcds 2.5.1 on our server, with an existing Flex 2.0 web app. We're now looking at upgrading our Flex code to Flex 3. Can we still use the existing 2.5.1 installation?

  • Lagarith Lossless AVI conversion to H264 color issues

    Hey, so right off the bat going to give some specs and stuff. -Adobe Media Encoder CS6, fully updated -Intel i7 3770K @4.2 GHz -AMD 2GB RadeonHD7850 -8 GB (2x4) 1333 MHz DDR3 RAM So I've got this Lagarith lossless-encoded AVI (via virtualdub) which I

  • File Properties (Meta Data) and Indexing for your Portal

    Meta Edit™ Find what you need, when you need it. If you manage a large network or portal, chances are that there are thousands of documents floating around that are difficult to locate due to poor file property information. With MetaEdit™, it’s

  • Contribute CS3 Requires Startup Password

    I administer 30 or more websites. Have been working with Contribute since version 2. Never required that I type in a password to open up the program. Yesterday when I installed Contribute CS3, and opened it up, it required a startup password. I have