2011 Feb 24 7:11 AM
Hello experts,
Good day to everyone.
Can you please share me your thoughts how to handle this issue which puzzles me a lot.
The scenario is this. I have a parameter in a selection-screen. It looks like below:
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
PARAMETERS:
p_server TYPE filename-fileextern DEFAULT g_unix_dir MODIF ID 4 .
SELECTION-SCREEN END OF BLOCK b2.
Now my problem is, how to make the value of the DEFAULT (g_unix_dir) to be dynamic. That everytime it runs in different system, that value changes. So for example, the in Development System (DEVsys) the DEFAULT path would look like
/interface/DEVsys/filename. This path must appear in the parameter, p_server above.
On the otherhand, if this program runs in Production System (PRODsys), the DEFAULT path would look /interface/PRODsys/filename.
I tried to concatenate this path and declare that in the INITIALIZATION event and AT SELECTION-SCREEN OUTPUT event, but still nothing happens.
Thanks to all who will respond.
2011 Feb 24 7:15 AM
Hi LEvis,
Use TVARVC variant and populate the same.but you need to maintain the value in all the systems at once.
Hi LEvis,
Use TVARVC variant and populate the same.but you need to maintain the value in all the systems at once.
2011 Feb 24 7:15 AM
Hi LEvis,
Use TVARVC variant and populate the same.but you need to maintain the value in all the systems at once.
2011 Feb 24 7:31 AM
Thanks a lot.
But I got it now..
Solution is, dont declare as DEFAULT variable name... Just pass the value directly to the name of the parameter... So for example,
INITIALIZATION.
p_server = /interface/sy-sysid/filename
PARAMETER p_server type filename.
In this case, everytime it will run in different system, the path name changes dynamically.
2011 Feb 24 7:25 AM
parameters : p_server TYPE filename-fileextern.
Initialization.
Find the path here based on the system and assign p_server = filepath .
2011 Feb 24 7:30 AM
Assign the values to the variable in LOAD-OF-PROGRAM event., instead of using INITIALIZATION. It should solve your problem.
Suzie
Edited by: Suzie on Feb 24, 2011 1:00 PM
2011 Feb 24 7:32 AM
2011 Feb 24 1:17 PM
Sorry I'm late to the party.
You should investigate the concept of "logical filenames", transaction FILE, which is the standard solution to this type of problems with platform/system dependent physical file names.
Thomas
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |