0 pts.
 ABAP doubts
Dear sir/madam, Could you please take some of your valuable time for answering some of my doubts: 1. How to process a BDC program without going to transaction code SM35? 2. Is it possible to debug a BDC program directly? If so, how? 3.What is the use of Initialization event? Apart from initializing values in select-options, can you say one more? 4. Suppose you enhanced one IDOC. You added some fields to that IDOC. How to enter the values to these fields in IDOC? Regards, Sangram

Software/Hardware used:
ASKED: December 21, 2005  11:26 PM
UPDATED: December 22, 2005  5:25 PM

Answer Wiki:
1) SM35 is the primary transaction for processing BDC sessions. You can also release a session for execution via program RSBDCSUB. If you want to control screen processing without going through SM35, you can leave out the BDC_OPEN, BDC_INSERT and BDC_CLOSE commands from your program. Instead, after building your BDCDATA table, use the CALL TRANSACTION command to process the data immediately. You'll have to perform your own error handling. 2) In SM35 you can run the BDC session in foreground which allows you to step through the individual screens. See the Help documentation under "Correcting a Session" for tips and commands that help control execution. If you want to debug a transaction in detail, I suggest doing so directly in the transaction as opposed to via the BDC. 3) While the Initialization Event is most useful for setting select-option values, it can be used for any preliminary processing prior to the selection screen. I've used it to set other screen or field attributes (frame title, screen-active, screen-intensity, ...), modify select-options via the SELECT_OPTIONS_RESTRICT function module, access a Unix directory to find the most current version of a file, read a control table to get parameters that control program processing, set date ranges, etc. 4) Sorry, I have not used IDocs.
Last Wiki Answer Submitted:  December 22, 2005  9:38 am  by  DKForrer   0 pts.
All Answer Wiki Contributors:  DKForrer   0 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

for a little more information on the call transaction you may see the code below. I usually use the mode as a varaible to help with debugging. You can either put this as a parameter or set it in the program where you can change the value in debug. The values for mode are: ‘A’ – show all screems and the user must hit enter after each screen, ‘E’ only show screen on an error, and ‘N’ – show no screens which should be used if you are running in background. Also note that sy-msgv1 may contain a return message. I hope that this helps.

************** run the FB10 transaction ****************************
CALL TRANSACTION ‘FB10′
USING bdc_table
MODE s_mode
UPDATE ‘S’ ” Wait for the transaction to finish
MESSAGES INTO message_tab.
IF sy-subrc NE 0. ” if error occured in processing
MOVE sy-msgv1(10) TO matr_doc-mat_doc.

Kevin

 0 pts.