How to assign a character field to a strucure in ECC6.0 ( Unicode error)
Hi all,
This is regarding a Unicode error we are facing in upgrading a program from 4.6c to ECC6.0.
The following pice of code gives error now in ECC6.0, stating Unicode incompatible structures.
DATA: WA_MSEG TYPE MSEG,
WA_MKPF TYPE MKPF.
DATA: LE_DATA(8192) TYPE C.
CALL FUNCTION 'ARCHIVE_GET_NEXT_RECORD'
EXPORTING
ARCHIVE_HANDLE = LE_HANDLE
GET_REAL_STRUCTURE_NAME = 'X'
AUTOMATIC_CONVERSION = 'X'
IMPORTING
RECORD = LE_DATA
RECORD_CURSOR =
RECORD_FLAGS =
RECORD_STRUCTURE = LE_STRUCTURE
RECORD_LENGTH =
EXCEPTIONS
END_OF_OBJECT = 1
INTERNAL_ERROR = 2
WRONG_ACCESS_TO_ARCHIVE = 3
OTHERS = 4
IF SY-SUBRC <> 0.
EXIT.
ENDIF.
move records
CASE LE_STRUCTURE.
WHEN 'MSEG'.
<b> WA_MSEG = LE_DATA.</b>
move-corresponding WA_MSEG to TBL_ARC_MSEG.
APPEND TBL_ARC_MSEG.
CLEAR: WA_MSEG, LE_DATA, TBL_ARC_MSEG.
WHEN 'MKPF'.
<b> WA_MKPF = LE_DATA.</b>
move-corresponding WA_MKPF to TBL_ARC_MKPF.
APPEND TBL_ARC_MKPF.
CLEAR: WA_MKPF, LE_DATA, TBL_ARC_MKPF.
ENDCASE.
Can you please suggest a way to overcome this error.
Thanks in advance,
Sreenivasa Reddy V.
IV_OFFSET is the position from the C field will be started to be read (should be 0) and EV_OFFSET is the length to which the data is going to be fetched. The Following code could be useful ---
w_len = STRLEN( p_data ).
CALL FUNCTION 'OIF_CONVERT_CHAR_TO_STRUCTURE'
EXPORTING
iv_string = p_data
iv_structure_name = 'VBAK'
* iv_offset = w_len
IMPORTING
ev_structure = wa_vbak
ev_offset = w_len
EXCEPTIONS
ddif_nametab_get = 1
OTHERS = 2.
Hope That Helps
Anirban M.
Similar Messages
-
How to sort a character field with numbers and letters on the end
I have an internal table with character field which has data like this after I sort it. This is not what I expect from the sort.:
13A
15A
29A
30A
31A
33A
123A
125
62
76
94A
I expect this, which is sorted number first, then alpha. Any ideas how to get this sort?:
13A
15A
29A
30A
31A
33A
62
76
94A
123A
125Thanks for the suggestions. After reading the suggestions and reviewing some other post threads, here's what I did to get the sort to work:
Add a dash - to the end of any record that did not have an alphabet character at the end. This way, all records have at least one non-numeric character at the end. Then I overlayed zeros '0000000' over each record. Then I sorted the table. Afterwards, I removed the dashes and zeros.
The long way around, but it worked for me. Since the internal table is processed in memory, it doesn't add much overhead to the run time. -
How to assign tables to field-symbols
how can i assign tables to field-symbols
Hi Raj,
Declare a fields symbol of type table, see below syntax:
FIELD-SYMBOLS <FS> [<type>|STRUCTURE <s> DEFAULT <wa>].
and then create an internal table and write the below code;
ASSIGN itab to <fs>.
Refer below eg:
TYPES: BEGIN OF line,
col1 TYPE c,
col2 TYPE c,
END OF line.
DATA: wa TYPE line,
itab TYPE HASHED TABLE OF line WITH UNIQUE KEY col1,
key(4) TYPE c VALUE 'COL1'.
FIELD-SYMBOLS <fs> TYPE ANY TABLE.
ASSIGN itab TO <fs>.
also see below link:
http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb387a358411d1829f0000e829fbfe/content.htm
Regards,
Sunil -
How to assign custom tab field value to corresponding standard tab field value.
Dear friends,
I want assign a field value ( advice code , advice code description ) in a custom tab to corresponding field value in standard tab (advcode ,). in me51n.
following screen shot are given belowHi SK,
It looks both the tabs are custom ones. In that case, you can either use Export/Import statement or you can use Set/Get Parameter ID for setting value.
If one is standard subscreen, you can export value from custom subscreen and use line item level user-ext/enhancement to assign the value on standard subscreen.
Hope this helps.
Regards,
Naveen -
How to select special character from OLE DB source in SSIS?- Truncation error.
Hi,
I have to pull data from one Oracle table and for that I am using OLE DB source in SSIS. In OLE DB source I write query like,
SELECT DESCRIPTION
FROM INV.ITEMS_LOCATION
and packages failed with truncation error. When I redirect this column for truncation I see below result in data viewer,
ErrorCode
ErrorColumn
DESCRIPTION
ErrorCode - Description
-1071607693
8884
HC Afd Set__ZDV?N07-03075
The data was truncated.
-1071607693
8884
HC Afd Set__Ventiel 4DO1-?
The data was truncated.
-1071607693
8884
HC Afd Set__Ventiel 3DO3-?
The data was truncated.
-1071607693
8884
HC Afd Set__Ventiel 4DP01-?
The data was truncated.
-1071607693
8884
HC Afd Set__Ventiel DBDS-10-?
The data was truncated.
-1071607693
8884
HC Afd Set__Filter TXW?
The data was truncated.
-1071607693
8884
HC Afd Set__ZDV?N07-03075
The data was truncated.
-1071607693
8884
HC Afd Set__Ventiel 4DO1-?
The data was truncated.
-1071607693
8884
HC Afd Set__Ventiel 3DO3-?
The data was truncated.
-1071607693
8884
HC Afd Set__Ventiel 4DP01-?
The data was truncated.
-1071607693
8884
HC Afd Set__Ventiel DBDS-10-?
The data was truncated.
I don't how to put this value in table. I use code page 65001(UTF-8) and 1252, but it is not working, and giving error like
[OLE DB Source [16]] Error: Column "DESCRIPTION" cannot convert between unicode and non-unicode string data types.
Data Type of 'DESCRIPTION' source(External) column is varchar(240) and same- varchar(240) I used for output column and in my table's data type. I also tried with varchar(1000) for output column in OLE DB Source but same truncation error.
I also tried to convert DESCRIPTION into navachar using below cast function but got error.
SELECT -- TO_NVARCHAR(DESCRIPTION) AS DESCRIPTION,
--CAST(DESCRIPTION AS NVARCHAR(240)) DESCRIPTION,
Please let me know how to load this value in table. Thank you in advance.
VickyThanks ArthurZ for reply.
But for testing I am just using OLEDB source and OLE DB destination only in my ssis package.
For Column "DESCRIPTION", data type is VARCHAR(240)
in external column, output column and target table column.
And I tried to cast source column into nvarchar and also set target column to nvarchar to handle this kind of special characters but package is failing,
I also tried TO_NCHAR(DESCRIPTION)
in my source query to convert it to nvarchar but error is something like character mismatch.
Vicky -
Hi All,
The Actual query to perform is below.
SELECT name,number from emp WHERE CASE WHEN :1='T' AND term_date IS Not NULL THEN 1 WHEN :1='A' AND term_date IS NULL THEN 1 WHEN :1='ALL' THEN 1 ELSE 1 END = 1;
I have tried in DB adapter like below as a parameter for :1 as #vInputParam
SELECT name,number from emp WHERE CASE WHEN #vInputParam='T' AND term_date IS Not NULL THEN 1 WHEN #vInputParam='A' AND term_date IS NULL THEN 1 WHEN #vInputParam='ALL' THEN 1 ELSE 1 END = 1;
Getting Error code :17003 .java.sql.SQLException: Invalid column index error.
Please suggest me on using ':' bind character in DB adapter Select Query SOA11g.
Can someone help me on this please?
Thanks,
HariHi,
Could you please make sure your binding style(Oracle Positional,Oracle named..etc) of the Seeded VO and Custom Vo are same.
This is the option you will get when you are extending your vo. So make sure that both are same.
You can refer the below link too
VO extension leads to "Invalid column index" exception
Thanks
Bharat -
How to Assign a Field value to a Variable??
Dear All,
Kindly let me know, if <b>"HOW TO ASSIGN A FIELD VALUE TO A VARIABLE????"</b>
Situation is, we have a Field (OBJK-TASER) in which 2 tables (SER01 & SER03) are stored. And we want to access names of the Tables which are there in the field(TASER) in (OBJK) table to a variable and then passing that variable to the sql query as a table name to get data accessed dynamicaly.try this
select TASER from OBJK into table it_table.
loop at it_table.
select field1 field2 from (it_table-table) into table it_fields.
endloop -
How to move the value from a character field to numeric or packed decimal
Hi,
can anyone explain me on how to move the value from a character field to numeric or packed decimal.
Please help me on this. Thanks...
Regards,
Rose.Hi ,
if you use keyword MOVE u may loose the decimal and thoussan separator and if u don't want to loose them just call the FM ..HRCM_STRING_AMOUNT_CONVERT.
i doubt wherther it is HRCM or HCRM just try using *
this will suit ur requirement.
Regards,
KK -
How to get a currency format for a character field
for some specifix reason, we have a requirement to show character field (which results in value 633948) in the format $633,948
how do i do this?
if i do SELECT to_char(:c_1,'$999,999')) from dual;
it gives me ora: 01722: invalid number error
c_1 is a user parameter of data type characterTry using TO_NUMBER first, as in something like:
SQL> VARIABLE c_1 VARCHAR2(6)
SQL> EXECUTE :c_1 := '633948';
PL/SQL procedure successfully completed.
SQL> SELECT TO_CHAR(TO_NUMBER(:c_1), '$999,999') FROM DUAL;
TO_CHAR(T
$633,948Hope this helps. -
How to assign fields in rdf in coldfusion
Hi,
This is chitti iam facing problem in cold fusion with rdf?
How to assign dublincore field to rdf file in xml? iam trying
this is this the correct way or not?
iam posting image with metadata into databaseHi
Go to acessseqence and then select the particular table which u have added or ammended select the table and click feilds tab and after u go in to feilds select each feild and press enter and save do this for evry line in each field and after completing
evry feild save and exit ....ur problem will be solved otherwise
AccessSequence -> select table -> click on fields -> select the field with error and click on field catalog .
From there select the field name manually and save .
and please refer this link..
Access sequence Issue
Hope it will be help-full for you
Thanks.. -
How to accomodate more than 255 characters in character field
HI All
i need to accomodate more than 255 characters in character field. How can i do that ?
thanks in advance!!!Hi,
You can try the following things:
1. Use a datatype STRING and check it will work.
2. In se11 transaction goto datatype and search for char* in data elements.
You will find predefined data types ,you can make use of it.
For eg. char2000,char3000,char4000 etc.
Hope this will help.
Regards,
Nitin. -
How to assign values for more than one field
Hi,
I have written following code
constants: fieldname(30) value '(SAPMF02D)KNA1-AUFSD'.
constants: fieldname1(30) value '(SAPMF02D)KNA1-LISFD'.
constants: fieldname2(30) value '(SAPMF02D)KNA1-FAKSD'.
field-symbols: <L_FIELD> TYPE ANY.
field-symbols: <L_FIELD1> TYPE ANY.
field-symbols: <L_FIELD2> TYPE ANY.
Assign (fieldname) to <l_field>.
<L_FIELD> = 'ZB'. " value according to your requirement
Assign (fieldname1) to <l_field1>.
<L_FIELD1> = 'ZB'.
while debugging <l_field1> is not assinging (fieldname1).
Im able to assing for (fieldname).
how to assign value for (fieldname1).
plz suggest me to assign values for more than one field.
Regards,
BrahmajiHello,
Because there is no field name called LISFD in KNA1. Actually you misspelled the field name.
It is KNA1-LIFSD -
How to set Character field's Format Mask?
dear all,
how to set Character field's Format Mask?
i searched the forum and found the following, where can i use this code and how to change and set its format mask.
SRW.SET_FORMAT_MASK('mask');
Thanks
Muhammad NadeemNadeem,
If you have database 10g, look into function REGEXP_REPLACE. Otherwise you can also try this (you might already know).
SELECT SUBSTR('CHHOCMIPO07020001', 1,2)||'-'||SUBSTR('CHHOCMIPO07020001' ,3,2)||'-'||
SUBSTR('CHHOCMIPO07020001' , 5,2)||'-'||SUBSTR('CHHOCMIPO07020001' , 7,3)||'-'||
SUBSTR('CHHOCMIPO07020001' , 10,2)||'-'||SUBSTR('CHHOCMIPO07020001' , 12,2)||'-'||
SUBSTR('CHHOCMIPO07020001' , 14,4)
FROM dual
CH-HO-CM-IPO-07-02-0001
If you have to use this at many places, create a function, pass the raw value, manipulate the string and return.
FS -
How to assign ranges ( select-option)to field symbol
Hi ,
I have following scenario
ranges : r_test1 for agr_1251,
r_test2 for agr_1251.
In runtime i am getting which range i have to populate in a field v_rname.for now let it me v_rname = 'r_test2'
i want to assign (v_rname ) to <field -symbol> ie is range to field symbol.
and i want to update the <field -symbol>-sign ='I'
<field -symbol>-LOW ='some value'
append <field -symbol>.
This is the logic i want to follow, for this how should i have to declare the field symbol ? I couldn't assign a range to field symbol . Please help me.
thanks
MuraliTry this
FIELD-SYMBOLS : <field_symbol> TYPE ANY TABLE.
ASSIGN (v_rname) to <field_symbol>.
<field -symbol>-sign ='I'
<field -symbol>-LOW ='some value'
append <field -symbol>.
This should work because your range is a table.
Hope this helps you. -
HOW WE CAN VALIDATE A FIELD THAT SHOULD NOT BE SPECIAL CHARACTER?
HOW WE CAN VALIDATE A FIELD THAT SHOULD NOT BE SPECIAL CHARACTER?
data : v_abcde like sy-abcde,
v_num like '0123456789',
v_data(60) type c.
start-of-selection.
v_abcde = sy-abcde.
concatenate v_abcde v_num into v_data.
if ur field co v_data
else.
message.
endif.
Maybe you are looking for
-
Mail indexing and lost sent mail
since yesterday, mail has been repeatedly indexing, always getting stuck on one particular email and taking over 1/2 an hour each time before allowing access to the program. Finally, I was able to run a search and delete the offending email before th
-
Planning board user status at operation level
Hi Guys, Our user is not using planning board and therefore system status should not have DISP status as system status. Now user needs two profiles in the CM07 bases on the statuses SCH and RFS. Profile 1: For operation user status=SCH Profile 2: For
-
I am currently using a late 2006 black macbook running OS Lion. I have recently bought a new retina macbook pro to upgrade to which will presumably be running OS Mountain Lion. I understand there are several ways to transfer data across to new macs a
-
Got E-mail Attachment (.xls Excel file), then import data to Database
Dear All, I have a project need to do above mention function. how to do that automatically ? Database is Oracle 10g running on RH AS 4.0 Linux. Best regards boris
-
Firefox 5.0 does not open link into new window
Firefox 5.0 does not open link into new tab. I have a netbook also and tab options work fine, links open into a new window. However on this Dell it does not work. Tab options in Firefox and Google are set right, but don't work that way. Running Windo