<?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 select field from CAUFVD in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-field-from-caufvd/m-p/2068720#M428259</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;I want tp put a logic in the below program. In the below code I have used &amp;#147; menge &amp;#147; in mseg table for &amp;#145;Work in progress &amp;#145; . But now I want to use the structure CAUFVD-GAMNG for the calculation .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It&amp;#146;s like WIP[Work in progress ] = ( CAUFVD-GAMNG ) - ( CAUFVD-GWEMG ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please tell how I will have my approach to the below code. One more thing When I am debugging the below code it&amp;#146;s telling me that there is an error in TAB_ROPFILE-DISPO in r_dispo. Means we can&amp;#146;t use the command while using the select for all entries . Please guide me in this issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at i_tab.&lt;/P&gt;&lt;P&gt;if i_tab -dispo in r_dispo.&lt;/P&gt;&lt;P&gt;move-corresponding i_tab to i_tab 1.&lt;/P&gt;&lt;P&gt;append i_tab 1.&lt;/P&gt;&lt;P&gt;clear i_tab 1.&lt;/P&gt;&lt;P&gt;endif.&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 not i_tab [] is initial.&lt;/P&gt;&lt;P&gt;select menge matnr aufnr from mseg&lt;/P&gt;&lt;P&gt;into corresponding fields of table i_workip&lt;/P&gt;&lt;P&gt;for all entries in TAB_ROPFILE&lt;/P&gt;&lt;P&gt;where aufnr = i_tab -PONUM&lt;/P&gt;&lt;P&gt;and matnr = i_tab -MATNR&lt;/P&gt;&lt;P&gt;and bwart = C_MT.&lt;/P&gt;&lt;P&gt;and i_tab -DISPO in r_dispo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort i_workip by aufnr matnr menge.&lt;/P&gt;&lt;P&gt;loop at i_workip.&lt;/P&gt;&lt;P&gt;move-corresponding i_workip to wa_workip.&lt;/P&gt;&lt;P&gt;at end of matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum.&lt;/P&gt;&lt;P&gt;wa_workip-menge = i_workip-menge.&lt;/P&gt;&lt;P&gt;move-corresponding wa_workip to i_wip.&lt;/P&gt;&lt;P&gt;append i_wip.&lt;/P&gt;&lt;P&gt;clear i_wip.&lt;/P&gt;&lt;P&gt;endat.&lt;/P&gt;&lt;P&gt;endloop.&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;LOOP AT i_tab.&lt;/P&gt;&lt;P&gt;Read table i_wip&lt;/P&gt;&lt;P&gt;with key aufnr = i_tab -PONUM&lt;/P&gt;&lt;P&gt;matnr = i_tab -matnr binary search.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i_tab -WIPmenge = i_tab -psmng - i_wip-menge.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;modify i_tab transporting wipmenge hsdat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sabya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 26 Mar 2007 13:20:05 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-03-26T13:20:05Z</dc:date>
    <item>
      <title>select field from CAUFVD</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-field-from-caufvd/m-p/2068720#M428259</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;I want tp put a logic in the below program. In the below code I have used &amp;#147; menge &amp;#147; in mseg table for &amp;#145;Work in progress &amp;#145; . But now I want to use the structure CAUFVD-GAMNG for the calculation .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It&amp;#146;s like WIP[Work in progress ] = ( CAUFVD-GAMNG ) - ( CAUFVD-GWEMG ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please tell how I will have my approach to the below code. One more thing When I am debugging the below code it&amp;#146;s telling me that there is an error in TAB_ROPFILE-DISPO in r_dispo. Means we can&amp;#146;t use the command while using the select for all entries . Please guide me in this issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at i_tab.&lt;/P&gt;&lt;P&gt;if i_tab -dispo in r_dispo.&lt;/P&gt;&lt;P&gt;move-corresponding i_tab to i_tab 1.&lt;/P&gt;&lt;P&gt;append i_tab 1.&lt;/P&gt;&lt;P&gt;clear i_tab 1.&lt;/P&gt;&lt;P&gt;endif.&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 not i_tab [] is initial.&lt;/P&gt;&lt;P&gt;select menge matnr aufnr from mseg&lt;/P&gt;&lt;P&gt;into corresponding fields of table i_workip&lt;/P&gt;&lt;P&gt;for all entries in TAB_ROPFILE&lt;/P&gt;&lt;P&gt;where aufnr = i_tab -PONUM&lt;/P&gt;&lt;P&gt;and matnr = i_tab -MATNR&lt;/P&gt;&lt;P&gt;and bwart = C_MT.&lt;/P&gt;&lt;P&gt;and i_tab -DISPO in r_dispo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort i_workip by aufnr matnr menge.&lt;/P&gt;&lt;P&gt;loop at i_workip.&lt;/P&gt;&lt;P&gt;move-corresponding i_workip to wa_workip.&lt;/P&gt;&lt;P&gt;at end of matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum.&lt;/P&gt;&lt;P&gt;wa_workip-menge = i_workip-menge.&lt;/P&gt;&lt;P&gt;move-corresponding wa_workip to i_wip.&lt;/P&gt;&lt;P&gt;append i_wip.&lt;/P&gt;&lt;P&gt;clear i_wip.&lt;/P&gt;&lt;P&gt;endat.&lt;/P&gt;&lt;P&gt;endloop.&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;LOOP AT i_tab.&lt;/P&gt;&lt;P&gt;Read table i_wip&lt;/P&gt;&lt;P&gt;with key aufnr = i_tab -PONUM&lt;/P&gt;&lt;P&gt;matnr = i_tab -matnr binary search.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i_tab -WIPmenge = i_tab -psmng - i_wip-menge.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;modify i_tab transporting wipmenge hsdat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sabya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Mar 2007 13:20:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-field-from-caufvd/m-p/2068720#M428259</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-26T13:20:05Z</dc:date>
    </item>
    <item>
      <title>Re: select field from CAUFVD</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-field-from-caufvd/m-p/2068721#M428260</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sabyasachi ,&lt;/P&gt;&lt;P&gt;WIll give comments aginst each changes. If you feel helpful reward points.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;You can use Where conditionin loop instead of IF statement.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*Even Better will be Move all the table value into another internal table and delete &lt;/P&gt;&lt;P&gt;*ot in ranges.&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;i_tab1[] = i_tab[].&lt;/P&gt;&lt;P&gt;Delete i_itab1 where dispo not in r_dispo .&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;This is will have better Performance than other logic.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&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;&lt;/P&gt;&lt;P&gt;loop at i_tab.&lt;/P&gt;&lt;P&gt;if i_tab -dispo in r_dispo.&lt;/P&gt;&lt;P&gt;move-corresponding i_tab to i_tab 1.&lt;/P&gt;&lt;P&gt;append i_tab 1.&lt;/P&gt;&lt;P&gt;clear i_tab 1.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endloop.&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Change the Order fields you used in select Query&lt;/P&gt;&lt;/LI&gt;&lt;/UL&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;select menge matnr aufnr from mseg&lt;/P&gt;&lt;P&gt;into corresponding fields of table i_workip&lt;/P&gt;&lt;P&gt;for all entries in i_tab&lt;/P&gt;&lt;P&gt;where aufnr = i_tab -PONUM&lt;/P&gt;&lt;P&gt;and matnr = i_tab -MATNR&lt;/P&gt;&lt;P&gt;and bwart = C_MT.&lt;/P&gt;&lt;P&gt;and DISPO in r_dispo.   " and dispo = i_tab-dispo.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Either you can use the Range OR For all entries table entry.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&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;if not i_tab [] is initial.&lt;/P&gt;&lt;P&gt;select menge matnr aufnr from mseg&lt;/P&gt;&lt;P&gt;into corresponding fields of table i_workip&lt;/P&gt;&lt;P&gt;for all entries in TAB_ROPFILE&lt;/P&gt;&lt;P&gt;where aufnr = i_tab -PONUM&lt;/P&gt;&lt;P&gt;and matnr = i_tab -MATNR&lt;/P&gt;&lt;P&gt;and bwart = C_MT.&lt;/P&gt;&lt;P&gt;and i_tab -DISPO in r_dispo.&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Always sort the internal table with key before you read with Binary Serach&lt;/P&gt;&lt;/LI&gt;&lt;/UL&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;sort i_workip by aufnr matnr menge.&lt;/P&gt;&lt;P&gt;loop at i_workip.&lt;/P&gt;&lt;P&gt;move-corresponding i_workip to wa_workip.&lt;/P&gt;&lt;P&gt;at end of matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum.&lt;/P&gt;&lt;P&gt;wa_workip-menge = i_workip-menge.&lt;/P&gt;&lt;P&gt;move-corresponding wa_workip to i_wip.&lt;/P&gt;&lt;P&gt;append i_wip.&lt;/P&gt;&lt;P&gt;clear i_wip.&lt;/P&gt;&lt;P&gt;endat.&lt;/P&gt;&lt;P&gt;endloop.&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;LOOP AT i_tab.&lt;/P&gt;&lt;P&gt;Read table i_wip&lt;/P&gt;&lt;P&gt;with key aufnr = i_tab -PONUM&lt;/P&gt;&lt;P&gt;matnr = i_tab -matnr binary search.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i_tab -WIPmenge = i_tab -psmng - i_wip-menge.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;modify i_tab transporting wipmenge hsdat.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Mar 2007 06:07:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-field-from-caufvd/m-p/2068721#M428260</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-27T06:07:33Z</dc:date>
    </item>
    <item>
      <title>Re: select field from CAUFVD</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-field-from-caufvd/m-p/2068722#M428261</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The logic you wrote is CORRECT...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Follow the same...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Mar 2007 13:19:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-field-from-caufvd/m-p/2068722#M428261</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-27T13:19:33Z</dc:date>
    </item>
  </channel>
</rss>

