When we give wildcard for date field

can we give wild card for date field in range table.
my code is this
RAnges r_erdat for mara-erdat
r_erdat-sign = 'I'.
r_erda-option =  'CP'.
r_erdat-low = '2009'.*
append r_erdat.
select erdat from mara
  INTO CORRESPONDING FIELDS OF TABLE itab
  where erdat
  in
   r_erdat.
Moderator Message: Basic date questions are not allowed.
Edited by: kishan P on Oct 5, 2010 10:46 AM

<<Don't answer questions that break the rules. Date questions are not permitted>>
Hi,
       Instead you can take the entire range for that particular year.
r_erdat-sign = 'I'.
r_erda-option = 'BT'.
r_erdat-low  = '20090101'.   <- begin date
r_erdat-high = '20091231'.   <- end date
append r_erdat.
Regards,
Srini.
Edited by: Matt on Oct 5, 2010 12:46 PM

Similar Messages

  • Select-options for date field.

    Hi all,
    i need to give select options for Date field.How can i give that.
    Thanks & Regards
    Ravi.

    Hi Ravi,
    Use the Component WDR_SELECT_OPTIONS to include select options in Web Dynpro ABAP. Follow these steps:
    1. In your Component , "Used Componet" tab add Component WDR_SELECT_OPTIONS . Component Use can be any name that you want to give, eg SELECT_OPTIONS
    2. Go to the View where you want to include the Date Select Options. I am assuming that you already have an Attribute of Type DATS in your context.
    3. View: Properties Tab:Create Controller Usage and select
    SELECT_OPTIONS     WDR_SELECT_OPTIONS                   
    SELECT_OPTIONS     WDR_SELECT_OPTIONS     INTERFACECONTROLLER
    4. View Layout Tab:Include a View Container. In this view container we will show the Date Select Options.
    5. View Attributes Tab: Create Following two attributes:
    M_HANDLER type IF_WD_SELECT_OPTIONS
    M_WD_SELECT_OPTIONS type IWCI_WDR_SELECT_OPTIONS
    6: View Methods Tab: Create a method eg CREATE_SELECTION_SCREEN. Call this method in the WDDOINIT of the view.
    7:CREATE_SELECTION_SCREEN: Write following Code:
    * Data Declaration
      data:
            lt_range_table TYPE REF TO DATA.
      data:
            lr_componentcontroller TYPE REF TO IG_COMPONENTCONTROLLER,
            lr_componentusage TYPE REF TO IF_WD_COMPONENT_USAGE.
    * Execution
    *  Create Used Component
      lr_componentusage = wd_this->wd_cpuse_select_options( ).
      if LR_COMPONENTUSAGE->HAS_ACTIVE_COMPONENT( ) is initial.
        lr_componentusage->create_component( ).
      endif.
    *  Get pointer to interface controller of select options
      wd_this->M_WD_SELECT_OPTIONS = wd_this->wd_cpifc_select_options( ).
    * initialize selction screen
      wd_this->M_HANDLER = wd_this->M_WD_SELECT_OPTIONS->init_selection_screen( ).
    *  Create Range Table for: Date
      CALL METHOD WD_THIS->M_HANDLER->CREATE_RANGE_TABLE
        EXPORTING
          I_TYPENAME     = 'DATS'
        RECEIVING
          RT_RANGE_TABLE = lt_range_table.
    * Add Selection Field for: Date
      CALL METHOD WD_THIS->M_HANDLER->ADD_SELECTION_FIELD
        EXPORTING
          I_ID                         = '<name of date attribute in the context>'
    *      I_WITHIN_BLOCK               = MC_ID_MAIN_BLOCK
    *      I_DESCRIPTION                =
    *      I_IS_AUTO_DESCRIPTION        = ABAP_TRUE
          IT_RESULT                    = lt_range_table
    *      I_OBLIGATORY                 = ABAP_FALSE
    *      I_COMPLEX_RESTRICTIONS       =
    *      I_USE_COMPLEX_RESTRICTION    = ABAP_FALSE
    *      I_NO_COMPLEX_RESTRICTIONS    = ABAP_FALSE
    *      I_VALUE_HELP_TYPE            = IF_WD_VALUE_HELP_HANDLER=>CO_PREFIX_NONE
    *      I_VALUE_HELP_ID              =
    *      I_VALUE_HELP_MODE            =
    *      I_VALUE_HELP_STRUCTURE       =
    *      I_VALUE_HELP_STRUCTURE_FIELD =
    *      I_HELP_REQUEST_HANDLER       =
    *      I_LOWER_CASE                 =
    *      I_MEMORY_ID                  =
    *      I_NO_EXTENSION               = ABAP_FALSE
    *      I_NO_INTERVALS               = ABAP_FALSE
    *      I_AS_CHECKBOX                = ABAP_FALSE
    *      I_AS_DROPDOWN                = ABAP_FALSE
    *      IT_VALUE_SET                 =
    *      I_READ_ONLY                  = ABAP_FALSE
    *      I_DONT_CARE_VALUE            =
    *      I_EXPLANATION                =
          I_TOOLTIP                    = 'Select Date'.
    8: To Fetch Data entered in the selection field, write following code on action of button click:
      data:
            lt_date type REF TO DATA.
    FIELD-SYMBOLS:
                     <fs_date> TYPE table.
      *  retrieve Date from Select Options
      CALL METHOD WD_THIS->M_HANDLER->GET_RANGE_TABLE_OF_SEL_FIELD
        EXPORTING
          I_ID           = '<attrib_name>'
        RECEIVING
          RT_RANGE_TABLE = lt_date.
    *  assign Date Field Symbol
      ASSIGN lt_date->* to <fs_date>.
    9: Windows Window Tab: In the View Conatiner, embed the WND_SELECTION_SCREEN view from SELECT_OPTIONS component Usage of  WDR_SELECT_OPTIONS component.
    Regards,
    Reema.

  • How to set a date range for date field ?

    Dear Experts,
    Scenario:
    I have a query in validating the date field in my BSP application. My application is for maintain infotype 0023 Other/Previous Employers online by employees in the company.
    As per our design we are maintaining the all employment details of the employee both ( with in the current company / previous employment outside the company) in the same infotype.
    Every employee will have a hiring date within the SAP HR system. We consider this date as the cutoff date between current and previous employment in our application. When the employee updating the details wia BSP page I need to check the following.
    Record inside current company: Validation that, the user should only able to enter BEGIN DATE (BEGDA)  greater than or equal HIRING DATE and END DATE(ENDDA) should be greater than FROM  DATE (BEGDA).
    Record outside current Company: Validation that, the user should only able to enter BEGIN DATE (BEGDA)  less than or equal HIRING DATE and END DATE (ENDDA) should be greater than FROM  DATE (BEGDA) and less than HIRING DATE.
    Technical Requirement:
    How to set a date range for date field, i.e. how we can limit the date range in a HTMLB date field? Can this it be achieved via standard functionality of HTMLB?
    Following is the code to describe date field in my application.
        <htmlb:inputField id= "ENDDA_NEW_IN"
                          type= "date"
                    doValidate= "TRUE"
                      showHelp= "TRUE"
                      disabled= "FALSE"
                         width= "183"
                         style= "cssTextAreadate"
                         value= "<%='99991231'%>"/>
    Thanks a lot in advance for your assistance and help.
    Cibinu2026
    Edited by: cibin kuruvilla on Nov 12, 2008 11:13 AM

    Hi,
    This functionality is known to be very important and is a key part of the next major release of the JRC planned for the first half of 2008.
    Regards,
    <p>Blair Wheadon</p>
    <p>Product Manager, Crystal Reports</p>

  • F4 help for date field

    Hello All,
    I am using DATS 8 as a domain for date field but f4 help is not coming
    Help me.
    What to do ?
    Thanks ....................

    HI,
    If u are in Diallog Program then use 'F4_DATE' FM.
    Example :
    CALL FUNCTION 'F4_DATE'
        EXPORTING
          date_for_first_month         = sy-datum
        IMPORTING
          select_date                  = wa_asgntkts-begda
        EXCEPTIONS
          calendar_buffer_not_loadable = 1
          date_after_range             = 2
          date_before_range            = 3
          date_invalid                 = 4
          factory_calendar_not_found   = 5
          holiday_calendar_not_found   = 6
          parameter_conflict           = 7
          OTHERS                       = 8.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    Or
    If u are in Report Program then maintain ur data type as sy-datum.
    Please give neccessary points if u help this..
    Ranjith

  • Search help for DATE field

    HI all,
    I want to attach search help for a DATE field created in screen painter.
    For PERNR, PREM is attached. Similarly what is the statndard search help name for DATE field?
    Thanks,
    Shanthi.

    Hi ,
    Declare the date field as sy-datum ,
    parameters : date type sy-datum .
    This shud bring the standard search help for date .
    Thanks ..Get back for any issues.
    Anil

  • Problem in output for date field

    Hi experts...
    i have one requirement like if string is initial i need to display blank for date field in  out put...
    but it is showing 00.00.0000..
    My code is...
    data: V_TEMP TYPE sy-datum,
          V_TEMP1 TYPE sy-datum,
          v_str type string,
          v_str1 type string.
      v_str1 = '2008091123457'.
      v_str = '0'.
      REPLACE ALL OCCURRENCES OF ',' IN v_str WITH SPACE.
      CONDENSE v_str NO-GAPS.
      v_TEMP1 = v_str1+0(8).
      if v_str <> 0.
    v_TEMP = v_str+0(8).
      else.
    v_temp = ''.
       endif.
         write:/ v_temp1 ,V_TEMP.
    output is: 11.09.2008   00.00.0000(BUt i want space here just blank...)
    can any body plz help me.....

    Hi,
    You can use something like that:
    WRITE: date NO-ZERO.
    Best regards.

  • I am transmitting data over internet and WiFi ,it's working fine with internet but when I choose WiFi for data transmission data is not being transmitted. What may be the possible issues of data transmission failure over WiFi?  Please help me.

    I am transmitting data over internet and WiFi ,it's working fine with Internet but when I choose WiFi for data transmission data is not being transmitted. What may be the possible issues of data transmission failure over WiFi?     Please help me....
    Thanks in Advance.
    Neeraj@iDev

    After a week's worth of debugging, I found the issue.
    The Java type returned from the call was defined as ArrayList.  Changing it to List resolved the problem.
    I'm not sure why ArrayList isn't a valid return type, I've been looking at the Adobe docs, and still can't see why this isn't valid.  And, why it works in Debug mode and not in Release build is even stranger.  Maybe someone can shed some light on the logic here to me.

  • Sorting not working correctly for date field in alv report

    Hi All,
    My report displays many rows also containing date type fields of bldat,budat .
    When I sort the report selecting field of type bldat budat the sorting is not correct for the year.
    Ex:
    Invoice doc dat
    01-25-2011
    01-21-2011
    02-02-2011
    10-25-2010
    11-20-2010
    If I use ascending then it is sorted as :
    Invoice doc dat
    01-21-2011
    01-25-2011
    02-02-2011
    10-20-2010
    10-25-2010
    Why the sorting is not working correct for year.(2010 records should have been first).
    The field wa_tab-bldat is of type char10.
    It is populated as wa_tab-bldat = bsak-bldat.
    Kindly suggest what can be done.

    The field wa_tab-bldat is of type char10
    Then what it does is correct.
    Refer to type datum...it will work

  • Search help for date field in Editable ALV

    Hello Friends,
    I am using editable alv using 'reuse_* '.
    I have used date as input field. While creating fieldcatlog also i have  declared dat as a mkpf-budat.
    But i am not getting serach help for date in output.
    Is it possible with reuse or i have to go by object oriented ?

    Hi,
    Just pass the Edit option of the fieldcatalog for those specific fields...
    fcat-edit = 'X'.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program       = sy-cprog
          i_callback_pf_status_set = 'PF_STATUS_SET'
          i_callback_user_command  = 'USER_COMMAND'    "<----  pass this
          i_callback_top_of_page   = 'TOP'
          is_layout                = it_layout
          it_fieldcat              = it_fcat
          i_default                = 'X'
          i_save                   = 'A'
          it_events                = it_event
        TABLES
          t_outtab                 = it_final
        EXCEPTIONS
          program_error            = 1
          OTHERS                   = 2.
    *&      Form  USER_COMMAND
    *       text
    *      -->R_UCOMM      text
    *      -->RS_SELFIELD  text
    FORM user_command USING r_ucomm LIKE sy-ucomm
                            rs_selfield TYPE slis_selfield.
      CASE r_ucomm.
        WHEN '&DATA_SAVE'.                "<-------check this
          PERFORM save_data.
      ENDCASE.
    ENDFORM.                    "USER_COMMAND

  • IDoc posted in R/3 but data for Date field has not generated.

    Hi Experts
    This is JDBC to IDoc scenarion.
    Source: MS SQL Server
    Date Data Type: smalldatetime
    Date field Format: yyyy-MM-dd hh:mm:ss --> example: 2009-11-13 00:00:00
    XI Mapping: Source Date --> Transformation --> Target Date
    Transformation: yyyy-MM-dd hh:mm:ss to yyyyMMdd
    Target: R/3 System
    Date Data Type:  ERDAT from VBAK table - Date on Which Record Was Created
    Date field Format: Date field (YYYYMMDD) stored as char(8)
    Check points:
    1. Mapping is working fine in XI and transformation is done with the test data: 2009-11-13 00:00:00  --> to ---> 20091113
    2. In SXMB_MONI the data is processed from the source and the IDoc XML data is generated. In the IDoc XML data the date field is containing the value <DATE>20091113</DATE>
    3. But when I tried to open the IDoc(SE05) in R/3 the date field is empty and no data is generated.
    Request you to let me know why the error is happening.
    Regards
    Ram

    Hi Ram,
    First try to test the same IDOC generated in ECC Box by populating date field value using WE19 and test .
    Or
    Instead of passing date value from SQL Server, Just give a try with  Current Date function in Mapping and test in ECC system.
    then we can think on further analysis.
    Regards,
    Vijay

  • Mandatory for Date field

    Hi All,
         I want to display to Mandatory field if date field is blank or null...
    But this code only valiadate ,the Entered date correct or not...
    So how to display the Mandatory date field..
    Please suggest me ...What is the error..
         IWDMessageManager msgMgr = wdComponentAPI.getMessageManager();
              Object attributeValue = wdContext.currentDateFieldsElement().getAttributeValue(fieldName);
              Date theDate =
                   (Date) wdContext.currentDateFieldsElement().getAttributeValue(
                        fieldName);
              IWDAttributeInfo attributeInfo =
                   wdContext.nodeDateFields().getNodeInfo().getAttribute(fieldName);
              Calendar c = Calendar.getInstance();
              c.set(Calendar.HOUR_OF_DAY, 0);
              c.set(Calendar.MINUTE, 0);
              c.set(Calendar.SECOND, 0);
              c.set(Calendar.MILLISECOND, 0);
              Date currentDate = new Date(c.getTimeInMillis());
              if (theDate.before(currentDate)) {
    //       Throw an error message
                msgMgr.reportContextAttributeMessage(
                               wdContext.currentDateFieldsElement(),
                               attributeInfo,
                               IMessageRequisitionForm.MISSING_INPUT,
                               new Object[] { fieldLabel },
                               true);
    Please Tel me ......
    Thanks & regards
    Mathi

    Hi,
    Thanks for ur reply...
    I tel u what i do..
    1.first i set property...(reauired and set th label for)
    2.i code in method take a current date
    IWDMessageManager msgMgr = wdComponentAPI.getMessageManager();
              Object attributeValue =
                   wdContext.currentDateFieldsElement().getAttributeValue(fieldName);
              Date theDate =
                   (Date) wdContext.currentDateFieldsElement().getAttributeValue(
                        fieldName);
              IWDAttributeInfo attributeInfo =
                   wdContext.nodeDateFields().getNodeInfo().getAttribute(fieldName);
              Calendar c = Calendar.getInstance();
              c.set(Calendar.HOUR_OF_DAY, 0);
              c.set(Calendar.MINUTE, 0);
              c.set(Calendar.SECOND, 0);
              c.set(Calendar.MILLISECOND, 0);
              Date currentDate = new Date(c.getTimeInMillis());
              if (theDate instanceof Date) {
              <b>removeLeadingZeroes</b>(
                                  wdContext.currentDateFieldsElement().getAttributeAsText(
                                       fieldName));
                   if (theDate.before(currentDate))
                             //       Throw an error message
                             msgMgr.reportContextAttributeMessage(
                                  wdContext.currentDateFieldsElement(),
                                  attributeInfo,
                                  IMessageRequisitionForm.DATE_IS_IN_PAST,
                                  new Object[] { fieldLabel },
                                  true);
    public java.lang.String <b>removeLeadingZeroes</b>( java.lang.String fieldName )
                  if (fieldName == null)
                   return null;
              int i = 0;
              int n = fieldName.length();
              while (i < n) {
                   if (fieldName.charAt(i) != '0')
                        break;
                   ++i;
              return fieldName.substring(i);
    if could not give removeLeadingZeroes it produced error (runtime exception) (Null pointer exception)..
    My Question is...Mandatory is worked if date is incorrect....
    I want to set mandatory if that field name is null or balnk...
    Please suggest me ....what is my mistake...
    Thanks & regards
    Mathi

  • How to display this 2 character for date field (    \   \       )

    hi friends
    it's possible to display the character format in text field after you run the form
    plz I need your help
    thanks

    Hello,
    So you mean for the date field you want to show slashes by default. I don't think that forms will support this type of things.
    BTW may i know what is the purpose to show like this?
    If you use the normal format which is DD/MM/RRRR it will add the slashes automatically. When user will enter date like this 01012010.
    -Ammad

  • Anomaly in Forms6.0 (Especially for Date Field)

    Dear all OTN Members,
    I Don't have any idea of this "anomaly" happened in my Dev2K. My problem is When I run my form with f60run.exe, everything run as normal as it is. But sometimes, when I get my cursor focused in one field, which have Date datatype, and I try to insert the date (sample : '02-04-2000'), It goes mad. I mean that everytime I try to type the year, it always become '02-04-0002' and the cursor will highlight the field. For additional information, I didn't put any trigger in that field. I think I need some suggestion here, I don't know if it is some kind of bugs or just my Dev2K need to be reinstalled. I have try to run my forms in another PCs, but the anomaly still show up sometimes. I really need help on this. Thanks for your suggestions.

    Hi Franko,
    I just want to confirm whether u are using any calendar to select your date value.I do face problem while selecting a date value from a calendar.The problem is a replica as in your case.Without that looks like forms6i is doin fine for date columns.I shall get back to u in case i find any solutions to ur problems.
    Venkatesh C

  • LOV Button for date field

    How to show the lov-button (not the three dots symbol in web) to retrieve the calendar window for a date field in a Designer 6i generated application based on Headstart 6i? The preference LOVBUT is set to Y, so that is not the solution.

    You can use te preference LOVBUT to change the appearance of the LOV button.If you will open the generator prefrences and check the online help against the prefrence LOVBUT you will find very useful information.
    Some of the examples mentioned there are:
    htf.italic('LOV')-gives you the text LOV in italics for the LOV button
    htf.img('/images/button.gif')-a button is shown with the specified image on it.
    Thanks
    Vishal Jain

  • SQL Query for Date field updation

    I want a query from u.. Hope u help me with a
    solution soon..
    My Q: I want to update a date field in Oracle
    database. But the condition is that i shouldnt change
    the hours, minutes & seconds of the date field.
    generally , if we update the date field then it takes
    the default values for hours, min's & sec's to
    00:00:00.
    EX : if we have a value 21-SEP-2002 04:54:44 in a date
    field. I want to update it to 22-SEP-2002 04:54:44.
    But it updates to 22-sep-2002 00:00:00 if we use
    UPDATE command.

    Use a PreparedStatement:
    PreparedStatement ps = conn.prepareStatement("SELECT * FROM TEMP WHERE TDATE > ? AND TDATE < ?");
    // note: month numbers start at 0, so 1 is february
    GregorianCalendar c1 = new GregorianCalendar(2002, 1, 11, 11, 0);
    GregorianCalendar c2 = new GregorianCalendar(2002, 1, 18, 22, 0);
    Date d1 = c1.getTime();
    Date d2 = c2.getTime();
    java.sql.Timestamp sqlDate1 = new java.sql.Timestamp(d1.getTime());
    java.sql.Timestamp sqlDate2 = new java.sql.Timestamp(d2.getTime());
    ps.setTimestamp(1, sqlDate1);
    ps.setTimestamp(2, sqlDate2);
    ResultSet rs = ps.executeQuery();
    // get results from the result setJesper

Maybe you are looking for