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

modulpool programming

Former Member
0 Likes
836

hi experts..

i am working in module pool programming.

I have one input/output feild on my screen.

By pressing 'enter' button that field is getting cleared, but in my code there in nothing for 'enter'

button.

why it is happening?

plz help me..

8 REPLIES 8
Read only

Pawan_Kesari
Active Contributor
0 Likes
814

Do you have variable defined in program for that input field? If not then define a variable with same name as your input/output field.

Read only

0 Likes
814

yes pawan..

i have declared that input/output field as variable in my program.

Read only

0 Likes
814

could you debug the program after you press enter... keep on looking for the value of variable which corresponds to you input/ouput field.

Read only

0 Likes
814

Hi,

Just make sure that you are not clearing the values .

FYI ... the sequence will follow like this ...

initially before screen appears control will go to the event PBO and PAI and again PBO...

i hope this will help you. reply me still the problem is persisting the same...

regards,

Sreenivasa sarma

Read only

Former Member
0 Likes
814

Hello,

As enter has no function code (Sy-Ucomm) when you press enter whatever you have written in PAI will be excuted if you havent provided any condition.

Hope this helps.

Sathya

Read only

Former Member
0 Likes
814

Hi,

do not clear your variables or call the same screen in PBO or PAI

wrtie when others in PBO and PAI it will work...


module user_command_0200 input.
case ok.
*------Leave screen
    when 'BACK'.
      leave to screen 100.
*------Leave transaction
    when 'EXIT'.
      leave program.
*------Select sales item details
    when other.             "Write this statemnet
*     Do nothing              <<--- "Write this statemnet
  endcase.

Regards,

Prabhudas

Read only

Former Member
0 Likes
814

I think somewhere in the program you are deleting the variable after pressing the enter button.

Remove all the clear statements in the program and then check.

Go to the debugger and see at which statement the value is getting cleared.

Put a breakpoint in the case statement in the PAI.

I.e you must have written something like this.

CASE ok_code.

WHEN BACK

WHEN 'CANCEL'.

WHEN 'ENTER'.

ENDCASE.

put the break-point in the case statementa nd start doing F5 and see where is the value getting cleared.

U can easily find that

Read only

Former Member
0 Likes
814

Hi ,

If you dont write anything under 'enter' the cursor goes back to PBO module again . So you will get the initial screen (i.e., with no values)