2007 Jun 27 5:31 PM
Hi Experts,
Am importing the my_DATE value from front end as in the format of <b>MM/DD/YYYY</b>, but, my_bapi code needs to hv in the format of <i><b>YYYY/MM/DD</b></i>, then only my_bapi gives output!
I hv declared my_date as my_date LIKE RSPARAMS in my_bapi, under TABLES tabstrip.
So, How to convert from MM/DD/YYYY to YYYY/MM/DD? Wht is the FM?
thanq.
Message was edited by:
Srikhar
2007 Jun 27 5:34 PM
hi,
Chk this.
data : out_date(10) like char,
in_date(10) like char.
in_date = '10.02.2007'.
*take variables V1, V2, V3.
V1 = in_date+ 0(4).
V2 = in_date+ 5(2).
V3 = in_date+ 7(2).
Concatenate V1 V2 V3 into date separated by '/'.Now, out_date will have DD/MM/YYYY
Regards
2007 Jun 27 5:34 PM
hi,
Chk this.
data : out_date(10) like char,
in_date(10) like char.
in_date = '10.02.2007'.
*take variables V1, V2, V3.
V1 = in_date+ 0(4).
V2 = in_date+ 5(2).
V3 = in_date+ 7(2).
Concatenate V1 V2 V3 into date separated by '/'.Now, out_date will have DD/MM/YYYY
Regards
2007 Jun 27 5:34 PM
No FM needed....
FORM GENERATE_DATE USING L_DATE CHANGING L_NEW_DATE.
CONCATENATE L_DATE+6(2) L_DATE+4(2) L_DATE+0(4)
INTO L_NEW_DATE.
ENDFORM.
Greetings,
Blag.
2007 Jun 27 5:35 PM
use offset command to convert desired output
if u want date in dd.mm.yyyy format u can use FM CONVERSION_EXIT_PDATE_OUTPUT u will get ur required date format as u ask dd.mm.yyyy.
FM - CONVERSION_EXIT_PDATE_OUTPUT
data : out_date(10) like char,
in_date(10) like char.
in_date = '10.02.2007'.
*take variables V1, V2, V3.
V1 = in_date+ 0(4).
V2 = in_date+ 5(2).
V3 = in_date+ 7(2).
Concatenate V3 V2 V1 into date separated by '/'.
Now, out_date will have DD/MM/YYYY
Thanks
Seshu