F4 help for Date field and Validation

Hi Friends,
I am new to BSP programming .I knew getting F4 help in normal ABAP.But i don't know in BSP .
I want simple steps to get F4 for a field on Page as well as date field .
and How to valid those entered dates.
Presently i am using length 10 character variable for DATE without F4 help and No validation.
I think you guys will help me out.
Thanks,
Venkat.O

Welcome to SDN.
for F4 help with validation for dates you can use the following code.
<htmlb:inputField id         = "wf_ad_date"
                                type       = "date"
                                showHelp   = "TRUE"
                                value = "<%= sy-datum  %>"
                                visible    = "true"
                                disabled   = "false"
                                required   = "true"
                                maxlength  = "10"
                                size       = "10"
                                doValidate = "true"
                                design     = "standard" />
For other type of fields check out this weblog by Thomas Jung
<a href="/people/thomas.jung3/blog/2005/08/22/bsp-value-input-help-popups-version-30 Value Input Help Popups Version 3.0</a>
Regards
Raja

Similar Messages

  • 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

  • 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

  • Saerch help for Date field on Modal Dialog box

    Hi ,
    I have made a screen of Modal Dialog box type . I have one date field on that screen . I have given datatype datum to that field but the serch help for that field is not coming . There is no search help for that field .. Please help..
    Thanks in advance....

    hi,
    in the pop up box for that field just checjk whether the data type is date.

  • 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

  • F4 help for date field in ITS

    hi all;
    I was working on ESS Leave Request, i am using the standard program SAPMWS20000081H and the service template WS20000081.
    Now in the EP view i am unable to get the F4 help for the date field 'Absence From' & 'Absence To'. i have checked the data element used it is 'DATS'.
    How to get the F4 help in the view, please help me its of high priority.

    Hi, I can tell you what we have done.  I can see that the original template displays the "Absence from" field this way :
    <tr>     <td>`SAP_TemplateEditableField("FromDay", fieldLabel=ABSENCEFROM030150.label, fieldLabelWidth="170", name="ABSENCEFROM030150", value=ABSENCEFROM030150, size="10", maxlength="10", marginTop=9, inspectionText=ABSENCEFROMDAY,  align="",
    required="", width="", onchange="update_checkn(this.SAP_value, this)" )` </td>
         </tr>
    We modified the template to display it like this :
    <tr><td> `SAP_Field("ABSENCEFROM030150","ABSENCEFROM030150", DynproLabelWidth="170")` </td></tr>
    We did the same for ABSENCETO040150. So you can play around with the template to generate the F4 button. ( Note that we also added the ~webgui parameter in the service file and set it to 1, this in order to generate the calendar ). Good luck !

  • F4 ( Search Help ) for date field  on the selection screen

    Hi Freinds,
    i have used WDR_SELECT_OPTIONS In my component, i have one date field on selection screen(BUDAT), for this date field i want seach help 
    this is my code
    create a range table for Posting Date
    lt_range_table = wd_this->m_handler->create_range_table(
                                                              i_typename = 'BUDAT' ).
    add Posting Date  to the selection
    wd_this->m_handler->add_selection_field( i_id = 'BUDAT'
         i_value_help_type = if_wd_value_help_handler=>CO_PREFIX_SEARCHHELP
                                               I_VALUE_HELP_ID = '??????'
                                               I_DESCRIPTION = 'Posting Date'
                                               it_result = lt_range_table ).
    can any one help me
    Thanks
    Srini

    hi sarbjeet 
    i created search help in dictionary and i used that search help in my program, but still its now working , any other ideas
    Thnx
    srini

  • Help for date field not working after upgrade

    hi experts,
    In our BSP application for a page we had an inputfield (date).
    Onvaluehelp for input field we were calling the saphelpdate function.
    however after upgrade this functionality is not working properly as no pop up comes after clicking on the icon.
    we have upgraded to SPS 16 recently.
    please help me.
    regards,
    Arvind.

    Hi, I try upper case but nothing happen. This is all my code by far, I hope you can help me:
    DATA: BEGIN OF T_PCONT OCCURS 0,
          PCONT LIKE ZPSPERMISOS-PSOBKEY,
    END OF T_PCONT.
    DATA: BEGIN OF T_FIELDS OCCURS 0.
            INCLUDE STRUCTURE help_value.
    DATA END OF T_FIELDS.
    DATA: BEGIN OF T_VALUES OCCURS 0,
          VALUE(60) TYPE c.
    DATA: END OF T_VALUES.
    DATA: N TYPE i.
    SELECTION-SCREEN BEGIN OF BLOCK  b20 WITH FRAME TITLE text-b02.
      SELECT-OPTIONS:
        P_CONT FOR  ZPSPERMISOSH-PSOBKEY OBLIGATORY NO-EXTENSION NO INTERVALS,
        P_INT  FOR  ZPSPERMISOSH-PARTNER OBLIGATORY NO-EXTENSION NO INTERVALS,
        P_FEC  FOR  ZPSPERMISOSH-ZFINICN NO-EXTENSION NO INTERVALS,    
        P_RAZ  FOR  ZPSPERMISOSH-ZRAZONFINIC NO-EXTENSION NO INTERVALS.
    SELECTION-SCREEN END OF BLOCK b20.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_CONT-LOW.
      PERFORM P_HELP_P_CONT USING P_CONT-LOW.
    *&      Form  P_HELP_P_CONT
    FORM P_HELP_P_CONT  USING P_P_CONT.
      DESCRIBE TABLE T_PCONT LINES N.
      IF N EQ 0.
        T_FIELDS-FIELDNAME  = 'PSOBKEY'.
        T_FIELDS-TABNAME    = 'ZPSPERMISOS'.
        T_FIELDS-SELECTFLAG = 'X'.
        APPEND T_FIELDS.
        CLEAR T_FIELDS.
        SELECT PSOBKEY FROM ZPSPERMISOS
        INTO  TABLE T_PCONT.
        SORT T_PCONT BY PCONT.
      CALL FUNCTION 'HELP_VALUES_GET_WITH_TABLE'
        EXPORTING
          CUCOL        = 10
          CUROW        = 1
          TABNAME      = 'T_PCONT'
          FIELDNAME    = 'PCONT'
        IMPORTING
          SELECT_VALUE = P_P_CONT
        TABLES
          FIELDS       = T_FIELDS
          VALUETAB     = T_VALUES.
    ENDFORM.                    " P_HELP_P_CONT
    Edited by: J. Garibaldi on Nov 25, 2009 11:14 AM
    Edited by: J. Garibaldi on Nov 25, 2009 11:16 AM

  • F4 help for date field on screen painter

    Hi ,
    I created a screen using dialog programming . I have a date field there which is defined as
    itab-date.
    The format for this field in Element list is DATS .
    How do i get a drop down on the date field on the screen .
    Please advise
    Thanks !

    In Report u have to add,
    TYPES: BEGIN OF TY_F4HELP,                  
              ENAME  TYPE PA0001-ENAME,
              PERNR  TYPE PA0001-PERNR,
           END OF TY_F4HELP.
    Data:   IT_F4HELP TYPE STANDARD TABLE OF TY_F4HELP WITH HEADER LINE.
    *Begin of add F4 in Parameter field Ename.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_ENAME.
      DATA: IT_RETURN_TAB TYPE ddshretval OCCURS 0 WITH HEADER LINE . " Return table for F4 help
      SELECT DISTINCT ename pernr
        FROM PA0001
        INTO TABLE IT_F4HELP.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          RETFIELD        = 'ENAME'
          VALUE_ORG       = 'S'
        TABLES
          VALUE_TAB       = IT_F4HELP
          RETURN_TAB      = it_return_tab
        EXCEPTIONS
          PARAMETER_ERROR = 1
          NO_VALUES_FOUND = 2
          OTHERS          = 3.
      READ TABLE it_return_tab INDEX 1.
      IF SY-SUBRC <> 0.
      ENDIF.
      IF sy-subrc = 0.
        MOVE it_return_tab-fieldval TO P_ename.
      ENDIF.
      CLEAR: it_return_tab.
    *End of add F4 in Parameter field Ename.

  • Help for date field value

    I want to manually modify something in our ERP system. But I find some fields in table which is in date type have the value '0000-00-00'. How can I insert the same value to the database?
    Our DBMS is oracle 816.
    SQL> select to_char(t$curd,'yyyy-mm-dd hh:mi:ss') from triton.ttdsls051702
    2 where
    3 t$orno = 104497;
    TO_CHAR(T$CURD,'YYY
    0000-00-00 00:00:00
    0000-00-00 00:00:00
    0000-00-00 00:00:00
    SQL> select to_date('0000-00-00' , 'yyyy-mm-dd') from dual;
    select to_date('0000-00-00' , 'yyyy-mm-dd') from dual
    ERROR at line 1:
    ORA-01843: not a valid month
    Please offer me some help. Thank you!

    Oracle has some funny ideas about dates. I tried this on 8.0.6, 8.1.7 and 9.0.1.
    SQL> SELECT TO_CHAR(TO_DATE('01-01-0001','dd-mm-yyyy'),'j') FROM dual;
    TO_CHAR
    1721424
    SQL> SELECT TO_CHAR(TO_DATE('1721423','j'),'dd-mm-yyyy') FROM dual;
    SELECT TO_CHAR(TO_DATE('1721423','j'),'dd-mm-yyyy') FROM dual
    ERROR at line 1:
    ORA-01841: (full) year must be between -4713 and +9999, and not be 0
    but ...
    SQL> SELECT TO_CHAR(TO_DATE('1721424','j')-1,'dd-mm-yyyy') FROM dual;
    TO_CHAR(TO
    00-00-0000
    again but...
    SQL> CREATE TABLE t (dt DATE);
    Table created.
    SQL> INSERT INTO t SELECT TO_DATE('1721424','j')-1 from dual;
    1 row created.
    SQL> ALTER SESSION SET nls_date_format = 'dd-mm-yyyy';
    Session altered.
    SQL> select * from t;
    DT
    31-12-0000
    yet again but ...
    SQL> SELECT TO_CHAR(dt,'dd-mm-yyyy') FROM t;
    TO_CHAR(DT
    00-00-0000I think it is probably safe to set those dates to null, or some other acceptable default value depending on what t$curd means in your application.
    TTFN
    John

  • F4 help for date in select options..

    Hi Gurus,
    I want a search help for date field which belongs to select options.
    I know if it is a parameter we directly map the attribute value to that data element.
    Can some help me with this..
    Best Regards,
    Navin Fernandes.

    Hi Gurus,
    The select options works for date.. I got the solution.
    It directly relates to the default data dcitionary help.
    Got it from this example: WDR_TEST_SELECT_OPTIONS
    Best Regards,
    Navin Fernandes.

  • Search help for date in VC

    Hi, 
    I have created an iview in Visual Composer for a query. it contains date field on selection variable fomr. i tried entering date in various format, but it gives an error : variable expects interval value ; enter an interval".
    can we provide search help for date field in VC?
    Regards,
    Sonali.

    Hi,
    You have to create search help it avoid inconsistency.
    Thanks & Regards,
    Venkat.

  • To implement search help for date and time fields details

    how can i implement search help for date and time fields in screen painter

    Hi
    Declare the variables as sy-datum and sy-uzeit or any other pre-defined data typ of date and ime types. Serach help will automatically comes.
    Aditya

  • Search help for custome field with different data type

    Hi Friends,
    I have Created a  custom table in which i have created a field is
    ZMATLONG which stores material number.
    Now the data element is zdmat which is of char 40..
    Now i want to give search help for this field ZMATLONG..
    I have tried many ways giving search help to this field
    a) i Tried to attach the standard search help of MATNR ie : MAT1 but its showing me data type inconsistancy
    b) i created a zsearch help and in the selection method i have used database table mara , again here iam getting the same error data type inconsistancy...
    Now how can i give the search help like matnr field to my custom field ZMATLONG...
    How can i do it..?
    Thanks in Advance..
    Regards
    Kumar

    Hi,
    MATNR ahs length 18 and ZMATLONG has length 40.So due to this u cannot use MAT1 search help.
    best way would be cope MAT1 into Z search help. Then in the search help parameter change the data element of field
    MATNR as ZMATLONG.
    Now if you assign Z search help to ZMATLONG  it will work.
    I tried this its working fine.
    Shanmugavel Chandrasekaran

  • Validation For Date,String and Date in a reports Region

    Apex 4
    Good day to all apex users How do I validate a apex_item.text if the value is string the user can only input a string value if it is number then the user can input numbers only and if it is a date the user can only input a date values?

    APEX_ITEMS are not part of the default apex gui... In fact they are just functions which returns html.
    You can however do some stuff with the attributes parameters. You can find some cool stuff over here: Re: Validation For Date,String and Date in a reports Region
    If you want apex validation you need to create a page validation and loop over your apex_items with apex_application.g_f0x
    Br,
    Nico

Maybe you are looking for

  • How to start listener in sql developer for remote debug

    how to start listener in sql developer for remote debug ? Since the new version 1.1.0.23 is different with the old version for remote debug, I don't know how to start the listener on the new version for remote debug. even follow the user guide below

  • HT5922 I cannot connect my Bowers & Wilkins A5 to my mbp running Mavericks

    I connected my iPad easily to the B & W A5, but have had no success with my mbp running OS X Mavericks.

  • Songs getting cut off

    okaay so my problem is whenever I import a cd into all seems okay until I sync the songs into my ipod. It seems that the first song is always cut off and then it skips to the next song. Does anybody else seem to have this problem? How do I solve this

  • Multiple photo develop settings paste not working

    Hi all keen photographers out there. Using Lightroom V5.7. I adjust one photo aka highlights, shadows etc..then copy and paste to many many photos.sometimes over 1000 shots. Only some of the photos will have the develop setting pasted. Any ideas why

  • QUEUE _ERROR IN BDC

    hi all, iam using BDC_close_group. while executing this  iam getting queue error. plz suggest me any solution