Need to calculate one week before the user entered week

Hello Friends,
I have a ZCALWEEK object and I have created a variable on it. It is a simple 'Manual input' type of variable. We have to display a few keyfigures which will be restricted for the week value entered by the user (in variable mentioned above). Along with this we have a few keyfigures which have to be restricted for a week before i.e. user entered week -1.
I tried to use the "Set offset for variable" option, but it is grayed out. Now the solution that I see for this is to create another variable (customer exit) and calculate the previous week. However, I believe that there has to be a simpler way, in the query designer itself, of doing this i.e. without creating customer exit.
I really appreciate your timely feedback. Thanks!
Regards,
Prem.

Prem,
Variable offset should work in your case....
Chose the variable  for the KF.... keep the offset as -1.
Otherwise we need to go for customer exit....
consider a variable x fill this by the current week or week entered... take the -1 in another variable  and use it..
Cheer's
HVR.

Similar Messages

  • Calculate one month prior to user entered date by a Date/Time field

    Hi All,
    I am currently pretty new to Live cycle and have no idea about Java scripting, i have been using this site a lot for my forms and have used the FormCalc for expanding tables and so on but this one is proving difficult. I am currently designing a form that requires a calculation of one month prior to a user entered date by a Date/Time field. I have looked at multiple posts on how to do this but none have worked (they are using the Date2Num).
    Is anyone able to enlighten me please?
    I currently have:
    Date/Time field Date Due
    Date/Time field Planned Date of Review
    I need Planned Date of Review to be calculated to be 30 days prior to Date Due. How do I go about doing this? Is it incorrect to use a Date/Time field as the field type for the calculation?
    Cheers
    Brad

    You can use FormCalc to compare the user input.
    Put this script into the exit:Event of the date field.
    if (Date2Num($.formattedValue, "MM/DD/YYYY") ne date()) then
    $host.messageBox("The entered date is not todays date!")
    endif

  • Paramerterized Interactive Reports - when running or clicking on a specific page how can I stop the report from rendering BEFORE the user enters parameters.

    I wasn't able to display in pic in this post 
    But it would look something like this
    Order type  -ALL- (select list)                GO (button)
    When I come into this page - the report renders ALL the data because the SQL is as follows
      AND ol.unit_selling_price <> 0
               AND(ordertype.transaction_type_id = :P1_TEXT OR :P1_TEXT IS NULL)
                ORDER BY   3
    Its setup this way because I want all records returned if the user makes no selections BUT CLICKS the "GO" or "SEARCH" button.
    I just don't all records rendered upon initial screen entry and without user having selection options....I.E initiate via a button.
    Thanks

    Hi,
    Here is what you can do with out any hidden items.
    on report condition select request = e1
    and enter  GO
    Now when you hit the Go button which actually submits the page to perform the search right?
    Now create a branch and redirect to same page and in REQUEST enter: GO  (But make sure you are selecting when GO button clicked and make it first branch if you have any unconditional branches)
    So the report will be seen by the user only when he hits the GO button from that screen.
    Simple enough right?
    Thanks,
    Ramesh P.

  • How to set SPD workflow to send email one day before the Due Date? ?

    I need to add a step in workflow for a item tracking list: send reminder email one day before the due date.
    I thought there is an Action in SPD: wait for [Due Date] to equal [Today]minus one day
    But there is no way to do that.
    I figured may be I need to create a calculated field [cal-date] that set to: =[today] plus one day.
    Then in workflow -
    wait till [Due Date] is equal to [cal-date], and send an email
    What is the formula for the above calculated field [Today] plus one day?

    Hi,
    You can add an approval action( such as Start Approval Process) -> click "Approval" -> go to “Change the behavior of a single task” . Then you will
    see the "When Task expires" stage.
    You can have a look at the blog:
    https://www.nothingbutsharepoint.com/sites/eusp/Pages/5-Steps-to-Enhance-SharePoint-2010-Approval-Workflow.aspx 
    Thanks,
    Eric
    Forum Support
    Please remember to mark the replies as answers
    if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected]
    Eric Tao
    TechNet Community Support

  • Pricing conditions for the articles are getting triggered one day before the actual activation date to 3rd party systems through job WPMU.

    Hi SAP Guru´s,
    Currently we are sending the pricing, promotions & article master data delta load to 3rd party system from SAP ECC via SAP XI through IDOCS using daily scheduled batch jobs WPMU. IDOC segment - WP_PLU.
    Here the issue is the promotion & pricing data are sent to 3rd party system one day before the actual start date.
    Eg: Promotion 123456 which has start date as 15/05/2014 & ending on 30/05/2014 & was created & activated on 13/05/2014.
    This promotion 123456 is getting triggered from SAP ECC through batch job on 14/05/2014 morning & 3rd party system receives the data on 14/05/2014 & the promotion are getting activated at 3rd party system end on 14/05/2014 itself which actually gets active from 15/05/2014.
    Same in the case for Standard Pricing data which needs to be active from 31/05/2014 once the promotion 123456 ends on 30/05/2014.
    The standard pricing data gets triggered from SAP ECC on 30/05/2014 through batch job & reaching 3rd party system on 30/05/2014 & getting activate on 30/05/2014 itself.
    This creates more issues at the store end as well as affecting business.
    We checked at 3rd party system end & they replied that their system considers the updated time stamp & date to activate the prices & it does not considers the actual active from & active to date. They need the data to be sent from SAP ECC on the effective date of the pricing & promotions.
    Can any one help me how to change the pricing conditions beign triggered through batch job in SAP ECC based on the actual promotion & pricing conditons start date or is there any other process to trigger the data through the batch job on the actual promotion & pricing data activation date.
    Thanks in Advance.
    Thanks & Regards,
    P.P.Shankar

    Hello Shankar,
    Change the lead time in the POS Outbound Profile. You can't put less than 2 days there so data for today and tomorrow will be transferred which also means you need to adjust your batch timing accordingly.
    Sales and Distribution -> POS Interface -> Outbound -> Maintain Profile for POS Outbound.
    See if it helps. The best option would still be that the 3rd part system considers the activtion date.
    Kind Regards
    Kaizad

  • How to keep a calculation field blank until the user enters a number?

    I am building a sales sheet for a school that sells scrip as a fund-raiser. I have the document set so that when the user enters the number of scrip certificates he wants (say, two $25 gift certificates at Lowe's), the program will automatically calculate that this user owes $50 for that scrip category. However, there are more than 100 companies that one can choose from, and if the user doesn't enter a number, the calculated field shows $0. Is there a way that each field can stay blank until the user enters a number bigger than zero? By the way, I'm using this calculation to determine the value (borrowed from a user on this forum): event.value = 50 * this.getField("Lowes").value
    Thanks!

    There are two approaches. You can either add the following Validate script:
    // Custom Validate script for calculated field
    if (+event.value !== 0) event.value = "";
    Or you can change your custom Calculate script and set the Format type of the field to "None":
    // Custom Calculate script
    (function () {
        var v = +getField("Lowes").value;
        event.value = (v !== 0) ? util.printf("$%.2f", v) : "";

  • How to get the User entered value in the Submit request form for a parameter of a concurrent program in Oracle applications.

    Hi All,
    I have a requirement where i need to get the user entered value in the Parameter of a concurrent program while submitting it. i tried to query the FND_CONCURRENT_REQUESTS table but in that it stores the ID values from the value set of the Parameter.
    After submitting the Concurrent request when we click on the view Details button it opens a form where it displays the arguments in the parameter field .  i want to get that string.
    Thanks a lot in advance for your time and help.
    - Vijay

    Hi All,
    I have a requirement where i need to get the user entered value in the Parameter of a concurrent program while submitting it. i tried to query the FND_CONCURRENT_REQUESTS table but in that it stores the ID values from the value set of the Parameter.
    After submitting the Concurrent request when we click on the view Details button it opens a form where it displays the arguments in the parameter field .  i want to get that string.
    Thanks a lot in advance for your time and help.
    - Vijay

  • How to get the user entered data?

    Hi all,
    I have created an HTMLB DynPage component.
    In That i have created my input screen with textboxes using response.write method.
    i have added one onConfirm event on which the data whould validate.
    so onConfirm method im trying to get the data with request.getParameter method which returns null...
    how to do...how to get the user entered data to do my validations...can anyone plz advice.
    Thanks,
    Viswes

    Hi
    inputfield or textbox component entered directly using response.write(...) are not htmlb , but html.
    to create portal input field (ie HTMLB), you should do something like
    this in the doProcessBeforeOutput member function
    InputField field1 = new InputField("Id1");
    field1.setSize(8); // 8 characters
    this.getForm().addComponent(field1);
    and in doProcessAfterInput member function
    InputField field1 =
    (InputField) this.getComponentByName("Id1");
    you can then manipulate the content of the field.
    Hope this help,
    Guillaume

  • How to add a field to the selection screen and when the user enters ...

    hi all,
    can any one plesase send the code of how to add a field to seletiion screen and when the user enters in the field , it should be store in the database table , the table is MKPF and the field is BKTXT.  Thanks.

    Hi Kripa,
       If u r using PNP ldb then the screen u will get is the screen for that ldb and if u want to add some more fields then u define using selection-screen..as follows
    SELECTION-SCREEN BEGIN OF BLOCK mysel WITH FRAME TITLE text-111.
    PARAMETERS: n_in_en  RADIOBUTTON GROUP g1,
                q_ev  RADIOBUTTON GROUP g1.
    SELECTION-SCREEN END OF BLOCK mysel.
    SELECTION-SCREEN BEGIN OF BLOCK mysel1 WITH FRAME TITLE text-222.
    PARAMETERS: r_date TYPE sy-datum DEFAULT sy-datum.
    SELECTION-SCREEN END OF BLOCK mysel1.
    SELECTION-SCREEN BEGIN OF BLOCK mysel2 WITH FRAME TITLE text-333.
    PARAMETERS:f_ver(3) TYPE c DEFAULT 1,
               c_no(10) TYPE c DEFAULT '9D0161',
               u_id(15) TYPE c,
               password(15) TYPE c,
               r_email(30) TYPE c DEFAULT PARAMETERS: s_not TYPE c AS CHECKBOX.
    PARAMETERS:t_run TYPE c  AS CHECKBOX.
    SELECTION-SCREEN END OF BLOCK mysel2.
    SELECTION-SCREEN BEGIN OF BLOCK mysel3 WITH FRAME TITLE text-444.
    SELECTION-SCREEN BEGIN OF BLOCK mysel4 WITH FRAME TITLE text-555.
    PARAMETERS: p_ser  RADIOBUTTON GROUP g2,
    a_ser  RADIOBUTTON GROUP g2.
    SELECTION-SCREEN END OF BLOCK mysel4.
    SELECTION-SCREEN BEGIN OF BLOCK mysel5 WITH FRAME TITLE text-666.
    PARAMETERS:p_path TYPE string.
    SELECTION-SCREEN END OF BLOCK mysel5.
    SELECTION-SCREEN END OF BLOCK mysel3.
    u will get this additional screen after the screen of ldb.
    I hope this will help u..
    Thanks & Regards
    Ashu Singh.

  • How can I make the Stock Market Panel load AFTER the User Enters correct password?

    Can someone PLEASE help me. I need the Second part of this code(the Stock Market Panel) to be display after the user enters the correct username and password I have predefine. I really need to complete this project for school, Last Semester and i want to finally graduate!
    <?xml version="1.0"?>
    <mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                                     xmlns:mx="library://ns.adobe.com/flex/mx"
                                     xmlns:s="library://ns.adobe.com/flex/spark">
              <fx:Script>
                        <![CDATA[
                                  import mx.controls.Alert;
                                  public var u:String;
                                  public var p:String;
                                  public function log():void
                                            u=user.text.toLowerCase();
                                            p=pass.text.toLowerCase();
                                            if((u==''||u!='webmultimedia')||(p==''||p!='abc'))
                                                      Alert.show('Wrong userid or Password','Sorry',Alert.OK | Alert.CANCEL);
                                            else
                                                      Alert.show('Hi','Welcome',mx.controls.Alert.OK);
                                  public function clear():void
                                            user.text='';
                                            pass.text='';
                        ]]>
              </fx:Script>
              <mx:Panel id="NewForm" title="Please Log In" height="214" width="285" horizontalAlign="center" verticalAlign="middle" horizontalCenter="23" verticalCenter="2">
                        <mx:Label id="User Name" text="User Name"/> 
                        <mx:TextInput id="user" />
                        <mx:Label id="password" text="Password"/>
                        <mx:TextInput id="pass" displayAsPassword="true"/>   
                        <mx:Button id="submit" label="Submit" click="log()"/>
              </mx:Panel>
              <mx:Panel width="349" height="383" chromeColor="#1B8905" color="#FFFFFF" focusColor="#0F3CFF"
                                    fontFamily="Georgia" fontSize="21" fontWeight="bold" paddingBottom="10"
                                    paddingLeft="10" paddingRight="10" paddingTop="10" title="Stock Market">
                        <!--First Pane Of TabNavigator-->
                        <mx:TabNavigator borderStyle="solid">
                                  <mx:VBox y="71" width="371" height="334" label="Dow Jones"
                                                       chromeColor="#0A741C">
                                            <mx:Image id="loader1" source="http://dl.dropbox.com/u/8861424/stock1.png"/>
                                            <mx:RichTextEditor id="myRTE" width="355" height="286" borderVisible="true"
                                                                                       color="#000000" text="Enter Stock Comment"/>
                                  </mx:VBox>
                                  <!-- Second pane of TabNavigator -->
                                  <mx:VBox label="SandP" width="500" height="350">
                                            <mx:Image id="loader2" source="http://dl.dropbox.com/u/8861424/Untitled.png"/>
                                            <mx:RichTextEditor id="myRTE2" width="355" height="286" borderVisible="true"
                                                                                       color="#000000" text="Enter Stock Comment"/>
                                  </mx:VBox>
                                  <!-- Second pane of TabNavigator -->
                                  <mx:VBox label="Nasdaq" width="500" height="350">
                                            <mx:Image id="loader3" source="http://dl.dropbox.com/u/8861424/stock2.png"/>
                                            <mx:RichTextEditor id="myRTE3" width="355" height="286" borderVisible="true"
                                                                                       color="#000000" text="Enter Stock Comment"/>
                                  </mx:VBox>
                        </mx:TabNavigator>
              </mx:Panel> 
    </mx:Application>

    it's probably not the correct way to do it but I am more familiar with Flex4 (which use states) but this works
    however i had to remove your Alert they were throwing an error
    <mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                                            xmlns:mx="library://ns.adobe.com/flex/mx"
                                            xmlns:s="library://ns.adobe.com/flex/spark">
              <fx:Script>
                        <![CDATA[
                                  import mx.controls.Alert;
                                  public var u:String;
                                  public var p:String;
                                  public function log():void
                                            u = user.text.toLowerCase();
                                            p = pass.text.toLowerCase();
                                            if ((u == '' || u != 'webmultimedia') || (p == '' || p != 'abc'))
                                                      //Alert.show('Wrong userid or Password', 'Sorry', Alert.OK | Alert.CANCEL);
                                            else
                                                      //Alert.show('Hi', 'Welcome', mx.controls.Alert.OK);
                                                      stockMarket.visible = true;
                                                      NewForm.visible = false;
                                  public function clear():void
                                            user.text = '';
                                            pass.text = '';
                        ]]>
              </fx:Script>
              <mx:Panel id="NewForm"
                                    title="Please Log In"
                                    height="214"
                                    width="285"
                                    horizontalAlign="center"
                                    verticalAlign="middle"
                                    horizontalCenter="23"
                                    verticalCenter="2">
                        <mx:Label id="UserName"
                                              text="User Name" />
                        <mx:TextInput id="user" />
                        <mx:Label id="password"
                                              text="Password" />
                        <mx:TextInput id="pass"
                                                        displayAsPassword="true" />
                        <mx:Button id="submit"
                                               label="Submit"
                                               click="log()" />
              </mx:Panel>
              <mx:Panel id="stockMarket"
                                    visible="false"
                                    width="349"
                                    height="383"
                                    chromeColor="#1B8905"
                                    color="#FFFFFF"
                                    focusColor="#0F3CFF"
                                    fontFamily="Georgia"
                                    fontSize="21"
                                    fontWeight="bold"
                                    paddingBottom="10"
                                    paddingLeft="10"
                                    paddingRight="10"
                                    paddingTop="10"
                                    title="Stock Market">
                        <!--First Pane Of TabNavigator-->
                        <mx:TabNavigator borderStyle="solid">
                                  <mx:VBox y="71"
                                                       width="371"
                                                       height="334"
                                                       label="Dow Jones"
                                                       chromeColor="#0A741C">
                                            <mx:Image id="loader1"
                                                                  source="http://dl.dropbox.com/u/8861424/stock1.png" />
                                            <mx:RichTextEditor id="myRTE"
                                                                                       width="355"
                                                                                       height="286"
                                                                                       borderVisible="true"
                                                                                       color="#000000"
                                                                                       text="Enter Stock Comment" />
                                  </mx:VBox>
                                  <!-- Second pane of TabNavigator -->
                                  <mx:VBox label="SandP"
                                                       width="500"
                                                       height="350">
                                            <mx:Image id="loader2"
                                                                  source="http://dl.dropbox.com/u/8861424/Untitled.png" />
                                            <mx:RichTextEditor id="myRTE2"
                                                                                       width="355"
                                                                                       height="286"
                                                                                       borderVisible="true"
                                                                                       color="#000000"
                                                                                       text="Enter Stock Comment" />
                                  </mx:VBox>
                                  <!-- Second pane of TabNavigator -->
                                  <mx:VBox label="Nasdaq"
                                                       width="500"
                                                       height="350">
                                            <mx:Image id="loader3"
                                                                  source="http://dl.dropbox.com/u/8861424/stock2.png" />
                                            <mx:RichTextEditor id="myRTE3"
                                                                                       width="355"
                                                                                       height="286"
                                                                                       borderVisible="true"
                                                                                       color="#000000"
                                                                                       text="Enter Stock Comment" />
                                  </mx:VBox>
                        </mx:TabNavigator>
              </mx:Panel>
    </mx:Application>

  • How do I create a form field ONLY template in Acrobat 9 Pro that will let the user enter and print only the form field data on a pre-printed form?

    This template will be used to type in information that will then be printed on an agency's official, barcoded form loaded in a printer (instead of blank paper.)  Only the user-entered info should print on the pre-printed form.  Users will use Adobe Reader to complete their templates; they do not have Acrobat.  Thank you!

    Use the template as non-printable background and add the form fields.

  • How to find the user entered value is Integer or not?

    hi,
    i want to find, whether the user entered value is Integer or not. If it is Integer, i wanna continue the program. otherwise send an error message. i tried to find for function in API. But i couldn't. can somebody help me with sample code. very urgent.

    Do a Integer.parseInt(<string value>) in a try catch block If a NumberFormatException is thrown, the entered number is not an integer.

  • How to get the user entered  header text on a delivery

    Hi All,
    I am looking for a internal table which holds the user entered text in header text of the delivery. I was able to find header data in XTHEAD table. But actual lines(entered text)  in which structure it holds. I checked TLINETAB but its empty.
    My requirement is to check the user enterd text to validate at userexi_save .
    Any help will be appreciated
    Thanks
    Sai.

    Hi all,
    Thanks for ur replies.
    I already tried READ_TEXT. but its not giving the current value.
    check the following code:
            CLEAR lv_valid.
            READ TABLE catalog
                  INTO ls_catalog
                  WITH KEY tdobject = c_vbbk1
                             tdname = likp-vbeln
                               tdid = c_z043.
            IF sy-subrc = 0.
              CHECK ls_catalog-function NE 'D'.
              CALL FUNCTION 'READ_TEXT'
                EXPORTING
                  id                      = ls_catalog-tdid
                  language                = ls_catalog-tdspras
                  name                    = ls_catalog-tdname
                  object                  = ls_catalog-tdobject
                TABLES
                  lines                   = lt_tline
                EXCEPTIONS
                  id                      = 1
                  language                = 2
                  name                    = 3
                  not_found               = 4
                  object                  = 5
                  reference_check         = 6
                  wrong_access_to_archive = 7
                  OTHERS                  = 8.
              IF sy-subrc = 0.
                CLEAR lv_valid.
                READ TABLE lt_tline INTO ls_tline INDEX 1.
                CALL METHOD z2cl_utilities=>is_valid_text
                  EXPORTING
                    p_text  = ls_tline-tdline
                  IMPORTING
                    p_text1 = lv_text1
                    p_text2 = lv_text2
                    p_valid = lv_valid.
                IF lv_valid IS  INITIAL.
                  MESSAGE e504(z2vl) WITH lv_text1 lv_text2.
                ENDIF.

  • Add WHERE criterias in addition to what the user enters on search page

    Hi,
    This may be a simple problem, but I have not been able to solve it.....Is there a way for me to code another search criteria in addition to what the user enters?
    I'm trying to create a simple search page. Basically, user logs on, i get his acoount number and save it in a variable. Then whatever the user's search criterias are , I want to add "AND ACCOUNT = ???."
    I've tried:
    In the processRequest, retrieve his account number using a VO, stored account number in variavle x and then call a initQuery(x) for the VO to get only the rows that he should be able to see. Problem A: I get 'SQLStmtException' when I test the page by trying to do a Simple Search. So to fix that, in the VOImpl, I added these two calls -- setWhereClauseParams(null); setWhereClause(null); -- after the executeQuery(). After I did this, ran into Problem B: the user could search any record that wasn't associated with his account.
    I also tried to dynamically create the vo using createViewObjectFromQueryStmt("Select * from table where account = " + x) but was not successful. The page didn't render and I received a ClassCastException similar to this thread -- Re: How to Create OAViewObject programatically
    I'm new to OAF and would appreciate any pointers on how to implement this.
    Thanks,
    LL

    Hi,
    I assume that you haven't tried the following steps..if you have and still get an error, give us the SQL statement error that is coming up. If I misunderstood your requirement, could you elaborate.
    I assume that when the user logs in you get the account number automatically.
    You could define the VO to have the following where condition 'WHERE ACCOUNT=:1'.
    Then you set the account id from the user using setWhereClauseParams(0,accountid) and call executeQuery. This would limit the result to that user.
    This will work in addition to any other search fields that might have been used in the query.
    For e.g with just the account id the sql that will be fired is
    Select attribute1, attribute2....from Tablexxx where account = :1
    Any other user search criteria given in the page will result in a ssql query like the following
    select * from (Select attribute1, attribute2 ...from Tablexx where accoount = :1) where newattribute like `%xx`
    Hope this helps. Let us know if you still have issues.
    Thank you,
    Arun

  • Need to display a value before the header based on a user parameter.

    I have a select on the user parameter list of values.
    SELECT DISTINCT GROUP_ROWID, STR_GROUP_NAME
    FROM TBL_COMPANY_GROUP;
    I select the option hide the first column in order to show only a list of values and not the row_ids.
    I need to display the str_group_name within the header as a title. I insert a field in the header and in source select the name of the parameter p_groupid but the only thing that I get is the row_id value not the name. I use the row_id to pass it on my queries but I need the name value in the header. Any ideas? Please help.
    Thanks.

    create a parameter called p_header.
    in the after parameter form trigger
    select str_group_name into :p_header
    from tbl_company_group
    where group_id = :p_groupid;Have the header field source be p_header.

Maybe you are looking for