Character to table conversion
Hi All,
I have a string variable which has the name of a table. I want to use the contents of that table by looping at it. Is there a way to do it.
Thanks in advance.
Anju
hi
good
example of the field symbol
REPORT demo_field_symbols_stat_assign .
FIELD-SYMBOLS: <f1> TYPE ANY, <f2> TYPE i.
DATA: text(20) TYPE c VALUE 'Hello, how are you?',
num TYPE i VALUE 5,
BEGIN OF line1,
col1 TYPE f VALUE '1.1e+10',
col2 TYPE i VALUE '1234',
END OF line1,
line2 LIKE line1.
ASSIGN text TO <f1>.
ASSIGN num TO <f2>.
DESCRIBE FIELD <f1> LENGTH <f2>.
WRITE: / <f1>, 'has length', num.
ASSIGN line1 TO <f1>.
ASSIGN line2-col2 TO <f2>.
MOVE <f1> TO line2.
ASSIGN 'LINE2-COL2 =' TO <f1>.
WRITE: / <f1>, <f2>.
The output is:
Hello, how are you? has length 20
LINE-COL2 = 1,234
thanks
mrutyun^
Similar Messages
-
Error ORA-06502, numeric or value error character to number conversion
I have been trying to create an email including data from a table as part of the body. Whenever I try to send it, I get an error ORA-06502, numeric or value error, character to number conversion. If I take out the part referencing the table, the email will go without error, but if I put it back in I get the error.
There is the code:
DECLARE
v_email_body CLOB;
v_from_email_address VARCHAR2(100) := v('APP_USER');
v_id NUMBER;
BEGIN
v_email_body := 'Please pay the attached invoice from FY '||:P14_FY||' funds
Date: '||:P14_PURCHASE_DATE||'
Vendor: '||:P14_VENDOR||'
Invoice Number: '||:P14_INVOICE||'
Invoice Date: '||:P14_INVOICE_DT||'
Due Date: '||:P14_INVOICE_DUE_DT||'
KSR Number: '||:P14_KSR||'
DTS PO: '||:P14_DTS_PO||'
FINANCE DO: '||:P14_FINANCE_PO||'
FOR detail IN(SELECT OB_CODE
FROM BUDGET_USED
WHERE P_ID = :P14_ID)
v_email_body := v_email_body||detail.OB_CODE||utl_tcp.crlf;
LOOP
FOR detail2 IN (SELECT ob_code, amount
FROM budget_used
WHERE p_id = :P14_ID)
LOOP
v_email_body := v_email_body||detail2.ELCID||' - '||detail2.AMOUNT||utl_tcp.crlf;
END LOOP;
END LOOP;
v_email_body := v_email_body
'||:P14_EMAIL_NOTES||'
Thanks.
v_id := APEX_MAIL.SEND
(p_to => :P14_SUBMIT_TO
,p_cc => v('APP_USER')
,p_bcc => '[email protected]'
,p_from => v_from_email_address
,p_body => v_email_body
,p_subj => 'Invoice, '||:P14_VENDOR||', '||:P14_INVOICE||'');
--Having set up your email, now add one (or more) attachments...
FOR c1 in (SELECT FILENAME
,BLOB_CONTENT
,MIME_TYPE
FROM file_subjects f, apex_application_files a
where a.name = f.name
and f.P_ID = :P14_ID) LOOP
IF c1.blob_content IS NOT NULL THEN
APEX_MAIL.ADD_ATTACHMENT( p_mail_id => v_id,
p_attachment => c1.blob_content,
p_filename => c1.filename,
p_mime_type => c1.mime_type);
END IF;
END LOOP;
END;
Apex_mail.push_queue();
This is important to my company to be able to put this data into an email. If anyone can help me, I would greatly appreciate it. Thank you in advance.Lets isolate the erroring line by running the code in debug mode and adding some debug lines at various stages in the code
Apex has a builtin function named wwv_flow.debug which can print messages to the debug stack and would be visible when the page is run in debug mode.
DECLARE
v_email_body CLOB;
v_from_email_address VARCHAR2(100) := v('APP_USER');
v_id NUMBER;
BEGIN
wwv_flow.debug('BEGIN');
v_email_body := 'Please pay the attached invoice from FY '||:P14_FY||' funds
Date: '||:P14_PURCHASE_DATE||'
Vendor: '||:P14_VENDOR||'
Invoice Number: '||:P14_INVOICE||'
Invoice Date: '||:P14_INVOICE_DT||'
Due Date: '||:P14_INVOICE_DUE_DT||'
KSR Number: '||:P14_KSR||'
DTS PO: '||:P14_DTS_PO||'
FINANCE DO: '||:P14_FINANCE_PO||'
'||:P14_EMAIL_NOTES||'
Thanks.
wwv_flow.debug('Before sending mail');
v_id := APEX_MAIL.SEND
(p_to => :P14_SUBMIT_TO
,p_cc => v('APP_USER')
,p_bcc => '[email protected]'
,p_from => v_from_email_address
,p_body => v_email_body
,p_subj => 'Invoice, '||:P14_VENDOR||', '||:P14_INVOICE||'');
wwv_flow.debug('Before attachements');
--Having set up your email, now add one (or more) attachments...
FOR c1 in
(SELECT FILENAME
,BLOB_CONTENT
,MIME_TYPE
FROM file_subjects f, apex_application_files a
where a.name = f.name
and f.P_ID = :P14_ID)
LOOP
IF c1.blob_content IS NOT NULL THEN
APEX_MAIL.ADD_ATTACHMENT( p_mail_id => v_id,
p_attachment => c1.blob_content,
p_filename => c1.filename,
p_mime_type => c1.mime_type);
END IF;
END LOOP;
wwv_flow.debug('Finished attachements');
Apex_mail.push_queue();
END;What is the last message you see in the debug after running the page in debug mode and submitting it ? -
PL/SQL: numeric or value error: character to number conversion error in TRG
Hi,
I've got strange issue with one trigger which during update of table reports (DB is 9.2.0.8):
ORA-06502: PL/SQL: numeric or value error: character to number conversion error
ORA-06512: at "UDR_LOG", line 345
ORA-04088: error during execution of trigger 'UDR_LOG'but line 345 is:
END IF;
so its kind of strange
the code looks like
343 IF nvl(to_char(:old.PKD_ID),'''') <> nvl(to_char(:new.PKD_ID),'''') THEN
344 v_zmn := v_zmn || 'PKD_ID''' || to_char(:old.PKD_ID) || '''' || to_char(:new.PKD_ID) || '''';
345 END IF;
so its concatenation not to_number usage .error is triggered by update statement on any column .
I'm sorry I cant provide You with whole trigger code .
So if You could only recommend any investigation method that would be great .
Regards
GregHi, Greg,
When there's an error in a trigger, the line numbers in the error messages are relative to the first DECLARE or BEGIN statement; often, that's a few lines after CREATE OR REPLACE TRIGGER. Post a few lines after what you already posted.
If you can't find the error, then create another table for testing this, and create a smaller trigger on that table, which does only enough to cause the error. Then you'll be able to post the complete trigger, and the code needed to re-create the problem. -
ORA-06502: PL/SQL: numeric or value error: character to number conversion e
Hi,
when I do same thing in my procedure it throws below error but it works fine as annonymus block.
ORA-06502: PL/SQL: numeric or value error: character to number conversion error
CREATE TABLE test_table
(memberid NUMBER,
trans_date date);
DECLARE
v_num number(10,0);
v_text varchar2(100);
begin
v_text := '123456abcdef';
v_num := substr(v_text,1,5);
INSERT INTO test_table
(memberid,
trans_DATE)
VALUES
(v_num,
sysdate);
end;Thanks
SandhyaWorks fine as a procedure as well;
SQL> DECLARE
2 v_num number(10,0);
3 v_text varchar2(100);
4 begin
5 v_text := '123456abcdef';
6 v_num := substr(v_text,1,5);
7 INSERT INTO test_table
8 (memberid,
9 trans_DATE)
10 VALUES
11 (v_num,
12 sysdate);
13 end;
14
15 /
PL/SQL procedure successfully completed.
SQL> select * from test_table;
MEMBERID TRANS_DAT
12345 20-MAY-10
SQL> create or replace procedure ins_test_table as
2
3 v_num number(10,0);
4 v_text varchar2(100);
5 begin
6 v_text := '123456abcdef';
7 v_num := substr(v_text,1,5);
8 INSERT INTO test_table
9 (memberid,
10 trans_DATE)
11 VALUES
12 (v_num,
13 sysdate);
14
15 end ins_test_table;
16 /
Procedure created.
SQL>
SQL> exec ins_test_table;
PL/SQL procedure successfully completed.
SQL> select * from test_table;
MEMBERID TRANS_DAT
12345 20-MAY-10
12345 20-MAY-10 -
Numeric or value error: character to number conversion error
I'm having problems inserting a value from a date picker field (DD-MON-YYYY HH MI )
i'm submitting this value to a packaged procedure that accepts this field as VARCHAR2 .
on the insert, i do a to_date( P_DATE, 'DD-MON-YYYY HH:MI PM' )
and i get the numeric conversion error.
If I change the to_date on the procedure side, I get the :could not read the end of the format mask - which I've found threads about on this site.
I've tried using HH24 and different formats, but I get one of the two above errors on the insert.
If I don't fill in the datepicker field at all, it works fine.
help is appreciated !
BillHere is the trace anyway:
*** ACTION NAME:(application 4000, page 1) 2004-09-24 12:58:44.052
*** MODULE NAME:(HTML DB) 2004-09-24 12:58:44.052
*** SERVICE NAME:(TOPS) 2004-09-24 12:58:44.052
*** SESSION ID:(151.1) 2004-09-24 12:58:44.052
*** 2004-09-24 12:58:44.052
ksedmp: internal or fatal error
ORA-06502: PL/SQL: numeric or value error: character to number conversion error
Current SQL statement for this session:
declare
rc__ number;
begin
owa.init_cgi_env(:n__,:nm__,:v__);
htp.HTBUF_LEN := 255;
null;
null;
null;
null;
f(p=>:p);
if (wpg_docload.is_file_download) then
rc__ := 1;
wpg_docload.get_download_file(:doc_info);
null;
null;
null;
commit;
else
rc__ := 0;
null;
null;
null;
commit;
owa.get_page(:data__,:ndata__);
end if;
:rc__ := rc__;
end;
----- PL/SQL Call Stack -----
object line object
handle number name
6A3C4A00 532 package body FLOWS_010500.WWV_FLOW_UTILITIES
6A3C4A00 2502 package body FLOWS_010500.WWV_FLOW_UTILITIES
6A3C4A00 2748 package body FLOWS_010500.WWV_FLOW_UTILITIES
6A0E63C8 991 package body FLOWS_010500.WWV_FLOW_FORMS
6A11675C 932 package body FLOWS_010500.WWV_FLOW_DISP_PAGE_PLUGS
6A11675C 247 package body FLOWS_010500.WWV_FLOW_DISP_PAGE_PLUGS
6A4B54E0 8341 package body FLOWS_010500.WWV_FLOW
6A2A99F0 102 procedure FLOWS_010500.F
6A2B9E54 10 anonymous block
----- Call Stack Trace -----
calling call entry argument values in hex
location type point (? means dubious value)
ksedmp+524 CALLrel ksedst+0 1
ksedmptracecb+15 CALLrel _ksedmp+0 C
_ksddoa+118 CALLreg 00000000 C
ksdpcg+143 CALLrel ksddoa+0
ksdpec+180 CALLrel ksdpcg+0 1966 6D7D208 1
__PGOSF3__ksfpec+11 CALLrel _ksdpec+0 0
8
_kgerev+77 CALLreg 00000000 7474210 1966
kgerec1+18 CALLrel kgerev+0 7474210 6DCE5EC 1966 1
6D7D260
peirve+465 CALLrel kgerec1+0
pevmCVTCN+346 CALLrel _peirve+0
pfrinstrCVTCN+36 CALLrel pevmCVTCN+0 6E6E604 71CE370 7160F0C
pfrrunno_tool+51 CALL??? 00000000
pfrrun+1834 CALLrel pfrrun_no_tool+0 6E6E604 6A3C010A 6E6E640
plsqlrun+1051 CALLrel _pfrrun+0 6E6E604
peicnt+179 CALLrel plsql_run+0 6E6E604 1 0
kkxexe+477 CALLrel peicnt+0
opiexe+4896 CALLrel kkxexe+0 6A2B9E54
kpoal8+1705 CALLrel opiexe+0 49 3 6D7E06C
_opiodr+977 CALLreg 00000000 5E 14 6D7E7CC
_ttcpip+1827 CALLreg 00000000 5E 14 6D7E7CC 0
_opitsk+1098 CALL??? 00000000
opiino+938 CALLrel opitsk+0 0 0 747ABC0 6DEFB14 D8 0
_opiodr+977 CALLreg 00000000 3C 4 6D7FBBC
opidrv+479 CALLrel opiodr+0 3C 4 6D7FBBC 0
sou2o+45 CALLrel opidrv+0 3C 4 6D7FBBC
opimai+237 CALLrel sou2o+0
OracleThreadStart@ CALLrel opimai+0
4+899
77E7D338 CALLreg 00000000 -
Re: Error, numeric or value error: character to number conversion error
Can someone please please tell me why I'm getting this error and what I'm doing wrong? It looks like a simple error, "numeric or value error: character to number conversion error".
My code is as follows:
string connectionString = WebConfigurationManager.ConnectionStrings["DEMO_TEST"].ConnectionString;
OracleConnection con = new OracleConnection(connectionString);
OracleCommand cmd = new OracleCommand("DEMO.PKG_LOCATION_TYPE.INS", con);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add(new OracleParameter("@P_DESCRIPTION", OracleDbType.Varchar2, 60));
cmd.Parameters["@P_DESCRIPTION"].Value = "Test_Description";
cmd.Parameters.Add(new OracleParameter("@P_NAME", OracleDbType.Varchar2, 6));
cmd.Parameters["@P_NAME"].Value = "Test_Name";
cmd.Parameters.Add(new OracleParameter("@P_LOCATION_TYPE_CD", OracleDbType.Decimal, 4));
cmd.Parameters["@P_LOCATION_TYPE_CD"].Direction = ParameterDirection.InputOutput;
con.Open();
try
cmd.ExecuteNonQuery();
catch
//In case of an error
finally
con.Close();
con.Dispose();
And I recieve the following error block:
Oracle.DataAccess.Client.OracleException was unhandled by user code
Message="ORA-06502: PL/SQL: numeric or value error: character to number conversion error\nORA-06512: at line 1"
Source="Oracle Data Provider for .NET"
DataSource="demotest"
Number=6502
Procedure="DEMO.PKG_LOCATION_TYPE.INS"
StackTrace:
at Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, String procedure)
at Oracle.DataAccess.Client.OracleException.HandleError(Int32 errCode, OracleConnection conn, String procedure, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src)
at Oracle.DataAccess.Client.OracleCommand.ExecuteNonQuery()
at System.Web.UI.WebControls.Wizard.OnFinishButtonClick(WizardNavigationEventArgs e)
at System.Web.UI.WebControls.Wizard.OnBubbleEvent(Object source, EventArgs e)
at System.Web.UI.WebControls.Wizard.WizardChildTable.OnBubbleEvent(Object source, EventArgs args)
at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)
at System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
********************************************************Are the parameters in your procedure in the same order as they are created in this code? Oracle command works by position unless you change it to be BindByName.
Failing that you seem to have defined a parameter (P_NAME) to have a length of 6, and are then setting it's value to a string with a length of 9.
Also the in/output parameter is defined as type decimal. Is this correct? It is defined as InputOutput but you don't assign it any value.
If these suggestions don't help then perhaps if you post the stored procedure you might get some more ideas.
HTH
Lyndon -
ORA-06502: numeric or value error: character to number conversion error
I met the following error when I ran Donald's PL/SQL function to_number_or_null. Could somebody here help me find the resolution? Thanks!
SQL> create or replace FUNCTION to_number_or_null (
2 aiv_number in varchar2 )
3 return number is
4 /*
5 to_number_or_null.fun
6 by Donald J. Bales on 12/15/2006
7 An errorless to_number( ) method
8 */
9 begin
10 return to_number(aiv_number);
11 exception
12 when INVALID_NUMBER then
13 return NULL;
14 end to_number_or_null;
15 /
Function created.
SQL> select to_number_or_null('A') from dual;
select to_number_or_null('A') from dual
ERROR at line 1:
ORA-06502: PL/SQL: numeric or value error: character to number conversion error
ORA-06512: at "CAROL.TO_NUMBER_OR_NULL", line 10Only INVALID_NUMBER exception is handled and also VALUE_ERROR should be handeled. You can resolve it by handling VALUE_ERROR exception or by adding WHEN OTHERS as I did in following example.
SQL> create or replace FUNCTION to_number_or_null (
2 aiv_number in varchar2 )
3 return number is
4 /*
5 to_number_or_null.fun
6 by Donald J. Bales on 12/15/2006
7 An errorless to_number( ) method
8 */
9 begin
10 return to_number(aiv_number);
11 exception
12 when INVALID_NUMBER then
13 return NULL;
14 when OTHERS then
15 return null;
16 end to_number_or_null;
17 /
Function created.
SQL> select to_number_or_null('A') from dual;
TO_NUMBER_OR_NULL('A')
----------------------With kind regards
Krystian Zieja -
EEWB Extension deletion " Field changes can require table conversion"
Hi
Wihile iam trying to delete extensions in EEWB (created in a transaction ) it is giving me the below error
Field changes can require table conversion
Message no. OXT_MISC328
Diagnosis
Not all databases permit deletion of fields in existing tables. Deletion may be required when making changes. In this case, the table must be converted, and then it has the status Partially active. The extension is otherwise flagged as having errors.
Procedure
Take the tables that are to be converted from the log. Use the database utility to make the conversion. Conversion may require a lot of time and resources. Then repeat the transaction in the Easy Enhancement that led to this message.
The Request which contains the extension has already been transported can any help me out in this
Edited by: Nanda Kishore on Sep 2, 2009 8:16 AMHi Kishore,
Go to Database Utility (SE14) --> select the table names from you log and (in next screen) press button Activate & Adjust database and check that the Status becomes Active. Depending on the size of table , might take some minutes to activate this table.
Cheers
Jignesh -
ORA-06502: PL/SQL: numeric or value error: character to number conversion
Hello,
I am new to Oracle Apex so I decided to read and do the tutorials that are on the apex.oracle.com site.
Now I am at the tutorial 6: How to Work with Check Boxes of the Advanced Tutorials.
At a certain point you have to add a new radio button.
At the Item Source Value you have to add SELECT 'Y' FROM DUAL WHERE :P2_LIST_PRICE*0.75=:P2_MIN_PRICE.
But when I try to create the item, I keep getting the following error:
ORA-06502: PL/SQL: numeric or value error: character to number conversion error
Error creating item.
Does anybody know what could be the problem.
Thanks in advance.CREATE OR REPLACE PROCEDURE xxbb_query (
p_branch_code XXBOB_HRMS_APPRAISALS_DATA.Branch_code%TYPE,
p_PERIOD_NAME XXBOB_HRMS_APPRAISALS_DATA.PERIOD_NAME%TYPE
IS
emp_refcur SYS_REFCURSOR;
v_deposits XXBOB_HRMS_APPRAISALS_DATA.deposits%TYPE :=0;
v_branch_code XXBOB_HRMS_APPRAISALS_DATA.branch_code%TYPE:=0;
p_query_string VARCHAR2(500);
BEGIN
DBMS_OUTPUT.PUT_LINE('Hello' || ' ' || '...');
p_query_string := 'SELECT Avg(deposits) Dep,branch_code FROM XXBOB_HRMS_APPRAISALS_DATA WHERE ' ||
*' Branch_code = :branch_code '||*
*' AND PERIOD_NAME = SubStr( :PERIOD_NAME ,1,4))||(SubStr( :PERIOD_NAME ,InStr( :PERIOD_NAME ,'-',1,1)+3,5)) ' ||*
*' group BY SubStr(PERIOD_NAME,5),BRANCH_CODE ';*
DBMS_OUTPUT.PUT_LINE('Hi' || ' ' || '...');
OPEN emp_refcur
FOR p_query_string USING p_branch_code,v_p_PERIOD_NAME,v_p_PERIOD_NAME,v_p_PERIOD_NAME;
-- DBMS_OUTPUT.PUT_LINE('----- -------');
Here I m passing a string variable to pass the select statement for the ref cursor.
There seems some problem in the substr conversion in the statement.
ORA-06502: PL/SQL: numeric or value error: character to number conversion error
But when i run as a independent staement passing real values in the place of placeholders
i get the result right.
The *:PERIOD_NAME* format is *'Jan-2009-10'* .
And I need to pass the *:PERIOD_NAME* to the query as *'Jan-09-10'*
Pls suggest.
Edited by: user7391361 on Jul 23, 2009 8:28 AM -
Locking mechanism while import transports with table conversions
Hi all,
quite often, we have the request to import to our PROD FI SAP System a big list of transports which are performing also table conversions (addition of columns, removeal of columns etc).
During the import of the transports we inform the people not to logon on the system and perform any kind of job.
However not everyone is respecting the notification.
Is there any mechanism to prevent all the users from logging onto the SAP system?
Kind Regards,
Loukas RougkalasHi Loukas,
call SE16, table name = USR02, (get variant that listed only the users they are not in user groups SYSTEM, SUPER, BASIS Admin and so on), F8, Export the list of users to Excel, StrgShiftF7 - is only working in ALV Grid display (Settings - User Parameters - ALV Grid display)
Then lock the users with transaction SU10 - Authorization data - mutiple selsction - copy the list of users from clipboard (excel Table "B") and paste it into "single value" (ShiftF12 -> F8 -> F8) - Select all (F5) - click to "Transfer" then you can lock the users with CtrlF5
To unlock the Users repeat step 2 - instead of StrgF5 click StrgF4 for unlock
Gerd
Edited by: Gerd Schuster on Nov 17, 2009 2:12 PM -
Ascii table - character matching table
Where can I find a character mapping table for character set WE8ISO8859P1
Olav Torvund
[email protected]Hi,
that's odd. I got all of them 255 total. Here is a portion of it.
CHR dec
Y 89
Z 90
[ 91
\ 92
] 93
^ 94
_ 95
` 96
a 97
b 98
c 99
CHR dec
d 100
e 101
f 102
g 103
h 104
i 105
j 106
k 107
l 108
m 109
n 110
CHR dec
---- ----------U -
Find character of table in indesign using applescript
Hi ,
I have one story and it contains 5 tables.
I need index of character for table 4 in story 1. Please help me.
my code is shown in below. this is right or not please check .
tell application "Adobe InDesign CS6"
tell active document
set indx to index of character 1 of table 4 of story 1
end tell
end tell
if any wrong in my coding please tell me.Script labels can't be disabled, so I'm not sure what your problem is -- perhaps seeing some code could help. Could it be that you're referencing a page item by label, but it is not responding because the item is part of a group?
Shane Stanley <[email protected]>
AppleScript Pro Sessions <http://scriptingmatters.com/aspro> -
Character set table for unicode conversion
Experts,
If one identifies a special character that fails during code page conversion (CX_SY_CONVERSION_CODEPAGE), can this character then be added into a table that will recongnize it and not fail moving forward? If so, how to go about it?
Any help is appreciated.
UVNote this
Unicode Error : In the Unicode context, TRANSLATE... CODEPAGE/NUMBER FORMAT is not allowed.
Before Unicode
TRANSLATE T143T-TBTXT FROM CODE PAGE '1100' TO CODE PAGE '1105'.
After Unicode
Use class for Translate codepage to codepage.
Data : g_codepage LIKE tcp0c-charco VALUE '1100'.
CONSTANTS: c_unicodecp(4) VALUE '1105'.
PERFORM translate_codepage USING g_codepage
c_unicodecp
CHANGING T143T.
FORM translate_codepage USING P_G_CODEPAGE
P_C_UNICODECP
CHANGING P_T143T.
DATA: converter TYPE REF TO cl_abap_conv_obj.
DATA: l_out TYPE string.
DATA: l_fromcode TYPE cpcodepage.
DATA: l_tocode TYPE cpcodepage.
l_fromcode = P_G_CODEPAGE.
l_tocode = P_C_UNICODECP.
CREATE OBJECT converter
EXPORTING
incode = l_fromcode
miss = '.'
broken = '.'
use_f1 = 'X'
outcode = l_tocode
EXCEPTIONS
invalid_codepage = 1
internal_error = 2.
IF sy-subrc 0.
CASE sy-subrc.
WHEN 1.
MESSAGE ID 'FES' TYPE 'E' NUMBER '024' RAISING unknown_error.
WHEN 2.
MESSAGE ID 'FES' TYPE 'E' NUMBER '024' RAISING unknown_error.
ENDCASE.
ENDIF.
CALL METHOD converter->convert
EXPORTING
inbuff = P_T143T
inbufflg = 0
outbufflg = 0
IMPORTING
outbuff = l_out
EXCEPTIONS
internal_error = 1
OTHERS = 2.
IF sy-subrc 0.
CASE sy-subrc.
WHEN 1.
MESSAGE ID 'FES' TYPE 'E' NUMBER '024' RAISING unknown_error.
WHEN 2.
MESSAGE ID 'FES' TYPE 'E' NUMBER '024' RAISING unknown_error.
ENDCASE.
ENDIF.
P_T143T = l_out.
ENDFORM. " translate_codepage
Reward if helps -
Character sets and conversions
Hi all,
were facing a quite complex problem, for which I'am not even able to specify were it is going wrong or what needs configuring, partly for lack of experience and partly for combining different tecnical areas from which I'm only responible for some of them.
So I'll sketch breefly the situation, and hopefully you might give me some guidelines or hints as to where to look at.
The setup : web application (so clients access by use of browser) on Weblogic- Linux platform, Tuxedo on Iseries , and as far as I understand some DB internally to Iseries where data is stored.
Data is entered in the DB by use of some data-entry application that comes with the iSeries.
The problem: consulting data by use of the web-aplication , some characters dont show up correctly , e.g. @ in email addresses, e's with accents, ...
For the chain being "browser <-> WL <-> Tuxedo <-> DB" , the problem might be different points. But from trace beeing activated , we could see that the response going out of tuxedo to WL is not correct...
Any hint as to what to look for, what can configuration is important, would be welcome ...
Some sub-questions:
- I understand Tuxedo is always "installed" in English , with no other option. This means that f.e. logs are in English.
But can/need to define some character set?
- Between Tuxedo <-> DB you can use som conversion tables ?
Any help would be apreciated , were quite lost ..Hi,
Given that you are running Tuxedo on iSeries, I'm guessing you are running Tuxedo 6.5 as the port for the current Tuxedo release on iSeries hasn't been released yet. Tuxedo 6.5 does not directly support multi-byte character strings. The two common buffer formats for string data in Tuxedo are STRING which doesn't support multi-byte characters, or CARRAY which does support multi-byte characters as a CARRAY is essentially a blob. Do you know what buffer type the Tuxedo application is using to send data to WebLogic Server?
In Tuxedo 9.0 and later, direct support for multi-byte strings was added in the form of the MBSTRING buffer type. This buffer type supports multi-byte strings with a variety of character sets and encodings.
Regards,
Todd Little
Oracle Tuxedo Chief Archiitect -
How to exp/imp both diff character set tables between in DB1 and DB2?
In the Solaris 2.7 ,the oracle 8i DB1 has NLS_CHARACTERSET
ZHS16CGB231280 and NLS_NCHAR_CHARACTERSET ZHS16CGB231280
character set.
In other linux7.2 system ,the oracle 8i DB2 is install into the
NLS_NCHAR_CHARACTERSET US7ASCII and NLS_CHARACTERSET US7ASCII
character set.
The tables contents of DB1 have some chinese. I want to exp/imp
tables of DB1 into DB2 . But the chinese can't correct display
in the SQLWheet tools. How do the Exp/Imp operation ? ples help
me . thanks .The supported way to store GB231280-encoded characters is using a ZHS16CGB231280 database or a database created using a superset of GB231280 ,such as UTF8 .Can you not upgrade your target database from US7ASCII to ZHS16CGB231280 ?
With US7ASCII and NLS_LANG set to US7ASCII , you are using the garbage in garbage out (GIGO) approach. This may seem to work but there are many hidden problems :-
1. Invalid SQL String Function behaviours - LENGTH ( ) , SUBSTR ( ) , INSTR ( )
2. Data can be corrupted when data is loaded into another database. e.g. EXP / IMP , Dblinks
3. Communication with other clients will generate incorrect results. e.g. other Oracle products - Oracle Text, Forms. , Java , HTML etc.
4. Linguistic sorts not available
5. Query using the standard WHERE clause may return incorrect results ..
6. Extra coding overhead in handling character conversions manually.
I recommend you to check out the FAQ and the DB Character set migration guide on the Globalization Support forum on OTN.
Nat.
Maybe you are looking for
-
I have PSE 13 on Windows 7. When I start to "save" an image I've edited it wants to save it using an outdated ICC profile. My most recent calibration was 01/12/15, but the "save" dialog is showing one of my profiles from 06/22/14. How do I get it to
-
Using hostContainer with LiveCycle form
Hi all, I want my air application to communicate with the pdf file that it is hosting. With acroforms it is possible to use hostContainer method but in LC forms I didn't manage to use it. Anybody has an idea? Thanks, Rbuz
-
Funds Precommitment - Open amount is not updated
Dear colleagues, When we close Precommitment document, open amount in the Earmarked Funds document is not updated. We had a similar problem with Earmarked Funds document and FI document which is solved using note 1376800. Our component version is SAP
-
Error in vendor upload using LSMW
Hi all, If I create central vendor manually using XK01, fields for postal code and city in 'street address' are optional. But if I try to upload vendors with LSMW and with central management active, these fields becomes mandatory. Can anyone tell me
-
Surface Pro pressure sensitivity issue...
Anyone out there have an update on the issue to use the pressure sensitivity on the Surface Pro, yet???ANY info will be appreciative from Adobe of MS....THANKS!!!- joe