Help with Message Mapping - Context Change

I need help with the following message mapping.  I am filtering by EMP_STAT in the Message Mapping.  I have this working for the ROW structures, but I can get the HEADER/REC_COUNT field to calculate.  I can do just a record count of ROW and get it to work, but I can't get it to work with the filter EMP_STAT = 'REG' added.  I get a context error.  Could someone send me the mapping code.
Sender XML----
<RECORD>
<ROW>
<EMPLOYEE>111</EMPLOYEE>
<EMP_STAT>REG</EMP_STAT>
</ROW>
<ROW>
<EMPLOYEE>222</EMPLOYEE>
<EMP_STAT>PT</EMP_STAT>
</ROW>
<ROW>
<EMPLOYEE>333</EMPLOYEE>
<EMP_STAT>REG</EMP_STAT>
</ROW>
</RECORD>
Receiver XML----
<RECORD>
<HEADER>
<REC_COUNT>2</REC_COUNT>
</HEADER>
<ROW>
<EMPLOYEE>111</EMPLOYEE>
<EMP_STAT>REG</EMP_STAT>
</ROW>
<ROW>
<EMPLOYEE>333</EMPLOYEE>
<EMP_STAT>REG</EMP_STAT>
</ROW>
</RECORD>

Hello,
You can use this mapping
For REC_COUNT:
EMP_STAT -> equalsS: constant:REG -> ifWithoutElse -> removeContext -> count -> REC_COUNT
                                 EMPLOYEE -> /
For ROW:
EMP_STAT -> equalsS: constant:REG -> ifWithoutElse -> removeContext -> ROW
                                 EMPLOYEE -> /
For EMPLOYEE:
EMP_STAT -> equalsS: constant:REG -> ifWithoutElse -> removeContext -> SplitByValue -> EMPLOYEE
                                 EMPLOYEE -> /
For EMP_STAT:
Constant: REG -> EMP_STAT
Hope this helps,
Mark

Similar Messages

  • Need Help with Message Mapping in PI 7.1 - JDBC to IDOC

    I have an outgoing SQL function that sends multiple rows of data for use in creating an IDOC in ECC. I am trying to key the creation of new IDOCs (already did the maxOccurs trick to the IDOC definition) based on a field in the JDBC return data...
    JDBC Message Format...
    SEGNAM - TRANS_ID - MATERIAL - VKORG...ETC
    MARA -  00001 - 1234 - <space> - ...
    MARC -  00001 - 1234 - VK01 - ...
    MARA - 00002 - 9876 - <space> - ...
    MAKT - 00002 - 9876 - <space> - material description - ...
    Each time there is a new TRANS_ID, I need to indicate a new IDOC in the message mapping. I have tried all kinds of combinations of TRANS_ID --> dropContext --> splitValue and TRANS_ID --> collapseContext --> splitValue, but nothing has worked.
    Has anyone done this kind of message map (without any BPM please)?
    Thanks,
    Nathan

    Hello Nathan,
    For this one, you have to play with contexts.
    row 1 SEGNAM = MARA, TRANS_ID = 1, MATNR = 123...
    row 2 SEGNAM = MARC, TRANS_ID = 1, MATNR = 123, WERKS = PL01...
    row 3 SEGNAM = MARA, TRANS_ID = 2, MATNR = 987
    This also depends on the occurrence of the parent node. example, if I want MATNR to be populated, the logic would be like
    ex:
    IDOC1..unbounded) (The logic is the already provided in an earlier response)
    -->MATNR (1..1)
    MATNR --------> removeContext ----------------> FormatByExample --> MATNR
    TRANS_ID --> removeContext --> splitByValue:ValueChange --> /
    If the rows are not in order of trans_id, then you need to incorporate sorting into the logic above.
    Hope this helps,
    Mark

  • Help with message please:  Warning: mysql_free_result() expects parameter 1 to be resource, null given in...... line

    I would really appreciate some help with my search & results page that is now throwing up the following error:
    Warning: mysql_free_result() expects parameter 1 to be resource, null given in...... line (the line number refers to the following code:
    mysql_free_result($RSsearchforsale);
    mysql_free_result($RsSearchForSale2);
    mysql_free_result($RsSearchForSale3);
    mysql_free_result($RsSearchForSale4);
    I am new to php and am setting up a dynamic site in Dreamweaver (thanks to the Missing Manual – very helpful). I apologise in advanced for my lengthy description of the problem (perhaps get yourself a drink before continuing!)
    I have a Search page with 4 list menus where the user can select an option from ANY or ALL of the menus, if a menu is not selected the value posted to the results page will be 'zzz'.
    On the results page I have 4 recordsets, all getting the correct results, only one recordset is required to run depending on how many of the menus from the search page have been selected and a test is run before executing the sql using a SWITCH statement checking how many of the menus had passed the 'zzz' values from the Search page if you see what I mean. The results page  has Repeating Regions, Recordset Paging and Display Record Count. The exact result that I require are generated by this method.
    THE PROBLEM, when a user makes a selection the first page of 10 results is fine, but the error message above is shown at the bottom of the page, AND when the user clicks NEXT to go to the next page of results THERE ARE NO RESULTS.
    This is exactly what happens depending on how many menus selected and which recordset is used:
    4 menus selected from Search: runs RSsearchforsale, results correct but 3 error messages on 1st page relating to mysql_free_result($RsSearchForSale2),mysql_free_result($RsSearchForSale3), & mysql_free_result($RsSearchForSale4). The display record count shows correct results found. NEXT page is empty of results and still shows the correct display record count as if it should be displaying the records, also has the same 3 error messages.
    3 menus selected from Search:  runs RsSearchForSale2, results correct but 3 error messages on 1st page relating to mysql_free_result($RSsearchforsale),mysql_free_result($RsSearchForSale3), & mysql_free_result($RsSearchForSale4). The display record count shows correct number of results. NEXT page shows results from the  DEFAULT setting of the recordset and the Display record count reflects this new set of results. Also still shows the 3 mysql_free_results for RsSearchForSale2, 3 and 4.
    2 menus selected from Search: runs   RsSearchForSale3, results correct but 2 error messages on 1st page relating to  mysql_free_result($RSsearchforsale) & mysql_free_result (RsSearchForSale4). The display record count is correct. NEXT page does exactly the same as described in above 3 menus selected.
    1 menu selected from search: runs RsSearchForSale4, results correct but 1 error meaasge on 1st page, mysql_free_result($RSsearchforsale). Display record count is correct and again when NEXT page is selected does as described in above where 2 or 3 menus selected.
    If you have gotten this far without falling asleep then thank you and well done! I have pasted my code below and I know its a lot to ask but please please can you give me an idea as to where or why I have gone wrong. I felt I was so close at perfecting this search and have been working on it for weeks now. I feel sure the problem is because I have 4 recordsets on the page but I could find no other way to get the exact results I wanted from the menus.
    Looking forward to any help.
    <?php require_once('Connections/propertypages.php'); ?>
    <?php if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;   
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      return $theValue;
    $currentPage = $_SERVER["PHP_SELF"];
    $maxRows_RSsearchforsale = 10;
    $pageNum_RSsearchforsale = 0;
    if (isset($_GET['pageNum_RSsearchforsale'])) {
      $pageNum_RSsearchforsale = $_GET['pageNum_RSsearchforsale'];
    $startRow_RSsearchforsale = $pageNum_RSsearchforsale * $maxRows_RSsearchforsale;
    $varloc_RSsearchforsale = "mpl";
    if (isset($_POST['location'])) {
      $varloc_RSsearchforsale = $_POST['location'];
    $vartype_RSsearchforsale = "vil";
    if (isset($_POST['type'])) {
      $vartype_RSsearchforsale = $_POST['type'];
    $varprice_RSsearchforsale = "pr9";
    if (isset($_POST['price'])) {
      $varprice_RSsearchforsale = $_POST['price'];
    $varbed_RSsearchforsale = "b5";
    if (isset($_POST['beds'])) {
      $varbed_RSsearchforsale = $_POST['beds'];
    switch (true) {
    case ($varloc_RSsearchforsale != 'zzz' && $vartype_RSsearchforsale != 'zzz' && $varprice_RSsearchforsale != 'zzz' && $varbed_RSsearchforsale != 'zzz'):
    mysql_select_db($database_propertypages, $propertypages);
    $query_RSsearchforsale = sprintf("SELECT DISTINCT trueprice,`desc`, `propid`, `bathrooms`, `photo1`, locationtable.loc, typetable.style, bedtable.`number` FROM detailstable JOIN locationtable ON detailstable.location=locationtable.locid JOIN typetable ON detailstable.type=typetable.typeid JOIN pricetable ON detailstable.price=pricetable.priceid JOIN bedtable ON detailstable.beds=bedtable.bedid WHERE location=%s AND price=%s AND type=%s AND beds=%s ORDER BY detailstable.trueprice ASC", GetSQLValueString($varloc_RSsearchforsale, "text"),GetSQLValueString($varprice_RSsearchforsale, "text"),GetSQLValueString($vartype_RSsearchforsale, "text"),GetSQLValueString($varbed_RSsearchforsale, "text"));
    $query_limit_RSsearchforsale = sprintf("%s LIMIT %d, %d", $query_RSsearchforsale, $startRow_RSsearchforsale, $maxRows_RSsearchforsale);
    $RSsearchforsale = mysql_query($query_limit_RSsearchforsale, $propertypages) or die(mysql_error());
    $row_RSsearchforsale = mysql_fetch_assoc($RSsearchforsale);
    if (isset($_GET['totalRows_RSsearchforsale'])) {
      $totalRows_RSsearchforsale = $_GET['totalRows_RSsearchforsale'];
    } else {
      $all_RSsearchforsale = mysql_query($query_RSsearchforsale);
      $totalRows_RSsearchforsale = mysql_num_rows($all_RSsearchforsale);
    $totalPages_RSsearchforsale = ceil($totalRows_RSsearchforsale/$maxRows_RSsearchforsale)-1;
    $queryString_RSsearchforsale = "";
    if (!empty($_SERVER['QUERY_STRING'])) {
      $params = explode("&", $_SERVER['QUERY_STRING']);
      $newParams = array();
      foreach ($params as $param) {
        if (stristr($param, "pageNum_RSsearchforsale") == false &&
            stristr($param, "totalRows_RSsearchforsale") == false) {
          array_push($newParams, $param);
      if (count($newParams) != 0) {
        $queryString_RSsearchforsale = "&" . htmlentities(implode("&", $newParams));
    $queryString_RSsearchforsale = sprintf("&totalRows_RSsearchforsale=%d%s", $totalRows_RSsearchforsale, $queryString_RSsearchforsale); } ?>
    <?php require_once('Connections/propertypages.php'); ?>
    <?php if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;   
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      return $theValue;
    $currentPage = $_SERVER["PHP_SELF"];
    $maxRows_RsSearchForSale2 = 10;
    $pageNum_RsSearchForSale2 = 0;
    if (isset($_GET['pageNum_RsSearchForSale2'])) {
      $pageNum_RsSearchForSale2 = $_GET['pageNum_RsSearchForSale2'];
    $startRow_RsSearchForSale2 = $pageNum_RsSearchForSale2 * $maxRows_RsSearchForSale2;
    $varloc2_RsSearchForSale2 = "mpl";
    if (isset($_POST['location'])) {
      $varloc2_RsSearchForSale2 = $_POST['location'];
    $varprice2_RsSearchForSale2 = "p9";
    if (isset($_POST['price'])) {
      $varprice2_RsSearchForSale2 = $_POST['price'];
    $vartype2_RsSearchForSale2 = "vil";
    if (isset($_POST['type'])) {
      $vartype2_RsSearchForSale2 = $_POST['type'];
    $varbed2_RsSearchForSale2 = "b5";
    if (isset($_POST['beds'])) {
      $varbed2_RsSearchForSale2 = $_POST['beds'];
    switch (true) {
    case ($varloc2_RsSearchForSale2 == 'zzz'):
    case ($varprice2_RsSearchForSale2 == 'zzz'):
    case ($vartype2_RsSearchForSale2 == 'zzz'):
    case ($varbed2_RsSearchForSale2 == 'zzz'):
    mysql_select_db($database_propertypages, $propertypages);
    $query_RsSearchForSale2 = sprintf("SELECT DISTINCT trueprice,`desc`, `propid`, `bathrooms`, `photo1`, locationtable.loc, typetable.style, bedtable.`number` FROM detailstable JOIN locationtable ON detailstable.location=locationtable.locid JOIN typetable ON detailstable.type=typetable.typeid JOIN pricetable ON detailstable.price=pricetable.priceid JOIN bedtable ON detailstable.beds=bedtable.bedid WHERE (location=%s AND price=%s AND type=%s) OR (location=%s AND price=%s AND beds=%s) OR (location=%s AND type=%s AND beds=%s) OR (price=%s AND type=%s AND beds=%s) ORDER BY detailstable.trueprice ASC", GetSQLValueString($varloc2_RsSearchForSale2, "text"),GetSQLValueString($varprice2_RsSearchForSale2, "text"),GetSQLValueString($vartype2_RsSearchForSale2, "text"),GetSQLValueString($varloc2_RsSearchForSale2, "text"),GetSQLValueString($varprice2_RsSearchForSale2, "text"),GetSQLValueString($varbed2_RsSearchForSale2, "text"),GetSQLValueString($varloc2_RsSearchForSale2, "text"),GetSQLValueString($vartype2_RsSearchForSale2, "text"),GetSQLValueString($varbed2_RsSearchForSale2, "text"),GetSQLValueString($varprice2_RsSearchForSale2, "text"),GetSQLValueString($vartype2_RsSearchForSale2, "text"),GetSQLValueString($varbed2_RsSearchForSale2, "text"));
    $query_limit_RsSearchForSale2 = sprintf("%s LIMIT %d, %d", $query_RsSearchForSale2, $startRow_RsSearchForSale2, $maxRows_RsSearchForSale2);
    $RsSearchForSale2 = mysql_query($query_limit_RsSearchForSale2, $propertypages) or die(mysql_error());
    $row_RsSearchForSale2 = mysql_fetch_assoc($RsSearchForSale2);
    if (isset($_GET['totalRows_RsSearchForSale2'])) {
      $totalRows_RsSearchForSale2 = $_GET['totalRows_RsSearchForSale2'];
    } else {
      $all_RsSearchForSale2 = mysql_query($query_RsSearchForSale2);
      $totalRows_RsSearchForSale2 = mysql_num_rows($all_RsSearchForSale2);
    $totalPages_RsSearchForSale2 = ceil($totalRows_RsSearchForSale2/$maxRows_RsSearchForSale2)-1;
    $queryString_RsSearchForSale2 = "";
    if (!empty($_SERVER['QUERY_STRING'])) {
      $params = explode("&", $_SERVER['QUERY_STRING']);
      $newParams = array();
      foreach ($params as $param) {
        if (stristr($param, "pageNum_RsSearchForSale2") == false &&
            stristr($param, "totalRows_RsSearchForSale2") == false) {
          array_push($newParams, $param);
      if (count($newParams) != 0) {
        $queryString_RsSearchForSale2 = "&" . htmlentities(implode("&", $newParams));
    $queryString_RsSearchForSale2 = sprintf("&totalRows_RsSearchForSale2=%d%s", $totalRows_RsSearchForSale2, $queryString_RsSearchForSale2);
    }?>
    <?php require_once('Connections/propertypages.php'); ?>
    <?php if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;   
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      return $theValue;
    $currentPage = $_SERVER["PHP_SELF"];
    $maxRows_RsSearchForSale3 = 10;
    $pageNum_RsSearchForSale3 = 0;
    if (isset($_GET['pageNum_RsSearchForSale3'])) {
      $pageNum_RsSearchForSale3 = $_GET['pageNum_RsSearchForSale3'];
    $startRow_RsSearchForSale3 = $pageNum_RsSearchForSale3 * $maxRows_RsSearchForSale3;
    $varloc3_RsSearchForSale3 = "mpl";
    if (isset($_POST['location'])) {
      $varloc3_RsSearchForSale3 = $_POST['location'];
    $varprice3_RsSearchForSale3 = "p9";
    if (isset($_POST['price'])) {
      $varprice3_RsSearchForSale3 = $_POST['price'];
    $vartype3_RsSearchForSale3 = "vil";
    if (isset($_POST['type'])) {
      $vartype3_RsSearchForSale3 = $_POST['type'];
    $varbed3_RsSearchForSale3 = "b5";
    if (isset($_POST['beds'])) {
      $varbed3_RsSearchForSale3 = $_POST['beds'];
    switch (true) {
    case ($varloc3_RsSearchForSale3 == 'zzz' && $varprice3_RsSearchForSale3 == 'zzz'):
    case ($varprice3_RsSearchForSale3 == 'zzz' && $vartype3_RsSearchForSale3 == 'zzz'):
    case ($vartype3_RsSearchForSale3 == 'zzz' && $varbed3_RsSearchForSale3 == 'zzz' ):
    case ($varbed3_RsSearchForSale3 == 'zzz' && $varloc3_RsSearchForSale3 == 'zzz'):
    case ($varloc3_RsSearchForSale3 == 'zzz' && $vartype3_RsSearchForSale3 == 'zzz'):
    case ($varprice3_RsSearchForSale3 == 'zzz' && $varbed3_RsSearchForSale3 == 'zzz'):
    mysql_select_db($database_propertypages, $propertypages);
    $query_RsSearchForSale3 = sprintf("SELECT DISTINCT trueprice,`desc`, `propid`, `bathrooms`, `photo1`, locationtable.loc, typetable.style, bedtable.`number` FROM detailstable JOIN locationtable ON detailstable.location=locationtable.locid JOIN typetable ON detailstable.type=typetable.typeid JOIN pricetable ON detailstable.price=pricetable.priceid JOIN bedtable ON detailstable.beds=bedtable.bedid WHERE (location=%s AND price=%s) OR (location=%s AND  type=%s) OR (location=%s AND beds=%s) OR ( type=%s AND beds=%s) OR (price=%s AND type=%s) OR (price=%s AND beds=%s) ORDER BY detailstable.trueprice ASC", GetSQLValueString($varloc3_RsSearchForSale3, "text"),GetSQLValueString($varprice3_RsSearchForSale3, "text"),GetSQLValueString($varloc3_RsSearchForSale3, "text"),GetSQLValueString($vartype3_RsSearchForSale3, "text"),GetSQLValueString($varloc3_RsSearchForSale3, "text"),GetSQLValueString($varbed3_RsSearchForSale3, "text"),GetSQLValueString($vartype3_RsSearchForSale3, "text"),GetSQLValueString($varbed3_RsSearchForSale3, "text"),GetSQLValueString($varprice3_RsSearchForSale3, "text"),GetSQLValueString($vartype3_RsSearchForSale3, "text"),GetSQLValueString($varprice3_RsSearchForSale3, "text"),GetSQLValueString($varbed3_RsSearchForSale3, "text"));
    $query_limit_RsSearchForSale3 = sprintf("%s LIMIT %d, %d", $query_RsSearchForSale3, $startRow_RsSearchForSale3, $maxRows_RsSearchForSale3);
    $RsSearchForSale3 = mysql_query($query_limit_RsSearchForSale3, $propertypages) or die(mysql_error());
    $row_RsSearchForSale3 = mysql_fetch_assoc($RsSearchForSale3);
    if (isset($_GET['totalRows_RsSearchForSale3'])) {
      $totalRows_RsSearchForSale3 = $_GET['totalRows_RsSearchForSale3'];
    } else {
      $all_RsSearchForSale3 = mysql_query($query_RsSearchForSale3);
      $totalRows_RsSearchForSale3 = mysql_num_rows($all_RsSearchForSale3);
    $totalPages_RsSearchForSale3 = ceil($totalRows_RsSearchForSale3/$maxRows_RsSearchForSale3)-1;
    $queryString_RsSearchForSale3 = "";
    if (!empty($_SERVER['QUERY_STRING'])) {
      $params = explode("&", $_SERVER['QUERY_STRING']);
      $newParams = array();
      foreach ($params as $param) {
        if (stristr($param, "pageNum_RsSearchForSale3") == false &&
            stristr($param, "totalRows_RsSearchForSale3") == false) {
          array_push($newParams, $param);
      if (count($newParams) != 0) {
        $queryString_RsSearchForSale3 = "&" . htmlentities(implode("&", $newParams));
    $queryString_RsSearchForSale3 = sprintf("&totalRows_RsSearchForSale3=%d%s", $totalRows_RsSearchForSale3, $queryString_RsSearchForSale3);
    } ?>
    <?php require_once('Connections/propertypages.php'); ?>
    <?php if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;   
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      return $theValue;
    $currentPage = $_SERVER["PHP_SELF"];
    $maxRows_RsSearchForSale4 = 10;
    $pageNum_RsSearchForSale4 = 0;
    if (isset($_GET['pageNum_RsSearchForSale4'])) {
      $pageNum_RsSearchForSale4 = $_GET['pageNum_RsSearchForSale4'];
    $startRow_RsSearchForSale4 = $pageNum_RsSearchForSale4 * $maxRows_RsSearchForSale4;
    $varloc4_RsSearchForSale4 = "mpl";
    if (isset($_POST['location'])) {
      $varloc4_RsSearchForSale4 = $_POST['location'];
    $vartype4_RsSearchForSale4 = "vil";
    if (isset($_POST['type'])) {
      $vartype4_RsSearchForSale4 = $_POST['type'];
    $varprice4_RsSearchForSale4 = "p9";
    if (isset($_POST['price'])) {
      $varprice4_RsSearchForSale4 = $_POST['price'];
    $varbed4_RsSearchForSale4 = "b5";
    if (isset($_POST['beds'])) {
      $varbed4_RsSearchForSale4 = $_POST['beds'];
    switch (true) {
    case ($varloc4_RsSearchForSale4 == 'zzz' && $vartype4_RsSearchForSale4 =='zzz' && $varprice4_RsSearchForSale4 == 'zzz'):
    case ($varloc4_RsSearchForSale4 == 'zzz' && $varprice4_RsSearchForSale4 =='zzz' && $varbed4_RsSearchForSale4 == 'zzz'):
    case ($varloc4_RsSearchForSale4 == 'zzz' && $varbed4_RsSearchForSale4 =='zzz' && $vartype4_RsSearchForSale4 == 'zzz'):
    case ($varbed4_RsSearchForSale4 == 'zzz' && $vartype4_RsSearchForSale4 =='zzz' && $varprice4_RsSearchForSale4 == 'zzz'):
    mysql_select_db($database_propertypages, $propertypages);
    $query_RsSearchForSale4 = sprintf("SELECT DISTINCT trueprice,`desc`, `propid`, `bathrooms`, `photo1`, locationtable.loc, typetable.style, bedtable.`number` FROM detailstable JOIN locationtable ON detailstable.location=locationtable.locid JOIN typetable ON detailstable.type=typetable.typeid JOIN pricetable ON detailstable.price=pricetable.priceid JOIN bedtable ON detailstable.beds=bedtable.bedid WHERE location=%s OR price=%s OR type=%s OR beds=%s ORDER BY detailstable.trueprice ASC", GetSQLValueString($varloc4_RsSearchForSale4, "text"),GetSQLValueString($varprice4_RsSearchForSale4, "text"),GetSQLValueString($vartype4_RsSearchForSale4, "text"),GetSQLValueString($varbed4_RsSearchForSale4, "text"));
    $query_limit_RsSearchForSale4 = sprintf("%s LIMIT %d, %d", $query_RsSearchForSale4, $startRow_RsSearchForSale4, $maxRows_RsSearchForSale4);
    $RsSearchForSale4 = mysql_query($query_limit_RsSearchForSale4, $propertypages) or die(mysql_error());
    $row_RsSearchForSale4 = mysql_fetch_assoc($RsSearchForSale4);
    if (isset($_GET['totalRows_RsSearchForSale4'])) {
      $totalRows_RsSearchForSale4 = $_GET['totalRows_RsSearchForSale4'];
    } else {
      $all_RsSearchForSale4 = mysql_query($query_RsSearchForSale4);
      $totalRows_RsSearchForSale4 = mysql_num_rows($all_RsSearchForSale4);
    $totalPages_RsSearchForSale4 = ceil($totalRows_RsSearchForSale4/$maxRows_RsSearchForSale4)-1;
    $queryString_RsSearchForSale4 = "";
    if (!empty($_SERVER['QUERY_STRING'])) {
      $params = explode("&", $_SERVER['QUERY_STRING']);
      $newParams = array();
      foreach ($params as $param) {
        if (stristr($param, "pageNum_RsSearchForSale4") == false &&
            stristr($param, "totalRows_RsSearchForSale4") == false) {
          array_push($newParams, $param);
      if (count($newParams) != 0) {
        $queryString_RsSearchForSale4 = "&" . htmlentities(implode("&", $newParams));
    $queryString_RsSearchForSale4 = sprintf("&totalRows_RsSearchForSale4=%d%s", $totalRows_RsSearchForSale4, $queryString_RsSearchForSale4);
    }?>

    Hi David,
    Thank you for your reply and patience, we are getting closer in spite of me!
    Of course i needed to change the name of the recordset, i did that the first time i did it (when i got the error), the when i re did it i forgot, in my defense i was also trying to get a full understanding of the code using the W3Schools php reference and writing by the side of the code on a piece of paper what it meant in English.
    Anyway after re doing the code correctly it still displayed all the records of my database but i realised that was because i was POSTING from the search form and when i changed it to the GET method I now get results when all 4  list menus are selected from and the paging works. After reading about the POST / GET method i chose the POST option, is the GET method a better option in my circumstance?
    On my site now if the user selects from 1,2 or 3 of the menus rather than selecting the relevant records it displays the NO RESULT page, I would like my users to be able to select from all of the menus or ANY combination of the menus and find exact results for their search, for example if they only select a location and a price i want it display all records that match that location and price with any number of bedrooms and any Type of property: Perhaps this is due to how my list menus are set up, for each menu the first Item label is Location (or Beds or Type or Price) and the value i have left blank which i believe means that it will use the item label as the value, the second Item label for all menus is Any and again the value has been left blank. All other item labels have values relevant to database records.  
    I do look forward to your reply and cannot thank you enough for following this through with me, please continue to bare with me just a little more,
    best regards
    Tessimon
    Date: Wed, 11 Nov 2009 06:56:24 -0700
    From: [email protected]
    To: [email protected]
    Subject: Help with message please:  Warning: mysql_free_result() expects parameter 1 to be resource, null given in...... line
    You're not adding the WHERE clause to the SQL query. My example code uses $query_search. You need to change that variable to match the name of your recordset, i.e. $query_RSsearchforsale.
    Moreover, the WHERE clause needs to go before ORDER BY.
    $query_RSsearchforsale = "SELECT trueprice,`desc`, `propid`, `bathrooms`, `location`, `type`, `price`, `beds`, `photo1`, locationtable.loc, typetable.style, bedtable.`number` FROM detailstable JOIN locationtable ON detailstable.location=locationtable.locid JOIN typetable ON detailstable.type=typetable.typeid JOIN pricetable ON detailstable.price=pricetable.priceid JOIN bedtable ON detailstable.beds=bedtable.bedid ";
    // Set a flag to indicate whether the query has a WHERE clause
    $where = false;
    // Loop through the associatiave array of expected search values
    foreach ($expected as $var => $type) {
      if (isset($_GET[$var])) {
        $value = trim(urldecode($_GET[$var]));
        if (!empty($value)) {
          // Check if the value begins with > or <
          // If so, use it as the operator, and extract the value
          if ($value[0] == '>' || $value[0] == '<') {
            $operator = $value[0];
            $value = ltrim(substr($value, 1));
          } elseif (strtolower($type) != 'like') {
            $operator = '=';
          // Check if the WHERE clause has been added yet
          if ($where) {
            $query_RSsearchforsale .= ' AND ';
          } else {
            $query_RSsearchforsale .= ' WHERE ';
            $where = true;
          // Build the SQL query using the right operator and data type
          $type = strtolower($type);
          switch($type) {
            case 'like':
              $query_RSsearchforsale .= "`$var` LIKE " . GetSQLValueString('%' .
    $value . '%', "text");
              break;
            case 'int':
            case 'double':
            case 'date':
              $query_RSsearchforsale .= "`$var` $operator " .
    GetSQLValueString($value, "$type");
              break;
            default:
            $query_RSsearchforsale .= "`$var` = " . GetSQLValueString($value,
    "$type");
    $query_RSsearchforsale .= ' ORDER BY detailstable.trueprice ASC';
    >

  • Help with java mapping

    PI File adapter has a processing option u2018Empty-Message Handlingu2019 to ignore or Write Empty Files. In case there is no data created after mapping on target side then this option determines whether to write an empty file or not. But there is a catch to this option when it comes to using it with File Content Conversion which is described in SAP Note u2018821267u2019. It states following:
    I configure the receiver channel with File content conversion mode and I set the 'Empty Message Handling' option to ignore. Input payload to the receiver channel is generated out of mapping and it does not have any record sets. However, this payload has a root element. Why does file receiver create empty output file with zero byte size in the target directory?  Example of such a payload generated from mapping is as follows:                                                           
    <?xml version="1.0" encoding="UTF-8"?>                          
    <ns1:test xmlns:ns1="http://abcd.com/ab"></ns1:test>
    solution :
    If the message payload is empty (i.e., zero bytes in size), then File adapter's empty message handling feature does NOT write files into the target directory. On the other hand, if the payload is a valid XML document (as shown in example) that is generated from mapping with just a root element in it, the File Adapter does not treat it as an empty message and accordingly it writes to the target directory. To achieve your objective of not writing files (that have just a single root element) into the target directory, following could be done:
    Using a Java or ABAP Mapping in order to restrict the creation of node itself during mapping. (This cannot be achieved via Message Mapping)
    Using standard adapter modules to do content conversion first and then write file. 
    can someone help with java mapping that can be used in this case?

    Hi,
        You have not mentioned the version of PI you are working in. In case you are working with PI 7.1 or above then here is the java mapping code you need to add after message mapping in the same interface mapping
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.InputStream;
    import java.io.OutputStream;
    import java.util.Map;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.stream.StreamResult;
    import org.w3c.dom.Document;
    import com.sap.aii.mapping.api.AbstractTransformation;
    import com.sap.aii.mapping.api.StreamTransformationException;
    import com.sap.aii.mapping.api.TransformationInput;
    import com.sap.aii.mapping.api.TransformationOutput;
    public class RemoveRootNode extends AbstractTransformation{
         public void execute(InputStream in, OutputStream out)
         throws StreamTransformationException {
    // TODO Auto-generated method stub
    try
         DocumentBuilderFactory factory=DocumentBuilderFactory.newInstance();
         DocumentBuilder builderel=factory.newDocumentBuilder();
         /*input document in form of XML*/
         Document docIn=builderel.parse(in);
         /*document after parsing*/
         Document docOut=builderel.newDocument();
         TransformerFactory tf=TransformerFactory.newInstance();
         Transformer transform=tf.newTransformer();
         if(docIn.getDocumentElement().hasChildNodes())
              docOut.appendChild(docOut.importNode(docIn.getDocumentElement(),true));
              transform.transform(new DOMSource(docOut), new StreamResult(out));
         else
              out.write(null);
    catch(Exception e)
    public void setParameter(Map arg0) {
    // TODO Auto-generated method stub
    public static void main(String[] args) {
    // TODO Auto-generated method stub
    try{
         RemoveRootNode genFormat=new RemoveRootNode();
         FileInputStream in=new FileInputStream("C:\\apps\\sdn\\rootNode.xml");
         FileOutputStream out=new FileOutputStream("C:\\apps\\sdn\\rootNode1.xml");
         genFormat.execute(in,out);
         catch(Exception e)
         e.printStackTrace();
    public void transform(TransformationInput arg0, TransformationOutput arg1)
              throws StreamTransformationException {
         // TODO Auto-generated method stub
         this.execute(arg0.getInputPayload().getInputStream(), arg1.getOutputPayload().getOutputStream());
    In case you are working in PI 7.0 you can use this code
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.InputStream;
    import java.io.OutputStream;
    import java.util.Map;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.stream.StreamResult;
    import org.w3c.dom.Document;
    import com.sap.aii.mapping.api.StreamTransformation;
    import com.sap.aii.mapping.api.StreamTransformationException;
    public class RemoveRootNode implements StreamTransformation{
         public void execute(InputStream in, OutputStream out)
         throws StreamTransformationException {
    // TODO Auto-generated method stub
    try
         DocumentBuilderFactory factory=DocumentBuilderFactory.newInstance();
         DocumentBuilder builderel=factory.newDocumentBuilder();
         /*input document in form of XML*/
         Document docIn=builderel.parse(in);
         /*document after parsing*/
         Document docOut=builderel.newDocument();
         TransformerFactory tf=TransformerFactory.newInstance();
         Transformer transform=tf.newTransformer();
         if(docIn.getDocumentElement().hasChildNodes())
              docOut.appendChild(docOut.importNode(docIn.getDocumentElement(),true));
              transform.transform(new DOMSource(docOut), new StreamResult(out));
         else
              out.write(null);
    catch(Exception e)
    public void setParameter(Map arg0) {
    // TODO Auto-generated method stub
    public static void main(String[] args) {
    // TODO Auto-generated method stub
    try{
         RemoveRootNode genFormat=new RemoveRootNode();
         FileInputStream in=new FileInputStream("C:\\apps\\sdn\\rootNode.xml");
         FileOutputStream out=new FileOutputStream("C:\\apps\\sdn\\rootNode1.xml");
         genFormat.execute(in,out);
         catch(Exception e)
         e.printStackTrace();
    The code for PI 7.0 should also work for PI 7.1 provided you use the right jar files for compilation, but vice-versa is not true.
    Could you please let us know if this code was useful to you or not?
    Regards
    Anupam
    Edited by: anupamsap on Dec 15, 2011 9:43 AM

  • Help with updates - The software change returned error code 0x87D00215(-2016411115).

    I have rolled out bunch of updates across few hundred workstation systems.
    Few of the desktops have failed to install SOME of the updates and just can't get my head around as to why?
    Looking at one of the workstations, I can see 5 updates are pending download at 0%.
    Some of these fail after a while and with in Software Centre, I can see 'Help with updates - The software change returned error code 0x87D00215(-2016411115).'. Not exactly sure what this means, but I have tried clearing the cache and
    rebooting the workstations few times.
    (I have also tried to use Windows Update and install one of these manually, which worked.)

    Investigating this further, I have found the following in CAS.log:
    ICcmContentTransferManager::ModifyJobPriority failed with error 0x87d00215 ContentAccess 01/06/2013 17:19:24 3316 (0x0CF4)
    No need to change timeout settings ContentAccess 01/06/2013 17:19:24 3316 (0x0CF4)
    Successfully created download request {ED6E9E5C-E806-43CA-9F93-49AC72D1DEAD} for content 53bf87a2-bedf-4def-b0ec-9637613c3429.1 ContentAccess 01/06/2013 17:19:24 3316 (0x0CF4)
    Requesting locations synchronously for content 99ddb078-b780-4605-8fac-9607fe56450d.1 with priority Foreground ContentAccess 01/06/2013 17:19:24 3316 (0x0CF4)
    The number of discovered DPs(including Branch DP and Multicast) is 1 ContentAccess 01/06/2013 17:19:24 3316 (0x0CF4)
    Calling back with the following distribution points ContentAccess 01/06/2013 17:19:24 3316 (0x0CF4)
    Distribution Point='http://DPSERVER.com/SMS_DP_SMSPKG$/99ddb078-b780-4605-8fac-9607fe56450d', Locality='LOCAL' ContentAccess 01/06/2013 17:19:24 3316 (0x0CF4)
    Requesting content 99ddb078-b780-4605-8fac-9607fe56450d.1, size(KB) 0, under context System with priority Foreground ContentAccess 01/06/2013 17:19:24 3316 (0x0CF4)
    ICcmContentTransferManager::ModifyJobPriority failed with error 0x87d00215 ContentAccess 01/06/2013 17:19:24 3316 (0x0CF4)
    No need to change timeout settings ContentAccess 01/06/2013 17:19:24 3316 (0x0CF4)
    Successfully created download request {67B7E59B-A386-4EA8-BF39-2EB64B108A6C} for content 99ddb078-b780-4605-8fac-9607fe56450d.1 ContentAccess 01/06/2013 17:19:24 3316 (0x0CF4)
    Requesting locations synchronously for content 61d33de7-9582-41e3-82fc-3e0f970b60f3.1 with priority Foreground ContentAccess 01/06/2013 17:19:24 3316 (0x0CF4)
    The number of discovered DPs(including Branch DP and Multicast) is 1 ContentAccess 01/06/2013 17:19:24 3316 (0x0CF4)
    Calling back with the following distribution points ContentAccess 01/06/2013 17:19:24 3316 (0x0CF4)
    Distribution Point='http://DPSERVER.com/SMS_DP_SMSPKG$/61d33de7-9582-41e3-82fc-3e0f970b60f3', Locality='LOCAL' ContentAccess 01/06/2013 17:19:24 3316 (0x0CF4)
    Requesting content 61d33de7-9582-41e3-82fc-3e0f970b60f3.1, size(KB) 0, under context System with priority Foreground ContentAccess 01/06/2013 17:19:24 3316 (0x0CF4)
    ICcmContentTransferManager::ModifyJobPriority failed with error 0x87d00215 ContentAccess 01/06/2013 17:19:24 3316 (0x0CF4)
    No need to change timeout settings ContentAccess 01/06/2013 17:19:24 3316 (0x0CF4)
    Successfully created download request {12E48136-B545-4C42-9745-9FF97CE38D52} for content 61d33de7-9582-41e3-82fc-3e0f970b60f3.1 ContentAccess 01/06/2013 17:19:24 3316 (0x0CF4)

  • I need help with my mapping - CL_MAPPING_XMS_PLSRV3-ENTER_PLSRV

    hi, guys, i need help with my mapping, i dont know this error (i not speak english)
    <Trace level="1" type="B">CL_MAPPING_XMS_PLSRV3-ENTER_PLSRV</Trace>
    <Trace level="2" type="T">......attachment XI_Context not found </Trace>
    <Trace level="3" type="T">Mapping already defined in interface determination </Trace>
    <Trace level="3" type="T">Object ID of Interface Mapping 4B903E2DDC853C1493E1DED5C5ED70A3 </Trace>
    <Trace level="3" type="T">Version ID of Interface Mapping 88D96A70BAAE11DFAE5EE925C0A800C2 </Trace>
    <Trace level="1" type="T">Mapping-Object-Id:4B903E2DDC853C1493E1DED5C5ED70A3 </Trace>
    <Trace level="1" type="T">Mapping-SWCV:88D96A70BAAE11DFAE5EE925C0A800C2 </Trace>
    <Trace level="1" type="T">Mapping-Step:1 </Trace>
    <Trace level="1" type="T">Mapping-Type:JAVA_JDK </Trace>
    <Trace level="1" type="T">Mapping-Program:com/sap/xi/tf/_mm_sgipi_fi001_vta_clientes_ </Trace>
    <Trace level="3" type="T">MTOM Attachments Are Written to the Payload </Trace>
    <Trace level="3" type="T">Dynamic Configuration Is Empty </Trace>
    <Trace level="3" type="T">Executing multi-mapping </Trace>
    <Trace level="1" type="E">CL_XMS_PLSRV_MAPPING~ENTER_PLSRV</Trace>
    help me please

    you can use the sharedobject to record a user/computer has taken your quiz, the session data and record their results.  at the start of your quiz, check for the sharedobject and, if it exists, check the other data and take appropriate action.

  • How to do this with message mapping in PI  ?

    Hi All,
    Field 1 = 100 characters having values in  first fifty characters and last 50 characters blank . I need to remove all the first 50 characters with blank and pass 100 blank characters .How to do this with message mapping
    Thanks

    Adding to that, since usually a tab = 8 spaces. What you can do is to open notepad, press tab 4 times. Copy it and paste 3 times, afterwards press space 4 more times and you get 100 spaces.
    Regards,
    Mark

  • Problem with message mapping ...

    Hello,
    I have problem with message mapping. I implemented SOAP-to-RFC scenario. The source message is of type http://sntcz.cz/xmlns/holidays:MT_Holiday, the target message of type urn:sap-com:document:sap:rfc:functions:Z_GET_SUPERIOR. But some error is still generated in Request Message Mapping step:
    com.sap.aii.utilxi.misc.api.BaseRuntimeException: RuntimeException in Message-Mapping transformation: Cannot produce target element /ns1:Z_GET_SUPERIOR/USR. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd at com.sap.aii.mappingtool.tf3.AMappingProgram.start(AMappingProgram.java:403) at com.sap.aii.mappingtool.tf3.Transformer.start(Transformer.java:142) at com.sap.aii.mappingtool.tf3.AMappingProgram.execute(AMappingProgram.java:102) at .....
    This is XSD definition of source message:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://sntcz.cz/xmlns/holidays" targetNamespace="http://sntcz.cz/xmlns/holidays">
    <xsd:element name="MT_Holiday" type="DT_Holiday" />
    <xsd:complexType name="DT_Holiday">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    030495e1742f11dd963600301875333b
    </xsd:appinfo>
    </xsd:annotation>
    <xsd:sequence>
    <xsd:element name="SinceDay" type="xsd:string">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    fba049b067aa11dd8be6eee20abb2a3f
    </xsd:appinfo>
    </xsd:annotation>
    </xsd:element>
    <xsd:element name="SinceMounth" type="xsd:string">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    fba293a067aa11dda311eee20abb2a3f
    </xsd:appinfo>
    </xsd:annotation>
    </xsd:element>
    <xsd:element name="SinceYear" type="xsd:string">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    fba293a167aa11dd9b4eeee20abb2a3f
    </xsd:appinfo>
    </xsd:annotation>
    </xsd:element>
    <xsd:element name="UntilDay" type="xsd:string">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    fba293a267aa11ddc352eee20abb2a3f
    </xsd:appinfo>
    </xsd:annotation>
    </xsd:element>
    <xsd:element name="UntilMounth" type="xsd:string">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    fba293a367aa11ddc33aeee20abb2a3f
    </xsd:appinfo>
    </xsd:annotation>
    </xsd:element>
    <xsd:element name="UntilYear" type="xsd:string">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    fba293a467aa11dda8cfeee20abb2a3f
    </xsd:appinfo>
    </xsd:annotation>
    </xsd:element>
    <xsd:element name="UserId" type="xsd:string">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    fba293a567aa11dd9698eee20abb2a3f
    </xsd:appinfo>
    </xsd:annotation>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:schema>
    This is XSD definition of target message:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:sap-com:document:sap:rfc:functions" targetNamespace="urn:sap-com:document:sap:rfc:functions">
    <xsd:element name="Z_GET_SUPERIOR">
    <xsd:complexType>
    <xsd:all>
    <xsd:element name="USR" type="xsd:string" minOccurs="0" />
    </xsd:all>
    </xsd:complexType>
    </xsd:element>
    </xsd:schema>
    It's strange that if I use Message Mapping Test it works fine. But in pipeline not.
    Do you have any idea where could be the problem?
    Thank you in advance!
    Best regard,
    Zbynek

    Hi,
    To know the correct error Take the Inbound Payload from MONI and Test it in Mapping Test TAB. then u will come to know the exact error.
    Procedure to take the Payload
    goto MONI-Double click on MessageInbound Message ( CENTRAL ) --Payloads ---Double click on MainDocument ( application/xml ) -Just Right Click on the second window-View Source
    then now Copy this and paste it in Mapping Test and Execute.
    REgards
    Seshagiri

  • Upgrading from XI/PI7.0 to 7.1 having problems with message mapping

    Hello,
    We are in the process over the past week of testing our XI/PI functionality after upgrading our 7.0 XI/PI environment to PI7.1; in particular several maps that were accessible in 7.0 will not open or diaplay in 7.1 complaining of a missing node in the mapping structure. Currently working with SAP on a possible fix but wanted to know if anyone else has done a true migration on top of an existing XI/PI7.0 system and experiencing similar issues (note: the maps can execute in the runtime environment but we can't display the maps source within message mapping; this also does not occur for all maps and there is no clear consistant theme to those that can be displayed and those that can't).
    The lattest issue just encountered related to message mapping is that in test mode of a map (that can be displayed) attempting to display the data queue for the mapped elements are blank no data being displayed giving an error noting that the source text of object message mapping: name of the map; has syntax errors, java area import line x, package ibm.com.xi.mapping does not exist/ import ibm.com.xi.mapping UDF:
    Has anyone upgraded from PI7.0 to 7.1 and experienced errors with existing maps that worked ok (ans still work in our QX/PRD systems) in their 7.0 envirinment but encountereing strange errors once upgrated to 7.1?
    Thanks
    Dereck Purnell
    NewellRubbermaid

    Here is the solution we received from SAP to address the issue, there were several mapping related issues we started havng from maps that worked in our 7.0 system prior to the upgrade to PI 7.1. I will try to encorporate the solutions in this response.
    a) From Customer to SAP
    1. We are unable to open some massage mapping, it is throwing
    exception
    2. Number Format functions throw exception.
    But following issue is still unresolved:
    3. When we display message queue, it throws exception
    ***) 05.02.2009 - 12:34:33 CET - Reply by SAP     
    The patch has been released at the Service Marketplace.
    Please update the scas described in the note 1264871.
    The "FormatNum" function issue has also been taken care in this patch.
    Please go through the Note 1264871 for other behaviour changes after
    upgrade. Let us know if you need any further help.
    Regards,
    B) From Customer to SAP
    04.02.2009 - 00:23:44 CET - Info for SAP
    We discovered another issue with mapping.
    For some of the mappings, we are unable to display mapping queue. When
    we execute, Interface mapping and Massage mapping, it works fine. But
    display queue throws exception. Itu2019s not able to recognize libraries
    used from dependent software component.
    Please find document "Display Mapping Queue Issue" providing example
    problem.
    25.02.2009 - 07:05:28 CET - *Reply by SAP*     
    Thank you for your update. I wanted to check with "CopyValue"
    function's index. It has to take an input integer and the problem that
    found while debugging the opening of your mapping is that the input
    was empty thus causing the exception.
    I was going to suggest the intended use of "CopyValue" function.
    When the input to "copyValue" is a constant, "copyValue" is totally
    not necessary. Thus constant can be directly mapped to other function.
    When the input is a node with values in context, you can treat one of
    values say input[0] to used in mapping by using CopyValue[0].
    But please make sure that input[0] will always produce a value.
    Note 877964 will describe in detail on Copyvalue usage.
    I am marking this Message as complete. Please confirm.

  • Freely programmed search help with external mapping

    Hi all.
    I have a freely programmed search help to search for physical inventory items.
    I map some data from the component where i use this search help to this search help via external mapping. This works fine.
    But in the search help I want to be able to change the mapped data to perform a new serach. When I change the data and start the action to search again (in the serach help component)  I still get the old field value from context so that the search returns the same result. When I close the search help afterwards the changes are suddenly visible in the using component. So my entered data are somehow transfered to the original context but not to the context of the used component.
    Any ideas?
    Thanks
    Sascha
    Message was edited by:
            Sascha Dingeldey

    Hi Sascha,
    I would suggest, that you do not work with the externally mapped attribute.
    Try to copy the value to a "local" attribute in the searchhelp context while WDDOINIT of the component.
    This is the attribute you should use for the search.
    When you change the searchvalue, it is only changed in the comnponent.
    To get the values back to the calling component you need to copy it back while you call the action submit or exit.
    Hope this helps
    Best regards, Matthias

  • Problem with Message-Mapping: Loop over Elements possible?

    Hi all,
    I want do create a Message-Mapping for an IDoc-to-File Scenario. In the Source Structure there are some Elements which can appear more than once (1..unbounded). I need a mechanism which loops over these elements and search for specified values. From the Element which contains an element with this specified value the mapping should write a value in the target structure.
    Here a simple example (source structure) for better understanding:
    <root>
       <invoice>
          <number> 10 </number>
          <sum> 200.00 </sum>
       </invoice>
       <invoice>
          <number> 20 </number>
          <sum> 150.00 </sum>
       </invoice>
       <invoice>
          <number> 30 </number>
          <sum> 120.00 </sum>
       </invoice>
    </root>
    Now the duty of the Mapping should be to search in the elements <invoice> for the number 30. And then the sum of the invoice with the number 30 should be written in a field of the target structure.
    I tried it out with a constant togehter with an equalsS-function and an ifWithoutElse-function, but it is working only then, if the invoice with the number 30 has the first position in the root context.
    Can anybody help me? Thanks
    With kind regards
    Christopher

    Hi,
    Write a UDF to sum the required values and map to target node.
    See while writing the UDF select the type as queue.
    number -- removecontext-UDF targetnode
    sum----removecontext--/
    number abd sum or the two inputs
    in UDF
    int nsum = 0;
    for(int i;i < number.length;i++){
      if number(i).equals("30") then
         nsum = nsum + valueOf(sum(i));
    result.addValue(nsum); // convert the nsum into string
    Regsrds
    Chilla

  • Change Message Mapping / Cannot change / Pen not active?!

    Hi there,
    i have a Problem. I have to change a Message Mapping.
    SAP sended me a Note with a Word Doc where is described what i have to change..
    But in the Integration Builder Design i cannot change a mapping.. cause the PEN in the Menu is greyed out...?!
    Please help
    Regards
    Bjoern

    Thanks
    that was it

  • Creation of CDATA with message mapping

    Hello all,
    Is everyone absolutely sure that a cdata string cannot be created in the middle of an xml file using message mapping? 
    I have tried doing the XSL map in other blogs I even tried writing a whole XSL map in xml spy - yet xi complains about not finding this class file and that class file.  I'm having a hard time believing that this is so hard to do in XI - especially when Microsoft web service implementation seem to long for data crammed into a string ( in my experience ).
    Any help is GREATLY appreciated.
    Thank you!!!
    Scott

    Hi Scott,
             Pls follow the following steps to insert XML string into a single element:
    Create a xsl file with the following data:
    <?xml version='1.0' ?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" <i><b>NSpace</b></i>>
    <xsl:template match="/">
    <namespace:name1>
    <xsl:text disable-output-escaping="yes"><![CDATA[<![CDATA[]]></xsl:text><xsl:copy-of select="<b>//namespace:name</b>"/><xsl:text disable-output-escaping="yes"><![CDATA[]]]]></xsl:text><xsl:text disable-output-escaping="yes"><![CDATA[>]]></xsl:text>
    </namespace:name1>
    </xsl:template>
    </xsl:stylesheet>
    In the above code I have removed xmlns:p2="http://frik.bcc.com.pl" which is not needed.
    Also you have to put '<b>//</b>' before the target element from where you want to start creating XML string over here it is <b>name</b>. And <b>name1</b> is the element you want to store the XML string in.
    So anything in the element <b>name</b> will be stored in <b>name1</b>
    Regarding the <b>namespace:</b> To find out the namespace test your message mapping between the source and the target without adding XSLT mapping. After testing click on <b>'SCR'</b> tab present on top of the target window. There you will see <b>ns1: or ns2:</b> attached to each element. Replace <b>namespace</b> in the above code with <b>ns1: or ns2:</b>.  And replace <b>NSpace</b> in the above XSL Header with the namespace in the SCR of test map.
    So the final XSL file will look like that:
    <?xml version='1.0' ?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" <i><b>xmlns:ns1="http://sap.com/xi/HR"</b></i>>
    <xsl:template match="/">
    <<b>ns1:</b>name1>
    <xsl:text disable-output-escaping="yes"><![CDATA[<![CDATA[]]></xsl:text><xsl:copy-of select="<b>//ns1:name</b>"/><xsl:text disable-output-escaping="yes"><![CDATA[]]]]></xsl:text><xsl:text disable-output-escaping="yes"><![CDATA[>]]></xsl:text>
    </<b>ns1:</b>name1>
    </xsl:template>
    </xsl:stylesheet>
    Dont forget to put '//' before the target element.
    This should work. Or pls put the source and target xml struct and we will assist you further.
    Regards,
    Ashish

  • Need help with instruments mapping

    I have Korg PA80 and i hooked up midi out from it to midi in to Logic8, I have some nice realtime accompaniment tunes i can play on that keyboard, what i want to do is to play on my PA80 accompaniment tracks but replace all sounds with my custom sounds from my Logic plug ins, right now when I hit play all i hear is some garbage playing because no instruments properly mapped on Logic, I even created all 16 instrument tracks and set them all on all 16 channels, drums on 10 and so on, but when i start play on PA80 in Logic I still hear like bass trying to play all parts and not bass part only, same for drums when i press Am or Dm drums will play properly with some another drums sounds that trying to play all other instruments parts, need to separate them so the bass will play only bass part, drums will play drum part and so on, need help on how can i do that, lets say for drums i will choose logic drums sounds, for base Logic bases and so on, so Logic will become something like sound module for my PA80 instead of internal sounds I would like to use my virtual instruments sounds, thanks a lot

    Thanks for your reply Dave.
    I have no answer to your question but I found a way to create my SQL code with OWB mapping operators. Unfortunately it is very very slow compared to the execution of the SQL code and therefore not useful at all. I connected the following steps all in one mapping:
    1. Table operator(T006_SITE) -> Filter(T006A01PK_SITEID where T006A11FK_COUNTRYID IS NULL)
    2. Table operator(T002_COUNTRY) -> AGG (MAX T002A01PK_COUNTRYID)
    3. JOIN the output from 1. and 2.(T006A01PK_SITEID and T002A01PK_COUNTRYID))
    4. UPDATE T006_SITE with the output from 3. (T006A01PK_SITEID as matching column and T006A11FK_COUNTRYID as column to be updated)
    The execution mode of the mapping should be set-based fail over to row-based, but it used row-based mode even without getting an error. Are UPDATE mappings only executable in row-based mode or is there a way to change that?
    Does anyone have an idea how I can speed up that mapping or integrate my SQL code in the OWB?
    Thanks in advance,
    Dirk

  • Need help on message mapping screen

    Hi folks,
    I am working on file to idoc scenario.   I Imported the IDOC to my scenario. In Messaga Mapping IDOC structure displaying fields as a documention. but i need techincal names of those fields.
    for Example:   In my IDOC 1 field is showing companycode but I want to see that field as a BUKRS.
    How to see the technical names of IDOC fields in Message Mapping.
    Your help is highly apprecia

    Hi,
    I dont think we would be able to see the data element names of the IDOC in XI. Even the imported XSD of Idoc doesnot contain data element name.
    We would be only dealing with the field names/ structure of the IDOC for field message mappings. The field names are internally mapped to the data element names in SAP R3 system.
    To view the internal mapping between field names and data element names of the Idoc fields, you can go to the transaction 'WE30'. Give the basic type of the Idoc and go to the segment editor. You can find the data element names for each field name  there.
    Thank you.
    Regards,
    Subbu

Maybe you are looking for

  • Server setup help

    Hi everyone, I have just installed Os X Server 10.5 on a new iMac. I am using it to manage a bunch of tother macs on my network. in the initial setup I choose "Standard Setup" and continued the rest of the config. Now every time I try to add a new us

  • How i can add link to image in mySql

    im trying add link to image in mysql fiels? I do not want use blob

  • Search function in the Adobe Viewer

    Hey there, i have the follow problems with de Adobe digital Publishing suite. Our company will present our costumers a catalog with the digital publishing suite for free. But we have so many questions about the FOLIO and the Adobe viewer and we need

  • Wi-Fi doesn't give Auto-Join or Forget Network options

    Is this normal for iOS 5.1? If I go out of range or turn my WiFi off, and then come in range/turn wifi on, it won't autoconnect and I have to re-input the password. When I hit the blue arrow next to the connected network, it doesn't give me a Forget

  • JTable: AUTO_RESIZE_OFF and setPreferredSize

    Hi, I know this has been asked befre but i could find no answer. I have a JTable that I want to set each columns width. I have to use AUTO_RESIZE_OFF so that I get the scrollbar, but then my code to resize columns seems to make no change. I have also