Skip to content

Commit

Permalink
added changing elements to input and output #10
Browse files Browse the repository at this point in the history
  • Loading branch information
gregor-j committed Aug 5, 2024
1 parent d8b3823 commit f845af3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
6 changes: 5 additions & 1 deletion src/SapRfc.php
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,10 @@ public function invoke(): array
*/
$params = array_merge(
$this->getInputParams(
$this->getApi()->getInputElements(),
array_merge(
$this->getApi()->getInputElements(),
$this->getApi()->getChangingElements()
),
$this->getParams()
),
$this->getTableParams(
Expand All @@ -235,6 +238,7 @@ public function invoke(): array
*/
return $this->castOutput(array_merge(
$this->getApi()->getOutputElements(),
$this->getApi()->getChangingElements(),
$this->getApi()->getTables()
), $result);
}
Expand Down
7 changes: 4 additions & 3 deletions src/Traits/ApiTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,10 @@ private function mapType(string $type): string
private function mapDirection(string $direction): string
{
$mapping = [
'RFC_EXPORT' => IApiElement::DIRECTION_OUTPUT,
'RFC_IMPORT' => IApiElement::DIRECTION_INPUT,
'RFC_TABLES' => ITable::DIRECTION_TABLE
'RFC_EXPORT' => IApiElement::DIRECTION_OUTPUT,
'RFC_IMPORT' => IApiElement::DIRECTION_INPUT,
'RFC_CHANGING' => IApiElement::DIRECTION_CHANGING,
'RFC_TABLES' => ITable::DIRECTION_TABLE
];
if (!array_key_exists($direction, $mapping)) {
throw new SapLogicException(sprintf('Unknown SAP Netweaver RFC direction \'%s\'!', $direction));
Expand Down

0 comments on commit f845af3

Please sign in to comment.