cancel
Showing results for 
Search instead for 
Did you mean: 

How to create a Transaction Code for a ZTABLE

mohamed_hamdi
Explorer
0 Kudos
2,105

Hello everyone,

I want to create a Specific Transaction ( ZHIST_ETIQ ) for a Client that allows him to view a ZTable (ZSD_ETIQUETTE) that exists in SE16N.

The Client should not access to SE16N, I followed this article Assign a Z-Transaction to a table maintenance | SAP Blogs, but when I reached the 7th step I found out that my table is not defiened in SM30 or something like that so instead I wrote SE16N.

The Transaction is now displaying my Table but on SE16N, which is not what I need,

Am not sure if it's related to SM30 or not, But I know that the client should not access to neither SE16N and SM30.

Any help?

THANK YOU VERY MUCH

View Entire Topic
Andreas_Huber
Explorer
0 Kudos

You can create a little Report like this

SELECT * FROM t006 INTO TABLE @DATA(gt_t006) ORDER BY PRIMARY KEY.
DATA gr_alv TYPE REF TO cl_salv_table.
TRY.
cl_salv_table=>factory(
IMPORTING
r_salv_table = gr_alv
CHANGING
t_table = gt_t006 ).
CATCH cx_salv_msg ##no_handler.
ENDTRY.

"if you don't want to see the column MANDT add this TRY/ENDTRY-block
TRY.
gr_alv->get_columns( )->get_column( 'MANDT' )->set_technical( value = abap_true ).
CATCH cx_salv_not_found ##no_handler.
ENDTRY.


gr_alv->display( ).