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

Call Screen statement Error

Former Member
0 Likes
2,769

Dear Experts,

is there any setting that needs to be done before creating any dialog program.

I m asking so because i m getting an error 'Statement is not accessible' for CALL SCREEN 100.

Regards,

Maverick

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,753

Hi,

Are you callling the Screen within TOP INCLUDE ??

All ABAP statements and key words must be with in modules only in Case of Screen Programs.

Form Frmname

endform.

Module mdname.

endmodule

etc

Check your program.

Cheers

Ram

9 REPLIES 9
Read only

sridhar_meesala
Active Contributor
0 Likes
1,753

You have posted the same question earlier and that was deleted. Please be more specific when you ask a question. Explain what you have done and where you have called the screen.

Read only

0 Likes
1,753

Thanks for ur reply.

But i didt not get the answer of the deleted question.

So i tried new program from scratch and getting the same error msg. ' Statement is not accessible'.

i hv written the following code in ABAP Editor


PROGRAM  SAPMZ_TEST_DYNPRO.


DATA: input  TYPE i,
      output TYPE i,
      radio1(1) TYPE c, radio2(1) TYPE c, radio3(1) TYPE c,
      box1(1) TYPE c, box2(1) TYPE c, box3(1) TYPE c, exit(1) TYPE c.

CALL SCREEN 100.

MODULE init_screen_100 OUTPUT.
  CLEAR input.
  radio1 = 'X'.
  CLEAR: radio2, radio3.
ENDMODULE.

MODULE user_command_0100 INPUT.
  output = input.
  box1 = radio1.
  box2 = radio2.
  box3 = radio3.
  IF exit NE space.
    LEAVE PROGRAM.
  ENDIF.
ENDMODULE.

Regards

Maverick

Read only

Former Member
0 Likes
1,754

Hi,

Are you callling the Screen within TOP INCLUDE ??

All ABAP statements and key words must be with in modules only in Case of Screen Programs.

Form Frmname

endform.

Module mdname.

endmodule

etc

Check your program.

Cheers

Ram

Read only

0 Likes
1,753

Thanks for ur reply

Let me tell u how i created my program

first i created a program with SAPMZ_TEST_DYNPRO name in se38.

then i went to se51 and created the program with same name and required attributes and elements.

then i added the code 'posted in previous reply', into abap editor.

when i checked for syntax , i got the error msg 'Statement is not accessible' for CALL SCREEN 100 .

could you guide me where i m mistaking.

Regards

Maverick

Read only

0 Likes
1,753

Hi Mavirick,

i think you are calling a screen in executable program, if it is the case then use start-of-selection infront of call screen statement.

write like this

start-of-selection

call your screen here

Thanks

Sai

Read only

0 Likes
1,753

Thanks Ram

you resolved my problem.

actually I m learning Dialog Programming by my own so getting little probs.

Thanks again.

Regards

Maverick

Read only

0 Likes
1,753

Hi,

Firstly you have to create the program of type "Modulepool" in SE38 and not "Executable".

Add START-OF-SELECTION before calling the screen

DATA: input  TYPE i,
      output TYPE i,
      radio1(1) TYPE c, radio2(1) TYPE c, radio3(1) TYPE c,
      box1(1) TYPE c, box2(1) TYPE c, box3(1) TYPE c, exit(1) TYPE c.

START-OF-SELECTION.   <--------------------

CALL SCREEN 1000.

MODULE init_screen_1000 OUTPUT.
  CLEAR input.
  radio1 = 'X'.
  CLEAR: radio2, radio3.
ENDMODULE.

MODULE user_command_1000 INPUT.
  output = input.
  box1 = radio1.
  box2 = radio2.
  box3 = radio3.
  IF exit NE space.
    LEAVE PROGRAM.
  ENDIF.
ENDMODULE.

Now the program will be activated. To eecute the program you need to create a transaction as modulepool programs cannot be executed directly.

Hope it solves your problem.

Thanks,

Sri.

Read only

0 Likes
1,753

Hi,

Open the Program in SE80 or if you are in SE30 then go to DISPLAY OBJECT LIST by pressing ctrl + shift + F5

Now activate here, if you still face the problem, recreate the Screen in SE80, and activate.

Try changing the program attribute from 1 to M

Cheers

Ram

Read only

Former Member
0 Likes
1,753

Thank you for your anwser