‎2007 Apr 10 5:36 AM
Hi
Can anyone give me sample code to fetch the date as:
YYYYMMDD.
Points are assured for correct answers.
Regards,
Sreeram
‎2007 Apr 10 7:21 AM
Hi,
Try to use use this FM CONVERSION_EXIT_PDATE_INPUT to convert the date format.
Regards,
Ponraj.s.
‎2007 Apr 10 5:42 AM
Hi,
IN SAP date is stored like that only. YYYYMMDD.
there is no need for you to fetch separately like that.
Any date field in SAP is stored in that format only.
for ex: select audat from vbak...where... then the data will be YYYY MM DD format only.
reward if useful
regards,
ANJI
‎2007 Apr 10 5:43 AM
sorry i am not enough clear about your requirement if you are fetching the data from SAP tables then by default the setting is like this...
just you have to declare a variable like sy-datum.
if you want to fetch the data from another area then use fm conversion_exit_pdate_input.
after that also you cant achieve the target then let us know in which format you are getting the date and you have to change the format with character type variables and make some operations on that.
regards
shiba dutta
‎2007 Apr 10 5:43 AM
from where ?
in any table of SAP data will be stored in the same format YYYYMMDD.
even date in Selection Options also , date of any variables or internal table in the same format.
Regards
Prabhu
‎2007 Apr 10 5:44 AM
data: date type sy-datum ,
date1 type sy-datum.
date = sy-datum.
concatenate date4(4) date2(2) date+0(2) into date1.
write date1.
ravi
‎2007 Apr 10 5:44 AM
If the original format is DD/MM/YYYY and you want to convert to YYYYMMDD, use FM CONVERSION_EXIT_PDATE_INPUT.
‎2007 Apr 10 5:46 AM
Hi Sree ram,
Use function module CONVERT_DATE_TO_EXTERNAL. This will convert the date to the user specific format. So if your user specific format is mm/dd/yyyy, it wiil do.
Hope this resolves your query.
Reward all the helpful answers.
Regards
‎2007 Apr 10 5:46 AM
‎2007 Apr 10 5:47 AM
hi sreeram,
there is one more option i dont reme the actual syntax u can use fome keywrod FORMAT do print
FORMAT date as YYYYMMDD
write date.
i am not sure abt the syntax just look for the keyword help i dont have an SAP sys to check out this.
ravi
‎2007 Apr 10 7:21 AM
Hi,
Try to use use this FM CONVERSION_EXIT_PDATE_INPUT to convert the date format.
Regards,
Ponraj.s.
‎2007 Apr 10 7:43 AM
Hi,
All dates related to SAP data is stored in tables in the format 'YYYYMMDD' only.Pls try with this FM also ' CONVERSION_EXIT_PDATE_INPUT '.
if helpful give reward
Regards
Vana
‎2007 May 23 8:49 AM