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

REPORT program's screen

Former Member
0 Likes
4,094

I want to know how does the REPORT program's screen work ,could you help me?? I have learned that in a PROGRAM program I can define a screen and call it like <i>"CALL SCREEN 100"</i>. But in a REPORT program, we can not define any screens but to use a pre-defined one--SCREEN 1000.I opened my program in SE80 and found a bunch of nonsense :

<i>PROCESS BEFORE OUTPUT.

MODULE %_INIT_PBO.

MODULE %_PBO_REPORT.

MODULE %_PF_STATUS.

MODULE %_END_OF_PBO.

PROCESS AFTER INPUT.

MODULE %_BACK AT EXIT-COMMAND.

MODULE %_INIT_PAI.

FIELD !P_BUKRS MODULE %_P_BUKRS .

FIELD !P_YEAR MODULE %_P_YEAR .

FIELD !P_PERIOD MODULE %_P_PERIOD .

CHAIN.

FIELD P_BUKRS .

FIELD P_YEAR .

FIELD P_PERIOD .

MODULE %_BLOCK_1000000.

ENDCHAIN.

FIELD !P_FILE1 MODULE %_P_FILE1 .

FIELD !P_FILE2 MODULE %_P_FILE2 .

CHAIN.

FIELD P_FILE1 .

FIELD P_FILE2 .

MODULE %_BLOCK_1000005.

ENDCHAIN.

CHAIN.

FIELD P_BUKRS .

FIELD P_YEAR .

FIELD P_PERIOD .

FIELD P_FILE1 .

FIELD P_FILE2 .

MODULE %_END_OF_SCREEN.

MODULE %_OK_CODE_1000.

ENDCHAIN.

PROCESS ON VALUE-REQUEST.

FIELD P_FILE1 MODULE %_P_FILE1_VAL .

FIELD P_FILE2 MODULE %_P_FILE2_VAL .</i>

what are those modules begin with '%' any way??

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,838

hi,

"I want to know how does the REPORT program's screen work ,could you help me?? I have learned that in a PROGRAM program I can define a screen and call it like "CALL SCREEN 100". But in a REPORT program, we can not define any screens but to use a pre-defined one--SCREEN 1000"

also what u opened in se80 is the Flow logic of a standard SAP program (report).

if the report is not in a customer name space (thats if the name doesnt start with a Y or Z) then u cant edit it.

if the report is with a Z then u can define a new screen and use it the way u have mentioned above...

i can help u better, for that cud u be a little bit more specific abt wat ur prob is?? i mean do u wanna kno how the screen flow happens in a report program or ???

regards,

sagar.

8 REPLIES 8
Read only

Former Member
0 Likes
1,839

hi,

"I want to know how does the REPORT program's screen work ,could you help me?? I have learned that in a PROGRAM program I can define a screen and call it like "CALL SCREEN 100". But in a REPORT program, we can not define any screens but to use a pre-defined one--SCREEN 1000"

also what u opened in se80 is the Flow logic of a standard SAP program (report).

if the report is not in a customer name space (thats if the name doesnt start with a Y or Z) then u cant edit it.

if the report is with a Z then u can define a new screen and use it the way u have mentioned above...

i can help u better, for that cud u be a little bit more specific abt wat ur prob is?? i mean do u wanna kno how the screen flow happens in a report program or ???

regards,

sagar.

Read only

Former Member
0 Likes
1,838

Hi Sensen,

Are you aware abt Module pool??In Module pool u have different Processes ( nothing bt event ) like PBO -> Process before output , PAI -> Process aftere input.

That means if before out put comes, you want to change something like if you want to pass some default value to fields then you can write ur code in PBO Module.

The same way you can use PAI means , after input some changes are required then you can write in PAI Module.

Module starting with % is nothing but place you to write code as per business requirment.

Just double click on that module starting with % and it will ask you for Object create. now here you can write ur code.

Hope this will help you.

Regards,

Seema

Read only

Former Member
0 Likes
1,838

Thanks Sagar Mehta ,

if you know anything about screen flow logic in a report program that I don't, please tell me , I'd appreciate it

Message was edited by:

sensen wei

Read only

0 Likes
1,838

hi,

if u want to use screens for eg. u have created screen 100 for ur report program and u want to use it then u can use the statement CALL SCREEN 100. this will transfer the control to the screen and when the screen finishes its processing then the control comes back to the report program.

for defining the screen u can use se51 or easier way is in se80 u open ur program and right click on the program name (present in a list box on the left of ur screen) and select create; then select screen and flow the remaining steps..

theres another screen thats default to all report programs and it is called a SELECTION SCREEN, the screen number is 1000.

there are different events that define how the flow will happen. some of them are:-

initialization; start of selection screen; at selection screen; end of selection screen etc.

im not sure whether this helped or not..

regards,

sagar.

Read only

Former Member
0 Likes
1,838

What you are seeing is the code generated for you by SAP from your selection screen definition in the report i.e. your definition in the report like:

parameters:
  p_bukrs               like bkpf-bukrs.
selection-screen  skip.
select-options:
  s_kunnr               for vbrk-kunag.

gets turned into screen 1000 "automagically" by SAP. You do not edit this screen 1000 directly... if you need to change this screen then your change your report instead i.e. add parameters, or more "selection-screen" parameters and reactive it.

However you can have your own dynpros in a report... I just posted an example in the UI Programming forum:

i.e. you can have "call screen 100" in your report and have all the code in there - I don't recommend it, but it is technically possible.

Jonathan

Read only

hymavathi_oruganti
Active Contributor
0 Likes
1,838

hi,

who said u we cant define screens in a report program? u can do it and no error will come. but generally we create screens in module pool program as it is not online program and cannot be executed directly.module pool progrm can be excecuted only thru transactions.

now coming to ur question selection screen is a screen with number "1000" whose logic inside will be like a normal screen in a module pool.

in my view, never feel or distinguish between a modulepool or a report. both are always interlinked.

% is a wild character , as we dont know what are the fields in the slecetion screen, wild character is used for generic purpose.

Executable programs are made for reporting. They are the only programs that can be started via SUBMIT (which is the ABAP statement that lies behind transaction SA38!). SUBMIT starts a reporting process in the ABAP runtime environment, that is tailor made for receiving user input, selecting data from database tables, and displaying them on a list. The reporting process triggers a sequence of events -- as for example INITIALIZATION, START-OF-SELECTION etc. -- that can be handled in the executable program. Stay tuned for an upcoming Weblog about SUBMIT.

Module pools are very similar to executable programs. Except for reporting events and for being callable via SUBMIT, module pools support the same features as executable programs. In another way around, module pools could be fully replaced by executables. Traditionally, module pools are chosen to implement the application logic of so called dialog programs. Those are programs that communicate with the user via Dynpros. A Module pool Ís usually executed by calling a transaction code connected to one of its Dynpros. The dialog modules are then called from the Dynpro's flow logic.

Message was edited by:

Hymavathi Oruganti

Read only

Former Member
0 Likes
1,838

Thanks all of you

Read only

Former Member
0 Likes
1,838

Hi,

A report program having the selection screen (parameters/ slect option) a default screen is generated by the system based on the selection condition. The screen number is 1000. the % indicates that the screen is system generated and dynamic. If you change the selection condition and again activate and run the module also got changed and reflects the same.

This happen with ALV grid view also. where the modules contain % in the naming convention.

Hope this will help you querry.