cancel
Showing results for 
Search instead for 
Did you mean: 

Reg Mapping error cant produce the target element

Former Member
0 Kudos

Hi gurus,

I have a mapping requirement like

sourceinput

-


||

-


-


record

-


||

-


Tab_id

-


materialno

-


condition type

-


coustomergroup

-


materialpricinggroup

-


datefrom

-


dateto

-


uom

-


amount

in target side

target input

-


||

-


record----


(0-1

-


||

-


coustomergroup(1--unbound) if tab_id is R34

-


||

-


Tab_ID

-


coustomergroup

-


UOM

-


Materialno

-


Materialpricinggroup(1--unbound) if the tab_id R346

-


||

-


tab_id

-


materialpricinggroup

-


datefrom

-


dateto

based on the tab_id i need to create target node i.e if the tab_id is R345 then the fields which are under the node coustomer group

will be populated

if the tab_id is R346 then material pricing group node will populated

i have tried like

tab_id----


}

-


| equalS--


creatif--


coustomergroup

-


|

constant(R345)----


}

this mapping excute successfully if the occurence of the target node coustomergroup is 0---unbound

if is 1----unbound the target gives error mapping exception

my target structure is WSDL there giving as minoccurs=0 but while it is imported to xi it will come as 1---unbound

please help out this

let me know if anything is needed

Edited by: katakoti on May 4, 2011 2:40 PM

Edited by: katakoti on May 4, 2011 2:47 PM

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi all,

Problem resolved by the Third party system(WebMethods) by manually entering the 'min occurs=0'

baskar_gopalakrishnan2
Active Contributor
0 Kudos

Your requirement seems to be simple ..

First check whether node occurs or not using exist function. Followed by equals if the tab_id value is R345 do as you need, if the value is not R345 then it should be R346 and do as you want. But initially check whether node exist or not.

>>my target structure is WSDL there giving as minoccurs=0 but while it is imported to xi it will come as 1---unbound

please help out this

Don't understand. If your target structure is WSDL and if you import in PI, it should provide the same definition in message structure. Occurences should not be changed or modified. Please confirm with your target system about message structure. Pi will just replicate what is given in WSDL. It wont change.

Former Member
0 Kudos

Hi Bhaskar,

<xsd:element name="CUSTOMER_GRP" nillable="true" type="tns:ArrayOfCUSTOMER_GRP" minOccurs="0" />
               <xsd:element name="SALES_ORG" nillable="true" type="tns:ArrayOfSALES_ORG" minOccurs="0" />
               <xsd:element name="PRI_GRP" nillable="true" type="tns:ArrayOfPRI_GRP" minOccurs="0" />
               <xsd:element name="MT_PRI_GRP" nillable="true" type="tns:ArrayOfMT_PRI_GRP" minOccurs="0" />
               <xsd:element name="DIST_CHN" nillable="true" type="tns:ArrayOfDIST_CHN" minOccurs="0" />
               <xsd:element name="INDUSTRIAL_CODE" nillable="true" type="tns:ArrayOfINDUSTRIAL_CODE" minOccurs="0" />
               <xsd:element name="PRICING_TEMPLATES" nillable="true" type="tns:PRICING_TEMPLATES" minOccurs="0" />
            </xsd:sequence>
         </xsd:complexType>
         <xsd:complexType name="CUSTOMER_GRP">
            <xsd:sequence>
               <xsd:element name="TABLE_ID" nillable="true" type="xsd:string" minOccurs="0" />
               <xsd:element name="CUSTOMER_GROUP_NAME" nillable="true" type="xsd:string" minOccurs="0" />
               <xsd:element name="CONDITION_DETAILS" nillable="true" type="tns:CONDITION_DETAILS" minOccurs="0" />
               <xsd:element name="PRICING_DETAILS" nillable="true" type="tns:PRICING_DETAILS" minOccurs="0" />
               <xsd:element name="BUSINESS_DETAILS" nillable="true" type="tns:BUSINESS_DETAILS" minOccurs="0" />
            </xsd:sequence>
         </xsd:complexType>

in the above code" array of coustomer_grp" min occurence is = '0'

but when it is imported in xi trough external defination

it coming as

coustomer_group(0--1)
----------arrayofcoustomer_group(1--unbound)
--------------------table_id(0--1)
--------------------coustomer_group(0----1)
--------------------condition_details(0---1)

is there no values coming from source side it gives the error

Cannot create target element

Values missing in queue context. Target XSD requires a value for this element, but the target-field mapping does not create one. Check whether the XML instance is valid for the source XSD, and whether the target-field mapping fulfils the requirement of the target XSD

former_member200962
Active Contributor
0 Kudos
in the above code" array of coustomer_grp" min occurence is = '0'

are you sure that the XSD mentions minimum occurence of "array of customer_grp" is 0?

In my opinion the element CUSTOMER_GRP has min occ = 0 and it is currectly displayed when imported in PI.

Former Member
0 Kudos

hi abhishek

Edited by: katakoti on May 5, 2011 9:10 AM

Former Member
0 Kudos
</xsd:sequence>
         </xsd:complexType>
         <xsd:complexType name="PRICING_MASTER_DATA">
            <xsd:sequence>
               <xsd:element name="CUSTOMER_GRP" nillable="true" type="tns:ArrayOfCUSTOMER_GRP" minOccurs="0" />
               <xsd:element name="SALES_ORG" nillable="true" type="tns:ArrayOfSALES_ORG" minOccurs="0" />
               <xsd:element name="PRI_GRP" nillable="true" type="tns:ArrayOfPRI_GRP" minOccurs="0" />
               <xsd:element name="MT_PRI_GRP" nillable="true" type="tns:ArrayOfMT_PRI_GRP" minOccurs="0" />
               <xsd:element name="DIST_CHN" nillable="true" type="tns:ArrayOfDIST_CHN" minOccurs="0" />
               <xsd:element name="INDUSTRIAL_CODE" nillable="true" type="tns:ArrayOfINDUSTRIAL_CODE" minOccurs="0" />
               <xsd:element name="PRICING_TEMPLATES" nillable="true" type="tns:PRICING_TEMPLATES" minOccurs="0" />
            </xsd:sequence>
         </xsd:complexType>
         <xsd:complexType name="CUSTOMER_GRP">
            <xsd:sequence>
               <xsd:element name="TABLE_ID" nillable="true" type="xsd:string" minOccurs="0" />
               <xsd:element name="CUSTOMER_GROUP_NAME" nillable="true" type="xsd:string" minOccurs="0" />
               <xsd:element name="CONDITION_DETAILS" nillable="true" type="tns:CONDITION_DETAILS" minOccurs="0" />
               <xsd:element name="PRICING_DETAILS" nillable="true" type="tns:PRICING_DETAILS" minOccurs="0" />
               <xsd:element name="BUSINESS_DETAILS" nillable="true" type="tns:BUSINESS_DETAILS" minOccurs="0" />
            </xsd:sequence>
         </xsd:complexType>
         <xsd:complexType name="CONDITION_DETAILS">
            <xsd:sequence>
               <xsd:element name="CONDITION_TYPE_x0020_" nillable="true" type="xsd:string" minOccurs="0" />
               <xsd:element name="VALID_DATE_FROM_x0020_" nillable="true" type="xsd:string" minOccurs="0" />
               <xsd:element name="VALID_DATE_TO_x0020_" nillable="true" type="xsd:string" minOccurs="0" />
            </xsd:sequence>
         </xsd:complexType>
         <xsd:complexType name="PRICING_DETAILS">
            <xsd:sequence>
               <xsd:element name="AMOUNT" nillable="true" type="xsd:string" minOccurs="0" />
               <xsd:element name="RATE_UNIT" nillable="true" type="xsd:string" minOccurs="0" />
               <xsd:element name="CONDITION_PRICING_UNIT" nillable="true" type="xsd:string" minOccurs="0" />

from source side i wiil get the tab_id based on that id. i need to populate the target node

tab_id-=100  then coustomer_group
tab_id = 200 then sal_org 

i got the source values like this
tab_id     coustomer_group        sal_grp     pri_grp     condition_type   date_from     date_to          amount           rate_unit     
100                c                                                                      c1             05/05/2011    06/05/2011   A                      R
200                                                 s                                     c2              05/05/2011    06/05/2011   A1                    R1
300                                                                 p                     c3              05/05/2001    06/05/2011   A3                    R3

based on the tab_id i need to send the data to perticular node

for this requirement i had follow the

tab_id--
-----------------------equalS-----------------creatif--------array of coustomer_group
constant(100)

its work fine when the arrayof coustomer_group is 0--unbound (i tried by creating the same target strucuture manually)

it fails when the ocuurence is 1---unbound

markangelo_dihiansan
Active Contributor
0 Kudos

Hello,

<xsd:element name="CUSTOMER_GRP" nillable="true" type="tns:ArrayOfCUSTOMER_GRP" minOccurs="0" />

What this means is that an element called CUSTOMER_GRP will be created and that its structure will resemble ArrayOfCUSTOMER_GRP with a minimum occurence of 0.

Your complex type CUSTOMER_GRP might have been referred to another element with a different name. You could try searching the WSDL for that.

Hope this helps,

Mark

Former Member
0 Kudos

Hi mark

do you mean is there any error in WSDL or do you want any changes in the WSDL for the 0--unbound

Please suggest th

markangelo_dihiansan
Active Contributor
0 Kudos

Hello,

Not really, I just think you are looking at the incorrect CUSTOMER_GRP (which is referring to the tns:ArrayOfCUSTOMER_GRP), make a search in the wsdl for something like tns:CUSTOMER_GRP.

Hope this helps,

Mark

former_member200962
Active Contributor
0 Kudos
do you mean is there any error in WSDL or do you want any changes in the WSDL for the 0--unbound

may not be an error....but the WSDL is surely not in-line with your mapping requirement (or vice-versa)...the occurence that you talk about applies for customer_grp and not for the other term....hence you see the occurence of customer_grp as 0..1 which is correct as per the wsdl code you provided.

Former Member
0 Kudos

Hi abhishek,

let me know what i followed is the currect way or am i follow another way

please give me suggestion how to solve this problem

Edited by: katakoti on May 6, 2011 3:09 PM