<?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 Get data from MSEG in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-data-from-mseg/m-p/4909438#M1146176</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to get material last good issue record from MSEG,How to write the code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select * from MSEG&lt;/P&gt;&lt;P&gt;                   Where MSEG~BUDAT = MAX ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Dec 2008 05:52:01 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-12-17T05:52:01Z</dc:date>
    <item>
      <title>Get data from MSEG</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-data-from-mseg/m-p/4909438#M1146176</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to get material last good issue record from MSEG,How to write the code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select * from MSEG&lt;/P&gt;&lt;P&gt;                   Where MSEG~BUDAT = MAX ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2008 05:52:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-data-from-mseg/m-p/4909438#M1146176</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-17T05:52:01Z</dc:date>
    </item>
    <item>
      <title>Re: Get data from MSEG</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-data-from-mseg/m-p/4909439#M1146177</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;Try this code &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM MSEG INTO G_MSEG&lt;/P&gt;&lt;P&gt;           UP TO 1 ROWS ORDER BY BUDAT DESCENDING .&lt;/P&gt;&lt;P&gt;  ENDSELECT.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2008 05:55:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-data-from-mseg/m-p/4909439#M1146177</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-17T05:55:51Z</dc:date>
    </item>
    <item>
      <title>Re: Get data from MSEG</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-data-from-mseg/m-p/4909440#M1146178</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Bean,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MSEG is a huge table which stores data for all the Material Mvmts taking place in the syst. Your qeury will take lot of time to process.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to restrict your scope of selection. Can you plz tell what are the user inputs i.e., selection-screen params?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2008 05:56:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-data-from-mseg/m-p/4909440#M1146178</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2008-12-17T05:56:23Z</dc:date>
    </item>
    <item>
      <title>Re: Get data from MSEG</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-data-from-mseg/m-p/4909441#M1146179</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;try like this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
select * from mkpf into table it_mkpf.

select * from mseg
into table it_mseg
for all entries in it_mkpf
where mblnr eq it_mkpf-mblnr.

sort it_mseg by budat descending.

read table it_mseg index 1.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now the first row will contain the latest figure..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Arunima&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Arunima Rudra on Dec 17, 2008 11:30 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2008 05:56:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-data-from-mseg/m-p/4909441#M1146179</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-17T05:56:47Z</dc:date>
    </item>
    <item>
      <title>Re: Get data from MSEG</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-data-from-mseg/m-p/4909442#M1146180</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Bean,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please be bit clear that what do you mean by "material last good issue record ".&lt;/P&gt;&lt;P&gt;And MSEG does not have the field name BUDAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Akshay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2008 05:58:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-data-from-mseg/m-p/4909442#M1146180</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-17T05:58:54Z</dc:date>
    </item>
    <item>
      <title>Re: Get data from MSEG</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-data-from-mseg/m-p/4909443#M1146181</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is the logic to calculate the last PO for a particular material .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can interprate with your condition depending on the movement type and the number range assigned to the material document number .   &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; SELECT * UP TO 1 ROWS&lt;/P&gt;&lt;P&gt;             FROM ekpo&lt;/P&gt;&lt;P&gt;             INTO wa_ekpo&lt;/P&gt;&lt;P&gt;             WHERE ebeln LIKE '45%'&lt;/P&gt;&lt;P&gt;             AND   matnr = wa_outtab-matnr&lt;/P&gt;&lt;P&gt;             ORDER BY ebeln DESCENDING .&lt;/P&gt;&lt;P&gt;    ENDSELECT .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If any further issue pls revert back .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards &lt;/P&gt;&lt;P&gt;Jamal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2008 06:01:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-data-from-mseg/m-p/4909443#M1146181</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-17T06:01:38Z</dc:date>
    </item>
    <item>
      <title>Re: Get data from MSEG</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-data-from-mseg/m-p/4909444#M1146182</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 want to get the some material last goods entry to some storage location&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BUDAT is a field that is the material doc.'s post date&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2008 06:03:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-data-from-mseg/m-p/4909444#M1146182</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-17T06:03:13Z</dc:date>
    </item>
  </channel>
</rss>

