2008 Mar 06 3:49 PM
Hi all,
there is a prolem i am going through in BDC of FB60,
requirement is just to post one single entry in FB60 using BDC,
but the problem is coming in Company code popup box of FB60..
i have to manually and forcefully change it to my desired COMPANY CODE, for generic use of my BDC,
but the company code is getting changed ovce, but it is again displaying the popup box in BDc and overlapping the changed COMP CODE,
resulting in error of 'SPECIFY ACCOUNT NUMBER"..
i want that once company changed,. it should continue filling the data i have in flat file
please help.. here is my code..
loop at it_fb60 into wa_fb60.
GET PARAMETER ID 'BUK' FIELD FIELD_NM.
**Perform for company code Button click*
perform bdc_dynpro using 'SAPMF05A' '1100'.
perform bdc_field using 'BDC_OKCODE'
'/ECCDE'.
*Perform for company code input*
perform bdc_dynpro using 'SAPLACHD' '1000'.
perform bdc_field using 'BDC_CURSOR'
'BKPF-BUKRS'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_field using 'BKPF-BUKRS'
wa_fb60-bukrs.
Perform for vendor name insertion**
**-- coverpage
perform bdc_dynpro using 'SAPMF05A' '1100'.
Perform bdc_field using 'BDC_OKCODE' '/00'.
Perform bdc_field using 'BDC_CURSOR' 'INVFO-ACCNT'.
Perform bdc_field using 'INVFO-BLDAT' wa_fb60-budat.
Perform bdc_field using 'INVFO-BUDAT' wa_fb60-bldat.
Perform bdc_field using 'INVFO-ACCNT' wa_fb60-lifnr.
*Perform for entering detail of G/L account*
*-- coverpage
perform bdc_dynpro using 'SAPMF05A' '1100'.
*-- records
Perform bdc_field using 'BDC_OKCODE' '=0005'.
Perform bdc_field using 'BDC_CURSOR' 'ACGL_ITEM-WRBTR(04)'.
Perform bdc_field using 'INVFO-ACCNT' wa_fb60-bukrs.
Perform bdc_field using 'INVFO-XBLNR' wa_fb60-xblnr.
Perform bdc_field using 'INVFO-WRBTR' '200000'.
Perform bdc_field using 'ACGL_ITEM-HKONT(01)' '133600'.
Perform bdc_field using 'ACGL_ITEM-HKONT(02)' '152600'.
Perform bdc_field using 'ACGL_ITEM-HKONT(03)' '111120'.
Perform bdc_field using 'ACGL_ITEM-HKONT(04)' '2565'.
Perform bdc_field using 'ACGL_ITEM-WRBTR(01)' '20000'.
Perform bdc_field using 'ACGL_ITEM-WRBTR(02)' '30000'.
Perform bdc_field using 'ACGL_ITEM-WRBTR(03)' '50000'.
Perform bdc_field using 'ACGL_ITEM-WRBTR(04)' '20000'.
*Perform for entering detail of G/L account cont*
*-- coverpage
perform bdc_dynpro using 'SAPMF05A' '1100'.
*-- records
Perform bdc_field using 'BDC_OKCODE' '=0005'.
Perform bdc_field using 'BDC_CURSOR' 'ACGL_ITEM-WRBTR(05)'.
Perform bdc_field using 'INVFO-ACCNT' '71'.
Perform bdc_field using 'INVFO-XBLNR' 'REF070985'.
Perform bdc_field using 'INVFO-WRBTR' '200000'.
Perform bdc_field using 'ACGL_ITEM-HKONT(05)' '111120'.
Perform bdc_field using 'ACGL_ITEM-WRBTR(05)' '50000'.
*Perform for entering detail of G/L account cont*
*-- coverpage
perform bdc_dynpro using 'SAPMF05A' '1100'.
*-- records
Perform bdc_field using 'BDC_OKCODE' '=0005'.
Perform bdc_field using 'BDC_CURSOR' 'ACGL_ITEM-WRBTR(06)'.
Perform bdc_field using 'INVFO-ACCNT' '71'.
Perform bdc_field using 'INVFO-XBLNR' 'REF070985'.
Perform bdc_field using 'INVFO-WRBTR' '200000'.
Perform bdc_field using 'ACGL_ITEM-HKONT(06)' '152600'.
Perform bdc_field using 'ACGL_ITEM-WRBTR(06)' '20000'.
**Perform for entering detail of G/L account cont*
*-- coverpage
perform bdc_dynpro using 'SAPMF05A' '1100'.
*-- records
Perform bdc_field using 'BDC_OKCODE' '/00'.
Perform bdc_field using 'BDC_CURSOR' 'ACGL_ITEM-WRBTR(07)'.
Perform bdc_field using 'INVFO-ACCNT' '71'.
Perform bdc_field using 'INVFO-XBLNR' 'REF070985'.
Perform bdc_field using 'INVFO-WRBTR' '200000'.
Perform bdc_field using 'ACGL_ITEM-HKONT(07)' '2565'.
Perform bdc_field using 'ACGL_ITEM-WRBTR(07)' '10000'.
*Perform for posting the document info*
*-- coverpage
perform bdc_dynpro using 'SAPMF05A' '1100'.
*-- records
Perform bdc_field using 'BDC_OKCODE' '=BU'.
Perform bdc_field using 'BDC_CURSOR' 'ACGL_ITEM-HKONT(08)'.
Perform bdc_field using 'INVFO-ACCNT' '71'.
Perform bdc_field using 'INVFO-XBLNR' 'REF071985'.
Perform bdc_field using 'INVFO-WRBTR' '200000'.
call transaction 'FB60' using it_tab mode 'A'.
endloop.
thanks in advance
Rohan
2008 Mar 06 6:02 PM
FB60 is an EnjoySAP transaction and does not work well in batch input. It's better to use one of the BAPIs. If you must use batch input, then use transaction FB01.
Rob
2008 Mar 06 6:02 PM
FB60 is an EnjoySAP transaction and does not work well in batch input. It's better to use one of the BAPIs. If you must use batch input, then use transaction FB01.
Rob
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |