<?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: Populate Table using GUID in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/populate-table-using-guid/m-p/7707642#M1578729</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;    Check how lv_invoice_bdi is declared , this should refer to a field rather than a structure.&lt;/P&gt;&lt;P&gt;    lt_invoice_bdi should refer to the table/structure /1BEA/S_CRMB_BDI&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * INTO table lt_invoice_bdi&lt;/P&gt;&lt;P&gt;FROM /1BEA/CRMB_BDI&lt;/P&gt;&lt;P&gt;WHERE BDI_GUID = lv_invoice_bdi -BDI_GUID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Srini.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 09 Mar 2011 11:35:34 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-03-09T11:35:34Z</dc:date>
    <item>
      <title>Populate Table using GUID</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/populate-table-using-guid/m-p/7707641#M1578728</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A (hopefully) quick and simple question that i've been unable to find the answer to.  I've retrieved the GUID of an invoice from a Credit note in CRM, but i've been unable to use the BDI_GUID to populate a table of BDI related to said invoice.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * INTO lt_invoice_bdi&lt;/P&gt;&lt;P&gt;  FROM /1BEA/CRMB_BDI&lt;/P&gt;&lt;P&gt;  WHERE BDI_GUID = lv_invoice_bdi.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT /1BEA/CRMB_BDI&lt;/P&gt;&lt;P&gt;  INTO lt_invoice_bdi&lt;/P&gt;&lt;P&gt;  WHERE BDI_GUID = lv_invoice_bdi.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created the lt_invoice_bdi as the data type /1BEA/S_CRMB_BDI_WRK.  Can anyone advise where i'm going wrong?&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;Andy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Mar 2011 11:23:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/populate-table-using-guid/m-p/7707641#M1578728</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-03-09T11:23:13Z</dc:date>
    </item>
    <item>
      <title>Re: Populate Table using GUID</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/populate-table-using-guid/m-p/7707642#M1578729</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;    Check how lv_invoice_bdi is declared , this should refer to a field rather than a structure.&lt;/P&gt;&lt;P&gt;    lt_invoice_bdi should refer to the table/structure /1BEA/S_CRMB_BDI&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * INTO table lt_invoice_bdi&lt;/P&gt;&lt;P&gt;FROM /1BEA/CRMB_BDI&lt;/P&gt;&lt;P&gt;WHERE BDI_GUID = lv_invoice_bdi -BDI_GUID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Srini.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Mar 2011 11:35:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/populate-table-using-guid/m-p/7707642#M1578729</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-03-09T11:35:34Z</dc:date>
    </item>
    <item>
      <title>Re: Populate Table using GUID</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/populate-table-using-guid/m-p/7707643#M1578730</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, i've tried what you suggested, but got the error 'Statement in context not permitted' when trying to activate the form (i'm running this as a form routine within the creditnote smartform), which is the same error i had previously trying to use SELECT * INTO statement.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The lv_invoice_guid is defined as type CRMT_OBJECT_GUID&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;EDIT&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Found i'd not put a . after my end form.  This is the form routine as it stands in full:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="------------------------------------------------------------" /&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      FORM GET_INVOICE_BDI&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="------------------------------------------------------------" /&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      Get the BDI table for the preceeding invoice&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="------------------------------------------------------------" /&gt;&lt;P&gt;FORM get_invoice_bdi USING lv_invoice_bdi&lt;/P&gt;&lt;P&gt;                     CHANGING lt_invoice_bdi TYPE /1BEA/S_CRMB_BDI&lt;/P&gt;&lt;P&gt;                     .&lt;/P&gt;&lt;P&gt;SELECT * INTO table lt_invoice_bdi&lt;/P&gt;&lt;P&gt;FROM /1BEA/CRMB_BDI&lt;/P&gt;&lt;P&gt;WHERE BDI_GUID = lv_invoice_bdi.&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Upon activation i get the error " 'LT_INVOICE_BDI' is not an internal table.  'Occurs n' specification is missing"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Andrew Gough on Mar 9, 2011 11:47 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Mar 2011 11:46:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/populate-table-using-guid/m-p/7707643#M1578730</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-03-09T11:46:19Z</dc:date>
    </item>
    <item>
      <title>Re: Populate Table using GUID</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/populate-table-using-guid/m-p/7707644#M1578731</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;      Use Tables statement instead of changing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM get_invoice_bdi USING lv_invoice_bdi&lt;/P&gt;&lt;P&gt;tables lt_invoice_bdi  structure  /1BEA/S_CRMB_BDI&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;Regards,&lt;/P&gt;&lt;P&gt;Srini.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Mar 2011 11:57:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/populate-table-using-guid/m-p/7707644#M1578731</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-03-09T11:57:39Z</dc:date>
    </item>
    <item>
      <title>Re: Populate Table using GUID</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/populate-table-using-guid/m-p/7707645#M1578732</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry Srini,&lt;/P&gt;&lt;P&gt;I've not used this TABLES before, so when i've configured, it's still giving syntax errors, i assume because i've not defined correctly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM get_invoice_bdi USING lv_invoice_bdi.&lt;/P&gt;&lt;P&gt;                     TABLES lt_invoice_bdi.        &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * INTO table lt_invoice_bdi&lt;/P&gt;&lt;P&gt;FROM /1BEA/CRMB_BDI&lt;/P&gt;&lt;P&gt;WHERE BDI_GUID = lv_invoice_bdi.&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;Get the error LT_INVOICE_BDI is either not active or does not exist.  Where and how do i define the table, and is this just down to how i specify the perform within the initialisation - currently i'm not calling this until it compiles correctly in form routines tab.&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;Andy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Mar 2011 12:29:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/populate-table-using-guid/m-p/7707645#M1578732</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-03-09T12:29:39Z</dc:date>
    </item>
    <item>
      <title>Re: Populate Table using GUID</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/populate-table-using-guid/m-p/7707646#M1578733</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Andy&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tables should be the first parameter to be passed to sub-routine and then you can pass USING parameters. So change your code to as below, it should work fine,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
FORM get_invoice_bdi TABLES lt_invoice_bdi
USING lv_invoice_bdi.

SELECT * INTO table lt_invoice_bdi
FROM /1BEA/CRMB_BDI
WHERE BDI_GUID = lv_invoice_bdi.

ENDFORM.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Ranganath&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Mar 2011 12:49:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/populate-table-using-guid/m-p/7707646#M1578733</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-03-09T12:49:39Z</dc:date>
    </item>
    <item>
      <title>Re: Populate Table using GUID</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/populate-table-using-guid/m-p/7707647#M1578734</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your help guys, looks like this one is solved!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Mar 2011 14:03:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/populate-table-using-guid/m-p/7707647#M1578734</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-03-09T14:03:09Z</dc:date>
    </item>
  </channel>
</rss>

