none
BizTalk Mapping conversion table RRS feed

  • Question

  • I have a map that I use for all of my customers sending EDIx12 850 version 4010 purchase order source which is then has a destination file on the AS400.   I need to be able to check field PO109 for approximately 10 different part numbers.  If for example the part number is Part A then I will need to mutliple the field PO102 by 10, and then map the results to a field, QUANTITY,  on the destination field.  I need to only do this conversion for only one of my trading parts.  For another example, Part B will need to multiple the field PO102 by 4, an then map the results to the field QUANTITY on the destination schema.  How would I do this?

    Wednesday, October 28, 2009 7:57 PM

Answers

  • There are various ways you can do this. First, you willl need to do a function that calculates the inforamtion. You can create a fucntion that passes the fields to an stored procedure where you can pass the values from the map. Now there are many examples on how to do this. You can do a search on how to pass the variables to a stored proceudre from the map using a scripting functoid. You can also use an orchestration to do the same thing. If you have never do this, it is much easier than you think. The reason I like to use a stored procedure is because you can log all the information and have records to ensure what came in and what was the output. If you decide to use a stored procedure, make sure it works first before you work on the map. I have made teh mistake of starting from the map and that is a huge error. Make sure that you can pass values to the stored procedure and it returns what you need. If that works, then work on a function that you can call from the map with a scripting functoid or the orchestration. I hope this helps.
    Please mark this answer if this answered your question
    Friday, October 30, 2009 12:04 PM
  • I would do it using Database Lookup functoid for less dependency. You can have one table to store information like Partner code, different part types and multiplying factor, so in the map based on Partner code and part type get the multiplying factor and use it as you want.

    The fourth parameter for database functoid will be like PartnerCode+PartType (PartnerCode and PartType are column names). Refer nice link by Eric on this topic http://blog.biztalk-info.com/archive/2009/05/07/Hacking_the_Database_Lookup_functiod_continued.aspx

    So in this way you will have luxry of changing/adding partners or part type.

    Ajeet Kumar
    Monday, November 2, 2009 9:05 AM

All replies

  • There are various ways you can do this. First, you willl need to do a function that calculates the inforamtion. You can create a fucntion that passes the fields to an stored procedure where you can pass the values from the map. Now there are many examples on how to do this. You can do a search on how to pass the variables to a stored proceudre from the map using a scripting functoid. You can also use an orchestration to do the same thing. If you have never do this, it is much easier than you think. The reason I like to use a stored procedure is because you can log all the information and have records to ensure what came in and what was the output. If you decide to use a stored procedure, make sure it works first before you work on the map. I have made teh mistake of starting from the map and that is a huge error. Make sure that you can pass values to the stored procedure and it returns what you need. If that works, then work on a function that you can call from the map with a scripting functoid or the orchestration. I hope this helps.
    Please mark this answer if this answered your question
    Friday, October 30, 2009 12:04 PM
  • I would do it using Database Lookup functoid for less dependency. You can have one table to store information like Partner code, different part types and multiplying factor, so in the map based on Partner code and part type get the multiplying factor and use it as you want.

    The fourth parameter for database functoid will be like PartnerCode+PartType (PartnerCode and PartType are column names). Refer nice link by Eric on this topic http://blog.biztalk-info.com/archive/2009/05/07/Hacking_the_Database_Lookup_functiod_continued.aspx

    So in this way you will have luxry of changing/adding partners or part type.

    Ajeet Kumar
    Monday, November 2, 2009 9:05 AM