Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

regarding fm-hr_infotype_operation

Former Member
0 Kudos

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.

1 ACCEPTED SOLUTION

raymond_giuseppi
Active Contributor
0 Kudos

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

5 REPLIES 5

Former Member
0 Kudos

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.

raymond_giuseppi
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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.

bpawanchand
Active Contributor
0 Kudos

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

former_member226519
Active Contributor
0 Kudos

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 ...