‎2013 Dec 19 10:50 PM
Hello Experts,
We have a requirement in which we upload the GL posting data from Legacy to SAP. We are not allowed to use LSMW.
So, we wrote a program which uploads the data from Excel and transfers data to BBKPF and BBSEG.
The posting date and document date in BBKPF structure (BBKPF-BLDAT (Char 😎 and BBKPF-BUDAT) takes value from excel as YYYYMMDD and I am just writing this user value to the BBKPF-BLDAT using WRITE ITAB-BLDAT TO BBKPF-BLDAT.
After successful transfer we submit the standard program RFBIBL00 and execute the session through SM35.
Here in FB01, I could see the date to be as YYYYMMDD instead converting to DD/MM/YYYY. So it says Invalid date and cannot process further.
Any help on this issue?
Appreciate for any useful inputs.
Thanks.
Sandy
‎2013 Dec 19 11:06 PM
Hi,
Use WRITE ITAB-BLDAT TO BBKPF-BLDAT DD/MM/YYYY.
or chnage time format in user mater record to DD/MM/YYYY.
Regards,
Sreenivas.
‎2013 Dec 19 11:06 PM
Hi,
Use WRITE ITAB-BLDAT TO BBKPF-BLDAT DD/MM/YYYY.
or chnage time format in user mater record to DD/MM/YYYY.
Regards,
Sreenivas.
‎2013 Dec 19 11:14 PM
Hi Sreenivas,
Thanks for responding!
But the field BBKPF-BLDAT is a Char8 field. So I don't think we can convert to DD/MM/YYYY instead can we do as DDMMYYYY?
Thanks
Sandy.
‎2013 Dec 19 11:40 PM
Hi ,
simply use Concatanate ITAB-BLDAT+6(2) ITAB-BLDAT+4(2) ITAB-BLDAT+0(4) into BBKPF-BLDAT
or
Use fm CONVERT_DATE_FORMAT'.
Refer this link FUNCTION MODULE FOR CONVERTING DATE INTO THE GIVEN FORMAT - Code Gallery - SCN Wiki
Regards,
Sreenivas.
‎2013 Dec 20 7:47 AM
Hi Sandy -
Use CONCATENATE statement, we are using the same .
Example -
DAta : lv_date TYPE char8.
CONCATENATE lv_date+6(2) lv_date+4(2) lv_date+0(4) INTO lv_date.
BBKPF-BLDAT = lv_date.
Let us know, in case any further help.
Regards,
Atul Mohanty
‎2013 Dec 23 2:43 AM
Hi,
Thanks for your inputs.
In FB01, even if we provide as DDMMYYYY, it takes as the valid date. So we need not bother about the seperators.
Regards,
Sandy
‎2013 Dec 20 8:50 AM
‎2013 Dec 23 2:43 AM
‎2013 Dec 28 12:37 AM
seems you had to go through a lot of hoops to do this, what was the business reason for deciding against LSMW?