‎2008 Jan 22 4:48 AM
Hi Experts,
I use table control for FB60 Transaction.But intial Line items are processed (For example in fb60, intially 4 are visible, 4 processed more than four can not be processed).
Please see my code where exactly i need to insert OK-CODE in my code and which is suitable.
LOOP AT atg_acgl_item.
MOVE sy-tabix TO lv_count.
PERFORM gl_accounts TABLES atg_acgl_item
USING lv_count.
ENDLOOP.
FORM gl_accounts TABLES p_atg_acgl_item LIKE it_acgl_item
USING p_lv_count TYPE any.
DATA: atg_hkont(22) TYPE c,
atg_wrbtr(22) TYPE c,
atg_mwskz(22) TYPE c,
atg_prctr(22) TYPE c,
data: atg_wrbtr_convert(15) type c.
CLEAR: atg_hkont,
atg_wrbtr,
atg_mwskz,
atg_prctr.
*clear atg_wrbtr_convert.
atg_acgl-hkont = p_atg_acgl_item-hkont.
atg_acgl-wrbtr = p_atg_acgl_item-wrbtr.
atg_acgl-mwskz = p_atg_acgl_item-mwskz.
atg_acgl-prctr = p_atg_acgl_item-prctr.
CONCATENATE atg_hkont 'ACGL_ITEM-HKONT'
'(' p_lv_count ')' INTO atg_hkont.
CONCATENATE atg_wrbtr 'ACGL_ITEM-WRBTR' '
(' p_lv_count ')' INTO atg_wrbtr.
CONCATENATE atg_mwskz 'ACGL_ITEM-MWSKZ'
'(' p_lv_count ')' INTO atg_mwskz.
CONCATENATE atg_prctr 'ACGL_ITEM-PRCTR'
'(' p_lv_count ')' INTO atg_prctr.
CASE p_lv_count.
WHEN 1 OR 2 OR 3 OR 4.
PERFORM bdc_dynpro USING 'SAPMF05A' '1100'.
PERFORM bdc_field USING 'BDC_OKCODE' '/00'.
PERFORM bdc_field USING atg_hkont atg_acgl-hkont.
PERFORM bdc_field USING atg_wrbtr atg_acgl-wrbtr.
PERFORM bdc_field USING atg_mwskz atg_acgl-mwskz.
PERFORM bdc_field USING atg_prctr atg_acgl-prctr.
WHEN OTHERS.
PERFORM bdc_field USING 'BDC_OKCODE' 'P+'.
PERFORM bdc_field USING 'BDC_OKCODE' '0006'.
PERFORM bdc_dynpro USING 'SAPMF05A' '1100'.
PERFORM bdc_field USING 'BDC_OKCODE' '/00'.
PERFORM bdc_field USING atg_hkont atg_acgl-hkont.
PERFORM bdc_field USING atg_wrbtr atg_acgl-wrbtr.
PERFORM bdc_field USING atg_mwskz atg_acgl-mwskz.
PERFORM bdc_field USING atg_prctr atg_acgl-prctr.
ENDCASE.
After processed the 4 item from 5th item onwards i got a error message saying Screen 1100 does not exists in program
SAPMF05A'.
Please give me a solution.
Regards
Pratap.M
‎2008 Jan 22 5:00 AM
‎2008 Jan 22 8:47 AM
Hi
I think in u r program P+ is not happening properly.
Check that.
regards
raghu
‎2008 Jan 22 10:04 AM
Hi,
You should not need to use this case:
WHEN OTHERS.
* PERFORM bdc_field USING 'BDC_OKCODE' 'P'.+
PERFORM bdc_field USING 'BDC_OKCODE' '0006'.
PERFORM bdc_dynpro USING 'SAPMF05A' '1100'.
PERFORM bdc_field USING 'BDC_OKCODE' '/00'.
PERFORM bdc_field USING atg_hkont atg_acgl-hkont.
PERFORM bdc_field USING atg_wrbtr atg_acgl-wrbtr.
PERFORM bdc_field USING atg_mwskz atg_acgl-mwskz.
PERFORM bdc_field USING atg_prctr atg_acgl-prctr.
I suggest: remove above codes and after code line
CLEAR: atg_hkont,
atg_wrbtr,
atg_mwskz,
atg_prctr.
*clear atg_wrbtr_convert.
**insert new lines code**
if p_lv_count gt 4.
move 4 to p_lv_count.
endif.
Regards,
Gy
‎2008 Jan 22 10:21 AM
Hy Gyrol,
This is also not working. If u have any suggestions please give me.
Regards
Pratap.M
‎2008 Jan 22 10:54 AM
Hi,
I've created a bdc program with FB01 Tcode, it's working great with over 4 items.
sample code for fill item 3 -> 5: the order of item 5 still has value 4. Please see code below:
perform bdc_dynpro using 'SAPMF05A' '1100'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'RF05A-BUSCS'
'R'.
perform bdc_field using 'INVFO-ACCNT'
'1444'.
perform bdc_field using 'INVFO-WRBTR'
'100,00'.
perform bdc_field using 'BDC_CURSOR'
'ACGL_ITEM-WRBTR(03)'.
perform bdc_field using 'ACGL_ITEM-HKONT(03)'
'176220'.
perform bdc_field using 'ACGL_ITEM-WRBTR(03)'
' 11'.
perform bdc_dynpro using 'SAPMF05A' '1100'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'RF05A-BUSCS'
'R'.
perform bdc_field using 'INVFO-ACCNT'
'1444'.
perform bdc_field using 'INVFO-WRBTR'
'100,00'.
perform bdc_field using 'BDC_CURSOR'
'ACGL_ITEM-WRBTR(04)'.
perform bdc_field using 'ACGL_ITEM-HKONT(04)'
'176220'.
perform bdc_field using 'ACGL_ITEM-WRBTR(04)'
' 111'.
perform bdc_dynpro using 'SAPMF05A' '1100'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'RF05A-BUSCS'
'R'.
perform bdc_field using 'INVFO-ACCNT'
'1444'.
perform bdc_field using 'INVFO-WRBTR'
'100,00'.
perform bdc_field using 'BDC_CURSOR'
'ACGL_ITEM-WRBTR(04)'.
perform bdc_field using 'ACGL_ITEM-HKONT(04)'
'176220'.
perform bdc_field using 'ACGL_ITEM-WRBTR(04)'
' 011'.
Regards,
Gy
‎2008 Jan 23 5:49 AM
Hi Gary,
U r code and my logic works if screen consists of intital no.of line items.(For Example in my system, the screen visibility 4 line items my code works fine for 4 line items it u screen intially having visibility 10 line items my code code works for 10 line items).
The problem the screen not getting added the blank row after completing the intial visibility . I also use the OK-CODE of
Additems button in FB60. I don't know i need to put exactly the ok-codes like add items button or ok-code p+--etc.
Thank u for response . Please give me a solution.
Regards
Pratap.M