<?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: Simple ABAP Programming help needed in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/simple-abap-programming-help-needed/m-p/1546954#M248634</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanx Rich for your valuable suggestion,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Well i have tried but as I am new to abap so do not what to use and how, i am reading lot of books and materials it's taking lot of time and i need to give it tomorrow only , if u want to be sure whether i have tried it or not I am sending the code which i have tried.  please can u help confirming if code is written correctly or not.&lt;/P&gt;&lt;P&gt;For now i have i am sendinf the coding for first 3 points.plz correct me if i am wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;q.1) unable to understand you pass tomorrow's date in where condition&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) select single * from zprice into table itab_zprice where vbak-vbeln = zprice-vbeln and vbak-posnr = zprice-posnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) read table itab_zprice with key vbak-vbeln = zprice-vbeln.&lt;/P&gt;&lt;P&gt;Select * from zprice into table zprice-vbeln where zprice-netpr = new_price.&lt;/P&gt;&lt;P&gt;If  zprice-netpr NE new_price or itab_vbeln is initial.&lt;/P&gt;&lt;P&gt;	Delete from zprice.&lt;/P&gt;&lt;P&gt;        ZPRICE-VBELN = VBAP-VBELN (Contract #)&lt;/P&gt;&lt;P&gt;	ZPRICE-POSNR = VBAP-POSNR (Item #)&lt;/P&gt;&lt;P&gt;	ZPRICE-WAERK = VBAP-WAERK (Document Currency)&lt;/P&gt;&lt;P&gt;	ZPRICE-NETPR = VBAP-NETPR (Net Price)&lt;/P&gt;&lt;P&gt;	ZPRICE-MEINS = VBAP-MEINS (Item base unite of measure)&lt;/P&gt;&lt;P&gt;	ZPRICE-DATAB = Tomorrow&amp;#146;s Date (do not how to cal&lt;/P&gt;&lt;P&gt;	ZPRICE-ERDAT = sy-datum&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;Commit work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) seletc knumh datab from konh where kvewe = 'A' and kappl = 'V' and konh erdat = sy-datum and konh &amp;lt; todays's date (valid from date is in past) unable to understand&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 29 Aug 2006 19:47:01 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-08-29T19:47:01Z</dc:date>
    <item>
      <title>Simple ABAP Programming help needed</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/simple-abap-programming-help-needed/m-p/1546952#M248632</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have created LLD, but do not know how to convert it to actual coding. Please help me out in same. please help me in as much points in which you can.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;this custom table i have already created, now need to do abap programming for the points given below.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;1.  Created Custom Table named as ZPRICE &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;           Field name                  Data Element Length                           &lt;/P&gt;&lt;P&gt;  Description &lt;/P&gt;&lt;P&gt;VBELN            VBELN CHAR 10 Contract Number &lt;/P&gt;&lt;P&gt;POSNR        POSNR NUM 6 Contract Item &lt;/P&gt;&lt;P&gt;WAERK             WAERK CUKY5 Currency &lt;/P&gt;&lt;P&gt;NETPR             NETPR CURR11 Net Price &lt;/P&gt;&lt;P&gt;MEINS             MEINS UNIT3 Base Unit of Measure &lt;/P&gt;&lt;P&gt;ZEFF_DATE DATE CHAR8 Effective date &lt;/P&gt;&lt;P&gt;ZENT_DATE             DATE CHAR8 Entered Date &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1)       Update pricing for all customer menus using tomorrow&amp;#146;s date and determine the net price (VBAP.NETPR).  &lt;/P&gt;&lt;P&gt;***To create the function for update pricing within the contract, use function SD_BULK_CHANGE (function MPRF = New Pricing) as a template.  The difference would be that the function also needs to update the pricing date (VBKD.PRSDT) with tomorrow&amp;#146;s date prior to updating the pricing&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A.1) Update the pricing date:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;VBKD-PRSDT = tomorrow&amp;#146;s date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A.2) To update the price:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Part of standard function SD_BULK_CHANGE:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHEN 'MPRF'.&lt;/P&gt;&lt;P&gt;CLEAR FLAG.&lt;/P&gt;&lt;P&gt;CLEAR NEW_VBELN.&lt;/P&gt;&lt;P&gt;CLEAR PREISFINDUNG.&lt;/P&gt;&lt;P&gt;LOOP AT DOCUMENTS WHERE SELKZ NE SPACE.&lt;/P&gt;&lt;P&gt;*.... Kopfpreisfindung&lt;/P&gt;&lt;P&gt;IF DOCUMENTS-POSNR IS INITIAL.&lt;/P&gt;&lt;P&gt;PERFORM PREISFINDUNG_KOPF.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;PERFORM PREISFINDUNG_POSITION.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;*.. Falls Preisfindung auf Positionsebene, dann nochmal Sichern&lt;/P&gt;&lt;P&gt;CHECK PREISFINDUNG = 'P'.&lt;/P&gt;&lt;P&gt;*.. Sichern Beleg&lt;/P&gt;&lt;P&gt;PERFORM DOCUMENT_SAVE.&lt;/P&gt;&lt;P&gt;ENDCASE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Select line within the new ZPRICE table &lt;/P&gt;&lt;P&gt;Where VBAK.VBELN = ZPRICE.VBELN (Contract #)&lt;/P&gt;&lt;P&gt;VBAK.POSNR = ZPRICE.POSNR (Item#)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Compare net price (NETPR) for that line within the ZPRICE table to the calculated tomorrow&amp;#146;s price determined in step 1 above. If price is the same do nothing. If price has changed delete previous entry and make a new entry. If no entry is found in the ZPRICE table for a specific contract and item combination make a new entry. Populate the new entry using the following logic.&lt;/P&gt;&lt;P&gt;ZPRICE.VBELN = VBAP.VBELN (Contract #)&lt;/P&gt;&lt;P&gt;ZPRICE.POSNR = VBAP.POSNR (Item #)&lt;/P&gt;&lt;P&gt;ZPRICE. WAERK = VBAP.WAERK (Document Currency)&lt;/P&gt;&lt;P&gt;ZPRICE.NETPR = VBAP.NETPR (Net Price)&lt;/P&gt;&lt;P&gt;ZPRICE.MEINS &amp;#150; VBAP.MEINS (Item base unite of measure)&lt;/P&gt;&lt;P&gt;ZPRICE.DATAB = Tomorrow&amp;#146;s Date&lt;/P&gt;&lt;P&gt;ZPRICE.ERDAT = Today&amp;#146;s Date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) Select price condition records that were created today and have effective dates in the past&lt;/P&gt;&lt;P&gt;Select KONH.KNUMH (Condition record number)&lt;/P&gt;&lt;P&gt;KONH.DATAB (Valid-From Date)&lt;/P&gt;&lt;P&gt;Where KONH.KVEWE = &amp;#147;A&amp;#148; (Usage = Pricing)&lt;/P&gt;&lt;P&gt;KONH.KAPPL = &amp;#147;V&amp;#148; (Application = Sales/Distribution)&lt;/P&gt;&lt;P&gt;KONH.ERDAT = Today&amp;#146;s Date (Created on date)&lt;/P&gt;&lt;P&gt;KONH.DATAB &amp;lt; Today&amp;#146;s Date (Valid-From Date is in the past)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4) Select customer menu&amp;#146;s associated with the retroactive pricing condition record&lt;/P&gt;&lt;P&gt;Select VBAP.VBELN (Contract #)&lt;/P&gt;&lt;P&gt;VBAP.POSNR (Item #)&lt;/P&gt;&lt;P&gt;Where KONV.KNUMH = KONH.KNUMH (Condition record number)&lt;/P&gt;&lt;P&gt;VBAK.KNUMV = KONV.KNUMV (Document condition number)&lt;/P&gt;&lt;P&gt;VBAK.AUART = &amp;#147;ZMNU&amp;#148; (Document Type)&lt;/P&gt;&lt;P&gt;VBAP.POSNR = KONV.KPOSN (Item #)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5) Select net price for contract line item within the new ZPRICE table &lt;/P&gt;&lt;P&gt;Select ZPRICE.NETPR (Net Price)&lt;/P&gt;&lt;P&gt;Where VBAK.VBELN = ZPRICE.VBELN (Contract #)&lt;/P&gt;&lt;P&gt;VBAK.POSNR = ZPRICE.POSNR (Item#)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Determine and compare the net price of the contract line item for each previous day until the net price no longer equals the net price within the ZPRICE table. When complete, Use Function from which is used step A&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;6) Within ZPRICE table change the effective date (ZPRICE.DATAB) to the last day the price equalled ZPRICE.NETPR. In the above example the date would be 8/01/2006 since the price was different on 7/31/2006.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;7) Select all customer menu and item combinations that are associated with each customer pricing contact that have an associated output condition record in table &amp;#150; B504 (Customer Pricing Contact &amp;#150; PARNR)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select B504.PARNR (Contact #)&lt;/P&gt;&lt;P&gt;VBPA.VBELN (Contract #), &lt;/P&gt;&lt;P&gt;VBPA.POSNR (Item #)&lt;/P&gt;&lt;P&gt;Where VBPA.PARNR = B504.PARNR (Contact #)&lt;/P&gt;&lt;P&gt;VBPA.PARVW = &amp;#147;Z8&amp;#148;&lt;/P&gt;&lt;P&gt;VBAK.AUART = &amp;#147;ZMNU&amp;#148;&lt;/P&gt;&lt;P&gt;Inner Join VBAK.VBELN = VBPA.VBELN&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:"&gt;😎&lt;/span&gt; Per pricing contact determine if the price has changed for any contract and item combination assigned to that pricing contact. If price has changed, then trigger price change notification for the pricing contact.&lt;/P&gt;&lt;P&gt;&amp;amp;#61607; If at least one of the pricing contact&amp;#146;s assigned contract and item combinations within the ZPRICE table has an entry date (ZPRICE.ERDAT) equal to today&amp;#146;s date trigger the output for this pricing contact.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Aug 2006 18:47:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/simple-abap-programming-help-needed/m-p/1546952#M248632</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-29T18:47:40Z</dc:date>
    </item>
    <item>
      <title>Re: Simple ABAP Programming help needed</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/simple-abap-programming-help-needed/m-p/1546953#M248633</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The time which you spent writing this post could have been spent trying to write the program on your own first.  Have you given it a try yet?  Not many contributors here are interested in writing your programs for you, but they have no problems helping out with syntax or confusing logic, but usually only after you have tried it yourself.  You will learn more this way!  &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Aug 2006 18:53:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/simple-abap-programming-help-needed/m-p/1546953#M248633</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-08-29T18:53:56Z</dc:date>
    </item>
    <item>
      <title>Re: Simple ABAP Programming help needed</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/simple-abap-programming-help-needed/m-p/1546954#M248634</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanx Rich for your valuable suggestion,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Well i have tried but as I am new to abap so do not what to use and how, i am reading lot of books and materials it's taking lot of time and i need to give it tomorrow only , if u want to be sure whether i have tried it or not I am sending the code which i have tried.  please can u help confirming if code is written correctly or not.&lt;/P&gt;&lt;P&gt;For now i have i am sendinf the coding for first 3 points.plz correct me if i am wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;q.1) unable to understand you pass tomorrow's date in where condition&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) select single * from zprice into table itab_zprice where vbak-vbeln = zprice-vbeln and vbak-posnr = zprice-posnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) read table itab_zprice with key vbak-vbeln = zprice-vbeln.&lt;/P&gt;&lt;P&gt;Select * from zprice into table zprice-vbeln where zprice-netpr = new_price.&lt;/P&gt;&lt;P&gt;If  zprice-netpr NE new_price or itab_vbeln is initial.&lt;/P&gt;&lt;P&gt;	Delete from zprice.&lt;/P&gt;&lt;P&gt;        ZPRICE-VBELN = VBAP-VBELN (Contract #)&lt;/P&gt;&lt;P&gt;	ZPRICE-POSNR = VBAP-POSNR (Item #)&lt;/P&gt;&lt;P&gt;	ZPRICE-WAERK = VBAP-WAERK (Document Currency)&lt;/P&gt;&lt;P&gt;	ZPRICE-NETPR = VBAP-NETPR (Net Price)&lt;/P&gt;&lt;P&gt;	ZPRICE-MEINS = VBAP-MEINS (Item base unite of measure)&lt;/P&gt;&lt;P&gt;	ZPRICE-DATAB = Tomorrow&amp;#146;s Date (do not how to cal&lt;/P&gt;&lt;P&gt;	ZPRICE-ERDAT = sy-datum&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;Commit work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) seletc knumh datab from konh where kvewe = 'A' and kappl = 'V' and konh erdat = sy-datum and konh &amp;lt; todays's date (valid from date is in past) unable to understand&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Aug 2006 19:47:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/simple-abap-programming-help-needed/m-p/1546954#M248634</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-29T19:47:01Z</dc:date>
    </item>
  </channel>
</rss>

