TABLES:
sflight.
parameters : p_file like rlgrap-filename.
* header data................................
DATA :
header1 LIKE gxxlt_p-text VALUE 'NAME',
header2 LIKE gxxlt_p-text VALUE 'Excel sheet'.
* Internal table for holding the SFLIGHT data
DATA BEGIN OF t_sflight OCCURS 0.
INCLUDE STRUCTURE sflight.
DATA END OF t_sflight.
* Internal table for holding the horizontal key.
DATA BEGIN OF t_hkey OCCURS 0.
INCLUDE STRUCTURE gxxlt_h.
DATA END OF t_hkey .
* Internal table for holding the vertical key.
DATA BEGIN OF t_vkey OCCURS 0.
INCLUDE STRUCTURE gxxlt_v.
DATA END OF t_vkey .
* Internal table for holding the online text....
DATA BEGIN OF t_online OCCURS 0.
INCLUDE STRUCTURE gxxlt_o.
DATA END OF t_online.
* Internal table to hold print text.............
DATA BEGIN OF t_print OCCURS 0.
INCLUDE STRUCTURE gxxlt_p.
DATA END OF t_print.
* Internal table to hold SEMA data..............
DATA BEGIN OF t_sema OCCURS 0.
INCLUDE STRUCTURE gxxlt_s.
DATA END OF t_sema.
* Retreiving data from sflight.
SELECT * FROM sflight
INTO TABLE t_sflight.
* Text which will be displayed online is declared here....
t_online-line_no = '1'.
t_online-info_name = 'Created by'.
t_online-info_value = 'SURESH KUMAR PARVATHANENI'.
APPEND t_online.
* Text which will be printed out..........................
t_print-hf = 'H'.
t_print-lcr = 'L'.
t_print-line_no = '1'.
t_print-text = 'This is the header'.
APPEND t_print.
t_print-hf = 'F'.
t_print-lcr = 'C'.
t_print-line_no = '1'.
t_print-text = 'This is the footer'.
APPEND t_print.
* Defining the vertical key columns.......
t_vkey-col_no = '1'.
t_vkey-col_name = 'MANDT'.
APPEND t_vkey.
t_vkey-col_no = '2'.
t_vkey-col_name = 'CARRID'.
APPEND t_vkey.
t_vkey-col_no = '3'.
t_vkey-col_name = 'CONNID'.
APPEND t_vkey.
t_vkey-col_no = '4'.
t_vkey-col_name = 'FLDATE'.
APPEND t_vkey.
* Header text for the data columns................
t_hkey-row_no = '1'.
t_hkey-col_no = 1.
t_hkey-col_name = 'PRICE'.
APPEND t_hkey.
t_hkey-col_no = 2.
t_hkey-col_name = 'CURRENCY'.
APPEND t_hkey.
t_hkey-col_no = 3.
t_hkey-col_name = 'PLANETYPE'.
APPEND t_hkey.
t_hkey-col_no = 4.
t_hkey-col_name = 'SEATSMAX'.
APPEND t_hkey.
t_hkey-col_no = 5.
t_hkey-col_name = 'SEATSOCC'.
APPEND t_hkey.
t_hkey-col_no = 6.
t_hkey-col_name = 'PAYMENTSUM'.
APPEND t_hkey.
* populating the SEMA data..........................
t_sema-col_no = 1.
t_sema-col_typ = 'STR'.
t_sema-col_ops = 'DFT'.
APPEND t_sema.
t_sema-col_no = 2.
APPEND t_sema.
t_sema-col_no = 3.
APPEND t_sema.
t_sema-col_no = 4.
APPEND t_sema.
t_sema-col_no = 5.
APPEND t_sema.
t_sema-col_no = 6.
APPEND t_sema.
t_sema-col_no = 7.
APPEND t_sema.
t_sema-col_no = 8.
APPEND t_sema.
t_sema-col_no = 9.
APPEND t_sema.
t_sema-col_no = 10.
t_sema-col_typ = 'NUM'.
t_sema-col_ops = 'ADD'.
APPEND t_sema.
CALL FUNCTION 'XXL_FULL_API'
EXPORTING
* DATA_ENDING_AT = 54
* DATA_STARTING_AT = 5
filename = p_file
header_1 = header1
header_2 = header2
no_dialog = 'X'
no_start = ' '
n_att_cols = 6
n_hrz_keys = 1
n_vrt_keys = 4
sema_type = 'X'
* SO_TITLE = ' '
TABLES
data = t_sflight
hkey = t_hkey
online_text = t_online
print_text = t_print
sema = t_sema
vkey = t_vkey
EXCEPTIONS
cancelled_by_user = 1
data_too_big = 2
dim_mismatch_data = 3
dim_mismatch_sema = 4
dim_mismatch_vkey = 5
error_in_hkey = 6
error_in_sema = 7
file_open_error = 8
file_write_error = 9
inv_data_range = 10
inv_winsys = 11
inv_xxl = 12
OTHERS = 13
.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Saturday, October 11, 2008
Subscribe to:
Post Comments (Atom)
Archives
-
▼
2008
(167)
-
▼
October
(145)
- SAP ALE ABAP DETIAL
- SAP ABAP ALE IDOC'S
- SAP - DIFFERENCE BETWEEN CONVERSION AND INTERFACE
- BAPI AND IDOC ALE
- SAP ABAP MESSAGE CONTORL
- SAP IDOC'S IN ABAP INTRODUCTION
- SAP ABAP IDOC'S OUTLOOK
- SAP ABAP IDOC PROCESSING
- SAP ABAP IDOC'S BASIC TOOLS I
- SAP ABAP IDOC'S BASIC TOOLS II
- SAP ABAP IDOC'S INBOUND BASIC TOOLS III
- SAP IDOC OUT BOUND TRIGGERS II
- SAP IDOCS OUTBOUND TRIGGER II
- SAP IDOC'S OUTBOUND TRIGGER III
- SAP Work flow based outbound Idoc's
- SAP ALE Change Pointers
- SAP Dispatching ALE IDocs for Change Pointers
- SAP IDOC design and Processing
- SAP Creation of the IDoc Data
- SAP Developing an Outbound IDoc Function
- SAP Converting Data into IDoc Segment Format
- SAP Partner Profiles and Ports
- SAP Defining the partner profile for ALE IDOC
- SAP Data Ports ( WE21 ) in idoc
- SAP RFC in R/3
- SAP Workflow from Change Documents
- SAP ALE Distribution Scenario
- SAP Useful ALE Transaction Codes
- BAPI Creating IDocs and ALE Interface
- R/3 RFC from MS Office Via Visual Basic
- SD WORK FLOW SCENARIOS I
- SD WORK FLOW SCENARIOS II
- SD WORK FLOW SCENARIOS III
- SD WORK FLOW SCENARIOS IV
- SD WORK FLOW SCENARIOS V
- SD WORK FLOW SCENARIOS VI
- SD WORK FLOW SCENARIOS VII
- MM WORK FLOW SCENORIOS I
- MM WORK FLOW SCENORIOS II
- MM WORK FLOW SCENORIOS III
- MM WORK FLOW SCENORIOS IV
- MM WORK FLOW SCENORIOS V
- MM WORK FLOW SCENORIOS VI
- MM WORK FLOW SCENARIOS VII
- MM WORK FLOW SCENARIOS VIII
- MM WORK FLOW SCENARIOS IX
- MM WORK FLOW SCENARIOS X
- MM WORK FLOW SCENARIOS XI
- WORK FLOW SCENARIOS in SAP ABAP
- SAP ABAP WORK FLOW I
- SAP ABAP WORK FLOW II
- SAP ABAP WORK FLOW III
- SAP ABAP Work Flow IV
- SAP ABAP Workflow Technology
- SAP OPTIMIZATION
- abap type key ward
- PERFORMENCE TIPS
- SAP ABAP INTERNAL TABLES IN BRIEF
- SAP ABAP RUN TIME ANALASIS
- MEMORY In SAP ABAP
- NAVIGATION In SAP ABAP
- WORK BENCH AND TOOLS In SAP ABAP
- DATA OBJECTS AND STATEMENTS In SAP ABAP
- INTERNAL PROGRAM MODULARIZATION In SAP ABAP
- SAP ABAP CONSITENCEY THROUGH INPUT CHECKS
- RUN TIME ENVIRONMENT In SAP ABAP
- SAP ABAP INTER TABLE OPERATIONS
- STATEMENTS In SAP ABAP
- SAP ABAP INTERNAL TABLES
- SAP ABAP SUB ROUTIENS
- SAP ABAP FUNCTION MODULES AND GROUPS
- SAP ABAP QUARY ADMINSTRATION
- SAP ABAP SAVING LISTS AND BACK GROUND PROCESSING
- SAP ABAP PROGRAM INTERFACE
- SAP ABAP LOCK CONCEPT
- SAP ABAP AUTHORISATION CHECKS
- SAP ABAP PERFORMENCE TIPS
- In SAP SYSTEM FIELDS
- SAP ABAP CONTROL BLOCKS
- SAP ABAP BUFFERING
- SAP ABAP MATCH CODE OBJECTS
- SAP ABAP LOCKS
- SAP SAMPLE CODE FOR OUTPUT TO EXCEL AND IN PUT FIL...
- SAP MULTIPLE INTERACTIVE REPORT SAMPLE CODE
- MULTIPLE INTERACTIVE REPORT SAMPLE CODE II
- CALLING PROGRAM AND PASSING DATA
- SAP TECHNIQUES FOR LIST CREATION AND SAP QUARY
- SAP SELECTION SCREENS ABAP REPORT
- SAP ABAP FAQ ON SCRIPTS I
- SAP ABAP FAQ ON SCRIPTS II
- SAP ABAP FAQ ON SCRIPTS III
- IN SAP ABAP TABLE TYPES
- SAP ABAP TYPES OF VIEWS
- SAP ABAP DATA BASE UPDATES COMPLETE
- SAP ABAP LOCK CONCEPT
- SAP ORGANIZING DATABASE UPDATES
- SAP ENHANCEMENTS TO DICTIONERY ELEMENTS
- DATA BASE DIALOG IN ABAP
- ABAP DICTIONARY I
- PERFORMANCE DURING TABLE ACCESS
-
▼
October
(145)
No comments:
Post a Comment