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
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 AMHi,
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> -
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 -
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 -
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. -
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 -
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 ! -
Adding a Button for a field in a table
Hi there,
I don't know if it is possible, but I can't find any information of this. How can I make a field in a table searchable? That means I want to include a button besides this field in the table, so that user can click on the button to search for, eg to search for Material Number, using this button.
Anyone can help?No that is wrong. What I want to do is as follows:
In a table, there is a button in the field where user can click on to activate the OVS. When they click this button, OVS will open up a screen with the search citerias and the results in the table in the OVS (This is auto generated window and I can't modify directly onto the window).
What is happening now is when I click on the button to activate the OVS, what came out is just the fields.. the labels are all gone.
I tried to create Simple Type but it seems I do not know the correct way to use it so that the fields for OVS can be displayed with the labels. I tried many ways but the labels just don't show up.
You proposed that I do a Simple Type Binding but the problem is the window is automated, I can do binding onto the generated window.
What else can I try? I read all the tutorials and wiki, it seems that all the labels are generated so beautifully and automatically.. but mine is empty..!!
From what I analysed, in the OVS windows, the number of citeria fields generated are based on the number of fields input for the model and the number of result column is based on the number of fields in the model output. But there is just no Label.
PS: My data is bound to the backend using Adaptive Webservices, therefore I am using the model to search for the data.
Any help or advise is greatly appreciated!
Edited by: Jackson Yap on Feb 25, 2009 10:28 AM -
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 -
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 -
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 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.OWelcome 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 -
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
MathiHi,
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
thanksHello,
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
Maybe you are looking for
-
Displaying different colors for cells/columns in Interactive Report
Hi, I have a requirement to display just the 'cells' in the Interactive Report columns with different colors. There are 3 columns in the Interactive report. The color coding for all the 3 different columns should be such that: <40% - red color 40-70-
-
Phone numbers are not registered with iMessage
Hey all. I've installed Mavericks a few days ago . I've synced my contacts with iCloud to my macbook air and noticed that I can send iMessage to email adresses only, not phone numbers. while on my iphone it is possible to send iMessage to any number
-
HT3529 Why cant i send and receive pictures thru text it worked before now nothing
Why cant Isend and receive pictures thru the text it worked before now nothing
-
Difference between DB time OLAP time frontend time when execute the query
hi all, can you any one explain the difference between DB time, OLAP time, frontend time when execute the query
-
ALEAUD01 idoc for acknowledgement
Hi, I am receiving a 850 from edi translator via PI into ECC. Can I use ALEAUD message to send the idoc status back to translator via PI. Since the incoming order will have sending partner type as 'KU' and it seems ALEAUD works only for logical syste