Jakarta Beanutils - Conversion rules for null

Hi all,
I am using the BeanUtils.copyProperties(target, source) method to copy my Struts ActionForm String-only fields into my Business JavaBean's typed fields (String, Boolean and Integer fields).
The thing I am having trouble understanding is if there is no request variable sent for a particular value, this value is null in the Struts action form - but the copyProperties method uses this null String to populate an Integer field on my business bean as new Integer(0) - and not simply populating this value with null.
This doesn't seem intuitive to me - if the HTML form had no value for a certain field, I expect both ActionForm and Business bean to also have a null value - the the form have the value "0", then I would expect this to get mapped through to new Integer(0) in the back end.
Is there any documentation that explain the default BeanUtils conversion rules, or ways or adjusting these rules programatically ?
I have browsed the jakarta site for a while, but not seem anything of immediate use, and google isn't helping at all !
Many thanks for you help,
Ben

It certainly seems that all null Strings get mapped to the "default primitive value" for the wrapper class - 0 for Integer, false for Boolean etc...
I think the problem here is I was looking for the copyProperties method to be a bijection (1 to 1 mapping) between String and Integer, e.g."1" maps to new Integer(1), and Integer(1) maps to "1"
"0" maps to new Integer(0), and Integer(0) maps to "0"
null String maps to null Integer, and null Integer maps to null StringBut it seems null String maps to new Integer(0), and new Integer(0) maps back to "0" - which is not my original value.
Anyone know how to force this behvaiour or explain why the library doesn't follow what is, AFAICT, a more logical conversion scheme ?

Similar Messages

  • Error in global conversion rule for InfoObject 0PERSLANGU when activating

    Dear Experts
    We are working on HR in BI7.0 with Ehp1.
    I am trying to Activate the Transfer Rules of 0HR_PA_PA_1 DataSource which has the BID (BW Development) as the Source System to itself in order to load 0PAPA_C02 (Headcount) InfoCube.
    When trying to Activate, it gives the following error message:
    Error in global conversion rule for InfoObject 0PERSLANGU
    Message no. RSAR263
    Diagnosis
    Errors with the global conversion rule for the field 0PERSLANGU.
    System Response
    The function module delivers the following error message:
    Incorrect statament: Expression missing Operand mi
    Procedure
    Check the definition of the global conversion rule for an InfoObject.
    In fact, we are Re-implementing 3.0b BW System in new BI7.0 Ehp1 System. I have checked the Config of InfoObject 0PERSLANGU to the one available in existing BWP (3.0b Production) system and it's all the same.
    Has anyone come across similar error message and how did you resolve. Any help is very much appreciated.
    Many Thanks,
    Chandu

    HI Chandu ,
    It is a bug in the system , can you take a look at the SAP note
    Note 1070702 - RSAR 263: Error in global conversion rule for InfoObject
    Hope it helps ,
    Regards,'
    Sathya

  • 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

  • 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

  • Error in global conversion rule for InfoObject when Activating 2LIS_11_V_IT

    Hello,
    I am facing several issues while activating the Content. For 2LIS_11_V_ITM I get the following message:
    Error in global conversion rule for InfoObject 0INCOTERMS2
    Message no. RSAR263
    Diagnosis
    Errors with the global conversion rule for the field 0INCOTERMS2.
    System Response
    The function module delivers the following error message:
    Incorrect statament: Expression missing Operand mi
    Procedure
    Check the definition of the global conversion rule for an InfoObject.
    Any suggestion?
    thanks,

    Hi Mohan,
    seems this message is common when activating BI_CONT.
    I believe what i did was:
    - go to the InfoObject
    - verified Object Routine (check) (then was ok).
    - Removed Object form DS
    - Activated DS  (w/o info object was giving problems)
    - Placed InfoObject back to the DS
    - Activated DS but now including Info Object
    Believe that worked for me.
    Let me know how it goes.

  • Error in global conversion rule for 0DOC_CATEG

    Hi Friends,
    My transfer rules are inactive for 2LIS_11_VAITM. When i tried to get activate i am getting the below error message...
    Error in global conversion rule for 0DOC_CATEG
    How i can activate the transfer rules.
    is there any global routine for this infoobject.
    Please suggest a solution.
    Thanks & Regards,
    Anand

    Hi Reddy,
    Goto Change mode of the info object 0DOC_CATEG. Just edit the description of 0DOC_CATEG by adding a "." and activate it.
    Again change the description by removing the "." and activate the info object.
    After doing this, activate the transfer rules. It'll work fine.
    -- Selva

  • ALE : conversion rule for field value to become null

    Dear experts,
    I need to pass a material from one system to another with ALE. The problem is that the field marc-prctr (profit center) of this material is populated in the first system, but it does not exist in the second, so I assume transaction bd79 should be used to convert somehow the value of prctr to initial.
    How can I do that??? I have already tried defining a conversion rule and assigning it to message type MATMAS, segment E1MARCM, but it did not work.
    Please help.

    Did you check this?<a href="http://help.sap.com/saphelp_erp2005/helpdata/en/d3/06f6679aaf0e44b67ca6d6b58d91df/content.htm">http://help.sap.com/saphelp_erp2005/helpdata/en/d3/06f6679aaf0e44b67ca6d6b58d91df/content.htm</a>

  • Error in Global Conversion rule for InfoObject

    Hi Gurus,
                  I am working on SAP NetWeaver 2004s BW 7.0, I have extracted the SD cube 0SD_C03(sales overview) content from the business content and noticed the infoobject's transfer rules are not active and when i tried to active them i am getting the following error "Error in global conversion rule fro infoObkect 0DOC_CATEG"
    "NO PSA exits for the infoObject 0DOC_CATEG"
    Please help me to resolve the problem.
    Thanking you
    Mrudul.

    Hi,
    This solution of dummy change in routine worked for me.
    Thanks!!!
    Regards,
    Rohit
    Edited by: Rohit Chhaparwal on Feb 23, 2010 12:18 PM

  • 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

  • Need conversion rule for field PACKNR

    Hi all
    I am trying to insert PACKNR field from flat file to Data Base Table KONDP. I am getting the PACKNR field as 75 from flat file in order to upload it to data base table i need to Convert it in internal format IVPHv6g}0MZX08002hqR8m.
    How can i encode PACKNR 75 as  IVPHv6g}0MZX08002hqR8m?
    Regards,
    Aboli.

    Domain of PACKNR has a converion routine.
    Double click in table on dataelement of PACKNR and next double click on domain of this dataelement.
    Now you see exit routine, double click on this and you will get two routines:
    CONVERSION_EXIT_VHUPI_INPUT
    CONVERSION_EXIT_VHUPI_OUTPUT
    Edited by: Micky Oestreich on Jun 18, 2009 1:10 PM

  • Conversion rule executed in sender and receiver system?

    Hello experts,
    I want to send an Idoc from one SAP system to another.
    Both systems are in the same transport line.
    In the sender system I want to execute a field conversion. There
    Therefore I maintained BD62 (Define Conversion Rule), BD55 (activate Conversion Rule for Sender/Receiver combination) and BD79 (Specifie Conversion).
    The mapping works perfectly.
    The creation of the IDoc and the field conversion work perfectly.
    But I get an error in the receiver system.
    It seems that this system also tries to execute the fieldmapping, because it has the same BD55 (sender/receiver) settings.
    The conversion rule itself does not exist in the receiver system, as these settings are not contained in a transport request.
    What is the correct way? Can I customize BD55 not to generate a transport request and maintain this setting only in the relevant system?
    Or do I need to maintain BD79 and BD62 also manually in the receiver system?
    any hints
    Barbara

    Hi Barbara,
    you have to maintain BD79 and BD62  manually in all receiver Systems.
    Kind regards
    Werner

  • ALE Conversion rules not processed

    Hi all,
    I defined some conversion rules for an inbound IDoc with trascation BD79 in my backend system.
    If I send an IDoc from XI to the backend system the rules are ignored:
    Status 64
    No filters , <b>No conversion</b> , No version change .
    If I try the <u>SAME</u> Idoc with WE19 using the standard inbound, it works:
    Status 64
    No filters , <b>Fields converted</b> , No version change.
    Any idea? I guess it's a bug.
    Thank you.
    Stefano

    <b>FYI</b>
    http://help.sap.com/saphelp_erp2005/helpdata/en/80/411a73382b44d0a1667816716f5b37/content.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/f9/c3075cac7d11d39460005004580996/content.htm
    Hope this’ll give you idea!!
    <b>Pl... award the points.</b>
    Good luck
    Thanks
    Saquib Khan
    "Some are wise and some are otherwise"

  • CONVERSION  RULE

    hi,
    plz suggest me anything(their types,significance etc.) about CONVERSION RULES in ABAP

    Conversion Rules for Internal Tables
    Internal tables can only be converted into other internal tables. You cannot convert them into structures or elementary fields.
    Internal tables are convertible if their line types are convertible. The convertibility of internal tables does not depend on the number of lines.
    Conversion rules for internal tables:
    Internal tables which have internal tables as their line type are convertible if the internal tables which define the line types are convertible.
    Internal tables which have line types that are structures with internal tables as components are convertible according to the conversion rules for structures if the structures are compatible.
    Also check these links..
    http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb34d0358411d1829f0000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/59/ae3cfe488f11d189490000e829fbbd/frameset.htm

  • Conversion rules

    hi,
    plz suggest me anything(their types,significance etc.) about CONVERSION RULES in ABAP.

    Hi,
       Thank you very much. if you have any example document for how to write conversion rules for and master idoc such as material or customer, please send to [email protected]
    Cheers,
    Kannan.

  • About conversion rule in BD79

    Dear experts,
    I would like to fall back on your help on the conversion rule in BD79.
    In our system, there is a HTTP connection used for sending IDoc to the website. The Unit of measurement need be converted when sending out to the receiver side. The problem is when I converted using BD79 with rule type 'Conver Sender fields', set conditon to convert unit '%' to 'wt%', but the value in recerive field always display in Upper letters('WT%').
    Can anyone help me on this problem? if it can not be realized in this way, please show me another possible solution.
    Besides, is it possbile to convert '%' to 'wt%' with some condition to make it just apply to some spectial characteristics?
    Many thanks in advance.
    Regards,
    Benny

    Hi sudeep
    Could you let me know  the exact steps you did to  create the conversion rule for idocs.
    Thanks in Advance

Maybe you are looking for

  • Read Data from a different presentation server using IP address

    Hi Experts, I have a excel file on a system with ip a.b.c.d...I want to upload data from that excel into SAP. I am able to achieve it by using gui_upload function module by specifying file path in the format as   a.b.c.d\Shared\abc.xls. But, i am abl

  • Tolerance Limits for Date and quantity..??

    Hi Experts, We would like to set the GR Tolerance Limits in the Configuration level. how to set the Tolerance Limits for Date and quantity..?? if we created PO 100qty and date 01-05-009. if we receive the goods on 20-04-2009 and 50qty... For GR .. Mi

  • Where are the Schemas Stored in 5.5 SP4?

    Hi Experts, I am using SAP MDM 5.5 SP4. From Syndicator, when I open a Port, I can see the schema structure in Item mapping. I would like to know where are these Schemas physically stored? NOTE: I do not see the path/schema/xsd in Console under the '

  • Online Portfolio

    There are quite a few different options for an online portfolio out there but I found most of them to either be difficult to modify or have too many features that I didn't need or want. So I took a shot at building my own. I would really appreciate y

  • I've deleted ThotKey using a third-party tool on my Tecra notebook

    Hello, My laptop was slow. So I used hijackthis and found few suspicious entries. I deleted them. One of them was thotkey. Now my function keys are not working. So FN + F1 to FN + F12 is not working. I have Tecra A series with XP 32-bit OS. From wher