<?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 CRM Query..? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/crm-query/m-p/4751197#M1114367</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a query regarding CRM Tables. Those are:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CRMD_ORDERADM_H&lt;/P&gt;&lt;P&gt;CRMD_ORDER_INDEX&lt;/P&gt;&lt;P&gt;CRMD_ORDERADM_I&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While retrieving the data from CRMD_ORDERADM_I do we need the middle table CRMD_ORDER_INDEX..? OR we can retrieve directly through the header table: CRMD_ORDERADM_H. Pls let me know what is the purpose of this table..CRMD_ORDER_INDEX..? pls see the code below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM crmd_orderadm_h INTO TABLE it_crmd_orderadm_h.&lt;/P&gt;&lt;P&gt;IF NOT it_crmd_orderadm_h[] IS INITIAL.&lt;/P&gt;&lt;P&gt;  SELECT *  FROM crmd_order_index&lt;/P&gt;&lt;P&gt;            INTO TABLE it_crmd_order_index&lt;/P&gt;&lt;P&gt;            FOR ALL ENTRIES IN it_crmd_orderadm_h&lt;/P&gt;&lt;P&gt;            WHERE header EQ it_crmd_orderadm_h-guid.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF NOT it_crmd_order_index[] IS INITIAL.&lt;/P&gt;&lt;P&gt;  SELECT * FROM crmd_orderadm_i INTO TABLE it_crmd_orderadm_i&lt;/P&gt;&lt;P&gt;           FOR ALL ENTRIES IN it_crmd_order_index&lt;/P&gt;&lt;P&gt;           WHERE guid EQ it_crmd_order_index-item.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                                      OR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF NOT it_crmd_orderadm_h[] IS INITIAL.&lt;/P&gt;&lt;P&gt;  SELECT * FROM crmd_orderadm_i INTO TABLE it_crmd_orderadm_i&lt;/P&gt;&lt;P&gt;           FOR ALL ENTRIES IN it_crmd_orderadm_h&lt;/P&gt;&lt;P&gt;           WHERE header EQ it_crmd_orderadm_h-guid.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 31 Oct 2008 11:55:42 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-10-31T11:55:42Z</dc:date>
    <item>
      <title>CRM Query..?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/crm-query/m-p/4751197#M1114367</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a query regarding CRM Tables. Those are:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CRMD_ORDERADM_H&lt;/P&gt;&lt;P&gt;CRMD_ORDER_INDEX&lt;/P&gt;&lt;P&gt;CRMD_ORDERADM_I&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While retrieving the data from CRMD_ORDERADM_I do we need the middle table CRMD_ORDER_INDEX..? OR we can retrieve directly through the header table: CRMD_ORDERADM_H. Pls let me know what is the purpose of this table..CRMD_ORDER_INDEX..? pls see the code below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM crmd_orderadm_h INTO TABLE it_crmd_orderadm_h.&lt;/P&gt;&lt;P&gt;IF NOT it_crmd_orderadm_h[] IS INITIAL.&lt;/P&gt;&lt;P&gt;  SELECT *  FROM crmd_order_index&lt;/P&gt;&lt;P&gt;            INTO TABLE it_crmd_order_index&lt;/P&gt;&lt;P&gt;            FOR ALL ENTRIES IN it_crmd_orderadm_h&lt;/P&gt;&lt;P&gt;            WHERE header EQ it_crmd_orderadm_h-guid.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF NOT it_crmd_order_index[] IS INITIAL.&lt;/P&gt;&lt;P&gt;  SELECT * FROM crmd_orderadm_i INTO TABLE it_crmd_orderadm_i&lt;/P&gt;&lt;P&gt;           FOR ALL ENTRIES IN it_crmd_order_index&lt;/P&gt;&lt;P&gt;           WHERE guid EQ it_crmd_order_index-item.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                                      OR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF NOT it_crmd_orderadm_h[] IS INITIAL.&lt;/P&gt;&lt;P&gt;  SELECT * FROM crmd_orderadm_i INTO TABLE it_crmd_orderadm_i&lt;/P&gt;&lt;P&gt;           FOR ALL ENTRIES IN it_crmd_orderadm_h&lt;/P&gt;&lt;P&gt;           WHERE header EQ it_crmd_orderadm_h-guid.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Oct 2008 11:55:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/crm-query/m-p/4751197#M1114367</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-31T11:55:42Z</dc:date>
    </item>
    <item>
      <title>Re: CRM Query..?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/crm-query/m-p/4751198#M1114368</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will give on FM which will retrive all the data Into the internal tables instead of going to each select statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  read table y_i_qtno into y_wa_qtno with key object_id = y_p_ordr.&lt;/P&gt;&lt;P&gt;  insert y_wa_qtno-guid into table y_i_guid_h.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : y_wa_qtno     type y_t_qtno,&lt;/P&gt;&lt;P&gt;         y_i_orderadm_i    type crmt_orderadm_i_wrkt,&lt;/P&gt;&lt;P&gt;         y_i_guid_h        type crmt_object_guid_tab,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  select guid&lt;/P&gt;&lt;P&gt;         object_id&lt;/P&gt;&lt;P&gt;         from crmd_orderadm_h&lt;/P&gt;&lt;P&gt;         into table y_i_qtno&lt;/P&gt;&lt;P&gt;         where object_id eq y_p_ordr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  call function 'CRM_ORDER_READ'&lt;/P&gt;&lt;P&gt;    exporting&lt;/P&gt;&lt;P&gt;      it_header_guid       = y_i_guid_h&lt;/P&gt;&lt;P&gt;    importing&lt;/P&gt;&lt;P&gt;      et_orderadm_i        = y_i_orderadm_i&lt;/P&gt;&lt;P&gt;      et_product_i         = y_i_product_i&lt;/P&gt;&lt;P&gt;      et_sales             = y_i_sales_i&lt;/P&gt;&lt;P&gt;      et_partner           = y_i_partner&lt;/P&gt;&lt;P&gt;      et_status            = y_i_status_i&lt;/P&gt;&lt;P&gt;    exceptions&lt;/P&gt;&lt;P&gt;      document_not_found   = 1&lt;/P&gt;&lt;P&gt;      error_occurred       = 2&lt;/P&gt;&lt;P&gt;      document_locked      = 3&lt;/P&gt;&lt;P&gt;      no_change_authority  = 4&lt;/P&gt;&lt;P&gt;      no_display_authority = 5&lt;/P&gt;&lt;P&gt;      no_change_allowed    = 6&lt;/P&gt;&lt;P&gt;      others               = 7.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First call the FM and in the improting take all the tables which you required then loop that internal table with requirements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Still if you need some other data you can select the data directly.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Oct 2008 12:00:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/crm-query/m-p/4751198#M1114368</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-31T12:00:25Z</dc:date>
    </item>
    <item>
      <title>Re: CRM Query..?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/crm-query/m-p/4751199#M1114369</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Im  not expecting that answer. Do we need intermediate table or not, if S why what is the reason..?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Akshitha.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Oct 2008 12:02:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/crm-query/m-p/4751199#M1114369</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-31T12:02:00Z</dc:date>
    </item>
  </channel>
</rss>

