<?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: REPORT in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/report/m-p/1481446#M225168</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SELECT pstyv&lt;/P&gt;&lt;P&gt;FROM vbap&lt;/P&gt;&lt;P&gt;INTO CORRESPONDING FIELDS OF TABLE it_item_master&lt;/P&gt;&lt;P&gt;WHERE vbeln IN s_vbeln2.&lt;/P&gt;&lt;P&gt;LOOP AT it_item_master.&lt;/P&gt;&lt;P&gt;APPEND it_item_master.   &amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt; WHY&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you use "APPEND it_item_master" there, your loop never end.&lt;/P&gt;&lt;P&gt;you must delete this code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ibrahim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 Jul 2006 06:46:47 GMT</pubDate>
    <dc:creator>ibrahim_u</dc:creator>
    <dc:date>2006-07-26T06:46:47Z</dc:date>
    <item>
      <title>REPORT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/report/m-p/1481445#M225167</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi &lt;/P&gt;&lt;P&gt;please help me to find the solution.&lt;/P&gt;&lt;P&gt;this is the logic :&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF it_item_master OCCURS 10,&lt;/P&gt;&lt;P&gt;      matnr     LIKE mara-matnr,&lt;/P&gt;&lt;P&gt;      maktx     LIKE makt-maktx,&lt;/P&gt;&lt;P&gt;      spart     LIKE mara-spart,&lt;/P&gt;&lt;P&gt;      pstyv     LIKE vbap-pstyv,&lt;/P&gt;&lt;P&gt;      prdha     LIKE mara-prdha,&lt;/P&gt;&lt;P&gt;      yyverpa   LIKE marc-yyverpa,&lt;/P&gt;&lt;P&gt;      yyfuellmg LIKE marc-yyfuellmg,&lt;/P&gt;&lt;P&gt;      matkl     LIKE mara-matkl,&lt;/P&gt;&lt;P&gt;END OF it_item_master.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS: s_matnr2 FOR mara-matnr,&lt;/P&gt;&lt;P&gt;                s_vbeln2 FOR vbap-vbeln,&lt;/P&gt;&lt;P&gt;                s_werks2 FOR marc-werks,&lt;/P&gt;&lt;P&gt;                s_vkorg2 FOR knvp-vkorg.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN END OF BLOCK b2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; SELECT matnr spart prdha matkl&lt;/P&gt;&lt;P&gt;      FROM  mara&lt;/P&gt;&lt;P&gt;          INTO CORRESPONDING FIELDS OF TABLE  it_item_master&lt;/P&gt;&lt;P&gt;            WHERE matnr IN s_matnr2.&lt;/P&gt;&lt;P&gt;SELECT yyverpa yyfuellmg&lt;/P&gt;&lt;P&gt;      FROM marc&lt;/P&gt;&lt;P&gt;         INTO CORRESPONDING FIELDS OF TABLE it_item_master&lt;/P&gt;&lt;P&gt;           WHERE  matnr IN s_matnr2&lt;/P&gt;&lt;P&gt;           AND    werks IN s_werks2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; SELECT pstyv&lt;/P&gt;&lt;P&gt;      FROM vbap&lt;/P&gt;&lt;P&gt;           INTO CORRESPONDING FIELDS OF TABLE it_item_master&lt;/P&gt;&lt;P&gt;                WHERE vbeln IN s_vbeln2.&lt;/P&gt;&lt;P&gt;LOOP AT it_item_master.&lt;/P&gt;&lt;P&gt;  APPEND it_item_master.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  WRITE:it_item_master-matnr,&lt;/P&gt;&lt;P&gt;        it_item_master-spart,&lt;/P&gt;&lt;P&gt;        it_item_master-prdha,&lt;/P&gt;&lt;P&gt;        it_item_master-matkl,&lt;/P&gt;&lt;P&gt;        it_item_master-maktx,&lt;/P&gt;&lt;P&gt;        it_item_master-yyverpa,&lt;/P&gt;&lt;P&gt;        it_item_master-yyfuellmg.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am not getting the data in to the internal table and moreever it is taking long time to come out of the loop.&lt;/P&gt;&lt;P&gt;plse guide me is this right way to retrive the data,is there any mistake? plse ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with regards&lt;/P&gt;&lt;P&gt;narasimha rao&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jul 2006 06:41:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/report/m-p/1481445#M225167</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-26T06:41:58Z</dc:date>
    </item>
    <item>
      <title>Re: REPORT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/report/m-p/1481446#M225168</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SELECT pstyv&lt;/P&gt;&lt;P&gt;FROM vbap&lt;/P&gt;&lt;P&gt;INTO CORRESPONDING FIELDS OF TABLE it_item_master&lt;/P&gt;&lt;P&gt;WHERE vbeln IN s_vbeln2.&lt;/P&gt;&lt;P&gt;LOOP AT it_item_master.&lt;/P&gt;&lt;P&gt;APPEND it_item_master.   &amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt; WHY&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you use "APPEND it_item_master" there, your loop never end.&lt;/P&gt;&lt;P&gt;you must delete this code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ibrahim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jul 2006 06:46:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/report/m-p/1481446#M225168</guid>
      <dc:creator>ibrahim_u</dc:creator>
      <dc:date>2006-07-26T06:46:47Z</dc:date>
    </item>
    <item>
      <title>Re: REPORT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/report/m-p/1481447#M225169</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;Problems in the code:&lt;/P&gt;&lt;P&gt;a) Why don't you try to create a Join of MARA and MARC to pick data into table it_item_master1 (temp table) and then for all entries of that pick data from VBAP into it_item_master2. Combine the datas of both the table into the final table it_item_master. &lt;/P&gt;&lt;P&gt;b)Theres a APPEND it_item_master in your loop before the write statemnet ??&lt;/P&gt;&lt;P&gt;c) Write a separate loop for your write and append statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope This Helps&lt;/P&gt;&lt;P&gt;Anirban&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jul 2006 06:49:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/report/m-p/1481447#M225169</guid>
      <dc:creator>former_member480923</dc:creator>
      <dc:date>2006-07-26T06:49:17Z</dc:date>
    </item>
    <item>
      <title>Re: REPORT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/report/m-p/1481448#M225170</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;all selects are strange.&lt;/P&gt;&lt;P&gt;you are deleting it_item_master table in next selects.(what you are getting in select with mara is deleteted by select by marc and.so on)&lt;/P&gt;&lt;P&gt;To get expectet results use Joins between tables MARA, MARC and VBAP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR&amp;lt; JAcek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jul 2006 06:50:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/report/m-p/1481448#M225170</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-26T06:50:39Z</dc:date>
    </item>
    <item>
      <title>Re: REPORT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/report/m-p/1481449#M225171</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;LOOP AT it_item_master.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;APPEND it_item_master&amp;lt;/b&amp;gt;.----&amp;gt;not  needed..&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;WRITE:it_item_master-matnr,&lt;/P&gt;&lt;P&gt;it_item_master-spart,&lt;/P&gt;&lt;P&gt;it_item_master-prdha,&lt;/P&gt;&lt;P&gt;it_item_master-matkl,&lt;/P&gt;&lt;P&gt;it_item_master-maktx,&lt;/P&gt;&lt;P&gt;it_item_master-yyverpa,&lt;/P&gt;&lt;P&gt;it_item_master-yyfuellmg.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;  not  needed  becoz  ur  recored  is  already in itab  because  u used  into table  itab in select query.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jul 2006 06:51:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/report/m-p/1481449#M225171</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-26T06:51:03Z</dc:date>
    </item>
    <item>
      <title>Re: REPORT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/report/m-p/1481450#M225172</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;Assuming you want the data in &amp;lt;b&amp;gt;it_item_master&amp;lt;/b&amp;gt; into another internal table .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is how you can do it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Decalare another Internal Table &amp;lt;b&amp;gt;it_item_master_temp&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Consider this code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: BEGIN OF it_item_master OCCURS 10,
matnr LIKE mara-matnr,
maktx LIKE makt-maktx,
spart LIKE mara-spart,
pstyv LIKE vbap-pstyv,
prdha LIKE mara-prdha,
yyverpa LIKE marc-yyverpa,
yyfuellmg LIKE marc-yyfuellmg,
matkl LIKE mara-matkl,
END OF it_item_master.

&amp;lt;b&amp;gt;DATA : it_item_master_temp LIKE it_item_master OCCURS 0.&amp;lt;/b&amp;gt;


SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
SELECT-OPTIONS: s_matnr2 FOR mara-matnr,
s_vbeln2 FOR vbap-vbeln,
s_werks2 FOR marc-werks,
s_vkorg2 FOR knvp-vkorg.
SELECTION-SCREEN END OF BLOCK b2.

SELECT matnr spart prdha matkl
FROM mara
INTO CORRESPONDING FIELDS OF TABLE it_item_master
WHERE matnr IN s_matnr2.
SELECT yyverpa yyfuellmg
FROM marc
INTO CORRESPONDING FIELDS OF TABLE it_item_master
WHERE matnr IN s_matnr2
AND werks IN s_werks2.

SELECT pstyv
FROM vbap
INTO CORRESPONDING FIELDS OF TABLE it_item_master
WHERE vbeln IN s_vbeln2.

LOOP AT it_item_master.

&amp;lt;b&amp;gt;*For Dispalying the data.&amp;lt;/b&amp;gt;
  WRITE:it_item_master-matnr,
        it_item_master-spart,
        it_item_master-prdha,
        it_item_master-matkl,
        it_item_master-maktx,
        it_item_master-yyverpa,
        it_item_master-yyfuellmg.

&amp;lt;b&amp;gt;*For putting the data into another Internal Table&amp;lt;/b&amp;gt;
  it_item_master_temp-matnr = it_item_maste-matnr .
  it_item_master_temp-spart = it_item_master-spart.
  it_item_master_temp-prdha = it_item_master-prdha.


  APPEND it_item_master_temp.
  CLEAR it_item_master_temp.


ENDLOOP.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;AS&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jul 2006 06:57:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/report/m-p/1481450#M225172</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-26T06:57:29Z</dc:date>
    </item>
    <item>
      <title>Re: REPORT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/report/m-p/1481451#M225173</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use FORALLENTRIES statement and try it out&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jul 2006 07:20:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/report/m-p/1481451#M225173</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-26T07:20:27Z</dc:date>
    </item>
  </channel>
</rss>

