‎2005 Aug 24 12:02 PM
Hi,
I have declared the following data.
CONSTANTS: con_cret TYPE x VALUE '0D',
con_tab TYPE x VALUE '09'.
when checking the programs for syntax errors i got the following error,
"con_tab" must be a character-type data object (data type C, N, D, T os String).field string).
Pls help me in rectifing this
‎2005 Aug 24 3:26 PM
hi,
u can remove this error by unchecking the unicode check active in attributes ( goto -> attributes ) .
‎2005 Aug 24 12:06 PM
Hi,
What are you using <b>con_tab</b> for ?
The declaration seems to be OK.
Svetlin
‎2005 Aug 24 12:44 PM
I am using con_tab in the following code,
LOOP AT itab1 INTO wa_tab.
CONCATENATE wa_tab-field1 wa_tab-field2
... wa_tab-fieldn
INTO itab2 SEPARATED BY con_tab.
CONCATENATE con_ret itab2INTO itab2.
APPEND itab2.
ENDLOOP.
‎2005 Aug 24 12:47 PM
Hi,
If you are on greater than 4.6C version, you should use
CL_ABAP_CHAR_UTILITIES static parameters, intead of hex values.
CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB
P.S. If you find some answers useful, please assign reward points.
Svetlin
Message was edited by: Svetlin Rusev
‎2005 Aug 24 1:23 PM
HI ARUL,
BINGO!!! HERE IS THE SOLUTION.
First of all the error is not in the declaration part. The error is in this line.
<b>CONCATENATE wa_tab-field1 wa_tab-field2
... wa_tab-fieldn
INTO itab2 SEPARATED BY con_tab.</b>
Remember you can't use string operators like concatenate with TYPE X.
So change the declaration of con_tab as C and then try.
Else, have another variable declared as
DATA: con_tab1 type c.
Move the character value of the X type con_tab to con_tab1.
and then use the statement,
<b>CONCATENATE wa_tab-field1 wa_tab-field2
... wa_tab-fieldn
INTO itab2 SEPARATED BY CON_TAB1.</b>
Cheers,
Sam
‎2005 Aug 24 1:23 PM
Perhaps the problem is the CONCATENATE... from help:
..., you can only use character-type operands here
‎2005 Aug 24 1:37 PM
hi,
How to reward points. I am new to this forum. Pls bear with me
‎2005 Aug 24 1:42 PM
‎2005 Aug 24 1:52 PM
not against your name (post)
click on the radio button in the post which solved your issue.
you can also reward other posts within the same thread with helpful or very helpful
Regards
Raja
‎2005 Aug 24 1:57 PM
Hi,
If any reply has helped you solve the problem, you can scroll to those replies and choose the radio buttons on the left (any 1) and award points as to how helpful was the answer. (also remember <b> not to check the option solved on my own</b> in such cases )
Also, please lemme know if my answer helped you and if so reward points for the same.
Cheers,
Sam.
‎2005 Aug 24 2:15 PM
I think that everyone should aware of this.
https://www.sdn.sap.com/sdn/index.sdn?page=crp_help.htm.
Svetlin
‎2005 Aug 24 2:21 PM
i used to direct people to this weblog by mark
/people/mark.finnern/blog/2004/08/10/spread-the-love
Regards
Raja
‎2005 Aug 24 12:08 PM
‎2005 Aug 24 12:11 PM
I'm working on 4.6C and not obtain your syntax error.
So (for my release) your data declaration is ok.
Which is your release?
‎2005 Aug 24 12:15 PM
Could you be specific where you used it as it does not give any error for us.
Karthik
‎2005 Aug 24 12:28 PM
‎2005 Aug 24 3:26 PM
hi,
u can remove this error by unchecking the unicode check active in attributes ( goto -> attributes ) .