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

Statement is not accessible in module pool

Former Member
0 Likes
2,245

Hi,

I hav created a module pool program and in the TOP include i have declared Input1 , Input2 and Result(output).

Then in TOP , declared data :ok_code like sy-ucomm,

save_code like ok_code.

Here its getting activated in TOP.

Then when i m going to PAI and writing

save_code = ok_code.

clear ok_code.

CASE OK_CODE.

when 'ADD'.

Result = Input1 + Input2.

endcase.

So i m getting error statement is not accessible.

Frnds plzz help regarding this.

Thanking u all.

regards,

suraj

1 ACCEPTED SOLUTION
Read only

Former Member
1,538

try to use

<b>start-of-selection.</b>

call screen 100.

module pai input.

endmodule.

it may help ...

regards

shiba dutta

9 REPLIES 9
Read only

Former Member
1,539

try to use

<b>start-of-selection.</b>

call screen 100.

module pai input.

endmodule.

it may help ...

regards

shiba dutta

Read only

Former Member
0 Likes
1,538

I think the error is in the line

CASE OK_CODE

Because you are clearing the field (ok_code) in previous statement.

If you rmove the line 'clear ok_code.' your code should work.

Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
1,538

HI,

In the PAI i Hope you have written the code in module.

That is the flow logic can only have MODULE and some other statements.

You should put your code in the module.

Also can you tell us where exactly it ponits when you get this error.

Regards,

Sesh

Read only

Former Member
0 Likes
1,538

what error u r getting????

u r assigning ok_code to save_code.

so u have to use

case SAVE_CODE not case OK_CODE.

Anyway this will not give syntax error. send me wht error u r getting????

Regards,

Nikhil

Read only

0 Likes
1,538

Hi Nikhil,

I am getting error statement is not accessible.

Plz clarify.

regards,

suraj

Read only

0 Likes
1,538

have you used <b>start-of-selection</b> and after that call screen and module pai i.e. as stated by my previous thread ? What error you are getting ? same? if so please paste your full code...

regards

shiba dutta

Read only

0 Likes
1,538

Hi,

I think you have written the code outside the module statement.Or else it might be partial activation.So try to activate whole module pool program by double clicking on the program name and the right click and activate.If it is still not solved paste the full code here.

Read only

Former Member
0 Likes
1,538

Hi,

may be u have defined some subroutines inside those includes.

the statements u have written after the statements form....endform will not be accessed.

so write start-of-selection statement after those include programs.

rgds,

bharat.

Read only

Former Member
0 Likes
1,538

hi suraj,

in your code ur assigning ok_code data to save_code and clearing ok_code. its fine upto there. but again ur using ok_code whose data is cleaerd its not correct.

in this case if u wanna clear ok_code then use save_code in case SELECTION CONDITION SATEMENT or clear value of ok_code after case statement.

save_code = ok_code.

clear ok_code. [ then try like this]

CASE SAVE_CODE. or case ok_code. [ if u wanna use then clear ok_code after case statement]

when 'ADD'.

Result = Input1 + Input2.

endcase.

[clear ok_code].

if helpful reward some points.

regards,

SURESH.A