How to get 1 day less than user entered date
Hi
There is a user entry for date. If the user enters 20060427 then the report should run for 20060426. I tried giving 'LT' in the CMOD code. But it gives an error. Can anyone pls help. Is there a function module for this?
Thanks
Suja
Hi Suja,
You can use Less Than and Greater than for a user entry variable as follows: When you right click > restrict the char, then in the pop up box there is a drop down for Selection. Choose Value Hange here. Then in the drop down to the right you will have values ike Between, Less Than, Greater than...you can select as required.
Hope this helps...
Similar Messages
-
Cell data not getting refreshed in which user enters data OO ALV(editable)
Hi Friends,
I am using OO ALV for editable grid display.
I am unable to change grid data in the cell in which user enters something, using OO ALV. Did through debugging of my own program and found that some problem with system program. Then I did all system debugging. Could not find out why is the grid not getting refreshed with the new data in the cell in which user had entered some value. Rest of the cell's data are getting refreshed with the values which i am updating in the final internal table. I can see that the data in the final internal table is changed for the cell in which user enters data. But even after the call of
CALL METHOD obj_alvgrid1->refresh_table_display
does not refreshes the data in the cell in which user had entered data. Rest of the cells data are getting refreshed.
Piece of code:
SET HANDLER obj_event_receiver->handle_data_changed
FOR obj_alvgrid1.
METHODS: handle_data_changed
FOR EVENT data_changed OF cl_gui_alv_grid
IMPORTING er_data_changed
e_onf4
e_onf4_before
e_onf4_after.
METHOD handle_data_changed.
DATA : v_valid TYPE char1,
v_refresh TYPE char1.
*--check mt_good_cells semantically
CALL METHOD perform_semantic_checks( er_data_changed ).
*--If PBO is again visited, just refresh the ALV grid.
CALL METHOD obj_alvgrid1->refresh_table_display
EXCEPTIONS
finished = 1
OTHERS = 2.
IF sy-subrc <> 0.
EXIT.
ENDIF.
ENDMETHOD.
METHOD perform_semantic_checks.
LOOP AT er_data_changed->mt_good_cells INTO w_good.
v_index = sy-tabix.
CASE w_good-fieldname.
WHEN 'ZASCAS'.
*Now here based on some conditions I am changing my final internal table i_zamtsmatnp
MODIFY i_zamtsmatnp FROM w_zamtsmatnp INDEX
w_good-row_id TRANSPORTING
zascas modif.
User enters data in zascas field. Based on the data entered, I am changing other fields which is getting refreshed. I am also changing zascas in the program even after user had already entered the value which was bit wrong and i am correcting it in the program on the even "data_changed" even.
Please help me friends as i m strugling past hours wondering why the data is not getting refreshed for the cell in which user enter data.
Regards,
SuryaHi Surya,
The approach you are following is correct. You need to use the comibnation of all these things:
Event - DATA_CHANGED
Methods - CHECK_CHANGED_DATA
- GET_CHANGED_DATA.
However, here are few standard programs which are having similar functionality.
BCALV_EDIT_03
BCALV_EDIT_07
Check out these once.
Note: If anything is helpful, dont forget to reward points
Thanks,
Adithya K
SAP Practise
[email protected] -
How to get value less than 0 = 0
I am trying to get a formula to do two operation in one field something like:
form1.#subform[0].yes1.qn1::calculate - (JavaScript, client)
(p1-s1)
then if the value is less than "0" the the value = "0"
what I have so far is not working, any help is greatly appreciated.
if
(this.rawValue < 0) this.rawValue
= 0;
Thank you.Srini,
Thanks for the reply, although I still cannot get this to work.
I changed the fields to numeric and it still is not working. -
How to get days and months when two dates are given
Hi All,
I have a requirement where I need to return the number of months and days between given dates.
I dont need to take the year into account as the dates difference is always less than an year
I have 28-jun-2012 and 31-jan-2013 as dates.
I'm working on 10g
when I do select months_between(:a,:b) from dual and provide those dates it gives me 7.09677
I want it to give as 7 months and 9 days or what ever the exact days are.
Your inputs are much appreciatedBluShadow wrote:
874719 wrote:
Thanks a lot,BluShadow for your answer and would you mind giving it for the year as well like 0 years 7 months 3 days?Your original post said:
I dont need to take the year into account as the dates difference is always less than an yearNow you've got the idea, why not have a go yourself first, and then if you're still not getting it, post what you've tried so we can help you.Oh... go on... I'm in a good mood today...
SQL> ed
Wrote file afiedt.buf
1 with t as (select date '2012-06-28' as start_date, date '2013-01-31' as end_date from dual union all
2 select date '2012-02-29', date '2012-06-30' from dual union all
3 select date '2010-02-28', date '2012-06-30' from dual union all
4 select date '2012-02-29', date '2012-06-15' from dual
5 )
6 --
7 select start_date, end_date
8 ,months_between(end_date,start_date) as mnth_bet
9 ,floor(months_between(end_date,start_date)/12) as yr
10 ,floor(mod(months_between(end_date,start_date),12)) as mnth
11 ,case when to_number(to_char(end_date,'DD')) >= to_number(to_char(start_date,'DD')) then
12 to_number(to_char(end_date,'DD')) - to_number(to_char(start_date,'DD'))
13 else
14 (to_number(to_char(last_day(start_date),'DD'))-to_number(to_char(start_date,'DD')))+
15 (to_number(to_char(end_date,'DD')))
16 end as dys
17* from t
SQL> /
START_DATE END_DATE MNTH_BET YR MNTH DYS
28-JUN-2012 00:00:00 31-JAN-2013 00:00:00 7.09677419 0 7 3
29-FEB-2012 00:00:00 30-JUN-2012 00:00:00 4 0 4 1
28-FEB-2010 00:00:00 30-JUN-2012 00:00:00 28 2 4 2
29-FEB-2012 00:00:00 15-JUN-2012 00:00:00 3.5483871 0 3 15 -
How to get day if we give the date
i want the day for tghis date(16-march-2006), how to get that
select to_char(sysdate,'day') from dual,it gives the correct day but select to_char('16-mar-06','day') from dual it gives error,
so how to get that dayHi
First convert it '16-MAR-06' to date then give format
select to_char(to_date('16-MAR-06','DD-MON-YY'),'day') from dual;
TO_CHAR(T
thursday
Khuram Siddiqui
[email protected] -
How to get days , months , years between two dates with groovy
I've a table that contains Start Date and End Date and I want to get the difference between then in this format 2 days , 1 moth , 1year
Can I make this with Groovy
I've added a transient attribute to a view object and make its value return (EndDate) - (StartDate); but this returns the difference of days like 200 day
I want it in this format 2 days , 1 moth , 1yearAFAIK - You cannot do it in groovy.
You can achieve the same using the transient variable approach.
Create a VORowImpl Class for VO, and in the getter method of the transient variable - do the necessary logic and return the string as required in your use-case.
Thanks,
Navaneeth -
How to get the value a user just enter into a table???
hi
i have a table that adds a new row when a user clicks ADD button. i was able to implement this part, now the user needs to enter some data into this row, i need this data to save into file. how can i get this data from the row?????? thank you.is there some kind of even that is fired when user enters data into a cell? you are saying that the data is already in the table model after user enters data. then i need to get a tableModel by calling
TableModel tm = JTable.getModel();
and then use this tm to get value? using what? getValueAt? -
How to get the user entered data?
Hi all,
I have created an HTMLB DynPage component.
In That i have created my input screen with textboxes using response.write method.
i have added one onConfirm event on which the data whould validate.
so onConfirm method im trying to get the data with request.getParameter method which returns null...
how to do...how to get the user entered data to do my validations...can anyone plz advice.
Thanks,
ViswesHi
inputfield or textbox component entered directly using response.write(...) are not htmlb , but html.
to create portal input field (ie HTMLB), you should do something like
this in the doProcessBeforeOutput member function
InputField field1 = new InputField("Id1");
field1.setSize(8); // 8 characters
this.getForm().addComponent(field1);
and in doProcessAfterInput member function
InputField field1 =
(InputField) this.getComponentByName("Id1");
you can then manipulate the content of the field.
Hope this help,
Guillaume -
How to use User entered dates in intreval
Hi,
User will enter date range in variable
As per my requirment i want to use no of days between those 2 user entered dates in my calculaction
How can i achieve this at report level.
ThanksHi
Create a variable with intreval.
There is a function module which calculates the no of days between the days
Go to SE38 and ZXRSRU01 Program
Write the Code like this (Not exact code) you can modify
WHEN "ZZZZZ"(Before that create a formula variable to get the number of days between the days and use the tech name of the formula variable here)
read ..the lower limit and the upper limit of the caldaz variable
FROMDATE = L_S_RANGE-low
TODATE = L_S_RANGE-HIGH
Then call the function module
Search for the function module by using days in SE37
Then pass the from and to Date to the function module it will retun the number of days
update that to table e_T_Range
You can proceed with this
Regards
M.A -
How to get the list of users who has access for list of tcodes.
How to get the list of users who has access for list of tcodes.
Go to transaction SUIM, this has a number of reports for users/authorisations
open the Where used>Autorization Values>In Users
and double click to execute
in authorisation object, enter S_TCODE
then press the "Enter Values" button
It will offer entry boxes to put the transaction code you are interesed in.
Then execute and the list of users with access to this transaciton code will be returned. -
Date data from Crystal Report one day less than Date from Source
Hi,
I am creating a Crystal Report 4.0 for Enterprise Users (Client Version only) based on a BEx query. I have a field called 'Date' that I am bringing over from the BEx query. It has a format of MM/DD/YYYY. When I view the 'Date' in Crystal Reports, it is displaying as 1 day less from the actual data. For example, in the BEx Query, 'Date' = 11/01/2011. In Crystal Reports, it is showing up as 10/31/2011, which is one day behind. I'm not sure what's going on.
Please help!Well, this is as weird as it gets!
Here are the observations on SP02:
1) The Date Characteristic is a day off in the report while the 'Key' shows correct date
2) It displays in the '30.01.2011' (DD.MM.YYYY)format
3) When you right-click this field to change the date format, the date option is missing
4) You create a formula to see if this is a date and it returns True. The formula you can try is :
isdate(). It returns False for any other function like isnumeric() etc
5) So, this is a date filed, or CR4E thinks this is a date field, however doesn't let us change the format
6) You cannot use this field with date functions like cdate(); weird!
7) The only way you can show it the way you want is to write this formula:
*mid(,4,2)&"/"&left(,2)&"/"&Right(,4)*
This is still a string field, however displays as MM/DD/YYYY.
In Crystal Reports 2011, however, the following formula on the same date field returns a date value, meaning you can further right-click this formula field to change the date format like a normal date field:
cdate(tonumber(Right(,4)),tonumber(mid(,4,2)),tonumber(left(,2)))*
The same formula, however, throws a 'String is non-numeric error in CR4E and I found that it doesn't like this:
*tonumber(Right(,4)) ; same error
I've tried a lot of combinations to make this a date field in CR4E, however none works!
So, the only option is to use the formula that I mentioned above.
P.S: If you install Patch 2.10, you'll notice that the Characteristic value shows the correct date. For some reason though, it is in the same format as the 'Key' and if we wish to change the date format, the only possible workaround is to extract the numbers and join like I suggested above.
Hope this helps!
-Abhilash -
Hi,
How to get Reports for specific User that how many password has been reset using FIM SSPR in FIM 2010 R2 SSPR
Regards
Anil KumarHello there Anil,
A simple way to quickly get a overview is to look at the request history within the portal environment (note that this will expire in a few day based on your environment, after that you would need to FIM Reporting Module - but you could increase this to
maybe 60 days to so, watch the DB size).
To do this you could create some custom search scopes of do some custom queries. The creator of the SSPR activities always has the same GUID so you can use that so search.
In your search scope you can use the following XPath to play with.
- All Password Reset Requests - /Request[Creator='b0b36673-d43b-4cfa-a7a2-aff14fd90522' and Operation='Put']
- All Completed Password Reset Requests - /Request[Creator='b0b36673-d43b-4cfa-a7a2-aff14fd90522' and RequestStatus=‘Completed']
You can play with the "RequestStatus".
Hope this helps.
Almero Steyn (http://www.puttyq.com) [If a post helps to resolve your issue, please click the "Mark as Answer" of that post or "Helpful" button of that post. By marking a post as Answered or Helpful, you help others find the answer
faster.] -
How to change too less than 4seconds...
I have more recordings,
they are less than 4 seconds,
When i want to make a cd of it, it doesn't work,
Because these recordings have to be more than 4 seconds in length.
How can i change this?Many thanks for the useful info from both, Bob Howes & Ryclark
Date: Thu, 4 Nov 2010 09:22:05 -0600
From: [email protected]
To: [email protected]
Subject: How to change too less than 4seconds...
Ryclark is, alas, spot on.
In the bad old days I used to use CD to playback sound effects in the theatre and many of these were less than 4 seconds duration. I used to have to edit in a few seconds silence at the end of all the short effects to keep the CD format happy.
Bob
> -
How to get the room id & user id in our component
Hi Experts,
Collaboration -> Rooms -> Room Directory
It will show the available rooms
Select restricted room tab in that.
That will show the restricted room list, if you are not a member of the room you can request the room by clicking context menu of the room and select the Request Membership option. Then it will send the mail to the owner of the room.
In that UI commend they mapped with the roomid and userid.
I need to know how to get the room id & user id in our component.
How to get the Room Id dynamically?
Can anybody help me for this?
Helpful answers will appreciate.
Thanks and Regards,
Kathiresan RHi Kathiresan,
you can get the Room ID and the User ID over the API.
Getting User ID within WebDynpro application:
IUser user = WDClientUser.getCurrentUser().getSAPUser();
String logonId = user.getUniqueId();
Getting User ID within custom Portal Component:
IPortalComponentRequest request = (IPortalComponentRequest) httpRequest;
IUser user = request.getUser();
String logonId = user.getUniqueId();
Getting Room Id of a user who belongs to this room:
IUser user = request.getUser();
IRooms roomsAPI = (IRooms) PortalRuntime.getRuntimeResources().getService(IRooms.PORTAL_SERVICE_ID);
IRoom[] myRooms = roomsAPI.getAllRoomsForUser(user);
String roomId = "";
for (int i=0; i<myRooms.length; i++) {
IRoom room = myRooms<i>;
if (room.getName.equals('nameOfRoomToFind')) {
roomId = room.getId();
Greets
Denis -
How to populate date & time when user enter data for custom table in sm30
Can anyone tell me How to populate system date & time when user enter data for custom table in sm30..
Req is
i have custom table and using sm30 user can enter data.
after saving date i want to update date & time in table
Pls let me know where to write the code?
Thanks in AdvanceYou have to write the code in EVENT 01 in SE54 transaction. Go to SE54, enter your Ztable name and in the menu 'Environment-->Events'. Press 'ENTER' to go past the popup message. In the next screen, click on 'New Entries'. In the first column, enter 01 and in the next column give some name for your routine(say UPDATE_USER_DATE_TIME). Then click on the souce code icon that appears in blue at the end of the row. In the code, you need logic like below.
FORM update_user_date_time.
DATA: f_index LIKE sy-tabix.
DATA: BEGIN OF l_total.
INCLUDE STRUCTURE zztable.
INCLUDE STRUCTURE vimtbflags.
DATA END OF l_total.
DATA: s_record TYPE zztable.
LOOP AT total INTO l_total.
IF l_total-vim_action = aendern OR
l_total-vim_action = neuer_eintrag.
MOVE-CORRESPONDING l_total TO s_record.
s_record-zz_user = sy-uname.
s_record-zz_date = sy-datum.
s_record-zz_time = sy-uzeit.
READ TABLE extract WITH KEY l_total.
IF sy-subrc EQ 0.
f_index = sy-tabix.
ELSE.
CLEAR f_index.
ENDIF.
MOVE-CORRESPONDING s_record TO l_total.
MODIFY total FROM l_total.
CHECK f_index GT 0.
MODIFY extract INDEX f_index FROM l_total.
ENDIF.
ENDLOOP.
ENDFORM. " UPDATE_USER_DATE_TIME
Here ZZTABLE is the Z table and ZZ_USER, ZZ_DATE, and ZZ_TIME are the fields that are updated.
Maybe you are looking for
-
Auxiliary channel allocation in TSPITR with RMAN-managed instance
Hi, I'm trying do perform TSPITR with RMAN-managed auxiliary instance. All backups are stored on tape. I need to send MML environment values while allocating auxiliary channel to connect to correct NetWorker server and send other NetWorker parameters
-
I cannot type in the body of an email and anything that I forward is blank. It doesn't matter if I am writing a new email or replying. I recently updated safari. The weird thing is, I have had this problem for over a week now and the other day, my
-
I cannot get my iphone 4 to print yo my brand new photosmart 6510 printer please help
please help me get it to print. I've tried to search for the printer serveral time and it can't find it. All of my other computer on working wirelessly Thanks
-
Hi, I'm seeing a lot of the following errors in my console and wondered if anyone had a solution? 14/01/2015 13:01:31.284 CalendarAgent[225]: [com.apple.calendar.store.log.caldav.coredav] [Refusing to parse response to PROPPATCH because of content-ty
-
How to achieve precise control of frames flv?
How to achieve precise control of frames flv?