Skip to Content
Author's profile photo Uladzislau Pralat

Simplify Transformations with End Routine

There are scenarios when Transformation End Routine is a good fit. In my blog will demonstrate how to simplify Transfer Rules by means of:

Reducing Coding

In my case I load PO GR data and lookup multiple characteristic values from PO Item level. Instead of repetitive coding similar lookup / mapping for each characteristic in individual Transfer Rule I did once in End Routine. It saved me not only coding efforts, but also increased performance by reducing a number of lookups.

End Routine 1.jpg

End Routine 2.jpg

Increasing Reusability

During PO GR data load I calculate Delivery Duration based on Due Date, Delivery Duration based on GR data and over / under variances of two durations. I did not like the idea to repeat durations calculation logic in variance transformation rules. Instead I used results of duration calculations in end routine to calculate variances.

End Routine 3.jpg

End Routine 4.jpg

Assigned tags

      5 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Venkatesh Veera
      Venkatesh Veera

      Hi Uladzislau Pralat,

       

      So are you creating a dynamic internal table ( for the structure) to get the data for the mentioned characteristic  fields??

       

      we can also create a structure for those fields and write a select statement for fetch them and then we can move to the result package.. right?? Correct me if i'm wrong.

      very good explanation.

      Try to show the declaration part so that everyone can understand how the dynamic internal table got declared.

       

      Venkatesh Veera

      Author's profile photo Uladzislau Pralat
      Uladzislau Pralat
      Blog Post Author

      Hi Venkatesh,

       

      in Reducing Coding example I map multiple characteristics with data from PO item DSO with single MOVE-CORRESPONDING instead of doing multiple lookup in individual characteristic transformation rules.

      Hope it will answer you question.

      Regards, Uladzislau

       

       

      Author's profile photo Venkatesh Veera
      Venkatesh Veera

      Thanks  Uladzislau Pralat

      Author's profile photo Kuldeep Jain
      Kuldeep Jain

      Hi Uladzislau Pralat

       

      Can you please show the whole code you wrote with why and what particular code is doing.

      Quite interesting and going to help many for performance improvement and less maintenance.

       

      Thanks,

      KD Jain

      Author's profile photo Uladzislau Pralat
      Uladzislau Pralat
      Blog Post Author

      Hi Kuldeep,

      this is all code that I have that is in the blog.

      Regards, Uladzislau