Save date in date format in workbook
Hi Gurus,
When I see the BEX report, the dates in the date column are in the date format. When I save it as work book and disconnect from BW, they are in the text format. So, when I try to sort it is doing in wrong way. Is there any way to save the dates in the date format only in the workbook.
Replies are appreciated
Thanks,
Regards,
aarthi.
[email protected]
Hi:
The BEx method worked where you can derive a Key Figure Date from Characteristic Date.
I send you screen shots to your E-Mail becasuse its difficult to explain it all in Text. but its simple.
Process:
I hope you already created the Formula Variable that gets your Date.
If you have refer to thos doc. You will move your Dae Characteristic to a formula variable - Call it 'Date As Formula'.
http://www.sd-solutions.com/documents/SDS_BW_Replacement%20Path%20Variables.html
Next, Create a New Formula in BEX.
Go to Columns. Right Click on Key Figure and create a new formula.
Call it 'Days to Date'.
Here, insert the formula variable that u created:
'Date As Formula' - DATE ( 0 )
DATE is the Second formula in Data Functions.
THis will give you the number of days for your date.
Next:
Create another New Formula as shown above with name
Date from Characteristic
Here, pick the Process Value As Date again.
And in the parenthesis, insert the formula that you just created:
DATE ( 'Days to Date' )
Insert this in the query.
Let me know if you have any questions.
Ram C.
Message was edited by: Ram Chamarthy
Similar Messages
-
How to read csv Data and save it with no format changes
Hi,
At first I am not used to Diadem.
I want to read in a csv file do some calculation with the data and save the changed data in the same csv file. A file as an example is attached (496888_edit.csv).
Therefore I wrote this lines:
Dim i
Dim Delimiter
Dim FilePath
Dim FileParameters
Delimiter = ";"
Call DataFileLoad(FilePath,"CSV","Load")
' Do some calculations
FileParameters = "<filename>"&FilePath&"</filename>"&"<delimiter>"&Delimiter&"</delimiter>"
Call DataFileSave(FileParameters,"CSV")
After running that lines the csv file is looking like the other attached file (496888_after.csv)
Because of some reasons which I could not explain Diadem is rounding the numbers. I want that both files look the same.
What can I do?
There might be another extension. Just to read in some columns, doing some calculations and after the calculation saving that columns in the file instead of the originals. (The csv files are much bigger like the two examples)
Thanks,
Jens
Attachments:
496888_edit.csv 1 KB
496888_after.csv 1 KBThe only thing that can be changed in writing float64 values using the CSV plugin is the decimal point ('.' or ',').
The format of the doubles is not rounded but the CSV writer only writes the relevant digits.
It is using up to 15 digits which is the resolution of float 64. It would also switch to scintific writing if necessary.
So there is no way to force only 6 digits and filling 0s are left out. So if you just fear that you loose precision that will not happen.
(only the typical problems of epressing a 2 system binary value in a 10 system text string)
If you are interested to have a fix float format the only solution is to write with VBS directly to a file doing formatting on your own, which is slow. -
Report to Save data in XML format
Hi,
I am getting data in XML format through a RFC. I want this data to be saved as an XML file by opening a 'Save As' dialog box so that I can choose a destination and save the file there. Please provide me code for writing such a report program. It would be better if someone can provide me the area in SAP Help where I can find such material.
Thanks in advance!!
Regards,
SaurabhHi,
Use the class cl_gui_frontend_services.
For more info please see this.
save_dialog func module
Cheers
Vinod -
How can i save a data in text format
how can i save a data in text format in labwindows cvi
Message Edited by Tikoy on 04-14-2010 11:30 PM
Solved!
Go to Solution.Hi,
If your data is in an array, the easiest way is to use the ArrayToFile function.
It automatically creates a file and puts your data in it according to the format you provide.
If you have individual samples that you need to write once in a while, you can either collect them into an array and then use ArrayToFile or open a file with fopen and write them as they are acquired with fwrite.
Hope this helps,
S. Eren BALCI
www.aselsan.com.tr -
Date and Cost formats in export toward Excel (2013)
Hi,
I'm trying to export Start date and Cost of my project tasks to Excel:
File/Save as/ Excel Workbook...
but all these date and cost data arrive in Excel with Text format. With the 2003 version, date and cost formats were well recognized.
I'm using Project 2013 English and Excel 2013 English on a French Win 7.
What are the settings (decimal separator...) which are needed to allow this feature ?
ThanksHi Julie,
Thanks for your help.
The "Convert to Number" feature works fine for the Cost.
But the dates arrive as text with a long format such as "03 August 2015 08:00" and the =DateValue(Cell
reference) function returns an error : #VALUE!
Any idea to retrieve the dates?
Thanks again -
I am trying to generate an application that saves a copy of its front panel on completion. This is easy to do using an invoke node with Print VI to HTML but this does not work in an .exe format. I have seen elsewhere that you have to use the Get Panel Image method, but no details are supplied in LV 5.0.1 documentation of how to use the "image" data (1-D Unsigned Byte array) that is generated. I want to save this in a format that can then be read as a bitmap in any standard graphics package. Any assistance?
Hi,
If you'd upgrade to LV5.1 or 6 you could use the 'standard' vi's for this.
You need a VI called "Write BMP File.vi". It's not shipped with LV5.0.1.
This vi only uses 3 subVI's, so perhaps someone at NI can convert it and
send it to you (sorry, I won't, it's copywrited).
If you cannot get this VI anywhere, you'll need to figure out the BMP file
format yourself. It's not too complicated, but still could take some days.
Perhaps someone figured it out before LV5.1 was released.
Regards,
Wiebe.
"RDK" wrote in message
news:[email protected]..
> I want to use Get Panel Image in Labview 5.0.1 and need details on how
> to save the BMP data generated
>
> I am trying to generate an application that saves a copy
of its front
> panel on completion. This is easy to do using an invoke node with
> Print VI to HTML but this does not work in an .exe format. I have seen
> elsewhere that you have to use the Get Panel Image method, but no
> details are supplied in LV 5.0.1 documentation of how to use the
> "image" data (1-D Unsigned Byte array) that is generated. I want to
> save this in a format that can then be read as a bitmap in any
> standard graphics package. Any assistance? -
How to auto save output with date added to file name, and email the results?
Hi,
We found a script to capture disk space usage, that automatically places the results into an Excel file. We would like the script to autosave this file to a specific directroy with the date ran as part of teh file name. We would then like these results to
be emailed to us if possible. (also if possible to highlight cell in red that is 5% OR less available disk space would be great)
Here is what we have:
$erroractionpreference = “SilentlyContinue”
$a = New-Object -comobject Excel.Application
$a.visible = $True
$b = $a.Workbooks.Add()
$c = $b.Worksheets.Item(1)
$c.Cells.Item(1,1) = “Machine Name”
$c.Cells.Item(1,2) = “Drive”
$c.Cells.Item(1,3) = “Total size (GB)”
$c.Cells.Item(1,4) = “Free Space (GB)”
$c.Cells.Item(1,5) = “Free Space (%)”
$c.cells.item(1,6) = "Name "
$d = $c.UsedRange
$d.Interior.ColorIndex = 19
$d.Font.ColorIndex = 11
$d.Font.Bold = $True
$d.EntireColumn.AutoFit()
$intRow = 2
$colComputers = get-content "C:\Servers.txt"
foreach ($strComputer in $colComputers)
$colDisks = get-wmiobject Win32_LogicalDisk -computername $strComputer -Filter “DriveType = 3"
foreach ($objdisk in $colDisks)
$c.Cells.Item($intRow, 1) = $strComputer.ToUpper()
$c.Cells.Item($intRow, 2) = $objDisk.DeviceID
$c.Cells.Item($intRow, 3) = “{0:N0}” -f ($objDisk.Size/1GB)
$c.Cells.Item($intRow, 4) = “{0:N0}” -f ($objDisk.FreeSpace/1GB)
$c.Cells.Item($intRow, 5) = “{0:P0}” -f ([double]$objDisk.FreeSpace/[double]$objDisk.Size)
$c.cells.item($introw, 6) = $objdisk.volumename
$intRow = $intRow + 1
$d.EntireColumn.AutoFit()
cls
Thank YouHi Phorbin1128,
The script below amy be helpful for you to save the Excel file with date in filename, and send email with the attachment of the excel report.
$erroractionpreference = “SilentlyContinue”
$a = New-Object -comobject Excel.Application
$a.visible = $True
$b = $a.Workbooks.Add()
$c = $b.Worksheets.Item(1)
$c.Cells.Item(1,1) = “Machine Name”
$c.Cells.Item(1,2) = “Drive”
$c.Cells.Item(1,3) = “Total size (GB)”
$c.Cells.Item(1,4) = “Free Space (GB)”
$c.Cells.Item(1,5) = “Free Space (%)”
$c.cells.item(1,6) = "Name "
$d = $c.UsedRange
$d.Interior.ColorIndex = 19
$d.Font.ColorIndex = 11
$d.Font.Bold = $True
$d.EntireColumn.AutoFit()
$intRow = 2
$colComputers = get-content "C:\Servers.txt"
foreach ($strComputer in $colComputers)
$colDisks = get-wmiobject Win32_LogicalDisk -computername $strComputer -Filter “DriveType = 3"
foreach ($objdisk in $colDisks)
$c.Cells.Item($intRow, 1) = $strComputer.ToUpper()
$c.Cells.Item($intRow, 2) = $objDisk.DeviceID
$c.Cells.Item($intRow, 3) = “{0:N0}” -f ($objDisk.Size/1GB)
$c.Cells.Item($intRow, 4) = “{0:N0}” -f ($objDisk.FreeSpace/1GB)
$c.Cells.Item($intRow, 5) = “{0:P0}” -f ([double]$objDisk.FreeSpace/[double]$objDisk.Size)
$c.cells.item($introw, 6) = $objdisk.volumename
$intRow = $intRow + 1
$d.EntireColumn.AutoFit()
$date=Get-Date -f yyyy-MM-dd
$filename = "D:\test\"+$date+".xlsx"
$b.SaveAs($filename)
$a.Quit()
Send-MailMessage -SmtpServer xxxxxxxxxx -To [email protected] -From [email protected] -Subject "test mail" -Body "file name is: $new_file" -attachment $filename
For more detailed information about the cmdlet Send-MailMessage, please refer to this article:
Send-MailMessage
I hope this helps. -
Hi all,
I'm very new to VBA and excel development, so please take that into consideration as you read on.
I'm trying to create a work form for a database that (should) collect various information in comboboxes, including the date, the weekday, and the month... Note: most of the time, the data will be inserted the day after it's been collected. So, I wanted to create
one combobox for the date, one for the weekday, and one for the month, because I want columns for each of these in the database (If this is not necessary/efficient, please help! :) ) .
Here's what I've got so far:
'worksheet setup
Dim ws As Worksheet
Set ws = Worksheets("LookupList")
'Date dropdown setup
Dim cDateToday As Range
For Each cDateToday In ws.Range("DateList")
With Me.cboDate
.AddItem cDateToday.Value
End With
Next cDateToday
'If today is Monday, then set date to last friday, if any other weekday, set it to day before that
If Weekday(Date - 1) <> 2 Then
Me.cboDate.Value = Format(DateAdd("D", -Weekday(Date) - 1, Date), "Medium Date")
Else
Me.cboDate.Value = Format(Date - 1, "Medium Date")
End If
Problem #1: Right now, I am getting the date values from the list
DateList in the worksheet LookupList...is there a better way of doing this?
Problem #2: When the user form is run, the correct date and format shows up. However, if I change the date, the dropdown list in the combobox starts from the initial date in given list...is there anyway to bring the list closer to the current
date? Think Calendar View
Problem #3: I want the weekday and month values to be directly correlated to the date value discussed above, so hypothetically when the user form is run the correct date, weekday, and month all show up (based on the same date value), then if
I change the date, the weekday and month automatically update. Is this possible, if so how?
The reason I want this functionality is so that on a Monday, I can run the work form and it will automatically have Friday's date, weekday, month info as it opens. When I'm done with Friday, I can run it again, switch the date to the Saturday's
date (weekday and month automatically update), then repeat for Sunday.
I have tried running the same code for the weekday and month as I have for the date, and they work
until the date is changed. Once the date is changed, I have to manually change the weekday, which leads to format change, and same for month, which all leads to :( and confusion
Again, I am very new to vba and don't know much about it all and appreciate any/all help!
Thanks in advance!
/AlexI can give you a little advice but I don't understand your comment "if I change the date, the weekday and month automatically update" Where do you want them to update?
I am assuming that your entire question is referring to a Userform with the Combobox. Is this correct?
The code can be much simpler to populate the combobox list. You already have a named range for the Dates so you can use that directly to populate the RowSource. (RowSource if the combox is on a Userform or ListFillRange for a combobox on a worksheet).
Then the WorksheetFunction Workday can be used to get the previous workday without weekend days. It also looks after the previous day when the actual date is mid week. Look up the function on the worksheet Help because you can also have a separate list
of holidays that will be excluded like weekend days.
If you are new to VBA then a tip about Help. You need to be on the worksheet and click Help to get worksheet help and in the VBA editor you click Help to call the VBA help. Don't just select Help off the taskbar when changing between the worksheet and VBA
because you will finish up with the incorrect Help file.
Example of code to assign a named range to the RowSource of a ComboBox. Named range needs to be Global and not scoped to a worksheet otherwise the worksheet name is also required.
Me.cboDate.RowSource = "DateList"
Example of code to assign the previous workday to the combobox value.
'Following line sets value to previous workday (Mon to Friday)
Me.cboDate.Value = WorksheetFunction.WorkDay(Date, -1)
Then there is another problem with ComboBoxes and dates. If the Dates are real dates on the worksheet (Not Text) then the dropdown list displays in the same format as the worksheet but when the date is selected, it displays as a serial number. This
can also be rectified with code but first I need to know what the format of the data is on the worksheet.
Can you upload a copy of your workbook because it is like a picture is worth a thousand words. Same goes for having a copy of the workbook. If it has sensitive data then create a copy and remove the sensitive data.
Regards, OssieMac -
How do I save a mutlitcolumn data to a text file?
I am trying to save a multicolumn data to a text file without using Report Generation VIs. Here is the detail scenario...
I have data in the following format.
Time Voltage
1 2
2 3
3 6 ...
and
Power
1
and
Peaks
x-axis y-axis
Peak1 1 4
Peak2 5 11
If I have such data, how would I put them in a columnar format with their title and labels in a text file.
Any example VIs would be nice to see.
Thanks.Here is one solution, hope it helps. I would like to see this done using clusters and less shift arrays, I'm sure there are a few ways to do this with less wires but i guess that's what sub vi's are for...
Attachments:
data_to_col..vi 98 KB -
hello,
Can i save the JTable's data in binary and reload them?
give me some suggestions please
Now i save the JTable's data as txt format,but i want to save a password's MD5 result before them(its format is binary).i want to save them in one format,how can i do?
thank u for your helpI don't understand what's the problem.
Java can do binary file I/O.
Any DB supports binary data type.
So ..... -
How to Download Data in Excel Formate
Hi Friend,
I have one doubt on webdynpro with java. Req: For download data in Excel formate.
I will follow this http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/3596. [original link is broken] [original link is broken] [original link is broken]
i am doing upto 3rd Step here.. Up to Step 3 i am doing after 3rd Step I am not understand. Could u explain 4step.
1. I have to place TableUtilities.java
2. I have Create tableutilities value attribute
3. in Modify view--- This is -SecondView -
This is having Table UI Element.
if(firstTime)
IWDTextView tv = (IWDTextView)view.getElement("total");
wdContext.currentContextElement().setTableutility(new TableUtilities(wdContext.nodeDepartments()));
//Returns attribute info of a dynamically created attribute which can be bound to the UI element neeed.
tv.bindText(wdContext.currentContextElement().getTableutility().CalculateSum("Departments","NoOfPeople"));
4. Creating an Excel File
How to Create Excel File here can u explain
I am not understand this 4th step. Pls give me Breef Explanation. How to write this code...here...
Regards
Vijay Kalluri
Edited by: KalluriVijay on May 4, 2010 8:00 PM
Edited by: KalluriVijay on May 4, 2010 8:02 PMHi Vijay,
Please open Microsoft Excel from your system and then create some entries (ex. having 3 columns and 3 rows). Save this file to some location in your system. Later you will need to give the location path of this saved file when uploading it from your web dynpro application.
Creating of an Excel file (i.e the 4th step) is no where related to Web Dynpro and NWDS.
Hope this helps!
Regards,
Kishan -
Issue with Saving the Query output data in Excel format
Hi,
Recnetly we had upgraded from 4.6c to ECC 6.0.
In ECc 6.0 environment, when user try to export the query output , we are getting only XML option to save the data.
But user want to save the data in EXcel format, he was able to do that in 4.6C.
pleas eprovide some inputs, on this issue.
Thanks,
Sanketh.I cannot for the life of me imagine, why a link to a post in the 'Business One Forum' where one uses ODBC to transfer query-data to MicroSoft Excel is of relevance to the OPs question, even if the same is not a security issue.
Never mind. [note 40155|https://service.sap.com/sap/support/notes/402155] deals with various symptoms in the ALV-Excel combination as as of release 4.6C. There are various others, mostly in components BC-SRV-ALV and BC-ABA-LI - also: I remember that when we upgraded from 4.5B to 4.7C there was an issue with Excel-templates -> the solution was in the release notes somewhere. So, in addition to SMP you might want to check the release notes and/or upgrade guide for solutions.
And yes, moderators ... this is not a security issue, this should go to ECC-Applications/Upgrade. -
hi
i want to download data from database tables to the html format what is function module for that.
regards
srinivas.HI USE fm
LIST_DOWNLOAD_HTML
OR CALL FUNCTION 'RSPO_RETURN_SPOOLJOB'
EXPORTING
RQIDENT = SPOOL_NUMBER
IMPORTING
REAL_TYPE = G_DOC_TYPE
TABLES
BUFFER = COMPRESSED_LIST
CALL FUNCTION 'TABLE_DECOMPRESS'
TABLES
IN = COMPRESSED_LIST
OUT = LISTOBJECT
CALL FUNCTION 'WWW_HTML_FROM_LISTOBJECT'
TABLES
HTML = IT_HTML
LISTOBJECT = LISTOBJECT
then you get a HTML include the content of your report in IT_HTML.
You can use the function LIST_DOWNLOAD_HTML to download a list in HTML format
Demonstrate various things that can be done with lists
The first example shows how to have a list go to memory instead of the
screen or a spool, and how to write out that list.
The second set of examples shows how to save the screen list in
various formats
REPORT ZKBTST31.
DATA: MTAB_REPORT_LIST LIKE ABAPLIST OCCURS 0 WITH HEADER LINE.
DATA: MTAB_REPORT_HTML LIKE W3HTML OCCURS 0 WITH HEADER LINE.
DATA: BEGIN OF MTAB_REPORT_ASCII OCCURS 0,
LINE(255) TYPE C,
END OF MTAB_REPORT_ASCII.
START-OF-SELECTION.
*-- Submit a report. This one is the chart of accounts
SUBMIT RFSKPL00
EXPORTING LIST TO MEMORY " Save list in memory
AND RETURN. " Return control to this program
END-OF-SELECTION.
*-- Get the list from memory
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
LISTOBJECT = MTAB_REPORT_LIST
EXCEPTIONS
NOT_FOUND = 1
OTHERS = 2.
*-- Write the list out
*-- This is a trivial example. A better use would be when the
*-- requirement is to have one report print out several different
*-- reports on the same list level.
CALL FUNCTION 'WRITE_LIST'
TABLES
LISTOBJECT = MTAB_REPORT_LIST
EXCEPTIONS
EMPTY_LIST = 1
OTHERS = 2.
The examples below this line do not require that the report be *
submitted to memory when run. All that they require is that the *
report has been written to the screen. *
*-- Take the current list that has been written to screen, and format
*-- as an HTML file.
CALL FUNCTION 'WWW_LIST_TO_HTML'
TABLES
HTML = MTAB_REPORT_HTML
EXCEPTIONS
OTHERS = 1.
*-- Save the list. Same as using System->List->Save->Local File or
*-- entering %pc in the OKCODE box. This function does not need the
*-- include <%_LIST> in a program.
*-- Method can be:
*-- NOCO - No conversion
*-- RTF - Rich Text Format
*-- DAT - Tab delimited Format
*-- When no method is given, a selection screen is presented for the
*-- user to choose the method.
CALL FUNCTION 'LIST_DOWNLOAD'
EXPORTING
METHOD = 'NOCO'
EXCEPTIONS
OTHERS = 1.
rEWADS IF HELPFUL -
Thread: Export Data in TSV format (International / Unicode characters)
Hi OAF Gurus,
Question: Export data in TSV format ? how
I am working in JDEV 10g, OA Framework 12.0.6.
I have a page which has a OA Table populated with data, I need to export this data in a TSV (*Tab Separated values*) format.
I know that we can add a “Export” button and then the data is exported in a CSV (comma Separated values) format.
The question is how to save in TSV format instead.
Reason for using TSV format: Our Data contains Unicode characters(Asian characters) which CSV files will not support. (FYI: Oracle Forms export in TSV format)
Thanks in Advance
Chaitanyause class CL_ABAP_CONV_OUT_CE
2) or use obn application server
open dataset file for output in legacy text mode code page p_code.
(for codepage look in tabele TCP00!)
grx
A.
Edited by: Andreas Mann on Nov 8, 2010 11:23 AM -
I am using Jsp which is getting data from the EJBs...and shows in tabular format...i hav to give user a option to save that data in EXCEL format.Is there any utility available to do this...or can i use
==========================================
contentType="application/vnd.ms-excel"
==========================================
If i use this whether i get HTML output from the Jsp page..
Please clear meprovide option to get data in format of CSV (comma separated values) then they can open this text file in Excel and save it as Excel worksheet.
Maybe you are looking for
-
Acrobat XI Pro via Creative Cloud installs twice on Win 8.1 Desktop
I am running Windows 8.1 Pro, 64 bit on an HP Pavilion a6700y desktop PC using Adobe Create Cloud. When I install Acrobat XI Pro, it installs twice. One version is Adobe Acrobat XI Version 11.0 with a size of 1.8 MB and the other is Version 11.0.00 w
-
How do I restore my profiles and email messages?
My work computer repaired a disk problem and now all my profiles and emails are gone from Thunderbird. Thunderbird starts up like it's just been installed. My system is Windows 7. Thanks in advance for helping.
-
Keyboard Mapping Incorrectly at Bootup - not consistent
Not sure if I'm posting this in the right place, but here goes. I have 2 users that both have 15" G4 Powerbooks with OS X 10.4.6 loaded on them. They're using a standard image that's used for all our computers. So far we have have never seen this par
-
Merging HDR images in Photoshop (going from LR)
I'm not sure whether this is a LR or CS3 question, but anyway: I'm trying to make my way through Scott Kelby's LR2 guide, but ran into the following when I reached the chapter referred to in my subject line: "Merge to HDR.jsx could not be found". I'm
-
I want to change the show window of Labview, what do you suggest?
Hi.............................. I saw Labview doesn't have much controls to make the show window beautiful .am I right ? if So, what do you suggest to improve this show window (Front Panel)? I heard there is a good program works on changing show win