<?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 SAPscript external subroutine - select not pulling data in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript-external-subroutine-select-not-pulling-data/m-p/8118122#M1618185</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;I am calling an external subroutine in my SAPscript. In this subroutine, I am using a simple select statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
* get sales order number
  SELECT vbelv posnv
    FROM vbfa
    INTO CORRESPONDING FIELDS OF TABLE it_so
     WHERE vbeln = gv_deldoc
       AND posnn = gv_posnr.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is no data is being pulled into it_so. I have confirmed in VBFA (through SE16N) that data exists in the system so this isn't the problem. Are there restrictions with using selects in SAPscript?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: pistols123 on Sep 8, 2011 9:11 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 08 Sep 2011 19:10:45 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-09-08T19:10:45Z</dc:date>
    <item>
      <title>SAPscript external subroutine - select not pulling data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript-external-subroutine-select-not-pulling-data/m-p/8118122#M1618185</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;I am calling an external subroutine in my SAPscript. In this subroutine, I am using a simple select statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
* get sales order number
  SELECT vbelv posnv
    FROM vbfa
    INTO CORRESPONDING FIELDS OF TABLE it_so
     WHERE vbeln = gv_deldoc
       AND posnn = gv_posnr.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is no data is being pulled into it_so. I have confirmed in VBFA (through SE16N) that data exists in the system so this isn't the problem. Are there restrictions with using selects in SAPscript?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: pistols123 on Sep 8, 2011 9:11 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Sep 2011 19:10:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript-external-subroutine-select-not-pulling-data/m-p/8118122#M1618185</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-09-08T19:10:45Z</dc:date>
    </item>
    <item>
      <title>Re: SAPscript external subroutine - select not pulling data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript-external-subroutine-select-not-pulling-data/m-p/8118123#M1618186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you made sure that gv_deldoc has the leading zeros? Pass it through the conversion exit &lt;STRONG&gt;CONVERSION_EXIT_ALPHA_INPUT&lt;/STRONG&gt; before doing the SELECT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Rob Burbank on Sep 8, 2011 3:17 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Sep 2011 19:16:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript-external-subroutine-select-not-pulling-data/m-p/8118123#M1618186</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-09-08T19:16:13Z</dc:date>
    </item>
    <item>
      <title>Re: SAPscript external subroutine - select not pulling data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript-external-subroutine-select-not-pulling-data/m-p/8118124#M1618187</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;Please refer below code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In SAP Script ,SE71: call the subroutine pool program with the below sysntax.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/: PERFORM GET_DATA IN PROGRAM ZXXXX&lt;/P&gt;&lt;P&gt;/: USING &amp;amp;XXXX-MATNR&amp;amp;&lt;/P&gt;&lt;P&gt;/: CHANGING &amp;amp;V_YYYY&amp;amp;&lt;/P&gt;&lt;P&gt;/: CHANGING &amp;amp;V_YYY2&amp;amp;&lt;/P&gt;&lt;P&gt;/: ENDPERFORM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using Parameter will be the input in the subroutine pool to fetch the data.&lt;/P&gt;&lt;P&gt;Changing Paramter will be the your output to pass the data into SAP Form.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now goto SE38,and create a subroutine pool program with the name ZXXXX,follow the below code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM get_data TABLES tbl_in  STRUCTURE itcsy&lt;/P&gt;&lt;P&gt;                       tbl_out STRUCTURE itcsy.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE tbl_in INDEX 1.&lt;/P&gt;&lt;P&gt;  IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;    XXXX-Matnr = tbl_in-value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"Pass it through the conversion exit CONVERSION_EXIT_ALPHA_INPUT before SELECT."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    input         = gv_deldoc&lt;/P&gt;&lt;P&gt; IMPORTING&lt;/P&gt;&lt;P&gt;   OUTPUT        = gv_deldoc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT vbelv posnv&lt;/P&gt;&lt;P&gt;    FROM vbfa&lt;/P&gt;&lt;P&gt;    INTO (l_vbelv,l_posnv)&lt;/P&gt;&lt;P&gt;     WHERE vbeln = gv_deldoc&lt;/P&gt;&lt;P&gt;       AND posnn = gv_posnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE tbl_out INDEX 1.&lt;/P&gt;&lt;P&gt;  IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    MOVE l_vbelv TO tbl_out-value.&lt;/P&gt;&lt;P&gt;    MODIFY tbl_out INDEX 1.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  READ TABLE tbl_out INDEX 2.&lt;/P&gt;&lt;P&gt;  IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    MOVE l_posnv TO tbl_out-value.&lt;/P&gt;&lt;P&gt;    MODIFY tbl_out INDEX 2.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN __default_attr="green" __jive_macro_name="color"&gt;Moderator message - Welcome to SCN. But please do not ask for "rewards"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;VSNM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Endform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Rob Burbank on Sep 8, 2011 4:18 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Sep 2011 20:08:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript-external-subroutine-select-not-pulling-data/m-p/8118124#M1618187</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-09-08T20:08:14Z</dc:date>
    </item>
  </channel>
</rss>

