Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

basic report programming

Former Member
4,769

i am new to SAP.

please provide information abt report programming like what are the basic things we have to remember while writing a report program.please provide any link which gives basic information abt report programming with some hands-on practice.

1 ACCEPTED SOLUTION
Read only

Former Member
3,602

hii amar,

Report programming is a simple abap program which deals with presentation of the output to the client.

Report is generally designed when we want to have the output on the screen in a particular manner..

Report has many things attached to it like alv etc.

But basically reports are managed by events. The order of the events are as follows.

Initialization

At selection screen

Start of selection

End of selection

Top of page..

We write the code in these events and this will be executed sequentially. If u want any detailed thing in report. Do revert back.

31 REPLIES 31
Read only

former_member196299
Active Contributor
0 Likes
3,602

hi ,

Check on with this link :

http://www.geocities.com/mpioud/Abap_programs.html

This link will guide you with various examples of report programs which will be helpful on an overall understanding of report writing , rest is based on your understanding on the subject and the practise.

Regards,

Ranjita

Read only

0 Likes
3,602

hi ranjita,

is alv and report both are same?

i am asking this because the link what u replied for my question contains alv,alv,alv,alvvvvvvvv

Read only

0 Likes
3,602

Hi Amar,

ALV programs are one type of report program ..

Regards,

Ranjta

Read only

0 Likes
3,602

k.

but i think those programs are too advaced for me.

can u post any basic programs.

thanks,

amar.

Read only

0 Likes
3,602

Hi,

Take transaction SE38.

Give Demo*

You will find enough demo programs.

Regards,

Renjith Michael.

Edited by: Renjith Michael on Jan 28, 2008 5:50 PM

Read only

0 Likes
3,602

Hi,

If you want basic programmimg on reports

follow this links

http://www.sapdev.co.uk/abap/abap-dev.htm

http://www.sapdev.co.uk/reporting/alvhome.htm

Still you want Simpler..

Refer

http://www.sapbrainsonline.com/FAQs/TECHNICAL/SAP_ABAP_REPORTS_FAQ.html

Hope this should get you to a start.

If not get back to me.

Thank you,

Read only

Former Member
0 Likes
3,602

You can talk about these type of reports.

Classical

Interactive

Logical Database

ABAP Query

Report Writer

Report Painter

Drill Down Report

Classical Report

Also you can talk about the events in Classical Report with example programs:

INTIALIZATION .

AT-SELECTION-SCREEN

START OF SELECTIONS

TOP-OF-PAGE

END-OF-PAGE

AT PF

END-OF-SELECTION

AT USER-COMMAND

Check these links perhaps it may help.

http://sap.mis.cmich.edu/sap%2Dabap/abap08/sld001.htm

http://www.sapdevelopment.co.uk/reporting/reportinghome.htm

http://www.erpgenie.com/abap/ireports.htm

Reprots

http://www.sapgenie.com/abap/reports.htm

http://www.allsaplinks.com/material.html

http://www.sapdevelopment.co.uk/reporting/reportinghome.htm

http://www.sapfans.com/forums/viewtopic.php?t=58286

http://www.sapfans.com/forums/viewtopic.php?t=76490

http://www.sapfans.com/forums/viewtopic.php?t=20591

http://www.sapfans.com/forums/viewtopic.php?t=66305 - this one discusses which way should you use - ABAP Objects calls or simple function modules.

ALV

http://www.sapfans.com/forums/viewtopic.php?t=58286

http://www.sapfans.com/forums/viewtopic.php?t=76490

http://www.sapfans.com/forums/viewtopic.php?t=20591

http://www.sapfans.com/forums/viewtopic.php?t=66305 - http://www.sapgenie.com/abap/reports.htm

http://www.allsaplinks.com/material.html

http://www.sapdevelopment.co.uk/reporting/reportinghome.htm

Top-of-page in ALV

ALV Group Heading

http://www.sap-img.com/fu037.htm

ALV

http://www.geocities.com/mpioud/Abap_programs.html

Reports

http://www.sapgenie.com/abap/reports.htm

http://www.allsaplinks.com/material.html

http://www.sapdevelopment.co.uk/reporting/reportinghome.htm

http://www.sapfans.com/forums/viewtopic.php?t=58286

http://www.sapfans.com/forums/viewtopic.php?t=76490

http://www.sapfans.com/forums/viewtopic.php?t=20591

http://www.sapfans.com/forums/viewtopic.php?t=66305 - this one discusses which way should you use - ABAP Objects calls or simple function modules.

Reward points if useful.

Read only

Former Member
0 Likes
3,602

Hi Amarnath,

Check out this link where u can find some good examples regarding report programming.

http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m0/index.jsp?topic=/com.ibm.rational.clearcase.c...

Read only

Former Member
0 Likes
3,602
Read only

Former Member
0 Likes
3,602

hi,

Here's a hello world program.

Call Transaction 'SE38'.

Create a new program.

To proceed in an SAP 3.x system you must be registered as a Developer. You get your Developer Key from your Sys. admin in a couple of minutes/hours/days after you applied for it. It must be entered once when you create your first program.

Program attributes:

Type: 1

Application: S

Choose a meaningful title

(Save)

Choose Development Class &TMP or press Button 'Local object'

Now you can edit the source code.

Position the cursor in a line number cell. Press F1 for the help of editor line commands.

enter i3 which inserts three new rows into your program.

report zhello.

write: / 'hello world'.

(Save, Generate, Execute)

Hope this is helpful, Do reward.

Read only

Former Member
3,604

hii amar,

Report programming is a simple abap program which deals with presentation of the output to the client.

Report is generally designed when we want to have the output on the screen in a particular manner..

Report has many things attached to it like alv etc.

But basically reports are managed by events. The order of the events are as follows.

Initialization

At selection screen

Start of selection

End of selection

Top of page..

We write the code in these events and this will be executed sequentially. If u want any detailed thing in report. Do revert back.

Read only

Former Member
Read only

Former Member
0 Likes
3,602

hi amarnath,

report is basic programing place where u can write ur code and u can display required output.

for example:

  • i think know about how to open SAP login window. enter T.code se38 there u have to write a ur report program name. and short description. type of program here it is executable program.

then u will get new window where it starts

REPORT ZXXXXXXXXXX .

  • WHERE ZXXXXXXXX is your report program name.

now test the following code.

write: / 'HELLO WORLD!'.

SAVE (CTRL+S)

CHECK(CTRL+F2)

AVTIVATE(CTRL+F3)

COMPILE(F8).

  • ABOVE FOUR STEPS R SAME FOR ALL REPORT PROGRAMS.

NOW U WILL GET OUTPUT

HELLO WORLD!

IF U ALREADY TRIED THIS REPLY ME I WILL GIVE FURTHER DETAILS.

IF HELP FULL REWARDS PLZ.

Read only

0 Likes
3,602

give the next one pleasee.....

Read only

0 Likes
3,602

now the next step is program using data types

aim this program is add two numbers

give the new program name zadd

report zadd .

data A type i.

data B type i.

data C type i.

C = A + B.

write 'A = ' A, 'B = ' B, 'C = 'C.

if u want further ask i will be online only.

if help full reward plz

Read only

0 Likes
3,602

next......

sorry,i can't reward u,because the question is already closed.

Read only

0 Likes
3,602

no probs

did u run the program

its ok running properly

now see the changes in above program

data: A type i,

B type i,

C type i.

just replace the above declaration in ur previous program

Read only

0 Likes
3,602

Unable to interpret "A". Possible causes of error: Incorrect spelling or comma error.

this error is coming for all A,B,C at write statement.

Read only

0 Likes
3,602

just put : after write command

it won't give error.

Read only

0 Likes
3,602

already i put that one

but,no use

Read only

0 Likes
3,602

write 'A = ', A, 'B = ', B, 'C = ', C.

correct like this u will get answer

Read only

0 Likes
3,602

write :/'A = ', A, 'B = ', B, 'C = ', C.

now it is working after correcting as above and i did

data: a type i,

b type i.

also

Read only

0 Likes
3,602

now assign the values for different

and try for different data types

Character type N D T C

N numeric (its a number operations like add ,sub not possible)

D date

T time

C character

I INTEGER

P PACKED

F FLOAT

Try above type too

Read only

0 Likes
3,602

i did like this.

but,it is not giving the correct output.

data :A type i,

B type n,

C type d,

D type c.

C = '10-15-2007'.

A = 100.

D = 'amar'.

B = '200'.

write :/'A = ', A, 'B = ', B, 'C = ', C, 'D= ', D.

Read only

0 Likes
3,602

I type takes only Integers only like 3 ,88888,9999........

N type takes integer but it stores as character format so add and sub an multi division is not possible.

C type takes one character only like A , B , C ,D ..........

d type is date u have give like this 20080201

in ur program

data :A type i, " A is integer so it takes 100

B type n, "B is numeric so it takes 200 correct

C type d, "C is date type so it takes yyyymmdd format only 20071010

D type c. " is character type so u have write D(4) type c

C = '10-15-2007'. " wrong

A = 100. "correct

D = 'amar'. " wrong

B = '200'. "correct

i think u have basic knowledge of computers i think

plz rewards if help full

Read only

0 Likes
3,602

B='200'.

giving the output as zero.

Read only

0 Likes
3,602

Hi,

data :A type i,

B type n,

C type d,

D type c.

C = '10-15-2007'.

A = 100.

D = 'amar'.

B = '200'.

write :/'A = ' A, 'B = ' B, 'C = ' C, 'D= ' D.

Regards

Read only

0 Likes
3,602

give the space before the operate (+,-,*) and after the operator

Read only

0 Likes
3,602

wat is next

Read only

0 Likes
3,602

it is character type it is not integer type

use B(3) type N

Read only

0 Likes
3,602

i gave the space.

i posted another thread regarding this program.

see that.

i gave the program as it is there