Skip to Content
avatar image
Former Member

Problem with Mapping in SAP PI: Values missing in queue context.

Dear SAP PI experts,

I am getting an error message in mapping:

Cannot create target element /ns1:AS500_DT_Person. 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

I took the payload from message monitor and put in into the test application in Enterprise Service Builder. My Mapping looks like here:

The data comes from a JDBC connector and the data type is ZUCC_DATA_CNTCTN.resultSet. The target message type is AS500_DT_Person. When I delete the connection between the root elements at the tree in the mapping, the error will not show up but the target XML is empty, no data will be transferred.

What might be the root cause?

Thanks,

André

pcjw9.png (14.5 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • Aug 27, 2017 at 07:03 AM

    Hi Andre!

    Please provide your JDBC response message payload.

    Regards, Evgeniy.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Dear Evgeniy,

      for now I have changed the select statement, so that only one entry is in the resultSet.

      Thanks for any hints in advance,

      André

      <?xmlversion="1.0" encoding="UTF-8"?><ZUCC_DATA_CNTCTN.resultSet><row><ID>2</ID><NAME_FIRST>Netis</NAME_FIRST><NAME_LAST>Witchard</NAME_LAST><TITLE_FT/><COUNTRY_FT>Germany</COUNTRY_FT><CITY1>Claußnitz</CITY1><POSTCODE>9236</POSTCODE><REGION>Sachsen</REGION><STREET>Am Anger</STREET><HOUSE_NUM1>3</HOUSE_NUM1><GENDER_FT>m</GENDER_FT><CONSUMER_ACCOUNT_ID/><COMPANY_NAME/><COMPANY_ID_ORIGIN/><PAFKT_FT/><SMTP_ADDR>Netis.Witchard@</SMTP_ADDR><OPT_IN_SMPTP_ADDR>Y</OPT_IN_SMPTP_ADDR><TELNR_LONG/><OPT_IN_TELNR_LONG/><TELNR_MOBILE>0049-575343457</TELNR_MOBILE><OPT_IN_TELNR_MOBILE>Y</OPT_IN_TELNR_MOBILE><OPT_IN_TELNR_MOBILE_SMS/><DATE_OF_BIRTH>1945.09.26</DATE_OF_BIRTH><ID_TW>Netis_Witchard_1</ID_TW><OPT_IN_TW/><ID_FB>Netis_Witchard_2</ID_FB><TIMESSTAMP>20170814132904</TIMESSTAMP><LATITUDE>50.936278</LATITUDE><LONGITUDE>12.883239</LONGITUDE></row></ZUCC_DATA_CNTCTN.resultSet>
  • avatar image
    Former Member
    Aug 27, 2017 at 05:46 PM

    Dear Evgeniy,

    for now I have changed the select statement, so that only one entry is in the resultSet.

    Thanks for any hints in advance,

    André

    <?xml version="1.0" encoding="UTF-8"?>
    <ZUCC_DATA_CNTCTN.resultSet>
    <row>
    <ID>2</ID>
    <NAME_FIRST>Netis</NAME_FIRST>
    <NAME_LAST>Witchard</NAME_LAST>
    <TITLE_FT/>
    <COUNTRY_FT>Germany</COUNTRY_FT>
    <CITY1>Claußnitz</CITY1>
    <POSTCODE>9236</POSTCODE>
    <REGION>Sachsen</REGION>
    <STREET>Am Anger</STREET>
    <HOUSE_NUM1>3</HOUSE_NUM1>
    <GENDER_FT>m</GENDER_FT>
    <CONSUMER_ACCOUNT_ID/>
    <COMPANY_NAME/>
    <COMPANY_ID_ORIGIN/>
    <PAFKT_FT/>
    <SMTP_ADDR>Netis.Witchard@</SMTP_ADDR>
    <OPT_IN_SMPTP_ADDR>Y</OPT_IN_SMPTP_ADDR>
    <TELNR_LONG/>
    <OPT_IN_TELNR_LONG/>
    <TELNR_MOBILE>0049-575343457</TELNR_MOBILE>
    <OPT_IN_TELNR_MOBILE>Y</OPT_IN_TELNR_MOBILE>
    <OPT_IN_TELNR_MOBILE_SMS/><DATE_OF_BIRTH>1945.09.26</DATE_OF_BIRTH>
    <ID_TW>Netis_Witchard_1</ID_TW>
    <OPT_IN_TW/>
    <ID_FB>Netis_Witchard_2</ID_FB>
    <TIMESSTAMP> 20170814132904</TIMESSTAMP>
    <LATITUDE>50.936278</LATITUDE>
    <LONGITUDE>12.883239</LONGITUDE>
    </row>
    </ZUCC_DATA_CNTCTN.resultSet>
    Add comment
    10|10000 characters needed characters exceeded

  • Aug 28, 2017 at 10:10 AM

    Hi Andre,

    Please do not map AS500_DT_Person target root field.

    Warm Regards,

    Rudra

    Add comment
    10|10000 characters needed characters exceeded

  • Aug 28, 2017 at 11:15 AM

    Hi Andre,

    What happens when you put this xml in test tab of the mapping is it green or red in the given xml i dont see any namespace have you removed the namespace in message type too. OR try to give message type namespace in channel level and check with that new xml.

    if its red then the expected xml in mapping and the xml generated by channel is different suggest you to cross check these xml's again.

    Br,

    Manoj

    Add comment
    10|10000 characters needed characters exceeded

  • Aug 27, 2017 at 08:52 PM

    Hi Andre!

    Just a thought: as far as I remember, if you use JDBC sender adapter, message structure should look like:

    Message_type

    resultset

    row...

    Regards, Evgeniy.

    Add comment
    10|10000 characters needed characters exceeded