on 11-05-2009 6:50 PM
hi all,
i need the date conversion to be done in my prog
i need to convert data from internal format to user format , the FM 'convert internal to external ' says invalid value if i put it as
internal format.
As i need to send the data to BDC in user format without any speacial characters
pls help me to achieve this..
reg varun
Hi varun
I faced a similar situation , though i cudnt solve thru FM
but i can suggest a method to get rid of this.....
u are getting the date in internal format rite (YYYYMMDD) .... move it w_date
Hope it helps u .....
Select single DATFM from USR01
into w_datfm
where bname = sy-uname.
CASE w_datfm.
* DD/MM/YYYY"
WHEN c_1 .
w_date = <fs_temp1>-datab+6(2) .
w_date+2(2) = <fs_temp1>-datab+4(2) .
w_date+4(4) = <fs_temp1>-datab+0(4) .
* "MM/DD/YYYY"
WHEN c_2 or c_3.
w_date = <fs_temp1>-datab+4(2) .
w_date+2(2) = <fs_temp1>-datab+6(2) .
w_date+4(4) = <fs_temp1>-datab+0(4) .
WHEN c_4 or c_5 or c_6.
* " do nothing as it is in "YYYY/MM/DD"
WHEN 'A' or 'B' or 'C'.
* " do nothing as it is in "YYYY/MM/DD"
WHEN OTHERS.
* "" error message saying "Invalid Date Format"
ENDCASE.
regards
venkat sharma
Edited by: venkat sharma gaddala on Nov 6, 2009 12:32 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
7 | |
4 | |
3 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.