php-sap / saprfc-kralik

PHP/SAP implementation for Gregor Kraliks sapnwrfc module
https://php-sap.github.io/
MIT License
10 stars 2 forks source link

SAP internal type NUMC is converted in INTEGER instead STRING/CHAR #11

Closed ynnoig closed 3 months ago

ynnoig commented 2 years ago

Hi, we have a RFC where an output value has the type NUMC (Numerisch Char) (see https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abenddic_special_character_types.htm)

In Map Type Function (\phpsap\saprfc\Traits\ApiTrait::mapType) there is only a RFCTYPE_NUM that convert it into INTEGER.

Is there maybe also a RFCTYPE_NUMC to convert it into STRING/CHAR?

In our project it happened that SAP reply to us with a value (NUMC) like '00001234' (char) and the library convert it into 1234 (int) and this cause some problems.

Thank u very much in advance!

BR Gio

ynnoig commented 2 years ago

@gregor-j any update about this issue?

ynnoig commented 1 year ago

@gregor-j do u support/develop still this library or is archived from your site?

gregor-j commented 1 year ago

I suppose NUMC might be an unmapped kind of RFCTYPE- see src/Traits/ApiTrait.php line 76-91. My SAP remote functions don't have NUMC return values, therefore I need a JSON dump of the remote function API (anonymized of course), as well as a JSON dump of the function call and its reply.

gregor-j commented 3 months ago

In order for my lib to recognize numc, the SAPNWRFC PHP module of Gregor Kralik has to. I cannot find numc in his code anywhere. I assume that the numc type of ABAP is transformed somehow before it's handled by the RFC of SAP. I'm closing this issue, because there is nothing for me I can do.