<?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 select-options as a external subroutine in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-as-a-external-subroutine/m-p/3385540#M812909</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;plz solve my problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;this is my first program.&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;tables vbak.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;select-options x for vbak-vbeln.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;types : beginf of ty,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;a tupe vbak-vbeln,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;b type vbak-ernam,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;end of ty.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;data : itab type table of ty,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;         &lt;STRONG&gt;wa type ty.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;perform sub(znava) using x.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="--------------------------------------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;this is my secomd program&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;report znava.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;form sub using x.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;select vbeln ernam from vbak into table itab where vbeln in x.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;loop at itab into wa.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;write &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; wa-a,wa-b.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;endloop.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;endform.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in the above two programs are separate,and i am using external subroutine but it will show some error how can i rectify.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;anyone plz guide me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks and regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;navneeth.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Navaneetha KRISHNAN on Feb 19, 2008 5:50 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 19 Feb 2008 16:28:30 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-02-19T16:28:30Z</dc:date>
    <item>
      <title>select-options as a external subroutine</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-as-a-external-subroutine/m-p/3385540#M812909</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;plz solve my problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;this is my first program.&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;tables vbak.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;select-options x for vbak-vbeln.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;types : beginf of ty,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;a tupe vbak-vbeln,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;b type vbak-ernam,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;end of ty.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;data : itab type table of ty,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;         &lt;STRONG&gt;wa type ty.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;perform sub(znava) using x.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="--------------------------------------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;this is my secomd program&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;report znava.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;form sub using x.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;select vbeln ernam from vbak into table itab where vbeln in x.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;loop at itab into wa.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;write &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; wa-a,wa-b.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;endloop.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;endform.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in the above two programs are separate,and i am using external subroutine but it will show some error how can i rectify.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;anyone plz guide me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks and regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;navneeth.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Navaneetha KRISHNAN on Feb 19, 2008 5:50 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Feb 2008 16:28:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-as-a-external-subroutine/m-p/3385540#M812909</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-19T16:28:30Z</dc:date>
    </item>
    <item>
      <title>Re: select-options as a external subroutine</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-as-a-external-subroutine/m-p/3385541#M812910</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;Form sub uses ENDLOOP when it should be using ENDSELECT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If this is not the error you are getting, you should maybe tell us what the error is.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nick&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Feb 2008 16:34:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-as-a-external-subroutine/m-p/3385541#M812910</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-19T16:34:09Z</dc:date>
    </item>
    <item>
      <title>Re: select-options as a external subroutine</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-as-a-external-subroutine/m-p/3385542#M812911</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;if this is the code of the subroutine, you copied into your post, than the LOOP is missing:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form sub using x.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select vbeln ernam from vbak into table itab where vbeln in x.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;loop at itab into wa.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;write &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; wa-a,wa-b.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;P&gt;ec&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Feb 2008 16:42:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-as-a-external-subroutine/m-p/3385542#M812911</guid>
      <dc:creator>JozsefSzikszai</dc:creator>
      <dc:date>2008-02-19T16:42:01Z</dc:date>
    </item>
    <item>
      <title>Re: select-options as a external subroutine</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-as-a-external-subroutine/m-p/3385543#M812912</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i couldn't get u can u tell me the correct syntax for the whole program.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Feb 2008 16:44:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-as-a-external-subroutine/m-p/3385543#M812912</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-19T16:44:28Z</dc:date>
    </item>
    <item>
      <title>Re: select-options as a external subroutine</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-as-a-external-subroutine/m-p/3385544#M812913</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i couldn't get u can u tell me the correct program&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Feb 2008 16:46:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-as-a-external-subroutine/m-p/3385544#M812913</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-19T16:46:07Z</dc:date>
    </item>
    <item>
      <title>Re: select-options as a external subroutine</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-as-a-external-subroutine/m-p/3385545#M812914</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the correct program is in my first comment, just add the bold line to your original subroutine.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Feb 2008 16:50:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-as-a-external-subroutine/m-p/3385545#M812914</guid>
      <dc:creator>JozsefSzikszai</dc:creator>
      <dc:date>2008-02-19T16:50:50Z</dc:date>
    </item>
    <item>
      <title>Re: select-options as a external subroutine</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-as-a-external-subroutine/m-p/3385546#M812915</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sorry it won't correct .that is my typical error .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can u suggest me the correct answer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Feb 2008 16:53:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-as-a-external-subroutine/m-p/3385546#M812915</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-19T16:53:12Z</dc:date>
    </item>
    <item>
      <title>Re: select-options as a external subroutine</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-as-a-external-subroutine/m-p/3385547#M812916</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;that i missed as a typical error .even if i correct it . it wont give the correct result&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Feb 2008 16:54:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-as-a-external-subroutine/m-p/3385547#M812916</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-19T16:54:44Z</dc:date>
    </item>
    <item>
      <title>Re: select-options as a external subroutine</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-as-a-external-subroutine/m-p/3385548#M812917</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First of all SELECT-OPTIONS are TABLE type.  &lt;/P&gt;&lt;P&gt;You just can't use USING  keyword, you've to use TABLES keyword.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;second point is,, in your second program are you defining ITAB and WA??? otherwise second program is not going to identify ITAB &amp;amp; WA... so I suggest you try like this..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

"program 1.

TABLES vbak.
SELECT-OPTIONS x FOR vbak-vbeln.

PERFORM sub(znava) TABLES x .

"program 2

  TYPES : BEGIN OF ty,
  a TYPE vbak-vbeln,
  b TYPE vbak-ernam,
  END OF ty.

  DATA : itab TYPE TABLE OF ty,
  wa TYPE ty.

FORM sub TABLES x.

  SELECT vbeln ernam FROM vbak INTO TABLE itab WHERE vbeln IN x.
  LOOP AT itab INTO wa.
    WRITE :/ wa-a,wa-b.
  ENDLOOP.
ENDFORM.                    "sub
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Feb 2008 17:04:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-as-a-external-subroutine/m-p/3385548#M812917</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-19T17:04:48Z</dc:date>
    </item>
  </channel>
</rss>

