2006 Nov 07 5:09 PM
Hello everyone,
I have to create a screen for all the table maintained tables.
SAY i HAVE TABLE ZTEST
I HAVE TO CREATE A SCREENWITH PUSH BUTTON TEST WHEN I CLICK THAT IT SHOULD TAKE ME TABLE MAINTENACE SCREEN i.e SM30 and when we click maintain .
It should take to that screen.
Please let me how to proceed regarding this..
Thanks
2006 Nov 07 5:13 PM
Hi, this is pretty easy, I assume that you know how to handle putting pushbutton on your screen and handling the function code, you can then use function module to fire the table maintenance, just as if you where going to SM30.
call function 'VIEW_MAINTENANCE_CALL'
exporting
action = 'U'
view_name = 'ZTEST'
exceptions
client_reference = 1
foreign_lock = 2
invalid_action = 3
no_clientindependent_auth = 4
no_database_function = 5
no_editor_function = 6
no_show_auth = 7
no_tvdir_entry = 8
no_upd_auth = 9
only_show_allowed = 10
system_failure = 11
unknown_field_in_dba_sellist = 12
view_not_found = 13
others = 14.
Regards,
Rich Heilman
2006 Nov 07 5:13 PM
Hi, this is pretty easy, I assume that you know how to handle putting pushbutton on your screen and handling the function code, you can then use function module to fire the table maintenance, just as if you where going to SM30.
call function 'VIEW_MAINTENANCE_CALL'
exporting
action = 'U'
view_name = 'ZTEST'
exceptions
client_reference = 1
foreign_lock = 2
invalid_action = 3
no_clientindependent_auth = 4
no_database_function = 5
no_editor_function = 6
no_show_auth = 7
no_tvdir_entry = 8
no_upd_auth = 9
only_show_allowed = 10
system_failure = 11
unknown_field_in_dba_sellist = 12
view_not_found = 13
others = 14.
Regards,
Rich Heilman
2006 Nov 07 5:21 PM
Here is a sample report program for your solution.
report zrich_0001 .
selection-screen pushbutton 1(40) tabmaint user-command tabmain.
at selection-screen output.
tabmaint = 'ZTEST Table Maintenance'.
at selection-screen.
case sy-ucomm.
when 'TABMAIN'.
call function 'VIEW_MAINTENANCE_CALL'
exporting
action = 'U'
view_name = 'ZTEST'
exceptions
client_reference = 1
foreign_lock = 2
invalid_action = 3
no_clientindependent_auth = 4
no_database_function = 5
no_editor_function = 6
no_show_auth = 7
no_tvdir_entry = 8
no_upd_auth = 9
only_show_allowed = 10
system_failure = 11
unknown_field_in_dba_sellist = 12
view_not_found = 13
others = 14.
endcase.
Regards,
Rich Heilman
2006 Nov 07 5:23 PM
Hi,
Otherwise ..Create a parameter transaction and call the transaction from your program using the CALL TRANSACTION syntax..
Check this link for creating a parameter transaction..
http://www.sap-basis-abap.com/sapbs011.htm
Thanks,
Naren
2006 Nov 07 5:25 PM
Hi Rich,
I solved my problem and i am rewarding full points to you.
I have one more question when i press the button on my screen it gives me a pop up windoe saying table is cross client -
can we avoid this.
Thanks
2006 Nov 07 5:29 PM
Hi,
I think you have created the Z TABLE without the MANDT field..
TO avoid this error..
Add the field MANDT as one of the primary key..
Thanks,
Naren
2006 Nov 07 5:35 PM
Naraen, is correct here, you will recieve the same messages as you would if you were to maintain via SM30. This includes the message that you are getting as well as the message that you get when trying to change repository objects in a closed system, if you table is of delivery class "Customizing Table"..
Regards,
Rich Heilman
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |