Non-character-type structure need to be written in ASCI File in Unicode sys
Hi Gurus,
I am trying to write a structure into a ASCI file iapplication server.
My code is as follows.
data : ls_header type BBP_PDS_CTR_HEADER_D ,
lv_filename TYPE rlgrap-filename VALUE '/interface/AEE/IN/kalandi'.
CALL FUNCTION 'BBP_PD_CTR_GETDETAIL'
EXPORTING
I_OBJECT_ID = '4000000196'
IMPORTING
E_HEADER = ls_header.
open dataset lv_filename for output in text mode encoding default .
if sy-subrc = 0.
transfer ls_header to lv_filename.
close dataset lv_filename.
endif.
but it ives a dump .
Error is :
"TRANSFER f TO ..."
only character-type data objects are supported at the argument position
"f".
In this case. the operand "f" has the non-character-type
"BBP_PDS_CTR_HEADER_D". 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.
Thanks a lot in advance.
Points will be awared for appropriate Answers.
Regards
kalandi
Hi,
I think here ls_header and lv_filename are not compatible to transfer the data.
Regards,
Satish
Similar Messages
-
Plz help upgrade issue moving data from char type structure to non char typ
Hi Experts
plz help its very urgent
Data :workout(5000) .
FIELD-SYMBOLS : <FS_WORKOUT> TYPE ANY.
workout = ' u' .
ASSIGN WORKOUT TO <FS_WORKOUT> CASTING TYPE C .
BAPISDITM = <FS_WORKOUT>.
i am getting dump after BAPISDITM = <FS_WORKOUT>.
i think i am getting the dump bcoz i am moving character type structure to non character type structure but i think with field symbols we can remove this issue thats y i used it but its not working plz help me
its very urgent
*dump is :*
Short text
Data objects in Unicode programs cannot be converted.
What happened?
Error in the ABAP Application Program
The current ABAP program "ZSDR0009" had to be terminated because it has
come across a statement that unfortunately cannot be executed.
How to correct the error
Use only convertible operands "dst" and "src" for the statement
"MOVE src TO dst"
If the error occures in a non-modified SAP program, you may be able to
find an interim solution in an SAP Note.
If you have access to SAP Notes, carry out a search with the following
keywords:
"UC_OBJECTS_NOT_CONVERTIBLE" " "
"ZSDR0009" or "ZSDR0009_I02"
"USER_COMMAND"
thanx in advancei got d solution in this thread
Hi all,
data: gv_line(6000) type c.
Bvbapkom = gv_line.
But i am getting the Error like : gv_line and Bvbapkom are not mutually convertable.
Note: Bvbapkom is a Structure
How do i solve this ?
Mahesh
KR
Posts: 210
Registered: 11/24/06
Forum Points: 0
Re: gv_line and Bvbapkom are not mutually convertable.
Posted: Nov 30, 2007 8:40 AM in response to: KR Reply
Hi ,
i got the solution
ANSWER:
Field-symbols: <X_Bvbapkom> type x,
<X_gv_line> type x.
Assign: Bvbapkom to <X_Bvbapkom> casting,
gv_line to <X_gv_line> casting.
<X_Bvbapkom> = <X_gv_line>.
Nasaka Ramakris...
Posts: 4
Registered: 1/19/08
Forum Points: 20
Re: gv_line and Bvbapkom are not mutually convertable.
Posted: Jan 19, 2008 7:42 AM in response to: KR Reply
Hi Check this answer.
ANSWER:
Field-symbols: <X_Bvbapkom> type x,
<X_gv_line> type x.
Assign: Bvbapkom to <X_Bvbapkom> casting,
gv_line to <X_gv_line> casting.
<X_Bvbapkom> = <X_gv_line>. -
Hi All,
following piece of code was working fine in 4.6 C but in ECC 6.0 I get the following error:
" "END_OF_RECORD" must be a character-type data object (data type C, N,D, T or STRING) . "
I tried type-casting with field symbols but still not able to remove the error. Cannot convert end_of_record directly to type C as it may hamper the functionality. Plz advice how to remove the error without converting type x to type C
In the following code :
DATA: DELIMITER TYPE C VALUE CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB,
end_of_record TYPE x.
SPLIT data_file_i AT delimiter INTO it_ekko-rtype
it_ekko-ebeln
it_ekko-bsart
it_ekko-lifnr
it_ekko-bedat
it_ekko-ekorg
it_ekko-ekgrp
it_ekko-bukrs
it_ekko-zterm
it_ekko-zbd1t
it_ekko-zbd1p
it_ekko-zbd2t
it_ekko-zbd2p
it_ekko-zbd3t
it_ekko-inco1
it_ekko-inco2
it_ekko-waers
it_ekko-wkurs
it_ekko-kufix
it_ekko-verkf
it_ekko-telf1
it_ekko-ihrez
it_ekko-unsez
it_ekko-angnr
it_ekko-ihran
it_ekko-submi
it_ekko-loekz
end_of_record.
where all these fields except " end_of_record " are of character type and "data_file_i " is a character type structure as defined below:
DATA :
BEGIN OF data_file_i OCCURS 0,
record(1000),
END OF data_file_i,Type X is not allowed in Unicode. When a field is declared as Type X with Value u201809u2019 or any other value, it can be resolved by using classes.
Before Unicode
CONSTANTS: c_hex TYPE x VALUE '09'.
Resolution:
Itu2019s work for any value of x.
First a temporary field of Type c should declare. Following class will convert Type x variable into type c.
Example:
CONSTANTS: c_hex TYPE x VALUE '09'.
DATA: LV_TEMP TYPE STRING.
DATA: LV_TMP TYPE C.
TRY.
CALL METHOD CL_ABAP_CONV_IN_CE=>UCCP
EXPORTING
UCCP = c_hex
RECEIVING
CHAR = LV_TMP .
CATCH CX_SY_CONVERSION_CODEPAGE.
CATCH CX_PARAMETER_INVALID_TYPE.
CATCH CX_SY_CODEPAGE_CONVERTER_INIT.
ENDTRY.
CONCATENATE I_OUTPUT-BKTXT I_OUTPUT-BVORG
I_OUTPUT-BUDAT I_OUTPUT-MESSAGE INTO
SEPARATED BY LV_TMP.
I_BUFFER = LV_TEMP.
CLEAR LV_TEMP.
CLEAR LV_TMP.
OR
Note: It works only for type x value 09.
CLASS cl_abap_char_utilities DEFINITION LOAD.
CONSTANTS: c_hex TYPE c VALUE
abap_char_utilities=>HORIZONTAL_TAB. -
Needed some detailed explanation for following points -- In UNICODE
Hi all
The following rules apply for converting a structure into a single field and vice versa:
1. If a structure is purely character-type, it is treated like a C field during conversion.
2. If the single field is of type C, but only part of the structure is character-type, conversion is only possible if the structure begins with a character-type structure and if this structure is at least as long as the single field. Conversion now takes place between the first character-type group of the structure and the single field. If the structure is the target field, the character type sections of the remainder are filled with blanks, and all other components are filled with the type-adequate initial value.
3. Conversion is not permitted if the structure is not purely character-type and if the single field is not of type C.
hi anybody can provide an explanation with examples
Thanks in advance.The data layout of structures is relevant to UP checks with regard to the reliability of assignments and comparisons, for example. This data layout is represented in the Unicode fragment view. The fragment view breaks down the structure into alignment gaps, in byte and character-type areas, and all other types such as P, I, F, strings, references or internal tables.
Juxtaposed character-type components of a structure except strings are internally combined into a group if no alignment gaps exist between these components. All possible alignment requirements for characters are considered. Juxtaposed byte type components are grouped together in the same way.
Example
BEGIN OF struc,
a(2) TYPE C,
b(4) TYPE N,
c TYPE D,
d TYPE T,
e TYPE F,
f(2) TYPE X,
g(4) TYPE X,
h(8) TYPE C,
i(8) TYPE C,
END OF struc.
Fragment 1: a, b, c, d
Fragment 2: Alignment gap between d and e
Fragment 3: e
Fragment 4: f, g
Fragment 5: Alignment gap between g and h
Fragment 6: h, i -
My sender and the receiver message types structures are same.do I need to m
Hi all,
My sender and the receiver message types structures are same.do I need to mapping in this case.
If it is not required .Let me know in detail,How to proceed.
Thanks,
SrinivasaHi,
If is just to pass the message (as the sender source is the same as the receiver source),
first you should have the Message Interface of you message
then you should configure the Receiver determination, as the sender interface use your message interface and in the interface determination you can use the same message interface (same name). You dont have to add any mapping, just let empty and save. Just use one message interface for sender a receive.
Any questins let me know.
Regards,
Lpbuff -
How to convert strings into character type?
I have created a function module which will display the attributes of the fields of the structure/table by using "DESCRIBE FIELD" command. The problem is that it supports only character-type data objects and the program goes into dump
if the structure contain any string type.Please have a look at class CL_ABAP_DATADESCR. Using this instances of this class should provide all information needed...
Reward points, if reply is applicable -
Unicode - "DMBTR" must be a character-type field (data type C,N,D or T)
Greetings Experts!
I am trying to convert legacy code to Unicode for a current ERP6.0 reinstallation and have encountered the syntax error "DMBTR" must be a character-type field (data type C,N,D or T)
The field is part of a structure and the fields attributes are as follows:
COMPONENT = DMBTR
COMPONENT TYPE = DMBTR
DATA TYPE = CURR
LENGTH = 13
DECIMALS = 2
DESCRIPTION = Amount in Local Currency
The code in question is as follows:-
macro Move_Zoned.
Converts a numeric variable to zoned format and moves it to a
target variable.
DEFINE move_zoned.
&1 - source variable
&2 - Number of Decimal Places
&3 - 'To'
&4 - Target Variable.
write &1 to w_zoned no-grouping decimals &2.
condense w_zoned.
Remove the Decimal Points.
search w_zoned for '...'.
while sy-subrc = 0.
move sy-fdpos to w_to_point.
if w_to_point = 0.
w_to_point = 1.
endif.
compute w_from_point = sy-fdpos + 1.
concatenate w_zoned+0(w_to_point)
w_zoned+w_from_point
into w_zoned.
search w_zoned for '...'.
endwhile.
shift w_zoned right deleting trailing space.
translate w_zoned using ' 0'.
call function 'Z_TRANSLATE_ZONED_DECIMALS'
exporting
i_input = w_zoned
importing
i_output = w_zoned
exceptions
x_invalid_zoned_char = c_invalid_zoned_char
x_numeric_info_lost = c_numeric_info_lost
others = c_other_zoned_error.
Get the length of the recipient field so we don't truncate the
numbers....
describe field &4 length w_flength in character mode.
describe field &4 type w_type.
describe field w_zoned length w_zoned_len in character mode.
if w_zoned_len <= w_flength.
move w_zoned to &4.
shift &4 right deleting trailing space.
translate &4 using ' 0'.
else.
Get the start position....
If it's a packed field allow for values up to 6 figures
compute w_zoned_len = w_zoned_len - w_flength.
if w_type = 'P'.
subtract 2 from w_zoned_len.
clear w_type.
endif.
move w_zoned+w_zoned_len &3 &4.
endif.
END-OF-DEFINITION. "Move_zoned
LOOP AT t_single_kunnr.
move_zoned t_single_kunnr-postamt 2
to t_single_kunnr-dmbtr.
DIVIDE t_single_kunnr-dmbtr BY 100.
MODIFY t_single_kunnr.
ENDLOOP.
Is there a solution to get past this syntax error as I would rather not change the datatype of the field in the structure.
Much Obliged
Elphick.Type X is not allowed in Unicode. When a field is declared as Type X with Value u201809u2019 or any other value, it can be resolved by using classes.
Before Unicode
CONSTANTS: c_hex TYPE x VALUE '09'.
Resolution:
Itu2019s work for any value of x.
First a temporary field of Type c should declare. Following class will convert Type x variable into type c.
Example:
CONSTANTS: c_hex TYPE x VALUE '09'.
DATA: LV_TEMP TYPE STRING.
DATA: LV_TMP TYPE C.
TRY.
CALL METHOD CL_ABAP_CONV_IN_CE=>UCCP
EXPORTING
UCCP = c_hex
RECEIVING
CHAR = LV_TMP .
CATCH CX_SY_CONVERSION_CODEPAGE.
CATCH CX_PARAMETER_INVALID_TYPE.
CATCH CX_SY_CODEPAGE_CONVERTER_INIT.
ENDTRY.
CONCATENATE I_OUTPUT-BKTXT I_OUTPUT-BVORG
I_OUTPUT-BUDAT I_OUTPUT-MESSAGE INTO
SEPARATED BY LV_TMP.
I_BUFFER = LV_TEMP.
CLEAR LV_TEMP.
CLEAR LV_TMP.
OR
Note: It works only for type x value 09.
CLASS cl_abap_char_utilities DEFINITION LOAD.
CONSTANTS: c_hex TYPE c VALUE
abap_char_utilities=>HORIZONTAL_TAB. -
"An expression of non-boolean type specified in a context where a condition
I have below query and its respective result set "0 and NoofRows" in Execute SQL task
select count(*) from TEMP_InterfaceSAP_LoadFile
where (timeid = '20110100' and ([ENTITY_AFF] in (N'6050')))
When I run the task individually, there is no issue at all, but when I tried run it as whole, I'm getting below error.
"[Execute SQL Task] Error: Executing the query "select count(*) from TEMP_PM_InterfaceSAP_LoadFile..." failed with the following error: "An expression of non-boolean type specified in a context where a condition is expected, near ')'.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly."I have below query and its respective result set "0 and NoofRows" in Execute SQL task
select count(*) from TEMP_InterfaceSAP_LoadFile
where (timeid = '20110100' and (ENTITY_AFF in (N'6050')))
When I run the task individually, there is no issue at all, but when I tried run it as whole, I'm getting below error.
"Execute SQL Task Error: Executing the query "select count(*) from TEMP_PM_InterfaceSAP_LoadFile..." failed with the following error: "An expression of non-boolean type specified in a context where a condition is expected, near ')'.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly."
======================================================================
Hi Prabhu0505,
You may enclose the string with ' ' in SQL task if you use SQL command, then you need to adjust your delimeter to avoid wrong interepretation. I cannot say how you can fix the problem, but I remember there was more ' such as '''6050''' and so on, please find out correct SQL expression in an eclosed string.
This is one of thing I remember, I used ADO connection in SQL script task in SSIS and there were lots of SQL in command, the ' quatation is tricky one.
Regards,
YH Seo -
I am getting the error message, "An expression of non-boolean type specified in a context where a condition is expected, near ',' " when running an ssrs 2008 r2 report.
The sql embedded in the dataset is:
IF @reportID <> 0
BEGIN
SELECT 'Students report 1' AS selectRptName, 1 AS rptNumValue
UNION
SELECT 'Students report 2', 2
UNION
SELECT 'Students report 3', 3
UNION
SELECT 'Students report 4', 4
UNION
SELECT 'Students report 5', 5
ORDER BY selectRptName
END
The sql runs fine in managment studio when I declare @reportID.
The sql runs fine with I comment out 'IF @reportID <> 0'.
The @reportID is a parmeter value that is passed to the applicable dataset.
The @reportID can have more than one value.
Thus can you show me sql and/or tell me what I need to do to solve the issue for me?Hi wendy,
After testing the issue in my environment, I can reproduce it when I select more than one values in the @reportID parameter drop-down list. As per my understanding, it seems that you are trying to filter the dataset with the @reportID parameter. When it
doesn’t contain value ‘0’, the dataset returns values. Otherwise, no value is returned in the dataset.
If in this scenario, we can achieve this requirement with filters in the dataset. For more details, please refer to the following steps:
Modify the dataset with the below query:
SELECT 'Students report 1' AS selectRptName, 1 AS rptNumValue
UNION
SELECT 'Students report 2', 2
UNION
SELECT 'Students report 3', 3
UNION
SELECT 'Students report 4', 4
UNION
SELECT 'Students report 5', 5
ORDER BY selectRptName
Click the Filters in the left pane of Dataset Properties dialog box.
Add a filter as below:
Expression: =INSTR(JOIN(Parameters!reportID.Value,","),"0")>0
Type: Boolean
Operator: =
Value: false
The following screenshot is for your reference:
If there are any other questions, please feel free to ask.
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support -
Union of non-compatible types error in column formula in obiee
Hi Experts,
Error: Union of non-compatible types
I used Case function in my column formula and got above error as a result.
The column formula goes below:
IFNULL(CASE WHEN EDM_TRD_IR_LEG.LEG_ID=1 THEN (EDM_TRD_IR_LEG.PAY_RECV_IND) ELSE 0 END, 0)
LEGID is numeric type. PAY_RECV_IND is varchar type.
Please let me know how to resolve this error.
Thanks in Advance.
-Regards
Mayuri898221 wrote:
Hi Experts,
Error: Union of non-compatible types
I used Case function in my column formula and got above error as a result.
The column formula goes below:
IFNULL(CASE WHEN EDM_TRD_IR_LEG.LEG_ID=1 THEN (EDM_TRD_IR_LEG.PAY_RECV_IND) ELSE 0 END, 0)
LEGID is numeric type. PAY_RECV_IND is varchar type.
Please let me know how to resolve this error.
Thanks in Advance.
-Regards
Mayuri@dpka, you have syntax errors in your solution. If you're casting as varchar, then your syntax should read '1' instead of 1. Also at the end, it should be '0' instead of 0.
Mayuri,
To use your syntax, try this:
IFNULL(CASE WHEN EDM_TRD_IR_LEG.LEG_ID=1 THEN CAST(EDM_TRD_IR_LEG.PAY_RECV_IND AS INTEGER) ELSE 0 END, 0)
...if you need the result as a numeric for aggregation purposes... -
How to use Types structure in smartform layout
Hi Experts,
i have a requirement in smartforms. i have a z-structure having some fields. those fields
should be in the smartform output when we run the print program. This is working fine.
But i need to add 2 more fields to the existing z-structure. For this, i created a types
structure in the print program and added the 2 new fields and created internal tables from
that structure.
My question is how to pass this types strucure to the smartform layout. i tried to add the
structure in the tables option of the form interface.
I get the error "Form Interface - Only table types may be used as the reference type for a table parameter".
i also tried to declare the types structure. Please advise.Hi,
you create structure in se11 and select structure radio button.
In the smart form give like as
Form interface---->tables (tab)
parameter name ---I_FINAL(inernal table)
type assignment---LIKE
Associated type---ZXXXXX (structure name)
For declarations of workarea:
Global definitons----->Global data
Variable name----WA_FINAL
Type assignment---TYPE
Associated type---ZXXXXX
you declared as of above
I hope it will helpful you
Regards
Bhupal -
Function module to convert character type to required data type
Hi,
Is there a function module which can convert data in character type to any other required data type?
Like i have a date 12.2.2008 and it is stored as character now i want to convert it into type d.
so that when i use
Describe field <field_name> type <type>.
statement afterwards then it gives me D not C as its data type.
The requirement does'nt stick to conversion of just one data type.I need an FM which can convert data in character type to any data type.
Hope you understood the problem.
Thanks for your time.Hi,
Use the code.
data : date like sy-datum.
call function 'CONVERT_DATE_TO_INTERNAL'
exporting
date_external = '01.01.2008'
IMPORTING
DATE_INTERNAL = date
EXCEPTIONS
DATE_EXTERNAL_IS_INVALID = 1
OTHERS = 2
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,
Morris Bond.
Reward Points if Helpful. -
[nQSError: 22027] Union of non-compatible types
Hi Gurus,
I am trying to create a union report but i am getting an error as [nQSError: 22027] Union of non-compatible types. One of the column is Int Datatype and other column is Varchar. What do i need to do to change the datatype to resolve this issue
Really appreciate your help
RegardsHi,
In the report, you can use CAST( int_datatype_col as Char) for the int datatype column in the report.
Hope this helps.
Thanks
Chandu. -
Urgent related to message type structure and proxy
Hello,
My outbound interface related message type structure is like this....
message type name : MSg1
Msg1
x
y
Z
(under z)
a
b
c
ok,Now in generating the proxy how to populate this structure.
For example ...
if Msg type is emp_profile_msg
Emp_name
Empno
Department_name
we use this code
REPORT zblog_abap_proxy.
DATA prxy TYPE REF TO zblogco_proxy_interface_ob.
CREATE OBJECT prxy.
DATA it TYPE zblogemp_profile_msg.
TRY.
it-emp_profile_msg-emp_name = 'Sravya'.
it-emp_profile_msg-empno = '80101'.
it-emp_profile_msg-DEPARTMENT_NAME = 'NetWeaver'.
CALL METHOD prxy->execute_asynchronous
EXPORTING
output = it.
commit work
CATCH cx_ai_system_fault .
DATA fault TYPE REF TO cx_ai_system_fault .
CREATE OBJECT fault.
WRITE :/ fault->errortext.
ENDTRY.
if message type consists structure inside strucutre ..then how to populate those sructureHi Sunil,
Please don't mind, but I think I already have posted the answer for this query and have provided some links
Please see the below mail.
urgent related to Mesage types and proxy
Please let me know if you need anything else than the given info.
I have one sample program where we have deal with these kind of sub-sturctures
Thanks
Swarup -
Character type to currency type conversion
hi all,
i need to transfer the character type data to the currency type data.
my requirement is when i am trying to transfer the data from excel i need to store it as a character. again i need to change the same as currency. any pointers will be highly appriciated.
thanks.Hi use the belwo function module and first move the currecy field to character..and inthe out put table decclare field as character 20 ..and download the field..
hope will works..
Amount to string:
CALL FUNCTION 'HRCM_AMOUNT_TO_STRING_CONVERT'
EXPORTING
betrg = w_curerency "currency field
WAERS = 'DKK'
IMPORTING
STRING = slam . "Output table field type char20
String to amount:
CALL FUNCTION 'HRCM_STRING_TO_AMOUNT_CONVERT'
EXPORTING
string = slam2 "character field
DECIMAL_SEPARATOR = '.'
THOUSANDS_SEPARATOR =
WAERS = 'HUF'
IMPORTING
BETRG = b2 . "converting into currency field
Prabhudas
Maybe you are looking for
-
Iphone 4 won't turn on! Help Please!
my iphone4 suddenly turned off, now it won't turn on. connected it to itunes on laptop. tried to restore it but still stuck with "Waiting for iPhone" and an apple logo with a blank progress bar. Help please!
-
J4580 , windows xp, won't print manually,
You didn't answer my question. Please address my particular problem.... i can print from document but it won't print manually....the scanner seems to be working but the paper loads and then it sounds like it is printing but it doesn't print...i have
-
Dear Experts, I need a clarification How does Process message work in PP PI sheet See as i know control recipe is created when process order is released For setting point of control recipe destination and instruction category is assigned in Ma
-
Does NVACHAR2 store UTF16 in UTF8 database?
Our database was created with AL32UTF8 as the character set. The national character set is AL16UTF16. Does this mean that all of our varchar2's are stored as UTF8 but if we have a data type of nvarchar2 it will be stored as UTF16? I probably mean, wo
-
Roadmap structure not visible - Urgent help pls...
Hello All, I tried creating a custom roadmap with my own folder structure. I created it as all subfolders. Once I am done with creation, I tried with RMMAIN transaction to view the same. But unfortunately I am not able to see the structure created by