‎2009 Aug 27 12:58 PM
Hi All,
Can anyone suggest me any Function module to get file/folder path Separator on application server?
Also I want a Function module which returns the Carriage return(CR)/ Line Feed(LF) in case of application server.
regards
Shilpa.
‎2009 Aug 27 1:00 PM
Hi,
Try FM : SO_SPLIT_FILE_AND_PATH
SO_SPLIT_FILE_AND_PATH
Import parameters Value
FULL_NAME C:\DOCUMENTS AND SETTINGS\SHYAMP\DESKTOP\EQUI.TXT
Export parameters Value
STRIPPED_NAME EQUI.TXT
FILE_PATH C:\DOCUMENTS AND SETTINGS\SHYAMP\DESKTOP\
Regds,
Anil
‎2009 Aug 27 1:10 PM
Hi, a small help to your second question. To get the correct Cr and Lf codes you can use the following code:
DATA lc_lf(1) TYPE c.
DATA lc_cr(1) TYPE c.
DATA lc_crlf(2) TYPE c.
DATA l_h_lf(1) TYPE x VALUE '0A'.
DATA l_h_cr(1) TYPE x VALUE '0D'.
DATA l_h_crlf(2) TYPE x VALUE '0D0A'.
DATA l_r_conv TYPE REF TO cl_abap_conv_in_ce.
Get the line feed and carriage return for unicode
l_r_conv = cl_abap_conv_in_ce=>create( input = l_h_crlf ).
l_r_conv->read( IMPORTING data = lc_crlf ).
Get the line feed for unicode
l_r_conv = cl_abap_conv_in_ce=>create( input = l_h_lf ).
l_r_conv->read( IMPORTING data = lc_lf ).
Get the carriage return for unicode
l_r_conv = cl_abap_conv_in_ce=>create( input = l_h_cr ).
l_r_conv->read( IMPORTING data = lc_cr ).
And you have the Cr and Lf code in workfields.