{Date Date} Special Field

Hi,
I am using the {date date} field in my report, and wanted to know how I can modify this to show a date range of always one month before the current month. 
For example, In June, I print out a report that summarized all the data from May 1st to May 31st, and I want the May 1st to May 31st range to appear where I have the {date date} field.  I want the report to automatically update this information everytime I pull up the report. 
Can some one show me?
Thank You!
Frank

Hello,
I am not sure if this is what you need, but I created a formula that check the number of the date (which is in a parameter) and appends the correct suffix to the end. It looks like follows:
// This formula checks the date was selected and adds the corresponding suffix
// Example: 1 + "st"; 2 + "nd"; 3 + "rd"
StringVar MonthString;
IF Year({@StartDate}) = Year({@EndDate}) THEN
    // Add the ending to the start date string
    Select Day({@StartDate})
    Case 1:
        MonthString := MonthString & MonthName(Month({@StartDate})) & " " & ToText(Day({@StartDate}), 0) & "st to "
    Case 2:
        MonthString := MonthString & MonthName(Month({@StartDate})) & " " & ToText(Day({@StartDate}), 0) & "nd to "
    Case 3:
        MonthString := MonthString & MonthName(Month({@StartDate})) & " " & ToText(Day({@StartDate}), 0) & "rd to "
    Case 21:
        MonthString := MonthString & MonthName(Month({@StartDate})) & " " & ToText(Day({@StartDate}), 0) & "st to "
    Case 22:
        MonthString := MonthString & MonthName(Month({@StartDate})) & " " & ToText(Day({@StartDate}), 0) & "nd to "
    Case 23:
        MonthString := MonthString & MonthName(Month({@StartDate})) & " " & ToText(Day({@StartDate}), 0) & "rd to "
    Case 31:
        MonthString := MonthString & MonthName(Month({@StartDate})) & " " & ToText(Day({@StartDate}), 0) & "st to "
    Default:
        MonthString := MonthString & MonthName(Month({@StartDate})) & " " & ToText(Day({@StartDate}), 0) & "th to ";
    // Add the ending to the end date string
    Select Day({@EndDate})
    Case 1:
        MonthString := MonthString & MonthName(Month({@EndDate})) & " " & ToText(Day({@EndDate}), 0) & "st " & ToText(Year({@EndDate}),0, "")
    Case 2:
        MonthString := MonthString & MonthName(Month({@EndDate})) & " " & ToText(Day({@EndDate}), 0) & "nd " & ToText(Year({@EndDate}),0, "")
    Case 3:
        MonthString := MonthString & MonthName(Month({@EndDate})) & " " & ToText(Day({@EndDate}), 0) & "rd " & ToText(Year({@EndDate}),0, "")
    Case 21:
        MonthString := MonthString & MonthName(Month({@EndDate})) & " " & ToText(Day({@EndDate}), 0) & "st " & ToText(Year({@EndDate}),0, "")
    Case 22:
        MonthString := MonthString & MonthName(Month({@EndDate})) & " " & ToText(Day({@EndDate}), 0) & "nd " & ToText(Year({@EndDate}),0, "")
    Case 23:
        MonthString := MonthString & MonthName(Month({@EndDate})) & " " & ToText(Day({@EndDate}), 0) & "rd " & ToText(Year({@EndDate}),0, "")
    Case 31:
        MonthString := MonthString & MonthName(Month({@EndDate})) & " " & ToText(Day({@EndDate}), 0) & "st " & ToText(Year({@EndDate}),0, "")
    Default:
        MonthString := MonthString & MonthName(Month({@EndDate})) & " " & ToText(Day({@EndDate}), 0) & "th " & ToText(Year({@EndDate}),0, "");
//    MonthName(Month({@StartDate})) & " " & ToText(Day({@StartDate}), 0) & " to " & ToText(Day({@EndDate}), 0)
ELSE
    // Add the ending to the start date string
    Select Day({@StartDate})
    Case 1:
        MonthString := MonthString & MonthName(Month({@StartDate})) & " " & ToText(Day({@StartDate}), 0) & "st " & ToText(Year({@StartDate}),0, "") & " to "
    Case 2:
        MonthString := MonthString & MonthName(Month({@StartDate})) & " " & ToText(Day({@StartDate}), 0) & "nd " & ToText(Year({@StartDate}),0, "") & " to "
    Case 3:
        MonthString := MonthString & MonthName(Month({@StartDate})) & " " & ToText(Day({@StartDate}), 0) & "rd " & ToText(Year({@StartDate}),0, "") & " to "
    Case 21:
        MonthString := MonthString & MonthName(Month({@StartDate})) & " " & ToText(Day({@StartDate}), 0) & "st " & ToText(Year({@StartDate}),0, "") & " to "
    Case 22:
        MonthString := MonthString & MonthName(Month({@StartDate})) & " " & ToText(Day({@StartDate}), 0) & "nd " & ToText(Year({@StartDate}),0, "") & " to "
    Case 23:
        MonthString := MonthString & MonthName(Month({@StartDate})) & " " & ToText(Day({@StartDate}), 0) & "rd " & ToText(Year({@StartDate}),0, "") & " to "
    Case 31:
        MonthString := MonthString & MonthName(Month({@StartDate})) & " " & ToText(Day({@StartDate}), 0) & "st " & ToText(Year({@StartDate}),0, "") & " to "
    Default:
        MonthString := MonthString & MonthName(Month({@StartDate})) & " " & ToText(Day({@StartDate}), 0) & "th " & ToText(Year({@StartDate}),0, "") & " to ";
    // Add the ending to the end date string
    Select Day({@EndDate})
    Case 1:
        MonthString := MonthString & MonthName(Month({@EndDate})) & " " & ToText(Day({@EndDate}), 0) & "st " & ToText(Year({@EndDate}),0, "")
    Case 2:
        MonthString := MonthString & MonthName(Month({@EndDate})) & " " & ToText(Day({@EndDate}), 0) & "nd " & ToText(Year({@EndDate}),0, "")
    Case 3:
        MonthString := MonthString & MonthName(Month({@EndDate})) & " " & ToText(Day({@EndDate}), 0) & "rd " & ToText(Year({@EndDate}),0, "")
    Case 21:
        MonthString := MonthString & MonthName(Month({@EndDate})) & " " & ToText(Day({@EndDate}), 0) & "st " & ToText(Year({@EndDate}),0, "")
    Case 22:
        MonthString := MonthString & MonthName(Month({@EndDate})) & " " & ToText(Day({@EndDate}), 0) & "nd " & ToText(Year({@EndDate}),0, "")
    Case 23:
        MonthString := MonthString & MonthName(Month({@EndDate})) & " " & ToText(Day({@EndDate}), 0) & "rd " & ToText(Year({@EndDate}),0, "")
    Case 31:
        MonthString := MonthString & MonthName(Month({@EndDate})) & " " & ToText(Day({@EndDate}), 0) & "st " & ToText(Year({@EndDate}),0, "")
    Default:
        MonthString := MonthString & MonthName(Month({@EndDate})) & " " & ToText(Day({@EndDate}), 0) & "th " & ToText(Year({@EndDate}),0, "");
My formula also checks to see if the year is the same between the date range and appends the year number at the end of the string if it is; otherwise it adds the year for each date.
Hopefully this helps out a little bit

Similar Messages

  • Why Due Date is necessary field

    Hi
    When i entering FI document via F-02, I had a problem with Due Date.
    First Style : (Next screen due date is must field)
    Document Type: KA
    Posting Key: 29
    Special G/l : 0
    Account: [Vendor Account]
    Second Style : (Next screen due date is hide)
    Document Type: KA
    Posting Key: 29
    Special G/l : 1
    Account: [Vendor Account]
    There is only one field changed for this situation. And this changes the accounts used!
                   Reconsolidation Acc.    Account    
    for Special G/L 0 :        320    336
    for Special G/L 1 :        320    196
    I checked this transactions.
    1- OBA7 [Document Type] This is related for just Reference text and Document Header Text
    2- OBC4 [Field Status Groups]
    3- OB41 [Posting Key Field Status]
    All field status groups sets the Due Date field suppressed. But For the First Syle, It is required field and not hidden.
    And I could not find out How it can be.
    Any help please...

    Hi,
    Please check any "Validation" is there or not.
    If message starts with z then it is validation issue
    regs
    sunoj

  • Data carrier & application field are not getting displayed in CV04N

    Hi Guru's
    In TCode : CV04N,  data carrier & application field are not getting displayed.
    While i compare with my IDES system, data carrier & application fields are getting displayed in CV04N.
    Let me know is there any configuration that has been missed out.
    Regards
    Bhanu

    Hi Bhanu,
    Please note that the fields 'Data carrier' & 'Application field'  are visible only if no document type is entered.
    Suppose you enter a document type and press ENTER then these fields disappear. This is because the field 'Application' was designed when only the storage is archive, vault or SAP-SYSTEM was possible and the number of added originals was limited.
    Currently DMS allows storage of originals on Content Server and there is no limit on the number of added originals, the system behavior was changed due to performance reasons. To avoid performance problems if you search for a document with a lot of originals attached this field gets invisible if you enter a document type which uses the KPRO storage.
    Regards,
    Pradeepkumar Haragoldavar

  • Not getting data for 1 field in ODS

    Hi BW Experts,
    I am loading the data from R/3 to BW.I have loaded the data through PSA.The data is available in New data field. After activating the ODS, for 1 field the data is not uploaded and in the report, the values are not displaying.
    I have checked the Transformations also. it is mapped correctly.But still i am not getting data for that field.
    Thanks,
    Siva.

    Thanks for the Update
    1. What is your Service Pack Level?
      Service Pack is 0016
    2. Are you able to see the data in PSA?
       Yes I can see the data in PSA
    3. After load, are you able to see the value in New table?
       Yes i can able to see the data in New data table
    4. Anywhere, are you doing the SORTING of Data Package?
       No I have not sorted the data Package.I have not written any coding on this
    I have not written any coding in transformation also.
    Thanks,
    Siva.

  • How to retrieve data from a field of CLOB datatype?

    How can I retrieve data from a field of CLOB datatype in Oracle
    8 being called from an ASP or VB application? The recordset
    object in ASP or VB doesn't support the CLOB datatype.
    Thank you in advance for your help.

    How can I retrieve data from a field of CLOB datatype in Oracle
    8 being called from an ASP or VB application? The recordset
    object in ASP or VB doesn't support the CLOB datatype.
    Thank you in advance for your help. Hello.. were you able to solve your problem? I'm faced with pretty much the same task.. I have a VBA application that needs to pull various pieces of data(CLOBs, BLOBs, etc..) from an Oracle8i db.

  • How to extract data from the fields present in two or three tables

    Hi Experts,
          I have a scenario where i have to extract data from the fields of different tables. e.g. let there 2 tables which have some number of fields . I want the data of 3 fields each from these 2 tables. How can i get that??
    Sam

    Hi
    You can create view in tcode se11..
    here you include all tables from which you want to fetch the data..
    you need to give selection condition here
    eg..
    say select empname from table A, select empadd from table B.. where empno(from A)=empno(from B)
    (note that you dont need to write queries like this.. i have just given u the example)
    After creating the view you can create datasource in RSO2..
    Regards
    Swati

  • How do I post data in HTML fields

    Hi.
    I need to log onto a web server from LabVIEW 7.1. I have this working in VB, but I don't know how to use the Microsoft Web Browser ActiveX object (specifically how to find the types of some variants).
    In VB, I'd do the following to post data into two fields and click a button:
    WebBrowser1.Document.frames(1).loginform.UserName.Value = "username"
    WebBrowser1.Document.frames(1).loginform.Password.Value = "password"
    WebBrowser1.Document.frames(1).loginform.Item(2).Click
    From the web browser object in LV I can navigate to the URL, and decode the Document variant which seems to be of type MSHTML.DispHTMLDocument. How do I proceed from here? How do I access the different frames, forms, data fields and buttons on the web page?
    Since variants in LabVIEW carry type descriptors internally, it'd be nice to have some way to access this so I wouldn't have to guess what object prototype to convert the variant with.
    Regards
    Steen Schmidt
    CLA and CTA. Worked with LabVIEW from 4.0 to 2010 and counting...

    Hi Steen,
    I was workin in an application of accessing frames, forms and then buttons in web pages in background...
    In labview there was a problem in the MSHTMLDocument.frames functions and so will not be able to get the frames ..
    but it is possible to access forms in a page directly...i have an eg for searchin in google..(i have attached the vi)
    I need to know whether it is possible in VB to go to a particular frame in a page and then if the frame has a form i need to login in form in that frame...
    Could you please share me the code in VB (for the same)..so that it would be helpful for me...and also is it possible to make dll in vb and use in other enviorment like VC++..
    REGARDS
    vevek
    Attachments:
    autologin.vi ‏67 KB

  • Problem with Refreshing the data bound text fields

    Folks,
    First of all, this a GREAT product and I am moving my apps from Eclipse to Studio Creator. I am very impessed with it so far.
    I am gone through most tutorials, but can't help resolve the problem that I am having. I have a page, that lists all the users in a table. When you click on any user, it opens up another page that lists the detail of the specific user you have clicked on. This a typical use in most web applications, right?
    In the user detail page, I open it in "Read" only mode, by setting the "setReadOnly" to true for all text field components. Then users can edit it by clicking "Edit" button. Edit button just changes the "setReadOnly" to false, to allow editing. After editing, they can hit the "Save" button to save the changes. In the save button, I call this code:
    public void prerender() {
            try {
                userID=getSessionBean1().getUserID();
                getSessionBean1().getWeb_userRowSetUserDetail().setObject(1,userID);
                getWeb_userDataProviderUserDetail().refresh();
                info("prerender: Refresh called");
            } catch (Exception ex) {
                error("Error in userForm.prerender():"+ex.getMessage()+ex.getStackTrace());
                log("Error in userForm.prerender():", ex);
            setReadWrite();
    public String btnSave_action() {
            try {
                getWeb_userDataProviderUserDetail().commitChanges();
                getWeb_userDataProviderUserDetail().refresh();
                info("Data Provider Refreshed in SAVE");
                _readOnly=true;
                form1.discardSubmittedValues("saveVForm");
                info("User Updated New:"+userID);
            } catch (Exception ex) {
                log("Error Description", ex);
            return null;
        public String btnEdit_action() {
            try {
                _readOnly=false;
                //info("User ID Edt="+getSessionBean1().getUserID());
            } catch (Exception ex) {
                error("Error in userForm.btnEdit_action:"+ex.getMessage()+ex.getStackTrace());
                log("Error in userForm.btnEdit_action():", ex);
            return null;
        private void setReadWrite(){
            // Set read-only to true or false for all text fiels
            this.btnEdit.setVisible(_readOnly);
            this.btnSave.setVisible(!_readOnly);
            this.user_id.setReadOnly(_readOnly);
            this.user_email_client.setReadOnly(_readOnly);
            this.user_email_office.setReadOnly(_readOnly);
            this.user_fname.setReadOnly(_readOnly);
            this.user_lname.setReadOnly(_readOnly);
            this.user_id.setReadOnly(_readOnly);
            this.user_password.setReadOnly(_readOnly);
            this.user_password_conf.setReadOnly(_readOnly);
            this.user_phone_cell.setReadOnly(_readOnly);
            this.user_phone_cell_aac.setReadOnly(_readOnly);
            this.user_phone_client.setReadOnly(_readOnly);
            this.user_phone_home.setReadOnly(_readOnly);
            this.user_phone_office.setReadOnly(_readOnly);
        }When the save button is clicked, the database is updated (as I can verify by looking directly into the database), but the data-bound text fields do not display the new value. YES, I am calling refresh() on data provider? I tried to call refresh in both "preRender()" and "Save" button action event, but that did not help either.
    Please note that the save button also changes the "setReadOnly" back to TRUE for all text fields. That means, users view the page in Read-Only mode after saving. (They have to click on "Edit" button again to edit it). I discovered that if I do not set the text field components in "ReadOnly" mode, then they display the updated value of the fields. But if I change setReadOnly to TRUE, then they display the old values (before the save).
    Any idea what I am doing wrong here?
    Thanks

    Here is my experience with it. I have three text
    boxes to be filled out. They are part of a virtual
    form with an add button as the submit. You can fill
    out the 3 and add them and a node is added to a tree
    component. When you click on a node in the tree
    component (the submit to another virtual form that
    the 3 buttons participate in) the text fields should
    be loaded with the values that they where added with.Hard to tell from this explanation, but if the text fields do not participate in a virtual form, then they are not going to get updated when an action in the virtual form happens. Not sure this is your problem. Like I say, hard to tell from this explanation.
    They will not display the values though...having
    nothing to do with read only. If I disable them
    before hand...they display the updated values. If I
    set their value at the top or bottom of prerender,
    they display the change...if I set the value in an if
    conditional that is hit (I have checked many times)
    in prerender, they will not display the values. If I
    set them in the tree handler anywhere, they will not
    display the values. This is very frustrating and is
    wasting tons of my time...I simply want to load the
    text fields based on the tree node that was
    clicked...I have messed with this for hours and it
    certainly does not work.Well, setting them in the tree handler won't work because the tree handler gets called in the page instance that handles the submit and not the page instance that renders the response.
    Posting your prerender code might help. Also, your action handler.
    >
    >
    - Mark

  • Error by inserting data into a field of datatype LONG

    Hi,
    When inserting data into a field of datatype long in oracle8 database via SQL Plus or SQL worksheet there occurs the following error message: "field in data file exceeds the maximum length".
    If I access to the database from a selve written program via odbc there is no problem when inserting the data by the same sql statement.
    So what can I do?
    Thanks in advance!
    Juergen

    What does your SQL statement look like?

  • Error when trying to set a date type edit field

    Hi all
    I have an edit text field in a form which is bounded to a date type
    database field using dbDataSource.
    When i try to set the edit text field value with Today's date by code.
    I recieve an error message that the value which
    i'm trying to set is not legal. the  error number is [131-183].
    I use the following code to set the edit field:
    If oEditText.Value.Trim = String.Empty Then
                Dim strDate As String
                Dim sboBob As SAPbobsCOM.SBObob =
                 oCompany.GetBusinessObjec(SAPbobsCOM.BoObjectTypes.BoBridge)
                 rs = sboBob.Format_DateToString(Microsoft.VisualBasic.Today)
               strDate = rs.Fields.Item(0).Value.ToString().Trim()
    Try 
           oEditText.Value = strDate
    Catch ex As Exception
        SBO_Application.MessageBox("error setting
    current date: " & ex.Message)
    End Try
    End If
    My question is how can i set the edit field with a valid value?

    Hi!
    When writing to EditText.Value you must always use the B1 "DB-Format" as String.
    The following examples are assuming (it's a must!) that the EditText-Fields are bound to a corrosponding DataSource (Type Date, Price etc...)
    MyDateEditTxt.Value="20080207"
    MyPriceEditTxt.Value="1341.79"
    The best of it: It's Windows and SBO-GUI-Language independent.
    EditText.String must always be written with the format of the actual Language of the SBO-GUI, which can be changed by the user....
    You may also have a look at my statements regarding these problems near the end of this thread:
    [How to pass date value to an UDF;
    Cheers,
    Roland

  • Problem in assigning date valje to field

    Hi,
    I have  a problem in assignning date value to field.
    i am retriving date from a table and assigning it to a field which is date type in the form.. but it is not reflecting..
    Error: form Bad Value..
    how to assign the date values in the form..
    Mahi

    Hi mahendra,
    I think the Bad Value Error Occurs only if the databound datasource in the form must have different data type...
    oForm.DataSources.UserDataSources.Add("eDate", SAPbouiCOM.BoDataType.dt_DATE, 10);
      SAPbouiCOM.EditText oEdit;
      oEdit = oForm.Items.Item("1").Specific;
      oEdit.DataBind.SetBound(true, "", eDate);
    with Regards,
    MadhuSudhana Rao.G

  • MM - Material master data - move standard field to another view

    Hi everyone,
    ÉCC 6.0 - release 7.0.
    I've been adding many custom fields in Material master data MM01/02/03. Now I got a problem because we have to use a standard field in another view.
    The field MARA-HERKL is set up to 'SV'(attribute V_130F-PSTAT):
    Warehouse management = S
    Sales = V
    I want to add 'K - Basic data' in this field's attribute at OSMR Tcode , but this attribute is disactivated. I can not change this value.
    I've check this note 306966 that mention: You cannot create new entries and delete entries in client 000. This client contains only the entries delivered by SAP which are used for distinguishing customer-specific fields and SAP standard during the maintenance of the other clients.
    Is there any problem whether I delete this field and afterwards create it with the new values?
    I'm not in client 000. So, I want to just make sure I will do a legal change.
    thank you in advance,
    Alexandre

    None tips, Closed.

  • Changing data types of  fields in structures

    Hello,
       Currently we are working for upgrade to ECC 6.0 .
       In some transactions we are using BAPI_MATERIAL_SAVEDATA to create material.
      We have some additional fields in MARA and MARC table , which we fill using BAPI_TE_MARA and BAPI_TE_MARC structures.
        In these structures we have different data types for fields earlier in 4.6C
    Now this function module is only working if we change  data types of  fields in these structures only to char type. It is going for dump , if we maintain any other data type.
      Could any body tell me why should we change for char data type ?
    Regards,
      SATYA

    Hi,
    Check enhancement category (Extras --> Enhancement Category) for structures before enhancement. For example, for BAPI_TE_MARA structure, enhancement category is given as character type or numeric type. That means you can add the fields of data type only C and N. No other data types are allowed. If you select as not classified then you can add any data type. This option plays important role while enhancement.
    Regards,
    Prasanth

  • How to delete data from single field in a database table?

    Hi guys,
         Plz suggest me How to delete data from single field in a database table?
    thnks,
    pavan

    hi
    in addition to abv details..chk this:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb3aef358411d1829f0000e829fbfe/content.htm
    http://dev.mysql.com/doc/maxdb/en/34/ee7fbd293911d3a97d00a0c9449261/content.htm
    regards,
    madhu

  • Transfer the response data from response field of a webservice.

    Hi Experts,
    I am working on Consuming the webservice in the Adobe Form,
    My requirement is like i have to populate different set of fields from the responses i get from the webservice, based on the click of different buttons.
    Say i have to populate Fields f1 & f2, if Button B1 is pressed, and f3 & f4 if Button B2 is pressed.
    Hope i have made my requirement till now.
    Now i have written the script to shift the data from the fields generated from WebService to the fields where i actually require the data i.e. f1 & f2 in the above case at teh "validate" event of the response fields from webservice.
    but it always gives me some popup stating this field's validate failed, which should not be there.
    So, any help from you that give me a solution that shifts the data immediately on the population of response fields wihout a popup, would be helpful and highly appreciated.
    Thanks,
    Amita

    Hi,
    Consider that you have three fields "f1", "f2", "f3" and want to populate the data in the fields "f2" and "f3" based on the value entered in the field "f1" through webservice.
    So write the JavaScript Coding in the "Change" Event of the field "f1" for eg.
         var cURL = 'http://webservice';
         var service = SOAP.connect(cURL);
         xfa.connectionSet.DataConnectionName.execute(0);
    and there itself after the above script write the other validations for fields "f2" and "f3" and populate the values to the respective fields.
    For Binding to the respective fields: go to the field object pallete and in binding tab define the binding of webservice in the "Import/Export" binding at the Last.
    And if you want to do any validations for the fields "f2" and "f3" then define two more fields like "hiddenf2" and "hiddenf3" and do make the presence of these fields to hidden and do specify the binding of webservice and after the JavaScript WebService call populate do the required validations and after that populate the values to the respective fields.
    Regards
    Pradeep Goli

Maybe you are looking for

  • Any way to back up FAT formatted external hard drive to Time Machine?

    I'm a photographer, and right now my library of photos is a complete mess. I have about 20 GB of photos on one external hard drive and about 30 GB on my Mac's built in hard drive. I recently purchased a new external hard drive to use with Time Machin

  • I am not authorized to view my screenshots. what can i do?

    my computer will not allow me to view my screenshots/screencaptures that i have taken. it says that i am not authorized to view them but i always have been. what may i do to fix this?

  • Programing issue

    Hi Gurus, Can someone please help me with one issue. I copied the program from this forum and adopted it with my selections and it works ok before Unicode. Now we will have an Unicode system and the program doesn't work anymore. The xls file is creat

  • How to manipulate records inside customized modules and reflect to the seeded modules

    If we are going to add custom modules inside Oracle EBS that link to Receivables, how do we create/update/delete records inside those custom modules and make them reflect inside Receivables? Are we going to use also the Interface tables and standard

  • Edit the row on conditional basis

    Hi,     I have used the ALV Component and implemented my table. I have to show the drop down list, which i have implemented in my coding. Now i need to make edit/read only field based on the condition basis of the dropdown. i.e When the user is selec