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

setting column to input enabled in table control at run time

Former Member
0 Likes
502

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
478

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

3 REPLIES 3
Read only

Former Member
0 Likes
478

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

Read only

Former Member
0 Likes
478

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.

Read only

Former Member
0 Likes
479

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