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 SAP ALV Grid Tutorial. Show all posts
Showing posts with label SAP ALV Grid Tutorial. Show all posts
Thursday, February 12, 2009
Tuesday, February 10, 2009
Subscribe to:
Posts (Atom)
Archives
-
▼
2009
(86)
-
▼
February
(58)
- Vb codes (or VBA macro code) for access SAP, and r...
- An Introduction to SAP
- sap abap program for Upload Logo for REUSE_ALV_COM...
- What is SLIS in sap abap ALV
- How to Refresh ALV List/Grid once it is displayed?
- sap abap ALV 'Classic' Creating User/Global Layout...
- How to use ALV for Hierarchical Lists
- sap abap program for Sample ALV: Heading in ALV
- sap abap program for Test ALV Display With Header ...
- Sample programs on sap abap ALV Grid
- what is abap REUSE_ALV_GRID_DISPLAY Functions Example
- Display a Secondary List using ALV Grid
- sap abap program for Line Color in ALV Example
- sap abap program for How to make ALV header like t...
- sap abap program for Use Simple ALV Functions to M...
- sap abap ALV Reporting - Z_LIST_MATERIALS
- sap abap program for Reincarnation of REUSE_ALV_FI...
- ALV Reporting - REUSE_ALV_BLOCK_LIST_DISPLAY
- sap abap program for An Interactive ALV Report
- sap abap program for Example of a Simple ALV Grid ...
- ABAP Example Program ALV Grid Control
- What Are The Events In abap ALV
- abap program for Creation Of Active Icon
- using alv grid real time implementation
- Adding custom buttons on ALV grid controls
- SAP free download book on ALV grid Control Tutorial
- SAP Highlighting only a particular cell instead of...
- SAP ALV - Details of Y/Z objects with lists of use...
- SAP ALV report to find the list of infotypes confi...
- SAP ALV Report using REUSE
- ALV ABAP List Viewer
- What is ALV Programming in sap abap?
- SAP ALV Function Modules
- All the SAP Online Help in PDFs
- All the SAP Online Help in PDFs A-C
- All the SAP Online Help in PDFs D-M
- All the SAP Online Help in PDFs N-S
- All the SAP Online Help in PDFs T-Z
- PDF freedownloads for all module books
- PDF free download ALE Programming Guide
- PDF free download ALE Programming Guide
- ABAP ALE Tutorials PDF Free downloads
- PDF Free Download Advance Payments
- Adding additional fields to Delivery Due List
- PDF Free Download Actual Costing / Material Ledger
- PDF Book free download activity-Based Costing
- Free Download Activity-Based Costing CO-OM-ABC
- SAP Activity-Based Costing pdf free download
- SAP Activities/Strategies in FI
- SAP ABAP program OR implementation: Accounting Doc...
- Accessing BAPI using VB PPT free download
- SAP ABAP4 Tuning Checklist
- sap abap/4 sample codes
- SAP ABAP/4 programming language overview
- SAP ABAP/4 Optimization Techniques
- ABAP/4 OLE Automation Controller pdf book free dow...
- ABAP/4 OLE Automation Controller pdf free download
- Questions and Answers about ABAP/4 and Developments
-
▼
February
(58)