TYPE-POOLS: slis.
TABLES : ekko, ekpo.
DATA : BEGIN OF i_ekko OCCURS 0,
ebeln LIKE ekko-ebeln,
ernam LIKE ekko-ernam,
bsart LIKE ekko-bsart,
var1,
END OF i_ekko.
DATA : BEGIN OF i_ekpo OCCURS 0,
ebeln LIKE ekpo-ebeln,
ebelp LIKE ekpo-ebelp,
matnr LIKE ekpo-matnr,
aedat LIKE ekpo-aedat,
var2,
END OF i_ekpo.
DATA : BEGIN OF i_final OCCURS 0,
ebeln LIKE ekko-ebeln,
ernam LIKE ekko-ernam,
bsart LIKE ekko-bsart,
ebelp LIKE ekpo-ebelp,
matnr LIKE ekpo-matnr,
aedat LIKE ekpo-aedat,
END OF i_final.
SELECT-OPTIONS : S_EBELN FOR EKKO-EBELN.
DATA : fcat TYPE slis_t_fieldcat_alv, "FIELDCATALOG(TABLE)
* fcat1 TYPE slis_t_fieldcat_alv, "FIELDCATALOG(TABLE)
cat TYPE slis_fieldcat_alv. "FIELDCATALOG(WORK AREA)
DATA : LAYOUT1 TYPE SLIS_LAYOUT_ALV, "LAYOUT 1
* LAYOUT2 TYPE SLIS_LAYOUT_ALV, "LAYOUT 2
KEY TYPE SLIS_KEYINFO_ALV , "KEY INFORMATION
GT_EVENT1 TYPE SLIS_T_EVENT.
START-OF-SELECTION.
PERFORM GETTING_DATA.
PERFORM append_field.
CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-CPROG
IS_LAYOUT = LAYOUT1
IT_FIELDCAT = FCAT
* IT_EVENTS = GT_EVENT1
i_tabname_header = 'I_EKKO'
i_tabname_item = 'I_EKPO'
is_keyinfo = KEY
tables
t_outtab_header = I_EKKO
t_outtab_item = I_EKPO.
*&---------------------------------------------------------------------
*
*& Form GETTING_DATA
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text *----------------------------------------------------------------------* FORM GETTING_DATA . SELECT EBELN BSART ERNAM UP TO 100 ROWS INTO CORRESPONDING FIELDS OF TABLE I_EKKO FROM EKKO WHERE EBELN IN S_EBELN. SELECT EBELN EBELP MATNR AEDAT INTO CORRESPONDING FIELDS OF TABLE I_EKPO FROM EKPO FOR ALL ENTRIES IN I_EKKO WHERE EBELN = I_EKKO-EBELN . SORT I_EKKO BY EBELN. LOOP AT I_EKKO. READ TABLE I_EKPO WITH KEY EBELN = I_EKKO-EBELN. IF SY-SUBRC EQ 0. MOVE: I_EKKO-EBELN TO I_FINAL-EBELN, I_EKKO-BSART TO I_FINAL-BSART, I_EKKO-ERNAM TO I_FINAL-ERNAM, I_EKPO-EBELP TO I_FINAL-EBELP, I_EKPO-MATNR TO I_FINAL-MATNR, I_EKPO-AEDAT TO I_FINAL-AEDAT. APPEND I_FINAL. ENDIF. ENDLOOP. ENDFORM. " GETTING_DATA *&---------------------------------------------------------------------* *& Form APPEND_FIELD *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * --> p1 text
* <-- p2 text *----------------------------------------------------------------------* FORM append_field . CLEAR cat. cat-col_pos = 1. cat-fieldname = 'EBELN'. cat-tabname = 'I_EKKO'. cat-ref_fieldname = 'EBELN'. cat-ref_tabname = 'EKKO'. cat-key = 'X'. "define field as key APPEND cat TO fcat. CLEAR cat. cat-col_pos = 2. cat-fieldname = 'BSART'. cat-tabname = 'I_EKKO'. cat-ref_fieldname = 'BSART'. cat-ref_tabname = 'EKKO'. APPEND cat TO fcat. CLEAR cat. cat-col_pos = 3. cat-fieldname = 'ERNAM'. cat-tabname = 'I_EKKO'. cat-ref_fieldname = 'ERNAM'. cat-ref_tabname = 'EKKO'. APPEND cat TO fcat. CLEAR cat. cat-col_pos = 4. cat-fieldname = 'EBELP'. cat-tabname = 'I_EKPO'. cat-ref_fieldname = 'EBELP'. cat-ref_tabname = 'EKPO'. cat-key = 'X'. "define field as key APPEND cat TO fcat. CLEAR cat. cat-col_pos = 5. cat-fieldname = 'MATNR'. cat-tabname = 'I_EKPO'. cat-ref_fieldname = 'MATNR'. cat-ref_tabname = 'EKPO'. APPEND cat TO fcat. CLEAR cat. cat-col_pos = 6. cat-fieldname = 'AEDAT'. cat-tabname = 'I_EKPO'. cat-ref_fieldname = 'AEDAT'. cat-ref_tabname = 'EKPO'. APPEND cat TO fcat. CLEAR cat. layout1-expand_fieldname = 'VAR1'. layout1-lights_fieldname = '3'. layout1-lights_tabname = 'I_EKPO'. key-header01 = 'EBELN'. key-item01 = 'EBELN'. ENDFORM. " APPEND_FIELD
Wednesday, October 1, 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