05-12-2008 4:18 AM
Hi
My internal table date filed display like yyyy/mm/dd format.
But alv report date format changed to dd.mm.yyyy format.
I need to change yyyy/mm/dd.
Pls help me
05-12-2008 4:35 AM
Hi Kumar,
The display of the date in the ALV should be as per the user's setting.
You just define the internal table field as type sy-datum and then SAP will take care of the conversion while displaying in ALV.
Regards,
Atish
05-12-2008 4:24 AM
Edit_mask (field formatting): To apply the report output formatting options same as
in the WRITE statement in report writing.
Value set: SPACE, template.
Sample Code
DATA: time TYPE s_fltime,
seconds TYPE i,
msk TYPE string.
DESCRIBE FIELD time EDIT MASK msk.
seconds = 333.
WRITE seconds USING EDIT MASK msk.
Mainly I t will be used to convert different date foramats like dd/mm/yyyy mm/dd/yy ,dd-mm-yyyy ..........
OR
there are no prior conditions to be applied u can directly use
write sy-datum using edit mask '__/__/____' to sydatum.
Check these out
http://www.sap-img.com/abap/sample-programs-on-alv-grid.htm
http://help.sap.com/saphelp_erp2004/helpdata/en/33/206bc8012e11d3b495006094192fe3/content.htm
Reward points..
05-12-2008 4:35 AM
Hi Kumar,
The display of the date in the ALV should be as per the user's setting.
You just define the internal table field as type sy-datum and then SAP will take care of the conversion while displaying in ALV.
Regards,
Atish
05-12-2008 4:48 AM
Hi Atish
i changed the file type to sy-datum. but it still displaying as wrong format
05-12-2008 4:54 AM
Hi Kumar,
The display of the date format is user specific.
Just go to transaction SU3 and change the format for yourself.
Save the changes then log off and log in.
Now you will see the date in the required format.
Regards,
Atish
05-12-2008 5:02 AM
Thanks Atish. It is working fine.
I have one more issue. I am downloading this data to excel using gui_download. But excel date format is DD/MM/YYYY. how to change this to YYYY/MM/DD
05-12-2008 5:07 AM
Hi Kumar,
Excel should have the same format as in the ALV. Is it not same?
Regards,
Atish
05-12-2008 5:11 AM
Hi Atish
it is not the same format. Just now i checked the format's in Excel. YYYY/MM/DD format is not available in my excel. Is this the reason?
10-17-2019 12:26 PM
05-12-2008 5:12 AM
Hi Kumar,
Set user date setting from SU01...
As data in excel shd be in the same format as it is appering in ALV...
Check it once more after doing changes ...
Chk out the date formats available in EXCEL as well...
Hope it will solve your problem...
Reward points if useful...
Thanks & Regards
ilesh 24x7
05-12-2008 5:40 AM
05-12-2008 5:57 AM
Hi Kumar,
Check out the sy-subrc value...
and wht says that dump analysis ??
If you are using GUI_DOWNLOAD in background then....
There is one limitation of this download and upload FMs ...
We can not use it in Background...
So ... Because of this limitation on FMs ur background job is getting cancelled...
Try out alternative ways to get it done...
Better you use OPEN DATASET CLOSE DATASET and write the data in Application server.
Or if you are generating a List then it will create Spool when executed in Background. Which you can download later from SP01.
Please go through the following link for implementing download of a file in background.
http://sapabap.iespana.es/sap/info/rfcexec/rfcexec_e.htm
Also have a look on below link...
http://www.sap-img.com/ab003.htm
Hope it will solve your problem..
Reward points if useful..
Thanks & Regards
ilesh 24x7