How to use User entered dates in intreval

Hi,
User will enter date range in variable
As per my requirment i want to use no of days between those 2 user entered dates in my calculaction
How can i achieve this at report level.
Thanks

Hi
Create a variable with intreval.
There is a function module which calculates the no of days between the days
Go to SE38 and ZXRSRU01 Program
Write the Code like this (Not exact code)  you can modify
WHEN "ZZZZZ"(Before that create a formula variable to get the number of days between the days and use the tech name of the formula variable here)
read ..the lower limit and the upper limit of the caldaz variable
FROMDATE = L_S_RANGE-low
TODATE = L_S_RANGE-HIGH
Then call the function module
Search for the function module by using days in SE37
Then pass the from and to Date to the function module it will retun the number of days
update that to table e_T_Range
You can proceed with this
Regards
M.A

Similar Messages

  • How can a user enter data as many it was specified for??

    I am writing a program that makes calculations on data entered by the user. First I ask the user how many inputs he/she wants. And my problem is how the user can enter as many input he/she asked for. How do I make the program ask for input more than once, before I do calculation on the entered data???
    I am sorry if my english is hard to understand, but I hope this was understandable.

    I think you should use a readInt() if you have such a method in your Keyboard class to ask for the numbers.
    Then create a float array with that many elements, and use the for-loop you have shown:
    for (...) {
      numbers[ i-1 ] = Keyboard.readFloat(); // numbers is a float array
      // if you let i go from 0 to i < tall, then you don't need to subtract 1 from i.
    }

  • How to handle user entered data validation

    Hi,
    In my page i have three fields
    Empname (String)
    Empnumber (Number)
    DOB (Date)
    These fields are mapped to VO which are mapped to EO.
    When user enters string in Empnumber field then it will throw user following Error "Cannot create an object of type:oracle.jbo.domain.Number with value hghfg"
    I want to display above Error in user friendly fashion.
    Where to do this and How to do this?
    And i have one more question
    can we handle all the exceptions in seter method of EOIMPL?
    -Thanks
    Mithun

    Sumit,
    I have set 'Disable Client Side Validation' in the property inspector true for submit button. Added below code for validation
    In CO
    String lb_flag= (String)am.invokeMethod("validateRVSize",prm1,prmType1);
    In AM
    public String validateRVSize(String val)
    String values = "1234567890' ";
    for (int i=0; i < val.length(); i++)
    if (values.indexOf(val.charAt(i)) < 0)
    return "false";
    return "true";
    but what i have observed is control is not at all coming to process form request. it is doing it's validation in processformdata itself, i suppose.
    because no statement is getting printed if i had entered characters in number field.
    -Mithun

  • How to compare user entered date with current date

    Hi all
    my requirement is, user allowed select one date, in code i have compare this date with current day date. it should be 15days gap other wise display error message.
    I am worried about how to get current date in code. Is there any code to get current date. please reply me with code or mail me at [email protected]
    Thanx
    keerthi

    Keerthi,
    Use the method <b>getDifference()</b> of the DateHelper.java available here.<a href="http://www.koders.com/java/fid14A61FEB1B45A64E42E1DCAD7070B46AE46340BA.aspx">DateHelper</a>
    1. Create a new folder, say Util under your src folder. (com.xyz.util)
    2. Put this DateHelper.java file in that folder,(com.xyz.util) .
    3. Now, write an import statement for this java class in the required view.
    4. Use the getDifference() method of this class to the difference in days between two days.
    Or
    Simply use this code.
    // Get msec from each, and subtract.
    long diff = currDate.getTime() - selectedDate.getTime();
    int noOfDays = diff / (1000 * 60 * 60 * 24);
    where currDate is today's Date and selectedDate is the Date selected by the User.
    Bala

  • 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 populate date & time when user enter data for custom table in sm30

    Can anyone tell me How to populate system date & time when user enter data for custom table in sm30..
      Req is
      i have custom table and using sm30 user can enter data.
    after saving date i want to update date & time in table
    Pls let me know where to write the code?
    Thanks in Advance

    You have to write the code in EVENT 01 in SE54 transaction. Go to SE54, enter your Ztable name and in the menu 'Environment-->Events'. Press 'ENTER' to go past the popup message. In the next screen, click on 'New Entries'. In the first column, enter 01 and in the next column give some name for your routine(say UPDATE_USER_DATE_TIME). Then click on the souce code icon that appears in blue at the end of the row. In the code, you need logic like below.
    FORM update_user_date_time.
      DATA: f_index LIKE sy-tabix.
      DATA: BEGIN OF l_total.
              INCLUDE STRUCTURE zztable.
      INCLUDE  STRUCTURE vimtbflags.
      DATA  END OF l_total.
      DATA: s_record TYPE zztable.
      LOOP AT total INTO l_total.
        IF l_total-vim_action = aendern OR
           l_total-vim_action = neuer_eintrag.
          MOVE-CORRESPONDING l_total TO s_record.
          s_record-zz_user = sy-uname.
          s_record-zz_date = sy-datum.
          s_record-zz_time = sy-uzeit.
          READ TABLE extract WITH KEY l_total.
          IF sy-subrc EQ 0.
            f_index = sy-tabix.
          ELSE.
            CLEAR f_index.
          ENDIF.
          MOVE-CORRESPONDING s_record TO l_total.
          MODIFY total FROM l_total.
          CHECK f_index GT 0.
          MODIFY extract INDEX f_index FROM l_total.
        ENDIF.
      ENDLOOP.
    ENDFORM.                    " UPDATE_USER_DATE_TIME
    Here ZZTABLE is the Z table and ZZ_USER, ZZ_DATE, and ZZ_TIME are the fields that are updated.

  • How can I read the last cell of a JTable that a user Enters data

    I have a one column JTable with several rows that a user enters data to. Upon entering the last data, the user clicks a button to read all the data from the rows in the JTable and puts them in an arraylist. If the user does not click enter or navigates away from the last cell, then after clicking the button it does not read the last cell entered. Since the user is clicking on a button to indicate he is done entering data on the table, does he also have to hit the enter key to indicate he is done entering the data?
    The code below is my tablemodelListener:
    public class InteractiveTableModelListener implements TableModelListener {
    public void tableChanged(TableModelEvent evt) {
    if (evt.getType() == TableModelEvent.UPDATE) {
    int row = evt.getFirstRow();
    System.out.println("Update row:"+" "+row);
    jTable1.setRowSelectionInterval(row, row);
    }

    Don't forget to use the Code Formatting Tags so the posted code retains its original formatting. That is done by selecting the code and then clicking on the "Code" button above the question input area.
    In the future, Swing related questions should be posted in the Swing fourm. (This question has been asked and answered dozens of times).
    But there is not need to repost because [Table Stop Editing|http://www.camick.com/java/blog.html?name=table-stop-editing] explains whats happening and give a couple of solutions.

  • How to know whether entered date is SAPdate format or User dateformat.

    Hi all,
    I am uploading data from SAP to internal table  ,
    here I need to do below logic ,
    If user entered SAP dateformat in excel , no  need to convert after uploading.
    elseIf user entered user default need to convert to SAP date format.
    If user entered in other foramt.
    need to give error.
    so , how to know whether entered data is in SAP format or not.
    Regards,
    vinesh

    Try this logic
    IF call fm DATE_CHECK_PLAUSIBILITY = true
       "date etered in SAP internal format
    ELSE if call fm CONVERT_DATE_TO_INTERNAL = true
       "date entered in user format
    else.
      "incorrect format
    endif.
    Regards
    Marcin

  • Display of user entered date in one column

    Hi Guys,
    Is it possible to display user entered date(any date) in column of all rows?
    I need to calculate no of days(User entered date-Deposit date).
    Please give some input.

    Hi Sagar,
    How can u display user enterd date in a column?
    For example if user entered 31.03.2007 as input,i need the same date(31.03.2007 ) to display in all rows of the column,so i can use it in the formula.
    Thanks.

  • How to use User Exit for SD...

    Hi there,
    My client's requirement is to block the overall status of the Sales Order header under status tab to be blocked when user r-enters a new scheduled date in the "First Date" column in the SO.
    When they goto VA02, & put a new date it must automatically put a delivery block in the header as well as make the order header status to be blocked.
    I see the “First date” field in the SO is in a Structure “RV45A”, the field name is ETDAT.
    Can you let me know how to use User exit MV45AFZZ?
    When doing it, it must put the Delivery block in table VBAK – LIFSK.
    Rgds,
    Pri

    Hi Debadatta,
    Welcome to SDN.
    Have you looked report program <b>RM07MAAU</b> (Report for Material Document Archiving)?
    Hope this will help.
    Regards,
    Ferry Lianto

  • 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

  • How to use user-defined packages in JAX-RPC web service

    I am trying to use Object of my class located in my package in jax-rpc webservice,the code is
    package supercomputer;
    import Hello.*;
    public class SuperImpl implements SuperIF
    public String sendParam(String data)
    Temp ob=new Temp();
    int i=ob.get1(10000);
    return data+"returned by supercomputer";
    Temp is located in Hello package,I have jar the Hello package as Hello.jar and has set its classpath in targets.xml of Ant tool.
    The code compiles well and service is deployed successfully,but when i try to call the service from the client its gives me following error.
    [echo] Running the supercomputer.SuperClient program....
    [java] java.rmi.ServerException: Missing port information
    [java] at com.sun.xml.rpc.client.StreamingSender._raiseFault(StreamingSender.java:357)
    [java] at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:228)
    [java] at supercomputer.SuperIF_Stub.sendParam(SuperIF_Stub.java:60)
    [java] at supercomputer.SuperClient.main(Unknown Source)
    I dont know if it deploys why it gives error on client side.
    Please tell how to use user-defined packages and class in jax-rpc service code ,i am not talking about passing user-defined parameters i am just talking about making objects of user defined classes in jax-rpc service.I think there is some problem in classpath.
    Please guide me in doing that.
    Thanks,
    Farrukh

    Farrukh,
    I don't know if your error is about a missing class from your custom package, ... what track did you followed to say that?
    To use your package in the implementation of you web service, you should only follow the rules of making a web application: put your package jar in your \lib directory inside WEB-INF/ or your package classes unjared in classes (also in WEB-INF/).
    As I already said, I have doubts that your error should be originated from a missing class from your package, but:
    -try to see the logs (errors?) when you deploy your web service that could give a hint about the problem.
    -try to see if you can access your endpoint through your browser to see if there is a online status
    -display your config/WSDL file, and the steps you did to build your web service.
    regards,
    Pedro Salazar.

  • Cell data not getting refreshed in which user enters data OO ALV(editable)

    Hi Friends,
    I am using OO ALV for editable grid display.
    I am unable to change grid data in the cell in which user enters something, using OO ALV. Did through debugging of my own program and found that some problem with system program. Then I did all system debugging. Could not find out why is the grid not getting refreshed with the new data in the cell in which user had entered some value. Rest of the cell's data are getting refreshed with the values which i am updating in the final internal table. I can see that the data in the final internal table is changed for the cell in which user enters data. But even after the call of
          CALL METHOD obj_alvgrid1->refresh_table_display
    does not refreshes the data in the cell in which user had entered data. Rest of the cells data are getting refreshed.
    Piece of code:
      SET HANDLER obj_event_receiver->handle_data_changed
                                         FOR obj_alvgrid1.
        METHODS: handle_data_changed
                       FOR EVENT data_changed OF cl_gui_alv_grid
                           IMPORTING er_data_changed
                                     e_onf4
                                     e_onf4_before
                                     e_onf4_after.
    METHOD handle_data_changed.
      DATA : v_valid    TYPE char1,
             v_refresh  TYPE char1.
    *--check mt_good_cells semantically
      CALL METHOD perform_semantic_checks( er_data_changed ).
    *--If PBO is again visited, just refresh the ALV grid.
      CALL METHOD obj_alvgrid1->refresh_table_display
        EXCEPTIONS
          finished = 1
          OTHERS   = 2.
      IF sy-subrc <> 0.
        EXIT.
      ENDIF.
    ENDMETHOD.
    METHOD perform_semantic_checks.
        LOOP AT er_data_changed->mt_good_cells INTO w_good.
          v_index = sy-tabix.
          CASE w_good-fieldname.
            WHEN 'ZASCAS'.
    *Now here based on some conditions I am changing my final internal table i_zamtsmatnp
                              MODIFY i_zamtsmatnp FROM w_zamtsmatnp INDEX
                                               w_good-row_id TRANSPORTING
                                                 zascas modif.
    User enters data in zascas field. Based on the data entered, I am changing other fields which is getting refreshed. I am also changing zascas in the program even after user had already entered the value which was bit wrong and i am correcting it in the program on the even "data_changed" even.
    Please help me friends as i m strugling past hours wondering why the data is not getting refreshed for the cell in which user enter data.
    Regards,
    Surya

    Hi Surya,
       The approach you are following is correct. You need to use the comibnation of all these things:
    Event - DATA_CHANGED
    Methods - CHECK_CHANGED_DATA
                 -  GET_CHANGED_DATA.
    However, here are few standard programs which are having similar functionality.
    BCALV_EDIT_03
    BCALV_EDIT_07
    Check out these once.
    Note: If anything is helpful, dont forget to reward points
    Thanks,
    Adithya K
    SAP Practise
    [email protected]

  • User entered date to be calculated for another header

    Hello All,
    In a BEx query, a user enters a date (date1), and I need to display Date1 - 30 as a header for one of the columns. Can I take care of this while creating a text variable??
    Or I need to use a customer exit with i_step = 2?
    Kindly inform..
    Eg: User entered date : 30-Jan-07
    The header should be like Non moving stock as of 1-Jan-07
    Thanks in advance.
    Regards,
    K2

    Hello Prasad,
    Can I try offset for a Text variable created for the header??
    Thanks.
    Regards,
    K2

  • To compare two user entered dates

    HI FRIENDS
    here is my code. When i try to print the user entered date (dd/MM/yyyy)(which i am storing in a string) the program dispalys nothing. and everey time i enter a valid date it displas "invalid From date entered ". I need to store the user entered date into a string because i need that for further use. All my intesion is to get two dates from user in dd/MM/yyyy. Strore them in certain variable. Check if they are valid or not. and make sure todate is either equal or greater than fromdate. Please help me to solve this problem.
    public class EDTDateValidation extends JFrame implements ActionListener{
    private JLabel fromlabel;
    private JLabel tolabel;
    private JTextField fromtxt;
    private JTextField totxt;
    private String fmt ="dd/MM/yyyy";
    private java.lang.String fromdate;
    private java.lang.String todate;
    private JButton buttonOK;
    private JButton buttonCancel;
    private Date theDate;
    private Date date1;
    private Date date2;
    private JPanel mainPanel;
    SimpleDateFormat dtformat = new SimpleDateFormat(fmt);
    public EDTDateValidation(){
    super("Date Validation");
    dtformat.setLenient(false);
    mainPanel=new JPanel();
    mainPanel.setLayout(null);
    fromlabel = new JLabel("From Date");
    tolabel = new JLabel("To Date");
    buttonOK = new JButton("OK");
    buttonCancel = new JButton("Cancel");
    fromdate = new String();
    todate = new String();
    fromtxt = new JTextField(10);
    totxt = new JTextField(10);
    fromdate = fromtxt.getText();
    todate = totxt.getText();
    mainPanel.add(fromlabel);
    fromlabel.setBounds(20,20,50,15);
    mainPanel.add(tolabel);
    tolabel.setBounds(20,50,50,15);
    mainPanel.add(fromtxt);
    fromtxt.setBounds(90,20,130,20);
    mainPanel.add(totxt);
    totxt. setBounds(90,50,130,20);
    mainPanel.add(buttonOK);
    buttonOK.setBounds(70,80,71,23);
    mainPanel.add(buttonCancel);
    buttonCancel.setBounds(150,80,71,23);
    buttonOK.addActionListener(this);
    buttonCancel.addActionListener(this);
    setContentPane(mainPanel);
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    setSize(247,140);
    setResizable(false);
    //pack();
    public static void main(String args[]) {
    try {
    UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
    catch(Exception e) {
    System.err.println("Could not load Look and Feel" + e);
    EDTDateValidation edtDateVal = new EDTDateValidation();
    edtDateVal.setVisible(true);
    public void actionPerformed(ActionEvent e) {
    if(e.getSource() == buttonOK){
    System.out.println(fromtxt.getText());
    // System.out.println(SimpleDateFormat.format(fromdate));
    System.out.println(fromdate); //THIS DISPLAYS BLANK
    System.out.println(todate); //THIS ASWELL
    try {
    Date date = null;
    date = dtformat.parse(fromdate);
    System.out.println("valid From date entered!");
    catch(Exception f) {
    System.out.println("Invalid From date entered!");
    // textField1.setText("");
    return;
    try {
    Date date = null;
    date = dtformat.parse(todate);
    System.out.println("valid TO date entered!");
    catch(Exception f) {
    System.out.println("Invalid To date entered!");
    // textField1.setText("");
    return;
    }

    Judging from your code, you've got a lot of learning
    to do. I suggest you
    split it up:
    1. Write non-GUI code that attempts to parse, compare
    and format dates.
    2. Write simpler GUI code to capture ordinary
    strings, for example, and
    worry about dates after you can do something simpler.And standard instructions: Use code tags.

Maybe you are looking for