JDBC data conversion rules

Is there any document specifying the conversion rules for JDBC?
Specifically, ODBC says when a character array is passed to a BINARY column, two bytes of character data should be converted into a single binary byte. For eg. "01" becomes 00000001 and "ff" becomes 11111111. Similarly, when data is retrieved from a BINARY column as a character array, each byte is converted into two characters. Do these rules hold for JDBC as well?
Thanks!
Ravi

Is there any document specifying the conversion rules
for JDBC?
Specifically, ODBC says when a character array is
passed to a BINARY column, two bytes of character data
should be converted into a single binary byte. For eg.
"01" becomes 00000001 and "ff" becomes 11111111.The reference I have is for ODBC 3.5, and looking at SQLPutData I don't see anything like that. That method doesn't even differentiate between types of data.
I also checked for blobs and conversions and I didn't find anything that says that.
What happens when one uses a database that supports both binary and char blobs and you really want to store hex information in a char blob?

Similar Messages

  • Data conversion rule manager & repository

    Hi All,
    We are running a fairly large legacy data conversion project from IMS and DB2 to Oracle which will involve quite a variety range of conversion/mapping rules (complex data manipulation to simple mapping). These requirement and rules involve both tech and business collaboration. Are there any data conversion rule managers tool out there that provide these type of capabilities:
    1. Data conversion rule repository and version control
    2. collaboration features (e.g. collaboration editing, commenting, decision capture, approval...etc)
    We have check someed of the tools out there, and they are either generic requirement gathering tools, which is basically a few tabs with drop downs and a big text box, or some end-to-end data conversion automation solutions, which focus the execution of the data conversion instead of managing & tracking conversion rules.
    Can anyone you help? please let me know if there is anything comes close that is practical and useful. Thank you.

    Tubby, thank you for the info. Yes, we actually use ODI as a DEV tool for data conversion rule implementation and execution between our staging DB and target DB. However, ODI does not really have the capability to allow our tech and business to collaborate together and focus on "getting all these rules defined correctly". Having say that, ODI does have many very useful side features for our DEV to leverage and share information such as knowledge module and data mapping...etc
    We would hope to have a practical data rule management tool & repository that allows tech and business to work together and gather all the rules and build up all the knowledge base in 1 single place. DEV/QA can then take away and focus on the implementation and validation.
    Please let me know. Thank you very much.

  • Data Conversion rules for EDI processing (same client IDOC processing)

    Hi,
    I am trying to post IDOCS in same client.Its a PO->SO process.
    ie. there will be 1 outbound and inbound idoc in same client using EDI processing.
    I am using Data Conversion using Rulesfor converting sender fields.
    The LIFNR and PAORG od segment E1EDKA1 has to be converted.
    For ALE processing, the Data conversion is been done correctly.
    But no conversion is done for EDI.
    Can anybody help me with this problem ?
    Thanks in advance.
    Regards
    Megha

    Issue solved

  • Data Conversion Logic

    I am now trying to implement a data conversion logic(such as UOM field), I want to load all the data conversion rules in the cache from file and keep them in the cache. So when mapping starts it just picks up the data conversion rules from the cache.
    Using GlobalContainer it is ok for one mapping even several UOM fields(just load from file once). But it will load from file again when the mapping is triggered again.
    Is there any logic I can use to implememt the data conversion just load from file once?
    Regards,
    Nick

    Hi Arnold,
    normally every input should be made in LC, why you enter the data in group currency?
    However if you have to start from group currency the only solution to avoid this error is to put at the end of sprunconversion the ON_ERROR_CONTINUE clause.
    But remember he will stop to notify every type of error so you have to be very careful and have this clear in mind when some issue occurs with the currency conversion.
    Regards
         Roberto

  • Data conversion questions

    Hi Everyone,
    I'm confused by the data conversion rule and how to do it in abap, could you help me about some of my questions?
    1. How many ways to do data conversion ( like assignment .....)?
    2. When using field symbol, we know we can assign reference to field symbol , and at mean time , we can casting type.
        Is this kind of casting also a way to do data conversion?
    3. In my real case, I have unknown type data to convert to xstring. the type could be any ( I, D, T, STRING......). Is there an easy way to implement that when I get the data reference, I only need to import it to a method and then the method return an xstring to me?
    4. question 3 is about data->xstring, and how can I convert xstring back to the original data( should be the same type )?
    Thanks and Regards,
    Aaron

    Hi Aaron,
    try this FM:     CONVERSION_EXIT_ALPHA_INPUT
    is useful for convert different data type, here an example:
         call function 'CONVERSION_EXIT_ALPHA_INPUT'
              exporting
                input         =   A    ( type unknown )
              importing
                output        =  B  ( type xstring ).
    Perhaps that helps,
    Regards,
    Davide

  • Date Conversion Routine in Transfer Rules

    Hi,
    Could you help me writing ABAP code for converting date field MM/DD/YYYY in to
    the same format. But my InfoObject is 8digit and displays into 10 digit DATS type Object. After loading data it is looking different formats at different loacations. Example:
    Data input from Flatfile: 11/18/2007 (MM/DD/2007)
    Data in PSA :               11/18/20
    Data in ODS:                11/18/2020.
    Please flash some light on it, I will assign points.
    Currently I wrote some code on it,
    PROGRAM CONVERSION_ROUTINE.
    Type pools used by conversion program
    TYPE-POOLS: RS, RSARC, RSARR, SBIWA, RSSM.
    Declaration of transfer structure (selected fields only)
    TYPES: BEGIN OF TRANSFER_STRUCTURE ,
      InfoObject ZENTRY_ID: CHAR - 000018
      /BIC/ZENTRY_ID(000018) TYPE C,
      InfoObject ZCREA_EDT: CHAR - 000008
        /BIC/ZCREA_EDT(000008) TYPE C,
      InfoObject ZPRIORITY: CHAR - 000010
      /BIC/ZPRIORITY(000010) TYPE C,
      InfoObject ZC_EDT_TI: CHAR - 000006
      /BIC/ZC_EDT_TI(000006) TYPE C,
      InfoObject ZMODI_GMT: CHAR - 000008
      /BIC/ZMODI_GMT(000008) TYPE C,
      InfoObject ZDD_DIFF: CHAR - 000016
      /BIC/ZDD_DIFF(000016) TYPE C,
      InfoObject 0RECORDMODE: CHAR - 000001
      RECORDMODE(000001) TYPE C,
    END OF TRANSFER_STRUCTURE .
    Global code used by conversion rules
    $$ begin of global - insert your declaration only below this line  -
    TABLES: ...
    DATA:   ...
    $$ end of global - insert your declaration only before this line   -
          FORM COMPUTE_/BIC/ZCREA_EDT
    Compute value of InfoObject ZCREA_EDT
    in communication structure /BIC/CSZ_IS_REMTEST
    Technical properties:
        field name      = /BIC/ZCREA_EDT
        data element    = /BIC/OIZCREA_EDT
        data type       = DATS
        length          = 000008
        decimals        = 000000
        ABAP type       = D
        ABAP length     = 000008
        reference field =
    Parameters:
    -->  RECORD_NO       Record number
    -->  TRAN_STRUCTURE  Transfer structure
    <--  RESULT          Return value of InfoObject
    <->  G_T_ERRORLOG    Error log
    <--  RETURNCODE      Return code (to skip one record)
    <--  ABORT           Abort code (to skip whole data package)
    FORM COMPUTE_/BIC/ZCREA_EDT
      USING    RECORD_NO LIKE SY-TABIX
               TRAN_STRUCTURE TYPE TRANSFER_STRUCTURE
               G_S_MINFO TYPE RSSM_S_MINFO
      CHANGING RESULT TYPE /BIC/OIZCREA_EDT
               G_T_ERRORLOG TYPE rssm_t_errorlog_int
               RETURNCODE LIKE SY-SUBRC
               ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel datapackage
    $$ begin of routine - insert your code only below this line        -
    DATA: l_s_errorlog TYPE rssm_s_errorlog_int.
      <b> RESULT = TRAN_STRUCTURE-/BIC/ZCREA_EDT.
         REPLACE ALL OCCURRENCES OF '/' IN RESULT WITH ''.</b>
    returncode <> 0 means skip this record
      RETURNCODE = 0.
    abort <> 0 means skip whole data package !!!
      ABORT = 0.
    $$ end of routine - insert your code only before this line         -
    ENDFORM.
          FORM INVERT_/BIC/ZCREA_EDT
          Inversion of selection criteria for InfoObject ZCREA_EDT
          This subroutine needs to be implemented only for SAP RemoteCubes
          (for better performance) and for the Report/Report Interface
          (drill through).
    -->  I_RT_CHAVL_CS       Ranges table for current InfoObject
    -->  I_THX_SELECTION_CS  Selection criteria for all other InfoObjects
    <--  C_T_SELECTION       Selection criteria for fields of
                              transfer structure
    <--  E_EXACT             Flag: Inversion was exact
    FORM INVERT_/BIC/ZCREA_EDT
      USING    I_RT_CHAVL_CS      TYPE RSARC_RT_CHAVL
               I_THX_SELECTION_CS TYPE RSARC_THX_SELCS
      CHANGING C_T_SELECTION      TYPE SBIWA_T_SELECT
               E_EXACT            TYPE RS_BOOL.
    $$ begin of inverse routine - insert your code only below this line-
      DATA:
        L_S_SELECTION LIKE LINE OF C_T_SELECTION.
    An empty selection means all values
      CLEAR C_T_SELECTION.
      L_S_SELECTION-FIELDNM = '/BIC/ZCREA_EDT'.
    Selection of all values may be not exact
      E_EXACT = RS_C_FALSE.
    $$ end of inverse routine - insert your code only before this line -
    ENDFORM.

    Date is getting truncated in PSA due to /BIC/OIZCREA_EDT being defined as DATS with length 8.
    Try changing the date format in the flat file to MMDDYYYY(remove '/' in the file format).
    Take a look at this link as well...
    http://help.sap.com/saphelp_nw2004s/helpdata/en/43/01ed2fe3811a77e10000000a422035/frameset.htm

  • Data records in an IDoc getting erased, when conversion rules are defined

    Hello ,
    We are sending IDocs of message type GLMAST & COELEM from a system(version 4.7) to another system (version 4.6B).
    The segment data in the IDocs are changed using the user exit enhancement KKCD0001. The function exits used are EXIT_SAPFKCIM_001 and EXIT_SAPFKCIM_002.
    If there is no conversion rule defined in the receiver system, for the segments, the IDocs are posted correctly in the receiving system.  But if we define conversion rules , then the data records for all the segments for which conversion rule is defined are getting erased, and an error occurs during processing of IDocs
    Please let me know what can be the the reason behind this issue..And how to solve this..
    Thanks in advance,
    Afsar

    Issue solved

  • Copy data from one SAP system to another based on conversion rules

    Hi All,
    Please provide your input on how can we copy data from one SAP system to another based on conversion rules.
    Conversion rule :
    vkrog in 110  vkorrg in 120
    1234            4567   
    <<text removed>>
    Thanks
    Edited by: Matt on Feb 16, 2009 4:35 PM

    Please read the Rules of Engagement here: Please read "The Forum Rules of Engagement" before posting!  HOT NEWS!!
    Please note that offering points is against the rules.
    matt

  • Executing xml sql using jdbc adapter for date conversion

    Hi experts,
    I am following the fllowing blog for date format conversion for a jdbc receiver.
    /people/alessandro.berta/blog/2005/10/04/datetime-datatypes-and-oracle-database
    I constructed my graphical mapping to generate the following query
    DateField in receiver structure = TO_DATE('2008-03-24','DD-MON-YY')
    attribute hasQuot = No
    The result that i want is 24-MAR-08
    I am getting the error in communication channel monitoring as does not match string format.
    The database gets successfully updated without this date conversion. But when i try to use this, it give the above error.
    Is there any other configuration to be done to make the adapter execute this statement?
    Regards,
    Shamly

    The issue is solved.
    The SQL statement was wrong.
    The correct version is,( as was specified in the blog ) :-
    DateField in receiver structure = TO_DATE('2008-03-24','YYYY-MM-DD')
    Automatically in the database it is converted to 24-MAR-2008
    Edited by: Shamly MM on Mar 27, 2008 8:01 AM

  • How to implement a conversion rule in KC7R (External Data transfer-Tool)

    Hi,
    I am familiar with programming conversion rules in ABAP in the LSMW and IS-U Migration workbench.
    Unfortunately we have to work with EDT (transaction KCLJ).
    I need to implement a simple conversion rule: migration file has the external BP number BPEXT and I must retrieve the internalone (PARTNER) for the migration program.
    So I must implement a short ABAP code (select single * from BUT000 ...).
    Now I see that in KC7R you can use constants and conversion rules. There are also "General Ruels" and "conversion routines".
    Can someone explain how to implement this simple ABAP conversion rule in KC7R giving a short example?
    This would be great.
    EDT is the workst of all SAP Standard Migration Tools I have seen.....
    Kind regards,
    Thomas

    Thomas,
    Coud you please share your findings as I am now in a similar to your original post.
    ie I too would like to know how to code convesions for use within the transfer rules used by KCLJ.
    Kind Regards,
    Hiten Mistry.

  • Error in global conversion rule for InfoObject 0INCOTERMS2

    When I activate BI content 2LIS_12_VCITM with transfer rule, The transfer rule was error with the message " Error in global conversion rule for InfoObject 0INCOTERMS2" and Mgs No. 263.
    The transfer rule cannot be activated.
    I checked the 0INCOTERMS2 infoObject . The global conversion rule is no error.
    The global conversion is in below.
    ============================================================
    PROGRAM CONVERSION_ROUTINE.
    Type pools used by conversion program
    TYPE-POOLS: RSD, RSARC, RSARR.
    TYPES: DE_0INCOTERMS2(000028) TYPE C.
    Conversion rule for InfoObject 0INCOTERMS2
        Data type       = CHAR
        ABAP type       = C
        ABAP length     = 000028
    FORM CONVERT_0INCOTERMS2
      USING    RECORD_NO LIKE SY-TABIX
               SOURCE_SYSTEM TYPE RSA_LOGSYS
               IOBJ_NAME TYPE RSIOBJNM
      CHANGING RESULT TYPE DE_0INCOTERMS2 " InfoObject value
               RETURNCODE LIKE SY-SUBRC.
    $$ begin of routine - insert your code only below this line        -
      TRANSLATE RESULT TO UPPER CASE.
    $$ end of routine - insert your code only before this line         -
    ENDFORM.
    =================================================================
    If you have any idea or face the similar problem, please suggest solution.
    Thank you.

    Good afternoon,
    If you have not done so already can you apply the SAP note  1387854 in your system and it should prevent the problem from happening again. If you also reactivate the infoobject  0INCOTERMS2 in RSD1 then it should be possible to manually activate the  transfer rule.
    Best Regards,
    Des

  • Problem in creating jdbc-data-vew to oracle10g

    I have installed DSEE7.0 and setup the directory proxy server successfully
    my oracle environment:
    ip=202.205.16.93
    sid=nicdbs
    table: CAMPUS.CAMPUS_USER { USERID, NAME, TEL, EMAIL }
    my steps (refer to the administrator guide a reference):
    dpconf create-jdbc-data-source -b nicdbs -B jdbc:oracle:thin://202.205.16.93:1521: -J file:///opt/sun/dsee7/var/jdbc/ojdbc14.jar -S oracle.jdbc.driver.OracleDriver oracleds
    dpconf set-jdbc-data-source-prop oracleds db-vendor:oracle
    dpconf set-jdbc-data-source-prop oracleds db-pwd-file:/etc/oraclepass.txt
    dpconf create-jdbc-data-source-pool oraclepool
    dpconf attach-jdbc-data-source oraclepool oracleds
    dpconf create-jdbc-data-view oracleview oraclepool o=oracle
    dpconf create-jdbc-table user CAMPUS.CAMPUS_USER
    dpconf add-jdbc-attr user uid USERID
    dpconf add-jdbc-attr user cn NAME
    dpconf add-jdbc-attr user telephoneNumber TEL
    dpconf add-jdbc-attr user mail EMAIL
    dpconf create-jdbc-object-class oracleview person user uid
    every thing return succefully
    but when I test the view by
    ldapsearch -b o=oralce -x uid=1422
    it returns:
    ldap_search: DSA is unavailable
    ldap_search: additional info: Unable to process the search request. Reason: [Original error=52] No JDBC server available.
    i cant get any help from this error message.I want some help, Maybe some steps were left.
    thanks in advace.

    thanks but it didn't solve it,
    ldapsearch -b o=oracle uid=1422
    ldap_search: DSA is unavailable
    ldap_search: additional info: Unable to process the search request. Reason: [Original error=52] No JDBC server available.
    i also have tried:
    db-name: (CONNECT_DATA =(SERVICE_NAME = nicdbs))
    db-url: jdbc:oracle:thin:@(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = 202.205.16.93)(PORT = 1521)))
    but it still didnt work.
    #[root@dsee7 ~]# dpconf get-jdbc-data-source-prop oracleds
    db-name : nicdbs
    db-pwd : {3DES}+j6AoBZNIGx+7st/KDPgSmzVMlDcL6zs
    db-url : jdbc:oracle:thin:@202.205.16.93:1521:
    db-user : campus
    db-vendor : oracle
    description : -
    driver-class : oracle.jdbc.driver.OracleDriver
    driver-url : file:///opt/sun/dsee7/var/jdbc/ojdbc14.jar
    is-enabled : true
    is-read-only : false
    monitoring-inactivity-timeout : 2m
    monitoring-interval : 30s
    monitoring-mode : reactive
    num-connection-incr : 5
    num-connection-init : 5
    num-connection-limit : 30
    #dpconf get-jdbc-data-view-prop oracleview
    Enter "cn=Proxy Manager" password:
    alternate-search-base-dn : ""
    attr-name-mappings : none
    base-dn : o=oracle
    contains-shared-entries : false
    custom-distribution-algorithm : none
    description : -
    distribution-algorithm : none
    dn-join-rule : none
    dn-mapping-attrs : none
    dn-mapping-source-base-dn : none
    excluded-subtrees : -
    filter-join-rule : none
    is-enabled : true
    is-read-only : false
    is-routable : true
    jdbc-attr-date-format : yyyy-MM-dd
    jdbc-attr-time-format : hh:mm:ss
    jdbc-attr-timestamp-format : yyyy-MM-dd hh:mm:ss
    jdbc-data-source-pool : oraclepool
    lexicographic-attrs : all
    lexicographic-lower-bound : none
    lexicographic-upper-bound : none
    non-viewable-attr : none
    non-writable-attr : none
    numeric-attrs : all
    numeric-default-data-view : false
    numeric-lower-bound : none
    numeric-upper-bound : none
    pattern-matching-base-dn-regular-expression : all
    pattern-matching-base-object-search-filter : all
    pattern-matching-dn-regular-expression : all
    pattern-matching-one-level-search-filter : all
    pattern-matching-subtree-search-filter : all
    process-bind : -
    replication-role : master
    viewable-attr : all except non-viewable-attr
    writable-attr : all except non-writable-attr
    Edited by: mickypc1979 on Mar 1, 2010 4:31 PM

  • Errors with the global conversion rule for the field 0SOURSYSTEM.

    Hello Gurus,
        We are implementing CRM Activities. I enhanced the data source and when I add new info objects to 0SAL_DS01 DSO and trying to activate I'm getting there errors. Can some one please help me out in this problem?
    Error in global conversion rule for InfoObject 0SOURSYSTEM
    Message no. RSAR263
    Diagnosis
    Errors with the global conversion rule for the field 0SOURSYSTEM.
    System Response
    The function module delivers the following error message:
    Field "" is unknown. It is neither in one of t
    Procedure
    Check the definition of the global conversion rule for an InfoObject
    What does this error mean? We are using BI 7.
    Thanks
    RKR

    I have around 9 source systems, do I have to maintain data for all of them for 0SOURCESYSTEM?
    I set data for CRM system and then tried to activate.. but still I'm getting same error.
    I;m getting this warning too...
    InfoObject 0FISCVARNT needs to be in key for DataStore object C_0SAL_D
    Message no. RSDODSO123
    Diagnosis
    Characteristic 0FISCVARNT is included in the data part of ODS object C_0SAL_D.
    System Response
    The fiscal year variant cannot be used in the update rules for calculating business hour characteristics.
    Does this matter???
    Thanks
    RKR
    Message was edited by:
            RKR M

  • IDOC inbound conversion Rules

    Hi to all,
    I'm Implementing an Inbound Interface for Cost Centers using idoc message COSMAS and IDOC type COSMAS01.
    I want to modify IDOC data changing the cost center code by another one stored locally in a param table (Z*). 
    I think the best way to do this is by creating a conversion rule in BD72 than maintain and assign to Message type. The problem is that i have to select data from the Z* Table i need two parameters from the IDOC(LogicalSystem and cost center). How can I create a custom conversion routine or something to get this data from the Z table into the IDOC field (KOSTL).
    The conversion exits only have one import parameter and one export parameter.
    Do anyone had one problem like this?
    Thanks in advance to all.

    Hi,
    Please check the documentation in WE60 tcode and see if the fields are required to be passed...
    Regards,
    Nagaraj

  • LSMW Conversion rules

    Hi guys,
    i want to upload Material Master QM view data with LSMW into ECC6.0 version server, before that i want to write the conversion rules... plz can any send the conversion code i have writen below...
    1. If info record not maintained of vendor material, then maintain info record for material received in last three years for latest revision with release until date 31.12.2099.
    regards,
    murali

    plz send me the code.... urgent...

Maybe you are looking for

  • New drivers made programs show chinese charact

    Ok I'm getting kinda pissed here, I installed new drivers for my SB X-Fi Xtreme Music and, well, after the update was done, every textline in the default windows volume control is in chinese, and all the Creative related software is also in chinese,

  • How to get photos on full size display in photo book ?

    I am creating a photo book with iPhoto. What bothers me is....the smallest zoom function possibillity for the photo display inside the default frames, won't let me see the whole photosize. Wenn edeting the photos in iPhoto by double clicking, they do

  • Install of Extension Manager CC into CS6 hanging?

    I was invited to update Adobe Extension Manager in Photoshop CS6 64 bit on a Windows 7 64 bit platform.  The update downloads sucessfully (about 13.9Mb) and starts to install but never finishes?  I have tried disabling Internet security and Antivirus

  • 10.4 Tiger Server FTP has new mystery password

    10.4.11 Server I've been running the FTP site for my freelancers for 4 years without a hiccup. Over this past weekend it suddenly won't let them log on. When I go to administer the site to see what's up, there are 8 characters in the password box, bu

  • SQL Exception: Invalid column index while calling stored proc from CO.java

    Hello all, I am getting a "SQL Exception: Invalid column index" error while calling stored proc from CO.java # I am trying to call this proc from controller instead of AM # PL/SQL Proc has 4 IN params and 1 Out param. Code I am using is pasted below