<?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: Calling BAPI_COMPANYCODE_GETDETAIL from VBA (Excel) in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-bapi-companycode-getdetail-from-vba-excel/m-p/4311307#M1027777</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is such limitation in SAP adapter for BizTalk:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"By default, table parameters are not surfaced in the response message. If you require table parameters in response message, you must pass empty table parameters in the request message."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you receive anything in the return?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/wg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 31 Jul 2008 12:13:10 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-07-31T12:13:10Z</dc:date>
    <item>
      <title>Calling BAPI_COMPANYCODE_GETDETAIL from VBA (Excel)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-bapi-companycode-getdetail-from-vba-excel/m-p/4311304#M1027774</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I've successfully called a number of BAPIs in VBA, however am getting a problem with BAPI_COMPANYCODE_GETDETAIL&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It doesn't seem to pick up the structure of the tables - the 'Tables' objects just get set to 'nothing' rather than pulling back the structure, like it should. The call itself doesn't fail but obviously no data is returned.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Much appreciate any ideas!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set oSAPFunctions = CreateObject("SAP.Functions")&lt;/P&gt;&lt;P&gt; Set oSAPBapiFn = oSAPFunctions.Add("BAPI_COMPANYCODE_GETDETAIL")&lt;/P&gt;&lt;P&gt;    Set oSAPECC = oSAPBapiFn.Exports("COMPANYCODEID")&lt;/P&gt;&lt;P&gt;    Set oSAPICCD = oSAPBapiFn.Tables("COMPANYCODE_DETAIL")&lt;/P&gt;&lt;P&gt;    'Set oSAPICCA = oSAPBapiFn.Tables("COMPANYCODE_ADDRESS")&lt;/P&gt;&lt;P&gt;    Set oSAPTRet = oSAPBapiFn.Tables("RETURN")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    oSAPECC.Value = "xxxx"     &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    If oSAPBapiFn.Call = False Then&lt;/P&gt;&lt;P&gt;        iRet = False&lt;/P&gt;&lt;P&gt;    Else&lt;/P&gt;&lt;P&gt;'worked&lt;/P&gt;&lt;P&gt;   EndIf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jul 2008 19:27:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-bapi-companycode-getdetail-from-vba-excel/m-p/4311304#M1027774</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-30T19:27:27Z</dc:date>
    </item>
    <item>
      <title>Re: Calling BAPI_COMPANYCODE_GETDETAIL from VBA (Excel)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-bapi-companycode-getdetail-from-vba-excel/m-p/4311305#M1027775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Could you in your call pass empty values for tables. IMHO such behaviour is mandatory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/wg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jul 2008 20:15:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-bapi-companycode-getdetail-from-vba-excel/m-p/4311305#M1027775</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-30T20:15:10Z</dc:date>
    </item>
    <item>
      <title>Re: Calling BAPI_COMPANYCODE_GETDETAIL from VBA (Excel)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-bapi-companycode-getdetail-from-vba-excel/m-p/4311306#M1027776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi wg,&lt;/P&gt;&lt;P&gt;Thanks for your reply, however I'm not entirely sure what you mean: the TABLES parameters are returned FROM the function module?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However I attempted what I thought you meant and changed the code as below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set oSAPFunctions = CreateObject("SAP.Functions")&lt;/P&gt;&lt;P&gt;Set oSAPBapiFn = oSAPFunctions.Add("BAPI_COMPANYCODE_GETDETAIL")&lt;/P&gt;&lt;P&gt;Set oSAPECC = oSAPBapiFn.Exports("COMPANYCODEID")&lt;/P&gt;&lt;P&gt;Set oSAPICCD = oSAPBapiFn.Tables("COMPANYCODE_DETAIL")&lt;/P&gt;&lt;P&gt;'Set oSAPICCA = oSAPBapiFn.Tables("COMPANYCODE_ADDRESS")&lt;/P&gt;&lt;P&gt;Set oSAPTRet = oSAPBapiFn.Tables("RETURN")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;oSAPICCD("COMP_CODE").Value = "" &amp;lt;---- new line&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;oSAPECC.Value = "xxxx" &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If oSAPBapiFn.Call = False Then&lt;/P&gt;&lt;P&gt;iRet = False&lt;/P&gt;&lt;P&gt;Else&lt;/P&gt;&lt;P&gt;'worked&lt;/P&gt;&lt;P&gt;EndIf&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However I got the error that oSAPICCD hadn't been set yet, probably because it doesn't seem to be pulling down the structure of COMPANYCODE_DETAIL from SAP (i.e. being set to 'Nothing').&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Jul 2008 07:13:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-bapi-companycode-getdetail-from-vba-excel/m-p/4311306#M1027776</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-31T07:13:24Z</dc:date>
    </item>
    <item>
      <title>Re: Calling BAPI_COMPANYCODE_GETDETAIL from VBA (Excel)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-bapi-companycode-getdetail-from-vba-excel/m-p/4311307#M1027777</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is such limitation in SAP adapter for BizTalk:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"By default, table parameters are not surfaced in the response message. If you require table parameters in response message, you must pass empty table parameters in the request message."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you receive anything in the return?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/wg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Jul 2008 12:13:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-bapi-companycode-getdetail-from-vba-excel/m-p/4311307#M1027777</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-31T12:13:10Z</dc:date>
    </item>
    <item>
      <title>Re: Calling BAPI_COMPANYCODE_GETDETAIL from VBA (Excel)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-bapi-companycode-getdetail-from-vba-excel/m-p/4311308#M1027778</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi wg,&lt;/P&gt;&lt;P&gt;No, nothing is filled into RETURN but this is because the RETURN structure is not copied down to the object variable either. So it is 'Nothing' like the others.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Jul 2008 12:19:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-bapi-companycode-getdetail-from-vba-excel/m-p/4311308#M1027778</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-31T12:19:59Z</dc:date>
    </item>
  </channel>
</rss>

