F4 date/calendar help for an inputfield
Hi All,
I have a Input Field mapped to context attribute of type String. I want to use the date/calendar help in this field, is it possible?
Just to clear, I was using a attribute of type Date and had a calendar help, but now this field was changed to type String and the users want to have a calendar help.
Thanks,
Luciano
Message was edited by: Luciano Leite
Hi Luciano,
What kind of requirements do you have which forces you to use context attribute with type String?
BTW, you can use following approach:
1) create calculated attribute with type Date
2) in setter method convert Date to String and store it into context attribute with type String
3) in getter method parse String and convert it to Date
I don`t really like it because you have to do 2 redundant operations - parsing and conversion.
Best regards, Maksim Rashchynski.
Similar Messages
-
Calendar help for Date i/p field in SRM 5.0 shopping cart
Hi All,
I am working on SRM 5.0..I have a requirement for the addition of custom field ie. lease termination date field on SRM shopping cart screen and having a calendar help for this date input field.
Has anyone tried to add calendar help for an input date field in the ITS service??What all additions have to be done for this(style,images etc)...Does any one has any idea?Please help.
Thanks & Regards,
K rav.Disha can you please send me these images.
IMAGES/CALENDAR/ICO12_CALENDAR.GIF
IMAGES/CALENDAR/LEFT1.GIF
IMAGES/CALENDAR/LEFT2.GIF
IMAGES/CALENDAR/RIGHT1.GIF
IMAGES/CALENDAR/RIGHT2.GIF
my email id: [email protected]
and should i store these images in mime repository? Also I have the below code to be attached in template for calendar function give by Zakhar..do you know where exactly in the template do you insert this code? and do you insert it in the standard template itself. My field will appear in shopping cart line item level (CUF field) so what will be the template number??
<input type=text
id="`ZAPPSSPR_INCL_ITEM_CSF_AVL-ZZSPR_DKK_DATE.name`"
name="`ZAPPSSPR_INCL_ITEM_CSF_AVL-ZZSPR_DKK_DATE.name`"
value="`ZAPPSSPR_INCL_ITEM_CSF_AVL-ZZSPR_DKK_DATE.value`"
onBlur="BBP_ITS_EXTW_CloseCalendar()" maxlength="10" size="10">
<a id="a_ZAPPSSPR_INCL_ITEM_CSF_AVL-ZZSPR_DKK_DATE" name="a_ZAPPSSPR_INCL_ITEM_CSF_AVL-ZZSPR_DKK_DATE"
href="javascript:BBP_ITS_EXTW_OpenCalendarDomRel(window.document.BBPForm.elements['`<b>zappsspr_incl_item_csf_avl-zzspr_dkk_date.name</b>`'], 'a_ZAPPSSPR_INCL_ITEM_CSF_AVL-ZZSPR_DKK_DATE')">
<img src="/sap/public/bc/its/mimes/bbpglobal/99/images/calendar/ico12_calendar.gif" border="0"></a>
Thanks,
Krupa -
Calendar help for Date i/p field
Hi All,
I am working on SRM 4.0..I have a query regarding the addition of calendar help for an input date field....
Has anyone tried to add calendar help for an input date field in the ITS service??What all additions have to be done for this(style,images etc)...Does any one has any idea?Please help.
Thanks & Regards,
Disha.Vijith Kumar,
I also have a requirement to add custom field in SRM shopping cart screen, with calendar as an input help. Can you please pass me the relevant code, for adding this field into HTML template
My email id is [email protected]
Thanx,
K rav. -
Input Help for a InputField of type LAND1
Hi everybody,
I need to have an InputField in my WebDynpro connected with a element context in which I have an input help H_t005 but when the user select some nationality, the inputfield collect the LAND1 of the T005T instead of the NATIO. I should show the NATIO How could I fix it? I tried by code with the onEnter Action but this event isn´t thow when the user push the matchcode.
Thanks in advance.
Lore.Hi Lorena,
The Input Help H_t005 collects LAND1 from table T005T ( a table) & not NATIO, which is not a table, but a Data Element only...
Also, please note that LAND1 is a char3 data Element, while NATIO is a data Element which resembles LANDX of table T005T. The search help T005T displays the vaule helps country texts from LANDX on basis of field LAND1.
Hope this solves your query. -
Data recovery help for photo's
Hi there
I lost two folders by deleting them. Is there any way I can recover them and if so how do I do it?
Do I have to buy some software and if so, which one would be best suited for one off recovery?
Thank youI’ve had good results with File Salvage. Similarly, it will scan first and then you pay to recover. It’s $90. There’s no inexpensive way to do this.
Regards
TD -
Hi Gurus,
I have a screen containing fields from an internal table. As I cannot use the 'from dictionary' option in the screen painter attributes, (since internal table field is not in ABAP dictionary), I'm not able to display the search help for a field of type DATS. How can i access the stabdard date search help for my type DATS internal table screen fields?
assistance will be rewarded.
thanx in advance.Hi,
Try this:
On your customizing screen flow,
PROCESS ON VALUE-REQUEST.
Field T_ZT-SDATE " your date field
module create_dateselect.
In your main program:
module create_dateselect.
data:p_date like sy-datum.
CALL FUNCTION 'F4_DATE'
EXPORTING
holiday_calendar_id = 'CN'
display = ' '
IMPORTING
select_date = p_date
EXCEPTIONS
OTHERS = 4.
t_zt-sdate = p_date.
endmodule.
Regards,
Pole -
How to build search help for company code (BUK) in SRM
Hello,
I am new to SRM and was wondering if any have come across similar requirement. I am a workflow developer and we are building a custom table to derive deadline escalation timelines. We are also adding a field in our custom table for company code so that we can have company specific deadlines. table T001 is empty in SRM and hence we are unable to use F4 (search help). Is there existing functionality in SRM that gets this search from the backend ECC system and displays when F4 is pressed. How can I use that functinoality?
Appreciate any info folks.
Thanks again.
SamirHi
Which SRM version are you using ?
<b>Related links -></b>
Re: Search Help on SRM front end screen
F4 Help for WBS Element
Re: Company Code defaults
Re: Search help for Custom Item level field
Custom field in SRM as a dropdown field with values stored in R/3
Calendar help for Date i/p field in SRM 5.0 shopping cart
Company code
Problems assigning values via F4 or search help
Also There is a standard table in SRM which contains Plant data ->
<b>BBP_LOCMAP</b> (Mapping Table Business Partner --> System --> Location)
Try creating a custom search help based on this Table, defined as selection method and assign the same to the related field.
Do let me know.
Regards
- Atul -
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 -
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 ! -
Calendar Functionality for a date field in HTML of a ITS service
Hi
I am working with SRM EBP module we want to add date help(with calendar function) to existign date fields in Shopping cart and PO screens . I found some HTML and Javascripts in SYSTEM and BBPGLOBAL services (named as calendar)but not sure which ones to use if anyone used date functionality or even have access to Standard SAP ITS screens that already have date field with calendar fuctionality can you help???????????????
Thanks in AdvanceHi
Let me first thank you for the quick response and timely help you provided calendar popup works great but one minor issue i am not able to click on the date entry and bring the field back into the field not sure if this funcitonality is in show_calendar.
I would really appreciate if you get time to look at below i am almost there with your help......thanks again
Here are the steps I did
I have a HTML page SAPLBBP_SC_UI_ITS screen 300 in SRM module , I created a new HTML page (zcalendar.html) in the same internet service BBPSC01 as suggested and I included in my HTML page SAPLBBP_SC_UI_ITS screen 300 and also I added below code to add a icon and a href call to the show_calendar function.
Code works great I get the popup but when I double click on the date it is not selecting the date into the field back .
Any thoughts??????
<!-- Start ghantavine -->
`include (~service="bbpsc01", ~name="zcalendar.html")`
<!-- End ghantavine -->
<!-- 10/24/05 ghantavine--delivary date -->
`TR()`
`if (GS_SCR_BASIC_I-DELIV_DATE.visible)`
`TR()`
`if (gs_scr_basic_i-deliv_date.disabled)`
`TD(class="label", nowrap="x",
active="")``TXT_BASIC_I-DELIV_DATE.label`
`TD(class="label", nowrap="x", active="")``gs_scr_basic_i-deliv_date.value`
`else`
`TD(class="label", nowrap="x", active="")`<label
for="`GS_SCR_BASIC_I-DELIV_DATE.name`">`TXT_BASIC_I-DELIV_DATE.label`</label>
`TD(class="data", nowrap="x")`
<input type="text" id="GS_SCR_BASIC_I-DELIV_DATE"
name="GS_SCR_BASIC_I-DELIV_DATE" value="`GS_SCR_BASIC_I-DELIV_DATE.value`"
maxlength="010" size="008">
<a href=http://mail.yahoo.com/config/login?/"_javascript:show_calendar();">
<img id="anchor1" src="`mimeurl(~service="bbpglobal",
~name="images/button/f4.gif", ~language="", ~theme="99")`" />
</a>
`end`
`TR()` `Lines()`
`end`
<!-- 10/24/05 ghantavine--delivary date -->
below is the showcalendar code
Hi , u save this as a html file and call this show_calendar fn from Onclick button of your Calendar image .
// For generating the calendar
var weekend = [0,6];
var weekendColor = "#e0e0e0";
var fontface = "Verdana";
var fontsize = 2;
var gNow = new Date();
var ggWinCal;
isNav = (navigator.appName.indexOf("Netscape") != -1) ? true : false;
isIE = (navigator.appName.indexOf("Microsoft") != -1) ? true : false;
Calendar.Months = ["January", "February", "March", "April", "May", "June",
"July", "August", "September", "October", "November", "December"];
// Non-Leap year Month days..
Calendar.DOMonth = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
// Leap year Month days..
Calendar.lDOMonth = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
function Calendar(p_item, p_WinCal, p_month, p_year, p_format) {
if ((p_month == null) && (p_year == null)) return;
if (p_WinCal == null)
this.gWinCal = ggWinCal;
else
this.gWinCal = p_WinCal;
if (p_month == null) {
this.gMonthName = null;
this.gMonth = null;
this.gYearly = true;
} else {
this.gMonthName = Calendar.get_month(p_month);
this.gMonth = new Number(p_month);
this.gYearly = false;
this.gYear = p_year;
this.gFormat = p_format;
this.gBGColor = "white";
this.gFGColor = "black";
this.gTextColor = "black";
this.gHeaderColor = "black";
this.gReturnItem = p_item;
Calendar.get_month = Calendar_get_month;
Calendar.get_daysofmonth = Calendar_get_daysofmonth;
Calendar.calc_month_year = Calendar_calc_month_year;
Calendar.print = Calendar_print;
function Calendar_get_month(monthNo) {
return Calendar.Months[monthNo];
function Calendar_get_daysofmonth(monthNo, p_year) {
Check for leap year ..
1.Years evenly divisible by four are normally leap years, except for...
2.Years also evenly divisible by 100 are not leap years, except for...
3.Years also evenly divisible by 400 are leap years.
if ((p_year % 4) == 0) {
if ((p_year % 100) == 0 && (p_year % 400) != 0)
return Calendar.DOMonth[monthNo];
return Calendar.lDOMonth[monthNo];
} else
return Calendar.DOMonth[monthNo];
function Calendar_calc_month_year(p_Month, p_Year, incr) {
Will return an 1-D array with 1st element being the calculated month
and second being the calculated year
after applying the month increment/decrement as specified by 'incr' parameter.
'incr' will normally have 1/-1 to navigate thru the months.
var ret_arr = new Array();
if (incr == -1) {
// B A C K W A R D
if (p_Month == 0) {
ret_arr[0] = 11;
ret_arr[1] = parseInt(p_Year) - 1;
else {
ret_arr[0] = parseInt(p_Month) - 1;
ret_arr[1] = parseInt(p_Year);
} else if (incr == 1) {
// F O R W A R D
if (p_Month == 11) {
ret_arr[0] = 0;
ret_arr[1] = parseInt(p_Year) + 1;
else {
ret_arr[0] = parseInt(p_Month) + 1;
ret_arr[1] = parseInt(p_Year);
return ret_arr;
function Calendar_print() {
ggWinCal.print();
function Calendar_calc_month_year(p_Month, p_Year, incr) {
Will return an 1-D array with 1st element being the calculated month
and second being the calculated year
after applying the month increment/decrement as specified by 'incr' parameter.
'incr' will normally have 1/-1 to navigate thru the months.
var ret_arr = new Array();
if (incr == -1) {
// B A C K W A R D
if (p_Month == 0) {
ret_arr[0] = 11;
ret_arr[1] = parseInt(p_Year) - 1;
else {
ret_arr[0] = parseInt(p_Month) - 1;
ret_arr[1] = parseInt(p_Year);
} else if (incr == 1) {
// F O R W A R D
if (p_Month == 11) {
ret_arr[0] = 0;
ret_arr[1] = parseInt(p_Year) + 1;
else {
ret_arr[0] = parseInt(p_Month) + 1;
ret_arr[1] = parseInt(p_Year);
return ret_arr;
// This is for compatibility with Navigator 3, we have to create and discard one object before the prototype object exists.
new Calendar();
Calendar.prototype.getMonthlyCalendarCode = function() {
var vCode = "";
var vHeader_Code = "";
var vData_Code = "";
// Begin Table Drawing code here..
vCode = vCode + "<TABLE BORDER=1 BGCOLOR=\"" + this.gBGColor + "\">";
vHeader_Code = this.cal_header();
vData_Code = this.cal_data();
vCode = vCode + vHeader_Code + vData_Code;
vCode = vCode + "</TABLE>";
return vCode;
Calendar.prototype.show = function() {
var vCode = "";
this.gWinCal.document.open();
// Setup the page...
this.wwrite("<html>");
this.wwrite("<head><title>Calendar</title>");
this.wwrite("</head>");
this.wwrite("<body " +
"link=\"" + this.gLinkColor + "\" " +
"vlink=\"" + this.gLinkColor + "\" " +
"alink=\"" + this.gLinkColor + "\" " +
"text=\"" + this.gTextColor + "\">");
this.wwriteA("<FONT FACE='" + fontface + "' SIZE=2><B>");
this.wwriteA(this.gMonthName + " " + this.gYear);
this.wwriteA("</B><BR>");
// Show navigation buttons
var prevMMYYYY = Calendar.calc_month_year(this.gMonth, this.gYear, -1);
var prevMM = prevMMYYYY[0];
var prevYYYY = prevMMYYYY[1];
var nextMMYYYY = Calendar.calc_month_year(this.gMonth, this.gYear, 1);
var nextMM = nextMMYYYY[0];
var nextYYYY = nextMMYYYY[1];
this.wwrite("<TABLE WIDTH='100%' BORDER=1 CELLSPACING=0 CELLPADDING=0 BGCOLOR='#e0e0e0'><TR><TD ALIGN=center>");
this.wwrite("[<A HREF=\"" +
"javascript:window.opener.Build(" +
"'" + this.gReturnItem + "', '" + this.gMonth + "', '" + (parseInt(this.gYear)-1) + "', '" + this.gFormat + "'" +
");" +
"\"><<<\/A>]</TD><TD ALIGN=center>");
this.wwrite("[<A HREF=\"" +
"javascript:window.opener.Build(" +
"'" + this.gReturnItem + "', '" + prevMM + "', '" + prevYYYY + "', '" + this.gFormat + "'" +
");" +
"\"><<\/A>]</TD><TD ALIGN=center>");
this.wwrite("[<A HREF=\"javascript:window.print();\">Print</A>]</TD><TD ALIGN=center>");
this.wwrite("[<A HREF=\"" +
"javascript:window.opener.Build(" +
"'" + this.gReturnItem + "', '" + nextMM + "', '" + nextYYYY + "', '" + this.gFormat + "'" +
");" +
"\">><\/A>]</TD><TD ALIGN=center>");
this.wwrite("[<A HREF=\"" +
"javascript:window.opener.Build(" +
"'" + this.gReturnItem + "', '" + this.gMonth + "', '" + (parseInt(this.gYear)+1) + "', '" + this.gFormat + "'" +
");" +
"\">>><\/A>]</TD></TR></TABLE><BR>");
// Get the complete calendar code for the month..
vCode = this.getMonthlyCalendarCode();
this.wwrite(vCode);
this.wwrite("</font></body></html>");
this.gWinCal.document.close();
Calendar.prototype.showY = function() {
var vCode = "";
var i;
var vr, vc, vx, vy; // Row, Column, X-coord, Y-coord
var vxf = 285; // X-Factor
var vyf = 200; // Y-Factor
var vxm = 10; // X-margin
var vym; // Y-margin
if (isIE) vym = 75;
else if (isNav) vym = 25;
this.gWinCal.document.open();
this.wwrite("<html>");
this.wwrite("<head><title>Calendar</title>");
this.wwrite("<style type='text/css'>\n<!--");
for (i=0; i<12; i++) {
vc = i % 3;
if (i>=0 && i<= 2) vr = 0;
if (i>=3 && i<= 5) vr = 1;
if (i>=6 && i<= 8) vr = 2;
if (i>=9 && i<= 11) vr = 3;
vx = parseInt(vxf * vc) + vxm;
vy = parseInt(vyf * vr) + vym;
this.wwrite(".lclass" + i + " {position:absolute;top:" + vy + ";left:" + vx + ";}");
this.wwrite("-->\n</style>");
this.wwrite("</head>");
this.wwrite("<body " +
"link=\"" + this.gLinkColor + "\" " +
"vlink=\"" + this.gLinkColor + "\" " +
"alink=\"" + this.gLinkColor + "\" " +
"text=\"" + this.gTextColor + "\">");
this.wwrite("<FONT FACE='" + fontface + "' SIZE=2><B>");
this.wwrite("Year : " + this.gYear);
this.wwrite("</B><BR>");
// Show navigation buttons
var prevYYYY = parseInt(this.gYear) - 1;
var nextYYYY = parseInt(this.gYear) + 1;
this.wwrite("<TABLE WIDTH='100%' BORDER=1 CELLSPACING=0 CELLPADDING=0 BGCOLOR='#e0e0e0'><TR><TD ALIGN=center>");
this.wwrite("[<A HREF=\"" +
"javascript:window.opener.Build(" +
"'" + this.gReturnItem + "', null, '" + prevYYYY + "', '" + this.gFormat + "'" +
");" +
"\" alt='Prev Year'><<<\/A>]</TD><TD ALIGN=center>");
this.wwrite("[<A HREF=\"javascript:window.print();\">Print</A>]</TD><TD ALIGN=center>");
this.wwrite("[<A HREF=\"" +
"javascript:window.opener.Build(" +
"'" + this.gReturnItem + "', null, '" + nextYYYY + "', '" + this.gFormat + "'" +
");" +
"\">>><\/A>]</TD></TR></TABLE><BR>");
// Get the complete calendar code for each month..
var j;
for (i=11; i>=0; i--) {
if (isIE)
this.wwrite("<DIV ID=\"layer" + i + "\" CLASS=\"lclass" + i + "\">");
else if (isNav)
this.wwrite("<LAYER ID=\"layer" + i + "\" CLASS=\"lclass" + i + "\">");
this.gMonth = i;
this.gMonthName = Calendar.get_month(this.gMonth);
vCode = this.getMonthlyCalendarCode();
this.wwrite(this.gMonthName + "/" + this.gYear + "<BR>");
this.wwrite(vCode);
if (isIE)
this.wwrite("</DIV>");
else if (isNav)
this.wwrite("</LAYER>");
this.wwrite("</font><BR></body></html>");
this.gWinCal.document.close();
Calendar.prototype.wwrite = function(wtext) {
this.gWinCal.document.writeln(wtext);
Calendar.prototype.wwriteA = function(wtext) {
this.gWinCal.document.write(wtext);
Calendar.prototype.cal_header = function() {
var vCode = "";
vCode = vCode + "<TR>";
vCode = vCode + "<TD WIDTH='14%'><FONT SIZE='2' FACE='" + fontface + "' COLOR='" + this.gHeaderColor + "'><B>Sun</B></FONT></TD>";
vCode = vCode + "<TD WIDTH='14%'><FONT SIZE='2' FACE='" + fontface + "' COLOR='" + this.gHeaderColor + "'><B>Mon</B></FONT></TD>";
vCode = vCode + "<TD WIDTH='14%'><FONT SIZE='2' FACE='" + fontface + "' COLOR='" + this.gHeaderColor + "'><B>Tue</B></FONT></TD>";
vCode = vCode + "<TD WIDTH='14%'><FONT SIZE='2' FACE='" + fontface + "' COLOR='" + this.gHeaderColor + "'><B>Wed</B></FONT></TD>";
vCode = vCode + "<TD WIDTH='14%'><FONT SIZE='2' FACE='" + fontface + "' COLOR='" + this.gHeaderColor + "'><B>Thu</B></FONT></TD>";
vCode = vCode + "<TD WIDTH='14%'><FONT SIZE='2' FACE='" + fontface + "' COLOR='" + this.gHeaderColor + "'><B>Fri</B></FONT></TD>";
vCode = vCode + "<TD WIDTH='16%'><FONT SIZE='2' FACE='" + fontface + "' COLOR='" + this.gHeaderColor + "'><B>Sat</B></FONT></TD>";
vCode = vCode + "</TR>";
return vCode;
Calendar.prototype.cal_data = function() {
var vDate = new Date();
vDate.setDate(1);
vDate.setMonth(this.gMonth);
vDate.setFullYear(this.gYear);
var vFirstDay=vDate.getDay();
var vDay=1;
var vLastDay=Calendar.get_daysofmonth(this.gMonth, this.gYear);
var vOnLastDay=0;
var vCode = "";
Get day for the 1st of the requested month/year..
Place as many blank cells before the 1st day of the month as necessary.
vCode = vCode + "<TR>";
for (i=0; i<vFirstDay; i++) {
vCode = vCode + "<TD WIDTH='14%'" + this.write_weekend_string(i) + "><FONT SIZE='2' FACE='" + fontface + "'> </FONT></TD>";
// Write rest of the 1st week
for (j=vFirstDay; j<7; j++) {
vCode = vCode + "<TD WIDTH='14%'" + this.write_weekend_string(j) + "><FONT SIZE='2' FACE='" + fontface + "'>" +
"<A HREF='#' " +
"onClick=\"self.opener.document." + this.gReturnItem + ".value='" +
this.format_data(vDay) +
"';window.close();\">" +
this.format_day(vDay) +
"</A>" +
"</FONT></TD>";
vDay=vDay + 1;
vCode = vCode + "</TR>";
// Write the rest of the weeks
for (k=2; k<7; k++) {
vCode = vCode + "<TR>";
for (j=0; j<7; j++) {
vCode = vCode + "<TD WIDTH='14%'" + this.write_weekend_string(j) + "><FONT SIZE='2' FACE='" + fontface + "'>" +
"<A HREF='#' " +
"onClick=\"self.opener.document." + this.gReturnItem + ".value='" +
this.format_data(vDay) +
"';window.close();\">" +
this.format_day(vDay) +
"</A>" +
"</FONT></TD>";
vDay=vDay + 1;
if (vDay > vLastDay) {
vOnLastDay = 1;
break;
if (j == 6)
vCode = vCode + "</TR>";
if (vOnLastDay == 1)
break;
// Fill up the rest of last week with proper blanks, so that we get proper square blocks
for (m=1; m<(7-j); m++) {
if (this.gYearly)
vCode = vCode + "<TD WIDTH='14%'" + this.write_weekend_string(j+m) +
"><FONT SIZE='2' FACE='" + fontface + "' COLOR='gray'> </FONT></TD>";
else
vCode = vCode + "<TD WIDTH='14%'" + this.write_weekend_string(j+m) +
"><FONT SIZE='2' FACE='" + fontface + "' COLOR='gray'>" + m + "</FONT></TD>";
return vCode;
Calendar.prototype.format_day = function(vday) {
var vNowDay = gNow.getDate();
var vNowMonth = gNow.getMonth();
var vNowYear = gNow.getFullYear();
if (vday == vNowDay && this.gMonth == vNowMonth && this.gYear == vNowYear)
return ("<FONT COLOR=\"RED\"><B>" + vday + "</B></FONT>");
else
return (vday);
Calendar.prototype.write_weekend_string = function(vday) {
var i;
// Return special formatting for the weekend day.
for (i=0; i<weekend.length; i++) {
if (vday == weekend<i>)
return (" BGCOLOR=\"" + weekendColor + "\"");
return "";
Calendar.prototype.format_data = function(p_day) {
var vData;
var vMonth = 1 + this.gMonth;
vMonth = (vMonth.toString().length < 2) ? "0" + vMonth : vMonth;
var vMon = Calendar.get_month(this.gMonth).substr(0,3).toUpperCase();
var vFMon = Calendar.get_month(this.gMonth).toUpperCase();
var vY4 = new String(this.gYear);
var vY2 = new String(this.gYear.substr(2,2));
var vDD = (p_day.toString().length < 2) ? "0" + p_day : p_day;
/* switch (this.gFormat) {
case "MM\/DD\/YYYY" :
vData = vMonth + "\/" + vDD + "\/" + vY4;
break;
case "MM\/DD\/YY" :
vData = vMonth + "\/" + vDD + "\/" + vY2;
break;
case "MM-DD-YYYY" :
vData = vMonth + "-" + vDD + "-" + vY4;
break;
case "MM-DD-YY" :
vData = vMonth + "-" + vDD + "-" + vY2;
break;
case "DD\/MON\/YYYY" :
vData = vDD + "\/" + vMon + "\/" + vY4;
break;
case "DD\/MON\/YY" :
vData = vDD + "\/" + vMon + "\/" + vY2;
break;
case "DD-MON-YYYY" :
vData = vDD + "-" + vMon + "-" + vY4;
break;
case "DD-MON-YY" :
vData = vDD + "-" + vMon + "-" + vY2;
break;
case "DD\/MONTH\/YYYY" :
vData = vDD + "\/" + vFMon + "\/" + vY4;
break;
case "DD\/MONTH\/YY" :
vData = vDD + "\/" + vFMon + "\/" + vY2;
break;
case "DD-MONTH-YYYY" :
vData = vDD + "-" + vFMon + "-" + vY4;
break;
case "DD-MONTH-YY" :
vData = vDD + "-" + vFMon + "-" + vY2;
break;
case "DD\/MM\/YYYY" :
vData = vDD + "\/" + vMonth + "\/" + vY4;
break;
case "DD\/MM\/YY" :
vData = vDD + "\/" + vMonth + "\/" + vY2;
break;
case "DD-MM-YYYY" :
vData = vDD + "-" + vMonth + "-" + vY4;
break;
case "DD-MM-YY" :
vData = vDD + "-" + vMonth + "-" + vY2;
break;
default :
vData = vMonth + "\/" + vDD + "\/" + vY4;
vData = vY4vMonthvDD ;
//vData = vDD"."vMonth"."vY4;
return vData;
function Build(p_item, p_month, p_year, p_format) {
var p_WinCal = ggWinCal;
gCal = new Calendar(p_item, p_WinCal, p_month, p_year, p_format);
// Customize your Calendar here..
gCal.gBGColor="white";
gCal.gLinkColor="black";
gCal.gTextColor="black";
gCal.gHeaderColor="darkgreen";
// Choose appropriate show function
if (gCal.gYearly) gCal.showY();
else gCal.show();
function show_calendar() {
p_month : 0-11 for Jan-Dec; 12 for All Months.
p_year : 4-digit year
p_format: Date format (mm/dd/yyyy, dd/mm/yy, ...)
p_item : Return Item.
p_item = arguments[0];
if (arguments[1] == null)
p_month = new String(gNow.getMonth());
else
p_month = arguments[1];
if (arguments[2] == "" || arguments[2] == null)
p_year = new String(gNow.getFullYear().toString());
else
p_year = arguments[2];
if (arguments[3] == null)
p_format = "MM/DD/YYYY";
else
p_format = arguments[3];
vWinCal = window.open("", "Calendar",
"width=300,height=250,status=no,resizable=no,top=100,left=100");
vWinCal.opener = self;
ggWinCal = vWinCal;
Build(p_item, p_month, p_year, p_format);
Yearly Calendar Code Starts here
function show_yearly_calendar(p_item, p_year, p_format) {
// Load the defaults..
if (p_year == null || p_year == "")
p_year = new String(gNow.getFullYear().toString());
if (p_format == null || p_format == "")
p_format = "MM/DD/YYYY";
var vWinCal = window.open("", "Calendar", "scrollbars=yes");
vWinCal.opener = self;
ggWinCal = vWinCal;
Build(p_item, null, p_year, p_format); -
Search help for date in ALV grid
I have ALV grid with field type date and search help for this:
ws_field-ref_table = 'ADCP'.
ws_field-ref_field = 'DATE_FROM'.
ws_field-inttype = 'D'
After I have clicked on this key F4 then I see a calendar and I have choosen some date, but in input grid field there aren't
choosen value. Why? Another search helps works perfect except this. Where is the problem?
Edited by: Kosmo on Jul 7, 2009 8:48 AMHi,
Find the code below
TYPE-POOLS: slis.
DATA: it_fcat TYPE slis_t_fieldcat_alv,
wa_fcat LIKE LINE OF it_fcat.
DATA: it_data TYPE vbap_t.
SELECT *
FROM VBAP
INTO TABLE it_data
UP TO 20 ROWS.
wa_fcat-fieldname = 'VBELN'.
wa_fcat-tabname = 'IT_DATA'.
wa_fcat-ref_fieldname = 'VBELN'.
wa_fcat-ref_tabname = 'VBAK'.
APPEND wa_fcat TO it_fcat.
clear wa_fcat .
wa_fcat-fieldname = 'POSNR'.
wa_fcat-tabname = 'IT_DATA'.
wa_fcat-seltext_l = 'Date'.
wa_fcat-ref_fieldname = 'ERDAT'.
wa_fcat-ref_tabname = 'VBAK'.
APPEND wa_fcat TO it_fcat.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_interface_check = sy-repid
it_fieldcat = it_fcat
TABLES
t_outtab = it_data
EXCEPTIONS
program_error = 1.
I have derived the above code from WIKi link
https://wiki.sdn.sap.com/wiki/display/Snippets/f4helpforalvgrid+display
Regards,
Murthy. -
HELP! Does anyone know a "Data Recovery Expert" for I-Phone? - My calender disappeared during transfer of data from my old I-Phone 4 to my new I-Phone 5s. It was on both I-Phones then vanished. (It was evidently not syncing during back-ups on the laptop)
What calendar were you syning to? Outlook? Google? Something else? The directions on how to resync vary a bit.
-
HELP! Does anyone know a "Data Recovery Expert" for I-Cloud & I-Phone? - My calender disappeared during I-Cloud transfer of data from my old I-Phone 4 to my new I-Phone 5s. It was on both I-Phones then vanished. (It was evidently not syncing during back-ups on the laptop)
HELP! Does anyone know a "Data Recovery Expert" for I-Cloud & I-Phone? - My calendar disappeared during I-Cloud transfer of data from my old I-Phone 4 to my new I-Phone 5s. It was on both I-Phones then vanished. (It was evidently not syncing during back-ups on the laptop)
The Apple techs are looking. But they can't find it. Nor can they find a back up on my laptop, Evidently when I backed up my Iphone to computer the calendar wasn't syncing. Since I only use the calander on my phone - I never noticed.
The Apple store rep that sold me the I-Phone 5 on Monday, was transferring my contacts and calendar thru I-Cloud (I never used I-Cloud before that moment - and always had it turned off). He successfully transferred the contacts - which are still on my phone), but the Calendar weirdly split into 6 calendars (2 of which were linked to my G-Mail which only had a few entries) (4 were linked to my MSN / Hotmail email and contained all the major events/data). I never created calendars that were separate or liked them to 2 different emails. I just typed entries into the I-Phone calendar. However, the calendar did exist on the new I-Phone for 24 hours. Something happened during transfer. When the Apple Genius Bar tech was attempting to back up my Calendar & merge the 6 calendars, everything disappeared in his hand while he was looking at it.
I am hoping that some really good data recovery expert exists that can restore the calendar that was in both I-Phones yesterday. It is completely devastating if I can't recover it.
Any help, or referrals, is great appreciated!!!!
Thanks! -
Initialising F4-Value-Help for date
I want the F4-Help for a date field to show a month different from the current one.
By default the month containing sy-datum is displayed.
I want the popup to start in another month.
I tried already to create a search help and setting the startdate in a function module of it's group.
This worked in SAPGui, but did not in Web Dynpro.
Does anybody have an idea, how to implement this.
Thanks in advance
BernhardYou would have to create Freely Programmed Value Help and within the layout of the Value Help create your own Data Picker using the DataNavigator UI element. With the Freely Programmed Value Help approach, you can ignore the current value in the bound context and start with any values you want. The downside will be that it won't be quite a user friendly. Instead of the quick calendar pop in place, you will get the full value help popup window.
-
I am using the big date calendar template in iPhoto. I am on Lion 10.7.2, macbook air. The names of the months are on each calendar page but something happens when I send the data to Apple. The names are part of the template. They are not text boxes. I lose two names on the calendar after it is sent to Apple. Apple suggested I make a pdf file of my calendar before sending it in and check to make sure every name shows. I did this with a calendar I just sent in. The calendar was correct. All names of the months were showing. After sending the data two month names disappeard because when it arrived by mail, it was incorrect. Apple looked at my calendar via a pdf file and it was incorrect. This is second time this has happened. I called Apple and they had me delete several folders in the Library folder, some preferences and do a complete reinstall of iPhoto. I have not yet remade the defective calendar. I am wondering if anyone else has had this problem?
kathyControl-click on the background of the view all pages window and select "Preview Calendar" from the contextual menu.
You can also save the pdf as a file to compare to the printed calendar. If the two names are visible in the pdf file then the printed copy should show them. Contact Apple for a refund. Apple Print Products - Apple Store (U.S.)
Maybe you are looking for
-
What is the correct procedure to follow after restoring a Mac from a Time Machine Backup?
Hi all, I did a Time Machine backup of my entire system (Time Machine Backup 1) before bringing my Macbook Pro to the Apple Store to to have it tested. After the TM backup I wiped the laptop leaving only the OS (Mountain Lion) on it so that I could
-
Version 33, problems when moving tab to new window, then if you open a new tab in that window it doesn't switch to it unless you use Ctrl-Tab.
-
Hello, My organization is in the process of migrating mailboxes from Exchange 2003 to 2010. In addition to migrating we are also changing the login's in users AD objects. These users also have smart phones that are configured via activesync. I've com
-
Hi, our OrgChart runs on SAP portal (url placed directly in iView) under reversible proxy-server. This proxy replaces actual URL in calls from OrgChart with it's own. Then OrgChart fails to launch, getting java-errors in files: https://<Proxy address
-
I can't seem to send a photo either as a text or as an email. I have clicked "Send as email" when the photo is on the Tour screen, but then I just get a red "x" saying error message. I have tried attaching the photo after composing an email, but I'