<?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 Problem in Entries.. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-entries/m-p/4596208#M1083626</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: i_vbap like vbap occurs 0 with header line,&lt;/P&gt;&lt;P&gt;      i_vbfa like vbfa occurs 0 with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameters: p_vbeln like vbap-vbeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select vbeln&lt;/P&gt;&lt;P&gt;      posnr&lt;/P&gt;&lt;P&gt;      matnr&lt;/P&gt;&lt;P&gt;      uepos&lt;/P&gt;&lt;P&gt;      prodh&lt;/P&gt;&lt;P&gt;      meins&lt;/P&gt;&lt;P&gt; from vbap&lt;/P&gt;&lt;P&gt; into corresponding fields of table i_vbap&lt;/P&gt;&lt;P&gt; where vbeln = p_vbeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  select vbelv&lt;/P&gt;&lt;P&gt;       posnv&lt;/P&gt;&lt;P&gt;       rfmng&lt;/P&gt;&lt;P&gt;       plmin&lt;/P&gt;&lt;P&gt;  from vbfa&lt;/P&gt;&lt;P&gt;  into corresponding fields of table i_vbfa&lt;/P&gt;&lt;P&gt;  for all entries in i_vbap where vbelv = i_vbap-vbeln&lt;/P&gt;&lt;P&gt;                            and   posnv = i_vbap-posnr.&lt;/P&gt;&lt;P&gt;write: 'VBELV',25 'RFMNG',31 'POSNV',40 'PLMIN'.&lt;/P&gt;&lt;P&gt;  loop at i_vbfa.&lt;/P&gt;&lt;P&gt;    write:/ i_vbfa-vbelv, i_vbfa-rfmng, i_vbfa-posnv, i_vbfa-plmin.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If i run this program wilh any sales document.iam getting less than the entries which i have in VBFA table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example: for one sales order In VBFA iam having 20 entries. but when i run the above pgm iam getting only 7 records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can any body give me clear explanation..PLZ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 13 Oct 2008 18:56:58 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-10-13T18:56:58Z</dc:date>
    <item>
      <title>Problem in Entries..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-entries/m-p/4596208#M1083626</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: i_vbap like vbap occurs 0 with header line,&lt;/P&gt;&lt;P&gt;      i_vbfa like vbfa occurs 0 with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameters: p_vbeln like vbap-vbeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select vbeln&lt;/P&gt;&lt;P&gt;      posnr&lt;/P&gt;&lt;P&gt;      matnr&lt;/P&gt;&lt;P&gt;      uepos&lt;/P&gt;&lt;P&gt;      prodh&lt;/P&gt;&lt;P&gt;      meins&lt;/P&gt;&lt;P&gt; from vbap&lt;/P&gt;&lt;P&gt; into corresponding fields of table i_vbap&lt;/P&gt;&lt;P&gt; where vbeln = p_vbeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  select vbelv&lt;/P&gt;&lt;P&gt;       posnv&lt;/P&gt;&lt;P&gt;       rfmng&lt;/P&gt;&lt;P&gt;       plmin&lt;/P&gt;&lt;P&gt;  from vbfa&lt;/P&gt;&lt;P&gt;  into corresponding fields of table i_vbfa&lt;/P&gt;&lt;P&gt;  for all entries in i_vbap where vbelv = i_vbap-vbeln&lt;/P&gt;&lt;P&gt;                            and   posnv = i_vbap-posnr.&lt;/P&gt;&lt;P&gt;write: 'VBELV',25 'RFMNG',31 'POSNV',40 'PLMIN'.&lt;/P&gt;&lt;P&gt;  loop at i_vbfa.&lt;/P&gt;&lt;P&gt;    write:/ i_vbfa-vbelv, i_vbfa-rfmng, i_vbfa-posnv, i_vbfa-plmin.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If i run this program wilh any sales document.iam getting less than the entries which i have in VBFA table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example: for one sales order In VBFA iam having 20 entries. but when i run the above pgm iam getting only 7 records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can any body give me clear explanation..PLZ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Oct 2008 18:56:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-entries/m-p/4596208#M1083626</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-13T18:56:58Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in Entries..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-entries/m-p/4596209#M1083627</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sultabi,&lt;/P&gt;&lt;P&gt;You have not properly used the For All Entries statement.&lt;/P&gt;&lt;P&gt;Please make sure before doing For All Entries there should be 2 things u should keep in mind.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort the internal table&lt;/P&gt;&lt;P&gt;and check the internal table is not initial&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me rewrite your efficient code it will definatly work.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
select vbeln
posnr
matnr
uepos
prodh
meins
from vbap
into corresponding fields of table i_vbap
where vbeln = p_vbeln.

sort table i_vbap by  posnr.  " you have missed this statment
if not i_vbap[] is initial.         " you have missed this statment

select vbelv
posnv
rfmng
plmin
from vbfa
into corresponding fields of table i_vbfa
for all entries in i_vbap where vbelv = i_vbap-vbeln
and posnv = i_vbap-posnr.
endif.
write: 'VBELV',25 'RFMNG',31 'POSNV',40 'PLMIN'.
loop at i_vbfa.
write:/ i_vbfa-vbelv, i_vbfa-rfmng, i_vbfa-posnv, i_vbfa-plmin.
endloop.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Chidanand&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Oct 2008 19:03:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-entries/m-p/4596209#M1083627</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-13T19:03:32Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in Entries..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-entries/m-p/4596210#M1083628</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sultanbi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try to use SORT  and IF NOT i_vbap[] IS INITIAL statements.&lt;/P&gt;&lt;P&gt;You will get.&lt;/P&gt;&lt;P&gt;If you want u can use DELETE ADJACENT DUPLICATES FROM i_VBAP COMPARING VBELN POSNR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;surendra babu Vemula&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Oct 2008 19:43:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-entries/m-p/4596210#M1083628</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-13T19:43:04Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in Entries..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-entries/m-p/4596211#M1083629</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Chidanand Chauhan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code which i have missed is just to sort the orders and just to check whether we are having entries in VBAP or not...?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Even though i pasted u r recomanded u r code. But no use.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please run the code once and not down the entries and also check those entries in VBFA. u can understand very clear..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can any body please tell me...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Oct 2008 12:19:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-entries/m-p/4596211#M1083629</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-14T12:19:29Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in Entries..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-entries/m-p/4596212#M1083630</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thnaks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Nov 2008 14:33:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-entries/m-p/4596212#M1083630</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-10T14:33:18Z</dc:date>
    </item>
  </channel>
</rss>

