‎2007 Feb 12 5:15 PM
Hello ,
I have defined everything correctly but when i try to use the push button to go to next screen this message comes up 'No field defined for function Code' .Please advise .
Thank you ,
‎2007 Feb 12 6:42 PM
Make sure that you put define the name of the OK_CODE field in your screen. Go to your screen, click on the element list tab. You should have a line which as a TYpe as "OK". Put the name as OK_CODE.
Now in your program.....you need a DATA statement for OK_CODE, and you need to handle the OK_CODE in your PAI of the screen.
data: ok_code type sy-ucomm.
************************************************************************
* Module USER_COMMAND_0100 INPUT
************************************************************************
module user_command_0100 input.
case ok_code.
when 'BACK' or 'EXIT' or 'CANCEL'.
clear ok_code
set screen 0.
leave screen.
endcase.
endmodule.Regards,
RIch Heilman
‎2007 Feb 12 5:27 PM
Hi,
Are you using dialog programming?
In the properties of the push-button, enter the function code, and in the PAI event check if sy-comm is equal to your function code then do the further processing.
Regards
Subramanian
‎2007 Feb 12 5:29 PM
Yes I am doing Dialog Programming . But still not sure why its not going further to the next screen .
‎2007 Feb 12 5:31 PM
Hi,
You assigned the Function code correctly and written the code in the PAI module, see there whethe you have writen the correct code, Seems the Function code is empty when you click the pushbutton, so see in the Debugging whethere you are assigend the correct fucntion code or not?
Regards
Sudheer
‎2007 Feb 12 5:51 PM
Hello,
Assign a function code for the Push button and write the code in the PAI module of the screen.
Regards,
Vasanth
‎2007 Feb 12 6:01 PM
hi hari,
u must assign the function code to the push button and use that function code in the PAI event of module pool.
Regards...
Arun.
‎2007 Feb 12 6:38 PM
Hi,
I am not sure of the reason.
Can you please show the code that you have written for handling the sy-ucomm ( generated by functon code ) to go to next screen.
Also, although incorrect function code or absence of function code will not give tis kinda error but still can you just check once if you are handling the correct function code in sy-ucomm. This function code must be defined for the push-button that you are using.
Regards
Nishant
‎2007 Feb 12 6:42 PM
Make sure that you put define the name of the OK_CODE field in your screen. Go to your screen, click on the element list tab. You should have a line which as a TYpe as "OK". Put the name as OK_CODE.
Now in your program.....you need a DATA statement for OK_CODE, and you need to handle the OK_CODE in your PAI of the screen.
data: ok_code type sy-ucomm.
************************************************************************
* Module USER_COMMAND_0100 INPUT
************************************************************************
module user_command_0100 input.
case ok_code.
when 'BACK' or 'EXIT' or 'CANCEL'.
clear ok_code
set screen 0.
leave screen.
endcase.
endmodule.Regards,
RIch Heilman