2009 Apr 14 8:30 AM
Hi,
PARAMETERS: p_appdi2 LIKE rlgrap-filename DEFAULT '/DR1/Interfaces/FlatFiles/new_sales_history.txt'
This will display the Path by default '/DR1/Interfaces/FlatFiles/new_sales_history.txt' in the selection-screen.
My Requirement is:
If this is exercuted in the QR1 then it should display in the selection screen as '/QR1/Interfaces/FlatFiles/new_sales_history.txt'
If this is exercuted in the FR1 then it should display in the selection screen as '/FR1/Interfaces/FlatFiles/new_sales_history.txt'
I know that we can do this by using the sys variable sy-sysid but how can i set the dafault path names depending upon the system it gets executed...
Any suggestions will be appreciated!
Regards,
Kittu
2009 Apr 14 8:35 AM
>
> Hi,
>
> PARAMETERS: p_appdi2 LIKE rlgrap-filename DEFAULT '/DR1/Interfaces/FlatFiles/new_sales_history.txt'
>
> This will display the Path by default '/DR1/Interfaces/FlatFiles/new_sales_history.txt' in the selection-screen.
>
> My Requirement is:
>
> If this is exercuted in the QR1 then it should display in the selection screen as '/QR1/Interfaces/FlatFiles/new_sales_history.txt'
>
> If this is exercuted in the FR1 then it should display in the selection screen as '/FR1/Interfaces/FlatFiles/new_sales_history.txt'
>
> I know that we can do this by using the sys variable sy-sysid but how can i set the dafault path names depending upon the system it gets executed...
>
> Any suggestions will be appreciated!
>
> Regards,
> Kittu
Hi ,
do like this
parameter : p_appdi2 like rlgrap-filename.
intialization
case sy-sysid.
when 'QR1'.
p_appdi2 = '/QR1/Interfaces/FlatFiles/new_sales_history.txt'
when 'FR1'.
p_appdi2 = ''/FR1/Interfaces/FlatFiles/new_sales_history.txt'.
endcase.Edited by: mohammed abdul hai on Apr 14, 2009 9:49 AM
Hi,
PARAMETERS: p_appdi2 LIKE rlgrap-filename DEFAULT '/DR1/Interfaces/FlatFiles/new_sales_history.txt'
This will display the Path by default '/DR1/Interfaces/FlatFiles/new_sales_history.txt' in the selection-screen.
My Requirement is:
If this is exercuted in the QR1 then it should display in the selection screen as '/QR1/Interfaces/FlatFiles/new_sales_history.txt'
If this is exercuted in the FR1 then it should display in the selection screen as '/FR1/Interfaces/FlatFiles/new_sales_history.txt'
I know that we can do this by using the sys variable sy-sysid but how can i set the dafault path names depending upon the system it gets executed...
Any suggestions will be appreciated!
Regards,
Kittu
2009 Apr 14 8:33 AM
This is simple.
At initilization.
Set the path here according to the system id.
concatenate sy-sysid ''/DR1/Interfaces/FlatFiles/new_sales_history.txt'' into lv_path and use this .
2009 Apr 14 8:34 AM
Use
at selection-screen output
inside that based on client or server u can write conditon.
example.
if QR1.
p_appdi2 = QR1/Interfaces/FlatFiles/new_sales_history.txt'
endif.
Regards,
Aswin.
Edited by: aswin on Apr 14, 2009 9:34 AM
Edited by: aswin on Apr 14, 2009 9:35 AM
2009 Apr 14 8:35 AM
>
> Hi,
>
> PARAMETERS: p_appdi2 LIKE rlgrap-filename DEFAULT '/DR1/Interfaces/FlatFiles/new_sales_history.txt'
>
> This will display the Path by default '/DR1/Interfaces/FlatFiles/new_sales_history.txt' in the selection-screen.
>
> My Requirement is:
>
> If this is exercuted in the QR1 then it should display in the selection screen as '/QR1/Interfaces/FlatFiles/new_sales_history.txt'
>
> If this is exercuted in the FR1 then it should display in the selection screen as '/FR1/Interfaces/FlatFiles/new_sales_history.txt'
>
> I know that we can do this by using the sys variable sy-sysid but how can i set the dafault path names depending upon the system it gets executed...
>
> Any suggestions will be appreciated!
>
> Regards,
> Kittu
Hi ,
do like this
parameter : p_appdi2 like rlgrap-filename.
intialization
case sy-sysid.
when 'QR1'.
p_appdi2 = '/QR1/Interfaces/FlatFiles/new_sales_history.txt'
when 'FR1'.
p_appdi2 = ''/FR1/Interfaces/FlatFiles/new_sales_history.txt'.
endcase.Edited by: mohammed abdul hai on Apr 14, 2009 9:49 AM
2009 Apr 14 9:06 AM
Hi,
Try this piece of code. I hope it will work
INITIALIZATION.
DATA defaultvalue(100).
PARAMETERS: p_appdi2(100).
AT SELECTION-SCREEN OUTPUT.
CONCATENATE '/' sy-sysid '/Interfaces/FlatFiles/new_sales_history.txt' INTO defaultvalue.
p_appdi2(100) = defaultvalue.
2009 Apr 14 8:37 AM
Hi,
Refer:
PARAMETERS: p_appdi2 LIKE rlgrap-filename DEFAULT '/DR1/Interfaces/FlatFiles/new_sales_history.txt'
AT SELECTION-SCREEN OUTPUT.
IF sy-sysid = 'QR1.
CLEAR p_appdi2.
p_appdi2 = '/QR1/Interfaces/FlatFiles/new_sales_history.txt'.
ELSEIF sy-sysid = 'FR1'.
CLEAR p_appdi2.
p_appdi2 = '/FR1/Interfaces/FlatFiles/new_sales_history.txt'.
ENDIF.
Hope this helps you.
Regards,
Tarun
2009 Apr 14 8:44 AM
Hi,
You can write like:
ELECTION-SCREEN BEGIN OF BLOCK b0 WITH FRAME TITLE text-002.
PARAMETERS: p_file TYPE rlgrap-filename
DEFAULT '/DR1/Interfaces/FlatFiles/new_sales_history.txt' OBLIGATORY.
SELECTION-SCREEN END OF BLOCK b0.
Then you can check the value sy-sysid value in if else,that is
if sy-sysid = 'ABC'.
P_FILE = '/QR1/Interfaces/FlatFiles/new_sales_history.txt'
.
ELSEIF SY-SYSID = 'DEF'.
P_FILE = '/FR1/Interfaces/FlatFiles/new_sales_history.txt'.
ENDIF.
Hope it helps
Regards
Mansi
2009 Apr 14 9:33 AM
Hi,
Suggestions were really helpful and thank you for your quicj response!
Regards,
Kittu
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |