You are on page 1of 9

SHDB Record a transaction

Note:
To use SHDB and LSMW transactions it is better the SAP screen to be in format Default size.

To set in this format use from menu:

In this situation the recording will have exactly the same number of lines like in screen.

Page: 1 of 9

File: 130467193.doc

SHDB Record a transaction

SHDB - Record a transaction


This transaction allows a user to record keystrokes and other keyboard actions so that they may be incorporated into a BDC session. While any session may be recorded, it does not mean that the recording can be used to create a session. Within a recording individual screens may not be allowed. Customized screens may present a problem. Only use the non-customized screens to record sessions. In this example, the transaction MM is recorded. Enter transaction SHDB, also called The Transaction Recorder: Recording Overview. Click on the "New Recording button"

To start a new recording, enter a recording name (up to 10 letters) in the field labeled "Recording," and the Transaction Code MM01. Click either the "Start Recording" button or the green check mark at the bottom of the screen.

Page: 2 of 9

File: 130467193.doc

SHDB Record a transaction


Recording the session: Once the Start Recording button is pressed, the system displays the screens for the transaction code requested. Enter each field needed for the transaction, and proceed to the following screen. A "recording running" message may appear between screens. During a recorded session screen interaction time is extended. Completing the transaction End the transaction normally. When completed, the Transaction Recorder: Edit Recording screen is shown, Click the Save icon, which saves the recording. Green arrow back to the starting point (Transaction Recorder).

Page: 3 of 9

File: 130467193.doc

SHDB Record a transaction

SHDB: Recording a transaction


The BTCI recorder is the power tool for the developer of inbound processing IDocs. It is not only creating
ABAP code for you, which can be replayed at ease. It is most helpful, because, you always can ask an application consultant or key user, to record a working example for you.

Hiatus

Screen

First screen of MB1C

Hiatus

Screen

First screen of MB1C

Page: 4 of 9

File: 130467193.doc

SHDB Record a transaction

Hiatus

Screen

Detail Screen

Page: 5 of 9

File: 130467193.doc

SHDB Record a transaction

Hiatus

Screen

Screen

Page: 6 of 9

File: 130467193.doc

SHDB Record a transaction

Record a session with You will be asked for a session name and the the name of the transaction to transaction SHDB record.The you can enter the data into the transaction as usual.

Activating the recording session First screen of MB1C Detail Screen End the recording

First screen of MB1C

Detail Screen There is something to say on detail screen processing, ie. screens with table Processing: There are controls.If you enter many lines or try to extend a list, where you do not know mostly menu functions before, how many lines the list contains, you will not know, where to place the that allow exact item cursor. Therefore most transactions provide a menu option, that positions the list positioning in a calculable manner. If you choose a new item, most transaction will either pop up a detail screen or will position the list, so that the next free line is always line 2. From the recorded The SHDB transaction creates an ABAP from the recording. When you run this session, you can ABAP, it will generate a BTCI group file, with exactly the same data as in the generate an ABAP recording. Replace the include with modified FORM routines to allow CALL TRANSACTION It will use a set of predefined FORM routines, which are stored in an include file. If we modified this FORM routines a little bit, we can make the ABAP run with a CALL TRANSACTION, which is much more suitable for our development and testing purposes. If you replace the standard include BDCRECXX with this one zz_bdcrecxx.txt , you can replay the recording online. Try it out, to check if the recording worked the way you expected it. It is often a good idea to deactivate the
Page: 7 of 9 File: 130467193.doc

SHDB Record a transaction


recorded SAVE button OK-CODE, so you may test without saving your tests. You know, many examples work only once with the same example, eg. a goods delivery or a shipment. Put the coding into a To make the recorded code usable for other program, you should make a function function module module out of it. For that purpose you would create a function group, eg. YBTCI, which will take all the recorded BTCI functions. Include zz_bdcrecxx.txt in the global data of YBTCI, so that all function will have access to the FORM routines in there. In addition, you would replace all the recorded constant values with variables, to make the function flexible. With a little trick We have written a little bootstrap program, that actually allows to create the program, you can function module more or less automatically. It is not meant as an automation generate the function routine, but a tool that generates code, which can then be refined manually as module needed. You simply need to replace the include BDCRECXX line in the generated ABAP with include zzbdcrecxx_fb_gen and run the program. It will ask for the function group and function name and create the function module. Try it out :-) Test the function The function module should work without modification for testing at least. module with the test However, you probably will need to modify it, eg. by adding a loop for procesing tool and add eventual multiple entries in a detail screen. loops for detail processing.

Page: 8 of 9

File: 130467193.doc

SHDB Record a transaction

Generate program from SHDB recording made in another client


http://www.sapdev.co.uk/tips/tips_shdb.htm Creating a program from a recording is sometimes difficult as data is in one client and ability to create the program is in another. The simple solution to this is to create the recording in the data rich client (i.e. QAS), then export this recording to a file and import it into the DEV client. Your program can then be created from the recording made in QAS.

Steps: 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19.

Execute transaction SHDB in QAS(where data is) Make recording and save, return to SHDB front screen Press 'Overview', then select the created recording(double click) Go into change mode(press Change-Display icon) Now go into editing mode(press editing icon or F6) Select Export from the Recording menu Enter file name and path to store temporary file Press the Transfer button Breathe... Execute transaction SHDB in DEV client Make new recording and save it, but dont worry about what it does as data will be over written (just create one for SE38 or something). Return to SHDB front screen Press 'Overview', then select the created recording(double click) Go into change mode(press Change-Display icon) Now go into editing mode(press editing icon or F6) Select Import from the Recording menu Enter file name and path of temporary file created before Press the Transfer button Hit save and you can now use this recording to generate your program as usual (SHDB->Overview-> Program).

Page: 9 of 9

File: 130467193.doc