Message if duplicate material entered in purchase order

Hi All,
Is there any possibility to give a message in me21n if we enter a material which in already maintained as one line item to create PO. To issue messages in sales order there is an exit. I tried with the badi ME_PROCESS_PO_CUST. I was struck here. Please suggest me good idea how to do this.Thanks to all.
In Sales order i resolved in this way.
LOOP AT xvbap
WHERE matnr EQ vbap-matnr
AND posnr NE vbap-posnr
AND kwmeng NE 0.
MESSAGE 'Material is already on the order' type 'I'.
ENDLOOP.
ENDFORM.
Regars,
Madhu.
Edited by: madhurao123 on May 2, 2011 8:40 PM

Hi,
Try using the following code inside the method "CHECK" in BADI - "ME_PROCESS_PO_CUST".
INCLUDE mm_messages_mac.
DATA: it_po_line      TYPE TABLE OF mepoitem,
      header          TYPE          mepoheader,
      items           TYPE          purchase_order_items,
      is_po_line      TYPE          mepoitem,
      is_po_line_tmp  TYPE          mepoitem,
      line_item       TYPE          purchase_order_item,
      wrk_tabix       TYPE          sy-tabix.
header = im_header->get_data( ).
items  = im_header->get_items( ).
LOOP AT items INTO line_item.
  is_po_line = line_item-item->get_data( ).
  APPEND is_po_line TO it_po_line.
  CLEAR is_po_line.
ENDLOOP.
LOOP AT it_po_line INTO is_po_line.
  wrk_tabix = sy-tabix.
  LOOP AT it_po_line INTO is_po_line_tmp
                     FROM wrk_tabix
                     WHERE matnr EQ is_po_line-matnr.
    IF sy-subrc EQ 0.
      mmpur_message 'I' '00' '398'
                    'Material is already in the order'
                    space
                    space
                    space.
    ENDIF.
    CLEAR is_po_line_tmp.
  ENDLOOP.
  CLEAR : is_po_line,
          wrk_tabix.
ENDLOOP.
Regards,
Harish

Similar Messages

  • Message alert when Invoice date preceds Purchase order date

    Hi all,
    I want to define message alert, when Invoice date precedes Purchase order date. Is there any standard message type is there, If yes please let me know. Otherwise how can i define this, please.
    Thanks
    CS..

    Hi,
    You can take help of your abbaper and enter the validation in the user exit of MIRO thru which Invoices are booked.
    Hope this helps, if yes, please assign points.
    Regards,
    Harish

  • Can SAP get material number in Purchase order in external processing?

    I have a question that:
    As I know, Exeternal processing is a service, so that Material number can not be shown in purchase order converted from PR for external processing. Here, PR can be automately generated from transaction CO01 to create an external processing production order. Meanwhile, for external processing, purchase info record is created without material number only with material group.
    So, I want to know that if there any solutions to show material number in purchase order generated for external processing?
    thanks,
    best regards,

    If therer are no production order, How can I get finished products from internal activity and external processing?
    Now, external processing in our company like this:
    1.create an purchase info record. (type:subcontracting, with material group, but not material ID)
    2.Maintan external processing data in external operation where external processing happens.(control key: pp02, external processing data: info record, purchase org. net price, cost element etc.)
    3.create a production order for the material.(one of the operations is an external processing operation described like step 2)
    4.Purchase requstion is changed into Purchase order. (Purchase requestion is automately created with the production order)
    5.MIGO to receive goods from the purchase order.
    6.finished the production order and delivery goods.then the production order is DLV.
    In step 4, purchase order can only get the production order ID, but there are no material ID shown in it. Only method to show material is that maintaining a description text in the external operation, then, purchase order item could show material in material text(but, here, there is no material ID derectly from info record or production order).
    this is the big problem now for our company. No material ID can be automately carried into the purchase order.
    Hope you help..
    thanks...

  • Revision level not appearing in material tab of purchase order

    hi
    I have matained revision level in material master but it is not appearing in material tab of purchase order and print preview of purchase order
    regards
    Badari

    Hi, If u have created proper change no in CC01 with assigned object material with proper validity period u can give revision level to material.
    In order to reflect the current revision level on PO printout, the coding in PO print program should be designed accordingly to pick the latest revision level. PO output needs to be re-issued so that the new output can pick the latest information like PO revision level from the master.
    Refer below link also for more information,
    [Revision level in purchase order|Revision level in purchase order]

  • How can I change the material group in purchase order?

    Hello,
    I' ve changed the group of material and is not updated in the purchase order created. Is there any way you see the new material groupl in purchase order?
    Thanks,

    Sorry for the late answer.
    Jeyakanthan A's suggestion may be good in case of few items.
    You can also mass maintain purchase order material groups (EKPO-MATKL) in transaction MEMASSPO, though they are only in display mode in the purchase order transactions. If it doesn't work, you'll get a reason why.

  • Message change for invoice amount against Purchase order

    Hi Experts ,
    In MIRO , While invoice posting against a purchase order , when enter is pressed after supplying posting date amount
    Purchase order no and line item no , a message appears : downpayments against vendor xxx exists giving total amount against the vendor indicated in purchase order .
    Can message be changed and amount against that particular purchase order only be displayed instead of against vendor , because same vendor can have multiple purchase order by using any enhancement .
    Thanks
    SA

    Hi SA ,
    i think u are getting this from from ur User Exits only , trace this message based on the message No.
    in standard MIRO u wont get this kind of messages.
    regards
    Prabhu

  • Material in Service Purchase order

    Hi Experts,
    Please let me know is it possible to Enter Service and Material both in Service Purchase Order.
    My client is asking for above requirement. He wants to add Material No. also in Service po.
    If there is any possiblility. Please let me know.
    Reg,
    Ashok

    Hi,
    In standard purchase document ie NB system is allowing to add service and material both.
    but my client has a seperate document type for Service purchase order.
    When iam trying to add service and material both in this doc type system is throwing errors.
    note:
    I went to Purchase order documents types and selected the Service document type and in allowed item categories Standard doc type added.
    Later i have created service entry sheet for service and done migo for material.
    Could any one please explain whether is this the correct way.
    Reg,
    Ashok

  • Net Price - direct copy from material master into purchase order

    When purchase requistions are converted to purchase orders, currently we are maintaining Net Price manually
    before saving the purchase order. Is there a way where the standard price is copied from the material master {Accouting view} into the purchase order directly without manual entry
    If yes, Please advice

    Hi,
    1. Go to SPRO > MM > Purchasing > Authorization Management > Define Function Authorizations for Buyers > Function Authorizations: Purchase Order > Here "New Entries" and define Function Authorization Key as "01" and give description.
    OR use T. Code - OMET
    Here under "General parameters" subscreen, cctivate "Adopt PO Price" indicator and select "Enter conditions"
    In "Possible ref. objects", select "W/o reference" otherwise reference documents (for e.g. PR, RFQ, etc...) for PO creation will become mandatory.
    2. Now go to SU01 > Enter User ID > Parameters Tab > Here for Parameter ID EFB i.e. Function Authorization: Purchase Order, maintain value "01" and check in PO, PR will become mandatory for that user.
    3. Now during creation of PR in ME51N, under "Valuation" Tab, you will get option for PO Price Adoption as Net or Gross. Select as per your requirement and it will copy Price to PO.

  • Tieing material reservation with purchase order

    Hi,
         At my client site they make manual reservations to create demand and thus trigger purchase orders to replenish it. Once the PO is GRed then the manual reservations are manually deleted. This is extra work for the planners/buyers. Is there any way to automatically erase the manual reservations once the GR for the PO is done ?
    Thanks

    Hi,
    You can adopt the automatic deletion program for Reservations as follows:
    Reservations are deleted as follows:
    1. Reservation items that are completed or that are in the system longer than a certain number of days are marked for deletion by the reservations management program.
    2. If all of the items of a reservation are marked for deletion, the reservation is physically removed from the file.
    The Reservations management program RM07RVER carries out the following activities:
    - Marking items for deletion
    - Deleting reservations
    - Allowing movements for reservation items
    Marking Items for Deletion: The reservations management program sets the deletion indicator for reservation items:
    - that are completed (final issue indicator has been set)
    - whose requirement date is earlier than the date calculated by the system
    Consequently, old or unnecessary reservations that no longer represent an "actual" request are deleted (for example, because the material was withdrawn without the reservation being referenced during the goods issue posting).
    Calculating the Deletion Date: To allow the system to calculate a date for the deletion of the reservations, you must enter a base date on the selection screen. The system calculates the deletion date using the base date you enter minus a predefined number of days (in the standard SAP System: 30 days).
    Example: You enter 10. 01 as a base date. In this case, all reservation items whose requirement date is on or before 09.01 are marked for deletion.
    Deleting Reservations: If all of the items of a reservation are marked for deletion, the entire reservation is removed from the file.
    Running the Reservations Management Program :
    Choose Reservation --> Manage.
    The Reservations Management selection screen is displayed.
    Enter a range for the reservations to be processed. You can also narrow down the number of reservations to be processed by entering an account assignment as a selection criterion.
    Enter the base date:
    a.Only reservations whose base date is on or before the date entered are taken into account.
    b. Using the base date, the system calculates the date for deletion of the reservation items and the period for allowing movements.
    Select the actions to be carried out (for example, Set deletion indicator/delete reservation or Allow goods movement).
    If the 'Only completed items' indicator is set, only items that are completely issued or marked as completed are marked for deletion.
    If you run the program as a test run, you obtain a list of all reservations and reservation items with the changes to be carried out. You can make the changes by choosing List ® Save.
    If you do not run the program as a test run, the changes are carried out immediately. A log of the changes that are carried out is only issued if you selected the issue log indicator.
    Choose Program --> Execute to run the reservations management program.
    Regards,
    Narayana.

  • Material Determination in Purchase Order through EAN ( Barcode )

    Hi Experts,
    Required your valuable inputs.
    My Client has internal number range and has EAN Number in EAN Field through Barcode, Can any one help me out to know the determination of Material number through EAN. While raising a Purchase Order he wants the EAN number to enter and the EAN number should replace with internal Article number.
    Soln: Can i assign somewhere in MM? similar to VB11 in sales. Are there any Similar Condition in MM ?
    Kindly Suggest your Valuable Feedbacks.
    Best Regards
    Javeed

    Hi Rahul,
    I Have alredy maintained  EAN NO in that field long back in Material Master. My Question is how you determine the field in Creation of Purchase Order ?
    We have assigned internal number range in creation of Material Master and EAN field is also maintained. While raising a Purchase order when u give your EAN NO in the material tab the parameters related to that internal number should able to adapt there ?
    Hope u are clear with my Client Requirement ?
    Best Regards
    Javeed

  • Strange messages from SAP GTS when creating purchase orders (POs)

    Hello gurus,
    we use SAP GTS to check against sanctioned party lists (SPLs) only. We already transferred all our master data to GTS and our partners were checked okay. Now we just activated the document check in our test system. The system produces two different messages we do not quite understand:
    1. When creating a purchase order with an item without material master, the system gives the message:
    Legal Control: Custs Prod. Mast. Required
    Material
    Obviously GTS tries to find a matching material master, which naturally fails. My question is: Can I disable this check somewhere? In our case it is not important what the material is, we just want to check if our vendor is on some SPL.
    2. In some POs there is the message
    Legal Control: Partn. Function Mapping not Maintained
    Partner Function: DA
    I think I understand what the system is trying to say, but fact is, only one partner function is used in that order (VN). We do not even have a partner function u201CDAu201D in our ERPu2026
    At least in the first case, the PO is not checked against the SPL by SAP GTS, which means we would not detect if we ordered from someone on the SPL. This is not acceptable.
    Any ideas on any of those messages?
    Thanks
    Alicia

    Hello again,
    I found the solution myself:
    1. see Re: Goods receipts into GTS are blocked
    2. was a known problem solved by a patch (check OSS).
    Thanks anyway
    Alicia

  • Material description VS Purchase order Text when creating a PO

    Hi Gurus,
    When creating a PO for a specific material, I have to print a purchase order text different from the material description.
    To do this, a specific text has be added to the material master data in the tab "Purchase order Text" with the italian language maintained.
    But, when i start to create a new PO for this material, the short text that is shown is retrieved form the Material description and not from the Purchase order text that has been added before.
    How can I do to have the purchase order text shown in the PO instead of the common material description?
    Thanks in advance for your support.
    Regards,
    Valentino
    Edited by: Valentino Rosso on Sep 9, 2009 10:58 AM

    Hi Rajaram,
    thansk a lot for your answer, it has been very helpful.
    Could you please clarify me the below points?
    1) Could you please confirm me that this is the functionality of the standard SAP System? That means that in case we want to put the purchase order text in to "short text" we would need to create an ad hoc development, right?
    2) In case we print the PO with the purchase order text added for the material, is there any point where we can find this information for the material, or we will see just the material description from the Material Master Data?
    Thanks a lot for your support.
    Regards,
    Roberto

  • Error message in down payment on asset purchase order

    Hello,,
    While i am trying to make down payment request with reference to PO have asset number it is return an error message
    *Store a cost element for credit down payments
        Message no. KI165
    Diagnosis
        You posted a payment to a CO-relevant object (cost center, order, and so
        on). The payment is therefore recorded in CO.
        If a payment has no order reference, no consumption account can be
        derived. Therefore, CO posts the payment under a default cost element
        created and stored during Customizing.
        You have not yet maintained this default in the system.
    Procedure
        Maintain the default cost and revenue elements in the Implementation
        Guide under "Project System" for controlling area CA00.*
    I don`t know what is the reason for using this cost element and which type of cost elements that i can use in this issue....
    We are not use Down payment clearing account, because Our customer don`t need this account..
    Please help me ASAP
    Thanks for your cooperation
    Hussein

    Hello Hussein,
    For error message KI165,please maintanin default cost  element in OKEP.Down payments have to be posted in CO with cost   elements. In case of purchase orders (or open items in CO), the cost  element for consumption can be derived from the purchase order. Thus the  down payment in CO is posted with the consumption cost element.                                                                               
    If the  down payment does not have any reference to a purchase order, then the cost element for which the consumption will be posted is not known.  In this case, the cost element maintained with OKEP is used.                     
    The error message KI165 will occur if no cost element is maintained with  OKEP - not regarding whether the actual down payment has a reference to  a purchase order and thus will update in CO under the consumption cost element derived from the purchase order.  This is always a  source of  misunderstanding - but I hope it is clear now.                                                                               
    OKEP configuration is absolutely necessary if you do not have  a cost element assigned at the time of downpayment request creation.                                                                               
    If after maintaining the default cost element you get some other error  then please note that you would need to check the following :                                                                               
    1.Compare the configuration settings for the GL accounts that are  used for posting the cash call in EHP4 system with the system without the EHP4 support pack.               
    2.Check the controlling area settings in both the systems.        
    Regards Bernhard

  • Material Description from Purchase Order Intercompany to Outbound Delivery

    Dear.
    For a purchase order intercompany I change the material description of an item.
    I create the delivery from po using VL10D , I check the delivery but the item position is taken
    from material master and not from the purchase order changed material description.
    How can I solve this problem ?
    Thanks

    Hi
    Check tcode VTLA for NL/DL for item category NLN for instance. You must have in data transfer the subroutine '302' )Item w/o Sales Order). You have this coding:
      if not xkomdlgn-arktx is initial.
        lips-arktx = xkomdlgn-arktx.
      endif.
    Try to do this, you have a coding:
      lips-vbelv       = xkomdlgn-vbelv.
      lips-posnv      = xkomdlgn-posnv.
    where you must have the PO number and item. Search in EKPO the description and replace it in LIPS-ARKTX. For this, create your own VOFM and replace it in the settings of VTLA.
    I hope this helps you
    Regards
    Eduardo

  • Freight not to be loaded on the Material Cost in Purchase Order

    Hi,
    For Purchase Order, we want to configure a scenario where in we want the freight not to be loaded on the Material Cost.
    Where need to change in the configuration do achieve the same.
    Please guide.
    Regards,
    PK

    HI PK,
    1. New condition type to be created by copying the standard condition type FRA1/FRB1/FRC1
          New condition type ZFR1 created by copying FRA1 - M/06.Accrual flagged in this condition type same as FRA1 and Condition category of the new condition type should be Blank and maintain X-Negative value in the plus/minus field. Accrual must be flagged.
    2.New account key ZR1 created
    OLME -- >conditions -- >Define pricing Determination process -- >Define Transaction/Event keys
    3.Assign this condition type to pricing procedure - M/08 .Also assign transaction key ZR1 .
    80     1     FRA1     Freight %     70             X                              FR1
    80     2     ZRA1     Freight  in spl GL     70             X                         FRE     ZR1
    4.GL account maintained in OBYC for this new account key -ZR1
    Maintain same conditions for FRA1 and ZFR1.
    5. Goods receipt debits freight amount to separate account
    Inventory Acct -  100 Dr
    GR/IR - 100 Cr
    Frght Clr Acct - 20 Cr
    Frieght payable - 20 Dr
    6. At the time of MIRO
    Vendor - 120 cr
    GR/IR - 100 Dr
    Frght Clr actt - 20 Dr
    Hope Help U !
    Regards,
    Pardeep Malik

Maybe you are looking for