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

Execute K_BATCH_REQUEST function with another user

Former Member
0 Likes
1,365

Hello,

I would like to execute the function K_BATCH_REQUEST with another user-name (a batch name) but I do not found any option to execute this function with another user.

Someone can help me ??

<removed by moderator>

thanks a lot in advance for your help.

Daniel

Edited by: Thomas Zloch on Nov 14, 2011 3:02 PM

3 REPLIES 3
Read only

ThomasZloch
Active Contributor
0 Likes
660

You can schedule jobs to run under a different user ID (if you have the authorization to do so), so you could create a wrapper program that calls this function module and schedule it as a background job.

Thomas

Read only

0 Likes
660

Hi,

I am new in abap.

If I understand well, if I execute this function in a wrapper program, I can execute this function with another user BUT,

What is a wrapper program ?

How do I execute a function in this program ?

Tx for your help

Read only

0 Likes
660

Suppose the FM signature looks like

FUNCTION ztest.
*"----------------------------------------------------------------------
*"*"Interface locale :
*"  IMPORTING
*"     REFERENCE(PAR1) TYPE  C
*"  TABLES
*"      TAB1 STRUCTURE MARA
*"----------------------------------------------------------------------

A wrapper program could look like

REPORT  ztestwrapper.
TYPES tmara TYPE mara OCCURS 10.
* no-display allows much more flexibility here
PARAMETERS: par1 TYPE c NO-DISPLAY,
            tab1 TYPE tmara NO-DISPLAY. 
CALL FUNCTION 'ZTEST'
  EXPORTING
    par1 = par1
  TABLES
    tab1 = tab1.

For the scheduling of the job read [Task Overview: Full-Control Job Scheduling|http://help.sap.com/saphelp_470/helpdata/en/fa/096cf2543b11d1898e0000e8322d00/frameset.htm]

Regards,

Raymond