Find Latest Date(Valid To Date)
Hi all!
How do I find the latest Date(Valid To Date)?
If there is a way with Replacement Path or User Exits, How do I do it?
Regards,
Shree
i have a query with characterstic ZDATETO (Valid To Date).
I have to implement a condition on ZDATETO so that only Latest Valid To Date is displayed in my Report.
I also have a Key Figure Amount. A condition on it is to display only when the Amount is Negative.
These two conditions are to be implemented on the Report.
They Keyfigure part I could do it, but how do I find the Latest Valid To date to implement the condition?
Shree
Similar Messages
-
Data validation for Date Field in Web Dynpro ABAP
Hi ,
In my WDA i want to perform data validation for date filed. (i.e. While creating a new record i have to check the Start Date should be always lesser than End Date.)
If u ll enter the wrong date it should validate the Date and throw an error message.
Please Reply soon its urgent.
Thanks,
DeepikaHi,
First read the two attributes start date and end date.
Then write the following condition.
IF item_start_date > item_end_date.
Error message.
Endif.
For pop up error message you need to use Create_window method of the Interface if_wd_window.
Thanks. -
Date Validation - End date before Start date
This may be a very simple validation but I seem to be having trouble. I've got a form which requires a date range to be selected (Date Picker fields)...a Start date, and an End date.
I've created a Function Returning Boolean validation with the code as:
begin
if :P1_END_DATE < :P1_START_DATE then
return false;
else
return true;
end if;
end;This works 99%, except when the date range spans years.
For example, when I select '21-Dec-2010' in the start date and '4-Jan-2011' in the end date. The validation fails, and thinks the end date is before the start date.
Do I need to compare the year part of the date, before doing the rest? Or is the '<' not suited for this sort of check?
Edited by: djston on Dec 20, 2010 12:13 PMSorry, false alarm, it looks like I had my logic a little backwards :)
-
Finding the last valid value in a date range
The data I am working with represent readings from different instruments. One field keeps track of a running summation so this number is steadily increasing. I need to look at the data for a given date, however the problem is that sometimes the instrument is turned off. In this case there would be no data for that date, however since all I am interested is the sum total for the signal on that instrument, I need to keep going back until I find the last valid data in the database which would represent the sum up to this point. How can I design a query or procedure that would handle this contingency? Here is some sample data:
PV_ID SMPL_DTE INTEG_SINCE_VAL
271 20-JUL-08 12.05.00 AM 6172.0387459767
271 20-JUL-08 12.06.00 AM 6172.0387459767
271 21-JUL-08 12.05.00 AM 6172.0387459767
271 21-JUL-08 12.06.00 AM 6172.0387459767
271 21-JUL-08 08.43.00 AM 6172.0387459767
271 21-JUL-08 08.45.00 AM 6172.0387459767
271 22-JUL-08 12.05.00 AM 6172.0387459767
271 12-AUG-08 04.45.00 PM 6172.0387459767
271 12-AUG-08 04.50.00 PM 6172.038748687284 So if for instance I ran a query for July 30th, I'd need to actually get the result from July 22nd since it is the last valid number. PV_ID represents the instrument ID and INTEG_SINCE_VAL is the accumulated total for signal readings on that instrument.
Edited by: Solerous on Mar 16, 2009 7:23 AM
Edited by: Solerous on Mar 16, 2009 7:25 AMHi,
Connected to Oracle Database 10g Enterprise Edition Release 10.2.0.1.0
Connected as hr
SQL>
SQL> SELECT *
2 FROM (WITH data AS (SELECT 271 AS PV_ID,
3 (SYSDATE - 5) AS SMPL_DTE,
4 23 AS INTEG_SINCE_VAL
5 FROM dual
6 UNION ALL
7 SELECT 271 AS PV_ID,
8 (SYSDATE - 4) AS SMPL_DTE,
9 40 AS INTEG_SINCE_VAL
10 FROM dual
11 UNION ALL
12 SELECT 271 AS PV_ID,
13 (SYSDATE - 1) AS SMPL_DTE,
14 50 AS INTEG_SINCE_VAL
15 FROM dual)
16 SELECT data.*,
17 rownum
18 FROM data
19 WHERE PV_ID = 271
20 AND SMPL_DTE <= SYSDATE -- your date goes here
21 ORDER BY smpl_dte DESC)
22 WHERE rownum = 1;
PV_ID SMPL_DTE INTEG_SINCE_VAL ROWNUM
271 3/15/2009 1 50 3
SQL> Regards, -
Table to find BOM valid-till-date
Hi Friends,
I have to check the vality of BOM components, through transaction CS03 i could able to see the Valid-till-date and i need to check the same in my code.
Looked into following tables, thre is a field valid-from-date(DATUV) but i'm not getting field Valied-to-date(DATUB).
MAST Material to BOM Link
EQST Equipment to BOM Link
STAS BOMs header
STKO BOM header
STPN BOM follow-Up control
STPO BOM item
STPU BOM sub-item
STST Standard BOM link
STVB Bills of material - Serialisation of posting
STZU Permanent BOM data
Can any one please help me.
Thanks in advance.
/KiranHi kiran,
I think the Valid-to-date is in table AEEF-DATE_HI which can be linked with the BOM Header table STKO by field AENNR. Try this.
Otherwise you can also get the Date using the FM CS_BOM_EXPLOSION....
Use it as follows;
CALL FUNCTION 'CS_BOM_EXPLOSION'
EXPORTING
AUMNG = 0
CAPID = ' '
DATUV = DATVAL "valid-from date
EHNDL = '1'
MKTLS = 'X'
MEHRS = 'X'
MMORY = '1'
MTNRV = MATNR
STLAL = LAL "like mast-stlal default '1'
STLAN = LAN "like mast-stlan default '2'
SVWVO = 'X'
VRSVO = 'X'
WERKS = WERKS
mmaps = 'X'
IMPORTING
TOPMAT = STARTMAT "includes structure CSTMAT
TABLES
STBD = TBD "includes structure CSXDOC
STBE = TBE "includes structure CSXEQUI
STBK = TBK "includes structure CSXKLA
STBM = TBM "includes structure CSXMAT
STBP = TBP "includes structure CSXGEN
STBT = TBT "includes structure CSXTDL
EXCEPTIONS
ALT_NOT_FOUND = 1
CALL_INVALID = 2
MISSING_AUTHORIZATION = 3
NO_BOM_FOUND = 4
NO_PLANT_DATA = 5
NO_SUITABLE_BOM_FOUND = 6
OBJECT_NOT_FOUND = 7
CONVERSION_ERROR = 8
OTHERS = 9.
After the function call you will get the Valid to Date(DATEUB) from table STBP.
Hope this Helps you...
Regards
Karthik D -
Find Sales Order Item Basic Data by Elements query fails
I am trying to consume Find Sales Order Item Basic Data by Elements in .NET 3.0.
Every thing appears to be working fine -- I could query by PO number, Creation time, SalesOrganisationID etc.
However, the most basic query is mysteriously failing. I just want to query by Sales order number, and have given a valid sales order number 6718 that exists in SAP.
It fails giving the following errors:
(in Log.LogItem.Note variable):
<b>"Conversion failed: Invalid input format"</b>
(in Log.LogItem.TypeID variable):
<b>"701(SFB)"</b>
Code is pretty simple, and I am just trying to query Saler Order number 6718. Of course there is nothing wrong with its format.
From the ESOA site, all I could get was:
<i>----
QUOTE -
The following values are optional selection criteria for restricting the search result:
SelectionByID Document number range
INCLUSION_EXCLUSION_CODE
INTERVAL_BOUNDARY_TYPE_CODE
LOWER_BOUNDARY_ID
Value
UPPER_BOUNDARY_ID Value
Value
UNQUOTE -
</i>
I could not even have any documentation on what to put in InclusionExclusionCode, and IntervalBoundaryTypeCode. They apper to be some Global Data Types for which I couldn't find any documentation. By sifting through Wiki, I just guessed a couple of values praying that it may work. I am a bit new to ESOA, but have expertise in .NET 3.0. Would someone guide me where to find the documentation for that, where are the error codes listed, so that I make the queries with little better preparation.
querydata.SelectionByID = new SalesOrderERPItemBasicDataByElementsQueryMessage_syncSalesOrderERPItemBasicDataSelectionByElementsSelectionByID[1];//Single element array is good enough
querydata.SelectionByID[0] = new SalesOrderERPItemBasicDataByElementsQueryMessage_syncSalesOrderERPItemBasicDataSelectionByElementsSelectionByID();
querydata.SelectionByID[0].InclusionExclusionCode = "E";
querydata.SelectionByID[0].IntervalBoundaryTypeCode = "6";
querydata.SelectionByID[0].LowerBoundaryID = new SalesOrderID();
querydata.SelectionByID[0].LowerBoundaryID.Value = "6718";
querydata.SelectionByID[0].UpperBoundaryID = new SalesOrderID();
querydata.SelectionByID[0].UpperBoundaryID.Value = "6718";How do you test with a SOAP Client - I am trying to use same dataset as provided?
I did with WSDL Test - SAP, SOAP Client and got the following error:
<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
<soap-env:Body>
<nr1:SalesOrderERPBasicDataByElementsResponse_sync xmlns:nr1="http://sap.com/xi/APPL/Global2">
<Log>
<MaximumLogItemSeverityCode>1</MaximumLogItemSeverityCode>
<Item>
<TypeID>701(SFB)</TypeID>
<SeverityCode>1</SeverityCode>
<Note>Conversion failed: Invalid input format</Note>
</Item>
<Item>
<TypeID>701(SFB)</TypeID>
<SeverityCode>1</SeverityCode>
<Note>Conversion failed: Invalid input format</Note>
</Item>
<Item>
<TypeID>701(SFB)</TypeID>
<SeverityCode>1</SeverityCode>
<Note>Conversion failed: Invalid input format</Note>
</Item>
<Item>
<TypeID>701(SFB)</TypeID>
<SeverityCode>1</SeverityCode>
<Note>Conversion failed: Invalid input format</Note>
</Item>
<Item>
<TypeID>701(SFB)</TypeID>
<SeverityCode>1</SeverityCode>
<Note>Conversion failed: Invalid input format</Note>
</Item>
</Log>
</nr1:SalesOrderERPBasicDataByElementsResponse_sync>
</soap-env:Body>
</soap-env:Envelope>
Thanks..
Vikas -
In Service contract, to change the valid form date on service code level.
Hi.
I want to change the price valid form date on service code level ( i.e. in condition) in Service contract.
I know i can do that with ME32 transaction but i have lot of Service contract with more then 10,000 line items
Is there any way that i can change in mass based on Service contract no. wise.???
Thanks in advance..
Edited by: VIKRANT HANDE on Sep 15, 2009 9:11 AMPlease check in KON* series table in SE16N transaction. I guess KOHN table may help you out. You can see other similar tables.
In any one of the table you will find validity data. -
From and To date Validations in Adobe form
Hi All,
I'm new to the Adobe forms, I have a requirement to do validations on Date fields.
from >= current
to >= from and use Month YYYY format (e.g., September 2009)
Could anyone please let me know the code to validate in the Adobe form.
Thanks,
Archana.Adobe has an online reference with examples.. you can find it [here.|http://livedocs.adobe.com/livecycle/8.2/acrobat_designer/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Adobe_LiveCycle_Designer_Help&file=001211.html] It gives scripting examples in both Formcalc and javascript.
Keep it as a favorite in your browser - you'll be using it alot. -
Date validation in ABAP Webdynpro.
Hi,
I have created a field for date in my table and binded it with a field of a data dictionary table . The problem is when the user enters the year , whether one , two or three digits it automatically sets the remaining digits and the year is a four digit value . This happens even before reading the value of the date field attribute , so I m not able to find a way to validate that user enters the four digits of the year accurately.Hi,
Pls check out this thread on date validation in detail-
How can I check these data whether valid ?
Validation code
date format in application
Regards
Lekha -
Date validation in a master/detail view
Hi everyone,
I have a problem and I hope someone can help me. I'm trying to create a validation for my application. I have a Master/Detail view where I add rows to my database and in the rows there is a "from date" and "to date". I want to create a validation so that the "from date" can not be chosen before the current date.
I'm having trouble because most of the tutorials I read on this work with page items, but since I have this in a Master/Detail view I have Column Attributes, wich do not behave the same way as page items.
Any help would be very appreciated.
Thanks,
LukaI'm still having quite some trouble with this... everything I try gives me some sort of error.
My latest attempt was to make a PL/SQL returning boolean validation with the code:
FOR i IN 1..APEX_APPLICATION.G_F10.COUNT LOOP
IF DATUM_OD(APEX_APPLICATION.G_F10(i), 'DD.MM.YYYY HH24:MI') < SYSDATE THEN
return true;
else
return false;
END IF;
END LOOP;
and it says:
Error processing validation.
ORA-06550: line 2, column 4: PLS-00201: identifier 'DATUM_OD' must be declared ORA-06550: line 2, column 1: PL/SQL: Statement ignored -
Creating a trigger to enforce data validation
I would like to create a trigger to do some basic data validation. For example, to join an honors society a student must have a gpa between 3.7 and 4.0. I want this to fire before an insert on the table NatlHonSoc, and the field name is gpa.
Thanks!user8775995 wrote:
I'm trying to learn how to use triggers and just made this example up. It always helps to state your real intent from the beginning.
All I have is the general syntax from a book <snip>"A" book? Which book? Just any old book?
There is no book better to start with than the official documentation.
Learning where to look things up in the documentation is time well spent investing in your career. To that end, you should drop everything else you are doing and do the following:
Go to tahiti.oracle.com. Drill down to your product and version.
Spend a few minutes just getting familiar with what is available here. Take special note of the "books" and "search" tabs. Under the "books" tab you will find the complete documentation library.
Spend a few minutes just getting familiar with what kind of documentation is available there by simply browsing the titles under the "Books" tab.
Open the Reference Manual and spend a few minutes looking through the table of contents to get familiar with what kind of information is available there.
Do the same with the SQL Reference Manual.
Do the same with the Utilities manual.
You don't have to read the above in depth. They are reference manuals. Just get familiar with what is there to be referenced. Ninety percent of the questions asked on this forum can be answered in less than 5 minutes by simply searching one of the above manuals.
As pointed out by Centinul, for your purpose, you should include the Application Developer's Guide as part of your "must reference" books.
Then set yourself a plan to dig deeper.
- Read a chapter a day from the Concepts Manual.
- Look in your alert log and find all the non-default initialization parms listed at instance startup. Then read up on each one of them in the Reference Manual.
- Take a look at your listener.ora, tnsnames.ora, and sqlnet.ora files. Go to the Network Administrators manual and read up on everything you see in those files.
- When you have finished reading the Concepts Manual, do it again.
Give a man a fish and he eats for a day. Teach a man to fish and he eats for a lifetime. -
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 -
Validating a date using Struts
Hoi all,
I am trying to validate a date in struts,
I have googled for a information and searched the forum but didn't find anything useful, I might have been asking the wrong questions.
I have set up my validate.xml and it captures a date that is like : aa/01/3000 and returns an error specifying that the date is wrong but when i type in 45/01/3000 the date is accepted as a valid date and I cannot understands why, the date validation is built in isn�t it ??
Any help will be appreciatedUhmmm i don�t have it sorted.......
I have been trying to validate a specific date that info can be seen in my original post on top, This is what i have so far in my Validation.xml file
<form name="searchForm">
<field property="startDate" depends="date">
<arg0 >
<var><var-name>datePatternStrict</var-name><var-value>dd/MM/yyyy</var-value></var>
</field>
<field property="endDate" depends="date">
<var><var-name>datePatternStrict</var-name><var-value>dd/MM/yyyy</var-value></var>
</field>
<field property="endDate" depends="validwhenDate" >
<var>
<var-name>test</var-name>
<var-value>(startEndDateCompare!= -1)</var-value>
</var>
</field>
</form>endDate and startDate are both strings and the startEndDateCompare is a method in the searchForm.java file that compares the parsed date values of the string dates of endDate and startDate via a simple date format, If this doesn�t make sense let me know and I'll try to elaborate
now my questions is what am I doing wrong??
The validation still registers that 01/aa/3000 is an invalid date but not 45/01/3000 this is still validated as a correct date.
Thank for any help. -
Entity Object validation for "Date" type
I am trying to use the Entity Object validation for a Date field type, it is a required field.
I am using the format: MM/dd/yy HH:mm:ss
It is a simple validation where the date value must be less than or equal to the current date/time.
I tried using "Query Result" validation where the date is LESS THAN the query SELECT SYSDATE FROM dual.
This throws an error:
JBO-27011: Attribute set with value 2006-07-09 14:05:53.0 for LksrSurveyDte in LCFSReportService.LeakDetailView1 failed.
I have be unable to find help on validating dates using validation for an Entity Object and need some help.
Thanks in advance.In your case you can implement a service method in the VO to check if any other reservation overlaps with the new one (which is not inserted in the db).
I would use a an other VO (e.g. VODateCheck) for this. This VO has it's query build to check if a given roomid and a given startdate(time?) overlaps any other record for the roomid
select * from ReservationRoom where RoomId=:bindRoomId and ReservationEnd>=:bindReservationStartIf this query returns one or more rows you have an overlapping in the schedule and throw an error.
You call this VODateCheck from your service method in the other module before inserting the record. Set the bind variables in the VODateCheck and execute the query.
Timo -
Change validity end date on activity type
Is there a way to change the validity end date of an activity typre. Currently it is 9999 we would like to change it to 2011.
We would like to use a particular activity to cost current standards but dont want to use it for planned estimates that we will create for 2011. I am assuming if the validity ends in 2011 it will resolve the problem. I know we could create alternate routings and different production version but I am trying to avoid that and see if we can find a short cut.
Your help in this regard will be much appreciatedHey Greta,
I executed the report but it says ,"The deletion could not be carried out, plan records still exict on cost center for activity type." I have deleted every thing from kp26 for that particular combination of activity type and Cost center.
Any ideas as to what is happening!!
Regards,
Maybe you are looking for
-
How to add exactly 2 NON XML caracters at the end of a SOAP body
Hello all I am trying to add two (and only two) extra non xml caracters "AA" at the END of a SOAP body using the JAXWS handlers as so: HTTP/1.1 200 OK Content-Type: text/xml;charset=UTF-8 Content-Length: 131 Content-Length: 131 Server: Jetty(7.x.y-SN
-
How to repair corrupt \windows\system32\config\system files?
T61 will not boot to Win XP - says the \windows\system32\config\system file is missing or corrupt. BIOS hardware test of disk drive passes. When I place a Microsoft Win XP disk to attempt a repair, the message says there is no disk drive detected.
-
Lateste update to my system resulted in my Word crashing on saving or closing documents.
Yosemite has been working fine for me overall; however, yesterday there was an update to my system that resulted in my Word 365 crashing as soon as I try to save a document. Any suggestions other than getting rid of Word?
-
How can you rotate the screen on a 7th generation Ipod nano?
I have just bought a 7th generation Ipod Nano (The newest nano) and I was wondering if it is possible to rotate the screen when playing music?
-
I have a 40E22OU TV. Using HDMI for my BlueRay and Cable. Those work fine. I am having trouble hooking up my Wii. I get sound, no video. There is no yellow port for Video. ANy ideas how I can get video for the Wii?