<?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: Help with code in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-code/m-p/3174786#M755485</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;wk_year = sy-datum+0(4).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;concatenate '%' '%' '%' '%' wk_year into wk_year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i guess u may be fetching the vendor details first based on a plant.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"instead of * give the appropriate field names.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from ekko into table itab&lt;/P&gt;&lt;P&gt;for all entries in it_vendor&lt;/P&gt;&lt;P&gt;where bedat like wk_year&lt;/P&gt;&lt;P&gt;and lifnr = it_vendor-lifnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;sort itab ascending.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from ekko into table itab2&lt;/P&gt;&lt;P&gt;for all entries in it_vendor&lt;/P&gt;&lt;P&gt;and lifnr = it_vendor-lifnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;sort itab2 ascending.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * into itab3 from ekpo&lt;/P&gt;&lt;P&gt;for all entries in itab&lt;/P&gt;&lt;P&gt;where ebeln = itab-ebeln&lt;/P&gt;&lt;P&gt;and ebelp = itab-ebelp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;sort itab3 ascending.&lt;/P&gt;&lt;P&gt;loop at itab3.&lt;/P&gt;&lt;P&gt;if loekz &amp;lt;&amp;gt; 'L'.&lt;/P&gt;&lt;P&gt;itab3-vstatus = 'Active'.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;itab3-vstatus = 'Not Active'.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;modify itab3 transporting status.&lt;/P&gt;&lt;P&gt;clear itab3.&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;select * from ekpo into table iatb4 &lt;/P&gt;&lt;P&gt;for all entries in itab2&lt;/P&gt;&lt;P&gt;where ebeln = itab2-ebeln&lt;/P&gt;&lt;P&gt;and ebelp = itab2-ebelp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;sort itab4 ascending.&lt;/P&gt;&lt;P&gt;loop at itab4.&lt;/P&gt;&lt;P&gt;if itab4-loekz = space and itab4-elikz = space.&lt;/P&gt;&lt;P&gt;itab4-status = 'PO active'.&lt;/P&gt;&lt;P&gt;modify itab4 transporting status.&lt;/P&gt;&lt;P&gt;clear itab4.&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;last read the tables and move it to final itab.This is just like a logical pseudocode...try the rest&lt;/P&gt;&lt;P&gt;Please Try to do it ur self...the forum is for solving the problems not to do the entire requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if useful.&lt;/P&gt;&lt;P&gt;regards.&lt;/P&gt;&lt;P&gt;&lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 Dec 2007 04:23:21 GMT</pubDate>
    <dc:creator>kesavadas_thekkillath</dc:creator>
    <dc:date>2007-12-26T04:23:21Z</dc:date>
    <item>
      <title>Help with code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-code/m-p/3174785#M755484</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;Can someone help me with the code for this problem. I would like to check for a given vendor, if there is any PO placed in a financial year (i.e. 1st Jan to 31st Dec) &amp;amp; if any PO is open.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Link: LFM1-LIFNR &amp;lt;=&amp;gt; EKKO-LIFNR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Criteria for PO Placed: &lt;/P&gt;&lt;P&gt;1.Read system date &amp;amp; extract only the year part into 'S_Year' from the system date. &lt;/P&gt;&lt;P&gt;2.Read only the year part of EKKO-BEDAT into 'E_Year' &amp;amp; match with system year. (i.e. 'E_Year' same as 'S_Year').&lt;/P&gt;&lt;P&gt;3.Loop until we find a document (EKKO-EBELN) which matches the above condition&lt;/P&gt;&lt;P&gt;4.Once the document is selected check if deletion indicator (EKPO-LOEKZ) is not 'L'for all lines (EKPO-EBELP) -&amp;gt; If this condition fails, repeat step 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&amp;gt;If all condition checks are ok, display text 'Active'. &lt;/P&gt;&lt;P&gt;-&amp;gt;If not display text 'Not-Active'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Criteria for PO Open: for the given vendor &lt;/P&gt;&lt;P&gt;1. Loop &amp;amp; find a PO for the vendor for which EKPO-LOEKZ &amp;amp; EKPO-ELIKZ is initial irrespecive of the year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&amp;gt; If the 2 conditions are ok, display text 'PO Active'&lt;/P&gt;&lt;P&gt;-&amp;gt; If not display ' '&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Eg: The output which i am looking for is something like as shown below&lt;/P&gt;&lt;P&gt;Query Output:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Vendor    |  PO Status 	| Vendor Status&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;123	|   Active	                |   Active&lt;/P&gt;&lt;P&gt;245	|		|   Active&lt;/P&gt;&lt;P&gt;545	|   Active	                |   Not-Active&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope my problem is clear, await inputs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vivek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Dec 2007 03:56:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-code/m-p/3174785#M755484</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-26T03:56:06Z</dc:date>
    </item>
    <item>
      <title>Re: Help with code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-code/m-p/3174786#M755485</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;wk_year = sy-datum+0(4).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;concatenate '%' '%' '%' '%' wk_year into wk_year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i guess u may be fetching the vendor details first based on a plant.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"instead of * give the appropriate field names.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from ekko into table itab&lt;/P&gt;&lt;P&gt;for all entries in it_vendor&lt;/P&gt;&lt;P&gt;where bedat like wk_year&lt;/P&gt;&lt;P&gt;and lifnr = it_vendor-lifnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;sort itab ascending.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from ekko into table itab2&lt;/P&gt;&lt;P&gt;for all entries in it_vendor&lt;/P&gt;&lt;P&gt;and lifnr = it_vendor-lifnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;sort itab2 ascending.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * into itab3 from ekpo&lt;/P&gt;&lt;P&gt;for all entries in itab&lt;/P&gt;&lt;P&gt;where ebeln = itab-ebeln&lt;/P&gt;&lt;P&gt;and ebelp = itab-ebelp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;sort itab3 ascending.&lt;/P&gt;&lt;P&gt;loop at itab3.&lt;/P&gt;&lt;P&gt;if loekz &amp;lt;&amp;gt; 'L'.&lt;/P&gt;&lt;P&gt;itab3-vstatus = 'Active'.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;itab3-vstatus = 'Not Active'.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;modify itab3 transporting status.&lt;/P&gt;&lt;P&gt;clear itab3.&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;select * from ekpo into table iatb4 &lt;/P&gt;&lt;P&gt;for all entries in itab2&lt;/P&gt;&lt;P&gt;where ebeln = itab2-ebeln&lt;/P&gt;&lt;P&gt;and ebelp = itab2-ebelp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;sort itab4 ascending.&lt;/P&gt;&lt;P&gt;loop at itab4.&lt;/P&gt;&lt;P&gt;if itab4-loekz = space and itab4-elikz = space.&lt;/P&gt;&lt;P&gt;itab4-status = 'PO active'.&lt;/P&gt;&lt;P&gt;modify itab4 transporting status.&lt;/P&gt;&lt;P&gt;clear itab4.&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;last read the tables and move it to final itab.This is just like a logical pseudocode...try the rest&lt;/P&gt;&lt;P&gt;Please Try to do it ur self...the forum is for solving the problems not to do the entire requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if useful.&lt;/P&gt;&lt;P&gt;regards.&lt;/P&gt;&lt;P&gt;&lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Dec 2007 04:23:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-code/m-p/3174786#M755485</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2007-12-26T04:23:21Z</dc:date>
    </item>
    <item>
      <title>Re: Help with code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-code/m-p/3174787#M755486</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Mr. Keshu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you ver much for your inputs &amp;amp; apologies for having posted the entire problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vivek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Dec 2007 05:06:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-code/m-p/3174787#M755486</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-26T05:06:57Z</dc:date>
    </item>
    <item>
      <title>Re: Help with code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-code/m-p/3174788#M755487</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Dec 2007 05:09:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-code/m-p/3174788#M755487</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2007-12-26T05:09:27Z</dc:date>
    </item>
  </channel>
</rss>

