<?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: Capturing return status from a call to STARTRFC from a shell script. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-return-status-from-a-call-to-startrfc-from-a-shell-script/m-p/1046895#M88183</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 could create an RFC in SAP and put your BAPI function, an the result into a table parameters:&lt;/P&gt;&lt;P&gt;- use -T parameter to get the table&lt;/P&gt;&lt;P&gt;- use w to set your file &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Example:&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;startrfc -E PEBELP=00010 -t -d AR1 -h S01AZ03A01 -s 10 -g S01AZ03A01 -x sapgw10 -u LOLA -p flores -c 130 -l EN -F Y_RFC_EXAMPLE2 &amp;lt;b&amp;gt;-T RESULTADO,250,w=outputname.txt&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Explanation of parameters:&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;-T &amp;lt;table name&amp;gt;,&amp;lt;width&amp;gt;,[r=&amp;lt;file&amp;gt;][,w=&amp;lt;file&amp;gt;]&lt;/P&gt;&lt;P&gt;Where &amp;lt;file&amp;gt; is a path name to read from (r) or write to (w) the internal table. If &amp;lt;file&amp;gt; is -, stdin or stdout is used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Example of Y_RFC_EXAMPLE2&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;FUNCTION Y_RFC_EXAMPLE2.&lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;STRONG&gt;"&lt;/STRONG&gt;"Local interface:&lt;/P&gt;&lt;P&gt;*"  IMPORTING&lt;/P&gt;&lt;P&gt;*"     VALUE(PEBELP) TYPE  EBELP&lt;/P&gt;&lt;P&gt;*"  TABLES&lt;/P&gt;&lt;P&gt;*"      RESULTADO STRUCTURE  TAB512&lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA fecha(10).&lt;/P&gt;&lt;P&gt;  DATA wa TYPE string.&lt;/P&gt;&lt;P&gt;  WRITE sy-datum TO fecha.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CONCATENATE pebelp fecha  INTO wa SEPARATED BY '/'.&lt;/P&gt;&lt;P&gt;    ds_rec 'sample' wa.&lt;/P&gt;&lt;P&gt;    append wa to resultado.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFUNCTION.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 21 Dec 2005 14:35:23 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-12-21T14:35:23Z</dc:date>
    <item>
      <title>Capturing return status from a call to STARTRFC from a shell script.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-return-status-from-a-call-to-startrfc-from-a-shell-script/m-p/1046894#M88182</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 trying to use startrfc to integrate a Unix (Solaris) batch process with SAP.  I want to determine whether an SAP user exists. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the command as run in the Unix shell: -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;startrfc -t -3 -h ourHost -s 01 -c 550 -l EN -u SAPuser -p secret -F BAPI_USER_EXISTENCE_CHECK -E USERNAME=testSAPuser&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This command always exits with a status of zero, whether or not the user exists.  (With the -t flag) It creates a file, dev_rfc and a second file of the form CPICTRCnnnnn.      However there is no output to stdout, irrespective of whether testSAPuser exists.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can I force this utility program to write its output to stdout instesd of writing it to a file?  How?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alternatively can I force the utility to write its output to a specific (named) file instead of writing to dev_rfc?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your attention&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stephen Broadbridge&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 04 Feb 2024 01:07:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-return-status-from-a-call-to-startrfc-from-a-shell-script/m-p/1046894#M88182</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2024-02-04T01:07:47Z</dc:date>
    </item>
    <item>
      <title>Re: Capturing return status from a call to STARTRFC from a shell script.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-return-status-from-a-call-to-startrfc-from-a-shell-script/m-p/1046895#M88183</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 could create an RFC in SAP and put your BAPI function, an the result into a table parameters:&lt;/P&gt;&lt;P&gt;- use -T parameter to get the table&lt;/P&gt;&lt;P&gt;- use w to set your file &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Example:&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;startrfc -E PEBELP=00010 -t -d AR1 -h S01AZ03A01 -s 10 -g S01AZ03A01 -x sapgw10 -u LOLA -p flores -c 130 -l EN -F Y_RFC_EXAMPLE2 &amp;lt;b&amp;gt;-T RESULTADO,250,w=outputname.txt&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Explanation of parameters:&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;-T &amp;lt;table name&amp;gt;,&amp;lt;width&amp;gt;,[r=&amp;lt;file&amp;gt;][,w=&amp;lt;file&amp;gt;]&lt;/P&gt;&lt;P&gt;Where &amp;lt;file&amp;gt; is a path name to read from (r) or write to (w) the internal table. If &amp;lt;file&amp;gt; is -, stdin or stdout is used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Example of Y_RFC_EXAMPLE2&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;FUNCTION Y_RFC_EXAMPLE2.&lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;STRONG&gt;"&lt;/STRONG&gt;"Local interface:&lt;/P&gt;&lt;P&gt;*"  IMPORTING&lt;/P&gt;&lt;P&gt;*"     VALUE(PEBELP) TYPE  EBELP&lt;/P&gt;&lt;P&gt;*"  TABLES&lt;/P&gt;&lt;P&gt;*"      RESULTADO STRUCTURE  TAB512&lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA fecha(10).&lt;/P&gt;&lt;P&gt;  DATA wa TYPE string.&lt;/P&gt;&lt;P&gt;  WRITE sy-datum TO fecha.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CONCATENATE pebelp fecha  INTO wa SEPARATED BY '/'.&lt;/P&gt;&lt;P&gt;    ds_rec 'sample' wa.&lt;/P&gt;&lt;P&gt;    append wa to resultado.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFUNCTION.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Dec 2005 14:35:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-return-status-from-a-call-to-startrfc-from-a-shell-script/m-p/1046895#M88183</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-12-21T14:35:23Z</dc:date>
    </item>
    <item>
      <title>Re: Capturing return status from a call to STARTRFC from a shell script.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-return-status-from-a-call-to-startrfc-from-a-shell-script/m-p/1046896#M88184</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;BAPI_USER_EXISTENCE_CHECK this is giving message if i enter some wrong user.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;which version you are using..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Dec 2005 14:43:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-return-status-from-a-call-to-startrfc-from-a-shell-script/m-p/1046896#M88184</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-12-21T14:43:45Z</dc:date>
    </item>
    <item>
      <title>Re: Capturing return status from a call to STARTRFC from a shell script.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-return-status-from-a-call-to-startrfc-from-a-shell-script/m-p/1046897#M88185</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Johan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your thoughtful answer.  I am not a BAPI programmer and I would prefer, if possible, to avoid the direction you are suggesting.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is clear from other posts in this and other fora that BAPI_USER_EXISTENCE_CHECK returns information to the calling process.  My project really requires that this returned information is written to STDOUT so that I can capture it in a unix shell script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The source code for startrf is available as part of the SDK.  Another way of dealing with this problem may be to write a small mod to the startrfc.c program.  I am more comfortable in C than in ABAP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway, thanks once more for your suggestions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stephen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Dec 2005 10:16:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-return-status-from-a-call-to-startrfc-from-a-shell-script/m-p/1046897#M88185</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-12-22T10:16:01Z</dc:date>
    </item>
    <item>
      <title>Re: Capturing return status from a call to STARTRFC from a shell script.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-return-status-from-a-call-to-startrfc-from-a-shell-script/m-p/1046898#M88186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vjay&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your response.  I assume you mean "which version" of SAP.  R3 is the answer if I am right.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stephen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Dec 2005 10:25:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-return-status-from-a-call-to-startrfc-from-a-shell-script/m-p/1046898#M88186</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-12-22T10:25:01Z</dc:date>
    </item>
    <item>
      <title>Re: Capturing return status from a call to STARTRFC from a shell script.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-return-status-from-a-call-to-startrfc-from-a-shell-script/m-p/1046899#M88187</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yeah ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Dec 2005 10:32:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-return-status-from-a-call-to-startrfc-from-a-shell-script/m-p/1046899#M88187</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-12-22T10:32:30Z</dc:date>
    </item>
  </channel>
</rss>

