Sei sulla pagina 1di 11

SAP memory Data sending between main sessions using get parameter and set parameter is SAP memory

SAP memory is a global memory SAP memory is available to the user during the entire terminal session. Difference between smartform and sapsripts SMARTFORMS Client Independent Smart form Without main window is possible Multiple Page format is possible Labels can't be generated Smart form can be uploaded/downloaded Protect/End protect not possible Difference between BADI and USER Exist BADI Can be used any number of Times Code is in outside OOPS concepts Fall back , Filter options are available Full fill the requirements of a system infrastructure No need of SSCR Fast Process SAPSCRIPTS Client dependent

ABAP memory Data sending between internal sessions using import or export parameters is ABAP memory ABAP memory is local memory. ABAP memory is available to the user during life time of external session.

Sap script Without main window is not possible Multiple Page format is not possible Labels can be generated Sap script can't be uploaded/downloaded Protect/End protect possible

USER EXIST Can be used only one time Code will be included in standard program Not OOPS concepts used

This enhancement technique assumes a two-tiered system infrastructure Need SSCR Slow Process

Transparent tables 1 - 1 cardinality between Data Dictionary and Database Transparent table can access with using Open & Native SQL statements

Non transparent ( Cluster& Pooled) Many - 1 cardinality Non transparent can access only Open Sql.

Transparent tables can store Table relevant data

Non transparent tables can store system data/ application data based on the transparent tables

secondary indexes allowed Can be buffered

No secondary indexes (Should be accessed via primary key) Cluster Tables: Can not be buffered Pool Tables Should be buffered

Normal function module Normal function module is used to execute in the exiting server. Generally normal function module contains exceptions. Generally after executing normal function module commit work is not required. Llocally (within R/3) passing data is by call by reference Check Table Check table will be at field level checking. Foreign Key relationship, Only allows the possible entries in Primary Key

Remote Enabled function module But remote function module is used to execute in other server other than existing server. But remote function module contains messages in the return table. But for remote function module you have to call the commit work explicitly. use it in Non SAP globally RFC passing data is by value Value Table Value table will be at domain level checking Only allows the entry which is specified the Value range

Difference between class and a function module? Ans. Function modules are ABAP routines that are administered in a central function library. They apply across applications and are available throughout the system. You must assign function modules to a function pool that is called a function group. A function group is nothing but a container for the function modules. Classes are templates for objects. Conversely, you can say that the type of an object is the same as its class. A class is an abstract description of an object. You could say that it is a set of instructions for building an object. The attributes of objects are defined by the components of the class, which describe the state and behavior of objects. What is wrapper class? A data structure or software that contains ("wraps around") other data or software, so that the contained elements can exist in the newer system. The term is often used with component software, where a wrapper is placed around a legacy routine to

make it behave like an object. This is also called "encapsulation" or "wrapper encapsulation," but is not the same as "object encapsulation," a fundamental concept of object technology. What are events in classes? Triggering Events To trigger an event, a class must Declare the event in its declaration part Trigger the event in one of its methods

Declaring Events You declare events in the declaration part of a class or in an interface. To declare instance events, use the following statement: EVENTS <evt> EXPORTING... VALUE(<ei>) TYPE type [OPTIONAL].. To declare static events, use the following statement: CLASS-EVENTS <evt>... Both statements have the same syntax. When you declare an event, you can use the EXPORTING addition to specify parameters that are passed to the event handler. The parameters are always passed by value. Instance events always contain the implicit parameter SENDER, which has the type of a reference to the class or the interface in which the event is declared. Triggering Events An instance event in a class can be triggered by any method in the class. Static events can be triggered by any static method. To trigger an event in a method, use the following statement: RAISE EVENT <evt> EXPORTING... <ei> = <fi>... For each formal parameter <e i> that is not defined as optional, you must pass a corresponding actual parameter <f i> in the EXPORTING addition. The self-reference ME is automatically passed to the implicit parameter SENDER. Handling Events Events are handled using special methods. To handle an event, a method must be defined as an event handler method for that event be registered at runtime for the event.

Difference between global and local class? Local and Global Classes Classes in ABAP Objects can be declared either globally or locally. You define global classes and interfaces in the Class Builder (Transaction SE24) in the ABAP Workbench. They are stored centrally in class pools in the class library in the R/3 Repository. All of the ABAP programs in an R/3 System can access the global classes. Local classes are defined within an ABAP program. Local classes and interfaces can only be used in the program in which they are defined. When you use a class in an ABAP program, the system first searches for a local class with the specified name. If it does not find one, it then looks for a global class. Apart from the visibility question, there is no difference between using a global class and using a local class.

There is, however, a significant difference in the way that local and global classes are designed. If you are defining a local class that is only used in a single program, it is usually sufficient to define the outwardly visible components so that it fits into that program. Global classes, on the other hand, must be able to be used anywhere. This means that certain restrictions apply when you define the interface of a global class, since the system must be able to guarantee that any program using an object of a global class can recognize the data type of each interface parameter. Difference between static method and instance method? Instance Methods You declare instance methods using the METHODS statement. They can access all of the attributes of a class, and can trigger all of the events of the class. Static Methods You declare static methods using the CLASS-METHODS statement. They can only access static attributes and trigger static events. What is friend class? In object-oriented programming to allow access to "private" or "protected" data of a class in another class, the latter class is declared as a friend class. Purpose A friend class has full access to the private data members of a class without being a member of that class. Example A friend class can be declared as shown: class A Unknown macro: { private}

What is static constructor and instance constructor? Static constructor is used to initialize static data members as soon as the class is referenced first time, whereas an instance constructor is used to create an instance of that class with <new> keyword. A static constructor does not take access modifiers or have parameters and can't access any non-static data member of a class. Since static constructor is a class constructor, they are guaranteed to be called as soon as we refer to that class or by creating an instance of that class. You may say, why not initialize static data members where we declare them in the code. Like this : private static int id = 10; private static string name = "jack"; Static data members can certainly be initialized at the time of their declaration but there are times when value of one static member may depend upon the value of another static member. In such cases we definitely need some mechanism to handle conditional initialization of static members. What is abstract class?

A class without a instance is abstract classes. Consists of abstract methods whose implementation is to be provided by the user itself. Abstract classes are classes that contain one or more abstract methods. An abstract method is a method that is declared, but contains no implementation. Abstract classes may not be instantiated, and require subclasses to provide implementations for the abstract methods. What is overriding polymorphism?

Method overriding, in object oriented programming, is a language feature that allows a subclass to provide a specific implementation of a method that is already provided by one of its super-classes. The implementation in the subclass overrides (replaces) the implementation in the super-class. A subclass can give its own definition of methods which also happen to have the same signature as the method in its superclass. This means that the subclass's method has the same name and parameter list as the super-class's overridden method. Constraints on the similarity of return type vary from language to language, as some languages support covariance on return types. Method overriding is an important feature that facilitates polymorphism in the design of object-oriented programs. Some languages allow the programmer to prevent a method from being overridden, or disallow method overriding in certain core classes. This may or may not involve an inability to subclass from a given class. In many cases, abstract classes are designed i.e. classes that exist only in order to have specialized subclasses derived from them. Such abstract classes have methods that do not perform any useful operations and are meant to be overridden by specific implementations in the subclasses. Thus, the abstract super-class defines a common interface which all the subclasses inherit.

1.sapscript and smartforms

Sap script is client dependent and smart form is client independent. Smartforms has Only 1 main window while Sap script has 99 main windows You can not print labels using smart forms

2.BDC and LSMW In BDC we have to take care of field mapping whereas field mapping is taken care by sap in lsmw. BDC is mostly used for customised data upload while LSMW is used for uploading Master data. In BDC we need to write large code but in LSMW small coding is needed.

3. BADI and BAPI BADI is business add ins, it is used to customize the standard business flow BAPI is Business application programming interface. It is nothing but Remote enabled function module which can be called from outside the SAP System. 4.user exit and customer exit

User exit is an include program given by SAP in that you can write your code , It needs Access key from SAP while key is not required in case of customer exit

5. Select single and select up to one row

Select single will fetch only one record while select up to n row. Will fetch n rows from database

6. Normal (Classical) report and ALV report To display the output in classical report you use WRITE Statement. To display the output in ALV we have different function modules and class like REUSE_ALV_GRID_DISPLAY , REUSE_ALV_LIST_DISPLAY and CL_SALV_TABLE. If you run the classical report in background after JOB finished you can see its output which stored in spool, While in case of ALV you need code extra to store the output as it will not generate the spool. 7. ALV list display and ALV grid display

You cannot retrieve the output for the report which is displayed using ALV GRID Display.As spool Request will not be created for the same. While in case of list display Report out put will be there in spool request.

8. Classical and drill down report

In classical report user cannot interact with report whereas in drill down report user can interact with report. Drill down facility is not provided in classical report while in drill down it is provided. If they ask you in detail then tell the interviewer that interact with the report means in drill down report we have one basic list and 20 secondary lists so we can directly go to 5th list or 10th list as per our requirement similarly we can come back to any list. Drill down means showing data in basic list first and when we double click on any field we get summarised list. NOTE:- to go to next list in drill down report use following syntax SY-LSIND = < list number> example: to go to 15th list SY-LSIND = 15 to come to 5th list from 15th list use F3 KEY OR PRESS BACK BUTTON

9. BAPI and RFC function module

BAPI is nothing but remote enabled function module BAPI is provided as a method of business objects

10.sap 4.7 and ECC 6.0 SAP 4.7 is based on Web AS ECC 6.0 is based of Netweaver 7.0.

11. get cursor and hide in interactive report Get cursor will provide the location cursor position in the report While hide is use to pass the data from basic list to secondary list

12.normal function module and RFC You cannot call normal function module from outside the current system while RFC function module can be called from outside the SAP system. 13. Subroutine and function modules.

Subroutine is local to the program while function module is global. To call subroutine from outside its main program you need to write its main program name in the bracket

14.At selection screen and At selection screen output.

At selection screen output is called first All dynamic commands and screen modification is done in AT selection screen output.

15.direct input and batch input The basic difference is validation is not done in direct input by pre defined function while in batch input it is coved. 16.synchronous and asynchronous in BDC

Synchronous mode will wait until the BDC session gets over while asynchronous mode will not wait for that

17.at selection screen and at selection on field name

At selection screen is used to validate the whole screen elements while at selection field is used to validate the particular field.

When you display the error message in at selection on field the focus will be on that particular field while in case of At selection screen the focus will not be on any particular field.

18. PBO and PAI event in module pool

Process Before Output and Process after input. PBO will be called before the screen is displayed to the user while process after input is called once user interact with screen.

19. Stop , check and exit

If you use the STOP statement within an event block, the system stops processing the block Immediately. If you use the EXIT statement within an event block but not in a loop, the system stops Processing the block immediately If you use the CHECK <expr> statement within an event block but not within a loop, and the Condition <expr> is not fulfilled, the system exits the processing block immediately. <expr> can be any logical expression or the name of a selection table. If you specify a selection table and the contents of the corresponding table work are do.

20.free and refresh in internal table

You can use FREE to initialize an internal table (along with header line ) and release its memory space. REFRESH will only initialize an internal table (along with header line)

21.clear and delete. The major difference is clear is used with internal table while delete is used with database table.

22. collect and sum COLLECT <line> INTO <itab>. The statement first checks whether the internal table contains an entry with the same key. If not,it acts like INSERT. If there is already a table entry with the same key, COLLECT does not inserta new line. Instead, it adds the values from the numeric fields of the work area <line> to thevalues in the corresponding fields of the existing table entry.

SUM.Can only be used in loops through internal tables. Calculates the sums of the numeric fields in alllines of the current control level and writes the results to the corresponding fields in the workarea.

23. call transaction and session method

Call transaction is Synchronous Processing while session (classical) method is Asynchronous Processing In call transaction we can update the database both synchronously and asynchronously. We can specify the mode in the program. While in session method it is Synchronous Database update. In call transaction No batch input processing log is maintained while in session method details log is maintained. Call Transaction method is faster than the session method.

24. at first and at last control break event As the name suggest AT FIRST executed for the first time while AT LAST executed in last.

25. Enhancement point and Enhancement Section Both the enhancement-point and section are available for you to change standard SAP code. Difference is in fact that you use Enhancement-point to add ABAP code to standard SAP and enhancement-section to replace/extend standard SAP code. 26.end of page and top of page

Top of page trigger when report encounter the first write, skip or new-line statements. End of page trigger when page size is over or report display gets over.

27. Table and structure Table has physical definition into the underline database while structure does exist physically in the data base. 28. table and views

Table has data init while view does not contain data in it. Both exist in the data base. when u run the view it queries the database and gives the respective data.

29.inner joins and for all entries

Inner join joins the table at database level whereas For..All..Entries joins the table at application level. In For..All..Entries when the condition gets satisfied data is fetched in one single shot from database table whereas in inner join data is fetched iteration by iteration It is always good programming practice to join tables at application level because if we join tables at database level then there might be performance issue

30. Transparent table pool table and cluster table

Transparent Table: Exists with the same structure both in the dictionary and database exactly with same data and fields. its to store transaction data. Its one to one Relation table Pool tables: These are logical tables must be assigned to a table pool when they are defined. Its use to store control data. its many to one relation table Clustered tables: these also logical tables and must be assigned to table cluster when they are defined. Its also used to store control data, temporary data or text ex., documentation. Its also many to one relation table.

31. Top of page and top of page during line selection

Top of page is triggered for the basic list while top of page at line selection triggers at secondary list.

32. Start_form and End_form in sap script

start_form function module is called if we want to use different forms with similar characteristics in a single spool request ,it must be closed by END_FORM function module

33. open dataset and close dataset

Open dataset is use to read / write file into application server while close dataset is use to close that file.

34. data element and domains

Domain gives technical details like length , decimal etc..while data elements gives description and business details

35. set screen and call screen

Set screen <no> set the next screen value and temporarily override the next screen value in screen attribute. While call screen <no> jump to the screen specified in <no>.

36. Internal Session and External Session

External session is nothing but the window you have opened in your screen .By Default you can open 6 external sessions( 6 windows = you can increase it via basiss setting). Internal session is created when you call any Functional module or any other task in your program. counts for internal sessions are 9.

37. Elementary and collective search help

An Elementary Search help defines the flow of a standard input help. It is composed of a selection method that defines where to get the data that will make up the hit list, An interface consisting of search help parameters that define the exchange of data between the screen and the selection method and a dialog type that controls how the hit list will be displayed.

A Collective Search help is a combination of several elementary search helps giving the user a different search paths. The interface parameters of the elementary search help are assigned to the parameters of the collective search.

38. What is the difference between Clustered Tables and Pooled Tables?

A pooled table is used to combine several logical tables in the ABAP/4 dictionary. Pooled tables are logical tables that must be assigned to a table pool when they are defined. Cluster table are logical tables that must be assigned to a table cluster when they are defined. Cluster table can be used to store control data they can also used to store temporary data or text such as documentation.

39. user exits and customer exit.

User exit is sap defined includes so to modify it we need key from SAP.while customer exit like function exit , screen exit we dont need any key.

40. sapscript smart forms and adobe forms

Sapscript is client dependent whereas smartform is client independent. Main window is compulsory in scripts whereas main window not compulsory in form. Smartform output can be seen in web while in scripts it is not possible. smartform generates function module while scripts dont generate function module.

41. screen and subscreens in module pool. Screen has its own gui status while subscreen does not have any gui status.Subscreens are part of main screen.

42. standard table and hashed tables.

Standard table can be accessed by key as well as index while You can only access hashed tables by specifying the key. The system has its own hash algorithm for managing the table.

Potrebbero piacerti anche