Application Development and Automation 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: 
Read only

dynamic server path

Former Member
0 Likes
563

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
Read only

varma_narayana
Active Contributor
0 Likes
535

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
Read only

Former Member
0 Likes
535

Hi William,

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

Regards,

Atish

Read only

Former Member
0 Likes
535

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>

Read only

0 Likes
535

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

Read only

varma_narayana
Active Contributor
0 Likes
536

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>