2007 Dec 27 11:43 AM
Hi friends,
I have one table control in that all columns are
set as display only field or ( output only).
Now, when I press enter key one column should be
enabled as input field. HOW TO DO THAT?
my coading.
loop at ztblctrl-cols into s_cols.
if s_cols-screen-name = 'ZGATEPASS-MENGE'.
s_cols-screen-input = 1.
s_cols-screen-output = 1.
s_cols-screen-invisible = 0.
s_cols-screen-active = 1.
s_cols-screen-required = 1.
move s_screen to s_cols-screen.
modify ztblctrl-cols from s_cols.
endif.
endloop.
Regards,
s.senthil kumar
2007 Dec 27 11:58 AM
Hi Kumar,
Hope your code is in PBO.
See the below 2 links and you will come to know where you are going wrong.
http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbac5e35c111d1829f0000e829fbfe/content.htm
http://sap.niraj.tripod.com/id29.html
Reward points for helpful answers.
Regards,
hari
Hi friends,
I have one table control in that all columns are
set as display only field or ( output only).
Now, when I press enter key one column should be
enabled as input field. HOW TO DO THAT?
my coading.
loop at ztblctrl-cols into s_cols.
if s_cols-screen-name = 'ZGATEPASS-MENGE'.
s_cols-screen-input = 1.
s_cols-screen-output = 1.
s_cols-screen-invisible = 0.
s_cols-screen-active = 1.
s_cols-screen-required = 1.
move s_screen to s_cols-screen.
modify ztblctrl-cols from s_cols.
endif.
endloop.
Regards,
s.senthil kumar
2007 Dec 27 11:51 AM
Hi Senthil,
Dont know what the statements:
scols-screen-output = 1._ and
move sscreen to s_cols-screen._
are used for - I think they are not needed, please comment them out.
Also the following code should be implemented in the PBO of the screen, hope thats done.
Another thing, when you press enter - the control should go to the PBO and trigger the code, hence put a break point and check whether the screen gets recalled on clicking enter.
Revert back in case of Qs.
/Aditya
2007 Dec 27 11:55 AM
You must do this code at PBO module. Create a module like:
MODULE init_screen.
In this module, you must code something like this:
LOOP AT SCREEN.
IF screen-name = 'ZGATEPASS-MENGE'.
screen-input = 1.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
This is a simple manner to just open this field. But the logic complex can increase as much as you need to open and close many fields "dynamically".
I hope it helps.
2007 Dec 27 11:58 AM
Hi Kumar,
Hope your code is in PBO.
See the below 2 links and you will come to know where you are going wrong.
http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbac5e35c111d1829f0000e829fbfe/content.htm
http://sap.niraj.tripod.com/id29.html
Reward points for helpful answers.
Regards,
hari
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |