Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

When the Top of Page will trigger in ALV report

Former Member
0 Kudos

Hi,

1.When the Top of Page will trigger in ALV report

2.Why session method is slow and Call transaction method is fast

3.What is the difference b/w class and interface

If helpfull will be award

3 REPLIES 3

Former Member
0 Kudos

session is sychrones .call transcation asychrones.

session one way of data flow. half dupliex

call tr two (fill dupliex).

Interface :

Interface are special type of classes in which we can only give the declarations of Methods,Properties ,Indexers and events.

It is a contract for the class implementing the interface to give the definations for all the Methods and Properties.

Access modifiers are not allowed. By deafult everything is Public.

Multiple Inheritance can be achieved through it.

Abstract Class:

In abstract class atleast one method is Abstract. i.e without a defination. Other metods can be concrete.

Access modifiers are allowed in case of Abstract Class.

Also we can only achieve single Inheritance and multilevel Inheritance.

Former Member
0 Kudos

hi,

top of page will be trigerred when u display your alv report.

when using alv grid display, you can set the export parameter for top-of-page or use it_events.

reward if useful..

Former Member
0 Kudos

Hi

<b>1.When the Top of Page will trigger in ALV report</b>

when ever a new page starts in the output the top of page will trigger

Check this.

http://www.sap-img.com/abap/sample-alv-heading-in-alv.htm

<b>2.Why session method is slow and Call transaction method is fast</b>

Processing batch input data with CALL TRANSACTION USING is the faster of the two recommended data transfer methods. In this method, legacy data is processed inline in your data transfer program.

Call Transaction method makes an immediate call on the transaction and upload starts immediately.,

Session method only creates a session of the whole recording including all the values that have to be inserted,it does not insert values into the system. This session can be invoked anytime to upload values

In short call transaction is immediates

session is not immediate

Synchronous is simoultaneous upload

DO.

………

PERFORM FILL_BDC_TAB.

CALL TRANSACTION ‘FK02’

USING BDC_TAB

MODE ‘N’

UPDATE ‘S’.

IF SY-SUBRC < > 0.

WRITE: /‘ERROR’.

ENDIF.

ENDDO.

With synchronous updating, we can check SY-SUBRC to determine the success of the transaction and the actual update to the database.

Asynchornous is non-simultaneous upload

DO.

………

PERFORM FILL_BDC_TAB.

CALL TRANSACTION ‘FK02’

USING BDC_TAB

MODE ‘N’

UPDATE ‘A’.

IF SY-SUBRC < > 0.

WRITE: /‘ERROR’.

ENDIF.

ENDDO.

With asynchronous updating, we can check SY-SUBRC to determine the success of the transaction only, not the actual update to the database.

<b>3.What is the difference b/w class and interface</b>

Abstract classes

Abstract classes are normally used as an incomplete blueprint for concrete (that is, non-abstract) subclasses, for example to define a uniform interface.

Classes with at least one abstract method are themselves abstract.

Static methods and constructors cannot be abstract.

You can specify the class of the instance to be created explicitly: CREATE OBJECT <RefToAbstractClass> TYPE <NonAbstractSubclassName>.

Abstarct classes themselves can’t be instantiated ( althrough their subclasses can)

Reference to abstract classes can refer to instance of subclass

Abstract (instance) methods are difined in the class , but not implemented

They must be redefined in subclasses

CLASS LC1 DEFINAITION ABSTARCT

PUBLIC SECTION

METHODS ESTIMATE ABSTARCT IMPORTING…

ENDCLASS.

Interfaces

Interfaces only describe the external point of contact of a class (protocols), they do not contain any implementation.

Interfaces are usually defined by a user. The user describes in the interface which services (technical and semantic) it needs in order to carry out a task.

The user never actually knows the providers of these services, but communicates with them through the interface.

In this way the user is protected from actual implementations and can work in the same way with different classes/objects, as long as they provide the services required. This is known as polymorphism with interfaces.

Interfaces features

INTERFACE I_COUNTER.

METHODS: SET_COUNTER IMPORTING VALUE(SET_VALUE) TYPE I, INCREMENT_COUNTER, ENDINTERFACE.

CLASS C_COUNTER1 DEFINITION. PUBLIC SECTION.

INTERFACES I_COUNTER.

PRIVATE SECTION.

DATA COUNT TYPE I.

ENDCLASS.

CLASS C_COUNTER1 IMPLEMENTATION.

METHOD I_COUNTER~SET_COUNTER.

COUNT = SET_VALUE.

ENDMETHOD.

METHOD I_COUNTER~INCREMENT_COUNTER.

ADD 1 TO COUNT.

ENDMETHOD.

ENDCLASS.