Date foramt in scripts
Hi,
My requirement is to get the date(in scripts) like 20th May 2006 instead of 2006/05/20. How to get it? Can any one help me...
Hi Kishore,
Welcome to SDN.
You can do that.
Use this link.
http://help.sap.com/saphelp_erp2004/helpdata/en/d1/803411454211d189710000e8322d00/frameset.htm
Use the corresponding mask.
Thanks,
Susmitha.
Dont forget to rewards points for useful answers.
Similar Messages
-
How to get the context data using java script in interactive forms
Hi All,
How to get the context data using java script in interactive forms by adobe, am using web dynpro java
thanks.Hi venkat,
Please Refer this link.
Populating one Drop-Down list from the selection of another Drop-down list
Thanks,
Raju. -
Dear All,
I want to change date format in script text elements. Now the date format is MMDDYYYY. Now I want change it into DDMMYYYY. How I can change that.
Thanks and regards,
Krish....WRITE ONE Z PROGRAM .
EX. ZTEST
write the code below.
PROGRAM ZTEST.
form GET_NEWDATE tables in_tab STRUCTURE itcsy
out_tab STRUCTURE itcsy.
DATA : LV_NEWDATE TYPE D.
DATA : LV_OLDDATE LIKE OLDDATE,
data : gv_dd(2) type c,
gv_mm(2) type c,
gv_yy(4) type c.
data : date(8) type c.
gv_dd = LV_OLDDATE(+22).
gv_mm = LV_OLDDATE(2).
gv_yy = LV_DOC_DATE+4(4).
CONCATENATE gv_dd gv_mm gv_yy INTO date.
LV_NEWDATE = DATE.
read table OUT_tab index 1.
MOVE LV_NEWDATE TO OUT_TAB-VALUE.
CONDENSE OUT_TAB-VALUE.
MODIFY OUT_TAB INDEX 1.
ENDFORM.
write the code below in ur sapscript,
/:DEFINE &LV_NEWDATE&.
/:PERFORM GET_NEWDATE IN PROGRAM TEST
/:USING &LV_OLD_DATE&
/:CHANGING &LV_NEWDATE&.
PRINT &LV_NEWDATE&
ENDPERFORM. -
hi,
how to change the date format in script form.
thanks.try like this
/: SET DATE MASK = 'Foster City, MM.DD.YY'
&DATE& -> Foster City, 03.01.97
&DATE(Z)& -> Foster City, 3.1.97
/: SET DATE MASK = 'MMMM DD, YYYY'
&DATE& -> March 01, 1997
regards
Prabhu -
How to manipulate the date in idoc scripting?
how can we manipulate date in idoc scripting? How to retrieve the year, month, date from the date? How can we update the year of the particular date in idoc scripting.
There are a bunch of date / time functions that you can find in chapter 5 of the Idoc Script Reference (the bible for this sort of thing)
For the sort of things you need to do I would recommend you look at formatDateWithPattern()
for example to retrieve the year of 'now'
<$year = formatDateWithPattern(dateCurrent(),"yyyy")$>
month
<$month = formatDateWithPattern(dateCurrent(),"MMM")$>
the patterns for the same rules as Java date formats (unsurprisingly)
If you want to update the year then I think you need to build the date as a string and the use the parseDate or parseDateWithPattern functions to actually create something that Idoc will recognise as a date object.
Tim -
hi guyz,
how can i align data in sap script with spaces between..
regardsHi,
you have to create paragraph formats for this, in paragraph format you can define tab sapces.
use that paragraph format in command box of ur window editor, where ever you want the space just use ',,' which will apply tab space (the sapce you have declared).
reward if useful,
Thanks,
Sreeram. -
Exctract data from Post Script file
Hi all;
I need to extract, manipulate some data from post script file send them to database.
How can i do that process?OT: Hey Rene, I see you've become a local celebrity
around here!I'm still waiting for the groupies to show up, though. No luck so far. :p
I think it's a nice initiative and
enjoyed reading the interview.
; )Thanks. :) -
Can we Save BQY without result set/data through dashboard script
Hi All,
Can we save a BQY without result set/data through dashboard script?
Thanks,
SoumitraHi Soumitra,
Its happy that you resolved it by yourself. But if you post your solution here then it will be helpful for everyone else looking for the same solution.
Thanks,
karthick -
Data Manager Dynamic Script - Documents or Materials that help me to write
I need to configure a package to have input at run time for that I've to code in Data Manager Dynamic script editor. I'm newbie to SAP BPC, could anybody help me for getting some material on this area.
Thanks,
Saravana PrabhuHi, for information how to use MODIFYSCRIPT variable please refer to Data Manager help: http://help.sap.com/saphelp_bpc75/helpdata/en/f3/ebbbb6970047d598dbd63c246c8a8c/content.htm
You will need to include prompt in your package to let end users to input the variable value and then you need to pass it to logic script using *FUNCTION instruction inside.
So in the end you should have the following lines in your MODIFYSCRIPT:
PROMPT(TEXT,%INPUTVARIABLE%,"Input variable",,"")
TASK(Execute formulas,LOGICFILE,%APPPATH%\..\AdminApp\%APP%\MyLogic.lgf)
TASK(Execute formulas,FORMULASCRIPT,"*FUNCTION MYVARIABLE=%INPUTVARIABLE%") -
How to get tomorrows date in UCCX script
I am trying to determine how to get tomorrow's date in UCCX. I am wanting to determine if today is the last day of the month by checking if tomorrow is the 1st day of the month. I currently use D[now].date to get today's date in some scripts. I tried the set command tomorrowDate = D[now].date + 1 and it showed 28 when today is the 27th, but I was thinking this was just adding 1 to the number returned by D[now].date and not actually showing the next day's date. I am thinking this might return 32 on Jan. 31st.
Does anyone know how to get an acurate tomorrow's date in UCCX scripting?
Thank you,
MarkI got this to work after reading nowcommsupports' post. I hadn't thought of setting a date for a month with 31 days to 32 and having it converted to the 1st day of the next month. I did it something like the below:
variables:
todaysDay int D[now].date
todaysMonth int D[now].month
todaysYear int D[now].year
tomorrowsDate String ""
tomorrowsDay int 0
set tomorrowsDay = todaysDay + 1
set tomorrowsDate = D[todaysMonth + "/" + tomorrowsDay + "/" + todaysYear]
set tomorrowsDay = D[tomorrowsDate].date
If the date is past the last day of the current month, it will role over to the next month. For example, 1/31/11 + 1 = 1/32/11 which is converted to 2/1/11 by the system.
Now I use the int variable "tomorrowsDay" in the routing logic of my script knowing if it equals 1 then today is the last day of the month.
I put this here in case it may help someone else and for my own records. I needed to know if it was the last day of the month for different hours of operation in our help desk script.
Mark -
Hi,
I am working with customiaed script.
The data into the script is not getting displayed completely.
During script debugging data is present but getting displayed partially.
Please help on priority.
Thanks & Regards,
SangeetaDefine "partially"...nobody understands this so far....
Are you saying that some fields don't show up? If so, are the fields (named exactly identically) named in the layouset and not surrounded by IF...ENDIF that would decide whether or not to display?
If not, what are you trying to tell us? -
Unable to execute data export calc script
HI Experts,
When I am trying to execute the data export calculation script I am getting the error like "Failed to establish the connection with SQL database".
set dataexportoptions
DataExportLevel "All";
DataExport "DSN" "Test_DSN" "Test_table" "sa" "sa999";
I have executed the calculation script by accessing the Essbase administration services through citix.
Is there a way to export data from Essbase cube to sql database through citixFirst of all did you set the DSN up on the essbase server and not the EAS if it is different, if so did you test the DSN.
Have you checked the essbase logs to see if they have more information.
Cheers
John
http://john-goodwin.blogspot.com/ -
Hello Friends,
I have a report which prints Normal Tax invoice & Returns Tax, I modified this report just by adding one extra "delivery channel". The report call one more program which dose the printing job based on the delivery no.
The issue, I can able to see the header data in th the print preview of the tax invoice, and not able to see item level data.
Please help me how to resolve this issue.
Regards,
ShreekantHi,
You need to pass the line item data to the smartform/script. Please check in debug mode whether the data is passed correctly.
Best regards,
Prashant -
How to stop delay when streaming data from a script as URL to an Applet?
I have a strange problem and do not know what is causing it. Hope someone here with some experience can help.
I have a Java Applet which makes a line graph of data. The data source is to be streaming, where the first chunk of data comes from what is already in a data file, and then new data is sent whenever it is ready. The problem in brief is that if I just collect and show the data from the data file and do not stream everything works fine. If I also have the streaming and wait for a long time, everything works fine, but when the applet is first loaded, the graph is not shown until after a long delay time.
Here is a snippet of the applet code:
String dataendpoint = "http://phpfunction.php";
URL url = new URL(dataendpoint);
InputStream is = url.openStream();
String line;
InputStreamReader isr = new InputStreamReader(is);
BufferedReader br = new BufferedReader(isr);
while ((line = br.readLine()) != null) {
// my code here to handle each line of data which prepares it for
// showing on a line graph.
} In the above, I show the dataendpoint variable hardcoded, but in reality this comes as an Applet parameter. It is a URL of a php script which is on the same server as the applet's code and there are no access problems here.
The PHP script does the following: It first opens a data file, parses it and prints it out to its standard output using echo or printf statements. The script then enters a loop where it periodically looks to see if new data has been made available. If so, that new data is also printed out to the standard output.
The PHP script looks like this (in pseudo code):
// open data files, read lines, and send to standard output using echo
// flush buffers using ob_flush() and flush() calls
while (1) {
sleep(30);
// get new data, if any, then send to standard output
// flush buffers again
Again my problem: If I have the PHP script exit before the while loop everything works fine, my applet makes the graph immediately.
However, if I include the while loop, then initially the applet does not appear, not until some time afterwards, and then the applet works like it should, scrolling along every time new data arrives.
I have done a Wireshark sniff and I can see that the initial data is being sent out the the browser and applet immediately. So I do not think it is a buffering problem on the PHP side.
I have wrapped every Applet code line with debug print statements and from the Java console I see that the Java Applet is stopping at this line:
InputStream is = url.openStream();
Can someone explain what is happening here? Why the delay in returning from the openStream() function and how to avoid it?
By the way, the server is Linux and the Applet is being run on Windows Vista, and I have tried both Internet Explorer and Firefox, both give the same behavior.
Thanks in advance!
Steve, DenmarkI still cannot solve this problem, but I have some more observations:
1) yes it is a JApplet, and yes, the data streaming is performed in a separate thread.
2) Wireshark sniffing shows that data sent out by the PHP datasource on the server is sent immediately, and is not buffered (am using ob_start(), ob_flush() and flush() alls in the PHP script).
3) On Windows Vista, using Internet Explorer or Firefox, there is a constant 30 second delay before the Applet returns from this line: InputStream is = url.openStream();
4) After this 30 seconds, data appears in the Applet, but it can be seen also with java console debug prints that the data seems to be buffered. The newest data shown in the Applet is not the newest data sent to the client by the PHP datasource script.
5) On a SUSE Linux client, the Applet works as it should, there is no delay time in showing the data.
It appears as if there is on Windows a buffering of data which I do not wish to have and which does not occur on Linux. I need to find out how to get the URL openStream() call to return immediately allowing the initial data to be read and shown on the Applet. And I need to remove the buffering of data so that the data can be shown on the Applet when it arrives.
Can anyone help? Why does this work on Linux but not on Windows, and what can I do, at best within the Java code, to get the Applet to work on Windows as it does on Linux?
Thanks!
Steve, Denmark -
Hi,
I am trying to write in mdx editor the following query which will give me previous month date.
SELECT
+{(DateRoll(today(),DP_Month,-1),jan)} on COLUMNS+
+from [sample.basic]+
But it gives syntax error. I checked DateRoll function and Today() function in calc script and it was shifting my date to previous month.
Please have a look.
Thanks in advance
Edited by: user10760185 on Jun 21, 2012 12:09 AMYou're mixing Dates and Members. DateRoll function will only work with a 'Date-Time' dimension which is a special type of Time dimension you build with the EAS wizard and only for ASO databases.
Maybe you are looking for
-
Hi: I need to control a labview application (It's been compiled as exe file)from my MS VC program. I tried using PostMessage(hWnd, WM_CLOSE) from whithin my program as MSDN suggested method to stop an application cleanly. However, when i put my progr
-
Samsung 24-inch display auto-dimming problem
Right out of the box 3 or 4 months ago, my Samsung 24 inch 2443 BW dims uncontrollably whenever I have a window open that has mostly black or other dark-colored background - say about 60% black; I can actually watch the whole screen and desktop - not
-
Additional Field Infoset - how to display multiple values
Hi all, I have created an extra field in an infoset and I can succesfully retrieve the value I need (with coding), only now I loop over a selection and then the last value that is retrieved is being displayed. How can you display all values of the se
-
How to deploy a WAR file in JRun server?
hi, I created one war file, now i want to deploy that file in JRun server. can anyone give me an idea of how to deploy that war file in server...
-
Best Practice/Idea - purchasing of assembly
Hello, we are looking for way how to buy/purchase configurable assembly where some parts of the assembly will be provided by our company for the vendor and other parts will be provided by the vendor itself. Then we will receive a completed assembly f