‎2008 Oct 31 5:42 PM
Hi all,
I am getting the file name from /SAPDMC/LSM_PATH_FILE_SPLIT table . But i need to pass this file in the Application Server path.
I want to pass the file name Dynamically. Please help me in this.
regards,
Ajay
‎2008 Oct 31 5:54 PM
I wonder if a table name be such big.
can u post more details and clearly..so that u can get help ..
thanks
kiran
‎2008 Oct 31 6:07 PM
HI ,
I have two parameters in the selection screen.
One presentation Srver file path:
C:\Documents and Settings\RRR\Desktop\test1.xls
One Application Server fiel Path:
sapfeeds/interface/test1.xls.
from above filename test1.xls, i need to fill in the Application Srver file path dynamically in selection scree.
How can i carry the file name to the second parameters (Application Server fiel Path) input.
regards,
Ajay
‎2008 Oct 31 6:10 PM
you need to follow some standard filename always and find the string length of the whole file name and pick the last few cahracters of the file name and concatenate for the app server path.
‎2008 Oct 31 6:19 PM
Hi Ajay I wrote some logic which ill work for you...
DATA lv_line TYPE i.
DATA: lv_p TYPE string VALUE 'sapfeeds/interface/test1.xls'.
DATA: lv_junk TYPE string.
lv_line = STRLEN( lv_p ).
IF lv_p CS '/'.
DO 2 TIMES.
SPLIT lv_p AT '/' INTO lv_junk lv_p.
ENDDO.
WRITE / lv_p.
ENDIF.
‎2008 Oct 31 6:24 PM
Hi,
You can populate the values dynammically at selection screen event. Here you need to call the function module 'DYNP_VALUES_READ' which reads the contents on the selection screen and then u need to call another function module 'DYNP_VALUES_UPDATE' which updates the contents the screen.
So in your case read the file name using fisrt function module and then use the second functionmodule to update the path in the application server.
Thanks,
Preetham S
‎2008 Oct 31 6:49 PM
HI all,
I have 2 input 's on the selection screen . I am giving the C:\ravi\test1.txt in first input. After that I am reding the filename text1.txt bysuing the FM. I am kepping in one variable.
This valiable should come in second input automatically. My problme is this Valiable not carrying to the second input.
regards,
Ajay
‎2008 Oct 31 7:05 PM
Hi,
How are u entering the values manaully or by f4 help. If you populate manually then u will have to trigger the even manually. I suggest u to populate the values using F4. So in that value request event you can populate the second field as well using the function module i mentioned in my previous post.
thanks,
preetham s
‎2008 Oct 31 7:42 PM
‎2008 Oct 31 6:03 PM
Hi check this..
Concatenate 'US' 'Filename' 'EXT' into lv_path.
open dataset lv_path in text mode....
‎2008 Oct 31 6:17 PM
As you already asked how to get the file name from that string, I'll continue from there.
Instead of writing it like I did in my answer, use the same type of string reading for puting it into a variable, as in file_name = file+0(cont).
Now you have the file name in the variable file_name, so you just concatenate the string for your new path with this variable into another variable, and can pass it dinamically to the presentetion server in the form of this new variable.