"-" character in Unicode Program
Hi,
While implementing the BAdI EHSI_IA_RPHDFLG_COMP, the implementing class shows a warning message:
Type Group ESPAP:
In Unicode programs, the "-" character cannot appear in names, as it does here in the name "NONE-CLASS".
Due to this, the BAdI Implementation is not getting activated, though the class is activated.
Kindly help.
Regards,
Johnson.
Hi,
Its not possible to activate the BAdI in SE80,only the Implementation can be activated.That is where the error is shown.
Thanks and Regards,
Johnson George.
Edited by: johnson george on Mar 12, 2008 4:37 AM
Similar Messages
-
In Unicode Programs , the "-" CHARACTER CANNOT APPEAR IN NAME
HI,
I am checking the routines for the transfer rules(0SRM_GLSPEND_INVOICE) in the ODS Object (0GLS_INV).
WARNING :In Unicode programs, the "-" character cannot appear in names, as it does here in the name
" L-LOCAL_ID"
this is only before unicode conversion .
thanks & regards
subba reddy.HI,
I am checking the routines for the transfer rules(0SRM_GLSPEND_INVOICE) in the ODS Object (0GLS_INV).
WARNING :In Unicode programs, the "-" character cannot appear in names, as it does here in the name
" L-LOCAL_ID"
this is only before unicode conversion .
thanks & regards
subba reddy. -
Hello,
Very Good Evevning!
When I am actiavting my program I am receiving the following error message.
In unicode program, the "-" character cannot appear in names, as it does here in the name "CHAR-".
What is this error message and what does it mean...?
Any suggetsions would be appreciated...
Regards,
KittuHello,
When we activate, it does not throw any error message...The above Unicode error message will not stop us from activating our program.
It seems that this is due to inconsistency between the servers...If any one has any explonation regarding the Above Unicode error then please let me know.
Regards,
Kittu -
Dump error while executing this unicode program.....
Hi,
I got a program for 'Production Order Quantity Change Daily Checklist' ,but while executing i got the dump error from the following program stating tat,
The current statement is only defined for character-type data objects.
Error in the ABAP Application Program
The current ABAP program "ZPROD" had to be terminated because it has
come across a statement that unfortunately cannot be executed.
For the statement
"READ DATASET ... INTO f"
only character-type data objects are supported at the argument position
"f".
In this case. the operand "f" has the non-character-type "u". The
current program is a Unicode program. In the Unicode context, the type
'X' or structures containing not only character-type components are
regarded as non-character-type.
Program:
REPORT ZPPORDER LINE-SIZE 180 NO STANDARD PAGE HEADING
LINE-COUNT 058(001).
TABLES: AUFK, "Order master data
AFKO, "Order header data PP orders
RESB, "Reservation/dependent requirements
MAST, "Material to BOM Link
STKO, "BOM Header
STPO. "BOM item
DATA: BEGIN OF WA,
AUART TYPE AUFK-AUART,
AUFNR TYPE AUFK-AUFNR,
AEDAT TYPE AUFK-AEDAT,
AENAM TYPE AUFK-AENAM,
WERKS TYPE AUFK-WERKS,
PLNBEZ TYPE AFKO-PLNBEZ,
GAMNG TYPE AFKO-GAMNG,
GASMG TYPE AFKO-GASMG,
MATNR TYPE RESB-MATNR,
POSNR TYPE RESB-POSNR,
BDMNG TYPE RESB-BDMNG,
BMENG TYPE STKO-BMENG,
MENGE TYPE STPO-MENGE,
END OF WA,
ITAB LIKE SORTED TABLE OF WA WITH NON-UNIQUE KEY AUFNR POSNR.
DATA: BEGIN OF ITAB2 OCCURS 0.
INCLUDE STRUCTURE WA.
DATA: END OF ITAB2.
DATA: BEGIN OF ITAB_AUFK OCCURS 0,
AUART LIKE AUFK-AUART,
AUFNR LIKE AUFK-AUFNR,
POSNR LIKE RESB-POSNR,
AEDAT LIKE AUFK-AEDAT,
AENAM LIKE AUFK-AENAM,
WERKS LIKE AUFK-WERKS,
PLNBEZ LIKE AFKO-PLNBEZ,
GAMNG(7) TYPE P DECIMALS 0,
GASMG(7) TYPE P DECIMALS 0,
MATNR LIKE RESB-MATNR,
BDMNG(7) TYPE P DECIMALS 0,
BMENG(7) TYPE P DECIMALS 0,
MENGE(7) TYPE P DECIMALS 3.
DATA: END OF ITAB_AUFK.
DATA: FDATE LIKE SY-DATUM,
LDATE LIKE SY-DATUM.
DATA: X_AUFNR LIKE AFKO-AUFNR,
X_MENGE(7) TYPE P DECIMALS 0,
X_ERR(3).
DATA: W_DATASET1(500) VALUE '/usr/sap/trans/data/'.
SELECT-OPTIONS T_WERKS FOR AUFK-WERKS OBLIGATORY.
SELECT-OPTIONS T_AUFNR FOR AUFK-AUFNR.
SELECT-OPTIONS T_AEDAT FOR AUFK-AEDAT.
PARAMETERS PDATA LIKE W_DATASET1.
CONCATENATE W_DATASET1 PDATA INTO W_DATASET1.
PERFORM F_COLLECT_DATA.
FORM F_COLLECT_DATA.
OPEN DATASET W_DATASET1 FOR INPUT IN TEXT MODE encoding default.
DO.
IF sy-subrc <> 0.
EXIT.
ENDIF.
READ DATASET W_DATASET1 INTO WA.
APPEND WA TO ITAB2.
ENDDO.
CLOSE DATASET W_DATASET1.
SELECT AAUFNR AAUART AAEDAT AAENAM A~WERKS
BPLNBEZ BGAMNG B~GASMG
CMATNR CBDMNG C~POSNR
INTO CORRESPONDING FIELDS OF TABLE ITAB
FROM ( AUFK AS A
INNER JOIN AFKO AS B ON BAUFNR = AAUFNR
INNER JOIN RESB AS C ON CAUFNR = AAUFNR )
WHERE A~AEDAT IN T_AEDAT
AND A~WERKS IN T_WERKS.
LOOP AT ITAB INTO WA.
CLEAR MAST.
SELECT SINGLE * FROM MAST WHERE MATNR = WA-PLNBEZ
AND WERKS = WA-WERKS.
CLEAR STKO.
SELECT SINGLE * FROM STKO WHERE STLNR = MAST-STLNR
AND STLAL = MAST-STLAL.
CLEAR STPO.
SELECT SINGLE * FROM STPO WHERE STLNR = MAST-STLNR
AND POSNR = WA-POSNR.
WA-BMENG = STKO-BMENG.
WA-MENGE = STPO-MENGE.
MODIFY ITAB FROM WA.
AT NEW AUFNR.
SKIP.
ENDAT.
LOOP AT ITAB2 WHERE AUFNR = WA-AUFNR
AND POSNR = WA-POSNR.
IF ITAB2-GAMNG <> WA-GAMNG OR
ITAB2-GASMG <> WA-GASMG OR
ITAB2-BDMNG <> WA-BDMNG.
CLEAR X_MENGE.
IF ITAB2-BMENG <> 0.
X_MENGE = ITAB2-GAMNG / ITAB2-BMENG * ITAB2-MENGE.
ENDIF.
CLEAR X_ERR.
IF ITAB2-BDMNG <> X_MENGE.
X_ERR = 'Err'.
ENDIF.
FORMAT COLOR COL_TOTAL.
WRITE: / ITAB2-AUART UNDER 'Type',
ITAB2-AUFNR UNDER 'Prod Order',
ITAB2-AEDAT UNDER 'Last Chg Dt',
ITAB2-AENAM UNDER 'Last Chg by',
ITAB2-WERKS UNDER 'Plant',
ITAB2-PLNBEZ UNDER 'Material',
(10) ITAB2-GAMNG UNDER 'Order Qty' DECIMALS 0,
(10) ITAB2-GASMG UNDER 'Scrap Qty' DECIMALS 0,
ITAB2-POSNR UNDER 'Item',
ITAB2-MATNR UNDER 'Component Req',
(10) ITAB2-BDMNG UNDER 'Req Qty' DECIMALS 0,
X_MENGE UNDER 'BOM Qty' COLOR COL_TOTAL,
ITAB2-BMENG UNDER 'BOM Base',
ITAB2-MENGE UNDER 'BOM Comp',
X_ERR UNDER 'Rmks' COLOR COL_TOTAL.
CLEAR X_MENGE.
IF WA-BMENG <> 0.
X_MENGE = WA-GAMNG / WA-BMENG * WA-MENGE.
ENDIF.
CLEAR X_ERR.
IF WA-BDMNG <> X_MENGE.
X_ERR = 'Err'.
ENDIF.
FORMAT COLOR OFF.
WRITE: / WA-AUART UNDER 'Type',
WA-AUFNR UNDER 'Prod Order',
WA-AEDAT UNDER 'Last Chg Dt',
WA-AENAM UNDER 'Last Chg by',
WA-WERKS UNDER 'Plant',
WA-PLNBEZ UNDER 'Material',
(10) WA-GAMNG UNDER 'Order Qty' DECIMALS 0,
(10) WA-GASMG UNDER 'Scrap Qty' DECIMALS 0,
WA-POSNR UNDER 'Item',
WA-MATNR UNDER 'Component Req',
(10) WA-BDMNG UNDER 'Req Qty' DECIMALS 0,
X_MENGE UNDER 'BOM Qty' COLOR COL_TOTAL,
WA-BMENG UNDER 'BOM Base',
WA-MENGE UNDER 'BOM Comp',
X_ERR UNDER 'Rmks' COLOR COL_TOTAL.
ENDIF.
ENDLOOP.
ENDLOOP.
LOOP AT ITAB2.
LOOP AT ITAB INTO WA WHERE AUFNR = ITAB2-AUFNR
AND POSNR = ITAB2-POSNR.
DELETE ITAB2.
ENDLOOP.
SELECT SINGLE * FROM AUFK WHERE AUFNR = ITAB2-AUFNR.
IF SY-SUBRC <> 0.
DELETE ITAB2.
ENDIF.
ENDLOOP.
OPEN DATASET W_DATASET1 FOR OUTPUT IN TEXT MODE encoding default.
LOOP AT ITAB INTO WA.
TRANSFER WA TO W_DATASET1.
ENDLOOP.
LOOP AT ITAB2 INTO WA.
TRANSFER WA TO W_DATASET1.
ENDLOOP.
CLOSE DATASET W_DATASET1.
ENDFORM.
TOP-OF-PAGE.
FORMAT COLOR COL_TOTAL.
WRITE: / SY-DATUM, SY-UZEIT, SY-REPID, SY-UNAME,
50 'Daily Qty Changed Checklist for Production Order',
120 SY-PAGNO.
SKIP.
WRITE: / 'Plant ', T_WERKS-LOW.
WRITE: ' Last Change Date ', T_AEDAT-LOW, ' to ', T_AEDAT-HIGH.
SKIP.
WRITE: /1 'Type',
6 'Prod Order',
17 'Last Chg Dt',
29 'Last Chg by',
42 'Plant',
49 'Material',
69 'Order Qty',
83 'Scrap Qty',
99 'Item',
105 'Component Req',
121 'Req Qty',
135 'BOM Qty',
149 'BOM Base',
163 'BOM Comp',
178 'Rmks'.
ULINE.
WRITE: / 'Previous data :- '.
FORMAT COLOR OFF.
WRITE: / 'Current data :- '.
INITIALIZATION.
LDATE = SY-DATUM.
LDATE = LDATE - 1.
FDATE = LDATE.
MOVE: FDATE TO T_AEDAT-LOW.
APPEND T_AEDAT.
PDATA = 'AE001'.
So,give me any suggestions where to customize r do rectify the error.This will be useful for me.
Advance Thnx..*REPORT ZPROD.
REPORT ZPPORDER LINE-SIZE 180 NO STANDARD PAGE HEADING
LINE-COUNT 058(001).
TABLES: AUFK, "Order master data
AFKO, "Order header data PP orders
RESB, "Reservation/dependent requirements
MAST, "Material to BOM Link
STKO, "BOM Header
STPO. "BOM item
DATA: BEGIN OF WA,
AUART TYPE AUFK-AUART,
AUFNR TYPE AUFK-AUFNR,
AEDAT TYPE AUFK-AEDAT,
AENAM TYPE AUFK-AENAM,
WERKS TYPE AUFK-WERKS,
PLNBEZ TYPE AFKO-PLNBEZ,
GAMNG TYPE AFKO-GAMNG,
GASMG TYPE AFKO-GASMG,
MATNR TYPE RESB-MATNR,
POSNR TYPE RESB-POSNR,
BDMNG TYPE RESB-BDMNG,
BMENG TYPE STKO-BMENG,
MENGE TYPE STPO-MENGE,
END OF WA,
ITAB LIKE SORTED TABLE OF WA WITH NON-UNIQUE KEY AUFNR POSNR.
DATA: BEGIN OF ITAB2 OCCURS 0.
INCLUDE STRUCTURE WA.
DATA: END OF ITAB2.
DATA: BEGIN OF ITAB_AUFK OCCURS 0,
AUART LIKE AUFK-AUART,
AUFNR LIKE AUFK-AUFNR,
POSNR LIKE RESB-POSNR,
AEDAT LIKE AUFK-AEDAT,
AENAM LIKE AUFK-AENAM,
WERKS LIKE AUFK-WERKS,
PLNBEZ LIKE AFKO-PLNBEZ,
GAMNG(7) TYPE P DECIMALS 0,
GASMG(7) TYPE P DECIMALS 0,
MATNR LIKE RESB-MATNR,
BDMNG(7) TYPE P DECIMALS 0,
BMENG(7) TYPE P DECIMALS 0,
MENGE(7) TYPE P DECIMALS 3.
DATA: END OF ITAB_AUFK.
DATA: FDATE LIKE SY-DATUM,
LDATE LIKE SY-DATUM.
DATA: X_AUFNR LIKE AFKO-AUFNR,
X_MENGE(7) TYPE P DECIMALS 0,
X_ERR(3).
DATA: W_DATASET1(500) VALUE '/usr/sap/trans/data/'.
SELECT-OPTIONS T_WERKS FOR AUFK-WERKS OBLIGATORY.
SELECT-OPTIONS T_AUFNR FOR AUFK-AUFNR.
SELECT-OPTIONS T_AEDAT FOR AUFK-AEDAT.
PARAMETERS PDATA LIKE W_DATASET1.
CONCATENATE W_DATASET1 PDATA INTO W_DATASET1.
PERFORM F_COLLECT_DATA.
FORM F_COLLECT_DATA.
OPEN DATASET W_DATASET1 FOR INPUT IN TEXT MODE encoding default.
DO.
IF sy-subrc <> 0.
EXIT.
ENDIF.
READ DATASET W_DATASET1 INTO WA.
APPEND WA TO ITAB2.
ENDDO.
CLOSE DATASET W_DATASET1.
SELECT AAUFNR AAUART AAEDAT AAENAM A~WERKS
BPLNBEZ BGAMNG B~GASMG
CMATNR CBDMNG C~POSNR
INTO CORRESPONDING FIELDS OF TABLE ITAB
FROM ( AUFK AS A
INNER JOIN AFKO AS B ON BAUFNR = AAUFNR
INNER JOIN RESB AS C ON CAUFNR = AAUFNR )
WHERE A~AEDAT IN T_AEDAT
AND A~WERKS IN T_WERKS.
LOOP AT ITAB INTO WA.
CLEAR MAST.
SELECT SINGLE * FROM MAST WHERE MATNR = WA-PLNBEZ
AND WERKS = WA-WERKS.
CLEAR STKO.
SELECT SINGLE * FROM STKO WHERE STLNR = MAST-STLNR
AND STLAL = MAST-STLAL.
CLEAR STPO.
SELECT SINGLE * FROM STPO WHERE STLNR = MAST-STLNR
AND POSNR = WA-POSNR.
WA-BMENG = STKO-BMENG.
WA-MENGE = STPO-MENGE.
MODIFY ITAB FROM WA.
AT NEW AUFNR.
SKIP.
ENDAT.
LOOP AT ITAB2 WHERE AUFNR = WA-AUFNR
AND POSNR = WA-POSNR.
IF ITAB2-GAMNG <> WA-GAMNG OR
ITAB2-GASMG <> WA-GASMG OR
ITAB2-BDMNG <> WA-BDMNG.
CLEAR X_MENGE.
IF ITAB2-BMENG <> 0.
X_MENGE = ITAB2-GAMNG / ITAB2-BMENG * ITAB2-MENGE.
ENDIF.
CLEAR X_ERR.
IF ITAB2-BDMNG <> X_MENGE.
X_ERR = 'Err'.
ENDIF.
FORMAT COLOR COL_TOTAL.
WRITE: / ITAB2-AUART UNDER 'Type',
ITAB2-AUFNR UNDER 'Prod Order',
ITAB2-AEDAT UNDER 'Last Chg Dt',
ITAB2-AENAM UNDER 'Last Chg by',
ITAB2-WERKS UNDER 'Plant',
ITAB2-PLNBEZ UNDER 'Material',
(10) ITAB2-GAMNG UNDER 'Order Qty' DECIMALS 0,
(10) ITAB2-GASMG UNDER 'Scrap Qty' DECIMALS 0,
ITAB2-POSNR UNDER 'Item',
ITAB2-MATNR UNDER 'Component Req',
(10) ITAB2-BDMNG UNDER 'Req Qty' DECIMALS 0,
X_MENGE UNDER 'BOM Qty' COLOR COL_TOTAL,
ITAB2-BMENG UNDER 'BOM Base',
ITAB2-MENGE UNDER 'BOM Comp',
X_ERR UNDER 'Rmks' COLOR COL_TOTAL.
CLEAR X_MENGE.
IF WA-BMENG <> 0.
X_MENGE = WA-GAMNG / WA-BMENG * WA-MENGE.
ENDIF.
CLEAR X_ERR.
IF WA-BDMNG <> X_MENGE.
X_ERR = 'Err'.
ENDIF.
FORMAT COLOR OFF.
WRITE: / WA-AUART UNDER 'Type',
WA-AUFNR UNDER 'Prod Order',
WA-AEDAT UNDER 'Last Chg Dt',
WA-AENAM UNDER 'Last Chg by',
WA-WERKS UNDER 'Plant',
WA-PLNBEZ UNDER 'Material',
(10) WA-GAMNG UNDER 'Order Qty' DECIMALS 0,
(10) WA-GASMG UNDER 'Scrap Qty' DECIMALS 0,
WA-POSNR UNDER 'Item',
WA-MATNR UNDER 'Component Req',
(10) WA-BDMNG UNDER 'Req Qty' DECIMALS 0,
X_MENGE UNDER 'BOM Qty' COLOR COL_TOTAL,
WA-BMENG UNDER 'BOM Base',
WA-MENGE UNDER 'BOM Comp',
X_ERR UNDER 'Rmks' COLOR COL_TOTAL.
ENDIF.
ENDLOOP.
ENDLOOP.
LOOP AT ITAB2.
LOOP AT ITAB INTO WA WHERE AUFNR = ITAB2-AUFNR
AND POSNR = ITAB2-POSNR.
DELETE ITAB2.
ENDLOOP.
SELECT SINGLE * FROM AUFK WHERE AUFNR = ITAB2-AUFNR.
IF SY-SUBRC <> 0.
DELETE ITAB2.
ENDIF.
ENDLOOP.
OPEN DATASET W_DATASET1 FOR OUTPUT IN TEXT MODE encoding default.
LOOP AT ITAB INTO WA.
TRANSFER WA TO W_DATASET1.
ENDLOOP.
LOOP AT ITAB2 INTO WA.
TRANSFER WA TO W_DATASET1.
ENDLOOP.
CLOSE DATASET W_DATASET1.
ENDFORM.
TOP-OF-PAGE.
FORMAT COLOR COL_TOTAL.
WRITE: / SY-DATUM, SY-UZEIT, SY-REPID, SY-UNAME,
50 'Daily Qty Changed Checklist for Production Order',
120 SY-PAGNO.
SKIP.
WRITE: / 'Plant ', T_WERKS-LOW.
WRITE: ' Last Change Date ', T_AEDAT-LOW, ' to ', T_AEDAT-HIGH.
SKIP.
WRITE: /1 'Type',
6 'Prod Order',
17 'Last Chg Dt',
29 'Last Chg by',
42 'Plant',
49 'Material',
69 'Order Qty',
83 'Scrap Qty',
99 'Item',
105 'Component Req',
121 'Req Qty',
135 'BOM Qty',
149 'BOM Base',
163 'BOM Comp',
178 'Rmks'.
ULINE.
WRITE: / 'Previous data :- '.
FORMAT COLOR OFF.
WRITE: / 'Current data :- '.
INITIALIZATION.
LDATE = SY-DATUM.
LDATE = LDATE - 1.
FDATE = LDATE.
MOVE: FDATE TO T_AEDAT-LOW.
APPEND T_AEDAT.
PDATA = 'AE001'. -
ABAP program issues..Unicode program "ITAB" must have the same structure?
Dear Expert,
I coded below code in se38, but system give below error message, could please kindly advie issue reason? Thanks!!
Error message: A line of "ITAB" and "LINE" are not mutually convertible. In a Unicode program "ITAB" must have the same structure layout as "LINE" independent of the length of a . Unicode character. Unicode character.
REPORT ZTEST_HIHIHI.
Data: begin of line,
num type i,
sqr type i,
end of line,
itab type standard table of line with key table_line.
Do 5 times.
line-num = sy-index.
line-sqr = sy-index ** 2.
append line to itab.
enddo.
loop at itab into line.
write: / line-num, line-sqr.
endloop.
clear itab.Hello Hoo Laa,
This is because the way you have defined LINE, it is a structure & not a data type. Hence you are facing the issue
You have to change the data declaration to:
itab LIKE STANDARD TABLE OF line WITH KEY table_line.
BR,
Suhas -
Non-unicode program support?
Hi, I'm new to mac. In Windows' international setting, I can select a language to use for non-unicode programs, so that non-unicode characters in the selected language (such as song tags) can be displayed properly. But in Leopard, I cannot find the equivalent setting. Some songs with non-unicode tags are not displayed properly in iTunes, although they are fine in iTunes on my Windows computers. Also, I have some non-unicode contact information in Palm Desktop synchronized from my Treo phone. It looks OK in Palm Desktop on Windows, but not on Leopard.
Does such setting exist in mac os x?
Thank you.Does such setting exist in mac os x?
No, OS X only uses Unicode, so you have to convert the legacy character set stuff to that.
Of course some apps, like TextEdit and Safari and Mail, can read things in legacy charsets, but they convert it to Unicode when they do. TextEdit can also save things in legacy charsets. -
Converting control characters to spaces in a Unicode program?
I want to take an ASCII character string and convert any
ASCII Control Characters to Spaces.
In a non-Unicode program, I define the following hex constant:
CONSTANTS: c_control_to_space(64) TYPE x VALUE
'00200120022003200420052006200720082009200A200B200C200D200E200F20' &
'10201120122013201420012016201720182019201A201B201C201D201E201F20'.
I then execute the following TRANSLATE statement:
TRANSLATE w_transcript USING c_control_to_space.
What would be the "approved" method of accomplishing the same effect
in a Unicode program?Neil,
First, thank you for pointing out my typo. You are correct that the "0120" in the second line of the literal was intended to be "1520".
Second, thank you for your suggestion. Based on your idea, I tried something similar, but not exactly what you suggested. In particular, since I can't figure out how to construct the constant that I want, I used your idea to construct it as a variable, as follows:
DATA number TYPE i.
DATA offset TYPE i.
DATA hex(4) TYPE x.
FIELD-SYMBOLS <char> TYPE c.
ASSIGN hex TO <char> CASTING TYPE c.
DATA w_control_to_space(64) TYPE c.
DO 32 TIMES.
hex = sy-index - 1.
offset = 2 * ( sy-index - 1 ).
number = STRLEN( <char> ).
IF number GT 1.
SUBTRACT 1 FROM number.
SHIFT <char> LEFT BY number PLACES.
ENDIF.
w_control_to_space+offset(1) = <char>.
ENDDO.
After having constructed "w_control_to_space", I can now use the TRANSLATE statement:
TRANSLATE w_transcript USING w_control_to_space.
This code passes the Unicode syntax checks and works correctly on a non-Unicode system. I don't have access to a Unicode system on which to run it. I'd appreciate any feedback on this approach - especially if someone can actually test it on a Unicode system. -
Hi - I've a problem using hyphen in unicode programs
Subject changed by moderator - use a meaningful subject in future
Hi,
Please solution for this error.
In Unicode programs, the "-" character cannot appear in names, as it does here in the name
"TEST-001"
Thanks,
Rajesh
Edited by: Matt on Nov 14, 2008 4:03 PMHi,
Unicode programs doesn't allow "-" character for field names. In unicode "-" is used to show the variation for table(internal table) and field names. So it doesn't allow "-" character for field names.
So try to change the fieldname by putting "_" instead of "-".
Edited by: pydi reddy on Nov 14, 2008 7:55 PM -
wht is unicode programming and uni code check
Hi,
Intial screen where you can enter your selection criteria, only field you will prob need to chnage is the max number of
programs field so that it is high enough to return all your potential problems.
If you have not set your max programs field high enough you will see the following screen during execution.
Once the transaction as finished analysing your systenm it will provide you with a report detailing all your objects which do not currently have
the unicode attribute selected. It also details what problems you will have when you check the unicode attribute and try to reactivate the object.
Unicode attribute can be turned on without any modification to the object
Modification(s) to the object will be required before unicode can be switched on
Error in code which is unrelated to unicode conversion
Error code Solution instructions
MESSAGEG@3
Replace variable declaration of type X with appropriate value from method cl_abap_char_utilities
i.e. CONSTANTS: con_tab TYPE x VALUE '09',
con_cret TYPE x VALUE '0D'.
would be replaced with
CONSTANTS: con_tab TYPE c value cl_abap_char_utilities=>HORIZONTAL_TAB,
con_cret TYPE c value cl_abap_char_utilities=>CR_LF.
See here for further Hex code values
UPLO
Upload/ws_upload and download/ws_download are obsolete, since they are not Unicode enabled. Replace
with appropriate methods from cl_gui_frontend_services. Please also note that the data types of the various
parameters will also probably also need changing for the new method calls but the code below demonstrates
how to do this. I_TABLE is the original table and IT_UCTABLE is the converted table.
i.e. Function module WS_DOWNLOAD
CALL FUNCTION 'WS_DOWNLOAD'
EXPORTING
FILENAME = p_file
FILETYPE = 'ASC'
MODE = ' '
TABLES
DATA_TAB = i_table
EXCEPTIONS
would be replaced with
data: gd_file type string.
types: t_uctable like line of i_table.
data: it_uctable type standard table of t_uctable.
gd_file = p_file.
it_uctable[] = i_table[].
CALL METHOD cl_gui_frontend_services=>gui_download
EXPORTING
filename = gd_file
filetype = 'ASC' " DAT,WK1
Append = ' ' "if mode = A then this would be X
CHANGING
data_tab = it_uctable
EXCEPTIONS
OTHERS = 1.
Function module DOWNLOAD
CALL FUNCTION 'DOWNLOAD'
EXPORTING
filename = p_file
filetype = 'WK1'
TABLES
data_tab = i_table.
would be replaced with
data: gd_file type string.
DATA: ld_filename TYPE string,
ld_path TYPE string,
ld_fullpath TYPE string,
ld_result TYPE i.
types: t_uctable like line of i_table.
data: it_uctable type standard table of t_uctable.
gd_file = p_file.
shift gd_file RIGHT DELETING TRAILING '\'.
shift gd_file RIGHT DELETING TRAILING '/'.
shift gd_file left DELETING LEADING space.
CALL METHOD cl_gui_frontend_services=>file_save_dialog
EXPORTING
DEFAULT_EXTENSION = 'WK1'
default_file_name = gd_file
INITIAL_DIRECTORY = gd_file
CHANGING
filename = ld_filename
path = ld_path
fullpath = ld_fullpath
user_action = ld_result.
check ld_result eq 0.
gd_file = ld_fullpath.
gd_file = p_file.
it_uctable[] = i_table[].
CALL METHOD cl_gui_frontend_services=>gui_download
EXPORTING
filename = gd_file
filetype = 'ASC' " DAT,WK1
Append = ' ' "if mode = A then this would be X
CHANGING
data_tab = it_uctable
EXCEPTIONS
OTHERS = 1.
Or in circumstances where you need to add field texts to the first line of the file you could use the
GUI_DOWNLOAD function module:
DATA: BEGIN OF fields_tab OCCURS 0,
f1(50),
END OF fields_tab.
fields_tab-f1 = 'field1 text'.
APPEND fields_tab.
fields_tab-f1 = 'field2 text'.
APPEND fields_tab.
fields_tab-f1 = 'field3 text'.
APPEND fields_tab.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = i_filename
filetype = 'DAT'
IMPORTING
filelength = filelen
TABLES
data_tab = itab
fieldnames = fields_tab
EXCEPTIONS
Note: ws_upload and upload would be the same as above but would use the
cl_gui_frontend_services=>gui_upload method call instead:
CALL METHOD cl_gui_frontend_services=>gui_upload
EXPORTING
filename = gd_file
filetype = 'ASC' " DAT,WK1
Append = ' '
CHANGING
data_tab = it_uctable
EXCEPTIONS
OTHERS = 1.
OPEN 004
Add ENCODING addition to statement
i.e. OPEN DATASET G_DATAFILE for OUTPUT IN TEXT MODE.
would be replaced with
OPEN DATASET G_DATAFILE for OUTPUT IN TEXT MODE ENCODING NON-UNICODE.
OPEN 002
IN..Mode is expected within open dataset command.
i.e. OPEN DATASET wfilepath FOR OUTPUT.
would be replaced with
OPEN DATASET wfilepath FOR OUTPUT IN TEXT MODE ENCODING NON-UNICODE.
Or OPEN DATASET wfilepath FOR OUTPUT IN BINARY MODE.
OPEN 001
FOR INPUT, FOR OUTPUT, FOR APPENDING or FOR UPDATE expected!
i.e. OPEN DATASET wfilepath FOR OUTPUT.
would be replaced with
OPEN FOR OUTPUT DATASET wfilepath FOR OUTPUT IN TEXT MODE.
DESCIBE002
THE DESCRIBE LENGTH can only be used with the IN BYTE or IN CHARACTER MODE
i.e. describe field e_text length line_length.
would be replaced with
describe field e_text length line_length IN CHARACTER MODE.
ASSIGN 019
The statement ASSIGN PATH+PATHLENGTH TO
. Returns the following error message:
"You cannot use ASSIGN f+offset. Always use an explicit length (or '*')".
i.e. ASSIGN PATH+PATHLENGTH TO
would be replaced with
ASSIGN PATH+PATHLENGTH(2) TO
. replace 2 with the length of the field
MESSAGEG!2
Itab/structure and are not mutually convertible in a Unicode program
i.e. G_SHOW_LIST = SPACE.
would be replaced with
Clear: G_SHOW_LIST.
Or G_SHOW_LIST-field1 = space.
G_SHOW_LIST-field2 = space.
etc
MESSAGEG!3
var and var are not comparable in a Unicode program
Example Data: VAR like tabix.
was replaced with
Data: VAR type sy-tabix. -
Wht is the difference between unicode program and non unicode program ?
Hi guru,
wht is the difference between unicode program and non unicode program ?
Regards
SubashAbout brief idea about unicode
In the past, SAP developers used various codes to encode characters of different alphabets, for example, ASCII, EBCDI, or double-byte code pages.
ASCII (American Standard Code for Information Interchange) encodes each character using 1 byte = 8 bit. This makes it possible to represent a maximum of 28 = 256 characters to which the combinations 00000000, 11111111 are assigned. Common code pages are, for example, ISO88591 for West European or ISO88595 for Cyrillic fonts.
EBCDI (Extended Binary Coded Decimal Interchange) also uses 1 byte to encode each character, which again makes it possible to represent 256 characters. EBCDIC 0697/0500 is an old IBM format that is used on AS/400 machines for West European fonts, for example.
Double-byte code pages require 1 or 2 bytes for each character. This allows you to form 216 = 65536 combinations where usually only 10,000 - 15,000 characters are used. Double-byte code pages are, for example, SJIS for Japanese and BIG5 for traditional Chinese.
Using these character sets, you can account for each language relevant to the SAP System. However, problems occur if you want to merge texts from different incompatible character sets in a central system. Equally, exchanging data between systems with incompatible character sets can result in unprecedented situations.
One solution to this problem is to use a code comprising all characters used on earth. This code is called Unicode (ISO/IEC 10646) and consists of at least 16 bit = 2 bytes, alternatively of 32 bit = 4 bytes per character. Although the conversion effort for the R/3 kernel and applications is considerable, the migration to Unicode provides great benefits in the long run:
The Internet and consequently also mySAP.com are entirely based on Unicode, which thus is a basic requirement for international competitiveness.
Unicode allows all R/3 users to install a central R/3 System that covers all business processes worldwide.
Companies using different distributed systems frequently want to aggregate their worldwide corporate data. Without Unicode, they would be able to do this only to a limited degree.
With Unicode, you can use multiple languages simultaneously at a single frontend computer.
Unicode is required for cross-application data exchange without loss of data due to incompatible character sets. One way to present documents in the World Wide Web (www) is XML, for example.
ABAP programs must be modified wherever an explicit or implicit assumption is made with regard to the internal length of a character. As a result, a new level of abstraction is reached which makes it possible to run one and the same program both in conventional and in Unicode systems. In addition, if new characters are added to the Unicode character set, SAP can decide whether to represent these characters internally using 2 or 4 bytes.
A Unicode-enabled ABAP program (UP) is a program in which all Unicode checks are effective. Such a program returns the same results in a non-Unicode system (NUS) as in a Unicode system (US). In order to perform the relevant syntax checks, you must activate the Unicode flag in the screens of the program and class attributes.
In a US, you can only execute programs for which the Unicode flag is set. In future, the Unicode flag must be set for all SAP programs to enable them to run on a US. If the Unicode flag is set for a program, the syntax is checked and the program executed according to the rules described in this document, regardless of whether the system is a US or an NUS. From now on, the Unicode flag must be set for all new programs and classes that are created.
If the Unicode flag is not set, a program can only be executed in an NUS. The syntactical and semantic changes described below do not apply to such programs. However, you can use all language extensions that have been introduced in the process of the conversion to Unicode.
As a result of the modifications and restrictions associated with the Unicode flag, programs are executed in both Unicode and non-Unicode systems with the same semantics to a large degree. In rare cases, however, differences may occur. Programs that are designed to run on both systems therefore need to be tested on both platforms.
You can also check out these official SAP locations on the SAP Service Marketplace:
http://service.sap.com/unicode
http://service.sap.com/unicode@SAP
http://service.sap.com/i18n
Regards,
Santosh -
Hi Friends,
I would like to know the difference between normal programming and Unicode programming.What are the options available for Unicode correction in Abap editor.small program explaining the Unicode.
Regards,
Pradeep PHi,
In the past, SAP developers used various codes to encode characters of different alphabets, for example, ASCII, EBCDI, or double-byte code pages.
Using these character sets, you can account for each language relevant to the SAP System. However, problems occur if you want to merge texts from different incompatible character sets in a central system. Equally, exchanging data between systems with incompatible character sets can result in unprecedented situations.
One solution to this problem is to use a code comprising all characters used on earth. This code is called Unicode (ISO/IEC 10646) and consists of at least 16 bit = 2 bytes, alternatively of 32 bit = 4 bytes per character. Although the conversion effort for the SAP kernel and applications is considerable, the migration to Unicode provides great benefits in the long run:
BENEFITS
1 The Internet (www) and consequently also mySAP.com are entirely based on Unicode, which thus is a basic requirement for international competitiveness. Unicode allows all SAP users to install a central system that covers all business processes worldwide.
2 Companies using different distributed systems frequently want to aggregate their worldwide corporate data. Without Unicode, they would be able to do this only to a limited degree. With Unicode, you can use multiple languages simultaneously at a single frontend computer.
3 Unicode is required for cross-application data exchange without loss of data due to incompatible character sets. One way to present documents in the World Wide Web (www) is XML, for example.
UNICODE Attribute has become a Mandatory thing in ECC6.0 to check the unicode errors related to different languages.
especially during the upgrades from lower version to ECC versions, this is important attribute as most of the things become obsolete or changed.
some unicode related errors are:
THEN...UNTIL...CORRESPONDING are obsolete
&1 must be a character type data object
In Unicode, the addition IN BYTE/CHARACTER MODE must be specified
DO...VARYING is not supported
The access and storage modes ACCESS and MODE must be specified
TRANSLATE CODE PAGE/NUMBER FORMAT not allowed
WHILE...VARY is not supported
The data type/structure objetcs in 'ADD' statement should have same type
IN TEXT MODE the addition ENCODING must be specified
The ENCODING addition is not valid in BINARY mode
The IGNORING CONVERSION ERRORS addition is not valid in BINARY mode
The REPLACEMENT CHARACTER addition is not valid in BINARY mode
UNICODE attribute in ABAP Editor isan option set in the program to enable the code for Unicode Compatibility. So if you select this checkbox the system automatically checks for any unicode syntax errors.
For example if you are using Open dataset statement if you dont select unicode check it will not give an error for the following statement.
Open datatset for input in text mode.
Regards,
Raj. -
Data objects in a Unicode program are not convertible?what does this mean?
hello,everyone,
when I execute a smartform directly in the transaction smartforms.,the result can be seen just no data.
when I execute program to transfer two internal tables from interface with data to the smartforms,and I use tcode st22,
the error is : Data objects in a Unicode program are not convertible.
the error analysis; The statement
"MOVE src TO dst"
requires the operands "dst" and "src" to be comvertible.
the source code that error occurs is :LOOP AT I_SHIP_DETAIL INTO WA_DETAIL .
and I know that the internal table have errors ,I defined the internal table refer to a structure created myself,and I set break-point in the smartforms ,can see the data in the internal table ,so why occurs such errors ,pls help me if you know .thank you in advance.hi
good
go through this link
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f2dac69e-0e01-0010-e2b6-81c1e8e5ce50
thanks
mrutyun^ -
In unicode programs how to handle unix files
Hi Abapers,
In Unicode programs.
while transfering file from unix directory to pdf format, logo is missing in that pdf file .
how to handle this error.
Thanks,
Praveenhave a look
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/60a35b0b-de0a-2a10-4ea5-dd82e6bbd74d
Regards
Shashi -
Problems realted to changing the language for non-Unicode programs from one into anther.
Hi,
Hi everyone!
Product Name: HP Pavilion dv6-6093ex
Product Number : LM610EA#A2N.
My Windows 7(464Bit) Ultimate, and its base language, and display language is English.
The Languages(English, French and Arabic) built-in (came re-downloaded and re-installed by the person who made the Windows disc installation). Thus, while installing Windows 7, those three lanauge listed for me to choose one of them to be the base language
and display language, I have chosen 'English'. In the End of installation, there are three pre-packaged languages(English and French and Arabic) can be used as a display language.
I would like anyone kindly to confirm for me why I have been facing these problems when changing language for non-Unicode programs from English into Arabic.
First: After I have installed the AMD High-Definition Graphics Driver (sp55092) 8.882.2.3000 on my laptop. The contents of the of Intel Graphics and Media Control Panel are partially shown in Arabic while language for non-Unicode programs
is Arabic, however, they are completely shown in English while language for non-Unicode programs is English.
A: I found that contents of the of Intel Graphics and Media Control Panel are partially shown in Arabic (second screen shot below, however,
when click on any options, for example 'Graphics properties' shown in Arabic in, the second window is shown in English) while language for non-Unicode programs is
Arabic, and it doesn't matter what format or location is.
B- when I changed language for non-Unicode programs into
English.
I found that contents of the Intel Graphics and Media Control Panel are completely shown in English .
Second:
A- Only All Arabic contents will be displayed encryptely while language for non-Unicode programs is English
B- All the Arabic contents are displayed properly while language for non-Unicode programs is Arabic.
Third: an error extracting drivers and software downloaded from official HP website while language for non-Unicode programs is English.
A- I noticed an error extracting all kinds of comprised files(drivers and software) downloaded from HP website while language for non-Unicode programs is English and whatever location and format are:
B- However while language for non-Unicode programs is Arabic, there is no error extracting files.
In conclusion, Is it normal
for all of you the contents of the of Intel Graphics and Media Control Panel are partially shown in your native while language used
for non-Unicode programs is your native lanague, however, they are completely shown in English while language for non-Unicode programs is English?. IF so I would be saying that if I have wanted the contents of documents written in my language
Arabic to be shown properly, then then I
must let the language for non-Unicode programs be Arabic.
Is this happens with you as well?
Also, if I need extracting all kinds of comprised files(drivers and software) downloaded from HP website, then language for non-Unicode programs
must be in my Arabic lanague English and whatever location and format are.
Is this happened with you as well?
I would highly appreciate any clarification from you.
A man should convert his anger and sadness into strength to continue living in this life.Hi,
I am confused about your issue.
when you changed language for non-Unicode programs into English, it show English.
while language for non-Unicode programs is Arabic, it show Arabic, If it's none-Unicode.
This is correct. Why you think it's an issue?
About your second scenario description, I was not clear what you said. Could you give us a explanation?
Note: System display language is not the un-Unicode program language.
You can just choose one language to display the system at same time.
This article might be helpful to you:
Install or change a display language
http://windows.microsoft.com/en-in/windows7/install-or-change-a-display-language
Change the system locale
http://windows.microsoft.com/en-in/windows/change-system-locale#1TC=windows-7
Karen Hu
TechNet Community Support -
Problems realted to changing the language for non-Unicode programs
Hi everyone!
Product Name: HP Pavilion dv6-6093ex
Product Number : LM610EA#A2N.
My Windows 7(464Bit) Ultimate, and its base language, and display language is English.
The Languages(English, French and Arabic) built-in (came re-downloaded and re-installed by the person who made the Windows disc installation). Thus, while installing Windows 7, those three lanauge listed for me to choose one of them to be the base language and display language, I have chosen 'English'. In the End of installation, there are three pre-packaged languages(English and French and Arabic) can be used as a display language.
I would like anyone kindly to confirm for me why I have been facing these problems when changing language for non-Unicode programs from English into Arabic.
First: After I have installed the AMD High-Definition Graphics Driver (sp55092) 8.882.2.3000 on my laptop. The contents of the of Intel Graphics and Media Control Panel are partially shown in Arabic while language for non-Unicode programs is Arabic, however, they are completely shown in English while language for non-Unicode programs is English.
A: I found that contents of the of Intel Graphics and Media Control Panel are partially shown in Arabic (second screen shot below, however, when click on any options, for example 'Graphics properties' shown in Arabic in, the second window is shown in English) while language for non-Unicode programs is Arabic, and it doesn't matter what format or location is.
B- when I changed language for non-Unicode programs into English.
I found that contents of the Intel Graphics and Media Control Panel are completely shown in English .
Second:
A- Only All Arabic contents will be displayed encryptely while language for non-Unicode programs is English
B- All the Arabic contents are displayed properly while language for non-Unicode programs is Arabic.
Third: an error extracting drivers and software downloaded from official HP website while language for non-Unicode programs is English.
A- I noticed an error extracting all kinds of comprised files(drivers and software) downloaded from HP website while language for non-Unicode programs is English and whatever location and format are:
B- However while language for non-Unicode programs is Arabic, there is no error extracting files.
In conclusion, Is it normal for all of you the contents of the of Intel Graphics and Media Control Panel are partially shown in your native while langauge used for non-Unicode programs is your native lanague, however, they are completely shown in English while language for non-Unicode programs is English?. IF so I would be saying that if I have wanted the contents of documents written in my language Arabic to be shown properly, then then I must let the language for non-Unicode programs be Arabic. Is this happens with you as well?
Also, if I need extracting all kinds of comprised files(drivers and software) downloaded from HP website, then language for non-Unicode programs must be in my Arabic lanague English and whatever location and format are. Is this happened with you as well?
I would highly appreciate any clarification from you.
This question was solved.
View Solution.Hi cooperator,
I saw your post regarding the language questions and I will be happy to help. What are you are experiencing with the languages is normal. The base operating system is in English and while you can change the display language the core kernal of the operating system would be in English.
The reason that the Intel Graphic and Media Control Panel is in English and the rest in Arabic is because the driver would have been designed in English and is hard coded as into the driver but the display language is set to Arabic. So when the language is set to English everything will be in English.
The reason you having issues extracting drivers when you English set at the language is because the HP website will determine where in the world you and when you download the driver it will be the appropriate language for the country you are from. So when it extracts it will look for the proper extraction path using Arabic but everything is English. It work no problem when you are on Arabic because the driver can read the path properly.
Thank you,
Please click “Accept as Solution ” if you feel my post solved your issue.
Click the “Kudos Thumbs Up" on the right to say “Thanks” for helping!
Thank you,
BHK6
I work on behalf of HP
Maybe you are looking for
-
PDF Size is huge when inserting an image on every page
Hello, I've got a little problem when inserting an image in a crystal report and then exporting it to PDF. We're using Crystal Report XI and we've designed the report with a sub-report that gets an image from a database field and put this image on ev
-
Quality, Export, and Compression help (pic included)
I'm working on an edit of my RTW trip and am struggling to figure out some quality issues. Video was captured by 3 cameras (a JVC everio, a GoPro Hero 2, and a Droid 4). All record in HD (720 or 1080). I figured I would use the lowest common denomina
-
I have this strange problem - A field value is displayed correctly in the crystal report when pulled from MySQL table (field is Varchar(25)). But the same field when loaded into a Java POJO and set the POJO as new datasource the value is garbled up.
-
There are a lot of excellent drag and drop Javascript/DHTML libraries available out there. http://script.aculo.us/ http://www.walterzorn.com/dragdrop/dragdrop_e.htm http://www.youngpup.net/2001/domdrag/tutorial http://tool-man.org/examples/sorting.ht
-
Is there any risk in buying a refurbished iPod?
Buying a refurb and saving about £60 seems too good to be true. Has anyone bought a refurbished iPod and is there any risk? Thanks for your help.