Encode Bytecode in source field to base64 in target field

Hello,
I have already posted a similar question regarding base64 encoding of attachment. However now the bytecode is sent in a single field in the source message. This bytecode has to be encoded in base64.
So far I have not found any solution to do so. I have read about the following API com.sap.aii.utilxi.base64.api.Base64  which should contain two static methods for encoding end decoding.
However the package cannot be found when trying to import it into an UDF. As this API is not documented, could it be that it is not available anymore on PI 7.1?
What other possibilites do I have? Do you have any idea? I
Thank you very much!

Hi Florian,
com.sap.aii.utilxi.base64.api.Base64 is no official API, so there is no official documentation on this. Also, if you use this, there can be a possibility that changes might occur in this class without any notice.
This class has two static methods:
String encode(byte[]) // binary -> base64
byte[] decode(String) // base64 -> binary
Try looking for this class in aii_utilxi_misc.jar, which can be found on PI server - C:\usr\sap\*\*\j2ee\cluster\server0\bin\ext\com.sap.xi.util.misc
Hope this helps.
Regards,
Neetesh

Similar Messages

  • In XI Mapping multiple fields mapping to single target field.

    Hi Friends,
    In XI Mapping multiple fields mapping to single target field.
    For example my requirement is :
    Source Fields:(This RFC BAPI Structure)
    Empno                0-1
    EmpName           0-1
    Address             0-1
    Taget Field is:
    Details               0-1
    The above three fields passed to the Details Field. Here i am using Concat function
    But i have one query on that on,Every field having "line Break" required.
    Can you please help me out above this requirement.
    Thanks in Advance,
    Sateesh N.

    If you want a line break between the three fields, then try
    passing a,b,c to the udf and in the udf you would have
    return a+"\n"+b+"\n"+c;

  • Send Multiple field values to Single Target field in Message Mapping

    Hi,
    My  Requirement is to Map Multiple fields to Single field in Target side.I have to send all the values concatenated and pass the same to target Field in Message Mapping.
    We can use Concat function,but more that 15 fields are there.If using concat,the mapping will be complex.
    Is there any way to simplify this requirement or we can use any UDF for this,kindly suggest.
    Regards,
    Madhu

    >>>We can use Concat function,but more that 15 fields are there.If using concat,the mapping will be complex.
    I don't think it's complex but  just that it occupies more mapping area
    Just write a simple UDF - a one line code and pass all your input variables.
    return var1+var2+var3+var4+...+var15;

  • Mapping Issue. Parsing problem to target Fields based on condition.

    Hi All,
    File to Idoc scenario.
    My file looks like below.
    HD 89650 28/01/11 "Presciber tan"
    AF "disc-rsn"
    RK "007287001" A
    KE disc-code "007287"
    KE addr-num "001"
    DF fax-num ""
    DF in-out "I"
    DF phone-2 "23221"
    AF "drs"
    RK "007287" A
    KE dr-num "00221"
    KE addr-num "001"
    DF affil "OPSM"
    DF rec-stat "A"
    DF phone-2 "12444"
    AF "disc-rsn"
    RK "dr-addraddress-1 17287|1EN" A
    KE disc-code "008287"
    KE field-name "address-1"
    KE element " 1"
    DF in-out "I"
    DF phone-2 "1232"
    DF post-code "3109"
    DF provider-num "5349201J"
    DF rec-stat "A"
    T         24
    I need to capture and create target segments only for the values "AF "disc-rsn"".And pass all the relavant rows (RK,KE,DF...) which are under "AF "disc-rsn"" to the target fields.
    I'm struggling to parse the value to the output structure as RK,KE,DF will be present under anywhere like "AF drs", "AF disc-rsn" etc.
    I'm able to create the target segments (2 Zdisc segments as 2 "AF disc-rsn" present in the file), but unable to parse the field values to the target fields.
    Ex: DF phone-2 is present in 8th, 15th,22nd row. I need to pass only 8th and 22nd rows to the target fields.
    After content conversion, My Source XML looks like below.
    <?xml version="1.0" encoding="utf-8" ?>
    - <MT_DiscountDetails>
    - <HD>
      <KeyField>HD</KeyField>
      <HDRow>89650 28/01/11 "Presciber tan"</HDRow>
      </HD>
    - <AF>
      <KeyField>AF</KeyField>
      <AFRow>"disc-rsn"</AFRow>
      </AF>
    - <RK>
      <KeyField>RK</KeyField>
      <RKRow>"007287001" A</RKRow>
      </RK>
    - <KE>
      <KeyField>KE</KeyField>
      <KERow>disc-code "007287"</KERow>
      </KE>
    - <KE>
      <KeyField>KE</KeyField>
      <KERow>addr-num "001"</KERow>
      </KE>
    - <DF>
      <KeyField>DF</KeyField>
      <DFRow>fax-num ""</DFRow>
      </DF>
    - <DF>
      <KeyField>DF</KeyField>
      <DFRow>in-out "I"</DFRow>
      </DF>
    - <DF>
    Is there any way I can acheive my  mapping based on the above condition?? Kindly suggest me.
    Thank you for your time.
    Regards
    Deepthi

    Not required. Using Java function. Solved the issue.

  • End Routine - populating Target Field based on Master Data

    Hi,
    I have an issue with my End Routine in BI 7.0. The scenario is as follows....
    The Target-Fields ZSALES_OFFICE , 0SALES_CHANNEL etc. are being mapped 1:1 from their respective source fields. In addition to these target fields I have a target field 0SALESORG which I need to populate based on the values from 0COMP_CODE which is an attribute of ZSALES_OFFICE. The values of 0COMP_CODE are 9000, 9001, 9002 and 9003 respectively. The end routine condition needs to be implemented as follows...
    For every 0COMP_CODE which has value 9000, 0SALESORG should be populated with the value "EAST". Similarly for every 0COMP_CODE which has value 9001, 0SALESORG should be populated with the value "WEST",  for every 0COMP_CODE which has value 9002, 0SALESORG should be populated with the value "NORTH" and  for every 0COMP_CODE which has value 9003, 0SALESORG should be populated with the value "SOUTH". I tried the following code but it doesnt seem to work. Could you pls help!!
    Thanks,
    SD
    DATA: it_tab4 TYPE TABLE OF /BIC/PZF31SALOFF,
              wa_tab4 TYPE /BIC/PZF31SALOFF.
        SELECT *
          FROM /BIC/PZF31SALOFF
        INTO CORRESPONDING FIELDS OF TABLE it_tab4.
        sort it_tab4 by /BIC/ZF31SALOFF.
        LOOP AT RESULT_PACKAGE
          INTO <result_fields>.
          read table it_tab4
          with key /BIC/ZF31SALOFF = <result_fields>-/BIC/ZF31SALOFF
          into wa_tab4
          binary search.
          if sy-subrc eq 0.
            CASE wa_tab4-comp_code.
              WHEN '9000'.
                <result_fields>-salesorg = 'EAST'.
              WHEN '9100'.
                <result_fields>-salesorg = 'WEST'.
              WHEN '9200'.
                <result_fields>-salesorg = 'NORTH'.
              WHEN '9300'.
                <result_fields>-salesorg = 'SOUTH'.
              MODIFY it_tab4 FROM wa_tab4.
            ENDCASE.
          endif.
        ENDLOOP.

    Replace your select statement ,
    SELECT *
    FROM /BIC/PZF31SALOFF
    INTO CORRESPONDING FIELDS OF TABLE it_tab4.
    instead of selecting all the fields , pick only the fields which are required.(one good performance improvement)
    SELECT    /BIC/PZF31SALOFF  comp_code
    FROM /BIC/PZF31SALOFF
    INTO CORRESPONDING FIELDS OF TABLE it_tab4.
    Remove the line below , this is not required
    MODIFY it_tab4 FROM wa_tab4.

  • Ignoring a target field in LSMW processing

    Hi All,
            Is there a way to ignore a particular target field and its mapping in LSMW?
    For example, if there are 10 target fields present in a target structure, I want to ignore say 2 fields based on a value in file for another field so only 8 target fields will be considered for processing(read, convert, process)
    Thanks,
    Gopinath N

    USRID                        Communication ID/Number
                        Source:  ZHR0105-USRID (Communication ID/Number)
                        Code:    IF ZHR0105-SUBTY = '0001'.
                                   ZDMRC_0105-USRID = ZHR0105-USRID.
                                 ENDIF.
    USRID_LONG                   Communication ID/Number
                        Source:  ZHR0105-USRID_LONG (Communication: Long Identification/Number)
                        Code:    IF ZHR0105-SUBTY = '0010'.
                                   ZDMRC_0105-USRID_LONG = ZHR0105-USRID_LONG.
                                 ENDIF.
    The above is the code im using but still both the fields are picked in read and convert data as shown below and fails as there is no screen field USRID_LONG when USRID is present and vice versa
    TABNAME    Table Name              ZDMRC_0105
    TCODE      Transaction Code        PA30
    PERNR      Personnel Number        90000061
    SUBTY      Subtype                 0001
    BEGDA      Start Date              01012009
    ENDDA      End Date                31129999
    USRID      Communication ID/Number test
    USRID_LONG Communication ID/Number

  • Target fields

    Hi Gurus,
    As i understand we need to assign the target fields in process message destinations. please advise how to identify the target destination fields. appreciate if you can explain with one example.

    <i>Is there a way in the we can map two target fields to each other. In this case using an idoc wherein the requirement is that two target fields need to mapped to each other to produce the final output. Is this possible using graphical mapping.</i>
    >>>>
    is there any source field linked to these target fields ? what will be the value that will be populated in these fields ?

  • How do I get more target fields to apper in inspector for a mail merge?

    I am trying to do a mail merge from a Numbers spreadsheet to a Pages document. The spreadsheet has three columns: first name, last name, units. When I choose and add the merge fields to inspector the target fields 'first name' and 'units' appear but no target field entitled 'last name' appears. I can't figure it out.

    Which version of Pages?
    Peter

  • Rule 73 (target field: 0RPA_OID group: 01 Standard Group): Syntax erroer

    Hi All,
    two formulas (to uppercase) in the transfer rules maping
    after the migration of transfer rules,activation of transfermation i am getting this error for two fields.
    Rule 73 (target field: 0RPA_OID group: 01 Standard Group): Syntax error in formula.
    can anybody tell me how to resolve it.

    Hi ,
    This is a common problem which we get after migrating to BI7 .
    Do one thing copy the formula some where and delete the formula save it activate it . then create the formule once again .
    save it and then activate it . You will not get syntax error any more .
    Regards
    Santosh

  • Issue in mapping the same source and target fields

    Hi All,
    I am working on PI 7.0 and currently I am connecting to PI 7.0 via citrix desktop . Problem here is : in the mapping , direct mapping option that is available to map the same source and target fields is disabled . I do know that this is due to some java version issue .
    What I want to know is there any possibilty of solving this issue without installing an updated java version ?
    Regards
    Vinay P.

    I've faced the same for many times and all of that were due to Java version.
    1st of all, you have to check the authorizations you have. If you have enough (DEVELOPER_J2EE, CONTENT_ORGANIZER_J2EE, and so), and - obvious but very often forgotten - you have to assure you're trying to change it in the message mapping change mode On.
    Then, last shot should be downgrade your Java version.
    The 1.4.2 JRE version allow you to use not only the Mapp the Identical field but also Dependencies, Clear Mapping and some other tools/buttons. As mentioned above, if there's a fix in the new Java releases, I do not know (hope so) and would appreciate if you could let us know.
    Tks.

  • Picking up required Characteristics from my Source field to Target field!!

    Hi ,
    I need to pick up data from  a source field that is 35 characters long to a target field in my Cube that is only 4 char long. But the data that will be fed into this source field will be 4 char long only, so can anyone help me with picking up only the 4 char I need into my target field.
    Is this possible, If yes kindly post the routine that will allow me to concatenate the remaining characteristics and pick up only the 4 char I need.
    Thanks,
    Guru.

    Also, if this is the behaviour of the infoObject at all the places it is to be used, you can created Global Transfer Routine at infoObject level.
    Otherwise you can write the routine in transformations, rule type "Routine" and then the avaiable source field can be used.
    A simple example:
    I needed to build a character date field for a cross-platform integration project I was working on. First, I defined the date field:
    data: datechar(10).
    To build the date lets use sy-datum, which has the current system date.
      write SY-DATUM+4(2) to datechar+0(2).
      write '/' datechar+2(1).
      write SY-DATUM+6(2) to datechar+3(2).
      write '/' TO datechar+5(1).
      write SY-DATUM+0(4) to datechar+6(4).
    Value of SY-DATUM 20010616
    Here's how the field changes with the execution of each line.
    06________
    06/_______
    06/16_____
    06/16/____
    06/16/2001
    Hope this helps.
    Cheers,
    Sumit

  • Copy first source context to target field

    Hi,
    As I have not worked with the manipulation od contexts very much, I currently have the following problem.
    Source message has 5 contexts of a segment <Partner> and the information in the first context needs to go into target field 1 as it is related to a specific type of partner and the other remaining contexts need to go into target field 2.
    Therefore my question (albeit a pretty simple one I hope) is how do I detect the first context and move it into target field 1 ??
    Thanks
    Colin.

    you can use the function "count" to compare:
           count
                 equalS 
    constant(1) /        
                           ifWithoutElse
                  partner /

  • Source selection derived from target field Cons Chart of Accts is empty

    Dear,
    When I run the LDS, The system issues this error message :
    "Source selection derived from target field Cons Chart of Accts is empty"
    Although, mapping of Cons Chart of Accts   in LDS for this method is defined as constant value.
    I can't load data from raw data cube. What can be the reason ?
    Thanks,

    Source selection derived from target field Cons Chart of Accts is empty
    Message no. UCT8257
    Diagnosis
    The system derives the source selection from the selection for target field Cons Chart of Accts. The resulting source selection is empty.
    System Response
    The system cannot read any source data.
    Procedure
    Examine the mapping rule for field Cons Chart of Accts. Make sure that the inversion of the mapping rule does not produce an empty selection or lead to conflicting values.

  • LSMW - The source field is longer than the target field in MEK2

    Hi,
    I tried to create a simple LSMW script to end date condition records using MEK2 transaction.
    I provide Condition type, Plant, Material, Start Date and default Valid from and Valid to dates.
    When the program is generated, it defines just 1 character for Start date and when I try to map the date field from source, it gives following error message.
    Attention: The source field is longer than the target field.
    Message no. /SAPDMC/LSMW_OBJ_040013.
    Not sure why it is happening. I am on 46C.
    Please let me know if anybody come across such situation. I have checked all aspects, tried recreating in different systems but ended up with the same problem.
    You help in this regard will be highly appreciated.
    Regards
    Kasi

    It is a standard error, and I have not found any OSS note to fix it. In order to solve it, you can use this workaround:
    - Export the recording into a txt file
    - Edit the file, and modify the information correspondent to domain, data element and lengths (internal and external) fields, and save it
    - Import the recording
    For example, I had problems in a recording with the field SEL_DATE of the transaction VB02. Then, I changed these values:
    Values before changes:
    /SAPDMC/LSGBDC                ZTEST          ZVB02_ZA01     0018                                        0000 SEL_DATE                                                                                DATE_ON                       Valid on                                                    CHAR1                         CHAR1                          SEL_DATE                                                    0000000000                              000001000001000001CHARC
    Values after changes:
    /SAPDMC/LSGBDC                ZTEST          ZVB02_ZA01     0018                                        0000 SEL_DATE                                                                                DATE_ON                       Valid on                                                    DATUM                         DATAM                          SEL_DATE                                                    0000000000                              000010000010000010CHARC
    (values 01 has been replaced by values 10)
    The values changed correspond to fields:
    /SAPDMC/LSGBDC-PARDOMAIN
    /SAPDMC/LSGBDC-PARDATAELEMENT
    /SAPDMC/LSGBDC-LENG
    /SAPDMC/LSGBDC-INTLEN
    /SAPDMC/LSGBDC-OUTPUTLEN
    The information that you have changed should be updated in table /SAPDMC/LSGBDC, where all the information of the recordings is stored. Check this information has been updated after recording import.
    I hope this solution be useful for anyone...
    Regards.

  • Which Master data Source (Attr) is available for the field VBUK-GBSTK

    Hi
    Which Master data Source (Attr) is available for the field VBUK-GBSTK (Document Status).
    Please help me.
    Thanks
    Mannev.

    Hi Mannev.
    I don't think that you will find GBSTK in any master data source. It is however available in 2LIS_11_VASTH.
    Hope it helps.
    BR
    Stefan

Maybe you are looking for

  • How do I get rid  of a download?

    I have a movie that was downloaded, but now, after thinking I deleted it, it keeps coming back. How do I get rid of the movie permanently?

  • Using Tabbed Panels

    I have placed a tabbed panel on the master slide used for each of the staff biography pages in our corporate web site.  The panel has two tabs; one for a personal statement and the second for facts about each staff member (Year joined the firm, profe

  • Account: All pages appear Blank, Nav Bar only displays - (Ref: CE-1694)

    Status: Investigating Affects: Some Users Description:  Some members have reported logging in to Tagged and seeing blank pages throughout their account, with only the Nav Bar at the top of their account visible. We've verified this issue on some acco

  • Editing PHP pages containing forms crashes Dreamweaver

    I have a small intranet project I'm using for doc storage and retrieval on a localhost machine. Have Windows XP, DW CS3, MySQL DB, and phpMyAdmin. The project was working fine up until about a week ago. Now, whenever I place my cursor in an area of t

  • Need Certificate Widget for Cap 5 with Auto Date

    Okay, folks--I've spent a half day on this and it's time to throw up my hands. I've wandered all over the internet, sure I would find the answer, but no. I'm not a Flash developer or a code afficianado. I'm just your average instructional designer tr