Application Development and Automation 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: 
Read only

GL Upload program through FB01

Former Member
0 Likes
1,451

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

1 ACCEPTED SOLUTION
Read only

former_member219762
Contributor
0 Likes
1,126

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.

8 REPLIES 8
Read only

former_member219762
Contributor
0 Likes
1,127

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.

Read only

0 Likes
1,126

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.

Read only

0 Likes
1,126

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.

Read only

0 Likes
1,126

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

Read only

0 Likes
1,126

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

Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,126
WRITE ITAB-BLDAT TO BBKPF-BLDAT.

Will only perform well if the field ITAB-BLDAT is defined as a date field (DATS), also BBKPF-BLDAT is only 8 character long so forget the "" separators.


Regards,

Raymond


Read only

0 Likes
1,126

Thanks Raymond.

Regards,

Sandy

Read only

clinton_jones2
Active Participant
0 Likes
1,126

seems you had to go through a lot of hoops to do this, what was the business reason for deciding against LSMW?