## Accounts Payable Manager Web Service

This chapter provides an overview of the Accounts Payable Manager web service, lists prerequisites, and discusses these web service operations:

- getVoucher

- processVoucher

### Understanding the Accounts Payable Manager Web Service

The Accounts Payable Manager web service (JP040000) manages the processing of accounts payable-related web service operations. This table includes a description of the accounts payable web service operations:

Operation | Description
getVoucher | Use this operation to retrieve and review accounts payable vouchers from the JD Edwards EnterpriseOne Accounts Payable system.
processVoucher | Use this operation to add, delete or void accounts payable vouchers in the JD Edwards EnterpriseOne Accounts Payable system.

Accessing Javadoc for the Accounts Payable Manager Web Service

To access Javadoc for the Accounts Payable Manager web service and its related operations, review these Javadoc packages:

- JP040000 (AccountsPayableManager)

- J0400001 (processVoucher)

- J0400002 (getVoucher)

See Accessing Javadoc for Business Services.

Reviewing Input and Response Interfaces

To review information about the classes and fields that are used by these web service operations, you can review the input and response interface tables. Input and response interface tables list the classes and fields used by each operation, the key fields, the data types of each fields, and which fields or classes are required for each action.

See Accessing Additional Information about Business Services.

See Appendix A: Input and Response Interfaces.

### Prerequisites

Before you can use any of the accounts payable web service operations, you must install and configure the JD Edwards EnterpriseOne Accounts Payable system.

See Setting Up the Accounts Payable System.

### getVoucher

This section provides an overview of the getVoucher web service operation and lists prerequisites.

#### Understanding the getVoucher Web Service Operation

The getVoucher web service operation is a database query operation that enables consumers to retrieve accounts payable vouchers from the JD Edwards EnterpriseOne Accounts Payable system.

The operation retrieves records based on the selection criteria that is passed in. If no selection criteria is passed in, the operation attempts to retrieve all records from the EnterpriseOne database, using the business service property to limit the number of records returned. If the operation encounters errors, processing stops and the errors are returned to the consumer.

Setup Considerations

Before you use this operation, you can set business service properties to specify how the system retrieves data. This table includes information about the business service properties that the getVoucher operation uses:

Group | Key | Description | Default Value
J0400002 | J0400002_MAX_ROWS | Use this business service property to specify the maximum number of records the operation returns for the query. | 0: Return All Records

Note. It is recommended that this business service property is configured and used. Also, it is strongly recommended that the consumer pass in selection criteria when performing a query. If these two recommendations are not followed, the operation attempts to fetch all the records from the database, which can significantly impact performance.
Also be aware that this operation performs multiple data retrievals from the EnterpriseOne database. Initially, records are selected from the Accounts Payable Ledger table (F0411) based on the selection criteria that is passed in by the consumer. After the operation retrieves records from the F0411, processing continues, and additional records are retrieved from the Account Ledger table (F0911), based on the data in the F0411 records. This business service property limits the number of records initially retrieved from the F0411. Therefore, the total number of records that are returned to the consumer might be greater than the value that you enter in this property.

See JD Edwards EnterpriseOne 8.98 Business Services Development Methodology Guide, Creating a Business Service, Managing Business Service Properties

Implementation Details

This table includes information that can help determine whether the getVoucher operation is functioning correctly:

Question | Answer
How can I tell if the operation completes successfully? | If the operation completes successfully, zero to many records are returned to the consumer based on the selection criteria. The records that are returned to the consumer include all of the fields that are listed in the response interface for this operation. However, some of those fields can contain blank or zero values, depending on the data that exists in the JD Edwards EnterpriseOne system. At a minimum, the system returns non-zero values for these fields: documentNumber documentTypeCode documentCompany
If I encounter errors while processing a transaction, do I need to reverse the transaction? | This is a database query operation that does not perform transactions. If you encounter errors during processing, review your search criteria and business service property settings and try your query again. If the operation does not return any records, verify that records matching your query exist in the JD Edwards EnterpriseOne database.
Does this operation use record reservation? | No. The operation does not reserve records within the JD Edwards EnterpriseOne system during processing.

### processVoucher

This section provides an overview of the processVoucher web service operation and lists prerequisites.

#### Understanding the processVoucher Web Service Operation

The processVoucher web service operation is an inbound transaction operation that enables consumers to add, delete or void vouchers in the JD Edwards EnterpriseOne Accounts Payable system.

If the operation completes successfully, the consumer receives a success message. If the operation encounters errors, processing stops and the errors are returned to the consumer.

Setup Considerations

Before you use this operation, you can set business service properties to specify how the system processes vouchers. This table includes information about the business service properties that the processVoucher operation uses:

Group | Key | Description | Default Value
J0400001 | J0400001_GL_VERSION | Use this business service property to specify the version of the P0400074 that the operation uses to process voucher information. | ZJDE0001
J0400001 | J0400001_ GL_VCHR_MBF_VERSION | Use this business service property to specify the version of the P0900049 that the operation uses to process voucher information. | ZJDE0001

Note. The published value object includes a field in the general ledger array that enables the user to enter a version of the P0900049 program for the F0911FSEditLine function. Though the user can enter a different version for each general ledger record, the operation uses only the first version. The operation first tries to retrieve the processing version from the value object. If no value is entered in the value object, the operation tries to retrieve a version from the business service properties. If no version is found, the operation uses version ZJDE0001.
The header class of the published value object also enables the user to specify a version of theP0400047 program, which is used for the F0411FSBeginDoc and F0411FSEditLine functions. Again, the operation first tries to retrieve the version from the value object. If no version is found, the operation then tries to retrieve a version from the business service properties. If no value is found, the operation uses version ZJDE0001.

See JD Edwards EnterpriseOne 8.98 Business Services Development Methodology Guide, Creating a Business Service, Managing Business Service Properties

Implementation Details

This table includes information that can help determine whether the processVoucher operation is functioning correctly:

Question | Answer
How can I tell if the operation completes successfully? | If the operation completes successfully, a success message is returned to the consumer. The records that are returned to the consumer include all of the fields that are listed in the response interface for this operation. However, some of those fields can contain blank or zero values, depending on the data that exists in the JD Edwards EnterpriseOne system. At a minimum, the system returns non-zero values for these fields: documentNumber documentTypeCode documentCompany Additionally, if you are adding a voucher, the operation returns two arrays; one for the voucher records added and one for the general ledger records. In addition to the fields listed, the voucher array returns non-zero values for the DocumentPayItem field. It also returns a value for the DocumentPayItemExtension field, but that value can be 0. The general ledger array returns a value in the DocumentLineNumber field.
If I encounter errors while process a transaction, do I need to reverse the transaction? | This operation uses standard transaction processing. If the system encounters errors during processing, no data in the JD Edwards EnterpriseOne system is updated. No manual updates are required.
Does this operation use record reservation? | No. The operation does not reserve records within the JD Edwards EnterpriseOne system during processing.