‎2006 Nov 05 5:59 AM
Hi friends
plz let me know that
1.Can we call a bdc from a report program? how?
2.If we sheduled 3 sessions in background
first has executed successfully
second has some error in execution
then what hapens to the process execution
wather the third procee will run or the process will be stoped over ther itself?
Thanks,
Siddhardha
‎2006 Nov 05 6:00 AM
Hi
BDC are used for follwoing scenarios mostly:
1. Mass Upload of Data
2. allowed to do some activity repeatedly for large amout of data where User Interaction becomes Hectic.
Major use would be for DATA TRANSFER!!!!!
It allows us to automate some transaction for which we have data.
Following documents would give u some brief idea on Batch Data communication :
http://help.sap.com/saphelp_erp2005/helpdata/en/fa/097119543b11d1898e0000e8322d00/frameset.htm
http://www.sapgenie.com/abap/bdc.htm
If u want to call a transaction and goto a particular screen as soon as u call the transaction, u can record the flow in BDC.
That is u have to goto SHDB transaction for recording and then specify the transaction code then pass the values and once u reach the screen, press save button and press back.
Code will get automatically generated.
Then u can copy and paste the part of the code that is needed.
A sample code for calling MM03 transaction from an ALV.
When u click on the MATNR of the ALV grid this will call transaction. U can perform this
Declare a messtab
DATA: i_bdcdata TYPE STANDARD TABLE OF bdcdata,
Internal table to hold BDC messages
i_messtab TYPE STANDARD TABLE OF bdcmsgcoll
Work area to hold bdcdata value
DATA: w_bdcdata TYPE bdcdata,
Work area to hold BDC messages
w_messtab TYPE bdcmsgcoll.
CONSTANTS : c_e type bdcmsgcoll-msgtyp value 'E', "E
c_a type bdcmsgcoll-msgtyp value 'A', "A
nodata type c value '/'. "/
perform f1000_bdc_mm03 using lv_matnr lv_werks.
FORM f1000_bdc_mm03 USING P_LV_MATNR
P_LV_WERKS.
perform bdc_dynpro using 'SAPLMGMM' '0060'.
perform bdc_field using 'BDC_CURSOR'
'RMMG1-MATNR'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'RMMG1-MATNR'
p_lv_matnr.
perform bdc_dynpro using 'SAPLMGMM' '0070'.
perform bdc_field using 'BDC_CURSOR'
'MSICHTAUSW-DYTXT(15)'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_field using 'MSICHTAUSW-KZSEL(15)'
'X'.
perform bdc_dynpro using 'SAPLMGMM' '0080'.
perform bdc_field using 'BDC_CURSOR'
'RMMG1-WERKS'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_field using 'RMMG1-WERKS'
p_lv_werks.
perform bdc_dynpro using 'SAPLMGMM' '4000'.
perform bdc_field using 'BDC_OKCODE'
'=ZU01'.
perform bdc_field using 'BDC_CURSOR'
'RMMG1-MATNR'.
perform bdc_dynpro using 'SAPLMGMM' '4300'.
perform bdc_field using 'BDC_OKCODE'
'=ZU08'.
perform bdc_field using 'BDC_CURSOR'
'RMMG1-MATNR'.
perform bdc_dynpro using 'SAPLMGMM' '4110'.
perform bdc_field using 'BDC_OKCODE'
'=GESV'.
*perform bdc_field using 'BDC_CURSOR'
'RMMG1-MATNR'.
call transaction 'MM03' using i_bdcdata MODE 'N'MESSAGES INTO i_messtab.
Hope this helps u.
anver
pls mark points if helped
‎2006 Nov 05 7:03 AM
Hi
1.<b>Can we call a bdc from a report program? how?</b>
--> I guess you are referring to a session that is created and exists in SM35. The answer is YES we can execute a session through a program. We have to SUBMIT program RSBDCSUB with the session name for the same.
2.If we sheduled 3 sessions in background
first has executed successfully
second has some error in execution
then what hapens to the process execution
<b>wather the third procee will run or the process will be stoped over ther itself</b>?
If the 3 sessions are independent, then the 3rd can continue to process. Also depending on the requirement we can restrict execting the 3rd by explicit handling.
Hope the above info gives you some idea.
Kind Regards
Eswar
‎2006 Nov 05 7:12 PM
If you want to control the third session based on the results of the earlier sessions, instead of using the session method, you can use CALL TRANSACTION MESSAGES INTO messtab. You examine the results of messtab to determine whether or not you should continue with the next transaction.
Rob