cancel
Showing results for 
Search instead for 
Did you mean: 

String to CodeRegion

danielepiazza
Explorer
0 Kudos

Dears,

I created a custom field (Short Text) via KUT that I want to reuse into an ABSL script. The request is to move the first two characters of the string field into another one declared like RegionCode, but the assignment of the type 'String' to the type 'RegionCode' is not possible.

How can I solve the problem?

Best Regards,

Daniele

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member226
Employee
Employee
0 Kudos

Hi,

Can you please try to pass the sub string as "content":

import ABSL; import AP.Common.GDT;
var str = "SAP";
var region : RegionCode;
region.content = str.Substring(0,2);

Thanks

Saurabh