ABAP - HR : Need macro or FM to get record based on changed on date (AEDTM)
Hi,
I am having the requirement to get record which changed on yesterday (for sy-datum - 1). That means if record is updated today, by using rp_provide_from_last I will get today's record. But i should get yesterdays record.
we can get this by using select or loop or provide - endprovide. Taking performance issue in consideration, this statements are not allowed.
So please provide me any macro or function module which we can retrive the record based on AEDTM.
I am using PNPCE LDB and i need to extract data for PA infotypes.
Thanks in Advance,
Ravi Kumar
Hi Ravi,
There is no macro which can retrieve the record based on AEDTM. One more thing to say is statement provide ...endprovide statement can be used and there would be no performance issue if i am not wrong. Anyway try this code.
tables: pa0001, pernr.
infotypes : 0001.
data : begin of itab occurs 0,
pernr like pa0001-pernr,
aedtm like pa0001-aedtm,
end of itab.
data : v_aedtm type pa0001-aedtm.
start-of-selection.
v_aedtm = sy-datum - 1.
get pernr.
provide * from p0001 between pn-begda and pn-endda.
if p0001-aedtm = v_aedtm.
move : p0001-pernr to itab-pernr,
p0001-aedtm to itab-aedtm.
append itab.
endif.
endprovide.
end-of-selection.
loop at itab.
write :/ itab-pernr, itab-aedtm.
endloop.
Regards,
Kranthi
Similar Messages
-
primarily using the ipad air as an art portfolio but photos i upload in order get rearranged. other than changing the date they were shot, is there any solution to this? can they be reorganized in iphoto on the ipad?
You are welcome.
Sorting and organizing photos on IOS devices is one of the things that really need to be improved. It looks like the developers simply did not expect the users to want to keep large photo libraries on an IOS device, where the ordering would matter. I'd send feedback to the developer team, so that they see, what the users want and need:
You can use this form: Apple - iPhoto - Feedback -
Need help with Expressions to get the sum of rows between dates
Date Total
8/06/2010 $2000
8/10/2010 $5000
8/28/2010 $2500
9/10/2010 $5000
9/16/2010 $2000
9/25/2010 $7000
9/28/2010 $2500
I need sum of rows based on month. I have tried following syntax. It did not work, which is returning $0. Appreciate any help i get.
=sum(iif(Date.value>="8/01/2010" AND Date.value<="8/30/2010",Total.value,0))Hi RG K,
According to your description, you want to calculate sum of total based on month use expression, but the expression does not work. If that is the case, please refer to the following steps:
In design surface, right-click Insert and click Text Box.
Right-click inside of the text box, then click expression.
In Expression text box, type the expression like below:
=sum(iif(Fields!Date.Value>="8/01/2010" AND Fields!Date.Value<="8/30/2010",Fields!total.Value,CDec(0)))
In this expression, the data type of total is Decimal, so we need to convert 0 to Decimal use CDec() function. If data type of total is Double, we need to use CDbl() function.
The following screenshot is for your reference:
If you have any more questions, please feel free to ask.
Thanks,
Wendy Fu
Wendy Fu
TechNet Community Support -
Need to set attribute of current record based on value in next record
Using Forms 6, I have a form showing a list of records. There can be multiple records with the same ID but having different expiration dates. I need to set attributes to hilite only the record with the latest expiration date. The current list hilites the records with future expiration dates-but we've found that sometimes the subscription is renewed before the old expiration date has been reached, resulting in two records with the same ID having expiration dates in the future.
I can (and do) sort the records by ID & expiration date so the record with the latest expiration date is always the last one for that ID, so what I want to do is check the next record to see whether or not it has a different ID. If it does then the current record has the latest expiration date & should be hilited. Since I might need to hilite the current record I can't simply navigate to the next record which, from the description I've found, is what the next_record builtin does. Does anybody know how I can check a value in the next record without making it the current record?
Thanks.The database is 10g but I've never heard of the LEAD function before. Now that I've read about it it sounds like I can check the next record using the following:
LEAD(ID,1,0) OVER (ORDER BY ID ASC) NEXT_ID
But I'm not sure where to put this. Maybe create a control item & load the value in the POST-QUERY trigger? I'll give this a try but if you have a suggestion I'd be glad to hear it. Thanks. On second thought I don't think selecting the next ID in the POST-QUERY trigger would work as that would require a complete select statement which would start at the top of the list each time, I think.
Bugger. I can do it in SQL-Plus but I can't see how to incorporate it into the form.
Edited by: user6931915 on May 18, 2011 11:09 AM -
Custom abap iview need to double click to get in to the right page
Hi experts,
I create custom Abap Webdynpro Iview,
but it has to double click to get into the service.
If we only do one click then it got internet error.
how to solve this?
thanks in advanceHi,
sorry for lack of information.
the error is "the webpage cannot be found"
http 404. (This error (HTTP 404 Not Found) means that Internet Explorer was able to connect to the website, but the page you wanted was not found. It's possible that the webpage is temporarily unavailable. Alternatively, the website might have changed or removed the webpage)
but, when I click the link page again (for second time), it will link to the right page.
is there any missing configuration?
thanks -
HI
Im creating a site that generates leads. When a lead is
generated it will select a broker in the list based on certain
criteria. The thing i need to do is to select that broker which was
used the last.
There is a datetime field in my database which is used with
the createodbcdatetime function
How can i do this
Thanx
CarlyI am getting the following error
ODBC Error Code = 07001 (Wrong number of parameters)
[Microsoft][ODBC Microsoft Access Driver] Too few parameters.
Expected 2.
Hint: The cause of this error is usually that your query
contains a reference to a field which does not exist. You should
verify that the fields included in your query exist and that you
have specified their names correctly.
My code is
SELECT b.brokerid, b.contactname
FROM broker b
WHERE b.dateandtimelastvisited = (SELECT
MIN(b1.dateandtimelastvisited)
FROM broker b
WHERE b1.brokerid = b.brokerid)
I have checked all the names and they are all correct -
Getting records based on rownum
hi all,
i am using db 10g.
i have written a query like below to get the first record.
select col1,col2,col3
from table
where col1 = 'C'
and rownum = 1;so i am able to get the first record.
but if i give rownum = 2, i am not getting any record eventhough the record exists(i have 7 records)
now to get the second record?
Please help me.
Thanks..Hi GD,
So i assume you have a name table and address table and it is 1:n.You have to show only one address and rownum=1 will give you only one record.But which record?You said you have to show first record.what is first record?For me first record means -"a record which was updated recently".For someone else it could be "a record which was inserted first".Your business decides it.
i hope this code wud be helpful
with name_table as
(select '101' as name_id,'John' as name from dual),
address_table as
(select '2' as address_id,'101' as name_id ,'last address 'as description,sysdate as last_updated_date from dual
union
select '1' ,'101','first address',sysdate-2 from dual)
select *
from name_table nt,address_table at
where nt.name_id=at.name_id
and at.last_updated_date=(select min(last_updated_date)
from address_table at1
where at1.name_id=at.name_id)Hope it helps,
CKLP -
Getting records based on date entered by the user
Gurus,
I have a valid to and valid from dates in ODS. The user is allowed to enter a date on the selection screen. If the user entered date lies in between Valid from and Valid to dates only these records need to be displayed in the report.
E.g.
ODS:
Valid From Valid to Functional Area
01/01/2009 01/01/2099 X
01/01/2010 01/01/2011 Y
01/01/2011 01/01/2012 Z
User Entered Date: 01/02/2010
Report Output:
X
Y
How do i do this? Appreciate your immedite assistance.
Thanks,
Ravi AnanthuniHi Ravi,
You can do this by using cust exit, but that would affect the query performance adversely.
I would suggest that you use condition in your report.
Include Valid to and valid from dates in your report layout. Make 2 replacement path type formula variables on these 2 dates.
And also the date you are entering in selection option, make it a formula variable ready for input.
Now make a CKF. In the calculation write: (user date > valid from)AND(user date <valid to)*1.
And apply a condition to show only those rows where this CKF is 1.
The replacement path variables will work only when you have those 2 dates in the report layout. If you don't wanna do that , you can make 2 date type KFs and use them directly in calculation.
I hope this helps.
Best Wishes,
Mayank -
How to get Records based on time period?
Hi,
Iam having a Table which consists of two columns named "ID" (number datatype) and "JoinDate" (Varchar datatype). I would like to retrive the records whose join date is 3 months before. Any one pls give SQL for this scenario?
Thanks in Advance...Why your joindate is varchar type? Which the sample data looks like? Is the format consistent?
-
I need help writing a excelmacro to do a copy of 4 cells and paste transpose. I need to loop the copy and paste through 6900 rows of data. I started the macro with two rounds of copying & paster transposed but I need help getting it
to loop through all rows. Here is what macro looks like now.
Range("I2:I5").Select
Application.CutCopyMode = False
Selection.Copy
Range("J2").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Range("I6:I9").Select
Application.CutCopyMode = False
Selection.Copy
Range("J6").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
End SubThanks Jim for the solution above.
Hi Brogents,
Thanks for posting in our forum. Please note that this forum focuses on questions and feedback for Microsoft Office client. For any
VBA/Macro related issues, I would suggest you to post in the forum of
Excel for Developers, where you can get more experienced responses:
https://social.msdn.microsoft.com/Forums/office/en-US/home?forum=exceldev
The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.
Regards,
Ethan Hua
TechNet Community Support
It's recommended to download and install
Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
programs. -
My phone has been smashed I need to get records of all my iMessages and texts from the last month. How do I get these?
Do you have a backup of your iPhone which contains these messages?
If so, you can restore a new iPhone from that backup during setup.
If not, the messages are gone. -
Hi ,
When you run transaction PLM_AUDITMONITOR --> Corrective/Prventive actions -->
select one of the corrective/preventive actions and click on audit component it shows a screen
which has Actions,Descriptions and view selection , language , Basic data, text etc etc
The data Action, Description I got it from CL_CGPL_PROJECT but I need a class which gets me information
in the Basic Data and text tab.
Please help me out .
Regards,
Gouri
Edited by: Gouri H on Aug 9, 2011 8:55 AMHello,
You can use the class CL_CGPL_TEXT which will get the Text details.
Regards,
Venkata Phani Prasad K -
I know how to enter title text but i need to know how to get an image next to the title of the page please help??
http://alt-web.com/favicons.shtml
Nancy O.
Alt-Web Design & Publishing
Web | Graphics | Print | Media Specialists
http://alt-web.com/
http://twitter.com/altweb -
I just need to know how you get an iTunes library off the original hard drive of an imac and onto an external hard drive and still have it work as it normally would?
http://support.apple.com/kb/HT1449
-
Need to know how to get my apple account to sync up with a new email on my phone and delete the old one in a step by step process??
After you change the account settings as I described below hold your finger on any app until they all wriggle, then tap the "-" on each purchased with her Apple ID. Press the HOME button when done. Then go to the App Store and buy or download the apps you want.
Maybe you are looking for
-
Unable to share--options are greyed-out.
I have created a project, but when I chose "Share," all of the options are greyed out. I have the project active in the timeline, but it still isn't allowing any "Share" option. Other projects in the browser allow me to share with all of the choices
-
Time Machine not recognizing seagate back up plus external hard drive
Please somebody save me!!! My computer was running really slow and decided to take in to the Apple store. They recommended that i needed a new a hard drive. I've beeen using the Seagate back up plus model srd0sd0 3tb drive and before i disconnected
-
Need to download oracle 11.1.0.6.0 for linux 64 bits
Hi, I have checked oracle site for download this version of DB. But could not find the link. Can any one help with this?? Regards,
-
Set trip currency according to personnel area
We have a consolidated worldwide operations into one company code (in the US) but this company holds many employees who reside in other countries. We have set up a personnel area for each country, although all are assigned to the US01 company code. T
-
Integrating Dialog/App server into 4.7 system
We are on SAP R/3 4.7 using Oracle 9.2.0.6 and Solaris 8. To test the performance of a Linux application server on our QA system, we installed Suse Linux 9 on a server and have performed the SAP installation as per the Installation Guide "SAP R/3 Ent