{"id":9299,"date":"2016-10-04T09:23:48","date_gmt":"2016-10-04T09:23:48","guid":{"rendered":"http:\/\/www.greytrix.com\/blogs\/sagex3\/?p=9299"},"modified":"2022-02-25T10:21:17","modified_gmt":"2022-02-25T10:21:17","slug":"how-to-call-function-from-different-files-using-single-call-statement-and-encapsulation","status":"publish","type":"post","link":"https:\/\/www.greytrix.com\/blogs\/sagex3\/2016\/10\/04\/how-to-call-function-from-different-files-using-single-call-statement-and-encapsulation\/","title":{"rendered":"How to Call Function from Different File&#8217;s Using Single Call Statement and Encapsulation"},"content":{"rendered":"<p style=\"text-align: justify;\">While working around the complex functionality, it\u2019s very obvious that you may have to deal with the<\/p>\n<p style=\"text-align: justify;\">Multiple source files. Multiple file may define the function with same name but with different set of instruction on the same event or the action and you may want call same function from particular file based on some condition on run time and also want to encapsulate the file name.<\/p>\n<p style=\"text-align: justify;\">Code which helps you for Calling Function from Different File&#8217;s Using Single Call Statement and Encapsulation.<\/p>\n<p style=\"text-align: justify;\"><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2016\/10\/Call-Function.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-9300\" src=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2016\/10\/Call-Function.png\" alt=\"Call Function\" width=\"226\" height=\"158\" \/><\/a><\/p>\n<p style=\"text-align: justify;\">The above code will invoke the TEST sub program from the SPETST2 file, if you have noticed that the different file name is getting encapsulated in the variable ZFILENAME based on certain condition and single statement is enough to call a function from a particular file.<\/p>\n<p>\u00a0Hope this helps !<\/p>\n<h4 style=\"text-align: center;\"><strong><span style=\"color: #800080;\">About Us<\/span><\/strong><\/h4>\n<p style=\"text-align: justify;\">\n<p style=\"text-align: justify;\">Greytrix is one stop solution provider for Sage ERP and Sage CRM needs. We provide complete end-to-end assistance for your technical consultations, product customizations, data migration, system integrations, third party add-on development and implementation expertise.<\/p>\n<p style=\"text-align: justify;\"><a href=\"http:\/\/www.greytrix.com\/\" target=\"_blank\" rel=\"noopener\">Greytrix<\/a>\u00a0have some unique solutions of\u00a0<a href=\"http:\/\/www.greytrix.com\/product\/sage-crm\/gumu-sage-x3-integration\" target=\"_blank\" rel=\"noopener\">Sage X3\u2019s integration with Sage CRM<\/a>,\u00a0<a href=\"http:\/\/www.greytrix.com\/product\/sage-x3\/gumu-x3-salesforce-integration\" target=\"_blank\" rel=\"noopener\">Salesforce.com<\/a>\u00a0and\u00a0<a href=\"http:\/\/www.greytrix.com\/product\/magento-sage-integrations\/sage-x3-magento\" target=\"_blank\" rel=\"noopener\">Magento eCommerce<\/a>. It also offers best-in-class\u00a0<a href=\"http:\/\/www.greytrix.com\/product\/erp-development\/sage-x3\" target=\"_blank\" rel=\"noopener\">Sage X3 customization and development services<\/a>\u00a0to Sage business partners, end users, and Sage PSG worldwide.<\/p>\n<p style=\"text-align: justify;\">For more information on Sage X3 Integration and Services, please contact us at\u00a0<a href=\"mailto:x3@greytrix.com\" target=\"_blank\" rel=\"noopener\">x3@greytrix.com<\/a>\u00a0.We will be glad to assist you.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>While working around the complex functionality, it\u2019s very obvious that you may have to deal with the Multiple source files. Multiple file may define the function with same name but with different set of instruction on the same event or the action and you may want call same function from particular file based on some\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/2016\/10\/04\/how-to-call-function-from-different-files-using-single-call-statement-and-encapsulation\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[251,252,255,1724,1822,1945],"class_list":["post-9299","post","type-post","status-publish","format-standard","hentry","category-sage-erp-x3","tag-call-function","tag-call-function-from-different-file","tag-call-the-function","tag-sage-3-technical","tag-sage-x3","tag-sage-x3-technical-blogs"],"_links":{"self":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/posts\/9299","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/comments?post=9299"}],"version-history":[{"count":1,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/posts\/9299\/revisions"}],"predecessor-version":[{"id":24703,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/posts\/9299\/revisions\/24703"}],"wp:attachment":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/media?parent=9299"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/categories?post=9299"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/tags?post=9299"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}