2008 Aug 08 6:12 AM
Hi All,
I have got a requirement in which the user name(sy-uname) should get changed before executing a function module.I tried hardcoding it but i find that the name changes with every execution of a statement.
How to run a function module ina nother user name(system user)
Points will be assigned
2008 Aug 08 6:19 AM
Hi..
try declaring a variable of type sy-uname say wf_uname, and then assign the desired userid value to that variable...pass that variable inside the FM, before which u want the userid value to change...
and where ever u are using the sy-uname inside the FM, try using the vriable wf_uname now..in that place..
Hope it helps..
2008 Aug 08 6:19 AM
THe only way i can think of where we can change the username is by submitting a program in background with a different user ID. You can see the addition in the SUBMIT statement.
You can try creating a wrapper program for your FM and then submit a job for this program with a different ID.
2008 Aug 08 7:43 AM
Hi Thanks for the reply.
I understand that i need to create a job for my current program in SM36 and schedule it by using the 'submit' syntax with the user ID correct?
Prathish.
2008 Aug 08 6:19 AM
Hi..
try declaring a variable of type sy-uname say wf_uname, and then assign the desired userid value to that variable...pass that variable inside the FM, before which u want the userid value to change...
and where ever u are using the sy-uname inside the FM, try using the vriable wf_uname now..in that place..
Hope it helps..
2008 Aug 08 6:20 AM
Hello,
Can you tell which FM you want to use ? Or be more specific abt ur requirement?
BR,
Suhas
2008 Aug 08 6:22 AM
Hello Pratish,
Try this FM,
/SAPAPO/OM_LCCHECK_MULTIUSER
Regards
Indu.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |