Subtotal on every group code

Morning all,
I have created a report which is grouped by Reason Code (A numbering system 01- 999). This report produces Total Jobs, Total Lenses and their averages.
There is one slight addition I would like to add into the report.
I would like to create a formula so that report sub totals each record according to the code range.
For example:
When producing report for all codes (01- 999) It should produce results like this.
01 to 99
Sub Total
100 to 199
Sub total
200 - 299
Subtotal
and so on (upto 999).
Then Grand total of everything.
Any ideas how to achieve something like this?
Report Layout:
Grouped by - Reason code 01- 999
Group Header = Reason Code and Reason Description
Group Footer = Total Jobs, Total Lenses, Total Average
Report Footer = Total of Total Jobs, Total of Total Lenses and avg
Currently report when produced, it produces results like this
01 - 999
Total lenses, jobs and averages.
Hence there is no sub division between code ranges.
Could someone advise me on this please?
Many thanks
Regards
Jehanzeb

Thanks for your quick reply Sastry,
I have tried your method but it says a string is required here. I suspect that I am using Group Name and that is the reason why it is showing that message. Here is how I designed the formula
I named the formula "grouping"
Then entered the following code:
If GroupName ({lab_reasons.reason_code}) >= 1 and
GroupName({lab_reasons.reason_code}) <=99
then "01 - 99"
Else If GroupName ({lab_reasons.reason_code}) >= 100 and
GroupName ({lab_reasons.reason_code}) <=199
Then "100 - 199"
Else If GroupName ({lab_reasons.reason_code}) >=200 and
GroupName ({lab_reasons.reason_code}) <=299
Then "200 - 299"
Else If GroupName ({lab_reasons.reason_code}) >= 300 and
GroupName ({lab_reasons.reason_code}) <=399
Then "300 - 399"
Else If GroupName ({lab_reasons.reason_code}) >= 400 and
GroupName ({lab_reasons.reason_code}) <=499
Then "400 - 499"
Else If GroupName ({lab_reasons.reason_code}) >=500 and
GroupName ({lab_reasons.reason_code}) <=599
Then "500 - 599"
Else If GroupName ({lab_reasons.reason_code}) >= 600 and
GroupName ({lab_reasons.reason_code}) <=699
Then "600 - 699"
Else If GroupName ({lab_reasons.reason_code}) >= 700 and
GroupName ({lab_reasons.reason_code}) <=799
Then "700 - 799"
Else If GroupName ({lab_reasons.reason_code}) >=800 and
GroupName ({lab_reasons.reason_code}) <=899
Then "800 - 899"
Else If GroupName ({lab_reasons.reason_code}) >= 900 and
GroupName ({lab_reasons.reason_code}) <=999
Then "900 - 999";
I think I am doing it incorrectly. Could you please put some light on this.
Regards
jehanzeb

Similar Messages

  • Want robust solution for alternating row color, resetting every group

    I would like a solution for displaying an alternating row color for my detail rows that resets every group, so that row 1 is always gray.
    Our Crystal designer provided this code to me:
    @rowcnt formula, suppressed, placed in Detail row:
    Shared numbervar rowcnt;
    rowcnt := rowcnt + 1;
    @resetrowcnt, suppressed, placed in Group row:
    Shared numbervar rowcnt;
    rowcnt := 0;
    Formatting formula, placed in Color in Detail > Section Expert:
    Shared numbervar rowcnt;
    if Remainder(rowcnt, 2) <> 0 then
    color(241,241,241)
    else
    crWhite
    This was working fine for me.
    However, it is suddenly not working in one of my reports.
    The report does happen to have two groups (rowcount.png).
    When the report is run, all rows are colored (rowcount02.png).
    This report was previously working fine!  I'm not sure what changed.
    In any case... surely there must be standard code to do this very standard formatting.
    I would be very grateful if someone could post some robust code to accomplish the following:
    REPORT DATA IN DETAIL ROW, ALTERNATE ROW BANDING:
    - Data in Detail row displays alternating row colors
    - Odd rows are always shaded, even rows not
    - Banding resets every group / does not continue pattern from previous group
    REPORT DATA IN GROUP ROW, ALTERNATE ROW BANDING:
    Some of our reports place row data in a group row (just the way it happened).
    If you could also modify your code in this case.
    Thank you!

    Hi Abhilash/Sastry, since I'm going to switch to Sastry's formulas, could you please confirm correctness of the following. I can't actually run this report, I can only provide it to our London office, bit of a lag for testing.
    @resetrowcnt:
    Whileprintingrecords;
    Numbervar cnt:=0;
    @rowcnt:
    Whileprintingrecords;
    if {HedgeDetails.StrategyID} <> previous({HedgeDetails.StrategyID}) and
    {HedgeDetails.DealID} <> previous({HedgeDetails.DealID}) then
         Numbervar cnt:=cnt+1;
    Details section (Suppress):
    not(OnFirstRecord) and
    {HedgeDetails.StrategyID}=previous({HedgeDetails.StrategyID}) and
    {HedgeDetails.DealID}=previous({HedgeDetails.DealID})
    Please note: Suppress checkbox is selected AND the above formula is entered.
    Details section (Color):
    Whileprintingrecords;
    Numbervar cnt;
    if cnt mod 2 <> 0 Then color(241,241,241) else crwhite

  • Enter commodity code/ Group code for the hierachy

    Hi Experts,
    I am trying to create New trading goods material by copying another similar material but here the issue is when I am trying to save the material mesage says Enter commidity code/ Group code for the hierarchy. This message is coming when every thing is finish and trying to save at the end of the transaction.
    I believe we need to maintain commodity codes in customizing for sales and distribution especially foreign trade.
    Any one can give me idea what is the configuration for this step by step.
    Appreciate your help
    Thanks
    Krishna

    Hello,
    Commodity code can be configured in SPRO->Sales and Distribution->Foreign Trade/Customs->Basis data for Foreign Trade->Define Commodity Codes / Import Code Numbers By Country.
    You maintain the same at country level.
    Thanks,
    Venu

  • Valuation group code in Account determination?

    Hii
    I have 4 company codes in implementaion.
    I have to create 4 different valuation group or i can use 0001 for all 4 company codes ??
    In account determination we have to configuration setting for Group together valuatuion area??
    So explain me with my example , how accounting will happen in 4 company code , if i have sa,e 0001 valuation group code ??
    Or i should seperate ??
    Thanks

    Hi,
    A valuation grouping code consists of a group of valuation areas that can have same account determination in a specific chart of account. It is a tool that enables us to configure the automatic account determination with a minimum of effort.
    If we activate the valuation grouping code in configuration process, we have to assign a valuation grouping code to each valuation area.
    By activating and using the valuation grouping code, we donu2019t have to configure account determination for each valuation area (that is a plant or company code) if we donu2019t want to differentiate it for each valuation area. If we want the automatic account determination within a chart of accounts runs differently for valuation areas, we can assign different valuation grouping codes to these valuation areas
    We must define the automatic account determination individually for every valuation grouping code within a chart of accounts. It applies to all valuation areas which are assigned to this valuation grouping code.
    For example, if we want to differentiate the account determination for a group of two plants with another group of other three plants in a company code (where the valuation level is plant), we can assign a valuation grouping code for the group of two plants and another valuation grouping code for the group of other three plants. By doing so, we just have to configure the account determination for the two valuation grouping codes, no need for five valuation areas (plants).
    Regards
    KK

  • Valuation group code in acc determination ..?

    Hi all
    Can anybody explain ,
    1.what is Valuation group code ..?
    2.If we are having 3,4 company codes , how we have define valuation group code ..
    Thanks
    Sap-MM

    If the automatic account determination within a chart of accounts is to run differently for certain  plants (valuation areas), assign different valuation grouping codes to these valuation areas.
    You must define the automatic account determination individually for every valuation grouping code within a chart of accounts. It applies to all valuation areas which are assigned to this valuation grouping code.
    If the user enters  a plant when entering a transaction, the system determines the valuation area and the valuation grouping code
    Valuation grouping codes either reflect a fine distinction within a chart of accounts or they correspond to a chart of accounts
    check the following link
    http://help.sap.com/saphelp_40b/helpdata/es/1d/1a39516e36d1118b3f0060b03ca329/frameset.htm
    Regards
    Pramod

  • Valuation class & valuation grouping code

    Hi experts
    What is the difference between Valuation class and valuation grouping code?

    Hi,
    u2022 Valuation grouping code of the valuation area
    If the automatic account determination within a chart of accounts is to run differently for certain company codes or plants (valuation areas), assign different valuation grouping codes to these valuation areas.
    You must define the automatic account determination individually for every valuation grouping code within a chart of accounts. It applies to all valuation areas which are assigned to this valuation grouping code.
    If the user enters a company code or a plant when entering a transaction, the system determines the valuation area and the valuation grouping code.
    u2022 Valuation class of material or (in case of split valuation) the valuation type
    The valuation class allows you to define automatic account determination that is dependent on the material. for example: you post a goods receipt of a raw material to a different stock account than if the goods receipt were for trading goods, even though the user enters the same transaction for both materials.
    You can achieve this by assigning different valuation classes to the materials and by assigning different G/L accounts to the posting transaction for every valuation class.
    If you do not want to differentiate according to valuation classes you do not have to maintain a valuation class for a transaction.
    For more details refer below link:
    http://help.sap.com/saphelp_46c/helpdata/en/12/1a39516e36d1118b3f0060b03ca329/content.htm
    Thanks!
    Raju

  • Please help me how to check a material does existed group code in system (w

    Hi all,
    Please help me...
    I have inputted quantity for  tx MC 94  but when I input them into  tx MC94, I met  a message " Structure  not yet maintained for  this conbination characterstics". Step by step to show a error message as below:
    Step 1: Launch MC 94
    step 2: Enter Planning
    Step 3: Enter  Prod.Code. Material (ex: enter material code :0101010260008, this code is existed  Prod.Code )
    Step 4: Click on "Inactive Version " button
    ==> A error message is showed.
    Please help me how to check a material does existed group code in system (which table to  check  it)?
    How to record the message" Structure  not yet maintained for  this conbination characterstics" to catch up it in my program?
    Thank in advance.

    Karenloria,
    1. Check in MC8C, which Infostructure is used for Planning type "Planning" or the one you are entering in the intial screen of MC94.
    2. Using transaction MC63 for the infostructure identified in step 1, check the planning hierarchy maintained. If this product is not maintined maintain using MC62.
    You can also check using SE16 transction the current infostructe records(Plan) for the table name = infostructure identified in step 1.
    Regards,
    Prasobh

  • Valuation grouping code in fi-mm integration

    hi,
    i have doubt in valuation grouping code, as for as my knowledge one type of raw material used by number of company codes (if same chart of accounts) for above all company codes used same raw material assaign to one variable (for ex "x" ) this variable assaign to one ' valuation class ' this valuation class assaign to one g/l account.
    is it currect or not, any one have some clearity pl explain
    with regards
    raja sekhar.a

    i close it

  • Valuation Grouping Code same- Valuation Class different for each plant

    Hi All,
    We have 5 plants assigned to the company code. We have same Chart of Accounts (1000) and all the plants are grouped together to one valuation grouping code(001).
    Now if i extend the material codes to different plants, i am able to give each valuation class to each plant. So what is the use of giving same valuation grouping code for all plants?
    I expected some error message when i changed valuation class for another plant since all plant were grouped together to one valuation grouping code. Please explain.
    Regards,
    Rosh

    Hi Rosh,
    There is a meaning of grouping valuation areas using valuation grouping code
    e.g.   Plant 1000  valuation grouping code - 0001
             Plant 2000  valuation grouping code - 0002
    Lets say  you have 3010  valuation class for material A in both plants
    So while determining  GL account for BSX key following will be combination
    VGC / Valuation         modifierValuation class         GL
    0001                                       3010                        2000
    0002                                       3010                        3000
    Means using VGC  u can Differenciate account determination for plants under same Company code
    Vishal...

  • Is there a way I can make a light not affect every group that is in 3D?

    Is there a way I can make a light not affect every group that is in 3-d?

    select the group Inspector>Properties>Lighting and switch the shading to off....

  • Totals after every group of rows - formating help

    Hi,
    What I need is to make the cells darker where the totals are after every group of rows. How do I do that?
    Also, I'm trying to remove the fact that they're merged cells for downloading to Excel (on another report for further analytics).
    Ex: a group of rows show multiple opportunities for an account. The Total NSR value (Revenue) for all the rows for the one Account is displayed after the rows and I don't want this on one of our reports.
    Thanks,
    Anita

    Are you talking about some pre-built report or a custom report you have created?

  • How to Create New Hierarchy and Group Codes

    Hi,
    I have a requirement for create New Hierarchy Code and Group Codes...
    Please let me know the procedure of it..
    Thanks...

    solved

  • Account determination with valuation grouping code

    We currently have 25 plants (valuation areas) setup using one chart of accounts and a common valuation grouping code for account determination. We now have a need to change one of the plants to use different accounts than the other 24 for the GBB transaction. I can see that transaction OMWD allows me to enter a different valuation group code by plant; so I've entered a different code for the plant we want to change. I then go into OBYC, double-click on GBB and I can see all the accounts set up. From here, if I press the 'rules' button I can see the options to base account determination on. Currently, the 'valuation modification' checkbox is unchecked - I believe this has to be checked in order to use the valuation grouping code.
    I'm a little unclear on how to setup the different accounts for the valuation grouping code I've assigned to my one plant. When I checked the 'valuation modification' checkbox and save, I get a message 'the current account determination will be deleted if the rules are changed'. I've done this in a sandbox environment and it certainly does delete all the accounts setup for GBB! But it does then give me the option to enter the valuation grouping code, which is what I need to enter different accounts.
    Am I doing this correctly and in the right sequence? Is there a way to save the current values in GBB so they don't go away when I choose 'valuation modification'?

    Hi Leslie,
    Based on your problem statement, if all the 25 plants are associated to a valuation grouping code, ideally your GBB key should have had the valuation modifier checked in the rules.
    If it were not checked, then your current account determination for GBB key will get deleted when you add or delete a rule. Reason being the characteristics for account determination have now changes. Example, if you account determination is based on Valuation class as well, then earlier GBB had Valuation Classs/ Account but with the new rule it will have Valuation Mod./Valuation Class/ Account. SAP can't automatically map your previous account determination to the new account determination.
    Best way to move forward is to take a screenshot or save your account determination from Table T030. Make changes to the rule. Then redo the account determination by refrecing the account determination that you saved before.
    Regards

  • Create subtotal in every single invoice page in print layout design

    Dear Experts,
    1. Create a formula with Colsum(Field) in the Repetitive Footer area.
    2. In Repetitive footer area properties, General tab --> Flag the Display Repetitve Area footer in all pages option.
    It works, but the sub total keep accumulating from pages before. and the subtotal for the last page is equal to the grand total already. How do I control to just have the subtotal for every single page?
    Please help. Thanks!

    Hi Rachel
    Please add Subtotal  in page Footer it display on every page and then add grand Total in report Footer so it display as Grand Total
    Thanks
    Tausif

  • Valuation Grouping code

    I created a new valuation class and copied the same G/L accounts corresponding to the old valuation class for all valuation group code.But in omwb where used list i am not able to view the G/L accounts for some valuation group code although all accounts are maintained in OBYC for all group codes.Kindly suggest

    I created a new valuation class and copied the same G/L accounts corresponding to the old valuation class for all valuation group code.But in omwb where used list i am not able to view the G/L accounts for some valuation group code although all accounts are maintained in OBYC for all group codes.Kindly suggest

Maybe you are looking for

  • MDB Timeouts and transaction behavior

    Hi, thanks in advance for any help with this. We have a MDB where we have set the timeout to five minutes. In a particular case this timeout is being reached but even though the MDB times out the transaction and sends the message for redelivery the o

  • What is spool request how to give it

    could anybody inform me what is spool request how to give it thanx regards kals.

  • Preview Builds Branch?

    I have a few systems running 9926 and I noticed the following discrepancy today: 1. On a system on which I performed the upgrade from 9879 via mounting the ISO and running setup, the branch for Preview builds is listed as fbl_awesome. 2. On a system

  • Moving music library from one computer to another

    I need to rephrase my question: Is there a way to transfer my itunes library from one computer (that is being discarded) to my new computer that already has an itunes library on it? we have a new computer that my son put his library on, but we want t

  • Internet Browser on my 8703e

    For some reason my 8703e does not have the internet browser icon does anyone know why this would be or how I can make it appear?  It shows it on the package as a globe with a spinning arrow but it is not on my screen at all.