REPORT ZALV .
type-pools : slis.
tables : spfli,SFLIGHT.
data : begin of itab occurs 0,
carrid like spfli-carrid,
connid like spfli-connid,
end of itab.
CONSTANTS:
GC_FORMNAME_TOP_OF_PAGE TYPE SLIS_FORMNAME VALUE 'TOP_OF_PAGE'.
data : g_fieldcat type slis_t_fieldcat_alv,
GS_LAYOUT TYPE SLIS_LAYOUT_ALV,
g_repid like sy-repid,
GT_EVENTS TYPE SLIS_T_EVENT,
g_layout type slis_layout_alv,
GS_KEYINFO TYPE SLIS_KEYINFO_ALV,
G_TABNAME_HEADER TYPE SLIS_TABNAME,
G_TABNAME_ITEM TYPE SLIS_TABNAME.
data : itab1 like sflight occurs 0 with header line.
g_repid = sy-repid.
select carrid connid into corresponding fields of table itab from
spfli.
G_TABNAME_HEADER = 'ITAB'.
G_TABNAME_ITEM = 'ITAB1'.
CLEAR GS_KEYINFO.
GS_KEYINFO-HEADER01 = 'CARRID'.
GS_KEYINFO-ITEM01 = 'CARRID'.
LOOP AT ITAB.
SELECT * FROM SFLIGHT WHERE CARRID = ITAB-CARRID.
MOVE-CORRESPONDING SFLIGHT TO ITAB1.
APPEND ITAB1.
CLEAR ITAB1.
ENDSELECT.
IF SY-SUBRC EQ 0.
EXIT.
ENDIF.
ENDLOOP.
PERFORM E03_EVENTTAB_BUILD USING GT_EVENTS[].
perform pc_fld using :
1 1 'CARRID' 'CARRIER' 10 ' H' 'ITAB',
1 2 'CONNID' 'CONNECTIONID' 04 ' H' 'ITAB',
2 1 'FLDATE' 'FLIGHT DET' 10 ' H' 'ITAB1',
2 2 'PRICE' 'PRICING DET' 20 ' H' 'ITAB1'.
GS_LAYOUT-F2CODE = '&ETA'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
* I_INTERFACE_CHECK = ' '
I_CALLBACK_PROGRAM = g_repid
* I_CALLBACK_PF_STATUS_SET = ' '
i_callback_user_command = 'ABCDEF'
IS_LAYOUT = GS_LAYOUT
IT_FIELDCAT = G_FIELDCAT
* IT_EXCLUDING =
* IT_SPECIAL_GROUPS =
* IT_SORT =
* IT_FILTER =
* IS_SEL_HIDE =
* I_SCREEN_START_COLUMN = 0
* I_SCREEN_START_LINE = 0
* I_SCREEN_END_COLUMN = 0
* I_SCREEN_END_LINE = 0
* I_DEFAULT = 'X'
* I_SAVE = ' '
* IS_VARIANT =
IT_EVENTS = GT_EVENTS[]
* IT_EVENT_EXIT =
*I_TABNAME_HEADER = G_TABNAME_HEADER
*I_TABNAME_ITEM = G_TABNAME_ITEM
* I_STRUCTURE_NAME_HEADER =
* I_STRUCTURE_NAME_ITEM =
*IS_KEYINFO = GS_KEYINFO
* IS_PRINT =
* IS_REPREP_ID =
* I_BUFFER_ACTIVE =
* I_BYPASSING_BUFFER =
* IMPORTING
* E_EXIT_CAUSED_BY_CALLER =
* ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = ITAB
*T_OUTTAB_ITEM = ITAB1
* EXCEPTIONS
* PROGRAM_ERROR = 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.
* -----------------------------------------------------------*
form ABCDEF using r_ucomm like sy-ucomm rs_selfield type
slis_selfield.
* -----------------------------------------------------------*
case r_ucomm.
when '&IC1'.
read table itab index rs_selfield-tabindex.
if sy-subrc eq 0.
write : / 'sdfdsf'.
endif.
CLEAR r_ucomm.
endcase.
endform.
*&---------------------------------------------------------------------*
*& Form pc_fld
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->P_1 text
* -->P_1 text
* -->P_0057 text
* -->P_0058 text
* -->P_10 text
* -->P_0060 text
* -->P_0061 text
*----------------------------------------------------------------------*
FORM pc_fld USING L P F D O R T.
DATA : T_FLD TYPE SLIS_FIELDCAT_ALV.
CLEAR T_FLD.
MOVE : L TO T_FLD-ROW_POS.
MOVE : P TO T_FLD-COL_POS.
MOVE : F TO T_FLD-FIELDNAME.
MOVE D TO : T_FLD-SELTEXT_L,
T_FLD-SELTEXT_M,
T_FLD-SELTEXT_S.
MOVE 'L' TO T_FLD-DDICTXT.
MOVE O TO T_FLD-OUTPUTLEN.
MOVE T TO T_FLD-TABNAME.
MOVE ' ' TO T_FLD-DO_SUM.
APPEND T_FLD TO G_FIELDCAT.
ENDFORM. " pc_fld
*---------------------------------------------------------------------*
* FORM E03_EVENTTAB_BUILD *
*---------------------------------------------------------------------*
* ........ *
*---------------------------------------------------------------------*
* --> E03_LT_EVENTS *
*---------------------------------------------------------------------*
FORM E03_EVENTTAB_BUILD USING E03_LT_EVENTS TYPE SLIS_T_EVENT.
DATA: LS_EVENT TYPE SLIS_ALV_EVENT.
*
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = E03_LT_EVENTS.
READ TABLE E03_LT_EVENTS WITH KEY NAME = SLIS_EV_TOP_OF_PAGE
INTO LS_EVENT.
IF SY-SUBRC = 0.
MOVE GC_FORMNAME_TOP_OF_PAGE TO LS_EVENT-FORM.
APPEND LS_EVENT TO E03_LT_EVENTS.
ENDIF.
ENDFORM.
Showing posts with label alv grid real time implementation. Show all posts
Showing posts with label alv grid real time implementation. Show all posts
Friday, November 23, 2007
using alv grid real time implementation
Subscribe to:
Posts (Atom)
Blog Archive
-
▼
2009
(81)
-
▼
June
(81)
- Lists in Unicode Systems
- The File Interface in Unicode Programs
- Character String and Byte String Processing in Uni...
- Structure Enhancements and Unicode Programs
- Structure Typing in Unicode Programs
- Conversion of Structures in Unicode Programs
- Access to memory sequences in Unicode programs
- Offset and Length Specifications in Unicode Programs
- Alignment in Unicode Systems
- Operand Types in Unicode Programs
- Names in Unicode Programs
- Comments and Literals in Non-Unicode Programs
- Differences between Unicode and Non-Unicode Programs
- Unicode - Overview
- Statements in Class and Interface Pools
- Statements for Defining Classes and Interfaces
- ABAP Objects - Keywords
- Inheritance Events
- Inheritance and Events
- Inheritance and Instantiation
- Inheritance and Constructors
- Inheritance and Static Components
- Inheritance and the Component Namespace
- Inheritance and Visibility
- Inheritance and Interfaces
- Inheritance and Polymorphism
- Abstract and Final Methods and Classes
- Redefining Methods
- Inheritance
- Definition of Classes and Interfaces
- Object Orientation
- CLASS-METHODS - FOR EVENT
- CLASS-METHODS - class_constructor
- CLASS-METHODS - RETURNING
- METHODS - IMPORTING, EXPORTING, CHANGING, RAISING
- CLASS-METHODS - IMPORTING, EXPORTING, CHANGING, RA...
- CLASS-METHODS
- Kernel Methods
- The C Destructor in Methods
- Interface Parameters in Methods
- Data Types and Constants
- Events In Components of classes
- Constructors In Components of Classes
- Methods in Components of classes
- Attributes
- Visibility Sections in Classes
- Components of Classes
- Classes
- ABAP Objects
- ABAP Programming Language - Overview
- Example of a Logical Database
- Logical Databases
- Position of the Basis System Within the R/3 System
- Running ABAP Programs
- Calling ABAP Dialog Modules
- Data Types in the ABAP Dictionary
- Pushbuttons on the Screen
- Processing Input/Output Fields
- Processing Screen
- Screens
- ABAP User Dialogs
- Reduce the Database Load
- Minimize the Search Overhead
- Minimize the Number of Data Transfers
- Minimize the Amount of Data Transferred
- Keep the Result Set Small
- Performance Notes
- Committing Database Changes
- Inserting or Changing Lines
- Deleting Lines
- Changing Line
- Inserting Lines into Tables
- Changing Data
- Reading Data
- Open SQL
- Checking User Authorizations
- Accessing the Database in the R/3 System
- ABAP Database Access
- ABAP HR Programming
- ABAP Tutorials for Beginners
- Download Abap certification material
-
▼
June
(81)
