Application Development and Automation 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: 
Read only

ABAP OBJECTS

Former Member
0 Likes
697

hi friends i want to know abt the abap objects and some predefined global classes like cl_gui_alv_grid and son on..

can any tell me abt the links where it is available and some examples

thanks regards

ramesh

1 ACCEPTED SOLUTION
6 REPLIES 6
Read only

sonu_p2
Active Participant
0 Likes
650

Hello,

Refer to links below :-

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/0a33479c-0b01-0010-7485-dc8c09d6...

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/abap/abap-tutors/advanced%20abap...

-


Here is the definition for ALV from SAP Help:

“The ALV Grid control is a flexible tool for displaying lists. The tool provides common list operations as generic functions and can be enhanced by self-defined options.”

The ALV Grid control is used to build non-hierarchical, interactive, and modern-design lists. As a control, it is a component that is installed on the local PC.

The ALV Grid control provides typical list functions as sorting, filtering, summing, etc.,while also gives the opportunity to develop user functions where needed. It presents numerous interfaces like Excel Inplace and Crystal Reports.

The wrapper class implemented to encapsulate ALV Grid functionality is “CL_GUI_ALV_GRID”. There is another way to display lists with ALV utilizing “REUSE_ALV...” functions. However, that way is not comprised in this tutorial.

<b>

Reward points if helpful.</b>

Cheers,

Sachin

Read only

Former Member
0 Likes
650

Hi Ramesh,

Welcome to SDN.

You can refer documents that I have uploaded in the link...

http://esnips.com/web/OOP

http://esnips.com/web/ALV

Hope this helps you.

Regards,

SP.

Read only

Former Member
0 Likes
650

Hi Ramesh,

Go trough this URLs: I am giving one example.

Check this for basic concepts of OOPS

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20...

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20...

Program .

REPORT YSIMPLEALVINTERACTIVE .

TABLES : VBAK,VBAP,LIKP,VBRK,VTTK.

PARAMETERS : P_KUNNR LIKE VBAK-KUNNR.

SELECT-OPTIONS: S_VBELN FOR VBAK-VBELN,

S_ERDAT FOR VBAK-ERDAT.

DATA:WA TYPE YLINE22,

ITAB TYPE YROW22.

DATA : REPID LIKE SY-REPID,

CONTAINER TYPE SCRFNAME VALUE 'ALVCONTROL',

CUST TYPE REF TO CL_GUI_CUSTOM_CONTAINER,

GRID TYPE REF TO CL_GUI_ALV_GRID.

*CLASS DEFINITATION.

CLASS CL_GRID DEFINITION.

PUBLIC SECTION .

METHODS: DC FOR EVENT DOUBLE_CLICK OF CL_GUI_ALV_GRID IMPORTING

E_ROW E_COLUMN.

ENDCLASS. "

*CLASS IMPLEMENTATION.

CLASS CL_GRID IMPLEMENTATION.

METHOD DC.

DATA : WA1 TYPE YLINE22.

READ TABLE ITAB INDEX E_ROW-INDEX INTO WA1.

SET PARAMETER ID 'AVN' FIELD WA1-VBELN.

CALL TRANSACTION 'VA02' AND SKIP FIRST SCREEN .

ENDMETHOD. "DC

ENDCLASS. "CL_GRID IMPLEMENTATION

  • CALLING CLASS.

DATA : OBJ_CL_GRID TYPE REF TO CL_GRID.

START-OF-SELECTION.

PERFORM CALLSUB.

IF SY-SUBRC = 0.

CALL SCREEN 100.

ELSE.

MESSAGE I000(0) WITH 'no data for your salesorder'.

ENDIF.

&----


*& Module STATUS_0100 OUTPUT

&----


  • text

----


MODULE STATUS_0100 OUTPUT.

  • SET PF-STATUS 'xxxxxxxx'.

  • SET TITLEBAR 'xxx'.

REPID = SY-REPID.

IF CUST IS INITIAL.

CREATE OBJECT CUST EXPORTING CONTAINER_NAME = CONTAINER .

CREATE OBJECT GRID EXPORTING I_PARENT = CUST.

CALL METHOD GRID->SET_TABLE_FOR_FIRST_DISPLAY

EXPORTING

I_STRUCTURE_NAME = 'YLINE22'

CHANGING

IT_OUTTAB = ITAB.

CREATE OBJECT OBJ_CL_GRID.

SET HANDLER OBJ_CL_GRID->DC FOR GRID.

ENDIF.

ENDMODULE. " STATUS_0100 OUTPUT

FORM CALLSUB.

SELECT VBAPVBELN VBAPKWMENG VBAPNETWR LIPSERDAT VTTP~ERDAT

VBRK~FKDAT INTO TABLE ITAB FROM VBAK

INNER JOIN VBAP ON VBAKVBELN = VBAPVBELN INNER JOIN LIPS ON VBAP~VBELN

= LIPSVGBEL INNER JOIN VTTP ON LIPSVBELN = VTTP~VBELN INNER JOIN VBRP

ON LIPSVBELN = VBRPVGBEL INNER JOIN VBRK ON VBRKVBELN = VBRKVBELN

WHERE

VBAK~KUNNR = P_KUNNR AND

VBAKVBELN IN S_VBELN AND VBAKERDAT IN S_ERDAT.

ENDFORM. "CALL

&----


*& Module USER_COMMAND_0100 INPUT

&----


  • text

----


MODULE USER_COMMAND_0100 INPUT.

CASE SY-UCOMM.

WHEN'EXIT'.

LEAVE PROGRAM.

ENDCASE.

ENDMODULE.

Editable ALV

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20...

Tree

http://www.sapdevelopment.co.uk/reporting/alv/alvtree/alvtree_usrint.htm

General Tutorial for OOPS

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/an%20ea...

              • rewards for good answers.

Regards,

P.Naganjana Reddy

Read only

Former Member
0 Likes
650

Hi Thammineni Ramesh

https://www.

sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/0a33479c-0b01-0010-7485-dc8c09d6bc69

Read only

Former Member
0 Likes
650

thanks to all