cancel
Showing results for 
Search instead for 
Did you mean: 

Adapter Property Sets

Former Member
0 Kudos

Hello!


I'm having troubles trying to define adapter properties using environment variables (I'd like to use env variables instead explicit path declarations in order to improve project portability). As an example I have the following simple project:

As you see it just read streams using a CSV input stream adaptor with certain properties (by declaring variables explicitly like this, the project works properly as expected).

To get this more portable I'm trying to define the 'dir' parameter as an environment variable. To get that, I've modified the CCL file by defining a property set as follows:


... and then, declaring the properties in the corresponding CCR file as follows:

As you see, one of these properties (the 'dir' name) is now an environment variable, so I've also declared that variable on my Windows operating system:

... but now the project is not working and I cant figure out what is wrong (I can't see error traces regarding this). I've been trying different possibilities: as you see I've declared the variable at user level and also at system level, and also I've been playing with 'C:/TEMP' instead of 'C:\TEMP' and other things like that... but without positive results.


Am I doing something wrong...? Could somebody help with this...?


Thanks a lot in advance.



Pd.-  Related with this: Is it possible in some way to read environment variables using CCL functions...?

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member217348
Participant
0 Kudos

Hi Ignacio,

Regarding your question of:

"Pd.-  Related with this: Is it possible in some way to read environment variables using CCL functions...?"

It is not possible to read environment variables using CCL functions.

Thanks,

Alice

former_member217348
Participant
0 Kudos

Another thought regarding some way to read environment variables using CCL functions - an indirect approach: have some shell script that dumps output of env to a file and then load that file into a window and access it like that from CCL.

Former Member
0 Kudos

Nice clue.

Thanks a lot Alice!

Former Member
0 Kudos

I've found a solution to the problem: it seems that it is necessary to define environment variables according the host operating conventions. So for MS-Windows it should be something like '%ENV_VARIABLE%' instead of '${EN_VARIABLE}'.

For this specific case we have to declare:

<Property name="dir">%SAP_ESP_STREAMS_INPUT_DIR%</Property>

instead of

<Property name="dir">${SAP_ESP_STREAMS_INPUT_DIR}</Property>

... that's all

0 Kudos

Hello Ignacio,

I am happy you were able to find a solution to the problem. As far as being able to do this directly from CCL by calling a built-in function no unfortunately we don't have that functionality. Using CCR is your best option.

Regards,

Andrzej.