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: 

Same Tcode run by different users

Former Member
0 Kudos

Hi All,

I have the following requirement.

Suppose a user is running a Tcode ZTEST in one system and the same Tcode is being run by some other user in another system, then if user A triggers PAI of a screen in the tcode then the PAI should also be triggered for that tcode opened by any user.

Please let me know if it is possible.

Thanks.

9 REPLIES 9

Former Member
0 Kudos

Hi,

What is the requirement?

Whenever you run the transaction, a runtime environment will be created. You can run the same transaction at a time as maximum sessions allowed opened for the system at a time(You can open Six external sessions).

Regards

Dande

0 Kudos

Hi Dande,

Well I know that we can run the same Tcode at a time by any number of users but the thing is that when I am running a tcode and in that tcode there is a screen and in that I have an input field and I entered emp number and that will display the employee name in on output only field. So now what i want is when I clicked enter button and the emp name got displayed on the screen the same should be reflecting in all other users screens who have opened that tcode at that time.

Hope I am clear.

Thanks.

0 Kudos

Hi

We can try like this.

1) Check the data in shared buffer.

2) If it is there then move that data from shared buffer to the required screen fields.

3) If the data is not there, then the user enters the employee number and press enter, then in the PAI you will get employee number and employee name, move those data to shared buffer.

Regards

Dande

0 Kudos

Hello Dande,

I am not aware of how to send the data to shared buffer or to see what data is there in shared buffer. Could you please explain me in detail?

Thanks.

0 Kudos

Hi,

Please try this sample code and do necessary modifications to your module pool


parameters: p type matnr.
parameters: p1 type maktx.

types: begin of ty_mara,
       matnr type matnr,
       maktx type maktx,
       end of ty_mara.
data: it_mara type table of ty_mara,
      wa_mara type ty_mara.

Initialization.
Import it_mara from shared buffer indx(st) id 'ABC'.
if sy-subrc = 0.
loop at it_mara into wa_mara.
p = wa_mara-matnr.
p1 = wa_mara-maktx.
endloop.
endif.

at selection-screen on p.

if p1 is initial.
select single maktx into p1
  from makt
 where matnr = p
   and spras = 'E'.

wa_mara-matnr = p.
wa_mara-maktx = p1.
append wa_mara to it_mara.

export it_mara to shared buffer indx(st) id 'ABC'.
endif.

Regards

Dande

0 Kudos

Hi noname,

this will be easily accomplished wit the help of Russian Research On Supernatural Powers And Developing Psi Psychic Abilities. All currently running tasks will sense that you clicked enter button and the emp name got displayed on the screen so they will do the same.

Regards,

Clemens

0 Kudos

That's not going to work.

@OP: As far as I know that cannot be done.

Thanks,

Sri.

Former Member
0 Kudos

Hi,

I dont see any problem with that. You can try and execute the transaction with more then one user ids.

You dont need any special functionality for it.

Former Member
0 Kudos

Hi,

yes we can run same t-code in different systems successfully.

Ram.