SlideShare a Scribd company logo
1 of 65
ABAP Advanced List ,[object Object],[object Object]
Types of ABAP Report 1. Report Listing 2. Drill-down Report 3. Control-break Report 4. ALV Report 1 3 4
Internal Table Processing Technique Control-Break Report
Control Break Report Technique ,[object Object],[object Object],[object Object],[object Object],ENDAT ,[object Object]
Program Structure ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],tab qty name
Example I sales 20 A 30 A 5 B 10 B 10 A qty name
Example I ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Example I ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Example II sales 20 A 30 A 5 B 10 B 10 A qty name
Example II ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Exercise I ZSALES 50 20020329 A1 1 100 20020319 A1 1 50 20020318 A2 1 90 200 10 qty 20020321 X1 3 20020329 A2 1 20020318 A1 1 sale_date prod_id cust_id
Exercise I ID Product ID  Quantity 1 A1   10 A1   100 A1   50 A2   50 A2   200 ------------------------------ Total  410 3 X1  90 ------------------------------ Total  90 ------------------------------ Grand Total  500 ----------------------------------
Example Data for Example III ,[object Object],BK NY BK cityto 250 SQ 0110 SQ 540  BK 0402 LH 100 NY 0400 LH distance Cityfrom Connid Carrid
Example III ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],LH 0400 0402 ___________ SQ 0110 ___________
Internal Table Processing Example tab(internal table) 100.00 100.00 100.00 03 B 2 1,000.00 100.00 100.00 400.00 YTD 02 03 02 01 prodno 2,000.00 100.00 B 2 100.00 100.00 A 1 100.00 50.00 A 1 1,000.00 100.00 A 1 Accum Month Name ID
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],ABAP Program
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],ABAP Program
Exercise II ZSALES ZCUSTOMERS Singapore David 3 London Peter 2 New York John 1 city name id 50 20020329 A1 1 100 20020319 A1 1 50 20020318 A2 1 90 200 10 qty 20020321 X1 3 20020329 A2 1 20020318 A1 1 sale_date prod_id cust_id
Exercise II ID  Name ____ Product ID  Quantity 1  John A1   10 A1   100 A1   50 A2   50 A2  200 ---------------------------- Total  410 3  Peter X1    90 ---------------------------- Total  90 ---------------------------- Grand Total  500 -------------------------------
Control Break Report > 1 Level tab Loop at tab. … at new f1. … endat. at new f2. … endat. write: / …  “normal data at end of f2. … endat. at end of f1. … endat. … Endloop. sort tab by f1 f2. Group Header Level 1 Group Header Level 2 Sub Total Level 2 Sub Total Level 1 2 1 A 1 2 A 1 2 B 2 2 B 4 3 C 3 3 B 1 1 A f3 f2 f1
Example IV (Control-break 2 Levels) sales 20070126 20070126 20070128 20070126 20070126 date 20 A 30 A 5 B 10 B 10 A qty name
Example IV (Control-break 2 Levels) … AT NEW NAME. WRITE: / SALES-NAME. ULINE: /(5). ENDAT. AT NEW DATE. WRITE: /10 SALES-DATE. ULINE: /10(10). ENDAT. WRITE: /30 SALES-QTY. AT END OF DATE. ULINE: /(50). SUM. WRITE: /15 'Sub Total(Date)' ,30 SALES-QTY COLOR COL_TOTAL. ENDAT. AT END OF NAME. ULINE: /(50). SUM. WRITE: /5 'Sub Total(Name)' ,30 SALES-QTY COLOR COL_TOTAL. ENDAT. …
Exercise III ZSALES 50 20020329 A1 1 100 20020319 A1 1 50 20020318 A2 1 90 200 10 qty 20020321 X1 3 20020329 A2 1 20020318 A1 1 sale_date prod_id cust_id
Exercise III
ALV Report
ALV Report ,[object Object],[object Object]
ALV Grid Listing ,[object Object]
ALV Grid Listing Example ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
ALV Example I List/Grid Display
ALV List/Grid Display REPORT ZALV02 NO STANDARD PAGE HEADING. PARAMETERS: list radiobutton group grp1, grid radiobutton group grp1. DATA: gt_tab LIKE sflight OCCURS 0 WITH HEADER LINE. START-OF-SELECTION. SELECT * FROM sflight INTO TABLE gt_tab. IF list = 'X'. * Call ALV List Viewer CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY' EXPORTING I_STRUCTURE_NAME  = 'SFLIGHT' TABLES T_OUTTAB    = GT_TAB. ELSE. * Call ALV Grid Viewer CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY' EXPORTING I_STRUCTURE_NAME  = 'SFLIGHT' TABLES T_OUTTAB  = GT_TAB. ENDIF..
ALV Report : Exercise I
ALV Example II Using Field Catalog
ALV Field Catalog REPORT ZALV03 NO STANDARD PAGE HEADING. type-pools slis. types: begin of i_structure, carrid like sflight-carrid, connid like sflight-connid,  fldate like sflight-fldate, price  like sflight-price, end of i_structure. data: gt_fieldcat type slis_t_fieldcat_alv, gt_outtab type i_structure occurs 0 with header line. initialization. perform field_cat_init using gt_fieldcat[].
ALV Field Catalog FORM field_cat_init using rt_fieldcat type slis_t_fieldcat_alv. data: ls_fieldcat type slis_fieldcat_alv, pos type i value 1. clear LS_FIELDCAT. *Column 1 ls_fieldcat-col_pos  = pos. ls_fieldcat-fieldname  = ' CARRID '. ls_fieldcat-ref_fieldname  = ' CARRID '. ls_fieldcat-ref_tabname  = ' SFLIGHT '. ls_fieldcat-key  = 'X'. append ls_fieldcat to rt_fieldcat. clear ls_fieldcat. pos = pos + 1.
ALV Field Catalog *Column 2 ls_fieldcat-col_pos  = pos. ls_fieldcat-fieldname  = ' CONNID '. ls_fieldcat-ref_fieldname  = ' CONNID '. ls_fieldcat-ref_tabname  = ' SFLIGHT '. ls_fieldcat-key  = 'X'. append ls_fieldcat to rt_fieldcat. clear ls_fieldcat. pos = pos + 1. *Column 3 ls_fieldcat-col_pos  = pos. ls_fieldcat-fieldname  = ' FLDATE '. ls_fieldcat-ref_fieldname  = ' FLDATE '. ls_fieldcat-ref_tabname  = ' SFLIGHT '. ls_fieldcat-key  = 'X'. append ls_fieldcat to rt_fieldcat. clear ls_fieldcat. pos = pos + 1.
ALV Field Catalog *Column 4 ls_fieldcat-col_pos  = pos. ls_fieldcat-fieldname  = ' PRICE '. ls_fieldcat-ref_fieldname  = ' PRICE '. ls_fieldcat-ref_tabname  = ' SFLIGHT '. append ls_fieldcat to rt_fieldcat. clear ls_fieldcat. pos = pos + 1. endform.
ALV Field Catalog START-OF-SELECTION. SELECT  carrid connid fldate price   FROM  SFLIGHT   INTO TABLE GT_OUTTAB. CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY' EXPORTING I_STRUCTURE_NAME  = 'I_STRUCTURE' IT_FIELDCAT  = gt_fieldcat[] TABLES T_OUTTAB  = gt_outtab.
ALV Field Catalog
ALV Report : Exercise II
ALV Example III Using Field Catalog  (Add Derived Column)
ALV Field Catalog – Add Field … types: begin of i_structure, carrid like sflight-carrid, connid like sflight-connid, fldate like sflight-fldate, price  like sflight-price, avail_seat like SFLIGHT-SEATSOCC, end of i_structure. … START-OF-SELECTION. select * from sflight. move-corresponding sflight to gt_outtab. gt_outtab-avail_seat = sflight-seatsmax - sflight-seatsocc. append gt_outtab. endselect.
ALV Field Catalog – Add Field form field_cat_init using rt_fieldcat type slis_t_fieldcat_alv. … *Column 4 ls_fieldcat-col_pos  = pos. ls_fieldcat-fieldname  = 'PRICE'. ls_fieldcat-ref_fieldname  = 'PRICE'. ls_fieldcat-ref_tabname  = 'SFLIGHT'. append ls_fieldcat to rt_fieldcat. clear ls_fieldcat. pos = pos + 1. *Column 5 ls_fieldcat-col_pos  = pos. ls_fieldcat-fieldname  = 'AVAIL_SEAT'. ls_fieldcat-SELTEXT_L  = 'Available Seat'. ls_fieldcat-DDICTXT  = 'L'. *ls_fieldcat-ref_fieldname  = 'SEATSOCC'. *ls_fieldcat-ref_tabname  = 'SFLIGHT'. append ls_fieldcat to rt_fieldcat. clear ls_fieldcat. pos = pos + 1. endform.
ALV Field Catalog – Add Field
ALV Report : Exercise III
ALV Example IV Using Field Catalog  (SELECT … INNER JOIN…)
ALV Field Catalog – Select … Inner Join … … types: begin of i_structure, carrid  LIKE spfli-carrid, connid LIKE spfli-connid, fldate  LIKE sflight-fldate, cityto  LIKE spfli-cityto, price  LIKE sflight-price, end of i_structure. … START-OF-SELECTION. SELECT spfli~carrid spfli~connid sflight~fldate spfli~cityto sflight~price INTO TABLE gt_outtab FROM spfli INNER JOIN sflight ON spfli~carrid = sflight~carrid AND spfli~connid = sflight~connid.
ALV Field Catalog  form field_cat_init using rt_fieldcat type slis_t_fieldcat_alv. … *Column 4 ls_fieldcat-col_pos  = pos. ls_fieldcat-fieldname  = 'CITYTO'. ls_fieldcat-ref_fieldname  = 'CITYTO'. ls_fieldcat-ref_tabname  = 'SPFLI'. APPEND ls_fieldcat TO rt_fieldcat. CLEAR ls_fieldcat. pos = pos + 1. *Column 5 ls_fieldcat-col_pos  = pos. ls_fieldcat-fieldname  = 'PRICE'. ls_fieldcat-ref_fieldname  = 'PRICE'. ls_fieldcat-ref_tabname  = 'SFLIGHT'. APPEND ls_fieldcat TO rt_fieldcat. CLEAR ls_fieldcat. pos = pos + 1. ENDFORM.  "field_cat_init
ALV Report : Example IV
Exercise IV ZSALES ZCUSTOMERS ZPRODUCTS Singapore David 3 London Peter 2 New York John 1 city name id 50 20020329 A1 1 100 20020319 A1 1 50 20020318 A2 1 90 200 10 qty 20020321 X1 3 20020329 A2 1 20020318 A1 1 sale_date prod_id cust_id 125 Pencil A2 120 Tape X1 80 Ruler B1 100 Pen A1 on_hand prod_name p_id
ALV Report : Exercise IV zcustomers-id zcustomers-name zproducts-prod_name zsales-sale_date zsales-qty
ALV Technique
ALV : Variant
ALV : Variant REPORT ZALV06 NO STANDARD PAGE HEADING. type-pools slis. types: begin of i_structure, carrid like sflight-carrid, connid like sflight-connid,  fldate like sflight-fldate, price  like sflight-price, end of i_structure. data: gt_fieldcat type slis_t_fieldcat_alv, isvariant like DISVARIANT.  "ADD gt_outtab type i_structure occurs 0 with header line. initialization. perform field_cat_init using gt_fieldcat[]. isvariant-report = 'ZALV06'.  "ADD
ALV : Variant START-OF-SELECTION. SELECT carrid connid fldate price  FROM SFLIGHT  INTO TABLE GT_OUTTAB. CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY' EXPORTING I_STRUCTURE_NAME  = 'I_STRUCTURE' IT_FIELDCAT  = gt_fieldcat[] IS_VARIANT  = isvariant  "ADD I_SAVE  = 'A'  "ADD   “  A = user&Global,U = user,X = global TABLES T_OUTTAB  = gt_outtab.
ALV : Zebra
ALV : Zebra REPORT ZALV2 NO STANDARD PAGE HEADING. type-pools slis. types: begin of i_structure, carrid like sflight-carrid, connid like sflight-connid,  fldate like sflight-fldate, price  like sflight-price, end of i_structure. data: gt_fieldcat type slis_t_fieldcat_alv, GT_LAYOUT TYPE SLIS_LAYOUT_ALV, "ADD gt_outtab type i_structure occurs 0 with header line. initialization. perform field_cat_init using gt_fieldcat[]. GT_LAYOUT-ZEBRA = 'X'. "ADD
ALV : Zebra START-OF-SELECTION. SELECT carrid connid fldate price  FROM SFLIGHT  INTO TABLE GT_OUTTAB. CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY' EXPORTING I_STRUCTURE_NAME  = 'I_STRUCTURE' IT_FIELDCAT  = gt_fieldcat[] IS_LAYOUT  = GT_LAYOUT  "ADD TABLES T_OUTTAB  = gt_outtab.
ALV : Title
ALV : Title REPORT ZALV2 NO STANDARD PAGE HEADING. type-pools slis. types: begin of i_structure, carrid like sflight-carrid, connid like sflight-connid,  fldate like sflight-fldate, price  like sflight-price, end of i_structure. data: gt_fieldcat type slis_t_fieldcat_alv, GT_GID_TITLE TYPE LVC_TITLE,  "ADD gt_outtab type i_structure occurs 0 with header line. initialization. perform field_cat_init using gt_fieldcat[]. concatenate 'Flight Information' ' for ALV Report' into GT_GID_TITLE.  "ADD
ALV : Title START-OF-SELECTION. SELECT carrid connid fldate price  FROM SFLIGHT  INTO TABLE GT_OUTTAB. CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY' EXPORTING I_STRUCTURE_NAME  = 'I_STRUCTURE' IT_FIELDCAT  = gt_fieldcat[] I_GRID_TITLE  = GT_GID_TITLE  "ADD TABLES T_OUTTAB  = gt_outtab.
Exercise
Exercise   : Sale Order VBAK KNA1 VBAP
Exercise : Control-break Report vbak-vbeln vbak-audat vbak-kunnr kna1-name1 vbap-matnr vbap-netwr
Exercise   : ALV Report vbak-vbeln vbak-audat vbak-kunnr kna1-name1 vbap-matnr vbap-netwr

More Related Content

What's hot

Abap function module help
Abap function module helpAbap function module help
Abap function module help
Kranthi Kumar
 
Ooabap notes with_programs
Ooabap notes with_programsOoabap notes with_programs
Ooabap notes with_programs
Kranthi Kumar
 

What's hot (20)

Abap function module help
Abap function module helpAbap function module help
Abap function module help
 
Alv theory
Alv theoryAlv theory
Alv theory
 
Field symbols
Field symbolsField symbols
Field symbols
 
Badi document
Badi documentBadi document
Badi document
 
ABAP Event-driven Programming &Selection Screen
ABAP Event-driven Programming &Selection ScreenABAP Event-driven Programming &Selection Screen
ABAP Event-driven Programming &Selection Screen
 
08.Abap Dialog Programming Overview
08.Abap Dialog Programming Overview08.Abap Dialog Programming Overview
08.Abap Dialog Programming Overview
 
Module pool programming
Module pool programmingModule pool programming
Module pool programming
 
SAP BADI Implementation Learning for Functional Consultant
SAP BADI Implementation Learning for Functional ConsultantSAP BADI Implementation Learning for Functional Consultant
SAP BADI Implementation Learning for Functional Consultant
 
Dialog programming ABAP
Dialog programming ABAPDialog programming ABAP
Dialog programming ABAP
 
Sapscript
SapscriptSapscript
Sapscript
 
Ooabap notes with_programs
Ooabap notes with_programsOoabap notes with_programs
Ooabap notes with_programs
 
Automatic vendor payment advice notes by mail
Automatic vendor payment advice notes by mailAutomatic vendor payment advice notes by mail
Automatic vendor payment advice notes by mail
 
Table maintenance generator and its modifications
Table maintenance generator and its modificationsTable maintenance generator and its modifications
Table maintenance generator and its modifications
 
SAP ALE Idoc
SAP ALE IdocSAP ALE Idoc
SAP ALE Idoc
 
Bdc BATCH DATA COMMUNICATION
Bdc BATCH DATA COMMUNICATIONBdc BATCH DATA COMMUNICATION
Bdc BATCH DATA COMMUNICATION
 
SAP ABAP data dictionary
SAP ABAP data dictionarySAP ABAP data dictionary
SAP ABAP data dictionary
 
Ab1011 module pool programming
Ab1011   module pool programmingAb1011   module pool programming
Ab1011 module pool programming
 
Sap abap material
Sap abap materialSap abap material
Sap abap material
 
Edit idoc , reprocess and test idoc
Edit idoc , reprocess and test idocEdit idoc , reprocess and test idoc
Edit idoc , reprocess and test idoc
 
Badis
Badis Badis
Badis
 

Viewers also liked

SAP Accounts Payable Payment | http://sapdocs.info
SAP Accounts Payable Payment | http://sapdocs.infoSAP Accounts Payable Payment | http://sapdocs.info
SAP Accounts Payable Payment | http://sapdocs.info
sapdocs. info
 

Viewers also liked (15)

ABAP Message, Debugging, File Transfer and Type Group
ABAP Message, Debugging, File Transfer and Type GroupABAP Message, Debugging, File Transfer and Type Group
ABAP Message, Debugging, File Transfer and Type Group
 
HR ABAP Technical Overview | http://sapdocs.info/
HR ABAP Technical Overview | http://sapdocs.info/HR ABAP Technical Overview | http://sapdocs.info/
HR ABAP Technical Overview | http://sapdocs.info/
 
ABAP Open SQL & Internal Table
ABAP Open SQL & Internal TableABAP Open SQL & Internal Table
ABAP Open SQL & Internal Table
 
HR ABAP Programming Training Material | http://sapdocs.info
HR ABAP Programming Training Material | http://sapdocs.infoHR ABAP Programming Training Material | http://sapdocs.info
HR ABAP Programming Training Material | http://sapdocs.info
 
Introduction to ABAP
Introduction to ABAPIntroduction to ABAP
Introduction to ABAP
 
List Processing in ABAP
List Processing in ABAPList Processing in ABAP
List Processing in ABAP
 
Message, Debugging, File Transfer and Type Group
Message, Debugging, File Transfer and Type GroupMessage, Debugging, File Transfer and Type Group
Message, Debugging, File Transfer and Type Group
 
Modularization & Catch Statement
Modularization & Catch StatementModularization & Catch Statement
Modularization & Catch Statement
 
SAP Accounts Reveivable Functions | http://sapdocs.info
SAP Accounts Reveivable Functions | http://sapdocs.infoSAP Accounts Reveivable Functions | http://sapdocs.info
SAP Accounts Reveivable Functions | http://sapdocs.info
 
ABAP Programming Overview
ABAP Programming OverviewABAP Programming Overview
ABAP Programming Overview
 
Open SQL & Internal Table
Open SQL & Internal TableOpen SQL & Internal Table
Open SQL & Internal Table
 
SAP Accounts Reveivable Customer Master | http://sapdocs.info
SAP Accounts Reveivable Customer Master | http://sapdocs.infoSAP Accounts Reveivable Customer Master | http://sapdocs.info
SAP Accounts Reveivable Customer Master | http://sapdocs.info
 
SAP Accounts Reveivable Introduction | http://sapdocs.info
SAP Accounts Reveivable Introduction | http://sapdocs.infoSAP Accounts Reveivable Introduction | http://sapdocs.info
SAP Accounts Reveivable Introduction | http://sapdocs.info
 
Authorisation Concept In SAP | http://sapdocs.info
Authorisation Concept In SAP | http://sapdocs.infoAuthorisation Concept In SAP | http://sapdocs.info
Authorisation Concept In SAP | http://sapdocs.info
 
SAP Accounts Payable Payment | http://sapdocs.info
SAP Accounts Payable Payment | http://sapdocs.infoSAP Accounts Payable Payment | http://sapdocs.info
SAP Accounts Payable Payment | http://sapdocs.info
 

Similar to ABAP Advanced List

07.advanced abap
07.advanced abap07.advanced abap
07.advanced abap
Phong Ho
 
03 abap3-090715081232-phpapp01-100511101016-phpapp02
03 abap3-090715081232-phpapp01-100511101016-phpapp0203 abap3-090715081232-phpapp01-100511101016-phpapp02
03 abap3-090715081232-phpapp01-100511101016-phpapp02
tabish
 
03 abap3-090715081232-phpapp01
03 abap3-090715081232-phpapp0103 abap3-090715081232-phpapp01
03 abap3-090715081232-phpapp01
wingsrai
 
Alvedit programs
Alvedit programsAlvedit programs
Alvedit programs
mcclintick
 
Example syntax alv grid list
Example syntax alv grid listExample syntax alv grid list
Example syntax alv grid list
Nur Khoiri
 
1582627
15826271582627
1582627
tabish
 
Module-Pool-Tutorial.pdf
Module-Pool-Tutorial.pdfModule-Pool-Tutorial.pdf
Module-Pool-Tutorial.pdf
Suman817957
 

Similar to ABAP Advanced List (20)

07.advanced abap
07.advanced abap07.advanced abap
07.advanced abap
 
Zmalv output type_v1.1
Zmalv output type_v1.1Zmalv output type_v1.1
Zmalv output type_v1.1
 
Alv Block
Alv BlockAlv Block
Alv Block
 
03 abap3-090715081232-phpapp01-100511101016-phpapp02
03 abap3-090715081232-phpapp01-100511101016-phpapp0203 abap3-090715081232-phpapp01-100511101016-phpapp02
03 abap3-090715081232-phpapp01-100511101016-phpapp02
 
03 abap3-090715081232-phpapp01
03 abap3-090715081232-phpapp0103 abap3-090715081232-phpapp01
03 abap3-090715081232-phpapp01
 
Alv barra her
Alv barra herAlv barra her
Alv barra her
 
ZFINDALLZPROGAM
ZFINDALLZPROGAMZFINDALLZPROGAM
ZFINDALLZPROGAM
 
Technical specification : SD(Logistics)_Order_Processing
Technical specification : SD(Logistics)_Order_ProcessingTechnical specification : SD(Logistics)_Order_Processing
Technical specification : SD(Logistics)_Order_Processing
 
Alvedit programs
Alvedit programsAlvedit programs
Alvedit programs
 
Report zalv
Report  zalvReport  zalv
Report zalv
 
Alv a otro alv
Alv a otro alvAlv a otro alv
Alv a otro alv
 
Example syntax alv grid list
Example syntax alv grid listExample syntax alv grid list
Example syntax alv grid list
 
1582627
15826271582627
1582627
 
Module Prog
Module ProgModule Prog
Module Prog
 
Call session Method of BDC
Call session Method of BDCCall session Method of BDC
Call session Method of BDC
 
Module-Pool-Tutorial.pdf
Module-Pool-Tutorial.pdfModule-Pool-Tutorial.pdf
Module-Pool-Tutorial.pdf
 
OpenWorld Sep14 12c for_developers
OpenWorld Sep14 12c for_developersOpenWorld Sep14 12c for_developers
OpenWorld Sep14 12c for_developers
 
The Ring programming language version 1.6 book - Part 9 of 189
The Ring programming language version 1.6 book - Part 9 of 189The Ring programming language version 1.6 book - Part 9 of 189
The Ring programming language version 1.6 book - Part 9 of 189
 
Sap abap report program
Sap abap report programSap abap report program
Sap abap report program
 
325546_adding fields in CJI3 & CJI5.pdf
325546_adding fields in CJI3 & CJI5.pdf325546_adding fields in CJI3 & CJI5.pdf
325546_adding fields in CJI3 & CJI5.pdf
 

More from sapdocs. info

More from sapdocs. info (20)

SAP PM Master Data Training Guide
SAP PM Master Data Training GuideSAP PM Master Data Training Guide
SAP PM Master Data Training Guide
 
SAP SD Certification (C_TSCM62_66) Preparation Training Notes
SAP SD Certification (C_TSCM62_66) Preparation Training NotesSAP SD Certification (C_TSCM62_66) Preparation Training Notes
SAP SD Certification (C_TSCM62_66) Preparation Training Notes
 
Variant Configuration in SAP PP: Beginner's Guide
Variant Configuration in SAP PP: Beginner's GuideVariant Configuration in SAP PP: Beginner's Guide
Variant Configuration in SAP PP: Beginner's Guide
 
SAP FICO BBP Sample Document PDF NEW!
SAP FICO BBP Sample Document PDF NEW!SAP FICO BBP Sample Document PDF NEW!
SAP FICO BBP Sample Document PDF NEW!
 
SAP PP MRP Guide for Beginners
SAP PP MRP Guide for BeginnersSAP PP MRP Guide for Beginners
SAP PP MRP Guide for Beginners
 
SAP ECC 6.0 PM Configuration Manual - www.sapdocs.info
SAP ECC 6.0 PM Configuration Manual - www.sapdocs.infoSAP ECC 6.0 PM Configuration Manual - www.sapdocs.info
SAP ECC 6.0 PM Configuration Manual - www.sapdocs.info
 
SAP PM Training Manual - www.sapdocs.info
SAP PM Training Manual - www.sapdocs.infoSAP PM Training Manual - www.sapdocs.info
SAP PM Training Manual - www.sapdocs.info
 
ABAP Basico para Consultores Funcionales
ABAP Basico para Consultores FuncionalesABAP Basico para Consultores Funcionales
ABAP Basico para Consultores Funcionales
 
SAP Configuration Guide for Functional Modules (Based on IDES)
SAP Configuration Guide for Functional Modules (Based on IDES)SAP Configuration Guide for Functional Modules (Based on IDES)
SAP Configuration Guide for Functional Modules (Based on IDES)
 
SAP FI-AP TCODES & MENU PATHS
SAP FI-AP TCODES & MENU PATHSSAP FI-AP TCODES & MENU PATHS
SAP FI-AP TCODES & MENU PATHS
 
SAP FI-AR TCODES & MENU PATHS
SAP FI-AR TCODES & MENU PATHSSAP FI-AR TCODES & MENU PATHS
SAP FI-AR TCODES & MENU PATHS
 
SAP CO Configuration Guide - Exclusive Document
SAP CO Configuration Guide - Exclusive DocumentSAP CO Configuration Guide - Exclusive Document
SAP CO Configuration Guide - Exclusive Document
 
SAP PP End User Document - www.sapdocs.info
SAP PP End User Document - www.sapdocs.infoSAP PP End User Document - www.sapdocs.info
SAP PP End User Document - www.sapdocs.info
 
SAP MM Configuration - Real Project Documentation
SAP MM Configuration - Real Project DocumentationSAP MM Configuration - Real Project Documentation
SAP MM Configuration - Real Project Documentation
 
SAP FI AP: Configuration & End User Guide
SAP FI AP: Configuration & End User GuideSAP FI AP: Configuration & End User Guide
SAP FI AP: Configuration & End User Guide
 
SAP FI AR: End User Guide for Beginners
SAP FI AR: End User Guide for BeginnersSAP FI AR: End User Guide for Beginners
SAP FI AR: End User Guide for Beginners
 
SAP FI AP: End User Guide for Beginners
SAP FI AP: End User Guide for BeginnersSAP FI AP: End User Guide for Beginners
SAP FI AP: End User Guide for Beginners
 
SAP FI Asset Accounting: End User Guide for Beginners
SAP FI Asset Accounting: End User Guide for BeginnersSAP FI Asset Accounting: End User Guide for Beginners
SAP FI Asset Accounting: End User Guide for Beginners
 
Variant Configurition in SAP: Beginners Guide | www.sapdocs.info
Variant Configurition in SAP: Beginners Guide | www.sapdocs.infoVariant Configurition in SAP: Beginners Guide | www.sapdocs.info
Variant Configurition in SAP: Beginners Guide | www.sapdocs.info
 
Exclusive SAP Basis Training Book | www.sapdocs.info
Exclusive SAP Basis Training Book | www.sapdocs.infoExclusive SAP Basis Training Book | www.sapdocs.info
Exclusive SAP Basis Training Book | www.sapdocs.info
 

Recently uploaded

unwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabi
unwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabiunwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabi
unwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabi
Abortion pills in Kuwait Cytotec pills in Kuwait
 
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
amitlee9823
 
Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...
Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...
Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...
lizamodels9
 
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...
amitlee9823
 
Nelamangala Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Nelamangala Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Nelamangala Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Nelamangala Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
amitlee9823
 
Call Girls In Noida 959961⊹3876 Independent Escort Service Noida
Call Girls In Noida 959961⊹3876 Independent Escort Service NoidaCall Girls In Noida 959961⊹3876 Independent Escort Service Noida
Call Girls In Noida 959961⊹3876 Independent Escort Service Noida
dlhescort
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
dollysharma2066
 
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
daisycvs
 

Recently uploaded (20)

Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service AvailableCall Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
 
unwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabi
unwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabiunwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabi
unwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabi
 
👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...
👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...
👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...
 
Lundin Gold - Q1 2024 Conference Call Presentation (Revised)
Lundin Gold - Q1 2024 Conference Call Presentation (Revised)Lundin Gold - Q1 2024 Conference Call Presentation (Revised)
Lundin Gold - Q1 2024 Conference Call Presentation (Revised)
 
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
 
Whitefield CALL GIRL IN 98274*61493 ❤CALL GIRLS IN ESCORT SERVICE❤CALL GIRL
Whitefield CALL GIRL IN 98274*61493 ❤CALL GIRLS IN ESCORT SERVICE❤CALL GIRLWhitefield CALL GIRL IN 98274*61493 ❤CALL GIRLS IN ESCORT SERVICE❤CALL GIRL
Whitefield CALL GIRL IN 98274*61493 ❤CALL GIRLS IN ESCORT SERVICE❤CALL GIRL
 
Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...
Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...
Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...
 
The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...
The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...
The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...
 
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...
 
Nelamangala Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Nelamangala Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Nelamangala Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Nelamangala Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
 
Call Girls In Noida 959961⊹3876 Independent Escort Service Noida
Call Girls In Noida 959961⊹3876 Independent Escort Service NoidaCall Girls In Noida 959961⊹3876 Independent Escort Service Noida
Call Girls In Noida 959961⊹3876 Independent Escort Service Noida
 
How to Get Started in Social Media for Art League City
How to Get Started in Social Media for Art League CityHow to Get Started in Social Media for Art League City
How to Get Started in Social Media for Art League City
 
Falcon Invoice Discounting: Unlock Your Business Potential
Falcon Invoice Discounting: Unlock Your Business PotentialFalcon Invoice Discounting: Unlock Your Business Potential
Falcon Invoice Discounting: Unlock Your Business Potential
 
Call Girls Zirakpur👧 Book Now📱7837612180 📞👉Call Girl Service In Zirakpur No A...
Call Girls Zirakpur👧 Book Now📱7837612180 📞👉Call Girl Service In Zirakpur No A...Call Girls Zirakpur👧 Book Now📱7837612180 📞👉Call Girl Service In Zirakpur No A...
Call Girls Zirakpur👧 Book Now📱7837612180 📞👉Call Girl Service In Zirakpur No A...
 
Uneak White's Personal Brand Exploration Presentation
Uneak White's Personal Brand Exploration PresentationUneak White's Personal Brand Exploration Presentation
Uneak White's Personal Brand Exploration Presentation
 
(Anamika) VIP Call Girls Napur Call Now 8617697112 Napur Escorts 24x7
(Anamika) VIP Call Girls Napur Call Now 8617697112 Napur Escorts 24x7(Anamika) VIP Call Girls Napur Call Now 8617697112 Napur Escorts 24x7
(Anamika) VIP Call Girls Napur Call Now 8617697112 Napur Escorts 24x7
 
Cracking the Cultural Competence Code.pptx
Cracking the Cultural Competence Code.pptxCracking the Cultural Competence Code.pptx
Cracking the Cultural Competence Code.pptx
 
Malegaon Call Girls Service ☎ ️82500–77686 ☎️ Enjoy 24/7 Escort Service
Malegaon Call Girls Service ☎ ️82500–77686 ☎️ Enjoy 24/7 Escort ServiceMalegaon Call Girls Service ☎ ️82500–77686 ☎️ Enjoy 24/7 Escort Service
Malegaon Call Girls Service ☎ ️82500–77686 ☎️ Enjoy 24/7 Escort Service
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
 

ABAP Advanced List

  • 1.
  • 2. Types of ABAP Report 1. Report Listing 2. Drill-down Report 3. Control-break Report 4. ALV Report 1 3 4
  • 3. Internal Table Processing Technique Control-Break Report
  • 4.
  • 5.
  • 6. Example I sales 20 A 30 A 5 B 10 B 10 A qty name
  • 7.
  • 8.
  • 9. Example II sales 20 A 30 A 5 B 10 B 10 A qty name
  • 10.
  • 11. Exercise I ZSALES 50 20020329 A1 1 100 20020319 A1 1 50 20020318 A2 1 90 200 10 qty 20020321 X1 3 20020329 A2 1 20020318 A1 1 sale_date prod_id cust_id
  • 12. Exercise I ID Product ID Quantity 1 A1 10 A1 100 A1 50 A2 50 A2 200 ------------------------------ Total 410 3 X1 90 ------------------------------ Total 90 ------------------------------ Grand Total 500 ----------------------------------
  • 13.
  • 14.
  • 15. Internal Table Processing Example tab(internal table) 100.00 100.00 100.00 03 B 2 1,000.00 100.00 100.00 400.00 YTD 02 03 02 01 prodno 2,000.00 100.00 B 2 100.00 100.00 A 1 100.00 50.00 A 1 1,000.00 100.00 A 1 Accum Month Name ID
  • 16.
  • 17.
  • 18.
  • 19. Exercise II ZSALES ZCUSTOMERS Singapore David 3 London Peter 2 New York John 1 city name id 50 20020329 A1 1 100 20020319 A1 1 50 20020318 A2 1 90 200 10 qty 20020321 X1 3 20020329 A2 1 20020318 A1 1 sale_date prod_id cust_id
  • 20. Exercise II ID Name ____ Product ID Quantity 1 John A1 10 A1 100 A1 50 A2 50 A2 200 ---------------------------- Total 410 3 Peter X1 90 ---------------------------- Total 90 ---------------------------- Grand Total 500 -------------------------------
  • 21. Control Break Report > 1 Level tab Loop at tab. … at new f1. … endat. at new f2. … endat. write: / … “normal data at end of f2. … endat. at end of f1. … endat. … Endloop. sort tab by f1 f2. Group Header Level 1 Group Header Level 2 Sub Total Level 2 Sub Total Level 1 2 1 A 1 2 A 1 2 B 2 2 B 4 3 C 3 3 B 1 1 A f3 f2 f1
  • 22. Example IV (Control-break 2 Levels) sales 20070126 20070126 20070128 20070126 20070126 date 20 A 30 A 5 B 10 B 10 A qty name
  • 23. Example IV (Control-break 2 Levels) … AT NEW NAME. WRITE: / SALES-NAME. ULINE: /(5). ENDAT. AT NEW DATE. WRITE: /10 SALES-DATE. ULINE: /10(10). ENDAT. WRITE: /30 SALES-QTY. AT END OF DATE. ULINE: /(50). SUM. WRITE: /15 'Sub Total(Date)' ,30 SALES-QTY COLOR COL_TOTAL. ENDAT. AT END OF NAME. ULINE: /(50). SUM. WRITE: /5 'Sub Total(Name)' ,30 SALES-QTY COLOR COL_TOTAL. ENDAT. …
  • 24. Exercise III ZSALES 50 20020329 A1 1 100 20020319 A1 1 50 20020318 A2 1 90 200 10 qty 20020321 X1 3 20020329 A2 1 20020318 A1 1 sale_date prod_id cust_id
  • 27.
  • 28.
  • 29.
  • 30. ALV Example I List/Grid Display
  • 31. ALV List/Grid Display REPORT ZALV02 NO STANDARD PAGE HEADING. PARAMETERS: list radiobutton group grp1, grid radiobutton group grp1. DATA: gt_tab LIKE sflight OCCURS 0 WITH HEADER LINE. START-OF-SELECTION. SELECT * FROM sflight INTO TABLE gt_tab. IF list = 'X'. * Call ALV List Viewer CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY' EXPORTING I_STRUCTURE_NAME = 'SFLIGHT' TABLES T_OUTTAB = GT_TAB. ELSE. * Call ALV Grid Viewer CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY' EXPORTING I_STRUCTURE_NAME = 'SFLIGHT' TABLES T_OUTTAB = GT_TAB. ENDIF..
  • 32. ALV Report : Exercise I
  • 33. ALV Example II Using Field Catalog
  • 34. ALV Field Catalog REPORT ZALV03 NO STANDARD PAGE HEADING. type-pools slis. types: begin of i_structure, carrid like sflight-carrid, connid like sflight-connid, fldate like sflight-fldate, price like sflight-price, end of i_structure. data: gt_fieldcat type slis_t_fieldcat_alv, gt_outtab type i_structure occurs 0 with header line. initialization. perform field_cat_init using gt_fieldcat[].
  • 35. ALV Field Catalog FORM field_cat_init using rt_fieldcat type slis_t_fieldcat_alv. data: ls_fieldcat type slis_fieldcat_alv, pos type i value 1. clear LS_FIELDCAT. *Column 1 ls_fieldcat-col_pos = pos. ls_fieldcat-fieldname = ' CARRID '. ls_fieldcat-ref_fieldname = ' CARRID '. ls_fieldcat-ref_tabname = ' SFLIGHT '. ls_fieldcat-key = 'X'. append ls_fieldcat to rt_fieldcat. clear ls_fieldcat. pos = pos + 1.
  • 36. ALV Field Catalog *Column 2 ls_fieldcat-col_pos = pos. ls_fieldcat-fieldname = ' CONNID '. ls_fieldcat-ref_fieldname = ' CONNID '. ls_fieldcat-ref_tabname = ' SFLIGHT '. ls_fieldcat-key = 'X'. append ls_fieldcat to rt_fieldcat. clear ls_fieldcat. pos = pos + 1. *Column 3 ls_fieldcat-col_pos = pos. ls_fieldcat-fieldname = ' FLDATE '. ls_fieldcat-ref_fieldname = ' FLDATE '. ls_fieldcat-ref_tabname = ' SFLIGHT '. ls_fieldcat-key = 'X'. append ls_fieldcat to rt_fieldcat. clear ls_fieldcat. pos = pos + 1.
  • 37. ALV Field Catalog *Column 4 ls_fieldcat-col_pos = pos. ls_fieldcat-fieldname = ' PRICE '. ls_fieldcat-ref_fieldname = ' PRICE '. ls_fieldcat-ref_tabname = ' SFLIGHT '. append ls_fieldcat to rt_fieldcat. clear ls_fieldcat. pos = pos + 1. endform.
  • 38. ALV Field Catalog START-OF-SELECTION. SELECT carrid connid fldate price FROM SFLIGHT INTO TABLE GT_OUTTAB. CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY' EXPORTING I_STRUCTURE_NAME = 'I_STRUCTURE' IT_FIELDCAT = gt_fieldcat[] TABLES T_OUTTAB = gt_outtab.
  • 40. ALV Report : Exercise II
  • 41. ALV Example III Using Field Catalog (Add Derived Column)
  • 42. ALV Field Catalog – Add Field … types: begin of i_structure, carrid like sflight-carrid, connid like sflight-connid, fldate like sflight-fldate, price like sflight-price, avail_seat like SFLIGHT-SEATSOCC, end of i_structure. … START-OF-SELECTION. select * from sflight. move-corresponding sflight to gt_outtab. gt_outtab-avail_seat = sflight-seatsmax - sflight-seatsocc. append gt_outtab. endselect.
  • 43. ALV Field Catalog – Add Field form field_cat_init using rt_fieldcat type slis_t_fieldcat_alv. … *Column 4 ls_fieldcat-col_pos = pos. ls_fieldcat-fieldname = 'PRICE'. ls_fieldcat-ref_fieldname = 'PRICE'. ls_fieldcat-ref_tabname = 'SFLIGHT'. append ls_fieldcat to rt_fieldcat. clear ls_fieldcat. pos = pos + 1. *Column 5 ls_fieldcat-col_pos = pos. ls_fieldcat-fieldname = 'AVAIL_SEAT'. ls_fieldcat-SELTEXT_L = 'Available Seat'. ls_fieldcat-DDICTXT = 'L'. *ls_fieldcat-ref_fieldname = 'SEATSOCC'. *ls_fieldcat-ref_tabname = 'SFLIGHT'. append ls_fieldcat to rt_fieldcat. clear ls_fieldcat. pos = pos + 1. endform.
  • 44. ALV Field Catalog – Add Field
  • 45. ALV Report : Exercise III
  • 46. ALV Example IV Using Field Catalog (SELECT … INNER JOIN…)
  • 47. ALV Field Catalog – Select … Inner Join … … types: begin of i_structure, carrid LIKE spfli-carrid, connid LIKE spfli-connid, fldate LIKE sflight-fldate, cityto LIKE spfli-cityto, price LIKE sflight-price, end of i_structure. … START-OF-SELECTION. SELECT spfli~carrid spfli~connid sflight~fldate spfli~cityto sflight~price INTO TABLE gt_outtab FROM spfli INNER JOIN sflight ON spfli~carrid = sflight~carrid AND spfli~connid = sflight~connid.
  • 48. ALV Field Catalog form field_cat_init using rt_fieldcat type slis_t_fieldcat_alv. … *Column 4 ls_fieldcat-col_pos = pos. ls_fieldcat-fieldname = 'CITYTO'. ls_fieldcat-ref_fieldname = 'CITYTO'. ls_fieldcat-ref_tabname = 'SPFLI'. APPEND ls_fieldcat TO rt_fieldcat. CLEAR ls_fieldcat. pos = pos + 1. *Column 5 ls_fieldcat-col_pos = pos. ls_fieldcat-fieldname = 'PRICE'. ls_fieldcat-ref_fieldname = 'PRICE'. ls_fieldcat-ref_tabname = 'SFLIGHT'. APPEND ls_fieldcat TO rt_fieldcat. CLEAR ls_fieldcat. pos = pos + 1. ENDFORM. "field_cat_init
  • 49. ALV Report : Example IV
  • 50. Exercise IV ZSALES ZCUSTOMERS ZPRODUCTS Singapore David 3 London Peter 2 New York John 1 city name id 50 20020329 A1 1 100 20020319 A1 1 50 20020318 A2 1 90 200 10 qty 20020321 X1 3 20020329 A2 1 20020318 A1 1 sale_date prod_id cust_id 125 Pencil A2 120 Tape X1 80 Ruler B1 100 Pen A1 on_hand prod_name p_id
  • 51. ALV Report : Exercise IV zcustomers-id zcustomers-name zproducts-prod_name zsales-sale_date zsales-qty
  • 54. ALV : Variant REPORT ZALV06 NO STANDARD PAGE HEADING. type-pools slis. types: begin of i_structure, carrid like sflight-carrid, connid like sflight-connid, fldate like sflight-fldate, price like sflight-price, end of i_structure. data: gt_fieldcat type slis_t_fieldcat_alv, isvariant like DISVARIANT. "ADD gt_outtab type i_structure occurs 0 with header line. initialization. perform field_cat_init using gt_fieldcat[]. isvariant-report = 'ZALV06'. "ADD
  • 55. ALV : Variant START-OF-SELECTION. SELECT carrid connid fldate price FROM SFLIGHT INTO TABLE GT_OUTTAB. CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY' EXPORTING I_STRUCTURE_NAME = 'I_STRUCTURE' IT_FIELDCAT = gt_fieldcat[] IS_VARIANT = isvariant "ADD I_SAVE = 'A' "ADD “ A = user&Global,U = user,X = global TABLES T_OUTTAB = gt_outtab.
  • 57. ALV : Zebra REPORT ZALV2 NO STANDARD PAGE HEADING. type-pools slis. types: begin of i_structure, carrid like sflight-carrid, connid like sflight-connid, fldate like sflight-fldate, price like sflight-price, end of i_structure. data: gt_fieldcat type slis_t_fieldcat_alv, GT_LAYOUT TYPE SLIS_LAYOUT_ALV, "ADD gt_outtab type i_structure occurs 0 with header line. initialization. perform field_cat_init using gt_fieldcat[]. GT_LAYOUT-ZEBRA = 'X'. "ADD
  • 58. ALV : Zebra START-OF-SELECTION. SELECT carrid connid fldate price FROM SFLIGHT INTO TABLE GT_OUTTAB. CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY' EXPORTING I_STRUCTURE_NAME = 'I_STRUCTURE' IT_FIELDCAT = gt_fieldcat[] IS_LAYOUT = GT_LAYOUT "ADD TABLES T_OUTTAB = gt_outtab.
  • 60. ALV : Title REPORT ZALV2 NO STANDARD PAGE HEADING. type-pools slis. types: begin of i_structure, carrid like sflight-carrid, connid like sflight-connid, fldate like sflight-fldate, price like sflight-price, end of i_structure. data: gt_fieldcat type slis_t_fieldcat_alv, GT_GID_TITLE TYPE LVC_TITLE, "ADD gt_outtab type i_structure occurs 0 with header line. initialization. perform field_cat_init using gt_fieldcat[]. concatenate 'Flight Information' ' for ALV Report' into GT_GID_TITLE. "ADD
  • 61. ALV : Title START-OF-SELECTION. SELECT carrid connid fldate price FROM SFLIGHT INTO TABLE GT_OUTTAB. CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY' EXPORTING I_STRUCTURE_NAME = 'I_STRUCTURE' IT_FIELDCAT = gt_fieldcat[] I_GRID_TITLE = GT_GID_TITLE "ADD TABLES T_OUTTAB = gt_outtab.
  • 63. Exercise : Sale Order VBAK KNA1 VBAP
  • 64. Exercise : Control-break Report vbak-vbeln vbak-audat vbak-kunnr kna1-name1 vbap-matnr vbap-netwr
  • 65. Exercise : ALV Report vbak-vbeln vbak-audat vbak-kunnr kna1-name1 vbap-matnr vbap-netwr