Show TOC Start of Content Area

This graphic is explained in the accompanying text Example: Job Parameters  Locate the document in its SAP Library structure

 

You have an accounting job named ProcessPurchaseOrders with the following abstractly-defined business logic: process customer purchase orders for a period of time and provide the total order value and the number of orders processed.

You want the ProcessPurchaseOrders job to process orders for customers whose names start with letters A to M from the alphabet for the month of April 2005.

The table below summarizes the parameter values and properties you have to specify in the job definition:

ProcessPurchaseOrders Job Parameters

Parameter Name

Parameter Value

Data Type

Direction

StartDate

4-1-2005

Date

IN

EndDate

4-20-2005

Date

IN

StartLetter

A

String

IN

EndLetter

M

String

IN

OrdersProcessed

Not Applicable

Integer

OUT

OrderValueProcessed

Not Applicable

Integer

OUT

The job-definition.xml file needs to contain the names, data types and direction of the parameters. You specify the parameter values and data types in the JobBean class.

Note

You cannot specify values for the OrdersProcessed and OrderValueProcessed parameters in the JobBean class. The values for these parameters are the job’s output and become available after the job has completed.

The sample below shows how those parameters look like in the job-definition.xml:

Syntax

<job-definitions>

    <job-definition name="ProcessPurchaseOrders">

      <job-definition-parameter name=”StartDate”

                                data-type=”Date”

                                direction=”IN”/>

      <job-definition-parameter name=”EndDate”

                                data-type=”Date”

                                direction=”IN”/>

      <job-definition-parameter name=”StartLetter”

                                data-type=”String”

                                direction=”IN”/>

      <job-definition-parameter name=”EndLetter”

                                data-type=”String”

                                direction=”IN”/>

      <job-definition-parameter name=”OrdersProcessed”

                                data-type=”Integer”

                                direction=”OUT”/>

      <job-definition-parameter name=”OrderValueProcessed”

                                data-type=”Integer”

                                direction=”OUT”/>

    </job-definition>

</job-definitions>

 

For more information about the job-definition.xml deployment descriptor, see Deployment Descriptors. For the DTD of job-definition.xml, see Job-definition.dtd.

For an example on working with job parameters, see the tutorial Creating and Scheduling Your First Job.

 

 

 

End of Content Area