‎2007 May 18 11:30 AM
Hi,
I'm using Direct Input method to post documents for FB01.
The date fields in header BUDAT and BLDAT has format yyyymmdd
But FB01 transactions expects date field to be in format mm/dd/yyyy.
I'm not able to assign directly any date of format mm/dd/yyyy to these fields in field mapping.
Can you pls help me in this? BUDAT takes only 8 chars.
Thanks
‎2007 May 18 11:34 AM
Hi!
Try like this:
DATA: lv_date(10) TYPE c.
CONCATENATE budat4(2) budat6(2) budat(4) INTO lv_date SEPARATED BY '/'.
Use the lv_date field during the BDC.
Regards
Tamá
‎2007 May 18 11:37 AM
‎2007 May 18 12:09 PM
Hi ,
When to call this FM. Whatever it is , BLDAT will accept only 8 chars.
Pls help when to call this in LSMW steps.?
‎2007 May 18 12:17 PM
Field mapping and conversions rules step for that particular field
‎2007 May 18 12:18 PM
Hi!
If BLDAT accepts only 8 characters, then you can't enter a formatted date into that field.
You have to enter a YYYYMMDD (20070518) format date.
If it is accepting longer text, you have to convert it yourself manually or using the given FM-s to internal format...
Regards
Tamá
‎2007 May 18 12:20 PM
Hi,
It accepts only 8 chars. So you mean I can't convert to different format of length 10 chars?
‎2007 May 18 11:41 AM
hi,
<b>'6/7/2006'. -> 20060706</b>
data: datum_in(10) type c value '6/7/2006'.
data: datum(10) type c.
data: datum_out type sy-datum.
CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
EXPORTING
DATE_EXTERNAL = datum_in
IMPORTING
DATE_INTERNAL = datum_out
EXCEPTIONS
DATE_EXTERNAL_IS_INVALID = 1
OTHERS = 2.
Regards
Reshma
‎2007 May 18 12:22 PM
if you are using sap standard program then change the date format in user profile transaction = SU01 since you can not change the program..
if you are uisng custom program then just use simple query.
concatenate the fields into one field.
reward points if it is useful
Thanks
Seshu