This class provides methods to access the XML structure of a JobSAP BAPI module.
Method |
Description |
|---|---|
getInputFields($tableName = '') |
Returns an array with all individual input fields of a table. If no table is passed, all individual input fields of the module are returned. |
getInputField($fieldName) |
Returns the value of an input field. If the field does not exist, a JobRouterException will be thrown. |
getInputLists($tableName = '') |
Returns an array with the fields of a list element. The passed table is linked to the element via the inputList attribute. If no table was passed, the fields of all list elements (input) will be returned. |
getInputListField($listId, $fieldName) |
Returns the value of an input list field. If the field or the list does not exist, an appropriate JobRouterException will be thrown. |
getOutputFields() |
Returns an array with all individual output fields of the module. |
getOutputField($fieldName) |
Returns the value of the output field. If the field does not exist, a JobRouterException will be thrown. |
getOutputListField($listId, $fieldName) |
Returns the value of the output list field. If the field or the list does not exist, an appropriate JobRouterException will be thrown. |
getOutputLists($tableName) |
Returns an array with the fields of a list element. The passed table is linked to the element via the outputList attribute. If no table was passed, the fields of all list elements (output) will be returned. |
Example 1:
$tableInputFields = $bapiDefinition->getInputFields('DOCUMENTHEADER');
Output:
Array
(
[OBJ_TYPE] => Array
(
[name] => OBJ_TYPE
[table] => DOCUMENTHEADER
[description] => CONST_Z_ACC_DOCUMENT_POST_FIELD_OBJ_TYPE
[required] => true
)
[COMP_CODE] => Array
(
[name] => COMP_CODE
[table] => DOCUMENTHEADER
[description] => CONST_Z_ACC_DOCUMENT_POST_FIELD_COMP_CODE
[required] => true
)
...
Example 2:
$tableInputLists = $bapiDefinition->getInputLists('ACCOUNTGL');
Output:
Array
(
[items] => Array
(
[id] => items
[name] => CONST_Z_ACC_DOCUMENT_POST_LIST_ITEMS_NAME
[description] => CONST_Z_ACC_DOCUMENT_POST_LIST_ITEMS_DESCRIPTION
[fields] => Array
(
[GL_ACCOUNT] => Array
(
[name] => GL_ACCOUNT
[table] => ACCOUNTGL
[type] => fixLengthChar:10:0
[description] => CONST_Z_ACC_DOCUMENT_POST_ITEMS_GL_ACCOUNT
)
[COSTCENTER] => Array
(
[name] => COSTCENTER
[table] => ACCOUNTGL
[type] => fixLengthChar:10:0
[description] => CONST_Z_ACC_DOCUMENT_POST_ITEMS_COSTCENTER
)
...