<?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 In interface - method parameter with general type (ABAP OO) in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/in-interface-method-parameter-with-general-type-abap-oo/m-p/12335240#M1991812</link>
    <description>&lt;P&gt;Hello experts,&lt;/P&gt;
  &lt;P&gt;I am not familiar with ABAP object oriented so please advise.&lt;/P&gt;
  &lt;P&gt;I want to write an interface to validate a user input. The interface has to include a method (is_values_exist) with an importing parameter. The parameter is a table. Every class, which implements this interface, has to deal with a different type of the parameter table. For example, one has to send BUKRS, another has to send BELNR etc… The problem is that in the interface I cannot leave the type of the parameter empty. (As I can in a Function Module). A workaround could be - In the interface create a parameter for every class (one parameter will have the type of BUKRS, the other BELNR, etc…) . All the parameters have to be optional. Disadvantages of this solution are:&lt;/P&gt;
  &lt;P&gt;1. The interface has to be changed (a new parameter has to be added) for every new class, which implements it.&lt;/P&gt;
  &lt;P&gt;2. The parameter should not be optional (but mandatory).&lt;/P&gt;
  &lt;P&gt;Thanks in advance&lt;/P&gt;
  &lt;P&gt;Hagit&lt;/P&gt;</description>
    <pubDate>Tue, 29 Dec 2020 08:02:13 GMT</pubDate>
    <dc:creator>hagit</dc:creator>
    <dc:date>2020-12-29T08:02:13Z</dc:date>
    <item>
      <title>In interface - method parameter with general type (ABAP OO)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/in-interface-method-parameter-with-general-type-abap-oo/m-p/12335240#M1991812</link>
      <description>&lt;P&gt;Hello experts,&lt;/P&gt;
  &lt;P&gt;I am not familiar with ABAP object oriented so please advise.&lt;/P&gt;
  &lt;P&gt;I want to write an interface to validate a user input. The interface has to include a method (is_values_exist) with an importing parameter. The parameter is a table. Every class, which implements this interface, has to deal with a different type of the parameter table. For example, one has to send BUKRS, another has to send BELNR etc… The problem is that in the interface I cannot leave the type of the parameter empty. (As I can in a Function Module). A workaround could be - In the interface create a parameter for every class (one parameter will have the type of BUKRS, the other BELNR, etc…) . All the parameters have to be optional. Disadvantages of this solution are:&lt;/P&gt;
  &lt;P&gt;1. The interface has to be changed (a new parameter has to be added) for every new class, which implements it.&lt;/P&gt;
  &lt;P&gt;2. The parameter should not be optional (but mandatory).&lt;/P&gt;
  &lt;P&gt;Thanks in advance&lt;/P&gt;
  &lt;P&gt;Hagit&lt;/P&gt;</description>
      <pubDate>Tue, 29 Dec 2020 08:02:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/in-interface-method-parameter-with-general-type-abap-oo/m-p/12335240#M1991812</guid>
      <dc:creator>hagit</dc:creator>
      <dc:date>2020-12-29T08:02:13Z</dc:date>
    </item>
    <item>
      <title>Re: In interface - method parameter with general type (ABAP OO)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/in-interface-method-parameter-with-general-type-abap-oo/m-p/12335241#M1991813</link>
      <description>&lt;P&gt;There are some options. Please refer to the documentation of 'generic datatypes':&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/index.htm?file=abenbuilt_in_types_generic.htm" target="test_blank"&gt;https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/index.htm?file=abenbuilt_in_types_generic.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Dec 2020 09:03:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/in-interface-method-parameter-with-general-type-abap-oo/m-p/12335241#M1991813</guid>
      <dc:creator>joltdx</dc:creator>
      <dc:date>2020-12-29T09:03:29Z</dc:date>
    </item>
    <item>
      <title>Re: In interface - method parameter with general type (ABAP OO)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/in-interface-method-parameter-with-general-type-abap-oo/m-p/12335242#M1991814</link>
      <description>&lt;P&gt;It's not related to Object-Oriented, but you have generic types like "TYPE STANDARD TABLE" (without OF ...)&lt;/P&gt;</description>
      <pubDate>Tue, 29 Dec 2020 12:39:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/in-interface-method-parameter-with-general-type-abap-oo/m-p/12335242#M1991814</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2020-12-29T12:39:03Z</dc:date>
    </item>
    <item>
      <title>Re: In interface - method parameter with general type (ABAP OO)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/in-interface-method-parameter-with-general-type-abap-oo/m-p/12335243#M1991815</link>
      <description>&lt;P&gt;Some suggestions:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;You can pass any variable with TYPE REF TO DATA if it comes to that.&lt;/LI&gt;&lt;LI&gt;You can use the PropertyBag design pattern and pass an object containing all the values you want to pass - similar to a workflow container&lt;/LI&gt;&lt;LI&gt;You can pass an ITAB similar to the AUSP table, having distinct columns for distinct data types&lt;/LI&gt;&lt;LI&gt;I don't suggest it, but technically you can pass a JSON string containing all the values and parse it in the class&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Wed, 30 Dec 2020 05:37:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/in-interface-method-parameter-with-general-type-abap-oo/m-p/12335243#M1991815</guid>
      <dc:creator>keremkoseoglu</dc:creator>
      <dc:date>2020-12-30T05:37:39Z</dc:date>
    </item>
    <item>
      <title>Re: In interface - method parameter with general type (ABAP OO)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/in-interface-method-parameter-with-general-type-abap-oo/m-p/12335244#M1991816</link>
      <description>&lt;P&gt;Thank you for  your answer&lt;/P&gt;&lt;P&gt;Hagit&lt;/P&gt;</description>
      <pubDate>Sun, 03 Jan 2021 06:39:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/in-interface-method-parameter-with-general-type-abap-oo/m-p/12335244#M1991816</guid>
      <dc:creator>hagit</dc:creator>
      <dc:date>2021-01-03T06:39:15Z</dc:date>
    </item>
    <item>
      <title>Re: In interface - method parameter with general type (ABAP OO)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/in-interface-method-parameter-with-general-type-abap-oo/m-p/12335245#M1991817</link>
      <description>&lt;P&gt;Thank you for  your answer&lt;/P&gt;&lt;P&gt;Hagit&lt;/P&gt;</description>
      <pubDate>Sun, 03 Jan 2021 06:39:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/in-interface-method-parameter-with-general-type-abap-oo/m-p/12335245#M1991817</guid>
      <dc:creator>hagit</dc:creator>
      <dc:date>2021-01-03T06:39:25Z</dc:date>
    </item>
  </channel>
</rss>

