Quantcast
Channel: SCN : Popular Discussions - SAP Cloud Applications Studio
Viewing all articles
Browse latest Browse all 1333

Reuse library: how to use a generated data type?

$
0
0

Hello community,

 

to refactor a call to a web service (External Web Service Integration),I'd like to move some code to a custom Reuse Library.

 

The basic idea is similar to this helpful article: Implementing Reuse Library to perform similar validations on different Objects and raise the error messages

 

For example, the mapping of attributes from the Business Object into the related fields of the generated web service structure (Webservice.OPERATION.Request) should be moved into a Reuse Function.

 

Currently in the working ABSL implementation I'm using code similar to this:

 

var inputWS : Library::Webservice.Operation.Request;

 

inputWS.field1 = bo.attr1;

inputWS.field2 = bo.attr2;

inputWS.field3 = "constant";



From this example, I'd like to use the BO reference "bo" as import parameter (this would work) and the "inputWS" as return parameter of the Reuse Function.

 

Unfortunately in the "Create Reuse Function" popup, the Type column dropdown contains only data types of the PSM, as visible in the Repository Explorer. The generated web service data types don't appear in this dropdown list. In particular I'd like to use the data type

 

      Library::Webservice.Operation.Request

 

for the return parameter.

 

How to use this web service data type in a Reuse Function? Would it be possible at all?

 

Thanks in advance for any hints and assistance!

 

Best regards,

Christian.


Viewing all articles
Browse latest Browse all 1333

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>