Application Development 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: 

generate report

Former Member
0 Kudos

Hi,

can anyone tell me how to the genetare report?

regards,

Bharat.

7 REPLIES 7

Former Member
0 Kudos

Hi Bharat,

Can u elaborate the question.

What do u exactly mean by generation of report.

Regards,

Himanshu

Former Member
0 Kudos

hi

go 2 transaction SE38 and u can type the report program and then save n activate and then executeusing F8.

This statement is for internal use only.

It cannot be used in application programs.

Syntax

GENERATE REPORT prog [error_handling].

Extras:

1. ... MESSAGE f1

2. ... INCLUDE f2

3. ... LINE f3

4. ... WORD f4

5. ... OFFSET f5

6. ... TRACE-FILE f6

7. ... DIRECTORY ENTRY f7

8. ... WITHOUT SELECTION-SCREEN

9. ... MESSAGE-ID f8

10.... SHORTDUMP-ID f9

11.... WITH PRECOMPILED HEADERS

12.... WITH TEST CODE

Effect

Generates the program specified in the field prog. If the program is a report (that is, a type 1 program), the selection screen is generated automatically.

Return Value

SY-SUBRC = 0:

Program generated successfully.

SY-SUBRC <> 0:

Unable to generate program.

SY-SUBRC = 4:

Syntax error.

SY-SUBRC = 8:

Generation error.

SY-SUBRC = 12:

Error when generating selection screen.

Addition 1

... MESSAGE f1

Effect

When a syntax error occurs, the error message is stored in this field.

Addition 2

... INCLUDE f2

Effect

When a syntax error occurs, the name of the include program in which the error occurred is stored in this field.

Addition 3

... LINE f3

Effect

When a syntax error occurs, the number of the incorrect line is stored in this field.

Addition 4

... WORD f4

Effect

When a syntax error occurs, the incorrect word is stored in this field.

Addition 5

... OFFSET f5

Effect

When a syntax error occurs, the position of the incorrect word in the incorrect line is stored in this field.

Addition 6

... TRACE-FILE f6

Effect

Trace output is stored in this file. This addition automatically activates the trace mode.

Addition 7

... DIRECTORY ENTRY f7

Effect

The program attributes required for checking are taken from the field f7. This field must correspond to the structure of the table TRDIR.

Addition 8

... WITHOUT SELECTION-SCREEN

Effect

Does not generate the selection screen.

Addition 9

... MESSAGE-ID f8

Effect

If a syntax error occurs, writes the key of the appropriate error message to the field f8. This key has the same structure as the key of the TRMSG table.

Addition 10

... SHORTDUMP-ID f9

Effect

If a short dump occurs, this addition writes the key of the appropriate short dump to the field f9. This key has a maximum length of 30 characters.

Addition 11

... WITH PRECOMPILED HEADERS

This addition allows you to regenerate precompiled headers during the generation of the ABAP program prog. Precompiled headers are used to increase the translation speed of the ABAP compiler by buffering the declaration data of global classes, interfaces, and type groups in formatted form for the ABAP compiler.

Note

If you use this addition, you must ensure that the application performs a COMMIT WORK or ROLLBACK WORK within a short period of time. This ensures that the database locks, which are set when the precompiled headers are regenerated, are held for a short time only and thus do not block the generation of other ABAP programs.

Addition 12

... WITH TEST CODE

With this addition, the test classes of the program are generated independently of the profile parameter abap/test_generation.

regards,

kiran kumar k

Message was edited by:

kiran kumar kamati

Former Member
0 Kudos

Generation of Report is nothing but Activating it. Activation of the report would generate the executable code in the application layer of the server that can run and give the output.

Former Member
0 Kudos

Hi,

Press control+F3 button to generate the report. It will create the Run time object for that program, which will be globally available.

or from menu PRORAM-> Generate

reward if useful

Regards,

Anji

Former Member
0 Kudos

Hi guys,

i am asking for the keyword "GENERATE REPORT"?

regards,

bharat.

0 Kudos

when you execute a program an internal submit is executed.

Similarly Generate report :This statement is for internal use only.

It Generates the program

0 Kudos

GENERATE REPORT statement can be used internally in SAP, that cant be used in normal application programs that we develop.