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

Regarding switching the User while changing the SO

Former Member
0 Likes
1,046

Hi Experts,

My requirement is

i have one program to change the SO.

Program running user does have a authorization for changing the SO.

but for this particular program the user should change the SO.

for this requirement before calling the BAPI or BDC we have to change the current user name to

some other user (hard coded user..which is having authorization for changing the SO).

i tried to switch the user like

i created another copy of program and in the first program i used the submit

SUBMIT (JOBNAME)

WITH SELECTION-TABLE rspar

USER 'SUPERUSER'

VIA JOB jobname NUMBER jobcount

TO SAP-SPOOL

SPOOL PARAMETERS print_parameters

WITHOUT SPOOL DYNPRO

AND RETURN.

BUT IT IS not WORKING...

Can any body share the ideas about this requirement?

Hi Experts,

My requirement is

i have one program to change the SO.

Program running user does have a authorization for changing the SO.

but for this particular program the user should change the SO.

for this requirement before calling the BAPI or BDC we have to change the current user name to

some other user (hard coded user..which is having authorization for changing the SO).

i tried to switch the user like

i created another copy of program and in the first program i used the submit

SUBMIT (JOBNAME)

WITH SELECTION-TABLE rspar

USER 'SUPERUSER'

VIA JOB jobname NUMBER jobcount

TO SAP-SPOOL

SPOOL PARAMETERS print_parameters

WITHOUT SPOOL DYNPRO

AND RETURN.

BUT IT IS not WORKING...

Can any body share the ideas about this requirement?

6 REPLIES 6
Read only

Former Member
0 Likes
995

Hi,

One of the method is to create a Background job with the program name & variant. whcile setting up the job In the section - STEP, u can give the USER ID of the person who is having access to change the SO.

Hope this helps.

Regards,

Bhargava

Read only

0 Likes
995

Hi ,

Thanks for ur quick reply.

I tried this method and i passed the new user in the submit statement..but it is not working.

if i pass the different user name to the SUBMIT or JOB_SUBMIT then those are returning the subrc as 8.

i tried this method and it is not working.

Sruthi.

Read only

0 Likes
995

Hi,

I belive u are trying to do that in a program. But try setting u the job in SM36 for the program u have created.

One more thing. May be u shld have authorization for chaging the use the STEP creation. If u want have that u cant do it. U cna get that Auth.... Pls do check.

Regards,

Bhargava

Read only

0 Likes
995

Hi ,

Yes..i tried this from program only.

Becoz the prsent SO change program is a report.in the selection screen i have 2 radion buttons like Display and Update.

If user selects Update then only we should switch the user.

Read only

0 Likes
995

As informed earlier, I beleive you dont have authorization to change the USER in STEP part of job creation.

U shld be able to check the same in SM36.

Only way i think of is to get the Auth....

Regards,

Bhargava

Read only

Former Member
0 Likes
995

Hi sruthi,

I thinh check the transaction Process for the changing the sales order Package.

Even thou' u have used The super User at the runtime. Their might be a authouristion check failure for that Sales order.

While u run the Program, run the transaction Code Su53. For authorisation. U will find the Answer.

Regards,

Naresh