2009 Aug 10 9:20 PM
Hello friends, I have written a BDC and it has 2 date fields,
Valied from and Valid to.
The valid from works good but the valid to has an issue. I need to hardcode the valid to to 12/31/9999
Below is the code.
DATA: g_date_begin(8), g_date_end(8).
g_date_end = '12319999'.
write g_date_end to g_date_end.
write sy-datum to g_date_begin.
PERFORM fill_bdc_table USING:
'X' 'SAPLMEOR' '0205',
' ' 'EORD-VDATU(1)' g_date_beg,
' ' 'EORD-BDATU(1)' g_date_end,
Any suggestions on how would I handle the VALID TO.
Bob
2009 Aug 12 3:02 PM
2009 Aug 10 9:30 PM
You might be overflowing the date maximum capacity for your sap version. Try seting it around 2030.
2009 Aug 10 9:31 PM
for some users it works but not all. the error message is invalid date.
bob
2009 Aug 10 9:33 PM
2009 Aug 10 11:29 PM
Hi Bob,
Please try this.
DATA: w_date(10) .
WRITE sy-datum TO w_date USING EDIT MASK '__/__/____' .
and pass the w_date to your perform bdc_field.
Rgds
Raj.
2009 Aug 11 3:00 AM
Hi Bob,
***get date format
select single datfm into g_datfm
from usr01
where bname = sy-uname.
case g_datfm.
when '1' .
concatenate l_day '.' l_month '.' l_year into l_date.
when '2' .
concatenate l_month '/' l_day '/' l_year into l_date.
when '3' .
concatenate l_month '-' l_day '-' l_year into l_date.
when '4'.
concatenate l_year '.' l_month '.' l_day into l_date.
when '5'.
concatenate l_year '/' l_month '/' l_day into l_date.
when '6'.
concatenate l_year '-' l_month '-' l_day into l_date..
endcase.
Regards
Jerry
Edited by: foxconn_jerry on Aug 11, 2009 4:00 AM
Edited by: foxconn_jerry on Aug 11, 2009 4:01 AM
2009 Aug 12 2:29 PM
Hello all,
I have tried all of the above and nothng seems to be working.
any FM to achieve this
Edited by: Bob Dan on Aug 12, 2009 3:31 PM
2009 Aug 12 2:39 PM
Hi Bob,
You can offset the date and can make it however you want.
data :g_date_end1 type char10.
concatenate g_date_end(2) '/' g_date_end2(2) '/' g_date_end+4(4) into g_date_end1
now pass g_date_end1 inthe BDC screen field.
Hope this tip may help
Rgds,
Sripal
2009 Aug 12 2:46 PM
hello Sripaleshwar ,
nope this wont help because each user has a different date setting.
Bob
2009 Aug 12 2:50 PM
Hi Bab,
then declare the date variables of type sy-datum, this may help
Sripal
2009 Aug 12 3:02 PM
2009 Aug 12 4:02 PM
Hi,
What i feel is date will be taken in the input format YYYYMMDD. Now when you say 12139999 the actual date considered as 99.99.1213 if the external format of date is separated by . now the catch is 99 date doesn't exists may be thats the reason you are getting this error.
Or else check what date is going to the BDC while running online you will get a fair idea.