<?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>Question Re: Facing error while passing Variable value in VB script in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/facing-error-while-passing-variable-value-in-vb-script/qaa-p/12175015#M4553005</link>
    <description>&lt;P&gt;&lt;STRONG&gt;lResult1 = Application.Run("SAPGetCellInfo", ActiveCell, "SELECTION", lNameChar)&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;What do you mean by undefined variable &lt;STRONG&gt;INameChar&lt;/STRONG&gt;?&lt;/P&gt;&lt;P&gt;Please read this blog about correct syntax: &lt;/P&gt;&lt;P&gt;&lt;A href="https://blogs.sap.com/2013/11/17/sapgetcellinfo-specifying-a-filter-doesnt-determine-the-order-of-results/" target="test_blank"&gt;https://blogs.sap.com/2013/11/17/sapgetcellinfo-specifying-a-filter-doesnt-determine-the-order-of-results/&lt;/A&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;lResult1 = Application.Run("SAPGetCellInfo", ActiveCell, "SELECTION", "DimName")&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Look on lResult1 in VBA debugger! &lt;/P&gt;&lt;P&gt;And remove useless lines, not related to your code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Call Application.Run("SAPSetRefreshBehaviour", "Off") 
Call Application.Run("SAPExecuteCommand", "PauseVariableSubmit", "On")
...
Call Application.Run("SAPExecuteCommand", "PauseVariableSubmit", "Off")  
Call Application.Run("SAPSetRefreshBehaviour", "On")&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Not related to SAPExecutePlanningSequence&lt;/P&gt;</description>
    <pubDate>Tue, 28 Apr 2020 21:29:42 GMT</pubDate>
    <dc:creator>former_member186338</dc:creator>
    <dc:date>2020-04-28T21:29:42Z</dc:date>
    <item>
      <title>Facing error while passing Variable value in VB script</title>
      <link>https://community.sap.com/t5/technology-q-a/facing-error-while-passing-variable-value-in-vb-script/qaq-p/12175014</link>
      <description>&lt;P&gt;Hi , &lt;/P&gt;
  &lt;P&gt;In My requirement, I need to read Cell value in work book and need to pass to Input variable of Planning sequence.&lt;/P&gt;
  &lt;P&gt;By using &lt;STRONG&gt;SAPGetCellInfo, &lt;/STRONG&gt;its reading cell value in &lt;STRONG&gt;lResult1 (Type &lt;/STRONG&gt;&lt;STRONG&gt;variant ),&lt;/STRONG&gt;&lt;STRONG&gt; &lt;/STRONG&gt; but not able to pass in &lt;STRONG&gt;SAPSetPlanParameter" &lt;/STRONG&gt; Planning sequence variable.&lt;/P&gt;
  &lt;P&gt;Instead of &lt;STRONG&gt;lResult1 &lt;/STRONG&gt; i passed costcentre value directly eg "CC01010101" planning sequence working , but if i use &lt;STRONG&gt;IResult1&lt;/STRONG&gt; its not accepting.&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;Coding&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;Dim lResult1 As Variant&lt;/P&gt;
  &lt;P&gt;Dim lRange As Object&lt;/P&gt;
  &lt;P&gt;Call Application.Run("SAPSetRefreshBehaviour", "Off") &lt;/P&gt;
  &lt;P&gt;Call Application.Run("SAPExecuteCommand", "PauseVariableSubmit", "On")&lt;/P&gt;
  &lt;P&gt; &lt;STRONG&gt;lResult1 = Application.Run("SAPGetCellInfo", ActiveCell, "SELECTION", lNameChar) &lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;lResult = Application.Run("SAPSetPlanParameter", "PS_2", "ZV_ISGM_COSTCENTER_002",&lt;STRONG&gt; lResult1&lt;/STRONG&gt;, "INPUT_STRING") &lt;STRONG&gt;---- IResult variable not passing value&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;MsgBox IIf(Val(lResult) = 1, "Filter is applied", "No Filter") --- &lt;STRONG&gt;its throwing "No Filter" message only&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;Call Application.Run("SAPExecuteCommand", "PauseVariableSubmit", "Off") &lt;/P&gt;
  &lt;P&gt;Call Application.Run("SAPSetRefreshBehaviour", "On")&lt;/P&gt;
  &lt;P&gt; lResult = Application.Run("SAPExecutePlanningSequence", "PS_2")&lt;/P&gt;</description>
      <pubDate>Tue, 28 Apr 2020 19:59:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/facing-error-while-passing-variable-value-in-vb-script/qaq-p/12175014</guid>
      <dc:creator>prabahar_sekar</dc:creator>
      <dc:date>2020-04-28T19:59:17Z</dc:date>
    </item>
    <item>
      <title>Re: Facing error while passing Variable value in VB script</title>
      <link>https://community.sap.com/t5/technology-q-a/facing-error-while-passing-variable-value-in-vb-script/qaa-p/12175015#M4553005</link>
      <description>&lt;P&gt;&lt;STRONG&gt;lResult1 = Application.Run("SAPGetCellInfo", ActiveCell, "SELECTION", lNameChar)&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;What do you mean by undefined variable &lt;STRONG&gt;INameChar&lt;/STRONG&gt;?&lt;/P&gt;&lt;P&gt;Please read this blog about correct syntax: &lt;/P&gt;&lt;P&gt;&lt;A href="https://blogs.sap.com/2013/11/17/sapgetcellinfo-specifying-a-filter-doesnt-determine-the-order-of-results/" target="test_blank"&gt;https://blogs.sap.com/2013/11/17/sapgetcellinfo-specifying-a-filter-doesnt-determine-the-order-of-results/&lt;/A&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;lResult1 = Application.Run("SAPGetCellInfo", ActiveCell, "SELECTION", "DimName")&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Look on lResult1 in VBA debugger! &lt;/P&gt;&lt;P&gt;And remove useless lines, not related to your code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Call Application.Run("SAPSetRefreshBehaviour", "Off") 
Call Application.Run("SAPExecuteCommand", "PauseVariableSubmit", "On")
...
Call Application.Run("SAPExecuteCommand", "PauseVariableSubmit", "Off")  
Call Application.Run("SAPSetRefreshBehaviour", "On")&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Not related to SAPExecutePlanningSequence&lt;/P&gt;</description>
      <pubDate>Tue, 28 Apr 2020 21:29:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/facing-error-while-passing-variable-value-in-vb-script/qaa-p/12175015#M4553005</guid>
      <dc:creator>former_member186338</dc:creator>
      <dc:date>2020-04-28T21:29:42Z</dc:date>
    </item>
  </channel>
</rss>

