<?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: field values in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/field-values/m-p/2055727#M424335</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;You didn't give the MODIFY statement to update the internal table..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if it_zfreegoods-matnr ne it_fg_xvbap-matnr.&lt;/P&gt;&lt;P&gt;it_fg_xvbap-kwmeng = it_fg_xvbap-kmpmg.&lt;/P&gt;&lt;P&gt;clear v_lines.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;MODIFY it_fg_xvbap transporting kwmeng.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;continue.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&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;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 13 Mar 2007 16:13:25 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-03-13T16:13:25Z</dc:date>
    <item>
      <title>field values</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/field-values/m-p/2055725#M424333</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;&lt;/P&gt;&lt;P&gt;I need to insert a code which is in bold but it is not consider there.......can you suggest how can i update that field values....it_fg_xvbap-kmpmg into it_fg_xvbap-kwmeng if the material zfreegoods-matnr is not equal to it_fg_xvbap-matnr..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;correct the code..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; it_fg_xvbap[] = xvbap[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    if not it_fg_xvbap[] is initial.&lt;/P&gt;&lt;P&gt;      read table it_fg_xvbap index 1.&lt;/P&gt;&lt;P&gt;      select * from zfreegoods into table it_zfreegoods&lt;/P&gt;&lt;P&gt;             for all entries in it_fg_xvbap&lt;/P&gt;&lt;P&gt;             where matnr eq it_fg_xvbap-matnr&lt;/P&gt;&lt;P&gt;             and zpromotype eq '04'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Check if the BOM is completely exploded for mix-match.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      if not it_zfreegoods[] is initial.&lt;/P&gt;&lt;P&gt;        loop at it_fg_xvbap.&lt;/P&gt;&lt;P&gt;          read table it_zfreegoods with key matnr = it_fg_xvbap-matnr.&lt;/P&gt;&lt;P&gt;          if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;            v_mitem1_qty = it_fg_xvbap-kwmeng.&lt;/P&gt;&lt;P&gt;            v_quantity = it_zfreegoods-quantity.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;           clear v_lines.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;           continue.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;           &amp;lt;b&amp;gt; if it_zfreegoods-matnr ne it_fg_xvbap-matnr.&lt;/P&gt;&lt;P&gt;              it_fg_xvbap-kwmeng = it_fg_xvbap-kmpmg.&lt;/P&gt;&lt;P&gt;              clear v_lines.&lt;/P&gt;&lt;P&gt;              continue.&lt;/P&gt;&lt;P&gt;            endif.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;          endif.&lt;/P&gt;&lt;P&gt;          v_lines = v_lines + 1.&lt;/P&gt;&lt;P&gt;          if it_zfreegoods-zfreemodel eq it_fg_xvbap-matnr.&lt;/P&gt;&lt;P&gt;            v_newqty = v_quantity - it_fg_xvbap-kwmeng.&lt;/P&gt;&lt;P&gt;            it_fg_xvbap-kwmeng = v_newqty.&lt;/P&gt;&lt;P&gt;            modify it_fg_xvbap.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2007 16:10:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/field-values/m-p/2055725#M424333</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-13T16:10:37Z</dc:date>
    </item>
    <item>
      <title>Re: field values</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/field-values/m-p/2055726#M424334</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;put modify statement inside the if condition also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if it_zfreegoods-matnr ne it_fg_xvbap-matnr.&lt;/P&gt;&lt;P&gt;it_fg_xvbap-kwmeng = it_fg_xvbap-kmpmg.&lt;/P&gt;&lt;P&gt;modify it_fg_xvbap. &lt;/P&gt;&lt;P&gt;clear v_lines.&lt;/P&gt;&lt;P&gt;continue.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2007 16:13:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/field-values/m-p/2055726#M424334</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-13T16:13:05Z</dc:date>
    </item>
    <item>
      <title>Re: field values</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/field-values/m-p/2055727#M424335</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;You didn't give the MODIFY statement to update the internal table..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if it_zfreegoods-matnr ne it_fg_xvbap-matnr.&lt;/P&gt;&lt;P&gt;it_fg_xvbap-kwmeng = it_fg_xvbap-kmpmg.&lt;/P&gt;&lt;P&gt;clear v_lines.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;MODIFY it_fg_xvbap transporting kwmeng.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;continue.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&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;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2007 16:13:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/field-values/m-p/2055727#M424335</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-13T16:13:25Z</dc:date>
    </item>
    <item>
      <title>Re: field values</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/field-values/m-p/2055728#M424336</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Madhu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think this code will work for ur requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
t_fg_xvbap[] = xvbap[].

if not it_fg_xvbap[] is initial.
read table it_fg_xvbap index 1.
select * from zfreegoods into table it_zfreegoods
for all entries in it_fg_xvbap
where matnr eq it_fg_xvbap-matnr
and zpromotype eq '04'.
* Check if the BOM is completely exploded for mix-match.
if not it_zfreegoods[] is initial.
loop at it_fg_xvbap.
read table it_zfreegoods with key matnr = it_fg_xvbap-matnr.
if sy-subrc eq 0.  " Check here. If sy-subrc ne 0 move the field vale and modify the "table
v_mitem1_qty = it_fg_xvbap-kwmeng.
v_quantity = it_zfreegoods-quantity.
* clear v_lines.
* continue.
if it_zfreegoods-matnr ne it_fg_xvbap-matnr.
it_fg_xvbap-kwmeng = it_fg_xvbap-kmpmg.
clear v_lines.
continue.
endif.
endif.
v_lines = v_lines + 1.

REgards,
Vasanth
if it_zfreegoods-zfreemodel eq it_fg_xvbap-matnr.
v_newqty = v_quantity - it_fg_xvbap-kwmeng.
it_fg_xvbap-kwmeng = v_newqty.
modify it_fg_xvbap. 
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2007 16:16:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/field-values/m-p/2055728#M424336</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-13T16:16:34Z</dc:date>
    </item>
  </channel>
</rss>

