Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Issue on Write data to application server file

former_member392866
Active Participant
0 Likes
1,755

Hi Experts,

We are writing data from Internal table to application server file(.xls).

fields we are transferring is   :  MATNR and sale text .

Problem is materials having sales text with multiple languages.

For English we can able to write successfully bus we have Russian language text also for few materials .

we can't able to transfer Russian language text. In internal table we are seeing proper Russian language text. while transferring data changing with some garbage value.

Could you please provide your inputs for resolve the same .

Thanks,

Balaji.

10 REPLIES 10
Read only

former_member202771
Contributor
0 Likes
1,629

Hi Balaji,

Try : "OPEN DATASET g_filename FOR OUTPUT IN   LEGACY TEXT MODE CODE PAGE '4110'  IGNORING CONVERSION ERRORS."

Thanks,

Anil

Read only

0 Likes
1,629

Hi Anil,

Thanks for your quick turn around . Getting dump while executing OPEN DATASET  with Legacy. below screen shot FYI..

Thanks,

Balaji.

Read only

0 Likes
1,629

Hi Balaji,

Can you type the open dataset statement which you were using before?

Thanks,

Anil

Read only

0 Likes
1,629

Hi Anil,

OPEN DATASET l_aname FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.

       IF sy-subrc NE 0.

*        MESSAGE e208(00) WITH text-027.

       ELSE.

         DATA : lv_string_ap TYPE string,

                rec_len      TYPE i VALUE 119.

         LOOP AT t_product_f INTO wa_product.

           CONCATENATE wa_product-matnr wa_product-desc100

           INTO lv_string_ap SEPARATED BY cl_abap_char_utilities=>horizontal_tab.

           TRANSFER lv_string_ap TO l_aname.

           CLEAR : wa_product,lv_string_ap.

         ENDLOOP.

         CLOSE DATASET l_aname.



-> in the above code wa_product-desc100   contains Russian language text . work area having correct value , but while transferring to Application server path then its corrupting.


Thanks,

Balaji.

Read only

0 Likes
1,629

Hi Balaji,

for

ENCODING DEFAULT

try

ENCODING UTF-8

and

ENCODING UTF-8 WITH BYTE-ORDER MARK

Regards,

Klaus

Read only

0 Likes
1,629

Hi Balaji,

Try,

OPEN DATASET ... IN LEGACY BINARY MODE

OPEN DATASET ............... IGNORING CONVERSION ERRORS

open dataset for output in binary mode non-unicode

OPEN DATASET gv_file FOR INPUT IN TEXT MODE ENCODING NON-UNICODE

                            WITH SMART LINEFEED.

OPEN DATASET gv_file FOR INPUT IN UTF-8


and other options.


Thanks,

Anil

Read only

0 Likes
1,629

Hi Klaus,

ENCODING UTF-8   ->>   Not working


and

ENCODING UTF-8 WITH BYTE-ORDER MARK   ->> Working but  all columns merging (i.e  Material no. and sales text are downloading into A column instead of material in A column and Sales text in B column)

Could you please provide any alternative methods to resolve the same .


Thanks,

Balaji.

Read only

0 Likes
1,629

Hi Anil,

OPEN DATASET ... IN LEGACY BINARY MODE ->> Going to Dump

OPEN DATASET ............... IGNORING CONVERSION ERRORS  ->> Not working

Is there any alternate methods to resolve the same ??

Thanks,

Balaji.

Read only

Former Member
0 Likes
1,629

Hi Balaji,

I would suggest send data to unix in two steps.

1. Send only data with english Text.

2. For RU language use page code 1500.

You can give an option of page code on selection screen and use this page code in your open dataset statement.

Otherwise you can try for both text using page code 1100. This will donwlaod EN as well as RU text.

Regards,

Pravin


Read only

Former Member
0 Likes
1,629

Hi,

Check with the option smart line feed in addition to Open dataset.

OPEN DATASET gv_file FOR INPUT IN TEXT MODE ENCODING DEFAULT

                            WITH SMART LINEFEED.

Regards,

Mallikarjuna