You are on page 1of 48

ABAP interview questions and answers

By admin | May 2, 2005

Thanks to the reader who sent in this question set:

1.

What is an ABAP data dictionary? - ABAP 4 data dictionary describes the logical structures of the objects used in application development and shows how they are mapped to the underlying relational database in tables/views.

2.

What are domains and data element?- Domains: Domain is the central object for describing the technical characteristics of an attribute of an business objects. It describes the value range of the field. Data Element: It is used to describe the semantic definition of the table fields like description the field. Data element describes how a field can be displayed to end-user.

3.

What is foreign key relationship?- A relationship which can be defined between tables and must be explicitly defined at field level. Foreign keys are used to ensure the consistency of data. Data entered should be checked against existing data to ensure that there are now contradiction. While defining foreign key relationship cardinality has to be specified. Cardinality mentions how many dependent records or how referenced records are possible.

4.

Describe data classes.- Master data: It is the data which is seldom changed. Transaction data: It is the data which is often changed. Organization data: It is a customizing data which is entered in the system when the system is configured and is then rarely changed. System data: It is the data which R/3 system needs for itself.

5.

What are indexes?- Indexes are described as a copy of a database table reduced to specific fields. This data exists in sorted form. This sorting form eases fast access to the field of the tables. In order that other fields are also read, a pointer to the associated record of the actual table is included in the index. The indexes are activated along with the table and are created automatically with it in the database.

6.

Difference between transparent tables and pooled tables. - Transparent tables: Transparent tables in the dictionary have a one-to-one relation with the table in database. Its structure corresponds to single database field. Table in the database has the same name as in the dictionary. Transparent table holds application data. Pooled tables. Pooled tables in the dictionary have a many-to-one relation with the table in database. Table in the database has the different name as in the dictionary. Pooled table are stored in table pool at the database level.

7.

What is an ABAP/4 Query? - ABAP/4 Query is a powerful tool to generate simple reports without any coding. ABAP/4 Query can generate the following 3 simple reports: Basic List: It is the simple reports. Statistics: Reports with statistical functions like Average, Percentages. Ranked Lists: For analytical reports. - For creating an ABAP/4 Query, programmer has to create user group and a functional group. Functional group can be created using with or without logical database table. Fi-

nally, assign user group to functional group. Finally, create a query on the functional group generated.

8.

What is BDC programming?- Transferring of large/external/legacy data into SAP system using Batch Input programming. Batch input is a automatic procedure referred to as BDC(Batch Data Communications).The central component of the transfer is a queue file which receives the data vie a batch input programs and groups associated data into sessions.

9.

What are the functional modules used in sequence in BDC?- These are the 3 functional modules which are used in a sequence to perform a data transfer successfully using BDC programming: BDC_OPEN_GROUP - Parameters like Name of the client, sessions and user name are specified in this functional modules. BDC_INSERT - It is used to insert the data for one transaction into a session. BDC_CLOSE_GROUP - This is used to close the batch input session.

10. What are internal tables?- Internal tables are a standard data type object which exists only during the run-time of the program. They are used to perform table calculations on subsets of database tables and for REORGANIZING the contents of database tables according to users need.

11. What is ITS? What are the merits of ITS? - ITS is a Internet Transaction Server. ITS forms an
interface between HTTP server and R/3 system, which converts screen provided data by the R/3 system into HTML documents and vice-versa. Merits of ITS: A complete web transaction can be developed and tested in R/3 system. All transaction components, including those used by the ITS outside the R/3 system at run-time, can be stored in the R/3 system. The advantage of automatic language processing in the R/3 system can be utilized to language-dependent HTML documents at run-time.

12. What is DynPro?- DynPro is a Dynamic Programming which is a combination of screen and the
associated flow logic Screen is also called as DynPro.

13. What are screen painter and menu painter?- Screen painter: Screen painter is a tool to design
and maintain screen and its elements. It allows user to create GUI screens for the transactions. Attributes, layout, filed attributes and flow logic are the elements of Screen painter. Menu painter: Menu painter is a tool to design the interface components. Status, menu bars, menu lists, F-key settings, functions and titles are the components of Menu painters. Screen painter and menu painter both are the graphical interface of an ABAP/4 applications.

14. What are the components of SAP scripts?- SAP scripts is a word processing tool of SAP which
has the following components: Standard text. It is like standard normal documents. Layout sets. Layout set consists of the following components: Windows and pages, Paragraph formats, Character formats. Creating forms in the R/3 system. Every layout set consists of Header, paragraph, and character string. ABAP/4 program.

15. What is ALV programming in ABAP? When is this grid used in ABAP?- ALV is Application
List viewer. Sap provides a set of ALV (ABAP LIST VIEWER) function modules which can be put into use to embellish the output of a report. This set of ALV functions is used to enhance the readability and functionality of any report output. Cases arise in sap when the output of a report con-

tains columns extending more than 255 characters in length. In such cases, this set of ALV functions can help choose selected columns and arrange the different columns from a report output and also save different variants for report display. This is a very efficient tool for dynamically sorting and arranging the columns from a report output. The report output can contain up to 90 columns in the display with the wide array of display options.

16. What are the events in ABAP/4 language?- Initialization, At selection-screen, Start-of-selection, end-of-selection, top-of-page, end-of-page, At line-selection, At user-command, At PF, Get, At New, At LAST, AT END, AT FIRST.

17. What is CTS and what do you know about it?- The Change and Transport System (CTS) is a
tool that helps you to organize development projects in the ABAP Workbench and in Customizing, and then transport the changes between the SAP Systems and clients in your system landscape. This documentation provides you with an overview of how to manage changes with the CTS and essential information on setting up your system and client landscape and deciding on a transport strategy. Read and follow this documentation when planning your development project.

18. What are logical databases? What are the advantages/ dis-advantages of logical databases?- To read data from a database tables we use logical database. A logical database provides read-only access to a group of related tables to an ABAP/4 program. Advantages: i)check functions which check that user input is complete, correct,and plausible. ii)Meaningful data selection. iii)central authorization checks for database accesses. iv)good read access performance while retaining the hierarchical data view determined by the application logic. dis advantages: i)If you donot specify a logical database in the program attributes,the GET events never occur. ii)There is no ENDGET command,so the code block associated with an event ends with the next event statement (such as another GET or an END-OF-SELECTION).

19. What is a batch input session?- BATCH INPUT SESSION is an intermediate step between internal table and database table. Data along with the action is stored in session ie data for screen fields, to which screen it is passed, program name behind it, and how next screen is processed.

20. How to upload data using CATT ?- These are the steps to be followed to Upload data through
CATT: Creation of the CATT test case & recording the sample data input. Download of the source file template. Modification of the source file. Upload of the data from the source file.

21. What is Smart Forms? - Smart Forms allows you to create forms using a graphical design tool
with robust functionality, color, and more. Additionally, all new forms developed at SAP will be created with the new Smart Form solution.

22. How can I make a differentiation between dependent and independent data?- Client dependent or independent transfer requirements include client specific or cross client objects in the change requests. Workbench objects like SAPscripts are client specific; some entries in customizing are client independent. If you display the object list for one change request, and then for each object the object attributes, you will find the flag client specific. If one object in the task list has this flag on, then that transport will be client dependent.

23. What is the difference between macro and subroutine?- Macros can only be used in the program the are defined in and only after the definition are expanded at compilation / generation. Subroutines (FORM) can be called from both the program that are defined in and other programs. A MACRO is more or less an abbreviation for some lines of code that are used more than once or twice. A FORM is a local subroutine (which can be called external). A FUNCTION is (more or less) a subroutine that is called external. Since debugging a MACRO is not really possible, prevent the use of them (Ive never used them, but seen them in action). If the subroutine is used only local (called internal) use a FORM. If the subroutine is called external (used by more than one program) use a FUNCTION.

1) What is the difference between RFC and BAPI ? What are subclasses and super classes in BAPI and also what are the methods in BAPI ? 2) Is it possible to connect SAP to Non-SAP systems to retrieve data using RFC alone with out using BAPI ? 3) What is the difference between Function module and BAPI ? 4) What are the types of tables? 5) What are pooled table ? 6) What are Hashed Tables ? 7) What are advantages of using ABAP objects? 8) What is the advantage of using ABAP objects in Reports ? 1) BAPI are RFC enabled function modules. the difference between RFC and BAPI are business objects. You create business objects and those are then registered in your BOR (Business Object Repository) which can be accessed outside the SAP system by using some other applications (Non-SAP) such as VB or JAVA. In this case u only specifies the business object and its method from external system in BAPI there is no direct system call. While RFC are direct system call Some BAPI provide basic functions and can be used for most SAP business object types. These BAPI should be implemented the same for all business object types. Standardized BAPI are easier to use and prevent users having to deal with a number of different BAPI. Whenever possible, a standardized BAPI must be used in preference to an individual BAPI. 2) No it is not possible to connect SAP to Non-SAP systems to retrieve data using RFC alone. RFC can access the SAP from outside only through BAPI and same is for vice versa access. 3) Each Bapi Object has Interface, Key Fields, Attributes, Methods and Events. Bapi Function Modules can be attached to these Bapi objects .Function module has a single bound functionality while a BAPI object can contain many functionalities 4) Transparent table, Pool table and cluster table are data dictionary table objects sorted table, indexed table and hash table are internal tables. 5) Table pools (pools) and table clusters (clusters) are special table types in the ABAP Dictionary. The data from several different tables can be stored together in a table pool or table

cluster. Tables assigned to a table pool or table cluster are referred to as pooled tables or cluster tables. A table in the database in which all records from the pooled tables assigned to the table pool are stored corresponds to a table pool. The definition of a pool consists essentially of two key fields (Tabname and Varkey) and a long argument field (Vardata). Table Clusters Several logical data records from different cluster tables can be stored together in one physical record in a table cluster. A cluster key consists of a series of freely definable key fields and a field (Pageno) for distinguishing continuation records. A cluster also contains a long field (Vardata) that contains the contents of the data fields of the cluster tables for this key. If the data does not fit into the long field, continuation records are created. Control information on the structure of the data string is still written at the beginning of the Vardata field. 6) Hashed tables This is the most appropriate type for any table where the main operation is key access. You cannot access a hashed table using its index. The response time for key access remains constant, regardless of the number of table entries. Like database tables, hashed tables always have a unique key. Hashed tables are useful if you want to construct and use an internal table which resembles a database table or for processing large amounts of data. Sample Prog: This does nothing. REPORT Z_1. tables: mara. data: i type hashed table of mara with unique key matnr 7) and 8) ABAP objects are root for your program and reports. RFC Vs BAPI BAPI are RFC enabled function modules. the difference between RFc and BAPI are business objects. You create business objects and those are then registered in your BOR (Business Object Repository) which can be accessed outside the SAP system by using some other applications (Non-SAP) such as VB or JAVA. In this case you only specify the business object and its method from external system in BAPI there is no direct system call. While RFC are direct system call Some BAPIs provide basic functions and can be used for most SAP business object types. These BAPIs should be implemented the same for all business object types. Standardized BAPIs are easier to use and prevent users having to deal with a number of different BAPIs. Whenever possible, a standardized BAPI must be used in preference to an individual BAPI. It is not possible to connect SAP to Non-SAP systems to retrieve data using RFC alone. RFC can access the SAP from outside only through BAPI and same is for vice versa access.

RFC is the protocol used by SAP for remote communication, that is, for communications between remote (independent) systems. RFC is used for communications between two independent SAP systems, or for communications between an SAP system and a non-SAP system, such as an external application. It can also be used for communications between modules on the same system. Using the RFC interfaces you can extend the functionality of R/3 applications from an external program. What is the different between clear and refresh? There are 2 types of clear statements we can use: Clear ITAB : This Statement will clear the Internal Table Header content. To clear the Internal Table Header as well Body we can use Clear ITAB [ ] statement. Refresh will deletes the Internal Table content but still memory is not freed. What is the pick statement do? Pick Statement will capture the User Action. Eg: if SY-UCOMM = 'X'. This type of user actions can be captured thru PICK Statement only. What is the different between session method and call transaction method and suppose I used one method to transform the data next time suppose I want transform the data which method I can use. There are many differences between Session method and Call Transaction. Which method we have to use will be found based on Volume Of data and Accuracy of data given. Mainly Call Transaction used for small sets of data because in Call Transaction we have to handle the Processing errors explicitly. We can do this by BDCMSGCOLL structure. In Session method separate session will crate for errors. Call Transaction will update the Database fastly compare with Session Method. What is single and upto one row different? The Major difference between Select Single and Select UPTO 1 rows is The Usage of Buffer for each. Select Single will search for all the satisfied data and bring all that data into Buffer and later it will give to that data to the program. Select UPTO 1 Rows will end the search after getting the 1st satisfied record and gives that record to the program. Thus Select Single will take much processing time when compare with Select UPTO 1 rows. What are the differences between selection screen and selection screen out?

The difference between Selection Screen and Selection Screen Output is we use the Selection Screen Output Event before the Selection Screen will be displayed. E.g.: Suppose if we want to disable some fields and enable some fields in the Selection Screen then we can code that in Section-Screen Output event. Selection-Screen Event will trigger after section-screen is displayed and user action takes place on that.
What is the difference between Table and Template?

Table is a dynamic and template is a static


When do we use End-of-selection?

End-of-selection event are mostly used when we are writing HR-ABAP code. In the HR-ABAP code, data is retrived in the Start-of-selection event and Printing on the list and all will be done in End-of-selection event.
In events start-of-selection is default event. When we have to use this event explicitly? Why?

The default event in the ABAP is Start-of-selection. We have to call explicitly this event when you are writing other than this event , that is when you write AT SELECTION-SCREEN EVENTS OR INITIALIZATION EVENT etc, you have to explicitly mention the Start-of-selection event while you are writing the logic. Before these events called, all the code you have written come into this default Start-of-selection screen event.
What are the differences between ABAP and OOABAP? In which situation we use OOABAP?

OOABAP is used to develop BSP/PCUI applications and also anthing involved object oriented like BADIs, SmartForms..etc.where as ABAP is used to develop traditional programs in R/3.
What is table buffer? Which type of tables used this buffer?

Buffer is nothing but a memory area. Table is buffered means that table information is available on application server. When you call data from database table it will come from application server. Transparent and pooled tables are buffered. Cluster tables can not buffer.
What is the use of pretty printer ?

Pretty Printer is used to format the ABAP Code we write in ABAP Editor, like KEY WORDS in Capitals and remaining are in small letters which is also depend on system settings.

Exactly where can we link the functional module to abap coding?

We can call the function module in the ABAP Code .Press the Pattern button on Appl. tool bar then u will get box where u write the function module NAME which u want to call in the code by selecting the radio button CALL FUNCTION. In this way we link function module to ABAP Code.
What is the difference between SAP memory and ABAP memory?

Answer1: data sending between main sessions using get parameter and set parameter is sap memory data sending between internal sessions using import or export parameters is abap memory Answer2: sap memory is a global memory whereas abap memory is local memory. For example, we have four programs in abap memory and assigned some varibles to a particular program in abap memory then those varibles can't be used by anyother program in abap memory i.e., the variables are only for that program and also local to that memory, whereas sap memory can access all the abap memory or else it can perform any kind of modifications. Answer3: SAP memory is available to the user during the entire terminal session. ABAP memory is available to the user during life time of external session.
What is ITS?

What are the merits of ITS?- ITS is a Internet Transaction Server. ITS forms an interface between HTTP server and R/3 system, which converts screen provided data by the R/3 system into HTML documents and vice-versa. Merits of ITS: A complete web transaction can be developed and tested in R/3 system. All transaction components, including those used by the ITS outside the R/3 system at runtime, can be stored in the R/3 system. The advantage of automatic language processing in the R/3 system can be utilized to language-dependent HTML documents at runtime.
What is DynPro?

DynPro is a Dynamic Programming which is a combination of screen and the associated flow logic Screen is also called as DynPro.
What are screen painter and menu painter?

Screen painter: Screen painter is a tool to design and maintain screen and its elements. It allows user to create GUI screens for the transactions. Attributes, layout, filed attributes and flow logic are the elements of Screen painter. Menu painter: Menu painter is a tool to design the interface components. Status, menu bars, menu lists, F-key settings, functions and titles are the components of Menu painters. Screen painter and menu painter both are the graphical interface of ABAP/4 applications.

What are the components of SAP scripts?

SAP script is a word processing tool of SAP which has the following components: Standard text. It is like standard normal documents. Layout sets. - Layout set consists of the following components: Windows and pages, Paragraph formats, Character formats. Creating forms in the R/3 system. Every layout set consists of Header, paragraph, and character string. ABAP/4 program.
What is ALV programming in ABAP? When is this grid used in ABAP?

ALV is Application List viewer. Sap provides a set of ALV (ABAP LIST VIEWER) function modules which can be put into use to embellish the output of a report. This set of ALV functions is used to enhance the readability and functionality of any report output. Cases arise in sap when the output of a report contains columns extending more than 255 characters in length. In such cases, this set of ALV functions can help choose selected columns and arrange the different columns from a report output and also save different variants for report display. This is a very efficient tool for dynamically sorting and arranging the columns from a report output. The report output can contain up to 90 columns in the display with the wide array of display options.
What are the events in ABAP/4 language?

Initialization, At selection-screen, Start-of-selection, end-of-selection, top-of-page, end-of-page, At line-selection, At user-command, At PF, Get, At New, At LAST, AT END, AT FIRST.
What is CTS and what do you know about it?

The Change and Transport System (CTS) is a tool that helps you to organize development projects in the ABAP Workbench and in Customizing, and then transport the changes between the SAP Systems and clients in your system landscape. This documentation provides you with an overview of how to manage changes with the CTS and essential information on setting up your system and client landscape and deciding on a transport strategy. Read and follow this documentation when planning your development project.
What are logical databases? What are the advantages/ dis-advantages of logical databases?

To read data from a database tables we use logical database. A logical database provides read-only access to a group of related tables to an ABAP/4 program. Advantages: i) check functions which check that user input is complete, correct, and plausible. ii) Meaningful data selection. iii) Central authorization checks for database accesses. iv) Good read access performance while retaining the hierarchical data view determined by the application logic. Disadvantages: i)If you dont specify a logical database in the program attributes, the GET events never occur. ii) There is no ENDGET command, so the code block associated with an event ends with the next event statement (such as another GET or an END-OF-SELECTION).
What is a batch input session?

BATCH INPUT SESSION is an intermediate step between internal table and database table. Data along with the action is stored in session i.e. data for screen fields, to which screen it is passed, program name behind it, and how next screen is processed.

How to upload data using CATT?

These are the steps to be followed to upload data through CATT: Creation of the CATT test case & recording the sample data input. Download of the source file template. Modification of the source file. Upload of the data from the source file.
What is Smart Forms?

Smart Forms allows you to create forms using a graphical design tool with robust functionality, color, and more. Additionally, all new forms developed at SAP will be created with the new Smart Form solution.
How can I make a differentiation between dependent and independent data?

Client dependent or independent transfer requirements include client specific or cross client objects in the change requests. Workbench objects like SAP scripts are client specific, some entries in customizing are client independent. If you display the object list for one change request, and then for each object the object attributes, you will find the flag client specific. If one object in the task list has this flag on, then that transport will be client dependent.
What is the difference between macro and subroutine?

Macros can only be used in the programs they are defined in and only after the definition are expanded at compilation / generation. Subroutines (FORM) can be called from both the program they are defined in and other programs. A MACRO is more or less an abbreviation for some lines of code that are used more than once or twice. A FORM is a local subroutine (which can be called external). A FUNCTION is (more or less) a subroutine that is called external. Since debugging a MACRO is not really possible, prevent the use of them (Ive never used them, but seen them in action). If the subroutine is used only local (called internal) use a FORM. If the subroutine is called external (used by more than one program) use a FUNCTION.
What are the differences between structure and table in data dictionary in ABAP?

Structure and table both are 2/2 matrices but there are many differences between table and structure. 1. Table can store the data physically but a structure dose not store. 2. Table can have primary key but a structure dose not have. 3. Table can have the technical attribute but a structure dose not have. Structure doesn't contain technical attributes. Structure doesn't contain primary key. Structure doesn't stores underline database level.
What is the difference between Type and Like?

Answer1: TYPE, you assign datatype directly to the data object while declaring. LIKE,you assign the datatype of another object to the declaring data object. The datatype is referenced indirectly. Answer2:

Type is a keyword used to refer to a data type whereas Like is a keyword used to copy the existing properties of already existing data object. Answer3: type refers the existing data type like refers the existing data object
What is Tcode SE16? For what is it used. Explain briefly?

Answer1: SE16 is a T-code for object browser. Generally used to search the fields of SAP Tables and respective data. Answer2: se16 is a data browse and it is used to view the contents of the table and we cannot change or append new fields to the existing structure of the table as we cannot view the structure level display using the se16
What are different ABAP/4 editors? What are the differences?

The 2 editors are se38 and se80 both have the abap editor in place. In se38 you can go create programs and view online reports and basically do all the development of objects in this editor. In se80 ( object navigator) there are additional features such as creating packages, module pool , function group ,classes, programs ( where you can create ur programs) and BSP applications .
What is difference between dialog program and a report?

Report is a executable program Dialog is a module pool program. It has to be executed via a transaction only. Dialog programming is used for customization of screens
How do you connect to the remote server if you are working from the office for the client in remote place.

WAS web application server or ITS are generally used for this purpose. If you are sitting at your office with a server which is in the system and the other server is at the clients place you can generate IDOC, intermediate documents which carry the data you want to transfer or the documents you want to transfer, these IDOC are interpreted by the system at the receiving end with the message class with which it is bound with. If you want to logon a system which is very distant. Then remote login can be used this depends on the internet speed.
Explain about roll area , Dispatcher, ABAP-Processor.

Answer1: Roll area is nothing but memory allocated by work process. It holds the information needed by R/3 about programs execution such as value of the variables. Dispatcher: All the requests that come from presentation server will be directed first to dispatcher. Further dispatcher sends this requests to work process on FIFO(First In and First Out) basis. Answer2: Dispatcher receives the request from client and assigns the request to one of the work process.

Roll area: Each work process works in a particular memory that memory is known as Role Area, which consists of User context and session data. ABAP- Processor :is an interpreter which can execute logic
Which one is not an exit command? (Exit, cencle, stop, back)

STOP. Effect: The statement STOP is only to be used in executable programs EXIT. Effect: If the EXIT statement is executed outside of a loop, it will immediately terminate the current processing block. BACK. Effect: This statement positions the list cursor on the first position of the first line in a logical unit. So "Cancle" is not an exit command
What is Field symbol?

Answer1: You can use field symbols to make the program more dynamic. In this example the name of a table control is substituted by a field symbol. Thus you cal call the form with any internal table, using the name of the table control as a parameter. Example form insert_row using p_tc_name. field-symbols <tc> type cxtab_control. "Table control assign (p_tc_name) to <tc>. * insert 100 lines in table control <tc>-lines = 100. Answer2: fieldsymbol has the same concept as pointer in c, fieldsymbol don't point to a data type like char, num instead of that it points to the memory block. the syntax for fieldsymbol is FIELD-SYMBOL <N>. EG. FOR FIELD SYMBOL. DATA: DAT LIKE SY-DATUM, TIM LIKE SY-UZEIT, CHAR (3) TYPE C VALUE 'ADF'. FIELD-SYMBOL: <FS>. MOVE DAT TO <FS>. WRITE:/ <FS>. MOVE TIM TO <FS>. WRITE:/ <FS>. MOVE CHAR TO <FS>.

WRITE:/ <FS>. The output will be Today's date current time


What is lock object?

Lock Objects used to synchronize access of several users using same data.
Why BAPI need then BDC?

BAPI"S provides the standard interface to other applications apart from SAP and within different versions of SAP too. Also it is OOD bases so doesnt depends on screen flow. BDC gets failed if we make changes for screen changes through IMG customization
What are the advantages and disadvantages of using views in ABAP programming?

Advantages: view is used to retrieve the data very fastly from the database tables *memory wastage is reduced *faster than joins to retrieve the data from database tables disadvantages: view is not a container, it will not hold the data *view memory is not permanent memory
How data is stored in cluster table?

A cluster table conatins data from mulitple DDIC tables. It stores data as a name value pair ( varkey, vardata)
Have you used performance tuning? What major steps will you use for these?

First of all tunning can be done In three ways: disk i/o ,sql tunning , memory tunning, Before tunning u have to get the status of your database using Oracle utility called statpack , tkprof, then you should go for tunning
How to create client independent tables?

client independent tables: the table in which the first field is not mandt is the client independent tables *mandt is the field with mandt as the data element *automatically client which we login is populated to mandt
What type of user exits have you written?

There are four types 1.function exit 2.menu exit 3.screen exit. 4. Field exit. These are the user exits

How can you debug a script form?

SE71 -> give the form name -> utilities -> activate debugger
How do we debug sapscript?

First we need to put Break point in Print program where ever you want to stop the execution. After in SE71 give your form name and go to Utilities-->Active De-bugger. Then go to your transcation like VF03(for Invoice or Credit memo) etc to see the print preview or print the form execute it. When you execute it the the form Debugging will get activated and you can see your Form execution step by step. excecute the predefined executable program RSTXDBUG
What are the different types of data dictionary objects?

Answer1 Data Dictionary Objects * * * * * * * * *

Tables Views Domain Data Element Type Groups Search Helps/Matchcode Objects Lock objects Structures Table Types

Answer2 the dictionary objects are: domain dataelements tables views structures typegroups search helps lock objects etc which are data base related objects in sap
Can a transparent table exist in data dictionary but not in the data base physically?

Answer1 NO. TRANSPARENT TABLE DO EXIST WITH THE SAME STRUCTURE BOTH IN THE DICTIONARY AS WELL AS IN THE DATABASE,EXACTLY WITH THE SAME DATA AND FIELDS. No, at the point you will activate your table a same transparent table is going to be create in database

Answer2 Yes, a transparent table(definition) can exist in the data dictionary and not in the database. In this case, it is not activated
What are the domains and data elements?

Domains: ___________ domains are the dictionary objects that are assigned with constants and data types data elements: ______________ data elements are dictionary objects that are assigned with the domains. Uses:' * data elements are used to create relation between tables. * Data elements are used to transfer the data from one R/3 to another R/3. * To create search helps.
What is a collect statement? How is it different from append?

APPEND : IT IS USED TO GET THE RECORD FROM THE INTERNAL TABLE HEADER TO THE BODY AREA IT ALLOWS DUPLICATION COLLECT: IT IS USED TO A GET A RECORD FROM HEADER TO THE BODY AREA BUT IT WILL NOT ALLOW ANY DUPLICATION EXCEPT IF THERE IS ANY NUMERIC FIELS IT ADDS THAT FIELDS DATA BUT NOT AS A NEW RECORD
On ABAP: Did you set up a workflow? Are you familiar with all steps for setting up a workflow?

Yes. Execute the Txn SWDD(Creating a new Workflow). In the header of the Workflow, define the Business Object and Event you refer to for triggering the Wf. Create the Steps required for your workflow(Activity). Inside the Activity, Create the task and assign the Business Object and the related method for that business object. Activate the Workflow.
In the select statement what is group by?

Group by clause is used to fetch the data from the table by the specified field ex.select count (*) from emptable group by deptno where deptno = 1. It is used to find the number of employees present in the specified department no.
How can I copy a standard table to make my own z_table?

WE CAN CREATE A STRUCTURE LIKE THE SAME STRUCTURE AS DATABASE TABLE

AND WE CAN USE SELECT* FROM DATABASE TABLE INTO TABLE ITAB OR INSERT INTO ITAB VALUES DATABASE TABLE
IDoc Tables and Function Module to Read IDOC. the tables EDIDC and EDIDD which hold the relevant data. CALL FUNCTION 'IDOC_READ_COMPLETELY' EXPORTING document_number = docnum IMPORTING idoc_control = edidc TABLES int_edidd = edidd EXCEPTIONS document_not_exist = 1 document_number_invalid = 2 OTHERS = 3.

What is the difference between append structure and include structure. 2. what is the logging of technical setting while creating db table.
1. Append structure: it will add Fields to the table from Last. we can't use that structure in another table. 2. Include structure: we can add fields in middle. we can Use include structure in more than one table.

What is the logging of technical setting while creating db table. Logging of database table determines the changes to the records of the table should be logged. A history table is generated with respect to each table to contain it's log history. Table logs can be visualized by transaction SCU3. what are the Events in Application Server. Events are 1 - OPEN DATA SET 2 - READ DATA SET 3 - CLOSE DATA SET. With out any Write statement will the Top of the Page and End of Page trigger? Yes it will print only the header and footer.. When does the secondary index should be used what role it

play when we use secondary index in tables If you want to get the accurate data from tables, u must need to use secondary indexes. Indexes r used get the data very fast Difference between interactive and ALV Reports Interactive or drill-down reports are for navigation Purposes to get the most information to a deeper level on a Particular field or for a record from the basic list to the Secondary lists or vice-versa. Whereas ALV is a sap Defined standard table format for display purposes and for doing enhancements on the output (Eg: downloading ALV data to excel sheets).

Clear, refresh, free Difference? clear : itab. <-- clears the header line clear : itab{}. this is equivalent to refresh : itab. free.. frees the memory allocation to the internal table .. how do we debug an idoc ? using function module idoc_outbound_<message type>. we can set the break point for this function module you can debugg the idoc through we19 when EDIDD EDIDC EDIDS idoc is created in which table its stored ...? to store data records. to store control information. to store status of IDOC

1. what is master idoc. 2. what is communication idoc. 3. if i want to send the five records throgh BD10 then how may no of master and communication idocs will generate depends on what they are generating the master and communication idocs. Master IDOC: This idoc collects all the required data into single IDOC and this is temporarily stored in memory. Communication IDOC: there can be n number of communication IDOCs generated. This comes into picture after the Master IDOC is validated from the distribution model. And this IDOC is stored in database table. You can see this IDOC from we02 tcode. Master idoc: in the outbond process all the data in sap r/3

is retreived via outbond program.after retrieving, the data is arranged in segments in heirarichal order in an internal table.this internal table which has segments and data is known as master idoc. Communication idocs: this completely depends upon the distribution model which has list of senders and receivers.so if receivers are not attached to senders in distribution model than we have zero communication idocs.so communication idoc is simply the data which gives the link between the senders and receivers. if u send 5 records it means u r sending 5 master idocs and the number of communication idocs depend upon the number of receivers u have in the distribution model. How to create an Idoc & Attached to SAP Transaction? For example we want to trigger IDOC To other system when we Save the PO Via ME21N. 1. Create message type. WE81 2. Attach basic types of IDOC to message type. WE82 3. Attach FM to the message type combination of IDOC types WE57 4. Creat a process code and attach message type to it. WE41 (OUTBOUND)/WE42 (INBOUND) 5. Create a Partner function through WE20. Add an message type in the outbound paramater. 6. Have an entry of port name and basic types (IDoc types) in the outbound options tab 7. Add and an entry in the message control option with the output type (ME21N- Output type) and the process code. 8. When you db click on the process code the FM should appear. 9. When an output is triggered in the ME21N transaction wit the EDI output medium. The idoc will be triggered What is idoc? What is the structure of idoc? idoc stands for intermediate documents,it is used for data sending current system to remote system . the structure of idocs is Idoc structure is 1 Data record : This data record can be one or more . 2 control record : This control record shd be one and it contain the info like who is the sender , who is the receiver , type of message etc. 3 Status record: This status records can also be one one or more basing upon the the stages the idoc is tranfered. these status records are 1 to 75. 1 to 49 are reserved for outbound and 50 to 75 are reserved for outbound. these are stored in sap tables like that.

edidd edidc edids How to Handle the IDOC Errors using Messages? ALE+WORKFLOW HANDLES ERRORS. How to Handle the BDC Errors? BDCMSGCOLL structure. What is sy-lsind? Basic List, SY-LSIND = 0 Secondary List, SY-LSIND = 2

What is a SY command? SY-TFILL contains the number of lines in the relevant internal table.

SY-TLENG contains the length of the lines in the relevant internal table.
SY- SUBRC SY- INDEX SY- TABIX SY- TFILL SY- LILLI SY- LSIND SY- DBCNT SY- CPROG SY- DATUM SY- DYNNR SY- TLENG SY- STEPL SY- LOOPC SY- FDPOS SY- DBSYS : RETURN VALUE AFTER ABAP STATEMENTS : LOOPS,CURRENT LOOP PASS : INTERNAL TABLE,CURRENT LINE INDEX : INTERNAL TABLE,CURRENT NO. OF LINES : LIST PROCESSING,CURRENT LIST LINE : LIST PROCESSING , DETAILS LIST INDEX : DB OPERATIONS,NO. OF TABLE LINES PROCESSED : ABAP PROGRAM,CALLER IN EXTERNAL PROCEDURES : DISPLAYS CURRENT DATE : ABAP PROGRAM,NO. OF CURRENT SCREEN : LINE LENGTH : LOOP INFORMATION IN TABLE CONTROL : LOOP INFORMATION IN TABLE CONTROL : CONTAINS OFF SETS FOR THE FOUND STRING : Database system

SY- DYNGR : Screen group of current screen SY- DYNNR : Number of current screen SY- PAGNO : Runtime: Current page in list SY- PFKEY : Current GUI Status SY- COLNO : Current List Column SY- LINCT : Page Length of List SY- LINNO : Current Line in List SY- LINSZ : Line width of list SY- MACOL : Number of Columns on Left Margin of Print List

SY- BINPT : Program Running Under Batch Input SY- MODNO : Index of External Session SY- LSIND SY- LISTI SY- LILLI SY- LISEL :Index of the list for current event for basic list = 0. :Index of the list level from which the event was triggered :Absolute number of the line from which the event was triggered :Contents of the line from which the event was triggered

SY- CUROW :Position of the line in the window from which the event was triggered (counting starts with 1) SY- CUCOL SY- CPAGE SY- STARO :Position of the column in the window from which the event was triggered (counting starts with 2) :Page number of the first displayed page of the list from which the event was triggered :Number of the first line of the first page displayed of the list from which the event was triggered

(counting starts with 1). This line may contain the page header. SY- STACO with 1) SY- UCOMM :Function code that triggered the event SY- PFKEY :Status of the list currently being displayed. :Number of the first column displayed in the list from which the event was triggered (counting starts

BDC Seesion OK Codes?

How to Find Driver Program given the name of Sapscript?

First you need to goto form->check->texts. you will get one small box hit on enter where you can see the driver program name one is You can go to SE71 (form painter) go to insert-> program symbols and find the name. else in the tcode NACE -> choose an output type->procesing routines you will find the form name and the script name.

How to insert field in standard script ..? Using itcsy structure.This Structure has two fields 1) name 2) value
systax. perform <pername> in program <progname> using <field> changing <field>.

FORM country_of_plant_and_vendor TABLES in_par STRUCTURE itcsy out_par STRUCTURE itcsy. MOVE 'WORK_LIFNR_LAND1' TO out_par-name. MOVE work_lifnr_land1 TO out_par-value. ENDFORM.

The logo uploaded using RSTXLDMC programe, Where it is going to store ? It will store in Document Server. How do u suppress blank space in sap script. &VARIABLE(C)& You can link a search help to a parameter using syntax PARAMETERS var TYPE dobj MATCHCODE OBJECT objname Suppose that I want to show multiple records of purchase order in the window rather than main window in the SAPscript form? Is it possible? If yes, than how ? Yes it is possible but if records are more than one page it cannot be displayed because main window only flow over multiple pages variable windows cannot flow over... Can we write code(Select Queries) in SAP-Script? Not to use Driver Program.
In Script you cannot write any select queries but you can write all abap related code in External Subroutine and you can call the subroutine from Script. YES using subroutines

What is syntax to upload a logo in script ?

Using the command INCLUDE. for example: /: INCLUDE &T024E-TXKOP& OBJECT TEXT ID ADRS LANGUAGE &EKKO-SPRAS& PARAGRAPH FT

What is the difference between occurs 1 and occurs 2 occurs1: is used to the system allocate the 2 memory locations are cratead.
occurs2: is used to the system allocate the 3 memory locations are crated.

Table maintainence -- Transaction Code? SM30-TABLE MAINTAINENCE TRANSACTION CODE Standard PO Smartform name? /BPR3PF/MMPO_L
For SAP_SCRIPT Driver Program -- SAPFM06P routine will be - ENTRY_NEU script form MEDRUCK

Function module for hierarchical alv REUSE_ALV_HIERARCHICAL_LIST_DISPLAY Syntax to Translate Character to UPPER Case? DATA text TYPE string. TRANSLATE text TO UPPER CASE. How to find only ZSTA Materials in selection screen on value request? tables : mara. data : a type matnr.
PARAMETERS: b(5) type c DEFAULT 'ZSTA' MODIF ID 001. Select-options: s_matnr for a no intervals MATCHCODE OBJECT MAT1T. Initialization. Set PARAMETER ID 'MTA' FIELD b.

Or.
SELECT-OPTIONS: S_NAME FOR TRDIR-NAME, " Program Name

AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_NAME-LOW.

How to make Field INPUT zero in selection screen? PARAMETERS : b(5) type c DEFAULT 'ZSTA' MODIF ID 001. at SELECTION-SCREEN OUTPUT. loop at screen. if screen-group1 = '001'. screen-input = 0. modify screen.

endif. endloop.

Types defined for SLIS Fieldcat? types: begin of slis_fieldcat_main0, row_pos like sy-curow, " output in row col_pos like sy-cucol, " position of the column fieldname type slis_fieldname, tabname type slis_tabname, currency(5) type c, cfieldname type slis_fieldname, " field with currency unit ctabname type slis_tabname, " and table ifieldname type slis_fieldname, " initial column quantity(3) type c, qfieldname type slis_fieldname, " field with quantity unit qtabname type slis_tabname, " and table round type i, " round in write statement exponent(3) type c, " exponent for floats key(1) type c, " column with key-color icon(1) type c, " as icon symbol(1) type c, " as symbol checkbox(1) type c, " as checkbox just(1) type c, " (R)ight (L)eft (C)ent. lzero(1) type c, " leading zero no_sign(1) type c, " write no-sign no_zero(1) type c, " write no-zero no_convext(1) type c, edit_mask type slis_edit_mask, " emphasize(4) type c, " emphasize fix_column(1) type c, " Spalte fixieren do_sum(1) type c, " sum up no_out(1) type c, " (O)blig.(X)no out tech(1) type c, " technical field outputlen like dd03p-outputlen, offset type dd03p-outputlen, " offset seltext_l like dd03p-scrtext_l, " long key word seltext_m like dd03p-scrtext_m, " middle key word seltext_s like dd03p-scrtext_s, " short key word ddictxt(1) type c, " (S)hort (M)iddle (L)ong rollname like dd03p-rollname, datatype like dd03p-datatype, inttype like dd03p-inttype, intlen like dd03p-intlen, lowercase like dd03p-lowercase, end of slis_fieldcat_main0. BAPI For Create Sales Order? BAPI_SALESORDER_CREATEFROMDAT2 Standard Smartform for Bill Invoice? LB_BIL_INVOICE Table or View to check User First Name and Last Name. The view is V_USR_NAME (USR21-PERSNUMBER, ADRP-PERSNUMBER).

How to Replace ',' to '.' with code? Replace all occurrences of ',' in FIGL100B-WRBTR with '.' in character mode. Download data from SAP to Non-SAP. data: lv_file type string value 'C:\Documents and Settings\x133132\Desktop\CLASS_error.txt'. CALL FUNCTION 'GUI_DOWNLOAD' EXPORTING FILENAME = lv_file FILETYPE = 'ASC' TABLES DATA_TAB = it_error. IF SY-SUBRC <> 0. MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. ENDIF. Assign number of values to number of fields at a time. Ex. ATNAM_1 = ATWRT_1, ATNAM_2 = ATWRT_2 to ATNAM_n = ATWRT_n. DO 20 TIMES. vg_loop = vg_loop + 1. vg_loopx = vg_loop. SHIFT vg_loopx RIGHT DELETING TRAILING ' '. CONCATENATE 'ATWRT_' vg_loopx INTO vg_field. condense vg_field no-gaps. ASSIGN component vg_field of structure LOAD_FILE TO <fs_field>. if <fs_field> is not initial. MOVE <fs_field> TO BIAUSP-ATWRT. CONCATENATE 'ATNAM_' vg_loopx INTO vg_field. condense vg_field no-gaps. ASSIGN component vg_field of structure LOAD_FILE TO <fs_field>. MOVE <fs_field> TO BIAUSP-ATNAM. * clear BIAUSP-ATNAM. transfer_record. endif. if vg_loop eq 20. clear vg_loop. endif. clear: BIAUSP-ATWRT,<fs_field>,BIAUSP-ATNAM. ENDDO. BAPI for Classification. BAPI_CLASS_GET_CLASSIFICATIONS How Set Call Transaction parameters externally. CTU_PARAMS structure is used to populate all the Parameter string for runtime of CALL TRANSACTION USING options. data : x_options type CTU_PARAMS.

clear X_OPTIONS. X_OPTIONS-DISMODE = 'A'. X_OPTIONS-UPDMODE = 'S'. X_options-NOBINPT = 'X'. X_options-DEFSIZE = X. CALL TRANSACTION 'C202' USING bdcdata OPTIONS FROM x_options. How to create runtime editor? report ZTEST1 no standard page heading line-size 500. "DATA: BEGIN OF T OCCURS 200, "TEXT1(60),TEXT2(12), "END OF T. "T-TEXT1 "T-TEXT1 "T-TEXT1 "T-TEXT1 = = = = 'Text 'Text 'Text 'Text 1'. 2'. 3'. 4'. T-TEXT2 T-TEXT2 T-TEXT2 T-TEXT2 = = = = 'A'. APPEND T. 'B'. APPEND T. 'C'. APPEND T. 'D'. APPEND T.

"EDITOR-CALL FOR T TITLE 'Editor for internal tables'. "LOOP AT T. "WRITE: / T-TEXT1, T-TEXT2. "ENDLOOP. How to fetch data from any specified table? report ZTEST1 no standard page heading line-size 500. */select any table and display data* PARAMETERS: dbtab(10) TYPE c, rows TYPE i DEFAULT 100. DATA dref TYPE REF TO data. FIELD-SYMBOLS: <a> TYPE ANY TABLE, <wa> TYPE ANY, <b> TYPE ANY. TRY. CREATE DATA dref TYPE STANDARD TABLE OF (dbtab) WITH NON-UNIQUE DEFAULT KEY. ASSIGN dref->* TO <a>. SELECT * FROM (dbtab) UP TO rows ROWS INTO TABLE <a> .

LOOP AT <a> ASSIGNING <wa>. DO. ASSIGN COMPONENT sy-index OF STRUCTURE <wa> TO <b>. IF sy-subrc = 0. WRITE: <b> . ELSE. EXIT. ENDIF. ENDDO. ULINE. ENDLOOP. CATCH cx_sy_create_data_error. WRITE / 'Wrong Database!'. ENDTRY. How to read file data and assign to Field Symbol? Data : it_ffdat TYPE STANDARD TABLE OF string , "Imported Flat-File data <data_wa> LIKE LINE OF it_ffdat READ TABLE it_ffdat INDEX l_linecount ASSIGNING <data_wa>. How to select file from Application Server? PARAMETER: pa_filn1(500) TYPE c LOWER CASE VISIBLE LENGTH 50 , "Filename AppServer CALL FUNCTION '/SAPDMC/LSM_F4_SERVER_FILE' * EXPORTING * DIRECTORY ='' * FILEMASK = '*.conv' IMPORTING serverfile = pa_filn1 EXCEPTIONS canceled_by_user =1 OTHERS =2 . IF sy-subrc <> 0. MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. ENDIF. Create dynamic structure of table? Data : wa_struc TYPE REF TO data . "flat-file PARAMETER: pa_struc TYPE typename VALUE CHECK . CREATE DATA wa_struc TYPE (pa_struc). "Import Structure FIELD-SYMBOLS: <wa_struc> TYPE ANY . ASSIGN wa_struc->* TO <wa_struc>. How to Assign 1st, 2nd, 3rd and 4th field to structure.? FIELD-SYMBOLS:

<wa_table> TYPE ANY <field> TYPE ANY ASSIGN COMPONENT 1 OF <field> = sy-mandt. ASSIGN COMPONENT 2 OF <field> = pa_sysid. ASSIGN COMPONENT 3 OF <field> = pa_bukrs. ASSIGN COMPONENT 4 OF <field> = pa_version.

STRUCTURE <wa_table> TO <field>. STRUCTURE <wa_table> TO <field>. STRUCTURE <wa_table> TO <field>. STRUCTURE <wa_table> TO <field>.

How to Assign field Value to any field.? FIELD-SYMBOLS: <wa_table> TYPE ANY , <field> TYPE ANY . ASSIGN COMPONENT MATNR OF STRUCTURE <wa_table> TO <field>. ASSIGN COMPONENT MTART OF STRUCTURE <wa_table> TO <field>. How to take all fields data with same offset and lengh? For ex. Fields as KST001, KSt002, KST003, KST004, KST005. tables : keph. DATA: t_keph TYPE STANDARD TABLE OF keph, l_ind TYPE numc3, l_field TYPE fieldname, l_keph TYPE keph. data : vg_loop(3) type n, vg_loopx(3) type n, vg_field type fieldname. field-symbols : <fs_field> type any, <FS> type any, <l_keph> like KEPH. "any table. DO 40 TIMES. vg_loop = vg_loop + 1. vg_loopx = vg_loop. SHIFT vg_loopx RIGHT DELETING TRAILING ' '. CONCATENATE 'KST' vg_loopx INTO vg_field. condense vg_field no-gaps. ASSIGN component vg_field+0(7) of structure keph TO <fs_field>. *if <fs_field> is not initial. *MOVE <fs_field> TO <FS>. write:/ <fs_field>. *endif. ENDDO.

How to create Drop-down list?

REPORT ZDROP_DOWN_PRO. TABLES MARA. PARAMETERS : MATNR AS LISTBOX VISIBLE LENGTH 10. TYPE-POOLS vrm. DATA values TYPE vrm_values WITH HEADER LINE. AT SELECTION-SCREEN OUTPUT. SELECT * FROM MARA WHERE MTART = 'ROH'. values-text = MARA-MATNR. values-key = MARA-MATNR. APPEND values. ENDSELECT. CALL FUNCTION 'VRM_SET_VALUES' EXPORTING id = 'MATNR' values = values[] EXCEPTIONS id_illegal_name = 1 OTHERS = 2.
How to show data of only specified number of columns from table? Ex. Show first 3 or 4 or many columns to output.

field-symbols: <fs> TYPE any table, <a> type any, <b> type any, <c> type any. PARAMETERS : dbtab(10) type c. DATA dref TYPE REF TO data. data a like dbtab occurs 0 with header line. PARAMETERS no type i. data : a1 type i VALUE 0. START-OF-SELECTION. CREATE DATA dref TYPE STANDARD TABLE OF (dbtab) WITH NON-UNIQUE DEFAULT KEY. ASSIGN dref->* TO <FS>. select * from (dbtab) up to 10 rows into TABLE <FS>.

loop at <FS> assigning <b>. do no times. a1 = a1 + 1. ASSIGN COMPONENT a1 of STRUCTURE <b> to <c>. if sy-subrc = 0. write: <c>. else. exit. endif. enddo. endloop. How to convert smartform output into pdf? There is a way to download smartform in PDF format. Please do the following: 1. Print the smartform to the spool. 2. Note the spool number. 3. Download a PDF file (Acrobat Reader) version of the spool by running Program RSTXPDFT4 and entering the noted spool number. Or use this program:
&--------------------------------------------------------------------*& Report ZPDF_DNLD_TEST2 * *& * &--------------------------------------------------------------------*& DEVK904540 * *& * &--------------------------------------------------------------------REPORT ZPDF_DNLD_TEST2. data: i_otf LIKE itcoo OCCURS 100 WITH HEADER LINE, i_pdf LIKE tline OCCURS 100 WITH HEADER LINE. data: op_option type SSFCTRLOP, job_output type SSFCRESCL. op_option-getotf = 'X'. CALL FUNCTION '/1BCDWB/SF00000005' EXPORTING ARCHIVE_INDEX = ARCHIVE_INDEX_TAB =

ARCHIVE_PARAMETERS = CONTROL_PARAMETERS = op_option MAIL_APPL_OBJ = MAIL_RECIPIENT = MAIL_SENDER = OUTPUT_OPTIONS = USER_SETTINGS = 'X' itab1 = itab1 IMPORTING DOCUMENT_OUTPUT_INFO = JOB_OUTPUT_INFO = job_output JOB_OUTPUT_OPTIONS = EXCEPTIONS FORMATTING_ERROR = 1 INTERNAL_ERROR = 2 SEND_ERROR = 3 USER_CANCELED = 4 OTHERS = 5 . IF sy-subrc = 0. MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. ENDIF. CALL FUNCTION 'CONVERT_OTF' EXPORTING FORMAT = 'PDF' MAX_LINEWIDTH = 132 ARCHIVE_INDEX = ' ' COPYNUMBER = 0 ASCII_BIDI_VIS2LOG = ' ' PDF_DELETE_OTFTAB = ' ' IMPORTING BIN_FILESIZE = BIN_FILE = TABLES otf = job_output-otfdata lines = i_pdf EXCEPTIONS ERR_MAX_LINEWIDTH = 1 ERR_FORMAT = 2 ERR_CONV_NOT_POSSIBLE = 3 ERR_BAD_OTF = 4 OTHERS = 5 . IF sy-subrc 0. MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. ENDIF.

CALL FUNCTION 'GUI_DOWNLOAD' EXPORTING BIN_FILESIZE = filename = 'c:\test_pdf_sf.pdf' FILETYPE = 'BIN' tables data_tab = i_pdf FIELDNAMES = EXCEPTIONS FILE_WRITE_ERROR = 1 NO_BATCH = 2 GUI_REFUSE_FILETRANSFER = 3 INVALID_TYPE = 4 NO_AUTHORITY = 5 UNKNOWN_ERROR = 6 HEADER_NOT_ALLOWED = 7 SEPARATOR_NOT_ALLOWED = 8 FILESIZE_NOT_ALLOWED = 9 HEADER_TOO_LONG = 10 DP_ERROR_CREATE = 11 DP_ERROR_SEND = 12 DP_ERROR_WRITE = 13 UNKNOWN_DP_ERROR = 14 ACCESS_DENIED = 15 DP_OUT_OF_MEMORY = 16 DISK_FULL = 17 DP_TIMEOUT = 18 FILE_NOT_FOUND = 19 DATAPROVIDER_EXCEPTION = 20 CONTROL_FLUSH_ERROR = 21 OTHERS = 22 . IF sy-subrc 0. MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. ENDIF. Get Direct Input LSMW log output. T-Code :- SM21 T-Code :- SLG1 How to Save 2 records at a time in Table Control? ****PAI FLOW LOGIC LOOP AT ITAB . MODULE READ_TABLE_CONTROL. ENDLOOP. MODULE READ_TABLE_CONTROL INPUT. IF MARK = 'X' AND SAVE_OK = 'SAVE'. READ TABLE ITAB INTO WA. a = a + 1.

WA-CARRID = 'LH'. WA-CONNID = a. WA-CITYFROM = WA-CITYFROM. * DELETE TABLE SPFLI FROM WA.

INSERT INTO SPFLI VALUES WA. DESCRIBE TABLE ITAB LINES TABLE_CONTROL-LINES. ENDIF. ENDMODULE. T-Code to View LOG of record changes in Table. T-Code :-SCU3 T-code to Import Transport Request in Q/PRD Server. T-code STMS

How will you know which BADI is being used, if there are multiple implementations of BADI in the same project? We can check using Enhancement implementation -> Overview and see the active badi which is in yellow color. How would you design a BDC (session method) in which session will get executed itself. Users do not need to go to SM35.
Write code to Submit the program RDBDCSUB by giving the Session name. This program will automatically execute the Session.

How does system know that your SAP login userid is assigned to a particular employee number (PERNR)?
By using Function Module RP_GET_PERNR_FROM_USERID, get PERNR by giving USRTY = '0001'. And also in the table PA0105, with SUBTYPE '0001' and with the value USRID = 'SY-UNAME', get the PERNR.

for example in client 710 i update the records for Tcode ME21 using bdc, In the same server if i update 5 records and in the mean while other user do the same bdc update for me21 for 3 records how do u resolve the remaining 2 records. by using LUW technique we can resolve this problem What is the difference between Search help and Match code?
Search Help: is used to retrieve the possible values for the Database field from the database. By pressing the function Key F4. Match code: Is used to retrieve the search paths for the database field.

What is Macro?

Macro is one of the subroutine that can't be reused in any other programs. We need to write definition of macro at

starting of the program. We can pass the parameters to macro using two ways. We pass the values to macro using place holders. Maximum of 9 variables we can pass to a macro. The following statement block defines a macro macro: DEFINE makro. Statements END-OF-DEFINITION. You must specify complete statements between DEFINE and END&#8209;OF&#8209;DEFINITION. These statements can contain up to nine placeholders &1, &2,...., &9). You must define the macro before the point in the program at which you want to use it.

What is the pre-requisite for read statement and can we read the standard table using read statement.
No!! Read stmt can't be used to read data from standard table. Specifically mean to read internal table. The perquisite for Read statement is to sort the internal table with key before use in loop and endloop. Read can be used only inside a loop .this is the prerequisite.

Why sap scripts are client dependent and smartforms are client independent, Plz give me a brief explanation.
Smartforms generates a function module, in general function modules r Client independent, so smart forms are client independent.

Is there any typing conversions in abap and list them.


as far as i know , in type conversions some functions are used to convert the data in required way, which are conversion_exit_alpha_input and conversion_exit_alpha_output. These functions fill the defined data type length with Zeros. Like if the data type num length is 5 and input is 123, the function adds zeros '00123', this is for input and in the same way for output also.

WHY WE NEED TO CREATE A PORT IN ALE IDOCS?


Port Port Port Case acts as medium in between sender and receiver. carries the idoc from sender to receiver. creating is we21 and provides the receiver name should be sensitive.

By which function module we are going to put data into sapscript ?


write_form for all the windows read_text for standard text

How many times we can use At Selection Screen Output and on field event in report?

At Selection Screen Output can be used only once in the Report program. At Selection Screen On field can be used multiple times if the fields are different. e.g. At Selection Screen On field1 If field1 is empty display error message. At Selection Screen On field2 If field2 is empty display error message.

Is there any other criteria for using For All Entries except if not itab is initial?

After select statement of itab check for SY-SUBRC and write for all entries. Also check duplicate with DELETE ADJACENT DUPLICATES.

When is the POV AND POH event used?


POV is process on value request i.e. for F4 help in module Pool POH is process on help request i.e. for F1 help in module pool

What is the difference between At New and On change Of inside a loop? I want inside a loop difference not basic difference??
1. At new statement is used inside the loop and end loop. 2. At new f3: at new will trigger if any F1, F2, F3 field value changes 1. on change of is used with in loop end loop, select end select, do, do while. 2 on change of F3, on change of will trigger when only F3 value changes, it won't bother about F1 and F2 changes. 1.at new is always followed by single field. eg: AT NEW MATNR. if any changes in matnr occurs at new event triggers. at this case right side fields of matnr appears like this. right side character fields appears like **** & Numeric field become null in work area. 2.on change of follows by single or more fields. eg: ON CHANGE OF MATNR OR LABST OR WERKS. here any change in any field on change of event triggers. here we can see all fields in work area.

For what purpose Chain Endchain statement is used?

To validate a group of fields we use those fields in between CHAINENDCHAIN You cannot perform input checks in PAI modules of programs until you have transported the contents of the input fields to the ABAP program. You can then use logical expressions to check the values that the user entered. You should then allow the user to correct any wrong entries before calling further modules.

CHAIN. FIELD: <f1>, <f 2>,... MODULE <mod1>. FIELD: <g1>, <g 2>,... MODULE <mod2>. ... ENDCHAIN.

What is a Text Table?


ABAP programmers are often suppose to save language depended data within ABAP applications. One of the possible way how to store such a data is to create a text table for transparent table in ABAP dictionary tool (TA code: SE11).

What will happen if I dont use initialization and start of selection event in report?
Nothing will happen system takes by default those events.

What is collect statement? Explain with example?


If an entry with the same key already exists, the COLLECT Statement does not append a new line, but adds the contents of the numeric fields in the work area to the contents of the numeric fields in the existing entry.

How to display ICON/SYMBOL in ALV?


TYPE-POOLS : icon. TYPE-POOLS : SYM. types: BEGIN OF ty_display, status TYPE icon-id, bukrs TYPE bseg-bukrs, message TYPE string, END OF ty_display. data : it_display TYPE TABLE OF ty_display, wa_display TYPE ty_display. WRITE icon_led_green AS ICON TO wa_display-status.. wa_display-bukrs = p_cc. APPEND wa_display TO it_display. In normal ABAP program. INCLUDE <icon>. INCLUDE <SYMBOL>. WRITE: / 'field1', icon_led_green AS ICON, field3 , '@00@' AS ICON, 'field2', SYM_CHECKBOX as SYMBOL.

How do you do subtotaling in alv?

i_fieldcat TYPE slis_t_fieldcat_alv, * Internal table for Top of Page info. in ALV Display i_alv_top_of_page TYPE slis_t_listheader, * Internal table for ALV Display events i_events TYPE slis_t_event, * Internal table for storing ALV sort information i_sort TYPE slis_t_sortinfo_alv, i_event TYPE slis_t_event. wa_layout TYPE slis_layout_alv, wa_events TYPE slis_alv_event, wa_lfl_fcat-fieldname = 'NTGEW'. "Field Name wa_lfl_fcat-just = C. "Screen Justified wa_lfl_fcat-seltext_l = Net Quantity. "Field Text wa_lfl_fcat-no_out = X. "No output wa_lfl_fcat-qfieldname = GEWE. "Quantity unit

wa_sort-spos = '01' . wa_sort-fieldname = 'MATNR'. wa_sort-tabname = 'I_EKPO'. wa_sort-up = 'X'. wa_sort-subtot = 'X'. APPEND wa_sort TO i_sort . CLEAR wa_sort.

What is a FM for Event in ALV?


DATA: l_s_event TYPE slis_alv_event.

************Structure of Event********** types: begin of slis_alv_event, name(30), form(30), end of slis_alv_event. *****************************************
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'

How to display two alv in a single screen? With splitter as defined below.
DATA : ob_custom ob_split1 ob_split2 ob_grid1 ob_grid2 ob_grid3 TYPE TYPE TYPE TYPE TYPE TYPE REF REF REF REF REF REF TO TO TO TO TO TO cl_gui_custom_container , cl_gui_easy_splitter_container , cl_gui_easy_splitter_container , cl_gui_alv_grid , cl_gui_alv_grid , cl_gui_alv_grid .

* This will create a container CREATE OBJECT ob_custom EXPORTING container_name = 'CONTAINER'.

* This spit the container OB_CUSTOM into two CREATE OBJECT ob_split1 EXPORTING parent = ob_custom orientation = cl_gui_easy_splitter_container=>orientation_vertical. * Now we have two container * OB_SPLIT1->TOP_LEFT_CONTAINER * OB_SPLIT1->BOTTOM_RIGHT_CONTAINER * Since these two are itself a container we can further devide them into two. * Let try to divide OB_SPLIT1->BOTTOM_RIGHT_CONTAINER into two CREATE OBJECT ob_split2 EXPORTING parent = ob_split1->bottom_right_container orientation = cl_gui_easy_splitter_container=>orientation_horizontal . * Now Put a grid in each container CREATE OBJECT ob_grid1 EXPORTING i_parent = ob_split1->top_left_container . CREATE OBJECT ob_grid2 EXPORTING i_parent = ob_split2->top_left_container . CREATE OBJECT ob_grid3 EXPORTING i_parent = ob_split2->bottom_right_container .

Header & footer display in ALV grid for Layout description


data: it_events type slis_alv_event. data: it_events1 type slis_t_event. FORM list_display_events. CLEAR it_events. it_events-name =3D slis_ev_top_of_page. it_events-form =3D 'TOP_OF_PAGES'. append it_events to it_events1. clear it_events. it_events-name =3D slis_ev_top_of_list. it_events-form =3D 'TOP_OF_LISTS'. append it_events to it_events1. clear it_events. ENDFORM.

What is a Filter BADI?


A filter type can be a data element or a structure. A data element must fulfill the following criteria:

1 The data element's domain may contain a maximum of 30 characters and must be of type Character. 2 the data element must 1). Either have a search help with a search help parameter of the same type as the data element and this parameter must serve as both the import and export parameter or 2). The element's domain must have fixed domain values or a value table containing a column with the same type as the data element. All methods created in the enhancement's interface have filter value 'FLT_VAL' as their import parameter to define a filter-dependent Business Add-In, first create a normal Business Add-In and select the Filter checkbox.
For ex.

Check both Multiple use and Filter-Depend Add VKORG in the filter text box. What ever we enter in Filter text box is a data element and that data element having search help. Click on methods tab add instance method GET_VKORG with 2 parameters FLT_VAL Import Type VKORG ZTAX_RATE Changing Type STRING method ZIF_EX_BADI_FILTER~GET_VKORG . if flt_val = '0001'. ztax_rate = '15'. elseif flt_val = '1000'. ztax_rate = '20'.

What is the use of Multiple Use check box in BADI?


Multiple Uses: With this option you can have multiple implementations for the same BAdI. Do NOT select the Multiple use checkbox from the Administration tab when defining a Single Use BADI

What is Static and Instance Methods in BADI?


Instance methods can access all of the attributes of a class, and can trigger all of the events of the class Static methods can only access static attributes and trigger static events

What is the Difference between Single and Multiple use of BADI?


Single Use Business Add-Ins Do NOT select the multiple use checkbox from the Administration tab when defining a Single Use BADI BADI has a single Implementation Similar to procedures Return values can be expected Can use importing, changing and returning parameters N/A A single implementation will be triggered by the application program

Multiple Use Business Add-INS Select the Multiple use checkbox from the Administration tab when creating the BAdI definition BAdI has multiple implementations Similar to event calls Cannot expect return values Can use importing and changing parameters For multiple implementations there is no sequence control because at the time of BAdI definition it does not know which implementation will be active All active implementations will be triggered by the application program Using MS Word as Editor in SAP Script and Smart Forms?
Go to transaction I18N (Internationalization). Click on I18N Menu I18N Customizing I18N System Configuration

How do you backup sap script layout sets? Can you download and upload? How? SAP script backup: - In transaction SE71 goto Utilities -> Copy from client -> Give source form name, source client (000 defaults), and Target form name. Download: - SE71, type form name -> Display -> Utilities -> form info -> List -> Save to PC file. Upload: - Create form with page, window, and page window with the help of downloaded PC file. Text elements for Page windows to be copied from PC file. What is difference between Window & a Page Window? Window: An area that is predefined in the layout set. Windows are text modules, which are positioned on a document page. We define the window type, Default Paragraph, specify the text elements or a SAPscript text to be included etc in the Window Component. Page Window: we define the parameters of the earlier defined Window, appearance on the document like left or right margins, Width & Height. Can V insert logo on your program?.
Yes u can insert a logo on your script layout. Use this Report RSTXLDMC which will uploads the logo.

What does the composer do? The final appearance of your document depends on interaction between the print program and the layout set. The SAP script print program initializes the printing process. Every command entered using the SAP script programming interfaces is transferred to the composer. The composer received layout information from the layout set specified by the print program. The documents are formatted according to this layout information. If the documents contain variables, the compoer replaces these variables with data from the R/3 system, such as the current date, or with the userdata selected by the print program. The print program controls the completion of thelayout set. Once this is done, the composer places the completed document in the spool. Other useful programs for SAPScript RSTXFCON - Converts page format

RSTXSCRP - Upload/Download layout sets RSTXDBUG - SAP Script debugger The following window types can be used: MAIN Main window in which continuous text is output. This is the window used by dialog users of a print program and layout set. For example the body text of a letter would be entered in MAIN.
VAR Window with variable contents. The text can vary on each page in which the window is

positioned. Variable windows are formatted for each page.

CONST Window with constant contents which is only formatted once. What is layout set?

A layout set in SAP script is used for page layout. The layout set contains various elements, which are used for layout control of the individual pages and also contain layout information for texts which are to be output on the individual pages. The layout of a document is defined in a layout set. A layout set specified the appearance and structure of a document. Layout sets contain predefined text modules with space reserved for variable data. You can use these text modules for different application. Every SAP script document uses a layout set. To make changes to your documents, such as moving a piece of text, or changing fonts, paragraph formats, and tabs, you only need to change the layout set.

What is the structure of LSMW? Ans __GLOBAL_DATA__ (Definition) __BEGIN_OF_PROCESSING__ __BEGIN_OF_TRANSACTION__ . __BEGIN_OF_RECORD__ (Append Itab) .. __END_OF_RECORD__ transfer_record. __END_OF_TRANSACTION__ transfer_transaction. __END_OF_PROCESSING__

Download error log


How to insert blank column into Table Control?
DATA: VALUE TYPE I, ITAB TYPE I OCCURS 100 WITH HEADER LINE. ITAB = 5. VALUE = 36. INSERT ITAB INDEX 1. INSERT VALUE INTO ITAB INDEX 2. INSERT INITIAL LINE INTO ITAB INDEX 2. The table ITAB now contains three lines with the values 5, 0 and 36.

1. What information does the SAP data dictionary store? - Metadata 2._____________ provides the interface between the ABAP dictionary and the underlying DBMS. Database Utility. 3. What are the basic objects of the ABAP Dictionary? tables, data elements and domains. 4. A field is not a dictionary object. True/False true 5. What are table fields defined by in SAP R/3? data elements and domains. 6. A domain specifies the_______________ and________________ of a field. technical characteristics, allowed values 7. What represents the relationships between tables in the ABAP dictionary. Foreign keys 8. In order to have a foreign key relationship established in SAP, the fields involved must share the same______________ and that________________ must have a ___________________ specified. domain, domain, value table. 9. What is the difference between a value table and a check table? value table contains set of allowed values attached to a domain, check is that which is referenced by a foreign key. 10. When creating foreign key relationships you should always specify the ______________ cardinality of that relationship. 11. In the instance the primary of a check table has multiple values, what are the different types of assignments that may be made for each field while creating the foreign key relationship? field-by-field, assignment, partial foreign key, constant foreign key. 12. Name the 5 different table types in the SAP ABAP dictionary. transparent, structures, pool tables, cluster tables, views. 13. SAP stores__________ data and____________ exclusively in transparent tables. master, transaction. 14. What type of data is stored by pool tables? control data e.g. screen sequences or program parameters.

15. Name the different data classes tables in the ABAP dictionary may be assigned to. master data (appl0), transaction data (appl1), organization and customizing data (appl2) and user data (user). 16. What are the different buffering types for tables? single record generic and full. 17. Groups of fields may be added to customer tables using____________. substructures. 18. Groups of fields may be added to SAP delivered tables using____________ and _____________. append structures and customizing includes. 19. In the case of nested structures upto how many nesting levels are allowed? 9 20. In a nested chain, TRANSP table types may exist a) once correct answer b) twice c) thrice d) none of the above

How to Import logo in ALV?


T-code OAER

How to find what transactions a particular user was running for a given period in the past (Eg: from 1st of a month)
A: You may use the transaction - STAT.

Q: How can we send a mail to the user intimating him that his report/BDC is completed in background?
A: You can use FM Q:

RS_SEND_MAIL_FOR_SPOOLLIST

We get the total number of pages as expected by using 'SAPSCRIPT-FORMPAGES' in a duplex layout. In our case duplex case is always 'Terms & Conditions'. We do not want the number of pages as in duplex printing. What is the best possible solution?
A: On the Terms & Conditions page, Change the Page counter mode to 'HOLD' to keep the page

counter from incrementing when you print the Term & Conditions.

Q: In a Dev instance, we want to transport a modification to a layout set from one client to another. What is the best way? A: use transaction SE71. Choose Utilities->Copy from Client. Layout sets need not be transported
between clients, via transport reQuests DEVKxxxxxx.

Q: We want protect/lock a field so that only selected people can change the value while others can only read. How to set the authorizations?
A: Create an authorization object for change mode. Loop at screen in the user exit and set input

to 0. Check the user based on sy-uname and the authorization. Decide whether input should be 0 or 1.

Q: How to compare the 2 tables between the 2 systems? Ans: Which is using the transaction code is 'oy19' / SCMP.

What is Message Control in IDOC? T-code OBA5


Select the application area Select Edit -> New entries Type in the following : o Message number - By pressing the F4 key on the MsgNo field you can find out which messages are available. o User name - If you enter a name here then the specifications only apply to this particular user. If you enter "blank", then the settings apply to all users within the client. o Message type - You can find out the permitted message type by selecting F4 on the Online or Batch fields. Save your entries.

Which function type has to be used for using at exit-command ?


To use AT EXIT-COMMAND, we must assign a function type E to the relevant function in the Menu Painter or Screen Painter. When the user chooses a function with type E, the screen flow logic jumps directly to the following statement: MODULE CANCLE AT EXIT-COMMAND. If you have more than one MODULE statement with the AT EXIT-COMMAND addition, only the first is executed.

What is SAP Lock Concept?


There are 4 types of table locks Exclusive lock: The locked data can only be displayed or edited by a single user. A request for another exclusive lock or for a shared lock is rejected. Shared lock: More than one user can access the locked data at the same time in display mode. A request for another shared lock is accepted, even if it comes from another user. An exclusive lock is rejected. Exclusive but not cumulative: Exclusive locks can be requested several times from the same transaction and are processed successively. In contrast, exclusive but not cumulative locks can be called only once from the same transaction. All other lock requests are rejected. O (Optimistic) Optimistic locks initially behave like shared locks and can be converted into exclusive locks. See

What are the Types of Buffer? There are seven main groups of buffers found in the shared memory

1) Repository Buffers 2) Table Buffers 3) Program Buffer 4) SAP GUI Buffers 5) Roll and Paging Buffers 6) SAP Calendar Buffer 7) SAP Cursor Cache

Can we use Order by clause for buffered tables, if No, Why? No, because when we use below Order by Clause on Table, Buffer is bypassed. Use of buffered tables is recommended to improve the performance considerably. The buffer is bypassed while using the following statements 1. 2. 3. 4. Select distinct Select for update Order by, group by, having clause Joins

How to activate Tabstrips in sap? Syntax: <ctrl>-ACTIVETAB = <fcode>. CASE sscrfields-ucomm. WHEN 'UCOMM1'. tabcon-prog = sy-repid. tabcon-dynnr = 001. tabcon-activetab = 'TABS1'. How to assign subscreen to tabscreen?
PROCESS BEFORE OUTPUT. ... CALL SUBSCREEN: <Subarea1> INCLUDING [<prog 1>] <dynp 1>, <Subarea2> INCLUDING [<prog 2>] <dynp 2>, <Subarea3> INCLUDING [<prog 3>] <dynp 3>, PROCESS AFTER INPUT. ... CALL SUBSCREEN: <Subarea1>,

<Subarea2>, <Subarea3>,

What is the difference between STOP and EXIT?


EXIT: Exits the current loop processing in loop structures such as: DO ... ENDDO WHILE ... ENDWHILE LOOP ... ENDLOOP SELECT ... ENDSELECT SAP recommends that you use EXIT only in loops. To exit processing blocks, use the statement RETURN. STOP: This statement terminates a processing block in an executable program of type 1. The statement is only intended for use in the INITIALIZATION, AT SELECTION-SCREEN, START-OF-SELECTION, and GET events.

Can we use Commit Work in User Exit, If No, Why?

I believe using a commit work in the exit is dangerous as if you do a commit work in the exit, it will commit the database changes. But after the user exit it finds that some data is not proper and so the transaction is terminated without saving or creating the record. But since the commit work was performed in the user exit, those unnecessary changes will be there in the database even though the transaction has not been saved.

What are Transaction codes for performance tuning?


SE30 - ABAP runtime analysis. ST02 - Tune Summary. ST03 - Workload Analysis (Tuning of buffers) ST04 - Database Performance Analysis. ST05 - Performance Analysis (SQL Trace, etc). ST06 - Operating System monitor. ST07 - Application Monitor. ST14 - Application Analysis.

Difference between SET, LEAVE and CALL Screen commands?


Basically: - Call screen..... calls a screen. If you leave this screen with set screen 0, you return to the first statement after the call screen statement. So this Dynpro is called on top of the calling screen. - Set screen sets the number of the following dynpro. - Leave screen: leave the Dynpro directly and start the PBO of the next

Dynpro. This next Dynpro can be set by SET SCREEN. - Leave to screen nnnn: leaves current Dynpro and starts screen nnnn. You must consider this as the next Dynpro in a chain of dynpro's.

Difference between GET and GET . LATE? This event is triggered when all of the data records for a node of the logical database have been read. Get This is the most important event for executable programs that use a logical database. It occurs when the logical database has read a line from the node and made it available to the program in the work area declared using the statement NODES. Get Late event is triggered when all of the data records for a node of the logical database have been read. It will call the most recent values of a particular table, set in the program. After all of the nodes of the logical database have been processed that are below <table> in the database hierarchy. Syntax: GET <table> LATE [FIELDS <f1> <f 2>...]. GET SFLIGHT. SKIP. Loop only once WRITE: / 'Date:', SFLIGHT-FLDATE. GET SBOOK. Loop until end of record WEIGHT = WEIGHT + SBOOK-LUGGWEIGHT. GET SFLIGHT LATE. Loop until end of record. WRITE: / 'Total luggage weight =', WEIGHT. ULINE. WEIGHT = 0. What are the events used for Logical Database? 1) GET - This is the most important event for executable programs that use a logical database. It occurs when the logical database has read a line from the node <table> and made it available to the program in the work area declared using the statement NODES <table>. The depth to which the logical database is read is determined by the GET statements. 2) PUT - The PUT statement directs the program flow according to the structure of the logical database. Can we multiple message types for IDoc types? Yes, you can. Use WE82 transaction to link mesasage type with idoc type. How to Download/Upload a Program from One Server to another Server? 1. Release change request 2. The realese generates two files: COFILE e DATA. You can find them in USR/SAP/TRANS/COFILE e USR/SAP/TRANS/DATA. i.e transport number DEVK905060 generates files K905060.DEV in COFILE and D905060.DEV 3. Copy these files into the same directory of target system. 4. Execute ADDTOBUFFER of transport request 5. Execute IMPORT

How to use BINARY SEARCH in Program? DATA: BEGIN OF i_test OCCURS 0, key1, key2, non_key, END OF i_test. PERFORM populate_table. SORT i_test BY key1. LOOP AT i_test. WRITE: / i_test-key1, i_test-key2, i_test-non_key. ENDLOOP. READ TABLE i_test WITH KEY key1 = 'B' BINARY SEARCH. IF sy-subrc = 0. WRITE: / 'Found:'. WRITE: / i_test-key1, i_test-key2, i_test-non_key. ELSE. WRITE: / 'Not found'. ENDIF. Can anyone tell me what is the difference between Explicit Commit and Implicit Commit ?? I saw these terms in this mailing list and I don't know what the difference is or how I do it ?? An explicit commit happens when you execute an SQR or SQL "commit" command. Implicit commits occur without you running a commit command. Implicit commits may happen when certain SQL "data definition language" (DDL) statements are executed (in Oracle at least ... I am not sure about other databases). SQR also "commits" any database changes automatically when the SQR program ends. > I'm a beginner in SQR, currently I have successfully created a SQR > (version 4.3) that do an insert to a table in oracle database. > I didn't use a commit statement, but I could insert the rows > successfully !!! > 1. Do I need a commit statement in my SQR ??? because right now I am > mot using it and it still works. SQR "commits" everything for you when it finishes. 2. What if in the middle of the insert process, the power is shutdown suddenly, how do I know which rows are inserted successfully and which rows are not Commits exist to make sure that either "everything happens" or "nothing happens". If a process stops for any reason (e.g. the power shuts off) before a database "commit" is executed, the database will "back out" all changes made since the last commit. This is true whether the commits are implicit or explicit. > Or could I just do a rollback the whole thing, so that I can repeat the > process again ?

If the process fails without issuing an implicit or explicit commit, the rollback is handled automatically by the database. In this case you should be able to just repeat the process. How to Count lined in Table?. DESCRIBE TABLE ITAB LINES cnt. 3. This SQR supposed to run monthly, but how can I prevent people from running this report more than once in a month ??? This could be handled in a number of ways. For example, you could set a "run date" somewhere in the database. The report program would check / update the run date and only produce the report if it has not already been generated this month. Alternatively, you could use operating system files (e.g. the existence of the May report file) and OS command language to determine whether or not to even run the report. There are probably many other ways to do this, too. That is one of the fun things about programming; you get to decide "how" to make things happen. Personally, I like the KISS method (whatever you do "Keep It Simple S?????"). Difference between Implicit enhancement and Explicit enhancement. Implicit enhancement is Enhancement Points defined in ABAP code where an enhancement point is implied, and in which case can be created. Examples of implicit enhancement points are at the beginning and end of FORMs, at the end of a program, include or function module etc. Explicit enhancement is SE18 an SE19 Programmatic Enhancement applied at code level externally. These are basically hooks already coded into the program by SAP at various points of the code. See program RIAUFMVK for examples of these! These are very easy to implement simply go into enhancement mode of SE80 and right click on the enhancement point where you want to add your code and choose Enhancement Implementation->Create Give it a name, description and assign it to a change request (should not be a Z package) and then simply add the code as normal. Use of FOR ALL ENTRIES in SELECT Query. SELECT LEDNR OBJNR GJAHR WRTTP VERSN KSTAR FROM COSP INTO TABLE T_COSP FOR ALL ENTRIES IN T_AUFK WHERE LEDNR EQ '00' AND OBJNR = T_AUFK-OBJNR.