Upload
srinivasdukka
View
216
Download
3
Embed Size (px)
Citation preview
SAP ABAPSAP ABAP Real-time Objects
Training and ABAP Full referances
Classical Reports in SAP ABAP
Classical reports are simple reports in SAP ABAP, these are normal reports with only
one output screen with out any user interaction.We will just out put dat with in the loop
to develop a classical report.
CLASSICAL REPORTS CAN BE DEVELOPPED USING SOME EVENTS, REFER LIST OF
EVENTS AVAILABLE IN SAP ABAP CLASSICAL REPORTS
.
REPORT ZCLASSICAL_REPORT
NO STANDARD PAGE HEADING
LINE-SIZE 120
LINE-COUNT 10(1).
*----------------------------------------------------------------------*
* TYPES DECLARATIONS
*----------------------------------------------------------------------*
*----------------------------------------------------------------------*
* TABLES DECLARATIONS
*----------------------------------------------------------------------*
TABLES: MARA, "Material Master
T001W. "Plant Master
*----------------------------------------------------------------------*
* DATA DECLARATIONS
*----------------------------------------------------------------------*
DATA: V_LINE TYPE I.
*----------------------------------------------------------------------*
* CONSTANTS DECLARATIONS
*----------------------------------------------------------------------*
*----------------------------------------------------------------------*
* INTERNAL TABLE DECLARATIONS
*----------------------------------------------------------------------*
DATA: BEGIN OF IT_MARD OCCURS 1,
MATNR LIKE MARA-MATNR,
MAKTX LIKE MAKT-MAKTX,
WERKS LIKE MARD-WERKS,
LGORT LIKE MARD-LGORT,
LABELS
ABAP Basics (1)
ABAP
Fundamentals (10)
ABAP interview
Questions (1)
ABAP MM (1)
ABAP reports (1)
ABAP SD (1)
ABAP Statements
(1)
ALV Interactive (1)
ALV Reports (14)
ALV with Field
Catelogue (1)
BDC (2)
classical Reports
(5)
code gallery (11)
Drop Down (1)
Drop-down list box
in abap (1)
Function Modules
(5)
Interactive Reports
(4)
interview Questions
(1)
interview tips (1)
Menu Painter (1)
push button in ABAP
(1)
Start Learning
Object OrientedABAP
MOST READING
CLASSICAL REPORTS IN SAP
ABAP
Classical reports are simple reports
in SAP ABAP, these are normal
reports with only one output screen
with out any user interaction.We wil...
CONTROL BREAK
STATEMENTS IN SAP ABAP
Control Break Statements in ABAP
There are enormous uses of control
break statements in ABAP
development, these control break
statements ...
SIMPLE WRITE STATEMENTS
IN SAP ABAP
Write statements in SAP ABAP
programming REPORT ZWRITE NO
STANDARD PAGE HEADING.
INCLUDE . INCLUDE
. INCLUDE ...
PARAMETERS AND SELECT-
OPTIONS IN SAP ABAP
Parameters and Select-Options are
selection-screen elements in SAP
ABAP, which are used to provide
inputs fields on selection-screens.
The...
SD FLOW AND MM FLOW WITH
T-CODES IN SAP
SD and MM Flow Explanations refer
SAPNuts.com Here is the explenation
of SD and MM flows in SAP which is
very useful for a SAP ABAP devel...
SELECT STATEMENTS IN SAP
ABAP
Select statements are used to read
data from database table using SAP
ABAP programming in SAP, there are
different types of select statemen...
USING OF GUI DOWNLOAD IN
SAP ABAP
GUI Download is a Function Module
which is used to download data into a
file from SAP GUI, GUI Download
works only for SAP GUI and will not...
Classical Reports in SAP ABAP - SAP ABAP http://sdnabap.blogspot.in/2011/09/classical-report-1.html
1 of 5 5/21/2015 5:37 PM
LABST LIKE MARD-LABST,
END OF IT_MARD.
*----------------------------------------------------------------------*
* SELECTION SCREEN DESIGN
*----------------------------------------------------------------------*
SELECTION-SCREEN: BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-H01.
SELECT-OPTIONS: S_MATNR FOR MARA-MATNR,
S_WERKS FOR T001W-WERKS.
PARAMETERS: P1 TYPE I.
SELECTION-SCREEN: END OF BLOCK B1.
*----------------------------------------------------------------------*
* INITIALIZATION
*----------------------------------------------------------------------*
INITIALIZATION.
S_MATNR-LOW = '100-100'. S_MATNR-HIGH = '100-500'.
S_MATNR-SIGN = 'I'. S_MATNR-OPTION = 'BT'.
APPEND S_MATNR.
S_WERKS-LOW = '0001'. S_WERKS-HIGH = '3800'.
S_WERKS-SIGN = 'I'. S_WERKS-OPTION = 'BT'.
APPEND S_WERKS.
*----------------------------------------------------------------------*
* AT SELECTION SCREEN OUTPUT
*----------------------------------------------------------------------*
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF SCREEN-NAME = 'S_WERKS-LOW'.
SCREEN-REQUIRED = 1.
* SCREEN-INPUT = 0.
* SCREEN-INVISIBLE = 1.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
*----------------------------------------------------------------------*
* AT SELECTION SCREEN
*----------------------------------------------------------------------*
AT SELECTION-SCREEN.
*----------------------------------------------------------------------*
* AT SELECTION SCREEN
*----------------------------------------------------------------------*
AT SELECTION-SCREEN ON S_WERKS.
IF NOT S_WERKS[] IS initial.
PERFORM VALIDATE_PLANT.
ENDIF.
*----------------------------------------------------------------------*
* AT SELECTION SCREEN ON VALUE REQUEST
*----------------------------------------------------------------------*
AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_WERKS-LOW.
MESSAGE I000(Z00) WITH 'On Value Request'.
*----------------------------------------------------------------------*
* AT SELECTION SCREEN ON HELP REQUEST
*----------------------------------------------------------------------*
AT SELECTION-SCREEN ON HELP-REQUEST FOR P1.
MESSAGE I000(Z00) WITH 'On Help Request'.
Reports (9)
sap technical (1)
Select Statements
(2)
selection-screen (3)
System Fields in
ABAP (1)
System Variables
(1)
user-command in
abap (1)
workflow (1)
Write Statements
(2)
POPULAR POSTS
CLASSICAL
REPORTS IN SAP
ABAP
Classical reports are
simple reports in SAP
ABAP, these are
normal reports with
only one output
screen with out any
user interaction.We
wil...
CONTROL BREAK
STATEMENTS IN
SAP ABAP
Control Break
Statements in ABAP
There are enormous
uses of control break
statements in ABAP
development, these
control break
statements ...
SIMPLE WRITE
STATEMENTS IN
SAP ABAP
Write statements in
SAP ABAP
programming
REPORT ZWRITE
NO STANDARD
PAGE HEADING.
INCLUDE
.
INCLUDE .
INCLUDE ...
PARAMETERS
REAL-TIME DELIVERY REPORT
IN SAP ABAP
Real-time example of displaying
delivery details for a range of sales
orders in SAP ABAP. REPORT
ZPROJECT_RANGE NO
STANDARD PAGE HEADING ...
SAP ABAP REAL-TIME
INTERVIEW QUESTIONS WITH
ANSWERS
SAP ABAP real time Interview
Questions 1. Can we write the code
both call transaction and session
method in single program? Ans. Yes
it...
INTERACTIVE ALV REPORT
WITH ALV EVENTS IN SAP
ABAP
Interactive ALV report using SAP
ABAP programming with ALV events
and user command. REPORT ZALV6
. DAT...
TAGS
ABAP Basics
ABAP Fundamentals
ABAP interview Questions
ABAP MM
ABAP reports
ABAP SD
ABAP Statements
ALV Interactive
ALV Reports
ALV with Field Catelogue
BDC
classical Reports
code gallery
Drop Down
Drop-down list box in abap
Function Modules
Interactive Reports
interview Questions
interview tips
Menu Painter
push button in ABAP
Reports
sap technical
Select Statements
selection-screen
System Fields in ABAP
System Variables
user-command in abap
workflow
Write Statements
Classical Reports in SAP ABAP - SAP ABAP http://sdnabap.blogspot.in/2011/09/classical-report-1.html
2 of 5 5/21/2015 5:37 PM
*----------------------------------------------------------------------*
* START-OF-SELECTION
*----------------------------------------------------------------------*
START-OF-SELECTION.
PERFORM GET_DATA.
*----------------------------------------------------------------------*
* END-OF-SELECTION
*----------------------------------------------------------------------*
END-OF-SELECTION.
PERFORM SHOW_LIST.
*----------------------------------------------------------------------*
* TOP-OF-PAGE
*----------------------------------------------------------------------*
TOP-OF-PAGE.
PERFORM BUILD_PAGE_HEADER.
*----------------------------------------------------------------------*
* END-OF-PAGE
*----------------------------------------------------------------------*
END-OF-PAGE.
PERFORM BUILD_PAGE_FOOTER.
*&---------------------------------------------------------------------*
*& Form VALIDATE_PLANT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
FORM VALIDATE_PLANT .
SELECT WERKS
FROM T001W
INTO T001W-WERKS
UP TO 1 ROWS
WHERE WERKS IN S_WERKS.
ENDSELECT.
IF SY-SUBRC 0.
MESSAGE E000(Z00) WITH 'Invalid Range of Plants' S_WERKS-LOW 'And'
S_WERKS-HIGH.
ENDIF.
ENDFORM. " VALIDATE_PLANT
*&---------------------------------------------------------------------*
*& Form GET_DATA
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
FORM GET_DATA .
SELECT A~MATNR
B~MAKTX
C~WERKS
C~LGORT
C~LABST
INTO TABLE IT_MARD
FROM MARA AS A
AND SELECT-
OPTIONS IN SAP
ABAP
Parameters and
Select-Options are
selection-screen
elements in SAP
ABAP, which are used
to provide inputs fields
on selection-screens.
The...
SD FLOW AND MM
FLOW WITH
T-CODES IN SAP
SD and MM Flow
Explanations refer
SAPNuts.com Here is
the explenation of SD
and MM flows in SAP
which is very useful
for a SAP ABAP
devel...
SELECT
STATEMENTS IN
SAP ABAP
Select statements are
used to read data
from database table
using SAP ABAP
programming in SAP,
there are different
types of select
statemen...
USING OF GUI
DOWNLOAD IN
SAP ABAP
GUI Download is a
Function Module
which is used to
download data into a
file from SAP GUI,
GUI Download works
only for SAP GUI and
will not...
REAL-TIME
DELIVERY
REPORT IN SAP
ABAP
Real-time example of
displaying delivery
details for a range of
sales orders in SAP
ABAP. REPORT
ZPROJECT_RANGE
NO STANDARD
PAGE HEADING ...
SAP ABAP
REAL-TIME
INTERVIEW
QUESTIONS WITH
ANSWERS
SAP ABAP real time
Interview Questions 1.
Can we write the code
both call transaction
and session method in
Classical Reports in SAP ABAP - SAP ABAP http://sdnabap.blogspot.in/2011/09/classical-report-1.html
3 of 5 5/21/2015 5:37 PM
INNER JOIN MAKT AS B
ON B~MATNR = A~MATNR
INNER JOIN MARD AS C
ON C~MATNR = A~MATNR
WHERE A~MATNR IN S_MATNR
AND C~WERKS IN S_WERKS
AND SPRAS = SY-LANGU.
ENDFORM. " GET_DATA
*&---------------------------------------------------------------------*
*& Form BUILD_PAGE_HEADER
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
FORM BUILD_PAGE_HEADER .
FORMAT INTENSIFIED ON COLOR COL_HEADING.
ULINE AT (105).
WRITE:/ SY-VLINE,
'Material No',
20 SY-VLINE,
'Material Desc',
62 SY-VLINE,
'Plant',
72 SY-VLINE,
'Str.Loc',
81 SY-VLINE,
'Qty',
105 SY-VLINE.
ULINE AT (105).
FORMAT RESET.
ENDFORM. " BUILD_PAGE_HEADER
*&---------------------------------------------------------------------*
*& Form SHOW_LIST
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
FORM SHOW_LIST .
LOOP AT IT_MARD.
WRITE:/ SY-VLINE,
IT_MARD-MATNR,
20 SY-VLINE,
IT_MARD-MAKTX,
62 SY-VLINE,
IT_MARD-WERKS,
72 SY-VLINE,
IT_MARD-LGORT,
81 SY-VLINE,
IT_MARD-LABST,
105 SY-VLINE.
ENDLOOP.
ULINE AT (105).
*--footer for last page conditionally
V_LINE = ( SY-LINCT - SY-LINNO ) - 1.
SKIP V_LINE.
ENDFORM. " SHOW_LIST
*&---------------------------------------------------------------------*
*& Form BUILD_PAGE_FOOTER
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
single program? Ans.
Yes it...
INTERACTIVE ALV
REPORT WITH
ALV EVENTS IN
SAP ABAP
Interactive ALV report
using SAP ABAP
programming with ALV
events and user
command. REPORT
ZALV6 . DAT...
ARCHIVES
2013 (19)
2011 (21)
September
(21)
Control Break
Statements
in SAP
ABAP
ALV with Field
Catelogue
Interactive
ALV report
using
Function
Module
Interactive
ALV report
with ALV
Events in
SAP
ABAP...
ALV Report 4
ALV Report 3
ALV Report-3
ALV Report-2
ALV Report
Menu Painter
Interactive
Report -1
Classical
report with
events in
SAP ABAP
Classical
Reports in
SAP ABAP
Simple
Function
Module with
Simple
Parameters
Using GUI
Upload to
upload file in
SAP ABAP
Classical Reports in SAP ABAP - SAP ABAP http://sdnabap.blogspot.in/2011/09/classical-report-1.html
4 of 5 5/21/2015 5:37 PM
Newer Post Older Post
FORM BUILD_PAGE_FOOTER .
WRITE:/90 'Page :', SY-PAGNO.
ENDFORM. " BUILD_PAGE_FOOTER
Labels: ABAP Fundamentals, classical Reports, Reports
Home
Using GUI
Upload in
SAP ABAP
Using of GUI
Download in
SAP ABAP
Parameters
and select-
options in
SAP ABAP
Select
Statements
in SAP
ABAP
Important
System
Variables in
SAP ABAP
Simple Write
Statements
in SAP
ABAP
Copyright 2013. SAP ABAP . Some Rights Reserved
Recommend this on Google
Win The NewAge XUV500mahindraxuv500.com
Discover the newfeatures & Participatein the Contest
Classical Reports in SAP ABAP - SAP ABAP http://sdnabap.blogspot.in/2011/09/classical-report-1.html
5 of 5 5/21/2015 5:37 PM