<?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 Adding new line item while save in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/adding-new-line-item-while-save/m-p/7032561#M1499606</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; use an implementation of BADI  ME_PROCESS_REQ_CUST in the MM-Purchase-Requisition, method IF_EX_ME_PROCESS_REQ_CUST~POST while save.&lt;/P&gt;&lt;P&gt;based on the line items available(USER ENTERED) i have to add few more line items based on the account assignment category and quantity while save.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to create new line items (copying the existing line item and change the quantity ) and save the requestion with the additional line items. I used this code. while calling the method CRETE_ITEM  create based on the object REF_ITEM  in the MY_STATE.&lt;/P&gt;&lt;P&gt;the REF_ITEM object is Initial . so while creation the empty object is created.&lt;/P&gt;&lt;P&gt;kindly help to give tips/details  to handle.&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-------------------------------------------------------------------------------" /&gt;&lt;P&gt;Coding:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: l_item_list TYPE MMPUR_REQUISITION_ITEMS,&lt;/P&gt;&lt;P&gt;l_item TYPE MMPUR_REQUISITION_ITEM,&lt;/P&gt;&lt;P&gt;l_item_akt TYPE mereq_item, &lt;/P&gt;&lt;P&gt;l_item_ref TYPE ref to IF_PURCHASE_REQUISITION_ITEM. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;l_item_list = im_header-&amp;gt;get_items().&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at l_item_list into l_item.&lt;/P&gt;&lt;P&gt;l_item_akt = l_item-item-&amp;gt;get_data( ).&lt;/P&gt;&lt;P&gt;IF l_item_akt-MENGE &amp;gt; 1 AND&lt;/P&gt;&lt;P&gt;       l_item_akt -KNTTP = 'A'.&lt;/P&gt;&lt;P&gt;      DO l_item_akt -MENGE TIMES.&lt;/P&gt;&lt;P&gt;         l_item-item= IM_HEADER-&amp;gt;CREATE_ITEM( IM_ITEM =  l_item-item).&lt;/P&gt;&lt;P&gt;        INSERT  l_item INTO TABLE IT_ITEMS_list.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;%%%%%  here i checked useing    get data  method  i am not getting any data other than relesing procedure data&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I used SET_DATA method to set the data. even I am not getting data.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&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;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-------------------------------------------------------------------------------" /&gt;&lt;P&gt;(Debugging the code, I manage by doubleclicking while create Item  method the fieldcontent of l_item (e.g &lt;SPAN __jive_macro_name="O"&gt;&lt;/SPAN&gt;) to show the content of the class-attribute my_state. This works only if the field &amp;#147;Interface&amp;#148; in the Debugger is empty because then I see the attributes of the class. If the field Interface is filled with &amp;#147;IF_PURCHASE_REQUISITION_ITEM&amp;#148;, there aren&amp;#146;t any attributes shown.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance for your kind help!!&lt;/P&gt;&lt;P&gt;Nicole&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 18 Jun 2010 19:15:12 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-06-18T19:15:12Z</dc:date>
    <item>
      <title>Adding new line item while save</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/adding-new-line-item-while-save/m-p/7032561#M1499606</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; use an implementation of BADI  ME_PROCESS_REQ_CUST in the MM-Purchase-Requisition, method IF_EX_ME_PROCESS_REQ_CUST~POST while save.&lt;/P&gt;&lt;P&gt;based on the line items available(USER ENTERED) i have to add few more line items based on the account assignment category and quantity while save.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to create new line items (copying the existing line item and change the quantity ) and save the requestion with the additional line items. I used this code. while calling the method CRETE_ITEM  create based on the object REF_ITEM  in the MY_STATE.&lt;/P&gt;&lt;P&gt;the REF_ITEM object is Initial . so while creation the empty object is created.&lt;/P&gt;&lt;P&gt;kindly help to give tips/details  to handle.&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-------------------------------------------------------------------------------" /&gt;&lt;P&gt;Coding:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: l_item_list TYPE MMPUR_REQUISITION_ITEMS,&lt;/P&gt;&lt;P&gt;l_item TYPE MMPUR_REQUISITION_ITEM,&lt;/P&gt;&lt;P&gt;l_item_akt TYPE mereq_item, &lt;/P&gt;&lt;P&gt;l_item_ref TYPE ref to IF_PURCHASE_REQUISITION_ITEM. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;l_item_list = im_header-&amp;gt;get_items().&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at l_item_list into l_item.&lt;/P&gt;&lt;P&gt;l_item_akt = l_item-item-&amp;gt;get_data( ).&lt;/P&gt;&lt;P&gt;IF l_item_akt-MENGE &amp;gt; 1 AND&lt;/P&gt;&lt;P&gt;       l_item_akt -KNTTP = 'A'.&lt;/P&gt;&lt;P&gt;      DO l_item_akt -MENGE TIMES.&lt;/P&gt;&lt;P&gt;         l_item-item= IM_HEADER-&amp;gt;CREATE_ITEM( IM_ITEM =  l_item-item).&lt;/P&gt;&lt;P&gt;        INSERT  l_item INTO TABLE IT_ITEMS_list.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;%%%%%  here i checked useing    get data  method  i am not getting any data other than relesing procedure data&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I used SET_DATA method to set the data. even I am not getting data.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&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;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-------------------------------------------------------------------------------" /&gt;&lt;P&gt;(Debugging the code, I manage by doubleclicking while create Item  method the fieldcontent of l_item (e.g &lt;SPAN __jive_macro_name="O"&gt;&lt;/SPAN&gt;) to show the content of the class-attribute my_state. This works only if the field &amp;#147;Interface&amp;#148; in the Debugger is empty because then I see the attributes of the class. If the field Interface is filled with &amp;#147;IF_PURCHASE_REQUISITION_ITEM&amp;#148;, there aren&amp;#146;t any attributes shown.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance for your kind help!!&lt;/P&gt;&lt;P&gt;Nicole&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jun 2010 19:15:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/adding-new-line-item-while-save/m-p/7032561#M1499606</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-06-18T19:15:12Z</dc:date>
    </item>
    <item>
      <title>Re: Adding new line item while save</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/adding-new-line-item-while-save/m-p/7032562#M1499607</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I searched sdn and found this not possible.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jun 2010 19:14:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/adding-new-line-item-while-save/m-p/7032562#M1499607</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-06-21T19:14:19Z</dc:date>
    </item>
  </channel>
</rss>

