cancel
Showing results for 
Search instead for 
Did you mean: 

Conversion from string to long in PI

Former Member
0 Kudos

Hi,

I need to consume an external web service from PI 7.11 and provide generated proxy to ERP system (separate from PI). The web service method has a long data type input parameter. ABAP cant provide 11 digit when i try to test it from SPROXY.

I have defined another message interface which is string and i want to convert it to long and map to destination. But this time i coulnd found a suitable method in PI ESR. I also checked that user defined functions also doesnt provide long return parameter.

Is there anyway to handle long parameter?

KR

Altug

Accepted Solutions (1)

Accepted Solutions (1)

stefan_grube
Active Contributor
0 Kudos

Any XML element is presented as string. So you need not do anything special in PI here.

Just make sure, that the string contains only a numerical value.

Why cant ABAP provide 11 digits? Just declare your variable in ABAP program accurately, like numc 11 or packed 7.

Former Member
0 Kudos

Hi,

The ABAP proxy generator in ERP (through ESR) is generated xsd:long as INT4 in proxy class signature. It is handling 10 digit integer. That's why ABAP cant handle it. The number would be entered from dialog program and it should be provided to the proxy class method.

How can i use NUMC?

Former Member
0 Kudos

Hi,

I had the problem with xsd:integer. Do you could declare it as string? This would help.

Regards

Patrick

Shabarish_Nair
Active Contributor
0 Kudos

>

> Hi,

>

> The ABAP proxy generator in ERP (through ESR) is generated xsd:long as INT4 in proxy class signature. It is handling 10 digit integer. That's why ABAP cant handle it. The number would be entered from dialog program and it should be provided to the proxy class method.

>

> How can i use NUMC?

the simplest option here would be to edit the WSDL (have a separate one for the ABAP proxy SI/MI) and provide the type as string and then generate a proxy out of it.

Its common issue that we have noticed in case of type conversion from PI structure to ABAP structure so the safest bet is to declare as string type.

Answers (0)