Application Development 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: 

Table Control

Former Member
0 Kudos

hI All,

I have developed one screen using Table Conrol. On The scrren I have one column which have employee no. I want to do that if i Click on Modify botton Then this column of employee no be active and if I press some other button like display or new or save it must be Inactive. Plz Tell Me how to do it............

Thanks .

Pradip Pawar.

ABAP

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hi,

first make that field only output field. and set groups property. give there 111.

and when user press modify make in input enable like this.

Make one module in PBO.

&----


*& Module init_screen OUTPUT

&----


  • text

----


MODULE init_screen OUTPUT.

LOOP AT SCREEN.

IF screen-group1 = 111 AND ok_code = 'MOD' .

screen-input = 1.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDMODULE. " init_screen OUTPUT

hope it will helpful

Message was edited by:

Dhwani shah

6 REPLIES 6

Former Member
0 Kudos

hi,

first make that field only output field. and set groups property. give there 111.

and when user press modify make in input enable like this.

Make one module in PBO.

&----


*& Module init_screen OUTPUT

&----


  • text

----


MODULE init_screen OUTPUT.

LOOP AT SCREEN.

IF screen-group1 = 111 AND ok_code = 'MOD' .

screen-input = 1.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDMODULE. " init_screen OUTPUT

hope it will helpful

Message was edited by:

Dhwani shah

0 Kudos

Hi Dhwani,

Thanks for your Reply. I did as you said. First I Set Group property of One column 111 as like you said and and add this code into PBO. But not working plz

tell if I did something wrong.

MODULE SCREEN OUTPUT.

LOOP AT SCREEN.

IF screen-group1 = 111 AND OK-CODE = 'MODIFY' .

screen-input = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDMODULE. " init_screen OUTPUT

Thanks .

Pradip Pawar.

0 Kudos

Hello Pradip,

Did you test the my logic ? if not test now.

I have tested and it works great.

no need to keep screen group.

See the logic :

PROCESS BEFORE OUTPUT.

<b>module mod.</b>

MODULE STATUS_9000.

MODULE mod OUTPUT.

loop at screen.

if sy-ucomm = 'DISP'. -> display button

if screen-name = 'V_MATNR'. -> Field name

screen-input = 0.

modify screen.

endif.

endif.

endloop.

ENDMODULE. " mod OUTPUT

Try to maintain Function code 4 charcters ,do not use like modify ,use like MODF

This function code should be upper case always

Thanks

Seshu

0 Kudos

Thanks dear Seshu,

I tried your logic and my problem is solved, I am very thanksful to you. If you dont mind will you plz give me your Email Id. So that i can ask you questions directly..............

Thanks and Regards.

Pradip Pawar.

ABAP

0 Kudos

Hi Pradeep,

My email id : mseshureddy@yahoo.com,better to post issue in SDN ,i will not check my emails regularly. If you post issue in SDN,you get good response rather than individual response. I can say simple words you get good response in SDN ( from Rich (ABAP Master),and so on )

Thanks

Seshu

Former Member
0 Kudos

You can write the simple code in PBO

Loop at screen.

if sy-ucomm = 'MODI' . -> modify function code

if screen-name = 'EMP Field name'.

screen-input = 1.

modify screen.

endif.

endif.

if sy-ucomm = 'NEW' . -> New function code

if screen-name = 'EMP Field name'.

screen-input = 0.

modify screen.

endif.

endif.

endloop.

It should work

Thanks

Seshu