‎2008 Oct 30 7:35 AM
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
‎2008 Oct 30 8:04 AM
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
‎2008 Oct 30 8:04 AM
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
‎2008 Oct 30 9:20 AM
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.
‎2008 Oct 30 9:33 AM
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.
‎2008 Oct 30 10:30 AM
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.
‎2008 Oct 30 11:01 AM
you can use this also , instead of another variable.
write dmbtr_value to bdcdata-fval.
‎2008 Oct 30 11:35 AM
‎2008 Oct 31 4:57 AM
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.
‎2008 Oct 31 5:48 AM
this i am not sure. using the accounting document number in the messages, you may have to find the other number from database.
‎2008 Oct 30 8:09 AM
Declare the bseg-wrbtr field as type C(with required length consider period as one more char),
It should not create any problem.