on 04-21-2016 9:45 AM
Hi,
I wonder if you have some code sample to get Steps for an existing Job?
Preferably I would like the code to include any details about which type (ExternalCommand, ExternalProgram etc), name of command, variant, parameter and target server and any step order.
Is this possible?
Thank you!
Hi Henrik,
please clarify, which kind of Jobs you are referring to.
Best regards,
Markus
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am referring to a SAP Job (container of steps) like I can create with code below:
Dim jobCount As String = Me.OpenJob(jobName, jobPriority)
rfcRepository = Dest.Repository
Dim rfcFunction As IRfcFunction = rfcRepository.CreateFunction("BAPI_XBP_ADD_JOB_STEP")
rfcFunction.SetValue("JOBNAME", jobName)
rfcFunction.SetValue("JOBCOUNT", jobCount)
rfcFunction.SetValue("EXTERNAL_USER_NAME", ExternalUser)
Dim JobStep As IRfcStructure = rfcFunction.GetStructure("STEP")
JobStep.SetValue("TYP", "C")
JobStep.SetValue("PROGRAM", commandName)
JobStep.SetValue("PARAMETER", parameters)
JobStep.SetValue("AUTHCKNAM", Me.username)
JobStep.SetValue("LANGUAGE", Me.language)
rfcFunction.Invoke(Dest)
Now, I wonder if it possible to retrieve all list of al the the steps with the job id (JOBCOUNT).
Hello Henrik,
This is actuallly not an NCo question, but a question about BAPI_XBP_ADD_JOB_STEP and whether the jobs modifed with this function module can be analyzed remotely. Therefore, I'd recommend that you have a look at function group SXBP. In this group, there are all related function modules, e.g. also BAPI_XBP_JOB_DEFINITION_GET, which I think is the one for getting the information you desire.
Best regards,
Markus
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.