Convert_otf in unicode system
Hello,
we have switched a CRM4.0 system from non-unicode to unicode. In this context we became two problems with the result of the function module 'CONVERT_OTF'. We call the function Module following:
call function 'CONVERT_OTF'
exporting
format = 'PDF'
max_linewidth = 132
copynumber = 0
importing
bin_filesize = lv_bin_filesizepdf
tables
otf = it_otfdata
lines = lt_lines_pdf
the otf tabel is generated by a Smartform.
Noticeable is, that the pdf table in the unicode system has similarly only the half quantity of rows than in the non-unicode system. (The parameter FLATE_COMPR_OFF in Report RSTXPDF3 allways is on)
1. Problem
We send the pdf table (lt_lines_pdf) via RFC to a non-unicode R/3 system and save it there on the file system. After switching to unicode, the document in the RFC system is damaged an cannot processed.
2. Problem
We transform the lt_lines_pdf for an archive in the following way.
data: ls_data type char1024
, lv_134 type char134
, ls_lines type tline
, lt_data type standard table of tbl1024
field-symbols: <fs> type tbl1024.
assign ls_data to <fs> casting.
lv_count = 0.
loop at lt_lines_pdf into ls_lines.
lv_134 = ls_lines.
lv_offset = lv_count.
lv_count = lv_count + 134.
if lv_count < 1024.
ls_data+lv_offset(134) = lv_134.
else.
lv_count = lv_count - 1024.
lv_begin = 134 - lv_count.
ls_data+lv_offset(lv_begin) = lv_134(lv_begin).
append <fs> to lt_data.
clear ls_data.
if lv_count > 0.
ls_data = lv_134+lv_begin(*).
endif.
endif.
endloop.
if ls_data is not initial.
append <fs> to lt_data.
endif.
We need lt_data for the FM 'SCMS_AO_TABLE_CREATE'.
I hope anybody can help me, I invest already much time in this problem!
Hi,
CONVERT_OTF packs two byte into one character of i-tab LINES on unicode systems. If you pass this via RFC to non-unicode systems data ist lost. The table contents are bytes when if the data type is character. The conversion routines between unicode and non-unicode do not know about this.
However the function module contains an export paramter BIN_FILE. This parameter is of type XSTRING, which has always a byte-representation. This datatype will not be converted between RFC-calls.
Greetings
Similar Messages
-
Create PDF with CONVERT_OTF in Unicode system
Hi,
I try to create a PDF file from OTF input with function module CONVERT_OTF.
It worked in a non-unicode environment with problems.
If I use the same coding in a unicode system (6.0) and OTF input
contains real doublebyte unicode characters like arabian/greek characters,
the PDF file shows wrong characters like "ÔÑÙàÜÐÕÞÙ Ôâé" instead of
"רבדל הצור %לועה" or "ЉЊЋЌЎЏАБВГόψχΩΨΧ".
I enable the developer trace for CONVERT_OTF, but the trace also
shows the correct unicode characters.
If I create a PDF file with PDF Creater with the same input on my computer,
PDF file looks fine. SAP PDF file uses Font enconding 'Windows', PDF Creator
uses a 'Custom' font encoding.
Any idea, that's going wrong here?
I install TrueType fonts like described in SAP note 999712 with no success,
but this note refers to SAP_BASIS 011, which is not yet available on SAP Marketplace
(latest is 010 today).
Is there any other configuration to enable PDF unicode support?
Print preview from other SAP transactions looks fine with unicode characters.
thanks for help
/Tibor>
Juraj Danko wrote:
> Hi,
> I have similar problem than you ... how have you solved it?
> thanks
> Juraj
I found a solution, but I am not sure, if it was for this problem or
output problem with for example PL in non-unicode systems.
I created the input for CONVERT_OTF with CALL FUNCTION 'PRINT_TEXT'.
PRINT_TEXT has to be called with DEVICE = 'PRINTER',
DEVICE = 'ABAP' uses internally the wrong code page.
You have also to set otf_options-tdprinter to a valid printer,
if it is empty, the default printer from user settings is used.
You can use code example from SAP note 413295.
Before you call CONVERT_OTF, you can also check entries with 'FC' in OTF input.
The font (see description of OTF format in SAP help) must be set like described in SAP note 144718.
/Tibor
Edited by: Tibor Gerke on Jan 13, 2011 10:29 AM -
PDF conversion for chineese characters in Unicode system
I am facing a problem while converting the SAP Script Output to PDF format for Chinese characters.
I am working on ECC (5.0) Unicode system.
Scenario:
After saving a Purchase Order an E-mail is sent to the customer - attaching the
PO output in PDF format. E-mail was received successfully by the receiver, but while opening the pdf all the chinese characters were displayed in junk characters in the pdf. All the English characters are properly displayed. I tried to open the pdf file in Acrobat Reader versions 6.0, 7.0, 8.0. but no result. I used CONVERT_OTF function module for converting the OTF format to PDF format. I tried using the fonts CNSONG also.
I tried by executing the standard program RSTXPDFT4 for converting to PDF by giving the spool. In the spool it is showing the Chinese characters perfectly but in the PDF the Chinese characters were were showing as Junk.
Can you please help and advice to see the Chinese characters in PDF in Unicode systems.
Thanks in advance.>
Juraj Danko wrote:
> Hi,
> I have similar problem than you ... how have you solved it?
> thanks
> Juraj
I found a solution, but I am not sure, if it was for this problem or
output problem with for example PL in non-unicode systems.
I created the input for CONVERT_OTF with CALL FUNCTION 'PRINT_TEXT'.
PRINT_TEXT has to be called with DEVICE = 'PRINTER',
DEVICE = 'ABAP' uses internally the wrong code page.
You have also to set otf_options-tdprinter to a valid printer,
if it is empty, the default printer from user settings is used.
You can use code example from SAP note 413295.
Before you call CONVERT_OTF, you can also check entries with 'FC' in OTF input.
The font (see description of OTF format in SAP help) must be set like described in SAP note 144718.
/Tibor
Edited by: Tibor Gerke on Jan 13, 2011 10:29 AM -
Errors in PDF converter for Unicode systems
Hello experts,
I have some problems with the PDF conversion in a Unicode system.
I have to convert a smartform to PDF using CONVERT_OTF. I have implemented SAP notes 812821 and 999712.
The problem is that the special characters(diacritics, language specific characters) are overlapped in the generated PDF document. Does anyone knows what is the problem? I don't know what to do anymore...Hi,
Try Below code
*& Report ZTEST_NREDDY1
REPORT ztest_nreddy1 NO STANDARD PAGE HEADING.
DATA: it_otf TYPE STANDARD TABLE OF itcoo,
it_docs TYPE STANDARD TABLE OF docs,
it_lines TYPE STANDARD TABLE OF tline,
st_job_output_info TYPE ssfcrescl,
st_document_output_info TYPE ssfcrespd,
st_job_output_options TYPE ssfcresop,
st_output_options TYPE ssfcompop,
st_control_parameters TYPE ssfctrlop,
v_len_in TYPE so_obj_len,
v_language TYPE sflangu VALUE 'E',
v_e_devtype TYPE rspoptype,
v_bin_filesize TYPE i,
v_name TYPE string,
v_path TYPE string,
v_fullpath TYPE string,
v_filter TYPE string,
v_uact TYPE i,
v_guiobj TYPE REF TO cl_gui_frontend_services,
v_filename TYPE string,
v_fm_name TYPE rs38l_fnam.
CONSTANTS c_formname TYPE tdsfname VALUE 'ZTEST'.
CALL FUNCTION 'SSF_GET_DEVICE_TYPE'
EXPORTING
i_language = v_language
i_application = 'SAPDEFAULT'
IMPORTING
e_devtype = v_e_devtype.
st_output_options-tdprinter = v_e_devtype.
*st_output_options-tdprinter = 'locl'.
st_control_parameters-no_dialog = 'X'.
st_control_parameters-getotf = 'X'.
.................GET SMARTFORM FUNCTION MODULE NAME.................
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = c_formname
IMPORTING
fm_name = v_fm_name
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
...........................CALL SMARTFORM............................
CALL FUNCTION v_fm_name
EXPORTING
control_parameters = st_control_parameters
output_options = st_output_options
IMPORTING
document_output_info = st_document_output_info
job_output_info = st_job_output_info
job_output_options = st_job_output_options
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ELSE.
.........................CONVERT TO OTF TO PDF.......................
CALL FUNCTION 'CONVERT_OTF_2_PDF'
IMPORTING
bin_filesize = v_bin_filesize
TABLES
otf = st_job_output_info-otfdata
doctab_archive = it_docs
lines = it_lines
EXCEPTIONS
err_conv_not_possible = 1
err_otf_mc_noendmarker = 2
OTHERS = 3.
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
jana -
Error during Upgradation SCM 5.0 to SCM 5.1 Non-Unicode System
Hi,
I am Upgrading SCM 5.0 Non-Unicode System to SCM 5.1 Non-unicode on Windows 2003 Server with MSS 2005 DB. During the initial PREPARE (EXTRACTKRN_PRE) phase I am getting an error like
init
2010/06/15 07:03:45 PREPARE: START OF PHASE EXTRACTKRN_PRE
ERROR: Cannot find file 'C:\SCM_2007_Upgrade_Media\51033508_8\NW_7.0_SR3_Kernel_WINDOWS__LNX_X86\KN_WINDOWS_X86_64_AUPG
KERNEL.TOC'
SEVERE ERROR(S) OCCURRED IN EXTRACTKRN_PRE !!!
The file name it is looking for does not exist in any of the Kernel versions I have checked. If I try to skip this step it is asking for the PASSWORD. How can I get this password? (only from SAP Support or any note?).
What is the Solution for the above ERROR. Please help.
Thanks,
Ajay.> I am not posting the question in the same group. I am posting in different groups due the confusion of in which group to post > > and of course to get faster response. All people cant check all the groups to answer. Moreover I am not keeping the questions > open. As soon as I get the answer I am proving the answer in every group and immediately closing the question.
> So what is the problem with that? I do not think this is creating any inconvenience to any one, just increasing the number of questions in the group.
This is not wanted as written in the "Rules of engagement". This is a public forum, not a "help desk".
> OK, As you said If I post only in a single group do you guarantee that you will check every time all the groups to answer my question/ find my question?
Again, this is a forum where the question are answered on a volunteered basis. "Demanding" help is not the way to go, you can ask for help but there's no guarantee that you'll get an answer. If you urgently need help use the official support channels or get yourself a consultant on-site who can answer all your question instantly.
> And please paste the URL of those rules that this is wrong. Since I didnt read that.
It's the first entry in every forum, it contains the "Rules of Engagement" which say:
Please do not Cross post.
Post your question in the most appropriate forum; not multiple forums. This is bad netiquette and will might only aggravate potential repliers.
Just imagine if everyone like you would paste questions in several forums.
Markus
Edited by: Markus Doehr on Jun 15, 2010 5:29 PM
Edited by: Markus Doehr on Jun 15, 2010 5:30 PM -
Unable to Open unix file in UNICODE system which created NON-UNICODE system
Unable to Open unix file in UNICODE system which created in NON-UNICODE system
We have two SAP systems both are ECC6.0 but System 1 is NON-Unicode and System2 is Unicode system.
There is a common unix directory/folder for both system.
Our requirement is to create one file on unix common folder and write the data to file from system1 .
In system2 open the same file for appending mode to write the data .
The file in system 1 created with below sentence.
OPEN DATASET g_unix_file FOR OUTPUT IN TEXT MODE ENCODING UTF-8.
Now I have to append the data from system 2 to same file.
I have tried to used below statement in system 2 to open the file but sy-subrc value comes as '8'.
1> OPEN DATASET g_unix_file FOR APPENDING IN TEXT MODE ENCODING UTF-8.
2>OPEN DATASET g_unix_file FOR APPENDING IN legacy TEXT MODE CODE PAGE
cdp IGNORING CONVERSION ERRORS .
3>OPEN DATASET g_unix_file FOR APPENDING IN TEXT MODE ENCODING Default.
4>OPEN DATASET g_unix_file FOR APPENDING IN TEXT MODE ENCODING NON-UNICODE.
Tried out all the possibilities as per F1 help given for open dataset , but still there is problem with opn file in appending as well output mode.However the file successfully open in Input mode(Read).
Please advice suggestion to resolve this issue.
Thanks.Messgae captured as 'Permission Denied". The program gets triggered with system user Id PPID.
How to check the security access of the User ID. -
In unicode system: Express document" update was terminated
Hi Friends,
When we create a PO / Delivery / Sales / Billing documents in UNICODE Systems
we are getting message
"Express document" update was terminated"
this is coming before we save the transaction. Could any body help on this .Hi,
Express error due to many reasons,
1. If any Sap scripts/forms using then is that unicode compliant? check if any errors
2. Verify the SAP Notes for that service pack, as there might be some bugs in the system
3. Verify the problem might due to user exists or BADIs.
Regards,
Raveendra -
Client Copy between unicode system and non-unicode system
Hello,
we have to build up a new system for japan. It is planned to install a new 4.7Ext200 unicode system and then make a client copy from a non-unicode 4.7Ext200 (language= german, english) system to the unicode system. I don't think that this is possible way, but I can't find information regarding client copies from non-unicode to unicode. I would advice the project to convert the existing non-unicode system to unicode, make a system copy for the new system and then install japan languages. Any information, which can help me.
Regards,
AlexanderHi,
without conversion client copy is not possible
look at following
Re: Client copy between unicode and Non-unicode
regards,
kaushal -
GUI_DOWNLOAD problem in unicode system
Hi Guru's,
I am facing one prolem in gui_download. we are doing unicode remediation in one report. In the program one internal table declared as of type c with length 255 and data filled into the internal table by importing the data ifrom cluster. After that this internal table used by ws_download function moduel with file type as BIN to download it in word doc file. We replaced the function module with gui_download. It is working fine in non-unicode system but it is not downloading properly in the unicode system.
i am unable to find what is the cause.. I tried with different different codepages giving in run time..it is not solving my problem.
<< Moderator message - Everyone's problem is important. Please do not ask for help quickly. >>
Thanks & Regards,
Sastry R
Edited by: Rob Burbank on Dec 13, 2010 9:39 AMHi Clemens.
I replaced the ws_download function module with gui_download.
here is my code
Earlier before 6.0 code as follows
CALL FUNCTION 'WS_DOWNLOAD'
EXPORTING
bin_filesize = data_len
filename = p_file
filetype = 'BIN'
TABLES
data_tab = data_tab
EXCEPTIONS
file_open_error = 1
file_write_error = 2
invalid_filesize = 3
invalid_table_width = 4
invalid_type = 5
no_batch = 6
unknown_error = 7
gui_refuse_filetransfer = 8
OTHERS = 9.
IF sy-subrc <> 0 AND no_error_dlg = space.
MESSAGE i002(sy) WITH text-i03. "FILE OPEN ERROR
ENDIF.
Replaced above with following code
DATA:lv_fname TYPE string,
lv_ftype(10) VALUE 'BIN',
lv_codepage type abap_encod VALUE '4102'.
CALL METHOD cl_gui_frontend_services=>gui_download
EXPORTING
bin_filesize = data_len
filename = lv_fname
filetype = lv_ftype
codepage = lv_codepage
CHANGING
data_tab = data_tab
EXCEPTIONS
file_write_error = 1
no_batch = 2
gui_refuse_filetransfer = 3
invalid_type = 4
no_authority = 5
unknown_error = 6
header_not_allowed = 7
separator_not_allowed = 8
filesize_not_allowed = 9
header_too_long = 10
dp_error_create = 11
dp_error_send = 12
dp_error_write = 13
unknown_dp_error = 14
access_denied = 15
dp_out_of_memory = 16
disk_full = 17
dp_timeout = 18
file_not_found = 19
dataprovider_exception = 20
control_flush_error = 21
not_supported_by_gui = 22
error_no_gui = 23
OTHERS = 24.
IF sy-subrc <> 0 AND no_error_dlg = space.
MESSAGE i002(sy) WITH text-i03. "FILE OPEN ERROR
ENDIF.
I tried with all othr code pages also like 4110/4103/1110/1100/1102. It is not working,
It is giving problem in unicode system. File is downloading.but not properly..
and when i am opening the word file it is asking me select encoding type to make document readble along with the available text encoding formats.
Please help me..
Thanks & Regards,
Sastry R -
GUI_DOWNLOAD problems with CR+LF when transfering from unicode system
Hi,
I was successfuly used FM GUI_DOWNLOAD in a non-unicode systems for years. Lately I faced a challenge to rewrite my code for a unicode system. The configuration is:
- SAP R/3 unicode system;
- data to be downloaded at presentation server in a non-unicode codepage (cp 9504).
I have successfuly used a GUI_DOWNLOAD-parameter CODEPAGE and the data is translated correctly when checking local file, but due to some reasons CRLF are replaced with '#' (which is default value of REPLACEMENT parameter of this function) - means at the end of each row as a result I have '##' instead of CRLF.
My question is: how can I force correct behaviour of GUI_DOWNLOAD in order to get my output file at presentation server with CR+LF?
Any help would be highly appreciated.
Many thanks in advance.
Regards,
Ivaylo Mutafchiev
SAP/ABAP consultant
VBS Ltd.
P.S. In order to find some other way to fix my problem I'm still playing with the instanciation of a CL_ABAP_CONV_OBJ and its methods create & convert, but without success for now - resulted strings are not as expected.Hi,
in fact, I never placed CRLF in my lines before your suggestion. The rest was done by the FM 'GUI_DOWNLOAD'. It works fine even when I use unicode file as output - means I got my CRLF at the end of the record in MY OUTPUT FILE ONLY but not in my internal table - I never placed CR+LF in there.
The problem occures when I tried to use GUI_DOWNLOAD with parameter CODEPAGE = '9504' (some non-unicode codepage), and the original data (my internal table) is in unicode. Then (in my opinion) this function doesn't translate the unicoded CR+LF into non-unicode ones (if thats possible at all, I can't be sure) and the result is '##' in the output file.
I checked the value of CL_ABAP_CHAR_UTILITIES=>CR_LF by getting it in my variable - and it is '##'.
Whet should I put into this class-attribute in order to get it working in this scenario? I have no idea...
The attribute type is ABAP_CR_LF - which is char 2.
What next?
Thanks,
Ivaylo -
Export / Import to memory Id 2 . ( Unicode System)
hi all ,
we get unicode syntax error for the statement
EXPORT d1200 TO MEMORY ID 2.
Error discription is -
2 must be a character-type field (data type C, N, D, or T) . "INTERFACE".
We get similar error in import statement as well.
Please refer this code ..........
DATA: BEGIN OF d1200,
form LIKE mard-matnr,
formbez LIKE makt-maktx,
labst(10),
zeichnr LIKE drad-doknr,
zeichnr1 LIKE drad-doknr,
produktion_brutto(08) TYPE p, " (16) type c
reparatur(08) TYPE p,
zaehlerstand(16),
maxprod(08) TYPE p,
kapazitaet(06) TYPE p DECIMALS 2,
hoehe(07),
gewicht(07),
netto-gesamt(07) TYPE p,
ausschuss-gesamt(07) TYPE p,
brutto-gesamt(07) TYPE p,
restmenge(07) TYPE p,
*mico20000430
*notwendig für korrekte Anzeige in Druckliste
restmenge(08) TYPE p,
datenuebernahme(16),
menge(08) TYPE p decimals 0 ,
maxprod2(08) TYPE p decimals 0,
umwertung(08) TYPE p decimals 0,
ohnefa(08) TYPE p decimals 0,
charge like mchb-charg,
fhmnr LIKE mara-matnr,
END OF d1200.
EXPORT d1200 TO MEMORY ID 2.Unicode systems have a problem in that you can't define stuff as type X. Structures also have to be properly "bounded". You can also no longer rely on code such as field1+7(9) .
You could define your structure as a STRING and delimit the fields with say a tab symbol ( use the attribute in cl_abap_utilities to get the tab char in a unicode system).
export the string to memory.
on the import end use the SPLIT command on the string to re-create your data elements.
You will then have to manage the decimal arithmetic yourself.
It's a pain - but that's largely the point of Unicode --everything is treated as TYPE C.
Structures containing anything other than type C data are also a real problem if you want to upload / download data. Handling Binary files is a nightmare.
There are some SAP supplied utilities / notes / documentations on converting to a Unicode system.
Cheers
jimbo -
Problem with Mail-Attachments in an Unicode-Systems
Hi everybody,
we have a problem mailing a attachment by using the class CL_DOCUMENT_BCS in a Unicode system, WAS 7.0
We attach a textfile using the method
CALL METHOD lr_document->add_attachment
EXPORTING
i_attachment_type = lv_extension
i_attachment_subject = lv_dateiname
i_att_content_text = oti_object.
The mail should have a TXT-file in ASCII.
With NOTEPAD, the attachment looks fine.
However with WORDPAD and other applications, all german characters are two bytes, so it seems to be in a UTF-8 format.
Is it possible to say the class, that the attachment should be ASCII?
Regards,
StefanHi,
Try to use
try.
a_sofm_document = cl_document_bcs=>create_from_text(
i_text = text
i_subject = subject ).
catch cx_bcs into bcs_exception.
error_handling
'cl_document_bcs=>create_from_text' bcs_exception->error_type.
endtry.
** attachment
if w_att = 'X'.
try.
call method a_sofm_document->add_attachment(
i_attachment_type = 'RAW'
i_attachment_subject = 'My attachment'
i_attachment_size = '21'
i_att_content_text = text ).
catch cx_bcs into bcs_exception.
error_handling 'a_sofm_document->add_attachment'
bcs_exception->error_type.
endtry.
endif.
a® -
Need to assign a multi datatype struct to a single field in Unicode system
Hi all,
I had posted an earlier question related to this to understand what the issue is. Few responses helped. Then now I have gone thru the conversion rules in Unicode systems related to assigning a structure (with different data types) to a single field and looking for a solution for my case. The current code written in 4.6 says
l_bapiparex-valuepart1 = l_bape_vbap
where
l_bape_vbap is a structure of type bape_vbap and
l_bapiparex of type bapiparex.
So according to the rules, when I do this kind of an assignment in ECC , the first field's length (i.e. VBELN) must be min 240 characters long. Only then this assignment will be error free, am I right ?
Or Is this an inadmissable assignment situation ?
If not then is there any other way how I can achieve the same result by fixing this issue ? I am not able to think of any !! Has any one come across this kind of an issue during upgrade? Please do suggest.
Just for your reference I have pasted the rule details from SAP help..
Conversion in Unicode Programs
The following rules apply in Unicode programs when converting a flat structure to a single field and vice versa:
If a structure is purely character-like, it is processed during conversion like a data object of the type c (Casting). The single field can have any elementary data type.
If the structure is not purely character-like, the single field must have the type c and the structure must begin with a character-like fragment that is at least as long as the single field. The assignment takes place only between this fragment and the single field. The character-like fragment of the structure is treated like a data object of the type c (Casting) in the assignment. If the structure is the target field, the remaining character-like fragments are filled with blanks and all other components with the initial value that corresponds to their type.
No conversion rule is defined for any other cases, so that assignment is not possible.
Note
If a syntax error occurs due to an inadmissible assignment between flat structures and single fields, you can display the fragment view of the corresponding structure when displaying the syntax error in the ABAP Editor by choosing the pushbutton with the information icon.
thanksTry this way
call method cl_abap_container_utilities=>fill_container_c
exporting
im_value = l_bape_vbap
importing
ex_container = l_bapiparex-valuepart1
exceptions
illegal_parameter_type = 1
others = 2.
a® -
Native sql not populating correct data in ECC6.0 unicode system
Hi,
I am working in an upgrade upgrade project from 4.6c to ECC6.0.
4.6c is non-unicode system. ECC6 is Unicode system.
I am facing Native SQL problem in custom developed programe in ECC6.That means programe reading the data from oracle datbase and stored into internal table.
But data not stored as normal character format that means its stored as different character format.
I am suspecting this is due to unicode system. IF that is issue then please provide
what syntax I have to use for Native SQL statment in unicode system.
I have provided the code which we are using in programe.
data:
i_locn type table of t_locn,
v_locn like line of i_locn.
field-symbols:
<f_005t> type t_005t.
Get existing EIS_VIDEO_LOCN_CONV records
EXEC SQL.
OPEN C FOR
SELECT EIS_LOCN
FROM VIDADMIN.EIS_VIDEO_LOCN_CONV
ENDEXEC.
do.
EXEC SQL.
FETCH NEXT C
INTO :V_LOCN-EIS_LOCN
ENDEXEC.
if sy-subrc ne 0.
exit.
endif.
append v_locn to i_locn.
enddo.
EXEC SQL.
CLOSE C
ENDEXEC.
sort i_locn.
I am facing the problem in i_locn internal table. Please give me your input to solve this issue.
- Anandakumar KHi,
We have resolved this issue with BASIS team help.
We modified the data charcater set as UTF8 in Oracle data base in unicode system ECC6.0 then the programme returns the
exact character format
Regards
K.Anandakumar -
RFC Error when using SAPRFC against a Unicode System
Hi Everybody,
I try to use the PHP SAPRFC extension against a Unicode System. When I call the client.php which comes with the source package from http://saprfc.sourceforge.net/ where I added:
"CODEPAGE"=>"4103", // codepage Unicode
"UNICODE"=>"1", // Unicode
to the $LOGIN array I get this error:
Warning: RFC Error Info : Group : 103 Key : RFC_ERROR_LOGON_FAILURE Message : D
in /var/www/saprfc/client.php on line 48
RFC connection failed with error:RFC Error Info : Key : C
Status : EXCEPTION SYSTEM_FAILURE RAISED Message : D Internal:
there are two trace files after the call. One called dev_rfc.trc with this content:
**** ERROR file opened at 20060605 050220 CEST, SAP-REL 640,0,119 RFC-VER 3 818129 MT-SL
T:1079532480 Error in program 'apache2': ======> D
T:1079532480 Error in program 'apache2':
<* RfcReceive [1] : returns 3:RFC_SYS_EXCEPTION
and a file called rfc27443_1079532480.trc:
**** Trace file opened at 20060605 050500 CEST, SAP-REL 640,0,119 RFC-VER 3 818129 MT-SL
<<< RfcOpenEx failed
>TS> Mon Jun 5 05:05:06 2006
resize I/O buffer to 16000 bytes
>>>> [7] <unknown> : EXT <ac: 74> L sapserver.test.com >>> OPEN
UUID: ab_drvstate create uuid {44839DD5-9DCE-6B32-E200-12FDBA107532}
>>>> [7] <unknown> : EXT <ac: 75> L sapserver.test.com >>> 45573492 (45573492)
-{44839DD5-9DCE-6B32-E200-12FDBA107532}
>>> RfcOpenEx ...
Got following connect_param string:
ASHOST=sapserver.test.com SYSNR=00 CLIENT=002 USER=developer PASSWD=*******
LANG=EN CODEPAGE=4103 UNICODE=1 TRACE=1
Send RFCHEADER: 01/LIT/IEEE/SPACE/4103
Send UNICODE-RFCHEADER: cp:4103/ce:IGNORE/te:REJECT/cs:1/rc:0x00000023
UUID: send_rfcuuid {44839DD5-9DCE-6B32-E200-12FDBA107532}
>>> Logon check: calling RFCPING
>>> RfcCall [7] ...
*> RfcCall
FUNCTION RFCPING
handle = 7
parameter = <NULL>
tables = <NULL>
UUID: RfcCallNew send the uuid to the partner {44839DD5-9DCE-6B32-E200-12FDBA107532}
>>>> [7] <unknown> : EXT <ac: 76> L sapserver.test.com >>> WRITE (45573492)
-{44839DD5-9DCE-6B32-E200-12FDBA107532}
000000 | D9C6C3F0 F0F0F0F0 F0F0F0E3 01010008 |................|
000010 | 01010101 04010003 01010103 00040000 |................|
000020 | 020B0103 0106000B 04010003 01000100 |................|
000030 | 00002301 06000700 0F313237 2E302E30 |..#......127.0.0|
000040 | 2E312020 20202020 00070011 00014500 |.1 ......E.|
000050 | 11001200 04363430 20001200 13000436 |.....640 ......6|
000060 | 34302000 13000800 20736172 67652D77 |40 ..... sarge-w|
000070 | 77772020 20202020 20202020 20202020 |ww |
000080 | 20202020 20202020 20000800 0600803C | ......<|
000090 | 756E6B6E 6F776E3E 00000000 00000000 |unknown>........|
0000a0 | 00000000 00000000 00000000 00000000 |................|
0000b0 | 00000000 00000000 00000000 00000000 |................|
0000c0 | 00000000 00000000 00000000 00000000 |................|
0000d0 | 00000000 00000000 00000000 00000000 |................|
0000e0 | 00000000 00000000 00000000 00000000 |................|
0000f0 | 00000000 00000000 00000000 00000000 |................|
000100 | 00000000 00000000 00000000 00000000 |................|
000110 | 06051400 10D59D83 44CE9D32 6BE20012 |........D..2k...|
000120 | FDBA1075 32051401 30000761 70616368 |...u2...0..apach|
000130 | 65320130 01110009 44455645 4C4F5045 |e2.0....DEVELOPE|
000140 | 52011101 17000D56 F94AFD31 E72211B4 |R......V.J.1."..|
000150 | 1DCED7F3 01170114 00033030 32011401 |..........002...|
000160 | 15000145 01150501 00010105 01050200 |...E............|
000170 | 00050200 0B000336 3430000B 01020007 |.......640......|
000180 | 52464350 494E4701 02051400 10D59D83 |RFCPING.........|
000190 | 44CE9D32 6BE20012 FDBA1075 320514FF |D..2k......u2...|
0001a0 | FF0000FF FF000000 00000000 00000000 |................|
>>>> [7] <unknown> : EXT <ac: 77> L sapserver.test.com >>> FLUSH(WRITE) (45573492)
-{44839DD5-9DCE-6B32-E200-12FDBA107532}
<* RfcCall [7] : returns 0:RFC_OK
>>>> [7] <unknown> : EXT <ac: 78> L sapserver.test.com >>> FLUSH(WRITE) (45573492)
-{44839DD5-9DCE-6B32-E200-12FDBA107532}
>>>> Listen/WaitForRequest (counter = 4)
>>>> [7] <unknown> : EXT <ac: 79> L sapserver.test.com >>> LISTEN (45573492)
-{44839DD5-9DCE-6B32-E200-12FDBA107532}
000000 | 01010008 01010101 04010003 01010103 |................|
000010 | 00040000 020B0103 0106000B 04010003 |................|
000020 | 01000200 00002301 06001600 08310031 |......#......1.1|
000030 | 00300030 00001600 07001E31 0030002E |.0.0.......1.0..|
000040 | 00310032 0038002E 00330036 002E0031 |.1.2.8...3.6...1|
000050 | 00350020 00200020 00000700 11000233 |.5. . . .......3|
000060 | 00001100 12000836 00320030 00200000 |.......6.2.0. ..|
000070 | 12001300 08360032 00300020 00001300 |.....6.2.0. ....|
000080 | 08004064 00650063 00720030 0034005F |[email protected]._|
000090 | 00430052 0034005F 00300030 00200020 |.C.R.4._.0.0. . |
0000a0 | 00200020 00200020 00200020 00200020 |. . . . . . . . |
0000b0 | 00200020 00200020 00200020 00200020 |. . . . . . . . |
0000c0 | 00200000 08000601 003C756E 6B6E6F77 |. .......<unknow|
0000d0 | 6E3E0000 00000000 00000000 00000000 |n>..............|
0000e0 | 00000000 00000000 00000000 00000000 |................|
0000f0 | 00000000 00000000 00000000 00000000 |................|
000100 | 00000000 00000000 00000000 00000000 |................|
000110 | 00000000 00000000 00000000 00000000 |................|
000120 | 00000000 00000000 00000000 00000000 |................|
000130 | 00000000 00000000 00000000 00000000 |................|
000140 | 00000000 00000000 00000000 00000000 |................|
000150 | 00000000 00000000 00000000 00000000 |................|
000160 | 00000000 00000000 00000000 00000000 |................|
000170 | 00000000 00000000 00000000 00000000 |................|
000180 | 00000000 00000000 00000000 00000000 |................|
000190 | 00000000 00000000 00000000 00000000 |................|
0001a0 | 00000000 00000000 00000000 00000000 |................|
0001b0 | 00000000 00000000 00000000 00000000 |................|
0001c0 | 00000000 00000000 00000605 140010D5 |................|
0001d0 | 9D8344CE 9D326BE2 0012FDBA 10753205 |..D..2k......u2.|
0001e0 | 14050000 00050004 03002E43 0041004C |...........C.A.L|
0001f0 | 004C005F 00460055 004E0043 00540049 |.L._.F.U.N.C.T.I|
000200 | 004F004E 005F004E 004F0054 005F0046 |.O.N._.N.O.T._.F|
000210 | 004F0055 004E0044 00040304 02004046 |.O.U.N.D......@F|
000220 | 0075006E 00630074 0069006F 006E0020 |.u.n.c.t.i.o.n. |
000230 | 006D006F 00640075 006C0065 00200022 |.m.o.d.u.l.e. ."|
000240 | 00524643 50494E22 0020006E 006F0074 |.RFCPIN". .n.o.t|
000250 | 00200066 006F0075 006E0064 002E0004 |. .f.o.u.n.d....|
000260 | 02FFFF00 00FFFF00 00000000 00000000 |................|
<* RfcListen [7] : returns 0:RFC_OK
>>> RfcReceive [7] ...
Received RFCHEADER [7]: 01/LIT/IEEE/SPACE/4103
Received UNICODE-RFCHEADER [7]: cp:4103/ce:IGNORE/te:REJECT/cs:2/rc:0x00000023
UUID: ab_rfccheck_uuid compare uuid's {44839DD5-9DCE-6B32-E200-12FDBA107532}
Error in program 'apache2': ======> F
>>>> [7] <unknown> : EXT <ac: 80> L sapserver.test.com >>> CLOSE abrfcrcv_mt.c 429 (45573492)
-{44839DD5-9DCE-6B32-E200-12FDBA107532}
*> RfcReceive
handle = 7
parameter = <NULL>
tables = <NULL>
Data conversion On
Error in program 'apache2': <* RfcReceive [7] : returns 3:RFC_SYS_EXCEPTION
>>>> [7] <unknown> : EXT <ac: 81> L sapserver.test.com >>> FREE abrfcio_mt.c 3517 (45573492)
-{44839DD5-9DCE-6B32-E200-12FDBA107532}
**** Trace file opened at 20060605 050506 CEST, SAP-REL 640,0,119 RFC-VER 3 818129 MT-SL
<<< RfcOpenEx failed
Our SAP Environment is:
- SAP Web AS 6.20 Unicode Kernel Patchlevel 1602
- Windows 2003 Server
- Oracle
On the PHP Side I use:
- Debian GNU/Linux 3.1 (Sarge)
- Apache 2 2.0.54-5
- PHP4 4.3.10-16
- SAPRFC 1.4.1
- SAP RFC SDK non Unicode 6.20 and 6.40 (The problem occurs in both versions)
Had anyone had sucess using SAPRFC against a Unicode System?
Regards
GregorHi Anton,
I've just tried your suggestion. I've commented out the CODEPAGE and UNICODE values in my Array and placed:
[code]saprfc_set_code_page($rfc, "4103");[/code]
after the
[code]$rfc = saprfc_open ($LOGIN);[/code]
The error message I get now is:
[code]Warning: RFC Error Info : Key : Status : EXCEPTION FU_NOT_FOUND RAISED Message :
Internal: in /var/www/saprfc/client.php on line 58
Discovering interface of function module RFC_READ_REPORT failed[/code]
In the trace File I see:
[code]>>>> [3] <unknown> : EXT <ac: 40> L sapserver.test.com >>> WRITE (80999721)
-{44839E3E-9E3B-6B30-E200-0534B0CD3057}
000000 | 05020000 0502000B 00063600 34003000 |..........6.4.0.|
000010 | 000B0102 00385200 46004300 5F004700 |.....8R.F.C._.G.|
000020 | 45005400 5F004600 55004E00 43005400 |E.T._.F.U.N.C.T.|
000030 | 49004F00 4E005F00 49004E00 54004500 |I.O.N._.I.N.T.E.|
000040 | 52004600 41004300 45005F00 50000102 |R.F.A.C.E._.P...|
000050 | 05140010 3E9E8344 3B9E306B E2000534 |....>..D;.0k...4|
000060 | B0CD3057 05140201 00104600 55004E00 |..0W......F.U.N.|
000070 | 43004E00 41004D00 45000201 0203001E |C.N.A.M.E.......|
000080 | 5246435F 52454144 5F524550 4F525420 |RFC_READ_REPORT |
000090 | 20202020 20202020 20202020 20200203 | ..|
0000a0 | 03010010 50004100 52004100 4D005300 |....P.A.R.A.M.S.|
0000b0 | 5F005000 03010330 00040000 00010330 |_.P....0.......0|
0000c0 | 03020008 000000D8 00000000 0302FFFF |................|
0000d0 | 0000FFFF 00000000 00000000 00000000 |................|
>>>> [3] <unknown> : EXT <ac: 41> L sapserver.test.com >>> FLUSH(WRITE) (80999721)
-{44839E3E-9E3B-6B30-E200-0534B0CD3057}
<* RfcCall [3] : returns 0:RFC_OK
>>> RfcReceive [3] ...
>>>> [3] <unknown> : EXT <ac: 42> L sapserver.test.com >>> FLUSH(WRITE) (80999721)
-{44839E3E-9E3B-6B30-E200-0534B0CD3057}
>>>> [3] <unknown> : EXT <ac: 43> L sapserver.test.com >>> READ (80999721)
-{44839E3E-9E3B-6B30-E200-0534B0CD3057}
000000 | 05000000 05000415 00044600 4C000415 |..........F.L...|
000010 | 04160002 45000416 04170006 30003400 |....E.......0.4.|
000020 | 36000417 04010018 46005500 5F004E00 |6.......F.U._.N.|
000030 | 4F005400 5F004600 4F005500 4E004400 |O.T._.F.O.U.N.D.|
000040 | 0401FFFF 0000FFFF 00000000 00000000 |................|
>>>> [3] <unknown> : EXT <ac: 44> L sapserver.test.com >>> FLUSH (READ) (80999721)
-{44839E3E-9E3B-6B30-E200-0534B0CD3057}[/code]
Regards
Gregor
Maybe you are looking for
-
How to assign store proc parameter to other parameter memebers?
i really do not want to decalare t_param2 and check if default value is null of param2 then assign param1 to it. Any way i can achieve the following without declaring temp variables.????? create or replace procedure Proc1( param1 varchar2, param2 var
-
Hi there I have an iPod touch and have found that safari has gone really slow. It takes ages to load the page and zoom in and out also scrolling up and down. It al started when I let my kids aged 11 and 9 used it. They where not as careful as me whe
-
Have upgraded to monthly subscription, but can't load Muse files to my own domain
When I tried to load the Muse files for my website, developed during the trial period, to my own domain, I discovered that wasn't an option. I have upgraded from trial sub to month-to-month sub. The "Trial period ends in (x) days" no longer appears
-
Please help! I cannot update All Iphone Application via Itunes
I cannot update iphone application. Every time I try to update i will got this message "An Error Occurred The iTunes Store could not process you request,Please try again later" Itunes 8.2.1(6) Iphone 3gs 32GB Iphone 3g 16GB
-
Audiobooks (iTunes/iPod)
Hi, Need a little help here... I have a few audiobooks in my coputer (on iTunes to be exact), but when I update my iPod the audiobooks do not go the the audiobook forder. What do you think I should do? Thanks!!!!!