‎2009 Apr 06 10:34 AM
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..
‎2009 Apr 06 10:38 AM
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.
‎2009 Apr 06 10:58 AM
yes pawan..
i have declared that input/output field as variable in my program.
‎2009 Apr 06 11:14 AM
could you debug the program after you press enter... keep on looking for the value of variable which corresponds to you input/ouput field.
‎2009 Apr 07 4:59 AM
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
‎2009 Apr 06 12:16 PM
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
‎2009 Apr 06 1:22 PM
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
‎2009 Apr 07 1:29 PM
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
‎2009 Apr 08 12:01 PM
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)