Conditional Formula for Shared DateVar

I have a subreport where I'm creating (make that trying to create) headers for the main report based on data in a table.  Below are the first few rows of the results.
What I would like to do is to create 6 Shared DateVar variables (Header1, Header2, Header3, etc) and I was trying to use this syntax:
Shared DateVar Header1 := {CMD.WeekDate} Where {CMD.RowNum} = 1
Shared DateVar Header2 := {CMD.WeekDate} Where {CMD.RowNum} = 2
Unfortunately, I get the following error:  "The remaining text does not appear to be part of the formula."  I've looked through the help file and a couple of books but can't seem to find anything that addresses this particular situation.
I would appreciate any guidance that is offered.
Thanks.
RowNum .......EOM........WeekDate
1.......................0...........4/23/2010
2.......................0...........4/16/2010
3.......................0...........4/9/2010
4.......................0...........4/2/2010
5.......................1...........3/31/2010
6.......................2...........3/31/2010

Brian,
I tried your suggestion in a separate test report and wasn't able to get it to work.  I used the code you provided in a Formula Field called "Headers", which I placed in the Page Header.
I then created another Formula Field called "Head1".  I put the following code in there:
Shared DateVar Header1;
Local DateVar H1 := Header1;
I then placed Head1 in the Page Header, too.
Next, I created a Formula Field called "Head2" and put this code in:
Shared DateVar Header2;
Local DateVar H2 := Header2;
I added Head2 to the Page Header.
When I preview the report, "Headers" shows '04/23/2010' as does "Head1".  "Head2", however, doesn't show anything.
I have no idea why this wouldn't be working as it seemed to make perfect sense to me.
Thanks.
Ron

Similar Messages

  • Condition formula for alternative calculation type

    Hi gurus,
    we need to create some condition formulas to be applied in our pricing procedure.
    Do you know where to program them in the system and what additional settings are required?
    Thanks and best regards,
    VL

    Hi Victor,
    For your query, you can create new alternative calculation or alternative condition base values in T-COde VOFM with the help of an ABAP.
    Go to VOFM T-CODE
    Then Click on Formulas then condition value or condition base value.
    You need to take Acces key from basis team to create a new calculation type for that number should start from 900 to 999.
    Tell you Abaper to take the values from internal table XKOMV, XKOMK, KONDI, XKONP there are many internal tables are there, from that you will get respective conditon type values.
    In internal table KBETR field contains condition record value & KWERT contains the calculated value.
    Read wrt condition tyep and calculate according that and pass the value.
    Try this, which will help you in resolving your query.
    If satisfied close the thread.
    Regards,
    Nagesh

  • Conditional Formula for VAT on Receipts

    Hello!
    I’m recording receipts in a table. Therefor, I’m using different columns for two different scenarii:
    E:H : input including VAT (inserting data into column F)
    I:M : input excluding VAT (inserting data into column I or/and K, as some receipts contain different VATs)
    For this example, I kept both cases on the same row, for demonstration purposes. In real life, I’d use either E:H or I:M, not both for the same row.
    So, at present, the VAT-level of 19% or 7% is selected for:
    - E:H : by the little pop-up-menu in column E, with conditional styles turning the cell to rose (7%) or blue (19%).
    - I:M : by inserting the value in either column I (for 7%) or K (for 19%).
    It feels like a dumpy workaround and I presume there is a more elegant alternative, probably based on a checkbox enabling
    - both calculation modes (inserts either “with”(F) or “without”(I or/and K) VAT)
    - inserting data in only 2 cells instead requiring 3 different columns (F, I or/and K)*
    - and reducing the actual amount of columns.
    *: One single cell would be perfect but there is still receipts containing 7%-items and also 19%-items – therefor 2 different cells are still required.
    Is there a much smarter and sleeker alternative?
    G

    Hi G,
    OK, I think (after about three attempts) I have the table structure determined.
    Column: Contents
    A: Unique ID Number for each receipt.
    B: Transaction date
    C: Month (calculated from B)
    D: Receipt number? Supplier? (does not enter into calculations?)
    E: Input column: 1+tax rate for receipts where only the tax-in total is provided.
    F: Input column: Tax-in amount for this category of receipt
    G: Net (tax-out) amount calculated from E & F
    H: Tax (Calculated from E & F)
    I: Input column: Net amount subject to 7% VAT
    J: Tax on amount in I (calculated)
    K: Input column: Net amount subject to 19% VAT
    L: Tax on amount in K (calculated)
    M: Gross (Tax-in) amount (sum of columns I-L)
    N: Cumulative Tax total to this row. (sum of J,K)
    M and N appear to ignore any amounts in column H.
    With the conditions you describe:
    ---Some receipts list only gross amounts, and must have the tax extracted from them
    ---Gross amounts in above receipts can include tax at either 7% or 19% (but at only one rate within a single receipt)
    ---Some receipts contain net amounts subject to 7% VAT AND net amounts subject to 19% VAT
    ---Each receipt is recorded on a single line
    Given those restrictions, I think you are already at the minimum number of columns. The only change needed is to include column H in the cumulative tax calculation.
    The largest design issue I see is the intermixing of input and calculation columns. Separating those would reduce the likelihood of accidently destroying one or more of the formulas with an accidentally misplaced click and keystoke.
    If the receipts could be reduced to each having items of only a single category from the list below, it is probably possible to reduce the number of input columns to 2: One for the receipt amount (which could be either a before tax, net amount or a tax included gross amount), and a second column containing a five item pop-up menu:
    " " (single space, indicating no entry yet made
    Brutto: 07%
    Brutto: 19%
    Netto:  07%
    Netto:  19%
    This would allow a set of nested IF statement to:
    Suppress the calculation if the first character is a space.
    Choose the formula to calcualte the tax based on the first character of the menu item.
    Determine the tax rate to use in the formula from the rightmost three characters of the menu item.
    And allow the Gross amount currrently in column M to be calculated from the first input column plus zero (if that was already the gross amount) or the result of the tax calculation above (if the input was a net amount).
    This could also be done with a pair of checkboxes replacing the buttom four choices on the pop-up menu, and a LEN(A)<1 test to determine if an entry has been made:
    Three formulas, each entered in row 2 and filled down from there.
    D2: =IF(LEN(A)<1,"",IF(B,A-A/IF(C,1.19,1.07),A*IF(C,0.19,0.07)))
    F2: =IF(LEN(D)<1,"",A+IF(B,0,D))
    G2: =IF(LEN(D)<1,"",SUM($D$2:D2))
    Regards,
    Barry

  • Conditional formula for invoice

    Dear All,
    Please advice on which formula I can use in PLD inorder to get the total field in AR invoice template to display total amount both for  local currency invoices and  foreign currency invoices. The foreign currency total value is a system variable of 90 while the local currency total is a system variable of 91.   currently the AR INVOICE template only shows the local currency totals. for invoices in foreign currency the total is not shown as the variable is different. What formula can i use?
    Regards,
    Monil

    Hi,
    Try this,
    ->> Open the A/R invoice(System) PLD and Save as the New PLD.
    ->> Create 2 Database Fields in End of Report or other place and Assign the DocTotal on New PLD.
    Total (Local Currency)
    Table -> OINV - A/R - Invoice.
    Column -> DocTotalSy - Document Total(SC).
    Total (Foreign Currency)
    Table -> OINV - A/R - Invoice.
    Column -> DocTotalFC - Document Total(FC).
    Regards,
    Madhan.

  • Condition type for condition record

    Hi SAP All
                 i configure the one round off condition type that type to give value is some points wise like that 0.10,0.30.0.65....but system not acceptation this values how to maintain.
         the round off condition type we r given manually or system will give na plz provide some more explanation regarding this one
       the solution help for me i will give points
    regards
    Raju

    Hi,
    If your basic requirement is just to round up condition values, you may use the following:-
    You can tackle this by using standard routine in your pricing procedure.
    In the 'Caltype' column in pricing that is "Condition formula for alternative calculation type", you need to add routine number "17 Rounding as perT001R", before those excise conditions which you want rounded.
    Additionally, in table T001R such rounding data should be maintained.
    For this goto SPRO - SAP NetWeaver - General Settings - Currencies - Define rounding rules for currencies
    here maintain: Co, Code + Currency = 100
    This will solve your problem
    Regards
    Dhananjay

  • Now to define new formulas for pricing?

    can any one please tell me a business scenario where one needs to define a new pricing formula, and how can one can do that in the system?
    points will be rewarded immediately.
    thanks
    PR

    Hi,
        As our friends suggested you can create new formulas for pricing with the Transaction code VOFM.
    Process is use VOFM(Transaction code)------>in top menu you can see Formulas, select appropriate option in Formulas lke.. Condition base value, Condition Value etc.,
    Please go through detail information:-
    Formulas are represented as FORM routines. They are used in pricing and influence the determination of prices according to predefined rules. You can specify them in pricing control. The following groups of formulas exist:
    Scale base value
    The scale base value includes FORM routines which determine the scale base value according to criteria that are not defined in the standard system. You enter the scale base value in the Scale formula field. A formula for the scale base value can define, for example, that partial quantities are taken into account.
    Condition base value
    Formulas for the condition base value take into account criteria not defined in the standard system. You enter them in the Alternative formula for condition base value field in the pricing procedure. A formula for the condition base value can define, for example, that the condition determination is based on net value or volume.
    Condition value
    Formulas for determining of the condition value include routines which determine the condition value according to criteria not defined in the standard system. You enter the formulas for the determination of the condition value in the Condition formula for alternative calculation type field in the pricing procedure. A formula for the condition value can define, for example, that the system determines the best price for the customer.
    Structure of group key
    Using this menu entry, you can edit routines that determine the base value for the scale value if group conditions are used in pricing. The system then calculates the base for the scale value from more than one document item. You can enter the routines in the Group condition routine field on the screen for defining condition types. A routine for the determination of the scale valuecan define, for example, that only a particular condition type is taken into acount.
    Rounding rules
    Using this entry, you can create and edit FORM routines that carry out a particular type of rounding in the condition record during a price change. A rounding rule could round a price that was increased by 1% to the last two places behind the decimal point, for example.
    Procedure
    To define your own formulas, proceed as follows:
    1. First check whether you can use the formulas delivered with the standard system.
    2. Either overwrite an existing formula or select a group number from the number range reserved for customer modifications (600-699) and enter the corresponding description.
    3. Program the formula in the editor.
    4. Activate the formula.
    5. Enter a long text that describes the meaning of the formula in more detail.
    6. Enter an application if you want to use the formula in a particular application area only (pricing, for example).
    7. Enter the formula in the appropriate place of the control
    NOTE:- to create new routine get Access key from Basis.
    I hope it will help you to define formulas for pricing.
    Regards,
    Venkat

  • VOFM Condition Formulas

    Hi,
    I need to create some condition formulas for some pricing procedure. In these formulas we need to check some conditions and based on that we need to set some flags in VBAK and VBAP tables thru' condition formulas.
    Is it possible to set flags in VBAK/VBAP?
    If you have any document based on Condition formulas, please send it to me.
    Thanks in advance.
    Regards,
    Umesh

    Hi Umesh,
    Please check the following links, which will give some good picture about VOFM.
    <a href="http://www.saptechsolutions.com/pdf/VOFMCopyRequirementRoutines.pdf">PDF</a>
    <a href="http://sap.ittoolbox.com/groups/technical-functional/sap-r3-dev/38996#">LINK1</a>
    <a href="http://www.sap-img.com/sap-sd/quantity-based-discounts-in-bulk-quantities.htm">LINK2</a>
    <a href="http://help.sap.com/saphelp_erp2005/helpdata/en/a1/78268609e811d2956400a0c9306667/frameset.htm">LINK3</a>
    Hope This Info Helps YOU.
    <i>Reward Points If It Helps YOU.</i>
    Regards,
    Raghav

  • Alternative formula for condition base value in cross-application

    Hi,
    I need inputs regarding an issue as:-
    In "TAXINJ" Tax pricing procedure, for a ZXXX  excise related condition type the alternate condition base value (Alternative formula for condition base value) must be of  YXXX condition type of MM Purchase pricing Procedure.
    How to acheive Alternative formula for condition base value in cross-application area as both condition type belongs to different Application area i.e.  ZXXX belongs to TX and YXXX belongs to M.
    One way or only way is thro' routine but I do not know How it works? 
    Thanking you.
    Prashant

    routine is only the best way for u in this case
    u will have to use subtot may be 6 or 4 in MM pricing procedure
    and write a routien in Tax procedure, i n that u will have to write a code where in ur sustem will featch this value in sub total and act a a base for ur cond type in Tax proc for ue condition type.
    what is your excat requirement
    there might be other work around that can help u around
    hope this works
    or write t routines one in MM and Other in Tax proc for ur issues

  • Used of 362 & 363 Alternative formula for condition base value in Define Procedures (Tcode obyz)

    Dear
             what is the  used of 362 & 363 Alternative formula for condition base value in Define Procedures (Tcode obyz)

    362 is used for to pick base value to BASB condition type from MM pricing procedure
    363 is used for all sales tax {VAT (Inventory or set -off) & CST}.
    Tax Calculation on Freight - Different Scenarios
    Please  go through this  link  and  you will know  very well a bout  362 and  363  usage

  • Modify MVGR4 in formula for condition value

    Hello everyone,
    I want to modify komp-mvgr4 in a formula for condition value. Changes in komp structure are not saved, any idea which field I have to modify?
    Many thanks!
    Andreas

    Sure. I have a new formula for a condition value which checks a lot of things to calculate the condition value. The result can also be zero. In all other cases than zero, I want to set an additional flag on the position to show that the condition is used. For this I choosed the material group 4. Now I have to modify the materialgroup 4 MVGR4 in the formula, if I change komp-mvgr4 is does not save the changes...
    Andreas

  • Alternative formula for condition base value -correct  routine

    Hi ,
    We need  correct standard routine number in "Alt. formula  for condition base value " in transaction V/08 pricing control .
    Requirement As follow :
    We have one header freight condition which is header condition and group condition in V/06 condition type setting . Lets Say " ZFRIG " the value in this condition should equally approtionate to all the items in SO .
    Ex: ZFRIG = $100 in SO header
    item 10 = ZFRIG should be  $20
    item 20 = ZFRIG should be  $20
    item 30 = ZFRIG should be  $20
    item 40 = ZFRIG should be  $20
    item 50 = ZFRIG should be  $20
    Suitable standard  routine solution  will be appreciated.
    Thanks in Advance
    Sunil

    Hi ,
    Without any Routine it adds $100 to all the line iteam , so total fright discount becomes $500.
    Thanks and regards.
    Sunil

  • What is Condition formula/call type/routines for ECS and SECess

    HI
    what is Condition formula/call type/routines for ECS and SECess (SECONDARY HIGHER EDU CESS) to assign pricing procedure
    JFACT.

    ECS reqt is 10 and a/c key os2
    SECess reqt is 10 adn a/c key os3

  • Shared DateVar in Subreport and datediff calculation in Main Report?

    Hello experts,
    I am using CRXI sp2.  I have a report that contains two subreports for different dates in the same date field that are identified by a Service Code.  The subreports have been placed in the same group footer 1a to be displayed and the calculation resides in the main report group footer 1b.  The shared variables are as follows:
    whileprintingrecords;
    shared datevar Codedate5473;
    Codedate5473:={@Codedate5473};
    and
    whileprintingrecords;
    shared Datevar Codedate5623;
    Codedate5623:={@Codedate5623}
    The main report has the following calculation is in group footer 1a.
    Whileprintingrecords;
    Shared numbervar daysbetween;
    if (isnull({@Shared 5623})or isnull({@Shared 5473})) then 0
    else daysbetween:= datediff("d",{@Shared 5623},{@Shared 5473})
    This returns negative numbers as well as calculations where one of the shared variables is null.
    I reset the calculation in the report header as well.
    Thanks for your help in advance.
    Kevin

    Hi Kevin,
    I can reproduce your issue, As per my knowledge the crystal will make some issues in null value computation as well as  shared variable  computation
    In your report i can see , you tried to access values from subreport to main report through shared variable. that will make problem. we can access values from main report to subreport without any issue using shared..dont ask me the reason..i am not the right person to say that... lol.
    The another wrong thing  i was found in your formula is , you are not resetting the shared variable any where.. so once the date field is null, the shared variable returning the previous value.
    So this is the solution for you..
    1,You have to add one more subreport for displaying your result., Lets say 'Sub report3'
    and create a formula, like.(Same which you have write before for the result)
    shared datevar Codedate5473;
    shared Datevar Codedate5623;
    numbervar daysbetween;
    WhilePrintingRecords;
    daysbetween:= datediff("d",Codedate5473,Codedate5623);
    daysbetween;
    2, Re- write your first two formulas like this
    For Subreport1,
    WhilePrintingRecords;
    shared dateVar Codedate5473;
    if isnull({Codedate5473}) then
    Codedate5473:=date(0,0,0)
    else
    Codedate5473:=date({Codedate5473});
    For subreport2
    WhilePrintingRecords;
    shared dateVar Codedate5623;
    if isnull({Codedate5623}) then
    Codedate5623:=date(0,0,0)
    else
    Codedate5623:=date({Codedate5623});
    Hope this will works for you,
    Cheers,
    Salah.
    Edited by: salahudheen muhammed on Aug 7, 2009 1:05 PM

  • Conditional formula in report painter.

    Hello.
    I create new CO-PA report in KE31 transaction which is based on a form.
    In transaction KE35 I define the new form and in this form I want to create formula.
    This formula should be conditional. How to define conditional formula in that kind of form.
    I can also define key figure scheme in transaction KER1 but in this transaction I also don't see possibility to define
    conditional formula.
    Conditional formula means that some value fields should be summ and some value fields should be substract
    depending on the value of characteristics.
    How to solve this problem in R/3 4.6C?
    I am waiting for help.
    Best regards
    Bogdan

    Hi,
    I don't think that we can put the conditional formula. but we can do the calcualtion by row wise or column wise.
    Thanks.

  • In VB Programming code -- How to access the formula for suppressing a field

    In VB Programming code -- How to access the formula for suppressing a field
    I am using Crystal Reports 2008 v1
    Using VB code, I am attempting to modify a Crystal Report before exporting it into a PDF format and then displaying it on the Web.
    My problem is that I am unable to access the formula used to dynamically suppress a field.
    The following code is working:
    mySections = rd.ReportDefinition.Sections
    For Each mySection As CrystalDecisions.CrystalReports.Engine.Section In mySections
       ' myFieldToChange is a String set to the text of the field I need to adjust the Suppression
       iloop = 0
       For Each RecObj As CrystalDecisions.CrystalReports.Engine.ReportObject In mySection.ReportObjects
               If mySection.ReportObjects.Item(iloop).Name.ToLower = myFieldToChange Then
                   myTextObject = CType(mySection.ReportObjects.Item(iloop), CrystalDecisions.CrystalReports.Engine.TextObject)
                   myTextObject.Text = "new field text goes here"
                   mySection.SectionFormat.EnableSuppress = True
                   '  Here is where I want to change the formula for the Suppression
                End if
                iloop = iloop + 1
        Next
    Next
    I can not find any reference to the actual suppression formula in the SDK help file.
    Note, the EnableSuppress can be set to True for False, but if there is a formula for dynamic suppression, the True or False value is overwritten.  The results of the formula determine the suppression.
    Is there a way to reference this formula.  I know that I can put on in using the Crystal Report Designer software, I need to modify this formula using VB code and the SDK.

    Hello, Mark;
    If you are using the ReportDocument object you do not have access to the Conditional Suppression formula. You can get around it by using a formula field in the report for the supression and then using the FormulaField code to change it at runtime.
    If you want to change the supression condition directly at runtime you need to use RAS and the ReportClientDocument.
    Elaine

Maybe you are looking for

  • Bex objects translated text not displayed for all

    Hi, I have an issue in Bex elements language translation in Bex report output, Translation of Bex elements to PT language has done successfully and few of the Bex elements are getting displayed in PT language, but the problem i am facing is with the

  • MacBook Pro Will Not Restart & Other Issues

    Ever since "upgrading" (I use that term loosely) to Lion, I have seen a slew of issues on my MacBook Pro. Now I recognize that my hardware may be outdated (I have a late 2007 MacBook Pro), but that should not mean that I should be encountering all of

  • Table for Valuation Price from USER EXIT - Cost Estimation

    Hi All, Can you let us know from where the system picks the price for VALUATION PRICE from USER EXIT when we have following setting in valuation variant 1.Valuation Price from USER EXIT 2.Price from Purchasing Info Records 3. Planned Price 1 Sub Stra

  • How can I prevent network administrator from changing Firefox 35.0.1 homepage

    each morning I copy a "cfg" file into my Mozilla directory which gives me my desired homepage. Each night network updates and homepage is changed to the company's default homepage...Thanks

  • HT201318 how to reimburs icloud storage bill

    Hi I want to buy icloud storage. How can I get reimbursed by Apple? I would like to know the procedure before I buy extra storage. I am asking this because I can see this message displayed on my mobile's screed that contact Apple to refund storage ch