11-13-2015 5:34 AM
Hi All,
I have a requirement to disable a column cell when another column (with checkbox) is clicked on SM30 screen.
I have written table event and tried changing the property of table control but it results in disabling all the rows of that column. Instead I wan to disable column in that particular row.
Thanks,
Nitin Sikka
11-14-2015 9:15 AM
Hi Nitin,
I dont think this can be achieved via just EVENTS!...
Go to SM30 --> Change --> (Menu) System ---> Status .. Double click on the 'Screen Number' - you would be forwarded to the Screen Logic.
In the PBO Section, Within the LOOP at SCREEN on that screen-field name., Check whether the 'Check' is done, if yes then make screen-active = '0'.
Hope this helps.
Cheers,
Kripa Rangachari.
11-13-2015 8:50 AM
Hi Nitin
When you create a view SM30, the system create a table control associate to table.
Look this link to acces at programa with your table.
https://scn.sap.com/message/8062475#8062475
Then, Please check this link to block a cell:
Good luck,
King regards.
Enric,
11-13-2015 4:28 PM
Thanks Enric, but I want to write the handler in the event code. can I access table control inside events?
11-13-2015 4:36 PM
11-14-2015 10:43 AM
11-14-2015 9:15 AM
Hi Nitin,
I dont think this can be achieved via just EVENTS!...
Go to SM30 --> Change --> (Menu) System ---> Status .. Double click on the 'Screen Number' - you would be forwarded to the Screen Logic.
In the PBO Section, Within the LOOP at SCREEN on that screen-field name., Check whether the 'Check' is done, if yes then make screen-active = '0'.
Hope this helps.
Cheers,
Kripa Rangachari.
11-15-2015 6:45 PM
Hi Kripa,
Thanks for the reply. I did it like this..
MODULE edit_column_display OUTPUT.
DATA : lv_line(48) TYPE c,
lv_field(18) TYPE c VALUE 'EXTRACT-LINE+23(1)'.
FIELD-SYMBOLS: <fs_value> TYPE char1.
ASSIGN (lv_field) TO <fs_value>.
* IF sy-ucomm = 'CHECK'.
"lv_line = ( 'EXTRACT-LINE' ).
LOOP AT SCREEN.
IF screen-name = 'ZTSD017_BILL_PLN-TO_DATE' AND
<fs_value> = 'X'.
"( 'EXTRACT-LINE+23(1)' ) = 'X'.
screen-input = '0'.
ELSE.
screen-input = '1'.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
* ENDIF.
ENDMODULE.
11-16-2015 5:20 AM
11-16-2015 5:26 AM
yes it is working now... actually I have to loop at extract table and it is only available at runtime.
I had to write some code to capture that run time.
11-16-2015 2:43 PM
You have to be careful when making changes to the automatically generated code in a TMG. If you make a change to the screen later, your code may be overwritten.
Rob
11-17-2015 2:48 AM
Hi Nitin!....
Great to know! and as Rob mentioned... please have this change Documented well so that any change in future though affects the Code, people can refer to the related documentation and have your code re-done easily!
And also, probably you can have your pseudo too pasted here.. so that anyone in future having the same requirement can get an easy help!
Cheers,
Kripa Rangachari.
11-17-2015 2:19 PM