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

Error in Accounting document Posting using - BDC

Former Member
0 Likes
2,046

While creatind document in FB01 using BDC

PERFORM fill_dynpro_fields1 USING:

co_true co_program '0100' lit_bdcdata,

space 'BKPF-BLDAT' it_bkpf-bldat lit_bdcdata,

space 'BKPF-BUDAT' it_bkpf-budat lit_bdcdata,

space 'BKPF-BLART' tp_type1 lit_bdcdata,

space 'BKPF-BUKRS' it_bkpf-bukrs lit_bdcdata,

space 'BKPF-WAERS' it_bkpf-waers lit_bdcdata,

space 'BKPF-XBLNR' it_bkpf-xblnr lit_bdcdata,

space 'RF05A-NEWBS' lco_postkey lit_bdcdata,

space 'RF05A-NEWKO' it_bseg-kunnr lit_bdcdata,

space 'BDC_OKCODE' co_intro lit_bdcdata,

co_true co_program '0301' lit_bdcdata,

space 'BSEG-WRBTR' it_bseg-wrbtr lit_bdcdata,

space 'BSEG-ZTERM' it_bseg-zterm lit_bdcdata,

space 'BSEG-SGTXT' it_bseg-sgtxt lit_bdcdata,

space 'RF05A-NEWBS' lco_postkey1 lit_bdcdata,

space 'RF05A-NEWKO' it_bseg-kunnr lit_bdcdata,

space 'BDC_OKCODE' co_intro lit_bdcdata,

co_true co_program '0301' lit_bdcdata,

space 'BSEG-WRBTR' it_bseg-wrbtr lit_bdcdata,

space 'BSEG-ZTERM' it_bseg-zterm lit_bdcdata,

space 'BSEG-SGTXT' it_bseg-sgtxt lit_bdcdata,

space 'BDC_OKCODE' co_intro lit_bdcdata.

I am getting message like bseg-wrbtr input value is longer than screen field. but i have declare it as same type as above space 'BSEG-WRBTR' it_bseg-wrbtr lit_bdcdata,

Can you help me.

Always use proper subject line

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,278

Hi Harshitha,

Filed WRBTR is a currency field of decimals 2, have you taken care of the decimal point length in the excel sheet from where you are uploading.

While you format your excel sheet give 14 as column length in the excel sheet for the field WRBTR this will resolve your issue.

Cheers!!

VEnk@

Edited by: Venkat Reddy on Oct 30, 2008 1:37 PM

9 REPLIES 9
Read only

Former Member
0 Likes
1,279

Hi Harshitha,

Filed WRBTR is a currency field of decimals 2, have you taken care of the decimal point length in the excel sheet from where you are uploading.

While you format your excel sheet give 14 as column length in the excel sheet for the field WRBTR this will resolve your issue.

Cheers!!

VEnk@

Edited by: Venkat Reddy on Oct 30, 2008 1:37 PM

Read only

0 Likes
1,278

Hi Venkat,

the field bseg-wrbtr is picked from the table bseg itself and then sent to transaction FB01.

The field in transaction FB01 is of type bseg-wrbtr.

Read only

0 Likes
1,278

Before passing it to BDC data , move the wrbtr value to character field and then use that character value to fill the fval of bdcdata.

Read only

0 Likes
1,278

Hi Vijay,

But there is one problem.if i am declaring it as type c of length 10 and the amount field is less than 10 it is taking space initially.

please help me.

Read only

0 Likes
1,278

you can use this also , instead of another variable.

write dmbtr_value to bdcdata-fval.

Read only

0 Likes
1,278

Hi Vijay,

Thanks a lot yar it was really helpful.

Read only

0 Likes
1,278

Hi Vijay ,

I have one more problem regarding same please help me.

In the program i am calling the transaction FB01 twice and two different document is created of SA and DA type.

After the program is executed i can only see the DA document created log message. But the SA document(message) is getting suppressed but the document is getting created .

How can i get the both document no at a time once i run the program.

Read only

0 Likes
1,278

this i am not sure. using the accounting document number in the messages, you may have to find the other number from database.

Read only

Former Member
0 Likes
1,278

Declare the bseg-wrbtr field as type C(with required length consider period as one more char),

It should not create any problem.