Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

dynamic server path

Former Member
0 Kudos
120

can anyone tell me if changing the line below-->


SERVER_PATH TYPE string VALUE '\bwdevtbwdtemp',

to this will work-->

if sy-sysid = 'BWD'.
server_path TYPE string VALUE  '\bwdevtbwdtemp'.
elseif sy-sysid = 'BWP'.
server_path TYPE string VALUE  '\bwpsrvbwdtemp'.
endif.

or is there a better way?

1 ACCEPTED SOLUTION

varma_narayana
Active Contributor
0 Kudos
92

Hi ..

You have to change the code like this.

data : server_path TYPE string .

case sy-sysid

when 'BWD'.

server_path = '
bwdevt\bwdtemp'.

case 'BWP'.

server_path = '
bwpsrv\bwdtemp'.

endcase.

<b>Reward if helpful.</b>

4 REPLIES 4

Former Member
0 Kudos
92

Hi William,

Yes it will work and there is nothing wrong in this as I told earlier also.

Regards,

Atish

Former Member
0 Kudos
92

Hi William,

Path should be of type rlgrap-filename.

Instead of hardcoding the filepath, you can use the FM <b>/SAPDMC/LSM_F4_SERVER_FILE</b> at the event 'AT SELECTION SCREEN ON VALUE-REQUEST'. This will provide an F4 help for the field (for filepath) and the user will be able to select any path in the application server.

Thanks

Vijay

<b>PLZ Reward Points if helpful</b>

0 Kudos
92

does this force the user to choose the server path? i guess they wont know what to enter

varma_narayana
Active Contributor
0 Kudos
93

Hi ..

You have to change the code like this.

data : server_path TYPE string .

case sy-sysid

when 'BWD'.

server_path = '
bwdevt\bwdtemp'.

case 'BWP'.

server_path = '
bwpsrv\bwdtemp'.

endcase.

<b>Reward if helpful.</b>