Replacement of CL_ABAP_CHAR_UTILITIES in 4.6c
Hi Guys,
Can you please tell me the replacement of CL_ABAP_CHAR_UTILITIES in 4.6c.
Thanks in advance,
Laxmi.
Hi,
Do you want to replace this in 4.6C or In ECC 6.0.
Can you please elaborate your requireemnt.
In 4.6C, TYPE X is not allowed. For this, we need to replace respective variables with the static atributes from CL_ABAP_CHAR_UTILITIES.
Here, i am giving the sample code:
chk this.
Error code :
constants: begin of c_tab,
hex(1) type x value '09', "(hex code for Tab)
end of c_tab.
If you use above code in ECC 6.0, you wil get syntax error as type X is not allowed in ECC6.
So you need to replace above code with this :
DATA: C_TAB(1) TYPE C VALUE CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB.
Regards
Sandeep REddy
Similar Messages
-
Hi,
I Need your help, when I am attempting to load TBH file, I am getting an error input contains special characters check the file, I am unable to identify the special character in the upload file, can you please help to trace the error?
I thought that the error is due to # inclusion, hence I removed the same tried with -, still it didnt go through.
Thanks in advance.
Gopal.Hi,
The # must be a new line or a tab.
so you should actually scan and replace for CL_ABAP_CHAR_UTILITIES->New_line or CL_ABAP_CHAR_UTILITIES=>horizontal_tab
loop at itab into wa_itab.
replace all occurences of CL_ABAP_CHAR_UTILITIES->New_line in wa_itab-tdline with space.
if sy-subrc = 0.
conditions
endif.
Reference: GUI_UPLOAD
Reward if helpful.
Regards,
Ramya -
Hi,
I have code " X1 type X value '13'
X2 type X value '10' "
Can anyone tell me how to replace this code ; like for X1 type X value '09' can be replaced with CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB class.
Thanks in advance!
Regards,
Aleriax1 type c value '10',
x2 type c value '13',
X1 = CL_ABAP_CONV_IN_CE=>UCCP( '0013' ).
x2 = CL_ABAP_CONV_IN_CE=>UCCP( '0010' ).
check this link :[link|http://help.sap.com/saphelp_nw04/helpdata/en/79/c554d9b3dc11d5993800508b6b8b11/content.htm] -
Hexa decimal replacement using the class cl_abap_char_utilities
Hi,
While upgrading from 4.7 version to ecc 6.0 i am getting the error < itab > must be a character-type data object (data type C, N, D, T or STRING) .So i am using the class cl_abap_char_utilities . I found the replacement for hexadecimal '09' and '0D'
cl_abap_char_utilities=>HORIZONTAL_TAB,
cl_abap_char_utilities=>CR_LF.
I want the replacement for the following hexadecimals also.
'80','81','82',
'83','84','85','86','87','88''89','8A','8B','8C'
'8D','8E','8F','90','91','92','93','94','95',
'96','97','98','99','9A','9B','9C''9D',
'9E','9F'
Regards,
Charumathi.BHere you go
DATA:
BEGIN OF fs,
fs TYPE x VALUE 28,
END OF fs.
DATA:
f1(4) TYPE c VALUE 'xxxx',
f2(4) TYPE c VALUE 'yyyy',
f3(4) TYPE c VALUE 'zzzz',
rslt(20) TYPE c.
START-OF-SELECTION.
CONCATENATE f1 fs f2 fs f3 fs INTO rslt.
BREAK-POINT.
Output in HEX
787878781C797979791C7A7A7A7A1C2020202020
Output in Display
xxxx#yyyy#zzzz#
Edited by: Paul Chapman on Jun 9, 2008 12:33 PM -
How to replace special characters in Purchase order item text in ECC 6.0
Hi All,
Now i am working in ECC environment.
I am unable to replace the special characters in the PO short text for example take the following text.
Job#Burst Fire 3930-00092#Heater Control
here i want to replace # symbol with space.
i used replace all occurences, find , transfer, overlay keywords to replace thta special characte but it is not replacing that character.
i used replace_string FM also.it is also not working.
please help me out in this. points will be rewarded.Hi Praveena,
what replacement(s) did you try?
Please
replace all occurrences of
CL_ABAP_CHAR_UTILITIES=>newline
CL_ABAP_CHAR_UTILITIES=>cr_lf
CL_ABAP_CHAR_UTILITIES=>form_feed
CL_ABAP_CHAR_UTILITIES=>horizontal_tab
CL_ABAP_CHAR_UTILITIES=>vertical_tab
CL_ABAP_CHAR_UTILITIES=>backspace
CL_ABAP_CHAR_UTILITIES=>minchar
CL_ABAP_CHAR_UTILITIES=>maxchar
minchar is HEX u201900u2018 in non-Unicode systems, U+0000 in Unicode systems
maxchar is HEX Xu2018FFu2018 in non-Unicode systems, U+FFFD in Unicode systems
If it still does not help, check the remaining # characters in debugger, switching to hex mode: Then you may see what it is.
Regards,
Clemens -
Replacing download with gui_download
Hi,
as part of upgradation i am trying to replace Download fm with Gui_download but the problem is in download function i have exp parameter filemask_mask but its not available in gui_download. Is there any way to down load? Please help me out!!
Thanks and Reg,
Archana
Edited by: archana pakanati on Feb 9, 2009 8:14 AMHi,
Refer to the following code:
*& Report ZDOWNLOAD_PROGRAM
report zdownload_program.
parameter : p_path type rlgrap-filename default 'C:\Pdata.xls'.
data : gt_output type standard table of trdirt,
wa_output type trdirt,
p_filen type string.
at selection-screen on value-request for p_path.
clear p_path.
call function 'F4_FILENAME'
importing
file_name = p_path.
start-of-selection.
select * from trdirt
into table gt_output
where name like 'Z%'
or name like 'Y%'.
end-of-selection.
move : p_path to p_filen.
call function 'GUI_DOWNLOAD'
exporting
BIN_FILESIZE =
filename = p_filen
filetype = 'ASC'
APPEND = ' '
write_field_separator =
cl_abap_char_utilities=>horizontal_tab
HEADER = '00'
TRUNC_TRAILING_BLANKS = ' '
WRITE_LF = 'X'
COL_SELECT = ' '
COL_SELECT_MASK = ' '
DAT_MODE = ' '
CONFIRM_OVERWRITE = ' '
NO_AUTH_CHECK = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
WRITE_BOM = ' '
TRUNC_TRAILING_BLANKS_EOL = 'X'
WK1_N_FORMAT = ' '
WK1_N_SIZE = ' '
WK1_T_FORMAT = ' '
WK1_T_SIZE = ' '
WRITE_LF_AFTER_LAST_LINE = ABAP_TRUE
IMPORTING
FILELENGTH =
tables
data_tab = gt_output
FIELDNAMES =
exceptions
file_write_error = 1
no_batch = 2
gui_refuse_filetransfer = 3
invalid_type = 4
no_authority = 5
unknown_error = 6
header_not_allowed = 7
separator_not_allowed = 8
filesize_not_allowed = 9
header_too_long = 10
dp_error_create = 11
dp_error_send = 12
dp_error_write = 13
unknown_dp_error = 14
access_denied = 15
dp_out_of_memory = 16
disk_full = 17
dp_timeout = 18
file_not_found = 19
dataprovider_exception = 20
control_flush_error = 21
others = 22
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
Regards
Rajesh Kumar -
Parsing a csv file with carriage return replaced with #
Hi,
We have a weird problem. We are able to download a csv file using standard FM HTTP_GET. We want to parse the file and upload the data into our SAP CRM system. However, the file downloaded, has the carriage return replaced and the character # replaces it and everything seems like its one line.
I understand that the system replaces the Carriage return with the charater #. My question is, if I try to pass this file into my program to parse for the data, will there be any issues in the system recognizing that "#" that it is a carriage return and that the data in the file is not 1 record but multiple records?Hi
'#' is what you see in the SAP. But the actuall ascii associated will be of carraige return itself. So to identify if you have multiple records of not don't use hard coded '#' but instead use the constant CL_ABAP_CHAR_UTILITIES=>CR_LF.
Regards
Ranganath -
Doubt in using replace statement
Hi all,
I have a requirement where user will enter more than 1 label no in a screen, which will be populated internally in a table by SAP with ## for every ENTER button pressed by the user. the internal table populated by SAP will be having values like this. 11111111111##22222222222##3333333333
I need to separate the values from ## and move it to another internal table. I used replace statement to replace ##. But its not working. I dont know what could be the problem. Can any one suggest me in doing this.
POINTS PROMISED
Regards,
BuvanaYou will need to use the replace, but you need to be searching for cl_abap_char_utilities=>CR_LF in the REPLACE statement, the ## is an internal representation of the CR_LF, so use
replace cl_abap_char_utilities=>CR_LF with .....
Regards,
RIch Heilman -
Urgent! HELP_VALUES_GET_NO_DD_NAME replacement
Hi,
When replace 'HELP_VALUES_GET_NO_DD_NAME', I don't know how to fill the return value 'P_IND'.
""ローカルインタフェース:
*" IMPORTING
*" VALUE(P_CUCOL) LIKE SY-CUCOL DEFAULT 0
*" VALUE(P_CUROW) LIKE SY-CUROW DEFAULT 0
*" VALUE(P_DISPLAY) DEFAULT SPACE
*" VALUE(P_SELECTFIELD) LIKE HELP_INFO-FIELDNAME
*" VALUE(P_TITEL) DEFAULT SPACE
*" VALUE(P_NO_PERS_HELP_SELECT) DEFAULT SPACE
*" VALUE(P_TITLE_IN_VALUES_LIST) DEFAULT SPACE
*" VALUE(P_SHOW_ALL_VALUES_AT_FIRST_TIM) DEFAULT SPACE
*" VALUE(P_USE_USER_SELECTIONS) DEFAULT SPACE
*" VALUE(P_WRITE_SELECTFIELD_IN_COLOURS) DEFAULT 'X'
*" VALUE(P_NO_SCROLL) DEFAULT SPACE
*" VALUE(P_NO_CONVERSION) DEFAULT SPACE
*" VALUE(P_REDUCED_STATUS_ONLY) DEFAULT SPACE
*" VALUE(P_NO_MARKING_OF_CHECKVALUE) DEFAULT SPACE
*" VALUE(P_NO_DISPLAY_OF_PERS_VALUES) DEFAULT SPACE
*" VALUE(P_FILTER_FULL_TABLE) DEFAULT SPACE
*" EXPORTING
*" VALUE(P_IND) LIKE SY-TABIX
*" VALUE(P_SELECT_VALUE) LIKE HELP_INFO-FLDVALUE
*" TABLES
*" P_FIELDS STRUCTURE HELP_VALUE
*" P_FULL_TABLE
*" P_USER_SEL_FIELDS STRUCTURE DYNPREAD OPTIONAL
*" P_HEADING_TABLE TYPE F4TYP_HEADING_TAB OPTIONAL
*" EXCEPTIONS
*" RETURN01
*" RETURN02
*" RETURN03
*" RETURN04
*" RETURN05
2007/05/23 delete-start *
*CALL FUNCTION 'HELP_VALUES_GET_NO_DD_NAME'
EXPORTING
CUCOL = P_CUCOL
CUROW = P_CUROW
DISPLAY = P_DISPLAY
SELECTFIELD = P_SELECTFIELD
TITEL = P_TITEL
NO_PERS_HELP_SELECT = P_NO_PERS_HELP_SELECT
TITLE_IN_VALUES_LIST = P_TITLE_IN_VALUES_LIST
SHOW_ALL_VALUES_AT_FIRST_TIME = P_SHOW_ALL_VALUES_AT_FIRST_TIM
USE_USER_SELECTIONS = P_USE_USER_SELECTIONS
WRITE_SELECTFIELD_IN_COLOURS = P_WRITE_SELECTFIELD_IN_COLOURS
NO_SCROLL = P_NO_SCROLL
NO_CONVERSION = P_NO_CONVERSION
REDUCED_STATUS_ONLY = P_REDUCED_STATUS_ONLY
NO_MARKING_OF_CHECKVALUE = P_NO_MARKING_OF_CHECKVALUE
NO_DISPLAY_OF_PERS_VALUES = P_NO_DISPLAY_OF_PERS_VALUES
FILTER_FULL_TABLE = P_FILTER_FULL_TABLE
IMPORTING
IND = P_IND
SELECT_VALUE = P_SELECT_VALUE
TABLES
FIELDS = P_FIELDS
FULL_TABLE = P_FULL_TABLE
USER_SEL_FIELDS = P_USER_SEL_FIELDS
HEADING_TABLE = P_HEADING_TABLE
EXCEPTIONS
FULL_TABLE_EMPTY = 1
NO_TABLESTRUCTURE_GIVEN = 2
NO_TABLEFIELDS_IN_DICTIONARY = 3
MORE_THEN_ONE_SELECTFIELD = 4
NO_SELECTFIELD = 5.
OTHERS = 6.
2007/05/23 delete-end *
2007/05/23 add-start *
*タイプ変換
DATA:
TEMP_FIELDS TYPE TABLE OF DFIES WITH HEADER LINE,
TEMP_PARAM TYPE TABLE OF DDSHRETVAL,
TEMP_WK_PARAM TYPE DDSHRETVAL.
DATA: INAMETAB LIKE DNTAB OCCURS 0 WITH HEADER LINE,
INAMETAB1 LIKE DNTAB OCCURS 0 WITH HEADER LINE.
LOOP AT P_FIELDS.
CALL FUNCTION 'NAMETAB_GET'
EXPORTING
LANGU = SY-LANGU
ONLY = 'N'
TABNAME = P_FIELDS-TABNAME
IMPORTING
HEADER = IHEADER
TABLES
NAMETAB = INAMETAB
EXCEPTIONS
INTERNAL_ERROR = 01
TABLE_HAS_NO_FIELDS = 02
TABLE_NOT_ACTIV = 03.
IF SY-SUBRC EQ 2 OR SY-SUBRC EQ 3.
RAISE NO_TABLESTRUCTURE_GIVEN.
ENDIF.
LOOP AT INAMETAB.
CHECK P_FIELDS-FIELDNAME = INAMETAB-FIELDNAME.
MOVE INAMETAB TO INAMETAB1.
APPEND INAMETAB1.
ENDLOOP.
ENDLOOP.
CLEAR INAMETAB1.
DATA: CHARLEN TYPE I,
LEN TYPE I,
OFFSET TYPE I,
NO_CONVERSION TYPE C.
DATA: BEGIN OF ITAB OCCURS 0,
FIELD_VALUE(132),
END OF ITAB.
CHARLEN = CL_ABAP_CHAR_UTILITIES=>CHARSIZE.
IF P_FILTER_FULL_TABLE EQ 'X'.
LOOP AT P_FULL_TABLE.
OFFSET = 0.
LOOP AT INAMETAB.
IF NO_CONVERSION = SPACE.
LEN = INAMETAB-INTLEN / CHARLEN.
ELSE.
LEN = INAMETAB-DDLEN / CHARLEN.
ENDIF.
READ TABLE INAMETAB1 WITH KEY INAMETAB.
IF SY-SUBRC EQ 0.
MOVE P_FULL_TABLE+OFFSET(LEN)
TO ITAB-FIELD_VALUE.
APPEND ITAB.
ENDIF.
OFFSET = OFFSET + LEN.
ENDLOOP.
ENDLOOP.
ELSE.
LOOP AT P_FULL_TABLE.
OFFSET = 0.
LOOP AT INAMETAB1.
IF NO_CONVERSION = SPACE.
LEN = INAMETAB1-INTLEN / CHARLEN.
ELSE.
LEN = INAMETAB1-DDLEN / CHARLEN.
ENDIF.
MOVE P_FULL_TABLE+OFFSET(LEN) TO ITAB-FIELD_VALUE.
OFFSET = OFFSET + LEN.
APPEND ITAB.
ENDLOOP.
ENDLOOP.
ENDIF.
*タイプ変換
APPEND LINES OF P_FIELDS TO TEMP_FIELDS.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = P_SELECTFIELD
WINDOW_TITLE = P_TITEL
TABLES
VALUE_TAB = ITAB
FIELD_TAB = TEMP_FIELDS
RETURN_TAB = TEMP_PARAM
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3.
READ TABLE TEMP_PARAM INTO TEMP_WK_PARAM INDEX 1.
IF SY-SUBRC = 0.
P_SELECT_VALUE = TEMP_WK_PARAM-FIELDVAL.
ENDIF.
2007/05/23 add-end *
CASE SY-SUBRC.
WHEN 1.
RAISE RETURN01.
WHEN 2.
RAISE RETURN02.
WHEN 3.
RAISE RETURN03.
WHEN 4.
RAISE RETURN04.
WHEN 5.
RAISE RETURN05.
ENDCASE.Refer to this sample code
http://www.geocities.com/victorav15/sapr3/examples/f4_table1.txt
* popup window
call function 'HELP_VALUES_GET_NO_DD_NAME'
exporting
selectfield = fieldname
titel = 'Select Company Code'
use_user_selections = 'S'
importing
ind = ind
tables
fields = fields
full_table = inttab
user_sel_fields = shrinkfields
exceptions
full_table_empty = 01
no_tablestructure_given = 02
no_tablefields_in_dictionary = 03
more_than_one_selectfield = 04
no_electfield = 05.
if sy-subrc <> 0.
write: / 'Error =', sy-subrc.
else.
write: / '#', ind, 'selected'.
read table inttab index ind.
write: inttab-bukrs.
endif. -
Replace all occurrences of ENTER in a string
Hi,
I have a string which contains line breaks:
'<HTML><HEAD>
</HEAD>
<BODY>'
and it is shown to me in the debugger as:
'<HTML><HEAD>#</HEAD>#<BODY>'
Now I want to replace all line breaks in the string,
but
replace all occurrences of `#` in text with ' '.
doesn't work.
So if you have an idea how to replace the # symbol for Enter in a string please tell me ;).
regards,
StefanHi,
Pls use
replace all occurences of '#' in text with cl_abap_char_utilities=>newline.
Eddy -
How to insert Newline in text file thr CL_ABAP_CHAR_UTILITIES
Hi,
I need to send a mail with TEXT file attachment which has many records in it. It is working fine. But the only problem is, all records are displayed in the 1st line itself. So i need to separate the records by inserting new line.
constants: c_new type c value CL_ABAP_CHAR_UTILITIES=>NEWLINE.
LOOP AT it_final INTO wa_final.
lv_menge = wa_final-menge.
CONCATENATE wa_final-ebeln
wa_final-bukrs
wa_final-lifnr
wa_final-ebelp
wa_final-matnr
wa_final-werks
lv_menge
c_new " Newline
INTO lv_txt SEPARATED BY CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB.
APPEND lv_txt to text.
CLEAR: lv_txt, lv_menge.
ENDLOOP.
For this code, i'm not getting the new line for each record.
Plz help me out for the same.
Thanks,
RameshHi ,
Sorry i cant get u.. Plz let me know exactly.. Now i replaced the Horizontal tab with CR_LF but even this is not working..
CONSTANTS: c_new type ABAP_CR_LF value CL_ABAP_CHAR_UTILITIES=>CR_LF.
LOOP AT it_final INTO wa_final.
lv_menge = wa_final-menge.
CONCATENATE wa_final-ebeln
wa_final-bukrs
wa_final-lifnr
wa_final-ebelp
wa_final-matnr
wa_final-werks
lv_menge
" c_new
INTO lv_txt SEPARATED BY c_new. "cl_abap_char_utilities=>horizontal_tab.
APPEND lv_txt TO text.
CLEAR: lv_txt, lv_menge.
ENDLOOP.
Correct me if i'm wrong..
Thanks
Ramesh -
Recently i got to work in 4.6C and came across an issue with the statement
REPLACE ALL OCCURRENCES OF CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB IN WA2 WITH SPACE. . I came to know that the class CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB does not exist.
So how can i remove these tabs ?Hi,
Please check the following:
In SAP 4.6C, REPLACE ALL OCCURENCES OF...
As per my knowledge there is no statement called REPLACE ALL OCCURENCES OF in SAP 4.6C.
Only REPLACE statement is available.
Best Regards,
Suresh -
Replacement for Underscore - Hexadecimal '1F' in Unicode System
Hi gurus,
Can anyone provide the replacement for hexadecimal value '1F' in a Unicode system? Is there any table available?
Regards,
Lijo JosephHai
Check the following Statements
data v_var1 type x value '1F'.
data v_len(5) type n.
constants:
c_ecc6_tab(1) type c value cl_abap_char_utilities=>horizontal_tab.
constants:
c1(3) type c value 333.
data: begin of itab occurs 0,
line(20) type c,
end of itab.
data: begin of itab1 occurs 0,
line1(20) type c,
line2(20) type c,
line3(20) type c,
end of itab1.
concatenate c1 c_ecc6_tab c1 c_ecc6_tab c1 c_ecc6_tab c1
into itab-line.
concatenate c1 v_var1 c1
into itab-line.
open dataset c1 for input in text mode encoding default.
describe field c1 length v_len in character mode.
do 5 times.
append itab.
enddo.
data xtab1 like itab1.
data v_newvar like itab1-line1.
do 10 times.
itab1-line1 = 'abc'.
itab1-line2 = 'def'.
itab1-line3 = 'ghi'.
append itab1.
clear itab1.
enddo.
v_tabix = sy-tabix.
Thanks & regards
Sreenivasulu P -
Hi All,
i want to replace a line feed which is shown as ## in debug mode with space..
Though i have tried replacing it by giving hexadecimal value of # but still its not gettign replaced.
So how do i replace these occurences of line feed in the string which i am using..
Regards,
SyedHi try this way :
data: value type string....
data: lv_feed type c value CL_ABAP_CHAR_UTILITIES=>CR_LF.
replace all occurrences of lv_feed in value with space. -
Hi,
How to replace this □ character in routine while loading data from source system.
Regards,
PravenderI had face a same problem in ABAP programming, try to use this statement... and check its removing junk character.
Data : A(35) type C,
B(35) type C,
CLASS cl_abap_char_utilities DEFINITION LOAD.
clear : A,B.
A = your_field.
concatenate A cl_abap_char_utilities=>cr_lf INTO B.
REPLACE ALL OCCURRENCES OF cl_abap_char_utilities=>cr_lf In B WITH
space.
your_field = B.
Best Regards,
Maybe you are looking for
-
Fatal Error while trying to update device software
I have recently purchased my first blackberry (the storm). I have added the desktop manager to my computer and when I connect my device, it automatically checks for updates. It shows that I have have software updates to download, it gives me a summ
-
How to remove a click from a sequence file mp4 or mp3, and make it only sequence left and right in GarageBand?
-
SOA Suite 11.1.1.3.0 (patch) information required.
I am trying to setup SOA 11g but still having no luck. this statement is written in every installation guide Download SOA Suite 11.1.1.3.0 (patch) from the FMW download page, in the Runtime Software section. but i am unable to find any patch of SOA S
-
Can someone help me! Just got a Blackberry for the first time. Reason I got it was I didn't receive mobile signal at home. Was told connecting to my wireless broadband at home I would be able to use my mobile phone at home. Connected to wireless OK b
-
Items in the Dock vs. Alias
When I create an alias the icon would have an arrow on the left side. When I drag a item to the dock there are no arrow for the icon. Are the items in the dock and alias the same thing? If so why doesn't the items in the dock have the arrow? Is the d