‎2007 Feb 19 3:53 PM
Hi All,
Suppose i have a code which look like.
DATA : file_name1 type fileintern.
Data : file_name TYPE fileintern VALUE '/sst_data/ACE/cdc/send/vtdwh/bmw_atl_cdc_I062_it_prices.dat',
split file_name at 24 into file_name1 in character mode.
when i executed this code it giving some error
"The VALUE specification is longer than the corresponding field. The VALUE specification will only be passed to the field length!
i want file_name1 = /sst_data/ACE/cdc/send/
Thanks in advance
‎2007 Feb 19 3:57 PM
HI Abdul,
It is either:
file_name1 = file_name+0(24). or
split file_name at 'vtdwh/bmw_atl_cdc_I062_it_prices.dat'
into file_name1 in character mode.
regards,
john.
‎2007 Feb 19 3:57 PM
Hi,
Please try this FM SO_SPLIT_FILE_AND_PATH.
REPORT ZTEST.
DATA: FILENAME TYPE STRING VALUE
'/sst_data/ACE/cdc/send/vtdwh/bmw_atl_cdc_I062_it_prices.dat'.
DATA: FILENAME2 TYPE STRING.
CALL FUNCTION 'SO_SPLIT_FILE_AND_PATH'
EXPORTING
FULL_NAME = FILENAME
IMPORTING
FILE_PATH = FILENAME2
EXCEPTIONS
X_ERROR = 1
OTHERS = 2.
WRITE: / FILENAME2(23).
Regards,
Ferry Lianto
‎2007 Feb 19 3:57 PM
HI Abdul,
It is either:
file_name1 = file_name+0(24). or
split file_name at 'vtdwh/bmw_atl_cdc_I062_it_prices.dat'
into file_name1 in character mode.
regards,
john.
‎2007 Feb 19 3:58 PM
REPORT ychatest.
DATA : file_name TYPE fileintern VALUE '/sst_data/ACE/cdc/send/vtdwh/bmw_atl_cdc_I062_it_prices.dat'.
SEARCH file_name FOR 'send'.
IF sy-subrc EQ 0.
sy-fdpos = sy-fdpos + 5.
file_name = file_name+0(sy-fdpos).
WRITE : file_name.
ENDIF.
‎2007 Feb 19 4:08 PM
‎2007 Feb 19 4:23 PM
Hi abdul,
When you are sure of splitting at 24th character, why don't you offset it ?
file_name1 = file_name+0(24).
This would give you the correct result with out any hassel.
Award points if it helps.