1:n mapping using existing DB

Hi folks,
I have two Tables:
PARTNER and ADRESSE
were a partner can have n addresses.
I tried everything and from my point of view everything looks like the
example in the documentation but unfortunatelly it doesn't work.
I'm able to retrive PARTNER information but no ADDRESS's:
I get the following exception:
javax.jdo.JDODataStoreException:
com.solarmetric.kodo.impl.jdbc.sql.SQLExceptionWrapper: [SQL=SELECT
PARTNER.ADRESSENX FROM PARTNER WHERE PARTNER.ID = 2] [SQL=SELECT
PARTNER.ADRESSENX FROM PARTNER WHERE PARTNER.ID = 2] Column not found:
Unknown column 'PARTNER.ADRESSENX' in 'field list' [code=1054;state=S0022]
NestedThrowables:
com.solarmetric.kodo.impl.jdbc.sql.SQLExceptionWrapper: [SQL=SELECT
PARTNER.ADRESSENX FROM PARTNER WHERE PARTNER.ID = 2] [SQL=SELECT
PARTNER.ADRESSENX FROM PARTNER WHERE PARTNER.ID = 2] Column not found:
Unknown column 'PARTNER.ADRESSENX' in 'field list'
at
com.solarmetric.kodo.impl.jdbc.runtime.SQLExceptions.throwDataStore(SQLExcep
tions.java:23)
My meta data describton looks like this:
<?xml version="1.0"?>
<jdo>
<package name="com.tsystems.earchid.partner">
<class name="PartnerBO"
identity-type="application"
objectid-class="com.tsystems.earchid.partner.PartnerPK">
<extension vendor-name="kodo" key="table" value="PARTNER"/>
<extension vendor-name="kodo" key="lock-column" value="none"/>
<extension vendor-name="kodo" key="class-column" value="none"/>
<field name="pk" primary-key="true">
<extension vendor-name="kodo" key="data-column" value="ID"/>
</field>
<field name="name">
<extension vendor-name="kodo" key="data-column"
value="NAME"/>
</field>
<field name="vorname">
<extension vendor-name="kodo" key="data-column"
value="VORNAME"/>
</field>
<field name="anredeKey">
<extension vendor-name="kodo" key="data-column"
value="ANREDEKEY"/>
</field>
<field name="geburtsdatum">
<extension vendor-name="kodo" key="data-column"
value="GEBURTSDATUM"/>
</field>
<field name="anrede" persistence-modifier="none"/>
<field name="familienstand" persistence-modifier="none"/>
<field name="geburtsort" persistence-modifier="none"/>
<field name="titel" persistence-modifier="none"/>
<field name="typ" persistence-modifier="none"/>
<!--
one-to-many mappings never take schema extensions; all the
needed information is available from the related class and
its
inverse field
-->
<field name="adressen">
<collection element-type="AdresseBO"/>
<extension vendor-name="kodo" key="inverse"
value="partnerID"/>
</field>
</class>
<class name="AdresseBO"
identity-type="application"
objectid-class="com.tsystems.earchid.partner.AdressePK">
<extension vendor-name="kodo" key="table" value="ADRESSE"/>
<extension vendor-name="kodo" key="lock-column" value="none"/>
<extension vendor-name="kodo" key="class-column" value="none"/>
<field name="pk" primary-key="true">
<extension vendor-name="kodo" key="data-column" value="ID"/>
</field>
<field name="plz">
<extension vendor-name="kodo" key="data-column"
value="PLZ"/>
</field>
<field name="ort">
<extension vendor-name="kodo" key="data-column"
value="ORT"/>
</field>
<field name="strasse">
<extension vendor-name="kodo" key="data-column"
value="STR"/>
</field>
<field name="strasseNr">
<extension vendor-name="kodo" key="data-column"
value="HAUSNR"/>
</field>
<field name="landKey">
<extension vendor-name="kodo" key="data-column"
value="LAENDERKEY"/>
</field>
<field name="partnerID">
<extension vendor-name="kodo" key="pk-data-column"
value="PARTNERID"/>
</field>
</class>
</package>
</jdo>
Does anybod y know why the Adress table is not considered ?
Where is the problem ? I can't find anything in the examples and
documentation.
Please help me.
Regards,
Ingo

Hi Ingo, let me first say I don\'t work for SolarMetric, I\'m just a
fellow user like you, just getting started with Kodo. With that
\"disclaimer\", I think your problem is that you haven\'t mapped (in your
jdo) the ref columns:
<field name=\"adressen\">
<collection element-type=\"AdresseBO\"/>
<extension vendor-name=\"kodo\" key=\"inverse\"
value=\"partnerID\"/>
</field>I think you need to add to this field:
<extension vendor-name=\"kodo\" key=\"table\" value=\"ADRESSE\"/>
<extension vendor-name=\"kodo\" key=\"ref-column\" value=\"PARTNERID\"/>
and also remove your inverse. I hope I got that right, and hope it helps...
Kent
</class>
<class name=\"AdresseBO\"
identity-type=\"application\"
objectid-class=\"com.tsystems.earchid.partner.AdressePK\">
<extension vendor-name=\"kodo\" key=\"table\" value=\"ADRESSE\"/>
<extension vendor-name=\"kodo\" key=\"lock-column\"value=\"none\"/>
<extension vendor-name=\"kodo\" key=\"class-column\"value=\"none\"/>
<field name=\"pk\" primary-key=\"true\">
<extension vendor-name=\"kodo\" key=\"data-column\"value=\"ID\"/>
</field>
<field name=\"plz\">
<extension vendor-name=\"kodo\" key=\"data-column\"
value=\"PLZ\"/>
</field>
<field name=\"ort\">
<extension vendor-name=\"kodo\" key=\"data-column\"
value=\"ORT\"/>
</field>
<field name=\"strasse\">
<extension vendor-name=\"kodo\" key=\"data-column\"
value=\"STR\"/>
</field>
<field name=\"strasseNr\">
<extension vendor-name=\"kodo\" key=\"data-column\"
value=\"HAUSNR\"/>
</field>
<field name=\"landKey\">
<extension vendor-name=\"kodo\" key=\"data-column\"
value=\"LAENDERKEY\"/>
</field>
<field name=\"partnerID\">
<extension vendor-name=\"kodo\" key=\"pk-data-column\"
value=\"PARTNERID\"/>
</field>
</class>
</package>
</jdo>
Does anybod y know why the Adress table is not considered ?
Where is the problem ? I can\'t find anything in the examples and
documentation.
Please help me.
Regards,
Ingo

Similar Messages

  • Message Mapping using UseOneAsMoney

    Hi Experts,
    I am doing the Message Mapping as mentioned in the below blog. I am getting the Error as
    05:15:46 Start of test
    Exception:[com.sap.aii.mappingtool.tf7.FunctionException: Too few values in the first queue in function useOneAsMany. It must have the same number of contexts as the second queue] in class com.sap.aii.mappingtool.flib7.NodeFunctions method useOneAsMany[[Ljava.lang.String;@478d13c, [Ljava.lang.String;@17f0bc6f, [Ljava.lang.String;@3de327b0, com.sap.aii.mappingtool.tf7.rt.ResultListImpl@c42b38e, com.sap.aii.mappingtool.tf7.rt.Context@6f1a35eb]
    com.sap.aii.utilxi.misc.api.BaseRuntimeException: Exception:[com.sap.aii.mappingtool.tf7.FunctionException: Too few values in the first queue in function useOneAsMany. It must have the same number of contexts as the second queue] in class
    I have searched in other blog also and ended up with the same error. Please check and do the needful.
    The Basic Problem
    We have an IDoc ORDERS05 with purchase order information where each purchase order line item (represented by segment .<E1EDP01>) can contain multiple schedule lines (represented by segment <E1EDP20>). For example, we have 2 line items with 3, resp. 2 schedule lines. Then the corresponding portion of message ORDERS05 can look as follows:
       <E1EDP01>
          <POSEX>00010</POSEX>
          <E1EDP20 SEGMENT="1">
             <WMENG>15</WMENG>
          </E1EDP20>
          <E1EDP20 SEGMENT="1">
             <WMENG>44</WMENG>
          </E1EDP20>
          <E1EDP20 SEGMENT="1">
             <WMENG>3</WMENG>
          </E1EDP20>
       </E1EDP01>
       <E1EDP01>
          <POSEX>00020</POSEX>
          <E1EDP20 SEGMENT="1">
             <WMENG>32</WMENG>
          </E1EDP20>
          <E1EDP20 SEGMENT="1">
             <WMENG>12</WMENG>
          </E1EDP20>
       </E1EDP01>
    We want to map the information of the IDoc ORDERS05 to the message OrderCreate of the CIDX v4.0 standard. This message uses a more flat
    structure where the purchase order line items and the corresponding schedule lines are on the same level. The corresponding portion of the
    message OrderCreate (for the same information as in the IDoc) looks as follows:
       <OrderCreateProductLineItem>
    <PurchaseOrderLineItemNumber>00010</PurchaseOrderLineItemNumber>
          <ProductQuantity>15</ProductQuantity>
       </OrderCreateProductLineItem>
       <OrderCreateProductLineItem>
          <PurchaseOrderLineItemNumber>00010</PurchaseOrderLineItemNumber>
          <ProductQuantity>44</ProductQuantity>
       </OrderCreateProductLineItem>
       <OrderCreateProductLineItem>
          <PurchaseOrderLineItemNumber>00010</PurchaseOrderLineItemNumber>
          <ProductQuantity>3</ProductQuantity>
       </OrderCreateProductLineItem>
       <OrderCreateProductLineItem>
          <PurchaseOrderLineItemNumber>00020</PurchaseOrderLineItemNumber>
          <ProductQuantity>32</ProductQuantity>
       </OrderCreateProductLineItem>
       <OrderCreateProductLineItem>
          <PurchaseOrderLineItemNumber>00020</PurchaseOrderLineItemNumber>
          <ProductQuantity>12</ProductQuantity>
       </OrderCreateProductLineItem>
    The data in red correspond to data of the segment <E1EDP01>, while the information in blue correspond to data of the segment <E1EDP20> of the original IDoc. Note that the data in red need to be duplicated based on the occurence of segment <E1EDP20>.
    Solution 1
    A simple solution of this mapping problem exists under the assumption that in the IDoc ORDERS05 each segment <E1EDP01> contains at least one segment <E1EDP20>. Luckily this assumption holds true for IDocs created via the purchase order creation process in ERP.
    1. Mapping of <OrderCreateProductLineItem>
    The segment <OrderCreateProductLineItem> of the target structure needs to be created once for each occurrence of segment <E1EDP20> of our source structure. This can easily be achieved via the following mapping:
    Remember to change the context to IDOC.
    2. Mapping of <PurchaseOrderLineItemNumber>
    Since the information for the node <PurchaseOrderLineItemNumber> comes from the IDoc segment <E1EDP01>, this node needs to be replicated based on the occurrence of segment <E1EDP20> under each segment <E1EDP01>. This can be achieved using the node function useOneAsMany as follows:
    I will not describe the functionality of the node function useOneAsMany in detail since there is a lot of excellent documentation available on this function, for example in the SAP help . In our scenario you only need to change the context of the second input parameter to E1EDP01.
    With the sample input from above, the function useOneAsMany will give the following result:
    3. Mapping of <ProductQuantity>
    Since the <ProductQuantity> is derived from a value of the IDoc segment <E1EDP20> the mapping for this field is trivial (remember that <ProductQuantity> must occur once per <E1EDP20> segment):
    Please check the error and guide me how to proceed further.
    Regards,
    GIRIDHAR

    Hi
    The problem is that you the first and second input queue of UseOneAsMany function does not have the same number of context changes.
    Do your mapping like this
    E1EDP20(set context to Idoc level )----> OrderCreateProductLineItem
    First input of UseOneAsMany   --->POSEX ( set context to E1EDP01)
    Second input of UseOneAsMany--->  E1EDP20 ( set context to E1EDP01 )
    Third  input of UseOneAsMany--->  E1EDP20 ( set context to E1EDP01 )
    Then after UseOneAsMany use removeContext--->SplitByEachValue--->PurchaseOrderLineItemNumber
    WMENG ( set context to E1EDP20) ----> ProductQuantity
    This will give you the output in the format you are asked for.
    Let me know if any issues.

  • Mapping issue "exists"

    HI,
    i have an inbound xml strucutre which should be mapped into an xml file (but only the filled values:
    <HEADER>
    <FIELD1>xxx</FIELD1>
    <FIELD2></FIELD2>
    <FIELD3>zzz</FIELD3>
    </HEADER>
    I need only the <FIELDn> values which are filled.
    in this case: <FIELD1> and <FIELD3>
    I have tried the exists function but without success.
    1. How can i map this `?
    2. Is it possible to use A function/mapping for the complete <HEADER> segment instead of editing each <FIELDn> ?
    thx,
    Gordon

    Arvin ... you are right.
    my example was wrong.
    New Exampel:
    <HEADER>
    <FIELD1>xxx</FIELD1>
    <FIELD3>zzz</FIELD3>
    </HEADER>
    sometimes the <FIELD2> and a lot of more <FIELDn> are existing.
    If i use the exists function then i get an error. "Target element could not be created"
    mapping:
    <FIELD2> <exists> if/withoutelse -> THEN <FIELD2> -> into TARGET
    any ideas ? or could i use the createif funtion ?

  • Using existing Application Modules Entities in web service provider

    Hi, I want to implement a web service provider having a WSDL file and using JAXWS.
    Is it possible to use in input methods of the service, an Application Module or Entities or View Objects that exist in a separate project.
    I want to perform database operations and facilitate transactions using existing ORM mapping of ADF.
    Thanks,
    Ilias Stavrakis

    Yes, it is possible, but you have to checkout and release the ApplicationModules manually. Use the method <tt>Configuration.createRootApplicationModule(...)</tt> of the class <tt>oracle.jbo.client.Configuration</tt> to checkout modules, and use the method <tt>Configuration.releaseRootApplicationModule(...)</tt> to release it back to the AM pool at the end of processing.
    See this blog entry http://jobinesh.blogspot.com/2010/04/invoking-applicationmodule-from-servlet.html despite the fact that it is not directly related to Web services.

  • Creating a mapping using the API

    Hi Brian, I am curious about this use case - what's the reason you are looking to do it using the API? You can create several objects using the API and the most typical use case we have observed is where mapping developers create a pattern or what we call as a "template" - which is a mapping with various properties parameterized. For example you can create a mapping with the filter parameterized, or define a very generic mapping with source, target and the field map between those all parameterized. Once you do that, you can create a "task" for this mapping (known as Mapping Configuration Task) - that can be done using our UI or using our REST API. If you choose the latter, you can pass on parameter values as part of the API request. Suggest you to take a look at our new Developer Portal, and specifically at the sections Templates and REST API there. Feel free to post any further questions here. If you sign up to the developer program there, you will get much more direct help.https://community.informatica.com/community/technology_partner_network Amol

    I was wondering about creating a mapping using the API. It clearly states in the Dev guide that this is possible, but when I perform a get mapping request, I don't see all the information given for a certain object.  For example, I don't see an expression in the mapping object (although one exists when I view the object in Cloud).   Has anyone else done this? Is it easy to create objects via the API?  Thanks!

  • How to reconcile procedure or function in a mapping using OMB Plus?

    HI,
    Could any one please explain, how to reconcile a procedure or function used in a mapping?
    Thank you,
    Regards,
    Gowtham Sen.

    Hi,
    You can only reconcile Inbound (from Procedure to the mapping) :
    OMBRECONCILE PROCEDURE \
    '/[Project_name]/[Module_name]/[Procedure_name]
    TO MAPPING '[Mapping_name]' \
    OPERATOR '[for example name of a Post-Mapping Process in the mapping]' \
    USE (RECONCILE_STRATEGY 'REPLACE', MATCHING_STRATEGY 'MATCH_BY_OBJECT_ID')
    Hope that will help.
    Best Regards
    Samy

  • HT204053 I need to use an existing ID (email address) on a new iPhone. It tells me "choose another ID - that one is in use," with the option to "use existing ID," however, it is an endless loop, referring me only to change my password on the existing ID.

    I need to use an existing ID (email address) on a new iPhone. It tells me "choose another ID - that one is in use," with the option to "use existing ID," however, it is an endless loop, referring me only to change my password on the existing ID.
    How do I enable my new device with an existing ID - I do not need to change the password for the millionth time!
    None of the FAQs (or the Community choices below) address new devices, they are all about APPS and iCloud stuff.

    If it is an existing iCloud ID, you should be able to just go to Settings>iCloud and sign in with it.

  • Reg - XSLT Mapping using stylesheet exception during test

    Hi experts,
    I am new to SAP PI. Currently i am working on PI's XSLT Mapping using Stylusstudio.
    I got error *Transformer Configuration Exception occurred when loading XSLT <name>.xsl; details: Could not compile stylesheet*.
    I tried test by selecting SAP XML TOOLKIT too, then i am facing
    *com.sap.engine.lib.xml.parser.NestedSAXParseException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException: XMLParser: Prefix 'a' is not mapped to a namespace (:main:, row:4, col:15)(:main:, row=4, col=15) -> com.sap.engine.lib.xml.parser.ParserException: XMLParser: Prefix 'a' is not mapped to a namespace (:main:, row:4, col:15)*.
    Kindly help me to overcome this issue.

    Hi,
    Simply your XSLT file is not a well-formed XML. Check your syntax. You could also use the XML Tools plugin to Notepad++ to help you determine where the syntax error is precisely.
    Moreover, this error "Prefix 'a' is not mapped to a namespace" might mean that you are using a tag: <a:something>, but "a" is not properly declared as a namespace, for instance like: xmlns:a="something.sap.com".
    Hope this helps,
    Greg

  • N:1 mapping using XSLT

    Hi,
    I have a scenario in which i have to do a N:1 mapping using XSLT.
    I am doing this using the BpmPatternCollectMultiIf giving the XSLT mapping in the transformation step...
    But, the transformation step is returning the following error:
    Error: Exception CX_MERGE_SPLIT occurred (program: CL_MERGE_SPLIT_SERVICE========CP, include: CL_
    My XSLT mapping is as follows:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
    <xsl:template match="/">
         <item xmlns:xs="http://www.w3.org/2001/XMLSchema-instance">
              <KEYCODE>
                   <xsl:value-of select="ns0:Messages/ns0:Message1/fsxml/item/keycode"/>
                   </KEYCODE>
                   <DESCRIPTION>
                        <xsl:value-of select="ns0:Messages/ns0:Message1/fsxml/item/description"/>
                   </DESCRIPTION>
                   <CLASS>
                        <xsl:value-of select="ns0:Messages/ns0:Message1/fsxml/item/class"/>
                   </CLASS>
                   <ONE>
                       <xsl:value-of select="ns0:Messages/ns0:Message2/test/row/one"/>
                   </ONE>
                   <TWO>
                       <xsl:value-of select="ns0:Messages/ns0:Message2/test/row/two"/>                                                      </TWO>
              </item>
         </xsl:template>
    </xsl:stylesheet>
    Here,<b> fsxml</b> is the first message and<b> test</b> is the second message.
    Kindly let me know if there is any problem in the XSLT mapping.
    Thanks in advance,
    Thanks,
    Karen Pereira

    Hi,
    There was problem in the XSLT mapping. i figured it out and fixed it and the scenario worked.
    The new mapping was as follows:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
         <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
         <xsl:template match="/">
              <ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
                   <ns0:Message1>
                        <item xmlns:xs="http://www.w3.org/2001/XMLSchema-instance">
                             <!-- Mapping for tags which are to be directly replicated in the target message-->
                             <KEYCODE>
                                  <xsl:value-of select="ns0:Messages/ns0:Message1/fsxml/item/keycode"/>
                             </KEYCODE>
                             <DESCRIPTION>
                                  <xsl:value-of select="ns0:Messages/ns0:Message1/fsxml/item/description"/>
                             </DESCRIPTION>
                             <CLASS>
                                  <xsl:value-of select="ns0:Messages/ns0:Message1/fsxml/item/class"/>
                             </CLASS>
                             <ONE>
                                  <xsl:value-of select="ns0:Messages/ns0:Message2/test/row/one"/>
                             </ONE>
                             <TWO>
                                  <xsl:value-of select="ns0:Messages/ns0:Message2/test/row/two"/>
                             </TWO>
                   </item>
                   </ns0:Message1>
              </ns0:Messages>
         </xsl:template>
    </xsl:stylesheet>
    Thanks,
    Karen

  • Error: 1:n multi-mapping using BPM for file to file scenario

    Hi. Iu2019m trying to do 1:n multi-mapping using bpm scenario. I use file to file. Input file consists of many records and then I want many record to be transformed into many file at target system. I follow step in http://www.riyaz.net/blog/xipi-1n-multi-mapping-using-bpm/. However, I have a problem when file is retrieved in to XI. It doesnu2019t create any output file.
    When I look at SXMB_MONI, it shows u201CNo object type found for the message Check that the corresponding process is activated.u201D Besides, it shows error message "Unable to perform action for selected message" when i clikc at PE in SXMB_MONI.
    I have check at many previous posts with the same error message but still couldnu2019t solve it. I already activate my BPM and check that status in SXI_CACHE = 0. There is noting left in change list of my IR and ID.
    Here is my design and configuration.
    IR
    Data Type: DT_file_split -> for both input and output file
    Message Type: MT_file_split_sender, MT_file_split_receiver
    Message Interface: SI_file_split_in, SI_file_split_out, SI_file_abs_source, SI_file_abs_target
    Message mapping: MM_file_split for mapping MT_file_split_sender with MT_file_split_receiver
    Interface mapping: OM_file_split
    u2022     Source = SI_file_split_out
    u2022     Target = SI_file_split_in
    u2022     Mapping Program = MM_file_split
    BPM following this link http://www.riyaz.net/blog/xipi-1n-multi-mapping-using-bpm/.
    ID
    Import my Integration process
    2 Communication Channel for getting input file (CC_File_split_sender) and creating output file (CC_File_split)
    2 Receiver determination:
    u2022     Source system to BPM using interface SI_File_Abs_source
    u2022     BPM to target system using interface SI_File_Abs_target
    1 Interface determination:
    u2022     from source system to BPM
    u2022     Sender interface: SI_File_Split_Out
    u2022     Receiver interface: SI_file_abs_source
    1 Sender Agreement
    u2022     Commu. Component: Source System
    u2022     Using interface: SI_File_Abs_source
    u2022     Sender Communication Channel: CC_File_Split_Sender
    1 Receiver Agreement
    u2022     Sender Communication Component: BPM
    u2022     Receiver Communication Component: Target System
    u2022     Receiver Interface: SI_File_Split_In
    u2022     Receiver Communication Channel: CC_File_Split
    Anyone know how to fix this?
    Thanks,
    Pavin

    Hi,
    Yes, thats the problem.
    You are creating file from test tab of  1..N mapping .
    In case of 1..N mappping in mapping Extra tags of messages are addded to the data.As shown here:-
    Messages
          Message1
               MessageType
    When you use this mapping to generate xml message then it will add additional tags for <Messages> and <Message1>, which is not correct. it should only have structure of you MT.
    So remove start and end tag of <Messages> and <Message1> from your data file. Mentioned below in bold.
    <xml......>
    <Messages>
    <Message1>
    <MT_...>
    </MT_...>
    </Message1>
    </Messages>
    This should solve your problem.
    Regards,
    Sami.

  • Can we use EXISTS in where condition

    hi all,
    can we use EXISTS (instead of IN) in where condition of a query which is not part of a subquery ?
    for e.g:
    update gpf_vou_sm set up_amt=0 where src_cd exists ('1101','1201');
    the query works fine with the IN operator in place of EXISTS.
    anybody please help.
    thomas k prakash

    Hi:
    You can use EXISTS in where clause but not in that syntax.
    UPDATE gpf_vou_sm g
       SET up_amt = 0
    WHERE EXISTS (SELECT 1
                     FROM gpf_vou_sm
                    WHERE src_cd IN ('1101', '1201') AND id = g.id);Using IN in your case is better...
    Saad,

  • Please help to re-write this query using exists or with

    Hi please help to re-write this query using exists or with, i need to write same code for 45 day , 90 days and so on but sub query condition is same for all
    SELECT SUM (DECODE (t_one_mon_c_paid_us, 0, 0, 1)) t_two_y_m_mul_ca_
    FROM (SELECT SUM (one_mon_c_paid_us) t_one_mon_c_paid_us
    FROM (
    SELECT a.individual_id individual_id,
    CASE
    WHEN NVL
    (b.ship_dt,
    TO_DATE ('05-MAY-1955')
    ) >= SYSDATE - 45
    AND a.country_cd = 'US'
    AND b.individual_id in (
    SELECT UNIQUE c.individual_id
    FROM order c
    WHERE c.prod_cd = 'A'
    AND NVL (c.last_payment_dt,
    TO_DATE ('05-MAY-1955')
    ) >= SYSDATE - 745)
    THEN 1
    ELSE 0
    END AS one_mon_c_paid_us
    FROM items b, addr a, product d
    WHERE b.prod_id = d.prod_id
    AND d.affinity_1_cd = 'ADH'
    AND b.individual_id = a.individual_id)
    GROUP BY individual_id)
    Edited by: user4522368 on Aug 23, 2010 9:11 AM

    Please try and place \ before and after you code \Could you not remove the inline column select with the following?
    SELECT a.individual_id individual_id
         ,CASE
            when b.Ship_dt is null then
              3
            WHEN b.ship_dt >= SYSDATE - 90
              3
            WHEN b.ship_dt >= SYSDATE - 45
              2
            WHEN b.ship_dt >= SYSDATE - 30
              1
          END AS one_mon_c_paid_us
    FROM  items           b
         ,addr            a
         ,product         d
         ,order           o
    WHERE b.prod_id       = d.prod_id
    AND   d.affinity_1_cd = 'ADH'
    AND   b.individual_id = a.individual_id
    AND   b.Individual_ID = o.Individual_ID
    and   o.Prod_CD       = 'A'             
    and   NVL (o.last_payment_dt,TO_DATE ('05-MAY-1955') ) >= SYSDATE - 745
    and   a.Country_CD    = 'US'

  • Automatically name computers using existing computer name

    In my environment, I have brand new computers to be imaged.  The computer name needs to consist of the room number and the serial number.
    I am utilizing the Collection Variables within All Unknown Computers collection to define the room number.  And I am using CustomSettings.ini to automatically grab the serial number and combining that to the room number to OSDComputerName.
    That is working perfectly fine.
    My question is how to automatically use existing computer name as the name of the re-imaged computer?
    If I use the same task sequence, because the computer is no longer an unknown computer, it doesn't prompt me for the room number.  The computer name ended up containing the variable %roomnum% plus the serial number.  I do not want SCCM to prompt
    me for anything but automatically use the existing computer name.
    Please advise.

    Maybe I am missing a step.
    This is my current CustomSettings.ini file
    [Settings]
    Priority=Init, Default
    Properties=ComputerSerialNumber
    [Init]
    ComputerSerialNumber=#Left("%SerialNumber%",7)#
    [Default]
    OSDComputerName=%RoomNumber%%ComputerSerialNumber%
    OSInstall=Y
    SkipCapture=YES
    SkipAdminPassword=NO
    The variable %RoomNum% is defined in the All Unknown Computer collection and a prompt appears for me to manually enter that information before imaging the computer the first time.
    But when I reimage an existing computer, I get no prompt and because the variable is not defined, the final computer name because %RoomNumber%9999999, which is longer than 15 characters and so the task sequence fails.
    How and where in the task sequence do I define: if this is not an unknown computer, then use existing computername?
    I also notice that I can add a step called "Capture Windows Settings-Migrate Computer Name".  Is this the step that I need?  Where in the task sequence should it be added to?
    Here is a section of my task sequence. I didn't change much from the default created MDT Task Sequence.

  • Create Attachment within Graphical Mapping using UDF

    Hi!
    We want to create an attachment witihn a graphical mapping using an UDF function.
    I use that function:
    public String addAttachment(String filename, String mimeType, String content, Container container) throws StreamTransformationException{
         BASE64Decoder decoder=new BASE64Decoder();
         try {
              GlobalContainer globalContainer = container.getGlobalContainer();
              OutputAttachments outputAttachments = globalContainer.getOutputAttachments();
              Attachment attachments = outputAttachments.create(filename, mimeType,decoder.decodeBuffer(content));
              outputAttachments.setAttachment(attachments);
              return "Adde1: "+filename;
         } catch (Exception e) {
              return e.toString();
    (SDN helped me much in creating that
    This function has no compiling errors, anything workes fine:
    It takes 3 input-parameters, see also: http://help.sap.com/javadocs/pi/SP3/xpi/com/sap/aii/mapping/api/OutputAttachments.html
    filename (ok, more or less contentID)
    mimeType (more or less contentType)
    content: Base64-encoded String which should be set as content
    In my sample I use the following constants for that function:
    filename = "fn1.txt"
    mimeType="application/xml"
    content = "UG9seWZvbiB6d2l0c2NoZXJuZCBhw59lbiBNw6R4Y2hlbnMgVsO2Z2VsIFLDvGJlbiwgSm9naHVydCB1bmQgUXVhcms=" --> cames directly from http://de.wikipedia.org/wiki/Base64
    When using the message, I got this error within SXMB_MONI:
    <SAP:AdditionalText>com.sap.engine.interfaces.messaging.api.exception.MessagingException: Could not queue receive for
    message 0022642d-b106-02df-8e8c-f41c243bd112(INBOUND). Reason: java.lang.NullPointerException: while trying to
    invoke the method com.sap.aii.af.sdk.xi.lang.Binary.getBytes() of an object returned from
    com.sap.aii.af.sdk.xi.mo.xmb.XMBPayload.getContent()</SAP:AdditionalText>
    This looks pretty much the same as Add Attachment from ABAP Mapping but this tread is also not answered.
    Adding attachment from PI level looks also in that direction, again, no answer.
    So, I was wondering if someone has solved such problem?

    Hi Divyesh!
    We did it that way:
    1. Choosing the XML-Mailstructure as Destination as described in Configuring the Receiver Mail Adapter - Advanced Adapter Engine - SAP Library -  Example (XI payload with mail package)
    2. now we have created a UDF for creating the "content"
    public void getContent(String[] text, String[] attFname, String[] attType, String[] attContent, ResultList result, Container container) throws StreamTransformationException{
    // vergleich ob alle att-Arrays selbe anzahl haben
    if (attFname.length!=attType.length || attFname.length!=attContent.length) {
        result.addValue(Integer.parseInt("Fehler: alle Attachment-Eingänge müssen die selbe Anzahl an Elementen haben!"));
        String CRLF = "\r\n";
        String output="This is a multi-part message in MIME format."+CRLF+CRLF+
        "--"+getBoundary(container)+CRLF+
        "Content-Type: text/plain; charset=UTF-8"+CRLF+
        "Content-Disposition: inline" + CRLF + CRLF +
        text[0]+CRLF;
    for (int i=0;i<attFname.length;i++) {
        output+="--"+getBoundary(container)+CRLF+
        "Content-Type: "+attType[i]+"; name="+((char)34)+attFname[i]+((char)34)+CRLF+
        "Content-Disposition: attachment; filename="+((char)34)+attFname[i]+((char)34)+CRLF+
        "Content-Transfer-Encoding: Base64"+CRLF+CRLF+attContent[i]+CRLF;
    output+="--"+getBoundary(container)+CRLF;
    result.addValue(output);
    This UDF is configured as "QUEUE"
    We have configured this input-structure
    The Content itself is allready base64.
    So we can call this mapping and it creates a Multipart-Mail for us.

  • Is it possible to do message mapping using different namespace message type

    Hi all,
    Is it possible to do message mapping using different namespaces message types
    Example :
    i am having message type MT_1 in namespace http://sap.com/abc
    and second message type MT_2 in namespace http://partner.com/xyz
    so MT_1 can be mapped with MT_2 or not having different namespace.
    Thanks

    Read through my reply in this thread for Defining Software component dependencies.
    Though it explains this for Improted Archives, it also holds true for Message Types to be used in message mappings.
    Re: Payload Extraction
    Regards
    Bhavesh

Maybe you are looking for

  • My macbook pro model mid 2009 is running slow. free memory is 35 mbs and inactive memory is  1.36 gb with a total of 5 gb RAM memory

    Problem description: too much inactive memory 1.87 gb and free memory only 35 mb EtreCheck version: 2.1.1 (104) Report generated 10 December 2014 3:30:26 pm IST Hardware Information: ℹ️   MacBook Pro (13-inch, Mid 2009) (Verified)   MacBook Pro - mod

  • Query running error

    Hi, all. In our PROD system we faced one problem. When we run query we get error "Cannot create characteristic combination: type \BI0\0100000100" doesn't exit" "Special situation CX_SY_CREATE_DATE_ERROR" I think we have problem with temporary databas

  • Help with Combining Objects

    I've been thinking of submiting some of my Illustrator designs to iStock and I want clean up the files and perhaps combine some of the objects so there isn't this bigg mess of layers. The problem I'm having is that some objects need to be on top of o

  • CIDX/RNIF Receipt Acknowledgement Processing

    Hello Everyone, I was wondering if someone could help me answer a question which was posted (but not answered) back in June 06'. Rosettanet Buyer scenario on RNIF11 PIP3A4 version 2.00 How are Receipt Acknowledgements handled by the CIDX/RNIF adapter

  • Getting an error when I try to set up a Comcast email on Iphone

    Hello I'm trying to set up my comcast email on my iphone. I had called Comcast and got the appropriate incoming and outgoing mail server information to enter and chose to set it up as a POP bc that is what they told me it has to be and when I hit sav