<?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: How to get a structure back from a dll function using ABAP???? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-a-structure-back-from-a-dll-function-using-abap/m-p/8808910#M1680924</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Costas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you mean Call Back from Non-ABAP - RFC Server Program - to ABAP, please have a look on this Help Link -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_erp2004/helpdata/en/22/042899488911d189490000e829fbbd/frameset.htm"&gt;http://help.sap.com/saphelp_erp2004/helpdata/en/22/042899488911d189490000e829fbbd/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This may clear your doubts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, there are few Blogs - by &lt;STRONG&gt;Thomas Jung&lt;/STRONG&gt; - available, that again give you better understandings, are as below -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;A _jive_internal="true" href="https://answers.sap.com/thread/75724"&gt;http://scn.sap.com/thread/75724&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;Kumar Saurav.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 Jun 2012 17:58:50 GMT</pubDate>
    <dc:creator>former_member186491</dc:creator>
    <dc:date>2012-06-05T17:58:50Z</dc:date>
    <item>
      <title>How to get a structure back from a dll function using ABAP????</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-a-structure-back-from-a-dll-function-using-abap/m-p/8808907#M1680921</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a requirement to call a dll function that takes 2 parameters:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a) port enumerator&lt;/P&gt;&lt;P&gt;b) time delay in seconds&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and returns back a structure consisting of 3 different text fields (all add up to 36 characters long).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have manged to call the dll function using the&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;CALL &lt;SPAN class="L0S52"&gt;METHOD &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;OF &lt;/SPAN&gt;Win32 &lt;SPAN class="L0S33"&gt;'Register'&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp; &lt;SPAN class="L0S52"&gt;EXPORTING&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; #1 &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;&lt;SPAN class="L0S33"&gt;'epos_xenta.dll'&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; #2 &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;&lt;SPAN class="L0S33"&gt;'_EDPOS_InitComm'&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; #3 &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;&lt;SPAN class="L0S33"&gt;'i=hh'&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; #4 &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;&lt;SPAN class="L0S33"&gt;'r=l'&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S31"&gt;CALL METHOD OF Win32 '_EDPOS_InitComm' = ret&lt;BR /&gt;&lt;SPAN class="L0S31"&gt;&amp;nbsp; EXPORTING&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="L0S31"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; #1 = 3&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="L0S31"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; #2 = 4.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;The problem is I don't know how to get back the return structure (how must i declare it, and how to pass it to the function etc).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;The specs for the function are as follows:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;int err = EDPOS_InitComm(port, timeout_sec, [cfgPOS])&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This function should be the &lt;SPAN style="font-size: 12pt; font-family: Tahoma;"&gt;first &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Tahoma;"&gt;one called by the ECR, and should be called only &lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt; font-family: Tahoma;"&gt;once &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Tahoma;"&gt;per system boot. It&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;informs the EDPOS system about: a) in which serial port is the EFT/POS connected, and b) what time-out (in&lt;/P&gt;&lt;P&gt;seconds) to set for each transaction. The static transaction parameters are saved in the &lt;SPAN style="font-size: 10pt; font-family: LuxiMono;"&gt;cfgPOS &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Tahoma;"&gt;structure,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;which is an &lt;SPAN style="font-size: 12pt; font-family: Tahoma;"&gt;output &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Tahoma;"&gt;parameter. Note that, since no dynamic allocation occurs in the implementation, the output&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;parameter should be pre-allocated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The function operates &lt;SPAN style="font-size: 12pt; font-family: Tahoma;"&gt;synchronously &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Tahoma;"&gt;and when it returns with &lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt; font-family: Tahoma;"&gt;zero&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Tahoma;"&gt;, it informs that the serial communication&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;with the EFT/POS was successful, and that the configuration is saved in &lt;SPAN style="font-size: 10pt; font-family: LuxiMono;"&gt;cfgPOS&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Tahoma;"&gt;. Otherwise, the return value is&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;non-zero, and this usually indicates a problem in the serial-port setup/connection.&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;STRONG&gt;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;STRONG&gt;Thanks for any help,&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;STRONG&gt;Costas&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 May 2012 10:59:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-a-structure-back-from-a-dll-function-using-abap/m-p/8808907#M1680921</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-05-30T10:59:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a structure back from a dll function using ABAP????</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-a-structure-back-from-a-dll-function-using-abap/m-p/8808908#M1680922</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Costas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;May be this link would be of some help -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;A href="http://wiki.sdn.sap.com/wiki/display/Snippets/How+to+call+functions+from+a+client+DLL+in+an+ABAP+program"&gt;http://wiki.sdn.sap.com/wiki/display/Snippets/How+to+call+functions+from+a+client+DLL+in+an+ABAP+program&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;Kumar Saurav.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 May 2012 11:58:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-a-structure-back-from-a-dll-function-using-abap/m-p/8808908#M1680922</guid>
      <dc:creator>former_member186491</dc:creator>
      <dc:date>2012-05-30T11:58:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a structure back from a dll function using ABAP????</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-a-structure-back-from-a-dll-function-using-abap/m-p/8808909#M1680923</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kumar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for your reply. I have already seen this, but unfortunatelly it does not answer my main question: How can I get the return structure back using this method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Costas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 May 2012 13:02:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-a-structure-back-from-a-dll-function-using-abap/m-p/8808909#M1680923</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-05-30T13:02:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a structure back from a dll function using ABAP????</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-a-structure-back-from-a-dll-function-using-abap/m-p/8808910#M1680924</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Costas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you mean Call Back from Non-ABAP - RFC Server Program - to ABAP, please have a look on this Help Link -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_erp2004/helpdata/en/22/042899488911d189490000e829fbbd/frameset.htm"&gt;http://help.sap.com/saphelp_erp2004/helpdata/en/22/042899488911d189490000e829fbbd/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This may clear your doubts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, there are few Blogs - by &lt;STRONG&gt;Thomas Jung&lt;/STRONG&gt; - available, that again give you better understandings, are as below -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;A _jive_internal="true" href="https://answers.sap.com/thread/75724"&gt;http://scn.sap.com/thread/75724&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;Kumar Saurav.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jun 2012 17:58:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-a-structure-back-from-a-dll-function-using-abap/m-p/8808910#M1680924</guid>
      <dc:creator>former_member186491</dc:creator>
      <dc:date>2012-06-05T17:58:50Z</dc:date>
    </item>
  </channel>
</rss>

