<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to Create Composite Functions related to Functional Programming in ABAP? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-composite-functions-related-to-functional-programming-in-abap/m-p/12428960#M1997799</link>
    <description>&lt;P&gt;Hi Frederic,&lt;/P&gt;&lt;P&gt;thank you very much for your reply. Your are right, your advice of the Chain of Responsibility Pattern looks very interesting! That might work if my functions have very similar import und export arguments. Does this pattern works with different parameter, too? In ABAP parameter overloading ist not possible as far as I know... But maybe working with the &lt;A href="https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abenbuilt_in_types_generic.htm"&gt;type any&lt;/A&gt; might solve this problem...&lt;/P&gt;&lt;P&gt;I just learnt a little about Functional Programming from my (math loving) coworker and I have found some articles about Functional Programming here about ABAP &lt;/P&gt;&lt;P&gt;&lt;A href="https://blogs.sap.com/2015/04/09/funtional-programming-in-abap/" target="test_blank"&gt;https://blogs.sap.com/2015/04/09/funtional-programming-in-abap/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://blogs.sap.com/2017/02/26/functional-programming-simulate-curry-in-abap/" target="test_blank"&gt;https://blogs.sap.com/2017/02/26/functional-programming-simulate-curry-in-abap/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://blogs.sap.com/2017/02/27/functional-programming-try-reduce-in-javascript-and-in-abap/" target="test_blank"&gt;https://blogs.sap.com/2017/02/27/functional-programming-try-reduce-in-javascript-and-in-abap/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I thought after reading those blog posts, i had the hope that maybe some developer has already created a functional utility package... but maybe it is more nerdy topic than a pragmatic way of daily coding&lt;/P&gt;&lt;P&gt;All the best from Germany,&lt;/P&gt;&lt;P&gt;Florian&lt;/P&gt;</description>
    <pubDate>Wed, 07 Jul 2021 14:48:18 GMT</pubDate>
    <dc:creator>fweil</dc:creator>
    <dc:date>2021-07-07T14:48:18Z</dc:date>
    <item>
      <title>How to Create Composite Functions related to Functional Programming in ABAP?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-composite-functions-related-to-functional-programming-in-abap/m-p/12428958#M1997797</link>
      <description>&lt;P&gt;Hello SAP Devs,&lt;/P&gt;
  &lt;P&gt;Lately, I had serveral use cases, where I had to compose the same functions/methods in different order. In Functional Programming this kind of programming use case is solved with a higher order compose function (sometimes also called pipe or flow).&lt;/P&gt;
  &lt;P&gt;The JavaScript ecosystems has the lodash library and its functional programming package. See an example&lt;/P&gt;
  &lt;P&gt;&lt;A href="https://hackernoon.com/function-composition-with-lodash-d30eb50153d1" target="test_blank"&gt;https://hackernoon.com/function-composition-with-lodash-d30eb50153d1&lt;/A&gt; &lt;/P&gt;
  &lt;P&gt;Does within the ABAP ecosystem exist a functional programming library like lodash?&lt;/P&gt;
  &lt;P&gt;Thank you very much in advance, all the best&lt;/P&gt;
  &lt;P&gt;Florian&lt;/P&gt;
  &lt;P&gt;P.S. Method Chaining could be an approach to improve the API ergonomics, but that is not exactly I am looking for&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jul 2021 13:40:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-composite-functions-related-to-functional-programming-in-abap/m-p/12428958#M1997797</guid>
      <dc:creator>fweil</dc:creator>
      <dc:date>2021-07-07T13:40:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to Create Composite Functions related to Functional Programming in ABAP?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-composite-functions-related-to-functional-programming-in-abap/m-p/12428959#M1997798</link>
      <description>&lt;P&gt;I think you cannot find this kind of "tool" in ABAP, the hard part is :&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;const formatData = fp.compose(&lt;BR /&gt;  fp.map(formatPhone),&lt;BR /&gt;  fp.uniqBy('phone'),&lt;BR /&gt;  fp.filter('phone'),&lt;BR /&gt;  fp.sortBy('firstName'),&lt;BR /&gt;);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;a constant containing a list of class/method  ... never seen&lt;/P&gt;&lt;P&gt;but, you have something looks like that with Design Pattern: Chain of Responsibility :&lt;/P&gt;&lt;P&gt;&lt;A href="https://blogs.sap.com/2020/02/26/abap-with-coffee-and-chain-of-responsibilitycor-oo-pattern/" target="test_blank"&gt;https://blogs.sap.com/2020/02/26/abap-with-coffee-and-chain-of-responsibilitycor-oo-pattern/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jul 2021 14:05:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-composite-functions-related-to-functional-programming-in-abap/m-p/12428959#M1997798</guid>
      <dc:creator>FredericGirod</dc:creator>
      <dc:date>2021-07-07T14:05:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to Create Composite Functions related to Functional Programming in ABAP?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-composite-functions-related-to-functional-programming-in-abap/m-p/12428960#M1997799</link>
      <description>&lt;P&gt;Hi Frederic,&lt;/P&gt;&lt;P&gt;thank you very much for your reply. Your are right, your advice of the Chain of Responsibility Pattern looks very interesting! That might work if my functions have very similar import und export arguments. Does this pattern works with different parameter, too? In ABAP parameter overloading ist not possible as far as I know... But maybe working with the &lt;A href="https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abenbuilt_in_types_generic.htm"&gt;type any&lt;/A&gt; might solve this problem...&lt;/P&gt;&lt;P&gt;I just learnt a little about Functional Programming from my (math loving) coworker and I have found some articles about Functional Programming here about ABAP &lt;/P&gt;&lt;P&gt;&lt;A href="https://blogs.sap.com/2015/04/09/funtional-programming-in-abap/" target="test_blank"&gt;https://blogs.sap.com/2015/04/09/funtional-programming-in-abap/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://blogs.sap.com/2017/02/26/functional-programming-simulate-curry-in-abap/" target="test_blank"&gt;https://blogs.sap.com/2017/02/26/functional-programming-simulate-curry-in-abap/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://blogs.sap.com/2017/02/27/functional-programming-try-reduce-in-javascript-and-in-abap/" target="test_blank"&gt;https://blogs.sap.com/2017/02/27/functional-programming-try-reduce-in-javascript-and-in-abap/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I thought after reading those blog posts, i had the hope that maybe some developer has already created a functional utility package... but maybe it is more nerdy topic than a pragmatic way of daily coding&lt;/P&gt;&lt;P&gt;All the best from Germany,&lt;/P&gt;&lt;P&gt;Florian&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jul 2021 14:48:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-composite-functions-related-to-functional-programming-in-abap/m-p/12428960#M1997799</guid>
      <dc:creator>fweil</dc:creator>
      <dc:date>2021-07-07T14:48:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to Create Composite Functions related to Functional Programming in ABAP?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-composite-functions-related-to-functional-programming-in-abap/m-p/12428961#M1997800</link>
      <description>&lt;P&gt;&lt;SPAN class="mention-scrubbed"&gt;naimesh.patel&lt;/SPAN&gt; made very nice blogs about design pattern :&lt;/P&gt;&lt;P&gt;&lt;A href="http://zevolving.com/category/abapobjects/oo-design-patterns/" target="test_blank"&gt;http://zevolving.com/category/abapobjects/oo-design-patterns/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;For the parameters, you have the Design Pattern Adapter (but the code will be very complex), or you could set some parameters optional. It depends a lot of your requierment. &lt;/P&gt;&lt;P&gt;The main problem here is, to make a code someone else could read &amp;amp; understand. &lt;/P&gt;</description>
      <pubDate>Thu, 08 Jul 2021 05:53:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-composite-functions-related-to-functional-programming-in-abap/m-p/12428961#M1997800</guid>
      <dc:creator>FredericGirod</dc:creator>
      <dc:date>2021-07-08T05:53:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to Create Composite Functions related to Functional Programming in ABAP?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-composite-functions-related-to-functional-programming-in-abap/m-p/12428962#M1997801</link>
      <description>&lt;P&gt;Hi Frederic,&lt;/P&gt;&lt;P&gt;thank you very much for the great link! Now I have a perfect reading list for a good morning coffee routine. &lt;/P&gt;&lt;P&gt;You are definitely right. Code readablity is one of the most important points, while writing code. Functional Programming claims to produce readable code due a declarative code style. I have problems to understand more complex Functional Programming. Another coworker made a nice metapher... Use Functional Programming style like you use spice in cooking... Too much destroys the taste of the meal, but without spice the meal has no real taste... I assume the higher order functions map, reduce, filter, compose, pipe could be a nice flavor to the ABAP Language... But it seems with the standard coding tools it might be impossible to express it in an readable manner...&lt;/P&gt;&lt;P&gt;Thanks again for your links and replies. It helped a lot to think about this topic more deeply.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jul 2021 08:34:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-composite-functions-related-to-functional-programming-in-abap/m-p/12428962#M1997801</guid>
      <dc:creator>fweil</dc:creator>
      <dc:date>2021-07-08T08:34:18Z</dc:date>
    </item>
  </channel>
</rss>

