Date in past - validation
Hi ,
In my webdynpro application, I have a date feild and I need that after user select a date and then submit the form - on submit an method is implemented which checks that the date is either the current date or any date from past user should not select future date ansd in case the date is any future date it shows error message .
For this, I created a message of type error in message pool as - DateInFuture.
then I created a method as - CheckDateInPast()
In implementation of method -
IWDMessageManager msgMgr = this.wdThis.wdGetAPI() .getComponent().getMessageManager();
Date theDate =(Date) this.wdContext.currentContextElement().
getAttributeValue(Date);
IWDAttributeInfo attributeInfo =
this.wdContext.getNodeInfo().getAttribute(Date);
if (theDate.after(new Date(System.currentTimeMillis()))) {
String fieldLabel = this.wdContext.getNodeInfo().getAttribute(Date)
.getSimpleType().getFieldLabel();
msgMgr.reportContextAttributeMessage(
this.wdContext.currentContextElement(),
attributeInfo,
IMessageSimpleErrors.Date_In_Future,
new Object[] {Date, theDate},
true);
The imports - used are
import java.sql.Date;
import com.sap.tc.webdynpro.progmodel.api.IWDAttributeInfo;
import com.sap.tc.webdynpro.progmodel.api. IWDMessageManager ;
The Error I am geting is - IMessageSimpleErrors cannot be resolved..
Please can any one tell what is the problem ???
Thanks,
Gunja
Hi,
Thanks pinki , that error is no more now by using IMessage<Comp name>.<messagename>,...
But can you please tell me while calling this method in the action .
In the implementation of onactionSubmit (...) -
this.CheckDateInPast( string Date);
What should be the Parameter in " String Date "
and One more problem when user click clear all button that has to clear all the feilds -
In this -
//wdContext.currentContextElement().setDate(new Date(0));
//wdContext.currentContextElement().setTime(new Time(0));
But this lines does not clear the date and time but set it to 1/1/1970 and time to 5:30:00 A.M.
Please let me know how this can be solved????
Thanks,
Gunja
Similar Messages
-
Order confirmation with delivery date in past
Hello everybody,
In the SNC portal, we have a lot of old Purchase order which are not confirmed, and when we try to confirmed them, we have the error below :
Order XXXXXXXX, item 00010, schd. line 0000000002: delivery date lies in past
My client wish create a super user (admin ?) who can confirmed a Purchase Order item with a delivery date in past (for example 06/08/2011).
Is it possible to create such profiles? If so how to configure it in SNC.
Are there other solutions ?
Thank you very much for your help.
Stéphane.Hi Stéphane,
Normally in a standard SAP settings Purchase order confirmation in past gives warning message but you can have PO confirmation in past from warning to error or Information.
Go to SPRO>Supply Network Collaboration>Basic Settings>Validation>Own Settings-->Maintain Settings in Validation Profiles
Maintained below setting if you want message as information (No error or warning message)
Profile:POC2
Validation check:PO_DELVRY_DATETIME_IN_PAST
Msg.Type:I
Save Mode:Save Message as Valid
Continuation Mode:Continue checks
Profile:POC3
Validation check:PO_DELVRY_DATETIME_IN_PAST
Msg.Type:I
Save Mode:Save Message as Valid
Continuation Mode:Continue checks
Maintained below setting if you want message as error
Profile:POC2
Validation check:PO_DELVRY_DATETIME_IN_PAST
Msg.Type:E
Save Mode:DO not Save Message
Continuation Mode:Discontinue checks
Profile:POC3
Validation check:PO_DELVRY_DATETIME_IN_PAST
Msg.Type:E
Save Mode:DO not Save Message
Continuation Mode:Discontinue checks
Maintained below setting if you want message as warning
Profile:POC2
Validation check:PO_DELVRY_DATETIME_IN_PAST
Msg.Type:W
Save Mode:Save Message as Valid
Continuation Mode:Continue checks
Profile:POC3
Validation check:PO_DELVRY_DATETIME_IN_PAST
Msg.Type:W
Save Mode:Save Message as Valid
Continuation Mode:Continue checks
Above setting is a generic setting for all user and If you need User specific setting then it is a customization required.
Regards,
Nikhil -
SNP Planned Order start date in past
Hi
After SNP run, for the past requirements it is giving avaiablilty data as today but the planned order start date is in past. Now this order fails in CIF as the production version in R/3 is valid from today.
In the strategy profile we have backward+reverse with infinite scheduling. In this case the start date should be todays date for past requrirements... am I correct?
Regards
Abhishek RaiHello Abhishek,
We are also facing the same issue. Did you find any solution to this issue?
We are on SCM 7.0 with EHP1.
Thanks,
Mangesh -
Delivery date in past in scheduling agreement
Hi
In ME38 , when I try to change delivery schedule for a line item from 05/07/2008 to 02/08/2008 , system is giving below error .
*Delivery date is in past *
I am ignored this message and pressed enter and saved the scheduling agreement .
Just I need to know , does this error has any ramification in any way .?
Thanks in AdvanceHi,
In SAP the delivery date is not taken in Past,so it is showing you warning/error message.
It is not advisable to have delivery date in past.This is inturn cause problem when you going forward & want to evaluate vendor on delivery performance.
Thanks,
AMIT -
Conversion from string "20041023 " to type 'Date' is not valid.
Hi ,
I have a table with one of the column(EmpHiredate) datatype is char(10). It has value like "20141023". I need to display this value as date format(dd/mm/yyyy) in report.
Following methods i tried in textbox expression but no luck.
=Format(Fields!EmpHireDate.Value,"dd/MM/yyyy")
=Cdate(Fields!EmpHireDate.Value)
Error:
[rsRuntimeErrorInExpression] The Value expression for the textrun ‘EmpHireDate.Paragraphs[0].TextRuns[0]’ contains an error: Conversion from string "20041023 " to type 'Date' is not valid.
Is it possible to convert string to date using SSRS textbox expression ? Can anyone help me with the solution.
Thanks,
KittuHi Jmcmullen,
Found one more issue on the same. I have one value like "00000000" for the column(EmpHiredate)
, when i use above expression values(ex:"20141023")
are displaying in dd/MM/yyyy format in report except value like "00000000" and giving following error:
[rsRuntimeErrorInExpression] The Value expression for the textrun ‘EmpHireDate.Paragraphs[0].TextRuns[0]’ contains an error: Conversion from string "0000/00/00" to type 'Date' is not valid.
Even i tried to pass its original value("00000000") as below but no luck.
=IIF(Fields!EmpHireDate.Value = "00000000","00000000",Format(CDATE(MID(Fields!EmpHireDate.Value,1,4) + "/" + MID(Fields!EmpHireDate.Value,5,2) + "/" + MID(Fields!EmpHireDate.Value,7,2)),"dd/MM/yyyy"))
Also tried this:
=IIF(Fields!EmpHireDate.Value = "00000000","2000/10/21",Format(CDATE(MID(Fields!EmpHireDate.Value,1,4) + "/" + MID(Fields!EmpHireDate.Value,5,2) + "/" + MID(Fields!EmpHireDate.Value,7,2)),"dd/MM/yyyy"))
Please Suggest.
Thanks ,
Kittu -
Hi all ,
What for the need / concept of the Stat date in past has been given in Scheduling paramters ?
or why i have to create the order in past date when practically i can not mfg the prodcut in past ?
Thanks in adv .
RegardsHi,
For every production order we are scheduling with some cushion time because of many interruptions. These cushion timings given in schedule margin key.
As per system schedule , production start date in the past. We can not start production from the past date.
But with these cushion timings float before production, opening period we can eleminate & possible to start production from today.
So no need to reschedule the order.
Hope this helps you.
Regards,
Dharma -
In Windows 7 using Adobe Reader XI (11.0.07) was able to copy an item (name, number, date) and paste in another document. In Windows 8.1 using same version of Adobe Reader XI (11.0.07) not able to do this. Any solutions?
With computer running Windows 7 using the curser can select an item, then right click and select copy. With computer running Windows 8 there is a hand instead of a curser therefore unable to select an item, therefore unable to copy. Is there a way to have a curser rather than the hand?
Eureka!!! Just found by right clicking on the hand can then select “Select Tool” and then copy. Hurray!!! -
How to compare current date with past date
Sample code for comparing current date with past date
i dont want to Calender.set method to compare it.
How can i do it?PLEASE stay with ONE thread:
http://forum.java.sun.com/thread.jspa?threadID=5143991&tstart=0 -
Document date in MIGO takes any date in past and future
All SAP Gurus,
We have a problem with Document date in MIGO taking any date in past and future.
We want to restrict this date, although this (document date) has no relation with posting of the document.
Can it be done?
Regards,Hi
Check the below message setting if it works and set it to E mode
in mm-->Purchasing->environment data-->Define Attributes of System Messages->system messages----> New entries
00 06 028 Purchase order date is in the past
For future you may have to go for an enhancement. Check out
Regards
Edited by: samuel mendis on May 22, 2009 9:02 AM -
MDBT with planning date in Past "01.01.2010".
Hi Guru,
I need some help.
Scenario: We made one variant in MDBT with planning date in Past "01.01.2010". But I could not Analise the effect of same.
Can any one share what is the effect of planning date in Past.
Thanx & Regd
PNUHi,
creation of varient in the past date will not have any effect. All that effects is scheduling the varient.
Correct me if i ma wrong.
Thanku
krishna -
Program to collect user u2013 transaction execution data for past period
Hi Experts
We are developing a program to collect user u2013 transaction execution data for past period ( 3 months-1 year ). We are getting required User and Tcode output but unable to find exact count per tcode ( executed by respective user).
We have following count components available in SAPWL_WORKLOAD_GET_STATISTIC / SWNC_COLLECTOR_GET_AGGREGATES
COUNT , DCOUNT ( Dialog count for transaction ) , UCOUNT , BCOUNT , ECOUNT, SCOUNT ,LUW_COUNT .
Out of which LUW_COUNT -Logical Units of Work comes close to no ot time transaction was executed but itu2019s even not the exact count as one transaction code can have more than one LUW .
Does anyone have idea about how to get the right count .
Thanks
VaniIf audit log is enabled in SM19 for transaction criteria all, you can get the transaction history executed by the users. But may need more space on audit file system if this is enabled for all users. May be you can archive once in 3 months into ZIP files and can unzip whenever you need.
-
Filter data by cross validation rules
Hi all,
Is there any way to build report that filter out data by cross validation rules ?
For e.g:
Acc. Flex -> Company.CC.Natural.Future.
The cross validation rules are excluding CC -> 01 and 05.
So all the combination_id that contains CC 01 and 05 will be filter out.
TIA,
FendyPerfect! This is how you define cross validation rules. It's not back to front but from R11.0.3, Oracle standard is to use the cross validation rules like this.
- Kiran -
Fetching data for past 13 months
Hello Team
I have a data model . Now i want some suggestions . My requirement is that when i try to pull data from my HANA DB i should give current data and automatically the data of past 13 months should come . What technique i should apply to achieve the same .
RegardsHi,
Have a look on the below documents:
How To...Calculate YTD-MTD-anyTD using Date Dimensions
Applying YTD in SAP HANA with SAP BO Analysis Office ( Using Projections )
Regards,
Krishna Tangudu -
Release untill date in past In QIR
Hi All,
I am facing on problem,
The materail has inspction type 01 as active. The QM procurement is active with control key 0000. The QIR has a setting as NO INPECTION. The release until date in QIR is in past but still the PO was created, When we create the PO it shows the stock type as QUAlITY but when we make GR it is posted to intesricted and no inspection lot is created.
AS the release date is in past
1) PO should not be created.
2) System should take quality settings from material master and not from QIR as the release untill date in past.
Can you please advice how to achieve this?
Thanks.
S JYou have selected 0000 as the control key. This basically means the QIR release date has no affect. You need to use a control key where at least "release required" is set in the control key such as "0001".
As far as the lack of an inspection lot, you have the vendor as being a certified vendor and no inspection is required. This is always in effect regardless of the release date of the QIR. SAP assumes you wouldn't be able to create a PO because of the release date to start with. So the insp. control never comes into play. But because you had a 0000 control key, the release date isn't in play, but the insp. control still is.
I.e. The insp control does not check the release date.
FF -
Restrict billing date in past in transaction vf11
Restrict billing date in past in transaction vf11
My requirement is cancel billing date should be in current date in vf11
debajyotikarhi ...
This is natuaral behaviour of sap .
Because , if you r going to cancel very old billing document ... there will be certainly a problem of tax calculation ...that's why in normal scenario it is been restricted for very certained and well defined period ..to avoid double tax payment ..
Apart from this , if u want ...u need to go for user exit .
regards
sundar
Maybe you are looking for
-
I have a very old Ipod probably 12 years old. It could be the first or second generation. I have music on it that I would like to put on my new one. I have not updated this Ipod since I purchased several computers ago. How do I put the music from thi
-
Iw72 service order + Link b/w operations and PRTs
Hello Friends, So here is my problem. In transctin iw72 ( service order ) there is a tab called "operations". In tab operatinos I can attatch Resourse / tool ( table AFFH ( PRT assignment data for the work order ) and structure AFFHD (Structure of t
-
GPS Navigation App that doesn't suck?? Or am I doing something wrong?
I started off with a droid 2 before I got my iphone 4. The droid 2 gps was phenomenal, I had no problems with it. Then I got an iphone which I assumed was going to be just as good if not better than the droid's gps. Boy was I wrong! The "Maps" ap
-
Predictive Analytics for Equipment Maintenance?
Could an equipment failure or parts shortage be predicted based on an analysis of work orders, parts and equipment usage? Predictive Analytics uses several techniques from data mining and statistics to process data in order to predict future trends a
-
Hi Experts, Ssytem details:PI7.1, While processing messages from source system to PI system. we are getting the below error : PLAINHTTP_ADAPTER ATTRIBUTE_CLIENT HTTP client code 400 ICM_HTTP_CON_FAILED The messages get stuck while processing from so