05-04-2009 7:31 AM
Hai,
I have created one main screen & calling a sub screen from there.in the subscreen I have created a push button with function code. the corresponding OK_CODE is defined in the main screen.
The problem is if I click on the pushbutton the error message'Invalid field format (screen error)' is been displayed. If I remove the function code the error is not coming.
Can any one tell what is the problem here?
Thanks & Regards,
Bhaskar.
05-04-2009 10:03 AM
Hi Bhaskar,
Declare all the input fields you are using in the main screen or subscreen as global fields in the program with same data type and length.
Edited by: venugopal katikam on May 4, 2009 11:03 AM
05-04-2009 7:41 AM
05-04-2009 7:50 AM
Hai Anil,
it is just some text like 'DISP'.we can give anything here.
Regards,
Bhaskar.
05-04-2009 7:59 AM
Try to declare the OKCODE in the TOP include also so that it can be globally accessed.
DATA OKCODE TYPE sy-ucomm.
Regards,
Anil
05-04-2009 8:06 AM
Hi,
Declare this globaly so that the main screen as well as ur
subscreen wil able to acess the variable and the error wont ciome.
DATA OK_CODE TYPE sy-ucomm.
Regards
05-04-2009 8:09 AM
Hi,
try to create the push button in the main screen not in the sub screen.
and declare the varibale in TOP of type sy-ucomm.
regards
Rajesh Kumar
05-04-2009 8:26 AM
Hi,
Please check whether you have declared push button globally in module pool program. If you have decalared already check the data type. In module pool screen field data type and decalaration data type both should be the same.
Hope its helps
05-04-2009 8:59 AM
Please find here the restrictions related to subscreen. Hope this may help you to trace-out reason for your problem.
1. GUI status cannot be set to the sub screen.
2. OKCODE is not applicable to the sub screen.
3. It cannot contain AT EXIT-COMMAND.
4. Function codes linked to user actions on subscreens are placed in the OK_CODE field of the main screen. (If you add a pushbutton on a subscreen, and assign a function code to it there, you should be able to pick up this in your "module dnnnn_user_command" logic within the PBO of the main screen.)
5.The flow logic of a subscreen screen may not contain any dialog modules containing the statements SET TITLEBAR, SET PF-STATUS, SET SCREEN, LEAVE SCREEN, or LEAVE TO SCREEN. Any of these statements causes a runtime error.
6. You cannot change the GUI status of a main screen in a subscreen screen.
Regards
05-04-2009 9:46 AM
Hi ,
There is no need to define ok code in the main screen i think, as you already defined the function code for the push button in the sub screen.
05-04-2009 10:03 AM
Hi Bhaskar,
Declare all the input fields you are using in the main screen or subscreen as global fields in the program with same data type and length.
Edited by: venugopal katikam on May 4, 2009 11:03 AM
05-04-2009 10:45 AM
The problem is if I click on the pushbutton the error message'Invalid field format (screen error)' is been displayed. If I remove the function code the error is not coming.
hi ,
Perhaps problem is not bcoz of ur push button instead bcoz of I/P O/P texfield in which ur
getting some value or entering any value change the data type of that text field in char
you won't get any error .
Regrds
Digvijay Rai