<?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: Importing table from one method to another method in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/importing-table-from-one-method-to-another-method/m-p/9929391#M1796097</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you have to set the Option "Preferred" for the parameter.&lt;/P&gt;&lt;P&gt;(the prerequisites are that you only have optional importing parameters (or maximum one not optional one) and your result comes as a returning parameter)&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/343018" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/343019" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amadeus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 13 Dec 2013 12:33:17 GMT</pubDate>
    <dc:creator>amadeusgrabmayer</dc:creator>
    <dc:date>2013-12-13T12:33:17Z</dc:date>
    <item>
      <title>Importing table from one method to another method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/importing-table-from-one-method-to-another-method/m-p/9929387#M1796093</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am a BW consultant and an ABAP learner&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Currently I am creating a class in which two methods&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Method 1: Reading a master data and Exporting in a Table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table RD_DETVERS is declared in Parameter as EXPORTING, Typing method is TYPE and Associated with ZDETVERSION (Master infoObject)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the method I have given SELECT statement which reads data from master data and exporting to table RD_DETVERS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Method 2:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to IMPORT the values of table TB_DETVERS (from method 2) into LT_DETVERS (in method 1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below are the codes&lt;/P&gt;&lt;P&gt;********************************************************&lt;/P&gt;&lt;P&gt;LT_DETVERS &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;ZCL_IM_DECISION_CUSTOM&lt;SPAN class="L0S70"&gt;=&amp;gt;&lt;/SPAN&gt;READ_EDETVERS&lt;SPAN class="L0S55"&gt;( &lt;/SPAN&gt;&lt;SPAN class="L0S33"&gt;'RD_DETVERS' &lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;)&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;IF &lt;/SPAN&gt;SY&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;SUBRC &lt;SPAN class="L0S52"&gt;EQ &lt;/SPAN&gt;&lt;SPAN class="L0S32"&gt;0&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;READ &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;TABLE &lt;/SPAN&gt;LT_DETVERS &lt;SPAN class="L0S52"&gt;INTO &lt;/SPAN&gt;LS_DETVERS &lt;SPAN class="L0S52"&gt;WITH &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;TABLE &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;KEY&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ZDETVERS &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;&lt;SPAN class="L0S33"&gt;'10' &lt;/SPAN&gt;ZBWVERS &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;&lt;SPAN class="L0S33"&gt;'I'&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;IF &lt;/SPAN&gt;SY&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;SUBRC &lt;SPAN class="L0S52"&gt;EQ &lt;/SPAN&gt;&lt;SPAN class="L0S32"&gt;0&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; E_STATUS &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;&lt;SPAN class="L0S33"&gt;'X'&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;RETURN&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;ENDIF&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;ENDIF&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;*********************************************************************&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;Table RD_DETVERS is declared in Parameter as IMPORTING, Typing method is TYPE and Associated with ZDETVERSION (Master infoObject)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I am getting below error&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Class ZCL_IM_DECISION_CUSTOM,Method C_DETVERS_FUNC&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;You can only omit the parameter name if the method only has a&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;non-optional parameter or an optional IMPORTING parameter that is&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;identified by "PREFERRED PARAMETER". by "PREFERRED PARAMETER".&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone please correct me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;SPAN style="font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gopi R&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Dec 2013 11:46:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/importing-table-from-one-method-to-another-method/m-p/9929387#M1796093</guid>
      <dc:creator>former_member210674</dc:creator>
      <dc:date>2013-12-13T11:46:03Z</dc:date>
    </item>
    <item>
      <title>Re: Importing table from one method to another method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/importing-table-from-one-method-to-another-method/m-p/9929388#M1796094</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;what error says. Your method call &lt;EM style="font-size: 12px; color: #333333;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;C_DETVERS_FUNC&lt;/STRONG&gt;&lt;/EM&gt; is wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess it is first method? Which parameters you have in that method? Only one? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try call it like:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;...C_DETVERS_FUNC( nameOfParameter = RD_DETVERS ).&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Dec 2013 12:02:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/importing-table-from-one-method-to-another-method/m-p/9929388#M1796094</guid>
      <dc:creator>Tomas_Buryanek</dc:creator>
      <dc:date>2013-12-13T12:02:09Z</dc:date>
    </item>
    <item>
      <title>Re: Importing table from one method to another method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/importing-table-from-one-method-to-another-method/m-p/9929389#M1796095</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Class ZCL_IM_DECISION_CUSTOM,Method C_DETVERS_FUNC has more then one parameter. You've only supplied one. Look at the signature (parameters) of c_detvers_func.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Dec 2013 12:20:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/importing-table-from-one-method-to-another-method/m-p/9929389#M1796095</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2013-12-13T12:20:25Z</dc:date>
    </item>
    <item>
      <title>Re: Importing table from one method to another method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/importing-table-from-one-method-to-another-method/m-p/9929390#M1796096</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Gopi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to make work of above method call. you need to make the parameter of method READ_EDETVERS as MANDATORY or PREFFERED.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when you open the class in se 24, place the cursor on method name and press on parameters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check there you willl get the corresponding settings.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Other way around is in method calling should be as follow&lt;/P&gt;&lt;P&gt;Call Method ZCL_IM_DECISION_CUSTOM&lt;SPAN class="L0S70"&gt;=&amp;gt;&lt;/SPAN&gt;READ_EDETVERS&lt;SPAN class="L0S55"&gt; importing RD_DETVERS = LT&lt;/SPAN&gt;&lt;SPAN class="L0S33"&gt;_DETVERS &lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;Bhaskar&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Dec 2013 12:32:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/importing-table-from-one-method-to-another-method/m-p/9929390#M1796096</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-12-13T12:32:03Z</dc:date>
    </item>
    <item>
      <title>Re: Importing table from one method to another method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/importing-table-from-one-method-to-another-method/m-p/9929391#M1796097</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you have to set the Option "Preferred" for the parameter.&lt;/P&gt;&lt;P&gt;(the prerequisites are that you only have optional importing parameters (or maximum one not optional one) and your result comes as a returning parameter)&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/343018" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/343019" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amadeus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Dec 2013 12:33:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/importing-table-from-one-method-to-another-method/m-p/9929391#M1796097</guid>
      <dc:creator>amadeusgrabmayer</dc:creator>
      <dc:date>2013-12-13T12:33:17Z</dc:date>
    </item>
  </channel>
</rss>

