10-20-2008 12:39 PM
HI EXPERTS,
i m developing report for uploading infotype 0008 from excel sheet,here in the excel sheet
i m giving begda & endda as 01042008 31032009 & i m using fm-hr_infotype_operation
but here it is giving this error:E00 064Invalid date ,enter the date
in the format __.__.____.
plz helpe to sort out this problem.
10-20-2008 12:41 PM
Pass the date in internal format 20080401 20090331. (It should work, despite the apparent paradox, read the message, the FM waits for internal format to convert to external format)
Regards
10-20-2008 12:40 PM
Hi
IN the user settings at SU01..check the format it is given in the default tab....I think u need to change that.
Regards,
Vishwa.
10-20-2008 12:41 PM
Pass the date in internal format 20080401 20090331. (It should work, despite the apparent paradox, read the message, the FM waits for internal format to convert to external format)
Regards
10-20-2008 12:46 PM
Hi Rajat,
For this we need to populate the date separately and concatenate it separating by '.' .Try this way :
data:
w_year(4) TYPE n, " Year
w_month(2) TYPE n, " Month
w_day(2) TYPE n, " Day
w_date(10) TYPE c. " Date
w_year = fs_tab-begda+0(4).
w_month = fs_tab-begda+4(2).
w_day = fs_tab-begda+6(2).
CONCATENATE w_day w_month w_year INTO w_date
SEPARATED BY '.' .
PERFORM bdc_field USING '<screen field name>(for ex RP50G-BEGDA)'
w_date.
FORM bdc_field USING fnam fval.
CLEAR fs_bdcdata.
fs_bdcdata-fnam = fnam.
fs_bdcdata-fval = fval.
APPEND fs_bdcdata TO t_bdcdata.
ENDFORM. " FORM BDC_FIELD
Regards,
Swapna.
10-20-2008 12:50 PM
Hi
Ths standard SAP system representation of the date is YYYYMMDD but your are trying to pass the data in DDMMYYYY so that's why it is througing the error instead on that u change the format of the data and try to upload.
Regards
Pavan
10-20-2008 1:26 PM
as said before the date format depends on user settings
to be independent you should do as follows:
data: date_in type sydatum, "the input format YYYYMMDD
date_tx(10). "date as text
write date_in to date_tx.
*this will format the date according to the usersettings: DD.MM.YYYY or MM/DD/YYYY or ...