<?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: clarification on Select statement in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/clarification-on-select-statement/m-p/2311990#M506522</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;This is problem with your where clause, so first try to analyse withther in_it_mkpf have relevent data and ur other where clasue have correct data. bcoz joins are correct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am suggesting u to remove all where clasue and add clause one by one and debug the resul..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will solve ur problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jogdand M B&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 16 May 2007 05:26:51 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-05-16T05:26:51Z</dc:date>
    <item>
      <title>clarification on Select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/clarification-on-select-statement/m-p/2311987#M506519</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;can u please any one tell me the solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In one condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am getting the data from marc mkpf and mseg&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my requirement is &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;get the material number from marc based on plant on selection screen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;get some data from mkpf table based on posting date(budat) on selection screen entered .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;get the material data from mseg table based on matnr = equal to point1&lt;/P&gt;&lt;P&gt;                                               mblnr = equal to point2&lt;/P&gt;&lt;P&gt;                                               mjahr = equal to point2.&lt;/P&gt;&lt;P&gt;                            here some fields is there that equal to selection screen fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for that i have written the code like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;one way: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select matnr&lt;/P&gt;&lt;P&gt;       werks&lt;/P&gt;&lt;P&gt;  from marc&lt;/P&gt;&lt;P&gt;  into table out_it_marc&lt;/P&gt;&lt;P&gt; where werks in s_werks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort out_it_marc by matnr werks.&lt;/P&gt;&lt;P&gt;delete adjacent duplicates from out_it_marc&lt;/P&gt;&lt;P&gt;                    comparing matnr werks.&lt;/P&gt;&lt;P&gt;loop at out_it_marc into lfl_marc.&lt;/P&gt;&lt;P&gt;vr_matnr-low = lfl_marc-matnr.&lt;/P&gt;&lt;P&gt;vr_matnr-sign = c_in.&lt;/P&gt;&lt;P&gt;vr_matnr-option = c_eq.&lt;/P&gt;&lt;P&gt;append vr_matnr.&lt;/P&gt;&lt;P&gt;clear : lfl_marc.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM get_mseg_data&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;               tables i_r_matnr  structure vr_matnr&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;                USING  in_it_mkpf  type t_it_mkpf&lt;/P&gt;&lt;P&gt;              changing out_it_mseg type t_it_mseg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if not in_it_mkpf[] is initial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select&lt;/P&gt;&lt;P&gt;        MBLNR    "Number of Material Document&lt;/P&gt;&lt;P&gt;        MJAHR   "Material Document Year&lt;/P&gt;&lt;P&gt;        BWART    "Movement Type (Inventory Management)&lt;/P&gt;&lt;P&gt;        MATNR    "Material Number&lt;/P&gt;&lt;P&gt;        WERKS    "Plant&lt;/P&gt;&lt;P&gt;        LGORT   "Storage location&lt;/P&gt;&lt;P&gt;        SOBKZ    "Special Stock Indicator&lt;/P&gt;&lt;P&gt;        LIFNR   "Vendor's account number&lt;/P&gt;&lt;P&gt;        KUNNR    "Account number of customer&lt;/P&gt;&lt;P&gt;        DMBTR    "Amount in local currency&lt;/P&gt;&lt;P&gt;        MENGE    "Quantity&lt;/P&gt;&lt;P&gt;        MEINS    "Base Unit of Measure&lt;/P&gt;&lt;P&gt;        EBELN    "Purchase order number&lt;/P&gt;&lt;P&gt;        KOSTL    "Cost Center&lt;/P&gt;&lt;P&gt;        AUFNR    "Order Number&lt;/P&gt;&lt;P&gt;        BUKRS    "company code&lt;/P&gt;&lt;P&gt;        PS_PSP_PNR  "Work Breakdown Structure Element (WBS Element)&lt;/P&gt;&lt;P&gt;        SAKTO  "G/L account number&lt;/P&gt;&lt;P&gt;     from mseg&lt;/P&gt;&lt;P&gt;      into table out_it_mseg&lt;/P&gt;&lt;P&gt;    for all entries in in_it_mkpf&lt;/P&gt;&lt;P&gt;  where mblnr eq in_it_mkpf-mblnr&lt;/P&gt;&lt;P&gt;    and mjahr eq in_it_mkpf-mjahr&lt;/P&gt;&lt;P&gt;    and bwart in s_bwart&lt;/P&gt;&lt;P&gt;    and matnr in vr_matnr&lt;/P&gt;&lt;P&gt;    and werks in s_werks&lt;/P&gt;&lt;P&gt;    and kostl in s_kostl&lt;/P&gt;&lt;P&gt;    and ps_psp_pnr in s_pspnr.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but its getting dump because of so many records&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so that i have written again like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM get_mkpf_mseg_data  USING  in_it_marc type t_it_marc&lt;/P&gt;&lt;P&gt;                         changing out_it_mkpf_mseg type t_it_mkpf_mseg.&lt;/P&gt;&lt;P&gt;if not in_it_marc[] is not initial.&lt;/P&gt;&lt;P&gt;select A~mblnr&lt;/P&gt;&lt;P&gt;       A~mjahr&lt;/P&gt;&lt;P&gt;       A~budat&lt;/P&gt;&lt;P&gt;       A~cpudt&lt;/P&gt;&lt;P&gt;       A~cputm&lt;/P&gt;&lt;P&gt;       A~usnam&lt;/P&gt;&lt;P&gt;       A~xblnr&lt;/P&gt;&lt;P&gt;       B~BWART    "Movement Type (Inventory Management)&lt;/P&gt;&lt;P&gt;       B~MATNR    "Material Number&lt;/P&gt;&lt;P&gt;       B~WERKS    "Plant&lt;/P&gt;&lt;P&gt;       B~LGORT   "Storage location&lt;/P&gt;&lt;P&gt;       B~SOBKZ    "Special Stock Indicator&lt;/P&gt;&lt;P&gt;       B~LIFNR   "Vendor's account number&lt;/P&gt;&lt;P&gt;       B~KUNNR    "Account number of customer&lt;/P&gt;&lt;P&gt;       B~DMBTR    "Amount in local currency&lt;/P&gt;&lt;P&gt;       B~MENGE    "Quantity&lt;/P&gt;&lt;P&gt;       B~MEINS    "Base Unit of Measure&lt;/P&gt;&lt;P&gt;       B~EBELN    "Purchase order number&lt;/P&gt;&lt;P&gt;       B~KOSTL    "Cost Center&lt;/P&gt;&lt;P&gt;       B~AUFNR    "Order Number&lt;/P&gt;&lt;P&gt;       B~BUKRS    "company code&lt;/P&gt;&lt;P&gt;       B~PS_PSP_PNR  "Work Breakdown Structure Element (WBS Element)&lt;/P&gt;&lt;P&gt;       B~SAKTO  "G/L account number&lt;/P&gt;&lt;P&gt;  INTO TABLE out_it_mkpf_mseg&lt;/P&gt;&lt;P&gt;  from mkpf AS A INNER JOIN MSEG AS B&lt;/P&gt;&lt;P&gt;  ON A&lt;SUB&gt;MBLNR = B&lt;/SUB&gt;MBLNR&lt;/P&gt;&lt;P&gt;  AND A&lt;SUB&gt;MJAHR = B&lt;/SUB&gt;MJAHR&lt;/P&gt;&lt;P&gt;  FOR ALL ENTRIES IN IN_IT_MARC&lt;/P&gt;&lt;P&gt;  WHERE B~MATNR  = IN_IT_MARC-MATNR&lt;/P&gt;&lt;P&gt;    AND B~WERKS  = IN_IT_MARC-WERKS&lt;/P&gt;&lt;P&gt;    AND A~BUDAT IN S_BUDAT&lt;/P&gt;&lt;P&gt;    AND B~BWART IN S_BWART&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   AND MATNR  = IN_IT_MSEG-MATNR&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   AND WERKS  = IN_IT_MSEG-WERKS&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    AND B~KOSTL IN S_KOSTL&lt;/P&gt;&lt;P&gt;    AND B~PS_PSP_PNR IN S_PSPNR.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BREAK-POINT.&lt;/P&gt;&lt;P&gt;ENDFORM.                    " get_mkpf_mseg_data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but this select statement is not working properly &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is there anyway to solve it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please give me the solution ASAP, its urgent.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 May 2007 05:17:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/clarification-on-select-statement/m-p/2311987#M506519</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-16T05:17:18Z</dc:date>
    </item>
    <item>
      <title>Re: clarification on Select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/clarification-on-select-statement/m-p/2311988#M506520</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi bs,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you dont\'t have to build a range table vr_matnr for the selection, you just can use for all entries. See help on WHERE-clause:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Suppose FTAB is filled as follows: &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;CARRID  CONNID &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;-------------- &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;LH      2415 &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;SQ      0026 &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;LH      0400 &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM sflight INTO wa_sflight &lt;/P&gt;&lt;P&gt;    FOR ALL ENTRIES IN ftab &lt;/P&gt;&lt;P&gt;    WHERE CARRID = ftab-carrid AND &lt;/P&gt;&lt;P&gt;          CONNID = ftab-connid AND &lt;/P&gt;&lt;P&gt;          fldate = '20010228'. &lt;/P&gt;&lt;P&gt;  free = wa_sflight-seatsocc - wa_sflight-seatsmax. &lt;/P&gt;&lt;P&gt;  WRITE: / wa_sflight-carrid, wa_sflight-connid, free. &lt;/P&gt;&lt;P&gt;ENDSELECT. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 May 2007 05:23:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/clarification-on-select-statement/m-p/2311988#M506520</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-16T05:23:47Z</dc:date>
    </item>
    <item>
      <title>Re: clarification on Select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/clarification-on-select-statement/m-p/2311989#M506521</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Prasad,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The select statements you have written seem correct. Can you tell as to what exactly the dump message is. May be then i can help you out. try using "into corresponding fields of table" when you are using the select statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Karan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 May 2007 05:25:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/clarification-on-select-statement/m-p/2311989#M506521</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-16T05:25:13Z</dc:date>
    </item>
    <item>
      <title>Re: clarification on Select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/clarification-on-select-statement/m-p/2311990#M506522</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;This is problem with your where clause, so first try to analyse withther in_it_mkpf have relevent data and ur other where clasue have correct data. bcoz joins are correct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am suggesting u to remove all where clasue and add clause one by one and debug the resul..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will solve ur problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jogdand M B&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 May 2007 05:26:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/clarification-on-select-statement/m-p/2311990#M506522</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-16T05:26:51Z</dc:date>
    </item>
    <item>
      <title>Re: clarification on Select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/clarification-on-select-statement/m-p/2311991#M506523</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;i think how u declared your internal table [workarea also if u uesd external one ]. i mean the way and in same order of fields you used in your seelct query please check it once both should be in same order and in same sequence&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 May 2007 05:35:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/clarification-on-select-statement/m-p/2311991#M506523</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-16T05:35:17Z</dc:date>
    </item>
    <item>
      <title>Re: clarification on Select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/clarification-on-select-statement/m-p/2311992#M506524</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;The problem has been solved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jul 2007 13:02:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/clarification-on-select-statement/m-p/2311992#M506524</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-23T13:02:12Z</dc:date>
    </item>
  </channel>
</rss>

