Anda di halaman 1dari 30

INDEX

LSMW testing and Debugging What are the commands available for controlling the flow of a BI session? What is the Expert mode? What is the Detailed/Extended Log? What is the "Details" checkbox when you display a log?

Starting Sessions Explicitly: Run Modes

Correcting a Session some BAPIs (or IDocs) that you can use to update data instead of using BDC, and the corresponding transactions and tables

Get log of batch input session (Code) Data Dictionary Questions. SAP Data Dictionary Tables. Analyzing Source Code For Batch input to make change in tcode on current created batch session.

BY : Jaspreet Singh Kalsi

LSMW testing and Debugging Once you input the Project, Subproject and Object on the initial screen and execute it. Here you are guided through the individual steps of data migration. Example: Maintain Object attribute...etc. on the application tool bar, click on the personal menu push button, you will list of all the steps. Check the Display conversion program. After you maintain the field mapping, read data and convert data. you can execute the Display conversion program step. This will display the generated progrom. Here you can set the break point. Other way is while doing the field mapping, you can set hard break-point.

What are the commands available for controlling the flow of a BI session? These commands are only available in foreground mode (A or E), and they are not available in CTU. They are also accessible via the menu under System -> Services -> Batch Input. Function code /bbeg /bdel Delete current transaction from batch input from session (log can still be seen but it can never be restarted) /n Terminate current transaction, mark the transaction as incorrect, and pass to next transaction /bda Change the screen Processing from Error only mode to Process in Foreground Next transaction Meaning Corresponding menu item in System menu -> Services -> Batch Input Restart transaction Delete transaction

all display mode (Foreground processing) /bde /bend Change the display mode from All screens to Error only End current batch input session completely Display Errors Only Cancel

What is the Expert mode? The expert mode is a checkbox which is displayed on the launch popup screen of the BI sessions. When the expert mode is on, the message 00344 "No batch input data for screen & &" is emitted when you run in A or E display mode. Note: in other modes (N/P), this message is always emitted. You can also switch it during the execution via menu under System -> Services -> Batch Input. What is the Detailed/Extended Log? When you tick that checkbox when you run a BI session in A or E mode from SM35 transaction, or using LOGALL parameter of RSBDCSUB program, there is the following behavior: The I messages are not written to the log The W messages are written to the log The S messages are not written to the log, except the last one provided it's the last message sent, and it's sent after the last screen (PAI or later, but before COMMIT WORK of course as a BI session can't continue). For example, if a I message is sent after the S message, then the S message is not written. If no S message has been written to the log, SAP writes the S00355 message: "Transaction was processed successfully". Notes: This checkbox is not related to the "Details" checkbox that you can tick when you display a BI session log.

What is the "Details" checkbox when you display a log? There is a checkbox "Details", which allows to see messages 00162 (>>>>>>>>>>> & &) and 00368 (&1 &2 ) or not. Note 678979 - Batch input: allow log details to be hidden says that "With the kernel correction from note 604066, the session data is included in the log in the batch input log if a field or OK code change leads to successful processing during the visible run. In the system log display, these entries can be displayed or hidden using the checkbox "Details"". Is it possible to see what users have changed in A or E mode? This function is only available with BI sessions. Changes are automatically recorded into the log (since Note 604066 - Batch input: Logging of OK code changes). When you display it, you must tick the checkbox "Details" to display these messages (since Note 678979 - Batch input: allow log details to be hidden).

Starting Sessions Explicitly: Run Modes Use Running a batch input session executes the transactions in the session and enters data into an SAP system.

Usually, the system will run batch input sessions automatically. However, you can also start batch input sessions by hand. You may wish to do this for these and other reasons: To correct transactions that had errors To check that the transactions in a session have been generated correctly by running the first several transactions To start a session on special request (the session would not be started automatically or must be started right away).

Prerequisites Start the batch input management tool: Select System Service Batch inputSessions. Alternate: Enter transaction SM35. Both paths take you to the session overview of the batch input system. transaction SM35. Procedure To start a session, mark the session and choose Process from the tool bar. You can then choose how to run a session and with what logging and display options. You can start any session in new status that is not locked. With Process/foreground or Display errors only mode, you can also re-start transactions that have the status Incorrect. Sessions with the status Processed cannot be run again. Run Modes There are three ways to run a session:

Process/foreground: You can interactively correct transactions that contained errors and step through transactions that have not yet been executed. Display errors only: This mode is like Process/foreground except that transactions that have not yet been run and which do not contain errors are run non-interactively. If an error occurs, processing stops and the screen upon which the error occurred is displayed. Background: Use this mode to schedule a session for immediate processing in the background processing facility. You receive control of your terminal again as soon as the session has been passed to the background processing system. Note that your session is automatically released for processing in the background processing system. You need not explicitly release the session for processing. A completed session is handled in one of three ways:

The system deletes a session from the queue when it has been successfully completed. You can check on the outcome of the session by displaying the session log file. If the KEEP option was set when the session was generated, then the system leaves a session in the queue, even if it was run successfully. The status is changed to Processed. You cannot run a processed session a second time. You must manually delete it when you no longer need it.

If a transaction in the session contained an error, the incorrect transaction is aborted. All other transactions are completed. The session remains in the queue and is held in the Errors section of the list. You can correct the session in one of the interactive modes and run it to completion. A transaction contains an error if it issues a message of type E (error) or type A (abnormal termination). Other messages are ignored and do not affect the execution of a session.. A session also is held in the queue in the Errors list if the session was ended with the /bend OK code.

Correcting a Session Use This section explains how to correct errors in faulty transactions in a session. Prerequisites Start the batch input management tool: Select System Service Batch inputSessions. Alternate: Enter transaction SM35. Both paths take you to the session overview of the batch input system. transaction SM35. Procedure When a session is run in background-processing mode, the system marks transactions that contain errors as incorrect. All other transactions in the session are completed. The session itself is kept in the session queue in the Errors section of the list. A transaction contains an error if it generates an error message of type E (error) or type A (abnormal termination). Messages of other types are ignored and do not affect the execution of a session. You can correct and re-execute the incorrect transactions in an "Errors" session. There are two ways to do so: ... 1. Re-run the session in display-all or error-display mode. These modes offer the following advantages: The system skips transactions that were successfully completed. Only incorrect transactions or transactions that have not been executed are run. You can change inputs and add missing screens interactively as incorrect transactions run. The system logs all such changes. The following topic provides more information on using display-all mode or error-display mode to correct a transaction. 2. As an alternative, you can analyze the session to determine what the error was. With the analysis displays, you can check the screen that contained the error and the values that were entered in it. You can then correct the program that generated the session and regenerate the session. You must ensure that the new session does not include transactions that were successfully completed. Otherwise, the updates made by the transactions will be performed again. Using Display-All Mode When you use display-all mode to re-start a session that contains an incorrect transaction, the system skips to the first screen of the incorrect transaction. Completed transactions are not re-executed.

To correct a transaction, you can: use the ENTER key to step through the screens recorded in the session As in normal operation, pressing the ENTER key starts a dialog step. As long as you simply press ENTER, the system processes the screens and data recorded in the session. change or add values in any screen When you press ENTER, the system processes the data as altered by you. All of your changes are logged; you can review them at a later date if required. branch off from the transaction flow recorded in the session You can use any function that you wish within the transaction that is currently running. You can, for example, branch off to enter data on a screen that was omitted from the session. To resume executing the session, return to the screen that was expected by the session. It holds the data for the screen recorded in the session until you have returned to that screen. It then resumes normal execution of the session. Interrupting a Session You can interrupt the interactive execution of a session by entering the /bend OK code on any screen. /bend terminates the transaction currently being executed in the session and marks the transaction with the status Incorrect. The session is kept in the queue and is displayed in the Errors section of the list. Changes made by the interrupted transaction are rolled back as long as the transaction uses only the SAP update facility. Direct database changes made by the transaction are not rolled back. You can use /bend when testing sessions. For example, you may wish to run the first transactions of a large session in display-all mode to make sure that the session has been generated correctly. If the transactions are correct, you can then terminate the run with /bend and then submit the session for background execution. The transactions that have already been run will not be run again. Restarting a Transaction You can restart processing of a transaction by entering the /bbeg OK code on any screen. /bbeg terminates the transaction that is currently being processed and then restarts the transaction fresh, as it is recorded in the batch input session. Any changes made by the transaction are rolled back, as long as they were made only by way of the SAP update facility. Changes made directly to the database are not rolled back.

Deleting a Transaction You can delete a transaction from a session during interactive execution by entering the /bdel OK code. The transaction is removed from the session. The deleted transaction cannot be run even if you restart the session, and you cannot take back the deletion. The transaction is, however, available for analysis if the session was generated with the KEEP option set. The transaction is marked with the status Deleted in the analysis display. The deletion also is recorded in the log generated by the session.

Result Correcting and re-running faulty transactions in a batch input session lets you finish the processing of a session and complete the data transfer.

some BAPIs (or IDocs) that you can use to update data instead of using BDC, and the corresponding transactions and tables

Object Description

Batch Input program name

Dialog Transaction

IDOC message type

BAPI or similar

Tables

Characteristic class

RCCLBI01LSMW 140/0

CL01 to CL03

CLSMAS

BAPI_CLASS_GETDETAIL BAPI_CLASS_CREATE BAPI_CLASS_CHANGE BAPI_CLASS_DELETE Note 1083986 - BAPIs for classification - overview

TCLA

Classification (Characteristic class assignment to object (material, etc.)) Characteristic (and values)

RCCLBI02 LSMW 130/1

CLFMAS

BAPI_OBJCL_CREATE BAPI_OBJCL_CHANGE BAPI_OBJCL_CONCATENATEKE Y BAPI_OBJCL_SPLITKEY Note 1083986 - BAPIs for classification - overview

KSSK (assignment) AUSP (characteristic values)

RCCTBI01 LSMW 150/0

CT04

CHRMAS

BAPI_CHARACT_GETDETAIL BAPI_CHARACT_CHANGE BAPI_CHARACT_CREATE BAPI_CHARACT_DELETE Note 1083986 - BAPIs for classification - overview

CABN (characteristics )

CAWN (characteristic possible values)

Bill of material

RCSBI 010 LSMW 30/1 creati on.

CS01 (IB01 for equipment)

BOMMAT

BAPI_MATERIAL_BOM_GROUP_CREATE

RCSBI 020 LSMW 30/2

RCSBI 030 LSMW 30/3

RCSBI 040 LSMW 30/4

Equipment (note: object link and task as separate

RIIBIP00 (general PM direct input & LSMW 400/1

IE01 to IE03

EQUIPMENT_CHA NGE EQUIPMENT_CRE ATE

None. For info: EQUIPMENT_SUCCESSORS (read)

EQUI EQKT

list are handled batch input) -

Get log of batch input session Comment:

view

Below is a routine to get log of a given batch input session. You can get the ID by looking at SM35, or directly getting it in table APQI (field QID). Here is an example how to call the routine, the result is stored in an internal table DATA l_qid LIKE apqi-qid. DATA lt_bdclm TYPE TABLE OF bdclm. PERFORM get_bdc_session_log USING l_qid CHANGING lt_bdclm. Main routine: TYPES ty_t_bdclm TYPE TABLE OF bdclm. FORM get_bdc_session_log USING i_qid TYPE apqi-qid CHANGING et_bdclm TYPE ty_t_bdclm. DATA lt_apqltab TYPE TABLE OF apql. DATA ls_apqltab TYPE apql. DATA l_fbhandle TYPE rststype-fbhandle. REFRESH et_bdclm. CALL FUNCTION 'BDC_PROTOCOL_SELECT_QID' EXPORTING queue_id TABLES apqltab EXCEPTIONS invalid_data = 1 OTHERS = 2. = lt_apqltab = i_qid

* A QID log may contain several TemSe IDs for technical reasons, * just merge them LOOP AT lt_apqltab INTO ls_apqltab. CALL FUNCTION 'RSTS_OPEN_RLC' EXPORTING authority = 'BATCH' name = ls_apqltab-temseid

IMPORTING fbhandle = l_fbhandle EXCEPTIONS OTHERS = 10.

* RSTS_READ appends entries to DATATAB parameter (not emptied) CALL FUNCTION 'RSTS_READ' EXPORTING fbhandle = l_fbhandle TABLES datatab = et_bdclm EXCEPTIONS OTHERS = 5.

CALL FUNCTION 'RSTS_CLOSE' EXPORTING fbhandle = l_fbhandle EXCEPTIONS OTHERS ENDLOOP. = 4.

ENDFORM.

Data dictionary questions


Q. Whats the full form of ECC? Ans: Enterprice Central Component. Q. Whats the full form of IDES? Ans: Internet Demonstration and Evaluation System. Q. Whats ABAP dictionary and its role in SAP? Ans: ABAP dictionary is the central information base for the developers. This manages all definitions(metadata) required for different applications in SAP. ABAP dictionary is completely integrated into ABAP development workbench. All other component of ABAP development workbench can access the data definitions(meta data) stored in the data dictionary. Role: ABAP data dictionary supports

definition of user-defined types (data elements, structures, table types). structure of database objects (tables, indexes and views) can also be defined. These user-defined types/objects are then automatically created in the underlying relational database using the above data definitions. The ABAP dictionary also provides tools for editing screen fields (e.g., for assigning a field an input help i.e. F4 help). Data dictionary ensures data integrity, consistency and security.

Q. What are the main object types of ABAP dictionary? Ans: The object types of ABAP dictionary can be of following type:
Tables: Tables are defined in the ABAP Dictionary independently of the database. A table having the same structure is then created from this table definition in the underlying database. Views: are logical views on more than one table. The structure of the view is defined in the ABAP Dictionary. A view on the database can then be created from this structure. Types (elements, structures, table types): Types are created in ABAP programs. The structure of a type can be defined globally in ABAP programs. Changes to a type automatically take effect in all the programs using the type. Lock objects:are used to synchronize access to the same data by more than one user. Function modules that can be used in application programs are generated from the definition of a lock object in the ABAP Dictionary. Domains: Different fields having the same technical type can be combined in domains. Domain defines the value range of all table fields and structure components that refer to this domain. Data element: The ABAP Dictionary also contains the information displayed with the F1 and F4 help for a field in an input template. The documentation about the field is created for a data element. Input help: The list of possible input values that appears for the input help is created by a foreign key or a search help.

Q. Note on SAP tables(defining through ABAP dictionary). Ans: Tables are defined independently of the database in ABAP dictionary. The fields of the table are defined with their (Database-independent) data types and lengths. Using the table definitions stored in the ABAP dictionary, a table is automatically created in the physical database(when the table is activated). Q. What are the components of a table definition. Ans:
Table fields: For table fields, field names and data types are defined.

Foreign keys: Relationship between the table and the other tables are defined. Technical settings: Data class and size category defines that what type of table to be created and how much space required. Indexes: Secondary indexes are created for a table for faster data selection. Field name can be of maximum 16 characters in a table and must start with a letter. Key flag determines if a field should be the table key. Field type depicts the data type of the field in the ABAP dictionary. Field length denotes the number of valid places in the field. Decimal places Number of places after decimal point for float type value. Short text describes the business meaning of the field.

Again following are defined for a table fields:

Also fields from other structures can be added to the table definition as include. Q. How data Type, field Length and short Text of any field is assigned? Ans: i. Data type, field length (and if necessary decimal places) short text can be directly assigned to a field in the table definition. ii. Data element can be assigned to a field so that data type, field length (and decimal places) are automatically determined from the domain of the data element. The short description of the data element is then assigned to the field as a short text. Q. What are the assignment options to the field? Ans: i. Direct assignment of data types, field length, short text to a field. ii. Data element assignment to a field. iii. An input check(check table) for a field can be defined with a foreign key. iv. A search help can be assigned to a field. v. Reference field or reference table must be specified for a table field that holds currency or quantity type value. Q. Whats reference table and reference field? Ans: Reference table is specified for fields containing quantities(data type QUAN) or currency(Data type CURR). This reference table must contain a field with the format for the currency key (data type CUKY) or unit of measure (data type UNIT). This field is called the reference field of the output field. The reference field can also reside in the table itself.

E.g.: TAB1 contains the field PRICE which holds price values. Field UNIT contains currency key for PRICE. So,TAB1 is the reference table for field PRICE and UNIT is the reference field for field PRICE. Q. Whats table include? Ans: In addition to listing the individual fields in a table or structure, fields from another structure can be included as includes. Q. Whats named include? Ans: If an include is added to define a database table or database structure, a name can be assigned to that included (included substructure). The group of fields of that include can be addressed as a whole in ABAP application programs with a group name which is called as named include. E.g.:We can access field of a table/ structure in the ABAP application program in the following manner:
1. <TABLE / STRUCTURE NAME > - < FIELD NAME> 2. <TABLE / STRUCTURE NAME > - <GROUP NAME>-<FIELD NAME> 3. <TABLE / STRUCTURE NAME > - <GROUP NAME>

Q. Give an example of nested include. Ans: Structure S1 may include structure S2 and again S2 may include S3. Q.Whats the maximum depth of nested includes in a table? Ans: Maximum depth is 9 i.e. maximum 9 structures can be included in a table/structure. Q. Whats the number of characters limit for field name? Ans: A field name may not have more than 16 characters in a table, but in a structure maximum 30 characters are allowed for a field name. Q. What are foreign keys? Ans: Relationships between tables are defined in the ABAP dictionary by creating foreign keys. Q. Whare are the uses of foreign keys in SAP? Ans:
Using foreign keys(as main table-field is linked with check table), input value check for any input field can be done. Foreign keys can also be used to link several tables.Explaination on foreign keys: Suppose, tab1(Foreign key table or dependent table) contains the following fields: fld1(primary key), fld2, fld3, fld4, fld5 and Tab2(Referenced table) contains the following fields: fld6(primary key), fld7(primary key), fld8, fld9 and tab1-fld2 is connected to tab2-fld5, tab1-fld4 is connected to tab2fld6Therefore, fld2 and fld4 fields of the table tab1 are called as foreign key

fields to the table tab2 and tab2 is called as check table or referenced table.

Q. What are foreign key fields? Ans: One field of the foreign key table corresponds to each key field of the check table. That field of the is called as foreign key field. Uses: A foreign key permits assigning data records in the foreign key table and check table. One record of the foreign key table uniquely identifies a record of the check table (using the value entries in the foreign key fields of the foreign key table). Q. Whats check table? Ans: Check table is maintained at field level for data validation. Q. Whats check field? Ans: One of the foreign key field is marked as the check field. This depicts that the foreign key relationship is maintained for that field. When a value is entered for that check field in the table, input validation checking is done i.e. a checking is done that whether the inserted value exists in the check table or not. If doesnt exist then system rejects the entry else input validation check for that field is successful.

Q. Whats data class? Ans: Data class is that which allows the table to get automatically assigned under specific tablespace/dbspace during table creation in the SAP database i.e. dataclass determines that under which table space/dbspace the table will be stored. Q. How many types of data classes are there in SAP? Data classes are mainly of three types(for application tables): i.Choose APPL0(master data) for data that is frequently accessed but rarely updated/changed. ii.Choose APPL1(transaction data) for data that is frequently changed. iii.Choose APPL2(organizational data) for customizing data that is defined/entered during system installation and rarely changed. The other two types of data classes are:USR and USR1(for customers own development purpose). Q. Whats size category? Ans: The Size category is used to defined the space requirement for the table in the database. Q. How many types of size category are there in SAP?

Ans: There are five size categories. Size category from 0 to 4 can be choosen for the tables. A certain fixed memory size is assigned to each category in the SAP database. Q. Whats the utility of size category? Ans: During table creation, the SAP system reserves an initial space i.e. an initial extent) in the database.If in any case more space is needed, then additional memory is added according to the mentioned size category for that table. correct size category prevents the creation of a large number of small extents for a table i.e. prevents memory wastage.

Q. How many tables are there in SAP? Ans: i. Transparent tables, ii. Pool tables, iii. Cluster tables. Q. What is transparent table? Ans: The tables which create 1-to-1 correspondence between the table definition in the ABAP data dictionary and the table definition in the physical database are called as transparent tables in SAP. Q. Give examples of transparent table. Ans: VBAK, VBAP, KNA1 etc. Q. What is table pool? Ans: Table pool is a table in the SAP database in which many pool tables are assigned. Q. What are pool tables? Ans: Tables assigned to a table pool are called as pool tables. Q. What are table clusters? Ans: Table cluster is a table in the SAP database in which many cluster tables are stored. Q. What are clustered tables? Ans: Tables assigned to a Table cluster are called as clustered tables. Q. Uses of table pool or table cluster. Ans: Table pool or table cluster is used to store SAPs internal control information (screen sequences, program parameters, temporary data, continuous texts such as documentation). Q. Example of table cluster and cluster tables. Ans: i. The table cluster RFBLG holds data for five transparent tables i.e. BSEC, BSED, BSEG, BSES and BSET.

ii. Other examples of table clusters are CDCLS, CDHDR, RFBLG, DOKCLU, DOKTL . Q. What are the differences between transparent and cluster/pool tables? Ans: i. A transparent table has 1-to-1 cardinality between the table definition in the data dictionary and in the table definition of sap database whereas cluster/pool tables have many-to-1 cardinality between the table definition in the data dictionary and in the table definition of sap database. ii. Transparent tables are accessible both by Open and native SQL statements whereas table pool/cluster tables are accessible only by open SQL but never by native SQL. iii. Transparent tables can store table relevant data whereas table pool or cluster tables can store only system data/ application data based on the transparent tables. Q. What are tabs under the maintenance screen of the ABAP data dictionary screen? Ans: There are five tabs under ABAP dictionary. i.Attributes, ii.Delivery & maintenance, iii. Fields, iv. Entry help/check, v. Currency/Quantity fields. Q. What is delivery class? Ans: We need to insert an delivery class value while creating customized table in SAP through the transaction code SE11. Delivery class is that which regulates the transport of the tables data records (during SAP installations, SAP software upgrade, client copies, and data transport to other SAP system). SAP and its customers have different write types depending on the variety of delivery class. If Delivery class is A, it depicts that the application table for master and transaction data changes only rarely. Q. How many types of delivery classes are there in SAP? Ans: There are following delivery classes: i. A: Application table (master and transaction data) is maintained by the customers using application transaction. ii. C: Customer table. Data is maintained only by the customer. iii. L: Table for storing temporary data. iv. G: Customer table, new data records can be inserted but may not overwrite or delete existing ones.

v. E: System table with its own namespaces for customer entries. vi. S: System table, data changes have the status of program changes i.e. System table for programs nature. Maintained only by SAP. E.g.: Codes for SAP transactions. vii. W: System table for system operation and maintenance. Table contents are maintained by maintenance transactions. E.g.: function module table. Q. What are the differences between domain and data element? Ans: i.Domain depicts the technical attributes of a field (its data type, field length, no. of decimal places, appreance on the sreen) of a SAP database table. Whereas data element denotes the semantic attributes(short description, label names) for a field. ii.Data elements are directly attaced to the fields of SAP database tables and each data element has an underlying domain within it. Whereas domains are not directly attached to the fields and a single domain can be under many data elements. iii.Within domain value range of a field can be described. Whereas within the data element parameter id and search help for a particular field can be assigned. Q. Whats value table? Ans: Value table is maintained at domain level in SAP. During domain creation, value range of the domain is defined by specifying value table. Suppose for a particular domain, its value table holds the values A, B, Z. So whenever the domain will be used, system will allow to use these values only.

Analyzing Source Code


In addition, the functions for analyzing the source code are, for the most part, identical in the new Debugger to those in the classic Debugger. For example, in both Debuggers it is possible to navigate from the variable overview to the detailed, deep display of a data object by double-clicking the left mouse button. However, you can process an unlimited number of data objects simultaneously and their visibility depends only on the selected window and font size. There are differences, in particular, when changing field contents. For example, you have to double-click the Change function to be able to overwrite an existing value.

Analyzing Source Code


In addition, the functions for analyzing the source code are, for the most part, identical in the new Debugger to those in the classic Debugger. For example, in both Debuggers it is possible to navigate from the variable overview to the detailed, deep display of a data object by double-clicking the left mouse button. However, you can process an unlimited number of data objects simultaneously and their visibility depends only on the selected window and font size. There are differences, in particular, when changing field contents. For example, you have to double-click the Change function to be able to overwrite an existing value.

Displaying Internal Tables


You can display and change the contents of internal tables (including nested tables) at runtime in the Debugger. The Debugger also provides information about the table type, table key, and the amount of memory it requires.

Procedure
Choose Table from any display mode in the Debugger. The table display appears. Enter the name of an internal table in the Internal table field, or select a table by double-clicking its name in the source code.Activate one of the execution types to analyze the source code. Example:

Header Line
If the internal table has a header line, it is indicated by this icon. If you double-click the icon, the system opens the Structured field display. This contains the names of the components, their current values, and the technical data of the table.

Scrolling Vertically
The table lines are numbered. The first column of the header is ready for input. Here you can enter the first displayed line of the table and scroll line-by-line. You can also scroll using the scroll icons in the standard toolbar.

Scrolling Horizontally
You can use the scroll buttons to scroll through the table horizontally. If the table is too wide for all of it to be displayed, use the scroll keys, or move the column headers.

Moving Column Headers


Using the column headings you can change the order in which fields are displayed. To do so, simply overwrite the text in the header line with the names in the order in which you want them to appear. To remove a field from the display, delete its field name from the header. If you enter the name incorrectly, the system displays a sequence of question marks. If there

is not enough room to display the entire field, the system shortens the field and displays the < character to inform you.

Shifting a Column to the Left


If you double-click a column heading, the table display shifts to the left. None of the columns to the left of the selected column heading are then visible. However, you can restore them to the display by scrolling horizontally.

Displaying a Table Type


Next to the table name, the Type field contains the table type. This may be standard, hashed, or sorted.

Changing the Display Format


As with the field display, you can change the display format in the internal table display mode. The Format field usually contains the value E (for display in columns with relevant formatting). However, it can also take the value X (hexadecimal display), or C (character display).

Offset/Length Access
In the column headers, you can make offset and length specifications for character-type components.

Resizing the Table Excerpt


Click this button to increase the size of the table excerpt that is displayed. Three lines of ABAP source code are displayed, and the rest of the screen is used to display lines of the internal table. Click this button to reduce the table display to five lines. The rest of the screen is used to display the ABAP program code.

Displaying Memory Use


To find out how much memory internal tables occupy, choose Goto Display Condition Memory Usage. Choose Change Settings to display a window, in which you can choose the Internal Tables button.

Finding References
By choosing the appropriate icon next to the table name, you can list all data objects that reference the same table body. Due to the sharing introduced with Release 6.10, this can be more than one data object.

Table History
By choosing the appropriate icon next to the table name, you can list the names of all internal tables displayed in the current Debugger session and display them by doubleclicking. The display starts from the line number and the component with which the selected table was last displayed.

Changing Internal Tables


You can change the contents of internal tables in the Debugger at runtime. You can edit, create, or delete tables. You can call these functions through appropriate pushbuttons or

through the context menu. The Change, Insert, and Append functions are field-specific, and can only be used for a single field at a time.

Deleting Rows
With the left mouse button, select any field in the row to be deleted and then click the Delete pushbutton. Alternatively, you can display the context menu by pressing the right mouse button. The Delete Table Row function is then available.

Adding Rows
The Insert and Append functions allow you to add a new row to an internal table. The Append function adds a new row at the end of the table while the Insert function positions the new row in front of the selected row. A new row is added at the end of the table if you choose the Append pushbutton or select the Insert Table Row function from the context menu. Afterwards, you can enter a value into the first field of the new row and save it by pressing the Enter key. If you make no specification, the first field of the new row receives the initial value suitable for the type in question. Irrespective of the specification in the first field, all the other fields in the new row are assigned their appropriate initial values. These can be overwritten using the Change function. A new row is inserted at an arbitrary position in the internal table when you select a row in the internal table using the left mouse button and then choose the Insert pushbutton or the Insert Table Row function in the context menu. Afterwards, the new row will be inserted directly in front of the selected row. The procedure for entering field values and changing them is the same as for the Append function.

Changing Fields
Select the field to be changed using the left mouse button and then press the Change pushbutton or choose the Change Table Field function in the context menu. Afterwards, the selected field will be ready for input and can then be overwritten with another value. You can save the entered value by pressing Enter.

Displaying Field Values at Runtime


You can use the Fields display mode in the Debugger to display the contents of program fields. The display can accommodate up to eight fields. This is the default display mode in the Debugger. The following data objects are supported:
Single field

1.

Structured fields
Strings Internal tables

2.

Objects

With more complex data objects such as references or tables, the contents are not displayed directly in the default display mode. Instead, you have to double-click the field display to call up the appropriate attribute display.

Procedure
...

To display the contents of a field, enter the name of this field under field name and press <ENTER>. Alternatively, you can double-click the name of a field in the program code to show this fields contents. Example:

Displaying Further Fields


The field display can contain up to eight fields, of which only four can be displayed at a time. You can display the other fields by using the scroll buttons.

Displaying System Fields


This display mode allows you to display the contents of any system fields. The three most important system fields SY-SUBRC, SY-TABIX, and SY-DBCNT are always displayed.

Displaying Fields from External Programs


You can also display the contents of fields from external programs if you know the names of these programs and have already stepped through them. To do so, enter the program name in brackets before the field name in the field display, that is: (program name)field name, for example (SAPMSCLM)ACTION; lowercase is also possible.

Special Types of Field Display


1. As in the program source code, you can make offset and length entries for character-type fields. If, for example, you enter sy-datum+4(2) in the field display, the current month of the system date is displayed under Field contents.
If you specify an integer in angle brackets after the name of an internal table, the content of the line that corresponds to the integer is output. The entry itab[4], for example, displays the fourth line of the internal table itab. If the integer exceeds the number of current table lines, the table will be flagged as unknown.

2. With data references, the content of the referenced data object is displayed if an arrow and asterisk are appended to the name of the reference. r>* displays the content of the field that is referenced by the data reference r. 3. If you double-click a data or object reference under Field contents in the default display mode, all the attributes and field contents of the referenced data object are displayed in the next screen (data references). The attributes and

values of the current instance of all referenced classes and interfaces are output under object references. 7<cl>, for example, displays all the values of the seventh instance from class cl. 4. The headers of strings, internal tables as well as data and object references are displayed if you place an asterisk at the beginning of the name. For example, the header of the internal table itab is displayed in hexadecimal format if you enter *itab in the field display. The field contains zeros if a table does not have a header. 5. If you place an ampersand at the beginning of the name, the reference of strings, internal tables as well as data and object references are displayed in hexadecimal format. The entry &str, for example, displays the reference to the string str.

Changing the Display Format


You can display the field contents either formatted for their data type or in hexadecimal format. Use this button to display the field contents in hexadecimal format. Use this button to display the field contents in their original output format.

Deleting All Field Names


Use this button to delete all field names from the field display.

Changing Field Values at Runtime


You can change the values of fields at runtime to see how the change would affect the program flow. Suppose you have found out that a field contains an incorrect value. You would be able to replace it with another value in the Debugger to test whether the program would run properly in that case. You can change the values of the following data objects of your program. If you enter a value with an incompatible type, the system displays an error message.
Single fields

1. 2. 3. 4.

Structured fields Strings Fields of internal tables Fields of classes and interfaces

Procedure
To replace the contents of a single field, proceed as follows:

With certain data objects such as structures or internal tables, you first have to double-click the appropriate field name to display the attributes. You then have to double-click the individual fields again to open the display mode.

Result
The Debugger writes the new value to the program field and the system records the change in the system log. If you do not click the pencil icon, the changed value is ignored.
The Debugger accepts the values exactly as you entered them. You must, therefore, ensure that you use the correct format (upper and lowercase, leftjustified entry for hexadecimal numbers).

SAP Data Dictionary Tables.

Table Name DD01L DD01T DD02ALL DD02DB2 DD02DB6 DD02INF DD02L DD02MSS DD02ORA DD02SYB DD02T DD03L DD03T DD04L DD04T DD05S DD06L DD06T DD07L DD07T DD08L DD08T DD09C DD09L DD10L DD12DB2

Short text Domains R/3 DD: domain texts Table Parameters for ALLBASE DB2/390: Table Parameters Table Parameters for DB2 Version 2 Table Parameters for INFORMIX, Version 6 SAP tables Table Parameters for Microsoft SQL Server Table parameters for ORACLE, version 6 Storage Parameters for Tables in SYBASE R/3 DD: SAP table texts Table Fields DD: Texts for fields (language dependent) Data elements R/3 DD: Data element texts Foreign key fields Pool/cluster structures R/3 DD: texts on SQL tables R/3 DD: values for the domains DD: Texts for Domain Fixed Values (Language-Dependent) R/3 DD: relationship definitions Texts on the relationship definitions ABAP/4: Sytem-dependent attributes of tech. settings DD: Technical settings of tables Lock table for DD activation DB2/390: Index Parameters

DD12DB6 DD12INF DD12L DD12MSS DD12ORA DD12SYB DD12T DD14S DD15L DD15T DD16S DD17S DD20L DD20T DD21S DD23L DD23T DD24S DD25L DD25T DD26S DD27S DD28S DD29L DD29T DD30L DD30T DD31S DD32S DD33S DD35L DD36S DD40L DD40T

Index Parameters for DB2 Universal Database Version 2 Index parameter for INFORMIX R/3 S_SECINDEX: secondary indexes, header; Index Parameters for MS SQL Server Index Parameters for ORACLE Index Parameters for SYBASE System_10 Text Table for DD12L (Short Descriptions of Sec. Indexes) R/3 DD: components of SAP objects R/3 DD: SAP objects R/3 DD: texts on SAP objects R/3 DD: SQL table fields R/3 S_SECINDEX: secondary indexes, fields Matchcode objects AS400-T_MCOBJECT: MC Object Texts S-MCIDTABLE: Tables for a MC ID Matchcode ID AS400_L-MCID: Matchcode ID Texts Fields of a matchcode ID Aggregate Header (Views, MC Objects, Lock Objects) Short Texts for Views and Lock Objects Base tables and foreign key relationships for a view Fields in an Aggregate (View, MC Object, Lock Object) Lines of a selection condition Selection Condition for Views and MC IDs AS400_L-SELCOND: Selection Condition Texts Search helps Search help texts Assignment of search helps to collective search helps Search Help Parameter Assignment of search help fields Search help attachments to structures: Headers Parameter-field assignments for search help attachment Table types (internal tables defined in DD) Text on table types

Key fields for table types (internal tab. defined in DD) DD90L Header Information for External Index DD90T R/3-DD: Text for External Index DD91S DocID Key Definition of External Index DD92S Mapping of R/3 Data on External Index DD93S Attribute of an External Index DD94S Languages of an Index Category DD96S Synchronization Tables Statements for Trigger and Stored DD97S Procedures Exclusion times for ABAP/4 Dictionary DDACL actions DDALIAS DD: Second name for accessing tables DDART DD: Data Class in Technical Settings DD: For transferring the new buffering DDBUF parameters DDCDIM DD: Conversion, number of table lines DDCNVEXIT DD: External conversion methods DDCNVSTAT DD: Statistical Data for Conversion DD: Contains incr. conv. tables depend. on DDCNVTABL release/component DDCNVTIMES DD: Exclusion times for conversion DDCNVUSR DD: Exception table of converter DDCPRO DD: Conversion projects DDCPROT DD: Text on conversion projects DDCPROTAB DD: Table for conversion projects DDCQUEUE DD: Queue for CNV Operations DDCSTA DD: Conversion, number of table lines DDCSTAT DD: Statistics table for conversions DD: Table for Renaming Data Elements DDDTRENUPG During Upgrade Contains Information for Personalizing the DDF4PSINDX F4 Help DDFTX Run-time object with Screen Painter texts DDFTX* DDFTX2 DDFTX3 DDFTX4 DDFTX5 DDFTX6 DDFTX7 DDFTX8 DDFTX9 DD42S

DDICNVCTRL Control String for Transaction ICNV DDICNVDAYS DD: Days of Week DDICNVDIST Distribution of data records of base tables DDICNVLST Contains information on converter exits DDLBBUFTST Test: Recognize Access to Buffered Tables DDLOADD R3load-data table for migration DDLOADH R3load-header table for migration DD: Controls Parallel Handling during Mass DDPAMSCTRL Activation DDPART DD: Partitioned form of TBATG DDPATH DD: Definition of access paths DDPRH R/3 DD: Log header DDPROF DD: Settings for DDIC programs DDPRS R/3 DD: log lines DDPRTUVAR User settings for printing DD objects DD: Performance Key Figures of Server for DDSERVPERF Par. Execution Default value - search help per user and DDSHDEFSH collective s.h. Table of data elements which need the value DDSHENTITY table help DDSHHVALUE Historic Help Values DDSHLPVERS Current Version of Search Help Activator DDSHPVALUE Personal Help Values DDSPAR Storage clause for tables and indexes DDSPAR1 Storage clause for tables and indexes DDSPAR2 Storage clause for tables and indexes DDSTATHIST DD: Statistical Data for Conversion DDSTORAGE Storage clause for tables and indexes DDSTORAGE1Storage clause for tables and indexes DDSTORAGE2Storage clause for tables and indexes DDSYN Parameters for Buffer Synchronization DDTYPES Table of all Dictionary types and classes DDTYPET ABAP/4 Dictionary: Texts for type groups DDVE1 Value Table for Domain DDVERINT4 DDVEPR Check Table with Two Key Fields DDXTF Nametab field structure for delayed writing Nametab header structure for delayed DDXTT writing Substitution Nametab (shadow-shadowDDYTF nametab for DDXTF) Substitution Nametab (shadow-shadowDDYTT nametab for DDXTT)

For Batch input: If u want to change a t-code in current created session. Goto SM35. First export the session.

Then save it as Text file,in text file change that Tcode to required tcode. Then inplort the text file.

Anda mungkin juga menyukai