‎2007 Sep 08 9:28 AM
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
‎2007 Sep 08 10:10 AM
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
‎2007 Sep 08 10:10 AM
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
‎2007 Sep 08 2:03 PM
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.
‎2007 Sep 08 2:55 PM
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
‎2007 Sep 10 6:52 AM
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
‎2007 Sep 11 2:46 AM
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
‎2007 Sep 08 11:33 AM
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