2014 May 19 4:12 AM
Hello Techies,
Has anyone faced problem of Coding Block while executing BDC? I have already tried many solutions like checking "not a batch input session", "simulate in background" while recording the data, so if you have solutions apart from these and BAPI,will be appreciated. Please help! Thanks in advance!
Additional Information-
It's BDC program for Transaction code F-63 and in coding block it is asking value for Business Area.
In coding block that field is COBL-GSBER.
2014 May 19 5:55 AM
Hi Harshal ,
I have also faced the same problem for BDC on F-02 . What i did is, i debugged the standard and found the code where system dynamically determines the screen no based on Posting key and Account Type . I used same logic for determining screen no using FM and tables used by standard prog, and passed it to the BDC it table .
Check the below code and use the FM and tables for ur solution,
FORM screen_determination .
DATA : wa_t019 TYPE t019 ,
wa_skb1 TYPE skb1.
DATA : wa_saknr TYPE skb1-saknr .
CLEAR : wa_skb1 , wa_t019 , wa_saknr .
wa_newbs = gfl_tabdata-newbs .
wa_umskz = gfl_tabdata-newum .
CALL FUNCTION 'FI_POSTING_KEY_DATA'
EXPORTING
i_bschl = wa_newbs
i_langu = sy-langu
i_umskz = wa_umskz
x_bschl_only = ' '
IMPORTING
e_koart = wa_koart
e_ltext = wa_ltext
e_shkzg = wa_shkzg
e_t074u = wa_t074u
e_tbsl = wa_tbsl
e_tbslt = wa_tbslt
e_umsks = wa_umsks
e_umskz = wa_umskz.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = gfl_tabdata-newko
IMPORTING
output = wa_saknr.
SELECT SINGLE * FROM skb1 INTO wa_skb1 WHERE bukrs = gfl_tabdata-bukrs
AND saknr = wa_saknr.
IF wa_koart = 'S' AND wa_skb1-mwskz CA '<>' .
wa_umsks = 'S' .
ENDIF .
SELECT SINGLE * FROM t019 INTO wa_t019 WHERE dyncl = 'B'
AND umskz = wa_umsks
AND koart = wa_koart .
wa_screen = wa_t019-dynnr .
ENDFORM. " SCREEN_DETERMINATION
Regards
DJ