Help with sap function
hallow
i using this function to get how much month btween the to date i put
and it bring me wrong num
CALL FUNCTION 'FIMA_DAYS_AND_MONTHS_AND_YEARS'
EXPORTING
i_date_from = l_begda "010107
i_date_to = l_endda "311207
IMPORTING
e_months = no_months" i get <b>36132</b>
way its not working i have to get 12 month
Regards
i reward
write it out this way
REPORT ZDATEDIFF.
DATA: EDAYS LIKE VTBBEWE-ATAGE,
EMONTHS LIKE VTBBEWE-ATAGE,
EYEARS LIKE VTBBEWE-ATAGE.
PARAMETERS: FROMDATE LIKE VTBBEWE-DBERVON,
TODATE LIKE VTBBEWE-DBERBIS DEFAULT SY-DATUM.
call function 'FIMA_DAYS_AND_MONTHS_AND_YEARS'
exporting
i_date_from = FROMDATE
i_date_to = TODATE
I_FLG_SEPARATE = ' '
IMPORTING
E_DAYS = EDAYS
E_MONTHS = EMONTHS
E_YEARS = EYEARS.
WRITE:/ 'Difference in Days ', EDAYS.
WRITE:/ 'Difference in Months ', EMONTHS.
WRITE:/ 'Difference in Years ', EYEARS.
INITIALIZATION.
FROMDATE = SY-DATUM - 60.
<b>
try the diff between 31st Dec 2006 and 1st Jan 2007. See if the answers you get is what you want.</b>
or else try something of these
DATA: EYEARS LIKE VTBBEWE-ATAGE.
PARAMETERS: FROMDATE LIKE PREL-BEGDA,
TODATE LIKE PREL-BEGDA DEFAULT SY-DATUM.
CALL FUNCTION 'COMPUTE_YEARS_BETWEEN_DATES'
EXPORTING
first_date = fromdate
MODIFY_INTERVAL = ' '
second_date = todate
IMPORTING
YEARS_BETWEEN_DATES = EYEARS
EXCEPTIONS
SEQUENCE_OF_DATES_NOT_VALID = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Write:/ eyears.
DATA: EMONTHS LIKE VTBBEWE-ATAGE.
PARAMETERS: FROMDATE LIKE SY-DATUM,
TODATE LIKE SY-DATUM
DEFAULT SY-DATUM.
CALL FUNCTION 'MONTHS_BETWEEN_TWO_DATES'
EXPORTING
i_datum_bis = fromdate
i_datum_von = todate
I_KZ_INCL_BIS = ' '
IMPORTING
E_MONATE = emonths
write:/ emonths
CALCULATE YEARS FROM TWO GIVEN DATES
regards,
srinivas
<b>*reward for useful answers*</b>
Similar Messages
-
Hi...I was wondering if I could get help with this function. How do i write a function to return hours between a begin date and an end date for an employee. Thanks so much
EdStevens wrote:
AlexeyDev wrote:
sb92075 wrote:
select (date2-date1)*24 from dual;not as above but as below
select (date2-date1)/24 from dual;date2-date1 is amount of days. Divide it by 24 and what? if you multiply it on 24 you will have a chance to know how many hours between these two dates. :-)Don't forget that a DATE type also includes a time component.I suppose it doesn't matter if you did a difference between two dates. The result is always number of days. -
Hi i am new to this forum, i need help with SAP SD module. Can you please provide me pointers or links to get started SAP SD module and start facing the interviews.
Hi Aditya,
For understanding the SD module itself, the link - http://help.sap.com/saphelp_erp2005/helpdata/en/8c/df293581dc1f79e10000009b38f889/frameset.htm is the ultimate one.
Again you can also refer to the mateial "Implementing R/3 S&D BY GLYNN C.WILLIAMS".
For Cracking interview, You can refer to "SAP SD Interview Questions, Answers, and Explanations By: Jim Stewart" which is available in the market.
Regards,
SARTHAK -
Creating a search help with SAP UI5 and js?
Hello com,
I am trying to create a search help, collecting data from a table.
Is there something similar to the typical ABAP search help in SAP UI 5?
ABAP:
PARAMETERS: lv_alias TYPE dsh_alias MATCHCODE OBJECT dashboard_alias_f4,
I found this in the Demo Kit:
// create a simple SearchField
var oSearch = new sap.ui.commons.SearchField("providerSearch", {
searchProvider: new sap.ui.core.search.OpenSearchProvider({
suggestType: "json",
suggestUrl: "/demokit/suggest?q={searchTerms}",
icon: jQuery.sap.getModulePath("sap.ui.core", '/') + "mimes/logo/txtonly_16x16.ico"
search: function(oEvent){
alert("Search triggered: " + oEvent.getParameter("query"));
//attach it to some element in the page
oSearch.placeAt("sample4");
But how can i connect it with the specifiy data table?
Thanks,
DomenikHi,
you need to create OData service which will retrieve (search) the required information and then need to create UI5 application to consume it.
you can refer this blog How to Implement Value Help (F4) with SAP UI5 which covers both parts.
if you are having SP08 version of SAP Gateway then creating search help is very simple. refer my blog Creating OData service based on Search Help
Regards,
Chandra -
Hi all,
I need some help with ASO mdx function.
Avg({Leaves([Employees].Currentmember)}, [Calculated_Field]). This will give me the average for Calculated_Field for all levels of Employees. But i want to add more dimensions like Region and year.
Please advice how can I achieve this.
Thanks
Andyyou have to use cross join in order to add more dimension members to the formula.This will give you some idea
Re: Writing formula in Outline??????
Regards,
RSG -
Help with SAP GUI on Trial VMWare Edition
I currently have a trial version of NetWeaver installed (SAP NetWeaver 7.0.1 Java + ABAP Trial VMWare Edition), but having problems getting the GUI to work. The VM is using GNOME 2.12.2.
I'm currently having trouble with SAP GUI. According to SAP help, a requirement to run SAP GUI for HTML is Windows NT 4.0. Since I'm using GNOME, I tried to get the Java version to work.
When I try to launch SAP GUI, it gives me the following error:
http://i.imgur.com/0ZBVI.png
I wasn't able to troubleshoot the error, so I'm in the process of uninstalling this version of SAP GUI, and try installing again. However, I'm having trouble performing the uninstall. I did some reading, and it says to either run the SAPsweep.exe utility or NWSapSetup.exe. But I can't find either of them on my machine (tried doing a system search, no luck).
I found this thread to be helpful: Re: sapsweep.exe for SAPGUI 7.10 ?, but I'm not running on Windows.
Thanks in advance for any inputHello Anoop.
The error occurs because you have selected OLE DB for OLAP Provider in the Business Explorer selection.
You can tell this from the following line in your sapsetup
00:43:58 NwSapsAtlC 1W Marking package SAPGUI_7.30 ({57F4A687-AE41-4BEA-9553-F852C36F8C1E}) as disabled: selected node OLE DB for OLAP Provider ({5390360A-98D9-4377-BD41-9A147392D000}) has failing condition.
Since you don't have Office installed,you cannot use the Business Explorer modules.
Run the installation again only selecting the components you require.
Jude -
I need help with Analytic Function
Hi,
I have this little problem that I need help with.
My datafile has thousands of records that look like...
Client_Id Region Countries
[1] [1] [USA, Canada]
[1] [2] [Australia, France, Germany]
[1] [3] [China, India, Korea]
[1] [4] [Brazil, Mexico]
[8] [1] [USA, Canada]
[9] [1] [USA, Canada]
[9] [4] [Argentina, Brazil]
[13] [1] [USA, Canada]
[15] [1] [USA]
[15] [4] [Argentina, Brazil]
etc
My task is is to create a report with 2 columns - Client_Id and Countries, to look something like...
Client_Id Countries
[1] [USA, Canada, Australia, France, Germany, China, India, Korea, Brazil, Mexico]
[8] [USA, Canada]
[9] [USA, Canada, Argentina, Brazil]
[13] [USA, Canada]
[15] [USA, Argentina, Brazil]
etc.
How can I achieve this using Analytic Function(s)?
Thanks.
BDFHi,
That's called String Aggregation , and the following site shows many ways to do it:
http://www.oracle-base.com/articles/10g/StringAggregationTechniques.php
Which one should you use? That depends on which version of Oracle you're using, and your exact requirements.
For example, is order importatn? You said the results shoudl include:
CLIENT_ID COUNTRIES
1 USA, Canada, Australia, France, Germany, China, India, Korea, Brazil, Mexicobut would you be equally happy with
CLIENT_ID COUNTRIES
1 Australia, France, Germany, China, India, Korea, Brazil, Mexico, USA, Canadaor
CLIENT_ID COUNTRIES
1 Australia, France, Germany, USA, Canada, Brazil, Mexico, China, India, Korea?
Mwalimu wrote:
... How can I achieve this using Analytic Function(s)?The best solution may not involve analytic functions at all. Is that okay?
If you'd like help, post your best attempt, a little sample data (CREATE TABLE and INSERT statements), the results you want from that data, and an explanation of how you get those results from that data.
Always say which version of Oracle you're using.
Edited by: Frank Kulash on Aug 29, 2011 3:05 PM -
Help with Sort function in Terminal
Hello all... this is my first post on here as I'm having some trouble with some Termianl commands. I'm trying to learn Terminal at the moment as it is but I would appreciate some help with this one....
I'm trying to sort a rather large txt file into alphabetical order and also delete any duplicates. I've been using the following command in Terminal:
sort -u words.txt > words1.txt
but after a while I get the following error
sort: string comparison failed: Illegal byte sequence
sort: Set LC_ALL='C' to work around the problem.
sort: The strings compared were `ariadnetr\345dens\r' and `ariadnetr\345ds\r'.
What should my initial command be? What is Set LC_ALL='C'?
Hope you guys can help?Various languages distinct sorting - collation - sequences.
The characters can and variously do sort differently, depending on what language is involved.
Languages here can include the written languages of humans, and a few settings associated with programming languages. This is all part of what is known as internationalization and localization, and there are are various documents around on that topic.
The LC_ALL environment variable sets all of the locale-related settings en-mass, including the collation sequence that is established via LC_COLLATE et al, and the sort tool is suggesting selecting the C language collation.
Here, the tool is suggesting the following syntax:
LC_ALL=C sort -u words.txt > words1.txt
This can also be done by exporting the LC_ALL, but it's probably better to just do this locally before invoking the tool.
Also look at the lines of text in question within the files, and confirm the character encoding of the file.
Files can have different character encodings, and there's no reliable means to guess the encoding. For some related information, see the file command:
file words.txt
...and start reading some of the materials on internationalization and localization that are posted around the 'net. Here's Apple's top-level overview.
In this case, it looks like there's an "odd" character and probably an å character on that line and apparently the Svenska ariadnetrådens.
Switching collation can help here, or - if the character is not necessary - removing it via tr or replacing it via sed can be equally effective solutions.
Given it appears to be Svenska, it might work better to switch to Svenska collation thanto the suggested C collation.
I think that's going to be sv_SE, which would make the command:
LC_ALL=sv_SE sort -u words.txt > words1.txt
This is all generic bash shell scripting stuff, and not specific to OS X. If you haven't already seen them, the folks over at tldp have various guides including a bash guide for beginners, and an advanced bash scripting guide - both can be worth skimming. They're not exactly the same as bash on OS X and some specific commands and switches can differ, and as bash versions can differ, but bash is quite similar across all the platforms. -
Crystal Reports Charting Issue with SAP Function Module
I created a custom SAP Function module that returns 2 tables. The first table (summary table) contains two columns, column "a" contains a grouping and column "b" is a quantity. The second table is the detail and is linked to the first table by the grouping, column "a" , in both tables. I can bring the function module into Crystal Reports, but cannot create a drill down using a pie chart off the summary table. When I go into the Chart Expert - Data Tab only the Advance button is active and the Group, Cross-Tab, and OLAP buttons are deactivated. First of all, is it possible to do this using a SAP Function Module, if yes, what am I doing wrong.
hello Jhess,
i am not sure if you found an answer for your question yet. if you have a Group and a Summary on your report (i.e. the Sum of your Quantity field) then group charts should be enabled.
cheers,
jamie -
Help with bash function(set background=dark/light in vimrc)
I couldn't find any gvimrc files so I guess it uses the regular one. And since I work pretty much in X too I thought it would be nice with a function that sets background=light if I'm in X an background=dark if not. Is that possible?
/Richardvimrc configuration is not the same as bash.
You probably want something like this in your ~/.vimrc:
if has('gui_running')
set background=light
else
set background = dark
endif -
Hallow experts,
I'm doing an interface from sap into anther application and in this interface (log interface) I use two function below in program and I have to send to customer in text file in which field of infotype change was made
This to function helping me but I miss the action like insert was made or update or delete
Did dome one can help me with that?
HREIC_GET_LOGGED_INFTY_CHANGES
HR_INFOTYPE_LOG_GET_DETAIL
Best Regardshi Naveen Bathini
thankes for your answer
i thihk u dont understand me ,
HR_INFOTYPE_LOG_GET_DETAIL bring table fields with all the field that change
but i dont now if user create new infotype for employee or just take one field and change it like from infotype 0006 just change street or postal code
i wont to now if it is an insert (create new infotype ) or update or delete fields from infotype.
Best regards -
Hi again forum:
I have a program and i need to pass basic functionality to a set of funtion module.
I have a description of a internal table in the program, that i need to use in the function-module
Example:
PROGRAM
" In the top of the program i declared.
"This the actual version
TYPES: BEGIN OF t1
END OF t1.
DATA: it_some TYPE STANDARD TABLE of t1 with header line.
SELECT *
FROM
INTO TABLE it_some.
FUNCTION MODULE
Now in the new version i need to declare an output paramter of type t1 in the exports parameters of the function ZMY_FUNCTION, and t1 is an internal_table, what can i do forum ?..
The thing is that how can i declare an export parameter that is not know?
please help
Thanks
Joshuahi,
we can pass internal table to FM by using CHANGING or TABLE options.
regards,
AshokReddy. -
Hi all,
I am suppose to write a java function for the following source and target structure:
<u>Source Structure</u>
Root A (0..unbounded)
|_ A
Root B (0..unbounded)
|_ B
Root C (0..unbounded)
|_ C
<u>Target Structure</u>
Root_target (0..unbounded)
|_ T
Based upon every occurrence of A, B and C, i have to first compare their values and for every unique value i have to create a separate instance of 'T'
i.e. if all the three A, B and C are different the output should be:
Root_target (0..unbounded)
|_ T (for A)
Root_target (0..unbounded)
|_ T (for B)
Root_target (0..unbounded)
|_ T (for C)
I am writing a java function in the graphical mapping for it, but i am stuck with the code to create target segments dynamically.
Any help in this regards is appreciated.
Regards,
VarunHi Varun,
I understood unique values form A,B,C need to map to T.
In this case change the context of all these A,B,C to their respective parent node.
write a user define function to accept these 3 queues , write a java logic to fiund uniqueness among all the records, add the resulkt to Resultset , which is output map to T.
Thanks,
venu. -
Need help with effect / function stop!
Hi all!
I tried to build some kind of custom pop-up-menu with fade
in/out effect, however the menu sometimes (< very often, but not
always) disappears while the mouse is still over it.
So i defined a function to stop/abort the effects, but this
doesn't work right.
Could anybody please tell me, how to stop all functions,
while the mouse is over a link?
/// This is the container to appear / disappear:
<div id="navislide" style="height:292px;
overflow:hidden;">
<a href="mylink.html" onMouseOver="killall();"
onMouseOut="hideit();">mylink</a>
</div>
/// This is the link to show the container:
<a href="#"
onMouseOver="slidefadein.start();">mylink</a>
<script type="text/javascript">
function displayblock() {
var thediv = document.getElementById('navislide');
thediv.style.display= "block";
slidetimer = setTimeout('slidefadeout.start();', 2000);
hideit = function() {
slidetimer = setTimeout('slidefadeout.start();', 2000);
function displaynone() {
var thediv = document.getElementById('navislide');
thediv.style.display= "none";
killall = function() {
clearTimeout(slidetimer);
slidefadeout.stop();
slidefadein.stop();
displayblock();
slidefadeup.start();
var slidefadein = new Spry.Effect.Fade("navislide", {from:0,
to:100, toggle:false, setup:displayblock, finish:hideit});
var slidefadeout = new Spry.Effect.Fade("navislide",
{from:100, to:0, toggle:false, finish:displaynone});
var slidefadeup = new Spry.Effect.Fade("navislide",
{from:100, to:100, toggle:false});
</script>
Probably, its all about the "killall"-function, because when
the mouse moves over the link, the function to abort all other
effects, does not take effect.
Thank you so much vor any kind of help or hint!!
Cheers,
idefixI would be most interested in a reply to this for I asked
weeks ago how to use an onClick stop() function for the links in my
page. I was given the stop function by VFusion (it is to stop
panels from rotating), but I could never figure out how to actually
get the function to stop the panels and could not get it no matter
what I tried, eventually had to take the panel rotation out. -
I successfully use the following analytical function to sum all net_movement of a position (key for a position: bp_id, prtfl_num, instrmnt_id, cost_prc_crncy) from first occurrence until current row:
SELECT SUM (net_movement) OVER (PARTITION BY bp_id, prtfl_num, instrmnt_id, cost_prc_crncy ORDER BY TRUNC (val_dt) RANGE BETWEEN UNBOUNDED PRECEDING AND 0 FOLLOWING) holding,
what i need is another column to sum net_movement of a position but only for the current date, but all my approaches fail..
- add the date (val_dt) to the 'partition by' clause and therefore sum only values with same position and date
SELECT SUM (net_movement) OVER (PARTITION BY val_dt, bp_id, prtfl_num, instrmnt_id, cost_prc_crncy ORDER BY TRUNC (val_dt) RANGE BETWEEN UNBOUNDED PRECEDING AND 0 FOLLOWING) today_net_movement
- take the holding for the last date and subtract it from the current holding afterwards
SELECT SUM (net_movement) OVER (PARTITION BY bp_id, prtfl_num, instrmnt_id, cost_prc_crncy ORDER BY TRUNC (val_dt) RANGE BETWEEN UNBOUNDED PRECEDING AND -1 FOLLOWING) last_holding,
- using lag on the analytical function which calculates holding fails too
I also want to avoid creating a table which stores the last holding..
Does anyone sees where I make a mistake or knows an alternative to get this value?
It would help me much!
Thanks in advance!Thank you,
but I already tried that but it returns strange values which are not the correct ones for sure.
It is always the same value for each row, if its not 0, and a very high one (500500 for example), even if the sum of all net_movement of that date is 0 (and the statement for holding returns 0 too)
I also tried witch trunc(val_dt,'DDD') with the same result (without trunc it is the same issue)
please help if you can, thanks in advance!
Maybe you are looking for
-
Hi, As the Vendor Inco terms in PO header is getting populated from the vendor master...similarly Inco terms in PO Line item gets populated fromArticle PIR...If its blank then it doesnt get any value & if the same is maintain in PIR manually then Inc
-
Lanier Ricoh Printer - still can't get it to work with Snow Leopard
Does anybody know what this is and how to fix this: Error: /Library/Printer/RICOH/Filters/jobLogFilterC failed I get this in the "open print que" dialog box. JK
-
XSS bugs in apex 4.1.1.00.23?
Hi, During XSS testing of new application by loading every char database column with html markup I came across 2 area's where HTML is executed by Apex where I didn't expect it to be. I'm wondering if these are bug or that they are intentional and I s
-
"Error initializing Java Runtime Environment. You may need to re-install Flash"
Hi, I get this error starting up Flash Professional CS5. I don't even have to create/open a Flash file. I already re-installed, but to no avail. Any suggestions? TIA Steven
-
Fi/co documentation/book
Hi, does anyone know of the existence of a good book on SAP FI/CO (6.0) covering all kinds of functional topics, preferably enriched with some real-life examples? I am looking for a book/hardcopy to read near the fireplace during wintertime on cold f