Perform unicode to UTF-8 conversion on F110 bacs payment file in ABAP

Hi,
I am facing a conversion issue for the UK BACS payment files.
The payment run tcode F110 creates a payment file but the file when created on the application server has soem sort of code conversion. If I removed the # value, i can read most of the data.
The data example is as below-
#V#O#L#1#0#0#1#5#8#8# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #2#4#3#3#0#9#
#H#D#R#1#A#2#4#3#3#0#9#S# # #1#2#4#3#3#0#9#0#0#0#0#0#2#0#0#0#1#0#0#0#1# # # # # # # #1#0#1#1#2#
#H#D#R#2#F#0#2#0#0#0#0#0#1#0#0# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
#U#H#L#1# #1#0#1#1#3#9#9#9#9#9#9# # # # #0#0#0#0#0#0#0#0#1# #D#A#I#L#Y# # #0#0#0# # # # # # # #
This is then transferred to the bank via the FTP UNIX Script but after the conversion which is happening as-
#Perform unicode to UTF-8 conversion on bacs file
$a = "iconv -f UNICODE -t UTF-8 $tmpUNI > $tmpASC";
The need going forward is to bring the details via the interface and then make an uplaod.
The ABAP code should be able to make the conversion, remove the additional chracters and then send the file across.
I have searched everywhere but I am not able to find out how to make the same conversion in ABAP.
We are on ECC6.
Can someone please help me?
Regards,
Archana

Hi Archana,
can  you please check SAP notes 1064779 and 1365764 (including the attachment) and see if this helps you ?
Best regards,
Nils Buerckel
SAP AG

Similar Messages

  • Character encoding (unicode to utf-8) conversion problem

    I have run into a problem that I can't seem to find a solution to.
    my users are copying and pasting from MS-Word. My DB is Oracle with its encoding set to "UTF-8".
    Using Oracle's thin driver it automatically converts to the DB's default character set.
    When Java tries to encode Unicode to UTF-8 and it runs into an unknown character (typically a character that is in the High Ascii range) it substitutes it with '?' or some other wierd character.
    How do I prevent this.

    my users are copying and pasting from MS-Word. My DB
    is Oracle with its encoding set to "UTF-8".Pasting where? Into the database? If they are pasting into the database (however they might do that) and getting bad results then that's nothing to do with Java.
    Using Oracle's thin driver it automatically converts
    to the DB's default character set.Okay, I will assume that is correct.
    When Java tries to encode Unicode to UTF-8 and it
    runs into an unknown character (typically a character
    that is in the High Ascii range) it substitutes it
    with '?' or some other wierd character.This is false. When converting from Unicode to UTF-8 there are no "unknown characters". I don't know what you mean by the "High Ascii range" but if your users are pasting MS stuff into your Java program somehow, then a conversion from something into Unicode is done at that time. If "something" isn't the right encoding then you have the problems already, before you try to write to the DB.
    How do I prevent this.First identify the problem. You have input coming from somewhere, then you are writing to the database. Two different steps. Either of them could have a problem. Test them separately so you know which one of them is the problem.

  • F110 DME payment file: add a number of lead days to posting and value date

    Hello,
    For an Italian company, the DME payment file (F110) needs to be checked and approved by an accountant after it is created. This takes 3 to 4 days after which the file is sent to the bank. The bank will reject the file if the value date  is three days late (date which the bank uses to process the file on). For fiscal reasons the accounting clerks need the have the same posting date as the value date
    I managed to set the value date in the DME files a couple of days later. The setting I used (FBZP -> bank determination -> value date) adds the number of lead days to the value date on the basis of the posting date as defined by the user in F110. For some reason I cannot set it to 0 days, it always adds up 1 day. Is that a normal effect or have I changed the settings in the wrong way?
    I found another setting in customising ("define value date rules") which seems to have the same functionality. In the help function it is said that the setting does not influence the payment program and that the program manages the value date. Is there another setting? Can this problem be solved without the help of a programmer?
    Thank you very much!
    René
    functional consultant
    Edited by: ConsultantSAINT-OBAIN on Apr 8, 2010 10:24 AM

    Here's a section of code that does exactly that:
    CALL FUNCTION 'DATE_CONVERT_TO_FACTORYDATE'
      EXPORTING
        CORRECT_OPTION                     = '+'
        DATE                               = G_WORKAREA3-CREATEDON
        FACTORY_CALENDAR_ID                = L_S_PLANT-FACTCAL_ID
      IMPORTING
    *   DATE                               =
       FACTORYDATE                        = L_FCDATE
      EXCEPTIONS
        CALENDAR_BUFFER_NOT_LOADABLE       = 1
        CORRECT_OPTION_INVALID             = 2
        DATE_AFTER_RANGE                   = 3
        DATE_BEFORE_RANGE                  = 4
        DATE_INVALID                       = 5
        FACTORY_CALENDAR_NOT_FOUND         = 6
        OTHERS                             = 7.
      L_FCDATE = L_FCDATE + L_S_ZLEAD-/BIC/ZLEAD.
      CALL FUNCTION 'FACTORYDATE_CONVERT_TO_DATE'
        EXPORTING
          FACTORYDATE                  = L_FCDATE
          FACTORY_CALENDAR_ID          = L_S_PLANT-FACTCAL_ID
        IMPORTING
          DATE                         = L_DATE
        EXCEPTIONS
          CALENDAR_BUFFER_NOT_LOADABLE = 1
          FACTORYDATE_AFTER_RANGE      = 2
          FACTORYDATE_BEFORE_RANGE     = 3
          FACTORYDATE_INVALID          = 4
          FACTORY_CALENDAR_ID_MISSING  = 5
          FACTORY_CALENDAR_NOT_FOUND   = 6
          OTHERS                       = 7.
    * result value of the routine
      RESULT = L_DATE.

  • Japanese characters, outputstreamwriter, unicode to utf-8

    Hello,
    I have a problem with OutputStreamWriter's encoding of japanese characters into utf-8...if you have any ideas please let me know! This is what is going on:
    static public String convert2UTF8(String iso2022Str) {
       String utf8Str = "";
       try {          
          //convert string to byte array stream
          ByteArrayInputStream is = new     ByteArrayInputStream(iso2022Str.getBytes());
          ByteArrayOutputStream os = new ByteArrayOutputStream();
          //decode iso2022Str byte stream with iso-2022-jp
          InputStreamReader in = new InputStreamReader(is, "ISO2022JP");
          //reencode to utf-8
          OutputStreamWriter out = new OutputStreamWriter(os, "UTF-8");
          //get each character c from the input stream (will be in unicode) and write to output stream
          int c;
          while((c=in.read())!=-1) out.write(c);
          out.flush();          
         //get the utf-8 encoded output byte stream as string
         utf8Str = os.toString();
          is.close();
          os.close();
          in.close();
          out.close();
       } catch (UnsupportedEncodingException e1) {
          return    e1.toString();
       } catch (IOException e2) {
          return e2.toString();
       return utf8Str;
    }I am passing a string received from a database query to this function and the string it returns is saved in an xml file. Opening the xml file in my browser, some Japanese characters are converted but some, particularly hiragana characters come up as ???. For example:
    屋台骨田家は時間目離れ拠り所那覇市矢田亜希子ナタハアサカラマ楢葉さマヤア
    shows up as this:
    屋�?�骨田家�?�時間目離れ拠り所那覇市矢田亜希�?ナタ�?アサカラマ楢葉�?�マヤア
    (sorry that's absolute nonsense in Japanese but it was just an example)
    To note:
    - i am specifying the utf-8 encoding in my xml header
    - my OS, browser, etc... everything is set to support japanese characters (to the best of my knowledge)
    Also, I ran a test with a string, looking at its characters' hex values at several points and comparing them with iso-2022-jp, unicode, and utf-8 mapping tables. Basically:
    - if I don't use this function at all...write the original iso-2022-jp string to an xml file...it IS iso-2022-jp
    - I also looked at the hex values of "c" being read from the InputStreamReader here:
    while((c=in.read())!=-1) out.write(c);and have verified (using character value mapping table) that in a problem string, all characters are still being properly converted from iso-2022-jp to unicode
    - I checked another table (http://www.utf8-chartable.de/) for the unicode values received and all of them have valid mappings to a utf-8 value
    So it appears that when characters are written to the OutputStreamWriter, not all characters can be mapped from Unicode to utf-8 even though their Unicode values are correct and there should be utf-8 equivalents. Instead they are converted to (hex value) EF BF BD 3F EF BF BD which from my understanding is utf-8 for "I don't know what to do with this one".
    The characters that are not working - most hiragana (thought not all) and a few kanji characters. I have yet to find a pattern/relationship between the characters that cannot be converted.
    If I am missing some....or someone has a clue....oh...and I am developing in Eclipse but really don't have a clue about it beyond setting up a project, editing it and hitting build/run. It is possible that I may have missed some needed configuration??
    Thank you!!

    It's worse than that, Rene; the OP is trying to create a UTF-8 encoded string from a (supposedly) iso-2022 encoded string. The whole method would be just an expensive no-op if it weren't for this line:   utf8Str = os.toString(); That converts the (apparently valid) UTF-8 encoded byte array to a string, using the system default encoding (which seems to be iso-2022-jp, BTW). Result: garbage.
    @meggomyeggo, many people make this kind of mistake when they first start dealing with encodings and charset conversions. Until you gain a good understanding of these matters, a few rules of thumb will help steer you away from frustrating dead ends.
    * Never do charset conversions within your application. Only do them when you're communicating with an external entity like a filesystem, a socket, etc. (i.e., when you create your InputStreamReaders and OutputStreamWriters).
    * Forget that the String/byte[] conversion methods (new String(byte[]), getBytes(), etc.) exist. The same advice applies to the ByteArray[Input/Output]Stream classes.
    * You don't need to know how Java strings are encoded. All you need to know is that they always use the same encoding, so phrases like "iso-2022-jp string" or "UTF-8 string" (or even "UTF-16 string") are meaningless and misleading. Streams and byte arrays have encodings, strings do not.
    You will of course run into situations where one or more of these rules don't apply. Hopefully, by then you'll understand why they don't apply.

  • String utf-16 conversion

    Hello,
    I call rfc (via xi) and get result as flat xml String from r/3.
    This string contains english and hebrew characters. The english is o.k. but the value nodes in hebrew looks like " ׳ ׳�׳™ ׳�׳™׳ ׳™׳�׳¨׳׳˜/׳™׳’׳�׳� "
    how can i convert the string in order to see my language characters?
    I think the source unicode is utf-8, and i need to convert it to utf-16 but i'm not sure about that nor how to do that.
    Thanks for your help.
    Roni.

    Hi Roni,
    If your RFC returns an XML file as a java.lang.String object, the String itself is by definition UTF-16. To see if the XML file is correct, you could write it to disk and open it with your favourite text editor. Something like this.
    private void save(String xml) throws IOException {
      OutputStream out = new FileOutputStream(new File("/tmp/result.xml"));
      out.write(xml.getBytes("UTF-8"));
      out.close();
    Or whatever supported encoding you like and that's supported by your text editor, e.g. ISO-8859-8 is Latin/Hebrew Alphabet; see http://java.sun.com/j2se/1.4.2/docs/guide/intl/encoding.doc.html
    Obviously, to correctly see the characters you need the necessary fonts too.
    In case the above doesn't work, it means the xml String you receive from the RFC call is already corrupt. However, if it does work, the RFC as such works correctly.
    The next step is likely to parse the XML to extract the information you need and store it in your Web Dynpro context. An XML parser usually expects bytes (a java.io.InputStream) as input, which means you need to convert the String to bytes and by doing that, you need to choose a character encoding. It could be something like the following.
    SAXParserFactory.newInstance().newSAXParser().parse(new ByteArrayInputStream(xml.getBytes("UTF-8")), handler);
    Note that the character encoding you specify here does make a difference. It should be the same, in order not to "confuse" the XML parser, as defined in the XML file's document type declaration, e.g. <?xml version="1.0" encoding="UTF-8"?>
    BTW, what exactly do you do with the received XML to obtain the value nodes?
    Kind regards,
    Sigiswald

  • Triple byte unicode to utf-16

    I need to convert a triple byte unicode value (UTF-8) to UTF-16.
    Does anyone have any code to do this. I have tried some code like:
    String original = new String("\ue9a1b5");
    byte[] utf8Bytes = original.getBytes("UTF8");
    byte[] defaultBytes = original.getBytes();
    but this does not seem to process the last byte (b5). Also, when I try to convert the hex values to utf-16, it is vastly off.
    -Lou

    Good question. Answer is, it does.
    Oops, sorry, I think I left my brain in the kitchen :)
    I was somehow thinking that "hmmm, e is not a hexadecimal digit so that must result in an error"... but of course it is...
    Am I representing the triple byte unicode character
    wrong? How do I get a 3 byte unicode character into
    Java (for example, the utf-16 9875)?It's simply "\u9875".
    If you have byte data in UTF-8 encoding, this is what you can do:try {
        byte[] utf8 = {(byte) 0xE9, (byte) 0xA1, (byte) 0xB5}
        String stringFromUTF8 = new String(utf8, "UTF-8");
    } catch (UnsupportedEncodingException uee) {
        // UTF-8 is guaranteed to be supported everywhere
    }

  • Unicode or UTF-8?

    Hi, all,
    I'm developing a JSP application that will work with international characters, both displaying them on webpages and storing them in a MySQL database. I'm a bit confused about whether I should use Unicode or UTF-8 for those character strings. (I've read up on both of these encodings and they appear to be very similar in many respects.)
    Can anyone give me any suggestions as to which I should use and why?
    Thanks,
    Dmitri.

    UTF-16 uses 2 bytes for all characters.
    UTF-8 generally uses anywhere from 1 to 6 bytes toActually, UTF-16 uses 16-bit tokens, and represents characters with one or more tokens, like all UTF encodings.
    Generally, the encodings 'UTF-N' use N-bit tokens, and encode the 32-bit UNICODE scalar values (character set) with one or more tokens. Typically, the lower values in the encoding represent the UNICODE scalar values directly.
    UNICODE defines 'UTF-8', 'UTF-16', and 'UTF-32', the latter two in big- and little-endian forms as well as self-specifying forms (using initial bytes of a file or stream). 'UTF-32' encoding just uses the UNICODE scale values directly.
    There is also 'UTF-7', which is used in mime encoding to get through 7bit character sets. There are also unofficial 'UTF-6' etc for specialist use.
    UTF-8 has the advantage that it does not contain null (zero valued) bytes, which means that it works transparently with code expecting to see one byte characters (assuming the legacy code doesn't try to manipulate multi-byte characters!).

  • Sql Plus and Unicode (or utf-8) characters.

    Hello,
    i have problem with Sql Plus and unicode files. I want to execute Start {filename}, where {filename} is file in unicode format (this file have to contains german and polish characters). But i receive error message. It is possible to read from unicode (or utf-8) file and execute commands from this file)?
    Thanks in advance.
    Pawel Przybyla

    What is your client operating system characterset?

  • Need help with conversion progrma for MTS video files.  Can't download videos from Sony TX-10 camera

    Have new macbook pro 13".  Can't download videos from our Sony TX-10 camera.  I understand I need some kind of conversion program for MTS video files.  Need recommendation for a good conversion program to convert the video files.
    Thanks, chieftd

    Well, sigh, that's not going to work.
    I love how I can do months of research to choose the best camera for my needs and budget, which is NO easy task these days, but surprisingly find it on the unsupported list when it's a very popular camera.  So, while it seems to support a whole bunch of other AVCHD options from Sony, not the NEX cameras.
    The NEX cameras are the latest generation of mirrorless cameras (which, ironically, are great b/c they give dSLR quality still images while actually producing HD video that always records silently and stays in focus b/c it's mirrorless).  The NEX 7 was just reviewed as Camera of the Year.
    Bleh. Oh well. Maybe someday.
    And, for anyone reading, Roxio Toast Titanium did convert it just fine but it took about 20 min or my time to set up a handful of clips and then a couple hours to complete converting them for the quality I was looking for.  One was about 10 minutes of a kids' performance on Christmas and it took a long time. It's just not feasible given how many video clips I do with the camera a week - well, feasible when you consider all the cameras where this would be seamless.
    Thanks for posting your reply - I appreciate it.

  • F110- Automatic Payment. 2nd ranking bank not selected

    Dear Experts,
    I need your help here.
    During the F110 (check payment), those banks customized as 2nd,3rd,4th or subsequent bank ranking could not produce any payment advice and checking printing. Where has goes wrong?
    If I change the 2nd ranking (Citibank) to 1st ranking, then Citibank will works well.
    I wonder why the F110 only takes the 1st ranking bank.
    Please help.
    Will assign points for solutions.
    Thanks a lot in advance.

    Hi Nitin,
    You mean the available amount for each house bank?
    I have alraedy maintained the amount for each house bank at a very high amount and the F110 payment is not exceeding the amount set.
    Please help.

  • F110 AUTOMATIC PAYMENT PROGRAM  NOT PICKING PAYMENT METHOD

    hi guru's
    F110 - Running payment program proposal list going to exeption list , House bank not picking up from VENDOR master. if not maintaing house bank in vendor master
    proposal list is coming but 2nd house bank picking but i need 1 house bank. i maintained ranking order in FBZP.
    pls suggest me this issue.
    raj.

    Hi,
    I had an other problem with payment methods and in that case it was important how you fill it in the vendor and in the payment run. prhaps this helps you to found a solution or to understand how it is working
    I have set-up a new payment method "E" for splitting euro payments under EUR 50,000 (K is for the other and non iban payments)
    For this I have made the following settings in the Bank determination:
    PM Rank order House bank
    E 1 733BE
    K 2 733BE
    In the vendor masterdata I will fill in EK (to make it easy for users)
    When I run the payment method with KE the system is using K and not E. when I fill in EK the IBAN payments are going with E and and the other one's with K what is correct.
    Why is the Rank order not working for this? (look first to E and when E is not permitted go use K)
    Paul

  • F110 Automatic Payment Progrramm

    Hello
    process of Automatic payment program.
    kisanp

    Dear  Kisan,
    Automatic payment program means:
    You launch transaction F110 and specify parameters for the selection of items to be paid. Then you run Proposal Run which creates Payments Proposal. This proposal is analysed by Treasury / Accountants / somebody else and then it is approved immediately or with some corrections. After that you run Productive Run. At this moment postings are done (or not done u2013 see separately). When Productive Run is finished, you can create payment file or paper payment documents for the bank and/or payment recipients
    Best Regards
    Amjathpasha

  • F110 Automatic Payment: Create payment file and create remittance

    Hello,
    I'd like to know the steps to create payment file and remittances in Automatic payment process (F110).
    Thanks in advance

    Hello Emanula,
    payment medium entries are customized in "payment method Country details". You have to decide whether you want to use the PMW or the classical paymentprogram.
    The paymentadvices are generated from the paymentprogram by using the parameters from the CC-data of the paymentmethod - Box "Payment advice control".
    At least: Don't forget to maintain the parameters in f110 "Printout/data medium"
    Hope this gives you a help.
    Best regards
       Horst

  • F110-Automatic payment program payment made in other countries

    I have 50 Company codes(Different countries) and one paying company code(US). Now i want to set up FBZP config. .. what should i do to enable the inter-country/inter-company payments using F110(Automatic Payment Program).

    Hi Ashish,
    In step 1 of FBZP, i.e. "All company code", when i try to enter a "New Entry", and when i try to set paying company code(which is in US) for other company codes that are outside US, i get the following error.
    "Company code <paying company code> is not permitted as the paying company code
    Message no. F3063
    Diagnosis
    The paying company code and the company code on whose behalf the payment is being made must be in the same country, have the same local currency, and display the same currencies managed in parallel. The setting regarding extended withholding tax functions (active or not active) must also be identical for both company codes.
    System Response
    The entry is not accepted since these requirements are not met.
    Procedure
    Correct your entry.
    Please advice

  • F110 automatic Payment for Customer

    Hi,
    I want to pay to a customer for the credit memo thru' F110 automatic payment program.
    If I maintain the document number in the 'free selection' tab then there is a error during proposal *'company codes xxxx/xxxx do not appear in the proposal 04.07.2008,test; correct'*, but if i do not maintain any document number then there is no error, the proposal is successful.
    I have double checked the document numbers in the free selection tab.
    Any help.
    Thanks
    Suresh

    I noticed there was a mistake in the document number.

Maybe you are looking for

  • How to  remove the Special characters like @,#,$ ,..from field

    How to  remove the Special characters like @,#,$<,..from text  field. we nedd to remove any specila char from text field . ex:text  = just#fi%cation@text the text should be justification.

  • How to use SPNegoLoginModule with a corporate directory

    Hi! I'm trying to use the kerberos login module for the integrated windows authentication. I found in help.sap.com how to set up the kerberos for an ADS data source. But this works only when using the ADS as unique data source with the windows accoun

  • Mapping tomcat mod_jk

    how can i map webapp to Apache using mod_jk connector. any tutorial, example,api thanks & regards

  • Reporting on HANA Model using EPM Add-in

    Hi All, BPC 10 NW on HANA EPM Add-in SP 15 We have imported two models from BPC into HANA and using HANA calculation view, we are able to do certain cross-model calculations within HANA. However, when we try to report that using EPM Add-in, that's wh

  • Preview AdobeForm in WEBUI

    Hi Experts I have a requirement in WEB UI screen, i have added a custom Button "Generate PDF" in the UI screen ,when clicked should open a AdobeForm as output. So i need your expert advice for following the procedure in achieving the above requiremen