‎2007 Jul 30 1:38 PM
Hi all,
With just your words please write me about shdb and sm35 and how can I get the code of the recording?
Should I not hit enter key while processing the transaction?
What is the right way?
Thanks.
deniz.
‎2007 Jul 30 1:42 PM
hi,
BDC:
Batch Data Communication (BDC) is the process of transferring data from one SAP System to another SAP system or from a non-SAP system to SAP System.
Features :
BDC is an automatic procedure.
This method is used to transfer large amount of data that is available in electronic medium.
BDC can be used primarily when installing the SAP system and when transferring data from a legacy system (external system).
BDC uses normal transaction codes to transfer data.
Types of BDC :
CLASSICAL BATCH INPUT (Session Method)
CALL TRANSACTION
BATCH INPUT METHOD:
This method is also called as CLASSICAL METHOD.
Features:
Asynchronous processing.
Synchronous Processing in database update.
Transfer data for more than one transaction.
Batch input processing log will be generated.
During processing, no transaction is started until the previous transaction has been written to the database.
CALL TRANSACTION METHOD :
This is another method to transfer data from the legacy system.
Features:
Synchronous processing. The system performs a database commit immediately before and after the CALL TRANSACTION USING statement.
Updating the database can be either synchronous or asynchronous. The program specifies the update type.
Transfer data for a single transaction.
Transfers data for a sequence of dialog screens.
No batch input processing log is generated.
For BDC:
http://myweb.dal.ca/hchinni/sap/bdc_home.htm
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/bdc&;
http://www.sap-img.com/abap/learning-bdc-programming.htm
http://www.sapdevelopment.co.uk/bdc/bdchome.htm
http://www.sap-img.com/abap/difference-between-batch-input-and-call-transaction-in-bdc.htm
http://help.sap.com/saphelp_47x200/helpdata/en/69/c250684ba111d189750000e8322d00/frameset.htm
http://www.sapbrain.com/TUTORIALS/TECHNICAL/BDC_tutorial.html
SHDB is the transaction recorder.It records all the user actions.If u press ENTER it is also recorded.
Once the recording is done it will generate a program for u.U can copy it to the Editor.
SM35 is for the sessions.If u want to execute a session or release a session u need to go to the transaction and do it.
With session method a session will be generated that needs to be processed in Transacton SM35 with Foreground, Background, or Errors only mode. You can view and analyze session log after processing the session.
With call transaction you would specify the mode in the program itself. Hence, no session is generated in SM35 in this case.
please visit the following link for more information:
http://help.sap.com/saphelp_erp2005/helpdata/en/fa/097119543b11d1898e0000e8322d00/frameset.htm
BDC is a sort of recording which is created say for examplr entering the sales order in system through a program,so you create a BDC for it.And whatever input fields to be enetred will be recorded and later on loaded with help of file upload.
null
Message was edited by:
Roja Velagapudi
‎2007 Jul 30 1:43 PM
Hi,
recording is a technique to create a bdc program
see this link
http://goldenink.com/abap/shdb.html
after recording select ur recording name and press the create program button.one pop up will come.give the program name u want to create.all code will appear there.
rgds,
bharat.
‎2007 Jul 30 1:45 PM
Hi,
SHDB is the transaction wher u do a recording & capture the screen flow.
You can also see the recording codes in the same SHDB by double clicking the recording u've done.
SM35 - this transaction has the list of sessions created.
it wil have all the session either it is processed or new, you can also schedule a session for processing here.
after running a session program frm se38, we come to sm35 to process the session here.
This is simple & clear
<b>Reward Points If useful*</b>
‎2007 Jul 30 1:46 PM
BDC PROGRAM STRUCTURE
There are 5 parts in a BDC program .Each part is executed one after another.
1) Selection screen is used with a parameter to input the text file of TYPE RLGRAP-FILENAME . Various function modules like KD_GET_FILENAME_ON_F4 can be used to read the file name at runtime or the filename can be defaulted by using DEAULT clause in the parameter statement.
2) Open the text file for input.If file fails to open (SY-SUBRC NE 0) then stop the program with a error message. OPEN DATASET filename FOR INPUT IN TEXT MODE is used to open the file.
3)Loop through the dataset using a loop statement like DO .. ENDDO with an EXIT statemenyt if no next record exists.and filling the work structure which will hold the data for a single transaction in each loop pass. Filling the BDC TABLE of TYPE BDCDATA in the loop for every record(equivalent to transaction) in the data set. Submit the internal table containing bdc data for each and every transaction (internal table of TYPE BDCDATA is submitted for each transaction until all the records in the dataset are read) using CALL TRANSACTION 'tr' USING I_bdcdata MODE 'N' UDATE 'S' .
DO
READ DATASET file INTO W_bdcdata
IF SY-SUBRC NE 0.
EXIT.
ENDIF.
PERFORM Fill_BDCDATA
PERFORM Submit_BDCDATA
ENDDO
4) Error handling when submission via CALL TRANSACTION fails ,either by using the internal table to be filled by the system messages which is of TYPE BDCMSGCOLS and can be specified in CALL TRANSACTION statement with the addition MESSAGES INTO . Or error handling by sending the mail to a predefined recipient. Or for each and every transaction that fails create asingle BDC SESSION by using BDC_OPEN_GROUP function moduleand submitting the intenal bdc data table to it. For each and every error a report should display themall at the end of the program so that the transacton in error can be identified.
The approach of opening a BDC SESSION is often used with an error report when an error occurs as all the transaction in error can be seen and executed in the session manager .
5)Clean up actions. Here clean up actions are performed like closing the dataset with CLOSE DATASET command ,closing any errorsession if they were created using CLOSE_GROUP function module.and displaying the report .
To fill the bdc data table we should have all the information associated with the screens used in the transaction and all the fields in those screens that will be filled by the CALL TRANSACTION statement.We can use BDC SESSION RECORDER or Transaction Recorder(Transaction SHDB) to get the information on the screens and the fields. Thedata which is required to fill the internal table of TYPE BDCDATA is
Program Name
Screen Number
Screen Begin
Field Name
Field Value
Information on Field Name and Field Type can be used to create the structure that will be used to read records from the data set .
While filling the Field value in BDCDATA table care should be taken for special fields like 'BDC_CURSOR',' BDC_OKCODE'
Structure of BDCDATA table
PROGRAM Name of program
DYNPRO Number of screen
DYNBEGIN If New screen begins value ='X'
FNAM Field Name
FVAL Field Value
Structure of BDCMSGCOLL
MSGID Message ID
MSGTYP MessageType
MSGNR Message Number
MSGV1 1st placeholder
MSGV2 2nd Place Holder
MSGV3 3rd Placce Holder
MSGV4 4th Place Holder
To see all the messages stored by the system in the BDCMSGCOLS table we can use LOOP AT .ENDLOOP command.
Code to read internal table of type BDCMSGCOLS.
TABLE T100 HAS FOLLOWING FIEL
DSSPRSL TYPE SPRAS (Language)
ARBGB TYPE ARBGP (BUSINESS AREA)
MSGNR Message number (3C)
TEXT Message Text (Type 73C)
LOOP AT MESSTAB. "Int Table of TYPE BDCMSGCOLS
SELECT SINGLE * FROM T100
WHERE SPRSL = MESSTAB-MSGSPRA
AND ARBGB = MESSTAB-MSGID
AND MSGNR = MESSTAB-MSGNR.
IF SY-SUBRC = 0.
L_MSTRING = T100-TEXT.
IF L_MSTRING CS '&1'.
REPLACE '&1' WITH MESSTAB-MSGV1 INTO L_MSTRING.
REPLACE '&2' WITH MESSTAB-MSGV2 INTO L_MSTRING.
REPLACE '&3' WITH MESSTAB-MSGV3 INTO L_MSTRING.
REPLACE '&4' WITH MESSTAB-MSGV4 INTO L_MSTRING.
ELSE.
REPLACE '&' WITH MESSTAB-MSGV1 INTO L_MSTRING.
REPLACE '&' WITH MESSTAB-MSGV2 INTO L_MSTRING.
REPLACE '&' WITH MESSTAB-MSGV3 INTO L_MSTRING.
REPLACE '&' WITH MESSTAB-MSGV4 INTO L_MSTRING.
ENDIF.
CONDENSE L_MSTRING.
WRITE: / MESSTAB-MSGTYP, L_MSTRING(250).
ELSE. WRITE: / MESSTAB.
ENDIF.
ENDLOOP.
SKIP.
ENDIF.
for SHDB...check...
‎2007 Jul 30 1:59 PM
HI
First go to SHDB (is for recording any transaction codes like vao1,mm01...) click
on 'new recording' give the details of RECORDING NAME(any thing), TRANSACTION CODE ( for which tr code your are useing EX- MM01), UPDATE MODE(synchronous or asynchronous) , and click on ' START RECRODING'.
FOR TR CODE MM01-
give material name,industry sector,material type AND CLICK ENTER
then give material description,unit of measurse AND CLICK SAVE(if u want to end the recording click on save).
again click on save, and click on BACK button and select your recording and click on PROGRAMS pushbutton. and give PROGRAM NAME( any thing)
and click ' TRANSFER FROM RECORDING' and click enter. it wil take u to se38 program.
there the recording will be printed automatically.
SM35 is for processing your session .when u write a BDC SESSION PROGRAM and after excuting it ,it will create a SESSION .that session u will processs it in SM35.