‎2007 Nov 03 12:30 PM
Hi experts,
i am encountering a problem while doing the remediation of a program it shows error in runtime
Abend on testing:
UC_OBJECTS_NOT_CHARLIKE
106 START-OF-SELECTION.
107 PERFORM SELECT.
108
109 LOOP AT OUTREC.
>>>> TRANSFER OUTREC TO FILE.
111 ENDLOOP.
in runtime its show Error analysis
For the statement
"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 "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.
HERE OUTREC IS A INTERNAL TABLE DATA: BEGIN OF OUTREC OCCURS 0,
BUKRS LIKE VBRK-BUKRS, " company code (4)
FKSTO LIKE VBRK-FKSTO, " billing document cancelled? if 'X'
FKART LIKE VBRK-FKART, " billing document type (4)
VBELN LIKE VBRK-VBELN, " billing document number (10)
POSNR LIKE VBRP-POSNR, " billing document line number (6)
WAERK LIKE VBRK-WAERK, " currency (5)
KURRF LIKE VBRK-KURRF, " financial exchange rate (12)
FKDAT LIKE VBRK-FKDAT, " billing date (8)
BELNR LIKE VBRK-BELNR, " accounting document (10)
GJAHR LIKE VBRK-GJAHR, " fiscal year (4)
POPER LIKE VBRK-POPER, " posting period (3)
VKORG LIKE VBRK-VKORG, " SALES ORGANISATION (4)
TAXK1 LIKE VBRK-TAXK1, " customer tax classification (1)
KUNAG LIKE VBRK-KUNAG, " ordering party customer number (10)
LAND1 LIKE VBRK-LAND1, " country key of invoice recipien (3)
LANDTX LIKE VBRK-LANDTX, " country code for tax determinat (3)
FBUDA LIKE VBRP-FBUDA, " date services rendered (8)
MATNR LIKE VBRP-MATNR, " material number
TAXM1 LIKE VBRP-TAXM1, " material tax classification (1)
NETWR(16), " net value in billing currency (16)
MWSBP(14), " VAT value in billing currency (14)
MRKER(1) TYPE C, " end of record marker
END OF OUTREC.
and file is
parameters: file(50) default ' ' lower case,
i have tried it by useing class
CALL METHOD CL_ABAP_CONTAINER_UTILITIES=>FILL_CONTAINER_C
EXPORTING
IM_VALUE = OUTREC
*
IMPORTING
EX_CONTAINER = V_FILE
EXCEPTIONS
ILLEGAL_PARAMETER_TYPE = 1
others = 2
but not succeded . if any body can explain me how to resolve this problem then please tell me immidiately.
Thanks
‎2007 Nov 03 7:51 PM
Hi there,
I cannot exactly what to change but I can give you some way.
The issue here is that there is field in your Internal table which is of type 'X' (hexadecimal).
In unicode this kind of field cannot be transfered.
What can be done?
You have to find which field is that which is of TYPE 'X'.
Then change that field from TYPE 'X' to 'C'. If this is not possible then create a workarea similar to this internal table but with that field as type 'C' and do a manual move
like :
MOVE OUTREC-<field1> to WA_OUTREC-<field1> "Here OUTREC-<field1> is TYPE 'X' but WA_OUTREC-<field1> is type 'C'.
Now use this WA_OUTREC(Workarea) in TRANSFER statement.
This should work.
Regards
Nishant
‎2007 Nov 03 10:48 PM
Hello Pankaj
How did you open the dataset? In TEXT MODE or in BINARY MODE?
Perhaps it works if you are using BINARY MODE.
Regards
Uwe
‎2007 Nov 05 5:38 AM
Hi,
in text mode i am opening it while i am changeing it to binary mode its not showing error . in debugging the data is passing but while trying to execute it with help of variant, nothing comes out.its showing its exexcuteing but no output comes out. thts why i am little bit confused.
Thanks & Regards
Pankaj
‎2007 Nov 03 11:24 PM
Hi,
If you have unicode system and want to save data to file with non-unicode format you should use LEGACY MODE in OPEN DATASET command.
For example:
OPEN DATASET FILENAME IN LEGACY BINARY MODE CODE PAGE '1401' FOR OUTPUT.
Krzys
‎2007 Nov 05 5:39 AM
Hi,
in text mode i am opening it while i am changeing it to binary mode its not showing error . in debugging the data is passing but while trying to execute it with help of variant, nothing comes out.its showing its exexcuteing but no output comes out. thts why i am little bit confused.
Thanks & Regards
Pankaj