PO header userexit

Hi All,
I have a requirement in PO , any PO for import vendor should be based on the container volume i.e., 20 ft or 40 ft . Till the container volume in cubic feet is reached the line items (different items) can be added in PO , if  the volume is equal to  the 20 ft container the PO should not allow further line items in the PO. The line items volume can be taken from the item level , but how the same is added to the PO header such that the system identifies the  total PO volume  has reached full container volume and error message should be issued.  Any user exit available for the same ?
Thanks  in advance
BS

Hi,
You can use method PROCESS_ITEM of BADI ME_PROCESS_PO_CUST. Add the volume of all line items and display error message when it exceeds the allowed volume of container.
KInd Regards,
Suneet

Similar Messages

  • VA01 Partner Header Userexit

    Hi,
    I am looking for a userexit which is triggered on the header screen of VA01/02.
    Basically my requirement is to add one more partner function on a condition.
    Please help me
    Rajiv

    Hi Rajiv,
    I think this is a Customizing and VOFM step. In SPRO, SD -> Basic Functions -> Partner Determination, make sure that ZE is setup to default. Then, in VOFM, if you want a ZE partner number to default, write up a routine to determine this.
    If I am not wrong, a copy of Routine 1 should help. You can add a line to CVBPA.
    If this helps, please remember to award the points and close the post.
    Cheers,
    Bhanu

  • PO Header Test userexit or BADI in ME21n

    Hi,
    When I create PO in ME21N,
    I want to make header text field mandaory.Which userexit or BADI I should use.
    Can anybody suggest me with simple code.
    Thanks
    kumar

    Hi KUMAR,
    Header text creation or modifications or making them mandatory, etc is part of customizing...
    You would need a customizing request for that...
    and then go to Transaction SPRO. Its the SAP Customizing Implementation Guide.
    and then drill down the following links...
    Material Management >> Purchasing >> Purchase Order >> Text for Purchase Orders >> Define Text Types for Header Texts
    you can create header texts from here...possibly u'll find a way to make the existing header text field mandatory...
    Will tell you in detail as soon as possible...till then do try this out...
    Regards,
    Radhika

  • BAdI or USEREXIT for changing data of purchase order header - ME21N

    hello all,
    I would like to ask you any way to change the field "reason for change" of the Purchase Order  header.
    I tried implementing the method PROCESS_HEADER of IF_EX_ME_PROCESS_PO_CUST
    or changing reason_code of structure ekko in user exits EXIT_SAPMM06E_006 and EXIT_SAPMM06E_006
    but it seems not to work.
    How can i do?..
    sap. v. ecc 6.0

    >
    Shiva Kumar wrote:
    > Use the user exit : EXIT_SAPMM06E_012: This is triggered on saving of a PO...and user can add validations etc in the exit...
    > Cheers
    It doesn't work...
    >
    Martin Voros wrote:
    > you get reference to object IM_HEADER in method PROCESS_HEADER of BADI ME_PROCESS_PO_CUST. On this object you can call two methods - GET_DATA and SET_DATA. GET_DATA returns structure with type MEPOHEADER. You can change your field here and then call method SET_DATA with your modified structure. This should work.
    > Cheers
    ..same thing for this solution...
    the field that i want to change is RSCOD inside structure EREVGRID...it seems to have also get_data and set_data methods ( IF_REVISION_ITEM_DCM ),
    but I don't know which BAdI to implement that has a object type ref to EREVGRID...
    Edited by: E_M on May 13, 2008 11:08 AM

  • Userexit for changing line item from header, tcode VA42, VA41

    Hi All,
    I have a Zfield (VBAK) for the sales document (contract) at the header level in Additional tab.
    Also the same zfield is present in VBAP table for all line items.
    When this field is maintained by the user using Tcode VA41 or VA42 the line item zfield should also get updated.
    I am trying to find out if User Exits
    1. USEREXIT_MOVE_FIELD_TO_VBAK
    2. USEREXIT_SAVE_DOCUMENT_PREPARE
    might work. Can anyone tell me if there is access to line items in the above 2 user exits which I can modify.
    Thanks,
    Kajal

    Hi Breakpoint,
    Yes I did use table XVBAP in uesr exit SAVE_DOCUMENT_PREPARE.
    But somehow my changed values in XVBAP table is not reflected in the table VBAP.
    Am I missing something here.
    My piece od code  in the user exit :
    FORM XVBAP_ZZREBREL_CHANGE  TABLES t_xvbap STRUCTURE vbapvb
                               USING  P_VBAK_ZZREBREL TYPE vbak-zzrebrel.
    data wa_xvbap type vbapvb.
      IF p_vbak_zzrebrel = 'X'.
        LOOP AT t_xvbap into wa_xvbap.
          wa_xvbap-zzrebrel = 'X'.
          MODIFY t_xvbap from wa_xvbap INDEX sy-tabix TRANSPORTING zzrebrel.
          clear wa_xvbap.
        ENDLOOP.
      ENDIF.
    ENDFORM.

  • BADI/Userexit for header text in Purchase order

    Hi Experts,
    i had a scenario , in that when i create a sales order , a purhcase requisiona and purchase order will also generate automatically.
    in this case how to copy the header text of sales order to PR and PO.
    is there any BADI or User Exit for this..
    Pls help me.
    Thanks ,
    Chandra

    Hello Chandra
    Assuming that you are working on ERP 6.0 (Do we know???) then the BAdIs are:
    ME_PROCESS_REQ_CUST
    ME_PROCESS_PO_CUST
    Regards
      Uwe

  • Free goods by header net value not Quantity

    Regards
    My client wants to make a sales promotions as the free goods SD. The difference is that free goods should not be given by the bought quantity of certain material, they should be given from the header net value of an order.
    For example:
    If a customer have an order with header net value of 100$ from only materials that has certain material pricin group, it should receive one free good.( All the materials in the order have the same material pricing group)
    If a customer have an order with header net value of 200$ from only materials that has certain material pricin group, it should receive two free goods.
    If there are ways to make this happen please let me know i would really appreciate it.
    Thanks
    Edited by: Ronald Caroli on Feb 13, 2008 9:13 PM

    Hi ronald,
    The userexit option is very tough to do.
    You are using a right userexit, but how are you coding it? Whats your design and flow?
    The BDC are programmable recordings of a standard transaction. Hence you will be able to record the way in which you add a line item to sales order. Ths recording is automatically converted into lines of code by SAP. Then you insert your checks and balances between these lines of code to make it behave the way you want the sequence of transactions to work.
    My thought was to make a recording of adding a new line item, in change sales order transaction(va02), with item category as Free of Charge(FOC). Then in the code, I wanted to check for material pricing group, if found correct, then would go finding the net value of sales document. If the value is above the limit, calculate the target quantity. Then follow the rest of the recording and add a new line with FOC as item category.
    But this was a seperate transaction, which could be applied seperately and not to be done automatically in sales order. This was becuase say if you switch off the promotion tomorrow, then you will not have to worry abt removing the same functionality from sales order, you just need to de-activate the transaction.
    Then there would be issues of doing hardcoding the net value limits, free good quantity in the user exit which is not at all recommended.
    Hope this helps.
    Abhishek

  • Billing Doc-Header-Texts copy Accounting Doc-Hader Texts?

    Dear gurus,
    I it possible to copy Billing Doc.-header- Text1 to
    Accounting Document>>>>>>"Doc. Header Text" field?

    Hello,
    the SAP note 301077 lists the available userexits in SD/FI interface.
    If, for example, you want to fill a BSEG field of customer line, userexit EXIT_SAPLV60B_002 is the good one.
    Instead if you want to fill a BSEG field of a G/L line, userexit EXIT_SAPLV60B_004 is the good one.
    Best regards,
    Ivano.

  • How to Carry out New Pricing in Sales Order userexit

    Hello,
    In userexit save_document_prepare of program MV45AFZZ, I'm adding an entry in XKOMV for a header pricing condition ZD01.  After saving, if I go back into the order and go directly into the line item conditions, the ZD01 does not exists at the item level.  If I navigate the the header conditions and then go back to the items, ZD01 appears as it should.  I believe what is happening is that the header condition is not being distributed to the line items unless New Pricing is carried out.  If I manually enter the ZD01 condiiton instead of relying on the userexit code, everything works fine.  The header condition is properly distributed to the line items.  Therefore, I believe the configuration is correct.  My question is, "How can I programatically trigger New Pricing from a sales order userexit".  Is this possible in SAVE_DOCUMENT_PREPARE or do I need to do it somewhere else.".
    Thank you,

    this problem has been resolved.  The problem was that I was appending the header condition to XKOMV instead of inserting the header condition as the first line in the table.  SAP will carry out the new pricing if the header condition is on the first line.

  • BADI/User Exit suggestion - for determining Partner in PO header

    Hi All,
    I want to be able to automatically populate and determine a manual partner function within the header of a purchase order creation.
    Example, when PO is allocated against account assignment 'P' then go to the WBS element assigned and retrieve the specific partner number for partner function type XX. Then populate this into the relevant header partner function of the PO.
    Any ideas of which BADI/User exit could be used in ME21N?
    Thanks
    Steve

    Hi Steve
    Before going to search the UserExit/BADI, please remember your account assignment will be at item level and the partner will be at Header level.If you have number of line items with different account asssginments or different WBS elements under account assignment P, it is difficult to determine the partner functional at Header level.Please think on how can you build logic? There are number of BADI/Exits available for Purchase order.
    Regards
    Ramakrishna

  • Default text is populated in header text while creating PO.

    Hi All,
             Can someone help me with some inputs on this issue.
    1) <b> A particular PO header text is appearing by default when we click on Long Text tab and coming back in the TCode ME21.</b>
    2)  Irrespective of the organization details, Vendor or Material etc. for any PO these texts are appearing.
    3) The path for example :
           Test Example –  Enter some PO no. (4502756226),                               Goto Header ->Texts -> Texts  Overview -> Header Text (Long Text Tab),<---This is where the defualt text is appearing.
    4) Imp Note: These texts are appearing ONLY while creation of the PO, but when in Change (ME22) and in display (ME23) not appearing.
    Could someone help me out on this.
    My steps this far:
    1) I tried finding if there is any userexit. I found that all the include files of all the userexits were empty.
    2) Kindly suggest me if there any other way to search a solution for this.

    Krishna Hi,
                   Thanks!!!
                   Tried navigating through  MM>Purchasing>Purchase order>Texts for PO>Define copying rules for header texts.
                  These are meant for coying the header texts right?
                  I unchecked the box there and the default header text still appears.
                  Tell me if i erred somewhere in the above steps you had told.
                 In the meantime..am also trying to hunt down on the FM "read_text" that
                 probably is triggering the defualt text to get copied.
                 Your answer helped me look at the problem from a diff perspective.
                  Thanks Krishna.
    Regards,
    Thejas

  • Default text populated in header text while creating PO.

    Hi All,
    Can someone help me with some inputs on this issue.
    <b>1) A particular PO header text is appearing by default when we click on Long Text tab and coming back in the TCode ME21.</b>
    2) Irrespective of the organization details, Vendor or Material etc. for any PO these texts are appearing.
    3) The path for example :
    Test Example – Enter some PO no. (4502756226), Goto Header ->Texts -> Texts Overview -> Header Text (Long Text Tab),<---This is where the defualt text is appearing.
    4) Imp Note: These texts are appearing ONLY while creation of the PO, but when in Change (ME22) and in display (ME23) not appearing.
    Could someone help me out on this.
    My steps this far:
    1) I tried finding if there is any userexit. I found that all the include files of all the userexits were empty.
    2) Kindly suggest me if there any other way to search a solution for this.
    Regards,
    Thejas.

    Thanks Sanjay,
    Like you said that info is available on the clipboard.
    And again....that text has to be copied from somewhere whenever
                           a new PO is being created..and there should be a FM that picks
                           that text.
                          *Am going forward with your input..
                           and in addition to  that ...
                           theres a  FM "<b>read_text</b>" which is used to print header data 
                           that is copied on the clip board like you mentioned.
                          *I still have to reach the root cause of this.Thanks for helping me
                           through.
    Regards,
    Thejas

  • Unable to set header status - VBUK-UVALL in USEREXIT_SAVE_DOCUMENT_PREPARE

    Hi,
    I need some advice in setting header status in table VBUK field UVALL in user exit MV45AFZZ - USEREXIT_SAVE_DOCUMENT_PREPARE. I am unable to set this field in this userexit.
    I create an enhancement implementation in user exit USEREXIT_SAVE_DOCUMENT_PREPARE in MV45AFZZ. In my enhancement code, I have a perform statement which is in a Z include program. In my perform statement, I check a condition, if the line item text is not populated, then  I would like to set XVBUK-UVALS to B. In the code, I set the fields as follow :
    XVBUK-UVALS = 'B'
    XVBUK-UPDKZ = 'U'.
    After the sales order is saved, when I checked in table VBUK-UVALS, the field is not updated.
    Could anyone please provide me with some advice on how I could set the status in VBUK-UVALS in the user exit ? Should I be using another user exit ?
    Any advice would be much appreciated.
    Thanks,
    Virginia

    Hi,
    Similiar to the statements given by you add following statements.
    VBUK-UVALS = 'B'
    VBUK-UPDKZ = 'U'.
    Regards
    Vinod

  • Userexit for PO Creation (ME21N)

    Hi All,
    The need is to code an userexit in ME21N to fetch TEXTS ( like BOM Header Text ) and populate the same onto the PO. This Userexit should fire as the user keys in the LINE ITEMS on a PO and HITS ENTER. The exit will check the entry and display error messages if need be.
    If anyone has done such a thing before please do let me know.
    Thanks in advance,
    RK

    Hi Ravi
    Use trx SE19 to implement your BADI: create an ZME_PROCESS_PO_CUST using ME_PROCESS_PO_CUST as definition.
    Now in Interface Tabs you can see the METHODs you can use as "user-exit", in particular there's PROCESS_ITEM to manage items data.
    You have to write your code into this method.
    This method has IM_ITEM like parameter in its interface, and it's like the type IF_PURCHASE_ORDER_ITEM_MM.
    This type has the method IF_LONGTEXTS_MM~SET_TEXT, you can try to use it to set your text in item.
    This is code for example:
    DATA: TLINE TYPE MMPUR_T_TEXTLINES.
    CALL METHOD IM_ITEM->IF_LONGTEXTS_MM~SET_TEXT
               EXPORTING
                 IM_TDID      = <YOUR ID>
                 IM_TEXTLINES = TLINE. 
    So you should read the text you want to copy and pass it to TLINE.
    You can use the METHOD PROCESS_HEADER to read the text you need. This METHOD has IM_HEADER as parameter and it's like the type IF_PURCHASE_ORDER_MM, this type has the method IF_LONGTEXTS_MM~GET_TEXT to read header logn text.
    Anyway while you're in implementation of the BADI go to:
    GoTo->Sample Code
    Here you can try an example how to implement the method you need to use.   
    Max
    Message was edited by: max bianchi

  • Sales order Payment term modify Userexit

    Hi Experts,
                    I am working on sales order VBKD modify userexit, in this based on customer, customer group & one maintained z field from MARA they created Ztable to pick Payment term.
    For line item which doesn't have payment term (KONP-ZTERM) at condition record (XKOMV), I have to pick from Ztable & update header payment term (line item 000000).
    This was working fine but problem arise for couple of material, inside userexit when line item is coming XKOMV is not filled inside userexit. when this should possible?
    Points will be rewarded.
    Thanks,

    When the payment term is changed in the Sales Order level it DOES NOT change the BP's default payment terms.
    Ans 2: only for the present Order
    Ans 4: The payment term setting at the order level is only for exception where someone authorized can change it at the order level.  If you prefer not to let the user change the payment term at the Sales Order level then you can manage this through Authorizations
    Nothing at the document level will change the MASTER.  Only changes made at the Master level are permanent from that point on.

Maybe you are looking for

  • [Solved] Issue installing wine from the official repositories.

    I'm trying to install wine, but upon running  $ sudo pacman -S wine it returns error: target not found wine and If I try PlayOnLinux with $ sudo pacman -S playonlinux it returns warning, cannot resolve "wine", a dependency of playonlinux Wine should

  • Starting Servlet at Server Startup

    Hi all!           We are desperately trying to initialize a servlet at weblogic 5.1           startup.           When simply registering the servlet it works well.           Now we tried to set up autostart for the servlet according to the docs      

  • ORA-6571 ERROR (PACKAGE PRAGMA의 사용)

    제품 : SQL*PLUS 작성날짜 : 1997-06-03 * ORA-6571 Error ( Package Pragma 의 사용 ) ============================================= SQL문 안에서 Stored function을 call하여 사용하는 경우 ORA-6571 error가 발생할 수 있습니다. 기본적으로 stored function이나 procedure, package에서의 DML 문장의 사용은 보장이

  • 3rd post plz help

    I am having a problems with dynamic text fields and strings... For some reason the content in the dynamic text field doesn't update when I modify the XML file? Has anyone come across this before?

  • Issues starting ECC 6.0 instance after changing passwords everywhere

    Hello everyone. I've had this problem for 2 weeks now. I tried all the solutions i found on the web but still my problem persists. 2 weeks ago, I changed alle the passwords for the MaxDB Users (control, superdba, sap<sid>, etc) because we lost these