Application Development and Automation 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: 
Read only

Call Transaction

Former Member
0 Likes
876

Hi,

I used following code to open Purchase order view screen (ME23N)

set parameter id 'ZABC' field i_alv-ebeln.

call transaction 'ME23N' and skip first screen.

my problum is that while runing this code it opens the transaction (but no data ), even if the user user is having no authorization to wiew ME23N

is it is possible to give message without opening the transaction

Regards

Nausal

Hi,

I used following code to open Purchase order view screen (ME23N)

set parameter id 'ZABC' field i_alv-ebeln.

call transaction 'ME23N' and skip first screen.

my problum is that while runing this code it opens the transaction (but no data ), even if the user user is having no authorization to wiew ME23N

is it is possible to give message without opening the transaction

Regards

Nausal

6 REPLIES 6
Read only

Former Member
0 Likes
827

HI,

You need to check the ME23N authorization using AUTHORIZATIOn OBJECT S_TOCDE before calling the transaction using CALL Transaction.

AUTHORITY-CHECK OBJECT 'S_TCODE'
         ID 'TCD' FIELD 'ME23N'.
IF SY_SUBRC EQ 0.
set parameter id 'ZABC' field i_alv-ebeln.
call transaction 'ME23N' and skip first screen.
ENDIF.

Read only

Mohamed_Mukhtar
Active Contributor
0 Likes
827

hi,

set parameter id 'BES' field i_alv-ebeln.    "----change  'ZABC' to 'BES'
call transaction 'ME23N' and skip first screen.

Thanks & Regards

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
827

Hello,

You can try like this:

* Check the user has authority to post using ME23N
  AUTHORITY-CHECK OBJECT 'S_TCODE'
  ID 'TCD' FIELD 'ME23N'.
  
  IF SY-SUBRC = 0.
    set parameter id 'ZABC' field i_alv-ebeln.
    call transaction 'ME23N' and skip first screen.
  ELSE.
    "Message user has no auth. to view ME23N
  ENDIF.

BR,

Suhas

Read only

sarbajitm
Contributor
0 Likes
827

Hi,

set i_callback_user_command = 'USER_COMMAND' of FM Reuse_ALV_Grid_Display

then write a subroutine like the following one.

FORM user_command USING I_r_ucomm LIKE sy-ucomm

rs_selfield TYPE slis_selfield.

CASE I_r_ucomm.

WHEN '&IC1'.

IF rs_selfield-fieldname = 'EBELN'.

READ TABLE IT_final INTO WA_final INDEX rs_selfield-tabindex.

SET PARAMETER ID 'BES' FIELD WA_final-ebeln.

CALL TRANSACTION 'ME23N'.

CLEAR WA_final.

ENDIF.

ENDCASE.

ENDFORM.

It solve your problem.

Regards.

Sarbajit.

Read only

sarbajitm
Contributor
0 Likes
827

Hi

in SE11, give the table name and enter

then the field on which you want to click on the alv,find the field in se11 and then click on the data element of that field.You will enter into the data element,there click on the Further Characteristics tab to get Parameter ID.

Regards.

Sarbajit.

Read only

Former Member
0 Likes
827

Thanks All