/AWS1/IF_PAN=>CREATEJOBFORDEVICES()¶
About CreateJobForDevices¶
Creates a job to run on a device. A job can update a device's software or reboot it.
Method Signature¶
METHODS /AWS1/IF_PAN~CREATEJOBFORDEVICES
IMPORTING
!IT_DEVICEIDS TYPE /AWS1/CL_PANDEVICEIDLIST_W=>TT_DEVICEIDLIST OPTIONAL
!IO_DEVICEJOBCONFIG TYPE REF TO /AWS1/CL_PANDEVICEJOBCONFIG OPTIONAL
!IV_JOBTYPE TYPE /AWS1/PANJOBTYPE OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_pancrejobfordevsrsp
RAISING
/AWS1/CX_PANACCESSDENIEDEX
/AWS1/CX_PANCONFLICTEXCEPTION
/AWS1/CX_PANINTERNALSERVEREX
/AWS1/CX_PANRESOURCENOTFOUNDEX
/AWS1/CX_PANVALIDATIONEX
/AWS1/CX_PANCLIENTEXC
/AWS1/CX_PANSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
it_deviceids TYPE /AWS1/CL_PANDEVICEIDLIST_W=>TT_DEVICEIDLIST TT_DEVICEIDLIST¶
ID of target device.
iv_jobtype TYPE /AWS1/PANJOBTYPE /AWS1/PANJOBTYPE¶
The type of job to run.
Optional arguments:¶
io_devicejobconfig TYPE REF TO /AWS1/CL_PANDEVICEJOBCONFIG /AWS1/CL_PANDEVICEJOBCONFIG¶
Configuration settings for a software update job.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_pancrejobfordevsrsp /AWS1/CL_PANCREJOBFORDEVSRSP¶
Domain /AWS1/RT_ACCOUNT_ID Primitive Type NUMC
Examples¶
Syntax Example¶
This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.
DATA(lo_result) = lo_client->createjobfordevices(
io_devicejobconfig = new /aws1/cl_pandevicejobconfig(
io_otajobconfig = new /aws1/cl_panotajobconfig(
iv_allowmajorversionupdate = ABAP_TRUE
iv_imageversion = |string|
)
)
it_deviceids = VALUE /aws1/cl_pandeviceidlist_w=>tt_deviceidlist(
( new /aws1/cl_pandeviceidlist_w( |string| ) )
)
iv_jobtype = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
LOOP AT lo_result->get_jobs( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_jobid = lo_row_1->get_jobid( ).
lv_deviceid = lo_row_1->get_deviceid( ).
ENDIF.
ENDLOOP.
ENDIF.