‎2008 Jul 07 2:18 AM
Hi Experts,
I am trying to post data by using transaction FB01. Probelm is , its not posting the data. its not even throughing any error.
i wrote the program exactly the same of the exiting program in our system which is working. But in my new program BDC is not working. Can any one please help me in this why its not posting. if you needed any further information please inform me. It is very urgent for me
Thanks
Ravi
‎2008 Jul 07 2:31 AM
Hi Ravi,
Are u posting the data using call transaction or session method.
If Call transaciton, have u debugged and checked in mode A , you can get all screens to check where its going wrong.
What is sy-subrc value after Call Transaction.
for testing purpose, you can create a session and see the error log in SM35.
If Session method, then you can go to SM35 and process that session and see the log for details.
Please let me know if u require any other inputs.
Regards,
Naveen Veshala
‎2008 Jul 07 4:12 AM
Hi Naveen,
Nice to see your message. I am using the custom bdc report program. In which I am recording all the records from the internal table bdc_data and moving into the function module BDC_INSERT WITH TRANSACTION FB01 AS INPUT and bdc_data as a table input.
after executing function module sy-subrc is giving 0 with out any exception.
I am writing the code below,
if you need any more information please let me know.
I am loading the bdc_data table with my internal table data t_data here.
LOOP AT t_data.
*
ADD 1 TO w_recnt.
*
IF w_recnt = 1.
*
PERFORM generate_email USING '' '' '3A'.
PERFORM generate_email USING text-m84 '' '3B'.
PERFORM generate_email USING sy-uline+0(21) '' '3C'.
*
PERFORM dynpro USING:
'X' 'SAPMF05A' '100',
' ' 'BKPF-BLDAT' w_bldat, " Doc date
' ' 'BKPF-BLART' p_blart, " Doc type
' ' 'BKPF-BUKRS' p_bukrs, " Company Code
' ' 'BKPF-BUDAT' w_bldat, " Posting Date
' ' 'BKPF-WAERS' p_waers, " Currency
' ' 'BKPF-BKTXT' p_bktxt. " Header Text
Posting Key Debit = 50 - Credit = 40
IF t_data-dmbtr <> 0.
ADD t_data-dmbtr TO w_dmbtr.
IF t_data-dmbtr > 0.
PERFORM dynpro USING: ' ' 'RF05A-NEWBS' '50'.
ELSE.
PERFORM dynpro USING: ' ' 'RF05A-NEWBS' '40'.
ENDIF.
ELSE.
ADD t_data-wrbtr TO w_dmbtr.
IF t_data-wrbtr > 0.
PERFORM dynpro USING: ' ' 'RF05A-NEWBS' '50'.
ELSE.
PERFORM dynpro USING: ' ' 'RF05A-NEWBS' '40'.
ENDIF.
ENDIF.
G/L Account to post to
PERFORM dynpro USING: ' ' 'RF05A-NEWKO' t_data-saknr.
PERFORM dynpro USING: ' ' 'BDC_OKCODE' '/00'.
*---- Assign current values for following loop
r_data = t_data.
*
ELSE.
CLEAR w_pamnt.
IF r_data-dmbtr <> 0.
WRITE r_data-dmbtr TO w_pamnt NO-SIGN NO-GROUPING.
ELSE.
WRITE r_data-wrbtr TO w_pamnt NO-SIGN NO-GROUPING.
ENDIF.
PERFORM dynpro USING: 'X' 'SAPMF05A' '300',
' ' 'BSEG-WRBTR' w_pamnt.
Contra Posting Key Debit = 40 - Credit =50
IF t_data-dmbtr <> 0.
ADD t_data-dmbtr TO w_dmbtr.
IF t_data-dmbtr > 0.
PERFORM dynpro USING: ' ' 'RF05A-NEWBS' '50'.
ELSE.
PERFORM dynpro USING: ' ' 'RF05A-NEWBS' '40'.
ENDIF.
ELSE.
ADD t_data-wrbtr TO w_dmbtr.
IF t_data-wrbtr > 0.
PERFORM dynpro USING: ' ' 'RF05A-NEWBS' '50'.
ELSE.
PERFORM dynpro USING: ' ' 'RF05A-NEWBS' '40'.
ENDIF.
ENDIF.
PERFORM dynpro USING: ' ' 'RF05A-NEWKO' t_data-saknr.
PERFORM dynpro USING: ' ' 'BDC_OKCODE' '/00'.
Cost Object Posting
CASE r_data-objtp.
WHEN 'CST'.
PERFORM dynpro USING: 'X' 'SAPLKACB' '0002',
' ' 'COBL-KOSTL' r_data-kostl.
WHEN 'FND'.
PERFORM dynpro USING: 'X' 'SAPLKACB' '0002',
' ' 'COBL-GEBER' r_data-kostl.
WHEN 'WBS'.
PERFORM dynpro USING: 'X' 'SAPLKACB' '0002',
' ' 'COBL-PS_POSID' r_data-projk.
ENDCASE.
*
PERFORM dynpro USING: ' ' 'BDC_OKCODE' '=ENTE'.
*
CLEAR r_data.
r_data = t_data.
*
ENDIF.
*
ENDLOOP.
Thanks
Ravi
‎2008 Jul 07 5:12 AM
Hi Ravi,
You can search for Call Transaction statement in your program ( Similar to the statement which i mentioned below ) and change the mode to 'A' and execute . Then you can see the BDC posting online. Then see how the flow is going.
CALL transaction 'FB01' using BDCDATA
mode 'A'
update 'A'.
In FB01 posing, your BDC may fail in so many cases, might be for application error, data error or screen squence error.
So if you see that posting online then only you can able to judge something.
Regards,
Naveen veshala
‎2008 Jul 07 2:59 PM
Hi Naveen,
Thanks a lot. Your information is extremely useful. If I face any further concerns I will let you know.Thanks a lot.
Thanks
Ravi
‎2010 Feb 17 5:39 PM