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: 

trancation code to table maintenance

Former Member
0 Kudos

I have a custom table with table maintenance view. Our end users don't have authorization of SM30 transation. Can we attach transaction code to the table maintenance so that user can inser or modify or delete records by using T-code. Even though he dont have authorization of table maintenance.

Please suggest

6 REPLIES 6

Former Member
0 Kudos

Yes - Create a parameter transaction that calls transaction SM30. You'll have to specify the viewname and whether updates are allowed.

You'll want to skip the first screen as well.

Rob

Message was edited by: Rob Burbank

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Yes, I believe so, in SE93, create the transaction as a "transaction with parameters". Enter SM30 as the transaction, then check the "skip first screen" checkbox and hit enter. Now at the bottom of the screen in the default values table control, enter the values like so...

<b>Name of Screen Field     Value</b>
VIEWNAME                 <the maintenance view name>
UPDATE                   X

Save the transaction and execute....

Regards,

Rich Heilman

Message was edited by: Rich Heilman

0 Kudos

Hi,

or use fm <b>VIEW_MAINTENANCE_CALL</b> in own program/transaction

Andreas

Former Member
0 Kudos

Correct answer is already provided by others.

Cheers,

Sanjeev

Message was edited by: Sanjeev Singh

Former Member
0 Kudos

Hi,

Try the following routine in a custom program as mentioned by Andreas:

FORM call_view .

DATA: l_i_selections TYPE TABLE OF vimsellist INITIAL SIZE 0,

rec_selections TYPE vimsellist.

*plant

rec_selections-viewfield = 'WERKS'.

rec_selections-operator = 'EQ'.

rec_selections-value = p_werks.

APPEND rec_selections TO l_i_selections.

CALL FUNCTION 'VIEW_MAINTENANCE_CALL'

EXPORTING

action = 'S'

view_name = 'TCODE'

TABLES

dba_sellist = l_i_selections

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

maintenance_prohibited = 14

OTHERS = 15.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

ENDFORM.

regards

Aveek

Former Member
0 Kudos

hi,a small change to the soultion suggested by Rich would enable simaltaneous access to the maintenance table:

instead of

Name of Screen Field Value

<b>UPDATE X</b>

use <b>SHOW X</b>