Need a BADI for Manipulating Purchase Order Payment Terms?

Anybody know of one? We are on 4.6C....Thank-You.

Hello Sudheer,
This would be great only I do not see "Call method cl_exithandler=>get_class_name_by_interface " to put a break point in the GET_INSTANCE Code....below. Also, I only see one Method in cl_exithandler and it is GET_INSTANCE. I would really like to do what you say but can't figure out where to pit the breakpoint........Thank-You
METHOD get_instance.
  CLASS cl_abap_typedescr DEFINITION LOAD.
  DATA: exit TYPE REF TO object,
        temp TYPE abap_abstypename,
        int_ref TYPE REF TO cl_abap_refdescr,
        type_ref TYPE REF TO cl_abap_typedescr,
        interface TYPE seoitfname,
        exit_name TYPE exit_def,
        clskey TYPE seoclskey,
        mult TYPE seex_boolean,
        subrc LIKE sy-subrc,
        abs_type_classname TYPE string.
The absolte type name of the changing parameter instance
is got via dynamic describe
  CALL METHOD cl_abap_typedescr=>describe_by_data
         EXPORTING
                   p_data       = instance
         RECEIVING
                   p_descr_ref  = type_ref.
  IF type_ref->type_kind NE type_ref->typekind_oref.
    RAISE no_reference.
  ENDIF.
  CATCH SYSTEM-EXCEPTIONS others = 1.
    int_ref ?= type_ref.
  ENDCATCH.
  IF sy-subrc = 1.
    RAISE no_reference.
  ENDIF.
  CALL METHOD int_ref->get_referenced_type
        RECEIVING
            p_descr_ref = type_ref.
  IF type_ref->type_kind NE type_ref->typekind_intf OR
     type_ref->absolute_name NS '\INTERFACE='.
    RAISE no_interface_reference.
  ENDIF.
Get the interface name by the absolute type name
  SPLIT type_ref->absolute_name AT '=' INTO temp interface.
Get the exit_name for the interface name
  SELECT exit_name FROM sxs_inter INTO exit_name
           WHERE inter_name = interface.
    EXIT.
  ENDSELECT.
  IF sy-subrc = 4.
    RAISE data_incons_in_exit_managem.
  ENDIF.
Get the name of the exit class
  CALL FUNCTION 'SXV_GET_CLIF_BY_NAME'
       EXPORTING
            name   = exit_name
            prefix = seex_exit_class_prefix
       IMPORTING
            clif   = clskey-clsname.
  CONCATENATE '\CLASS=' clskey-clsname INTO abs_type_classname.
Is the given instance initial?
  IF NOT instance IS INITIAL.
    CALL METHOD cl_abap_typedescr=>describe_by_object_ref
           EXPORTING
                     p_object_ref = instance
           RECEIVING
                     p_descr_ref  = type_ref.
    CHECK type_ref->absolute_name NE abs_type_classname.
  ENDIF.
check how many implementations exist for an exit
  CALL FUNCTION 'SXC_ACT_IMPS_PER_FLT_VAL'
       EXPORTING
            exit_name                = exit_name
       EXCEPTIONS
            multiply_active          = 1
            no_active_implementation = 2
            OTHERS                   = 3.
  subrc = sy-subrc.
  IF subrc = 1.
there are more than one active implementations
read the properties of the exit
    SELECT SINGLE mltp_use FROM sxs_attr INTO mult
                  WHERE exit_name = exit_name.
    IF sy-subrc = 4.
      RAISE data_incons_in_exit_managem.
    ELSEIF mult = seex_false.          " singular exit
      RAISE single_exit_multiply_active.
    ENDIF.
  ENDIF.
act_imp_existing
  IF subrc = 2.
    act_imp_existing = seex_false.
  ELSE.
    act_imp_existing = seex_true.
  ENDIF.
ok, then do your job
  CREATE OBJECT exit TYPE (abs_type_classname).
  CATCH SYSTEM-EXCEPTIONS move_cast_error = 1.
    instance ?= exit.
  ENDCATCH.
  IF sy-subrc = 1.
    RAISE cast_error.
  ENDIF.

Similar Messages

  • User-Exit OR a BAdi for the Purchase order create.

    Hi,
    I am looking for a User-Exit or a BAdi which is fired when the Purchase order is being created in the SRM server via Web template. The requirement is as follows:
    There is a flag(Check box) at the the item level, Basic Data tab. This flag is called as Unlimited Overdelivery Allowed. It is with the tolerances field. Now I want this flag to be always set for a PO of a material of certain type.
    Can anyone tell me which User-Exit OR Badi I should use to always set this flag?
    The Technical field name is UNLIMITED.
    I tried a lot but could not get any.
    Regards,
    Deepak.

    Hi Deepak,
      Did you try doc_change badi? THis badi is available in all the bus objects.
    thanks,
    Ashwin

  • User exit/BADI for updating Purchase Order Item

    I am would like to update the purchase order item - specifically field EKPO-REPOS in a user exit or BADI. I haven't been able to find one that allows you to update the purchase order item.
    Any input would be appreciated.
    Derick

    You can use BADI ME_PROCESS_PO_CUST for you requirement
    Method PROCESS_ITEM
    * Retrieve item data.
        CALL METHOD im_item->get_data
          RECEIVING
            re_data = v_data_item.
    Do you validations and changes here
    *update changes
    CALL METHOD im_item->set_data( v_data_item ).

  • Implementation Of BADI For Enjoy Purchase Order

    I have implemented a 'ME_GUI_PO_CUST' BADI for ME21n. The control is going to Subscribe and Map Dynpro methods. But the control is not going to other methods like TRANSPORT_FROM_MODEL
    TRANSPORT_TO_DYNP
    TRANSPORT_FROM_DYNP
    TRANSPORT_TO_MODEL.
    Please explain how we can make the control to move to these methods.
    Thanks In Advance.

    ME21N - PO Enhancement using BADI

  • Liquidity forecast - purchase order payment terms

    Dear Experts, I have the following issue,
    We are using liquidity forecast, but we are having a problem because the system does not take into account when a Purchase Order is created with Installment Payment Conditions.  The Liquidity Forecast shows the Planning Date equal to Delivery Date of the Purchase Order, not taking into account the division of the payment term and the days of delay of every partial payment. I would like to know if there is workaround for this issue.
    Best regards.

    Hi Cristobal,
    The splitting of payment commitmentment accrding to the instalment dates are not possible. However it is possible to have the first instalment payment date instead of delivery date. But for this the Payment Term definition should take the baseline date as any of the 3 defaults possible ( Doc date/Posting date/Entry date). That means it should not be "No Default".
    Below reproduction from note 497381:
    "In the installment payment terms, you can enter 'Fixed day' and 'Additional months' for the calculation of a baseline date. In this case, the system updates the entire payment commitment as at the calculated baseline date (fixed day and additional months)."
    Please try this and also share your results with us
    Shony

  • Purchase Order  Payment terms

    Hi all,
           I have a requirement of adding  description of Payment terms  in the sapscript .  Earlier  the script only prints terms  without description. It use to get the value from , &'Terms of payment: 'PEKKO-ZBTXT& in the sap script MEDRUCK.
         Now  i  added table T052u  in the print program    to get the description of payment term,   the field is T052U-TEXT1.
    While creating payment term from  tcode OBB8,Eg: Payment term is Z001  and  we enter No of days  and percentage .  Suppose  i enter 10 days ,  how is  the script printing as "Within 10 days due net ".
    I want to know  where this field is stored, Pekko is a structure  so iam not able to see this.
    Please  do  tell me  which table  do i get to  see this payment term  w.r.t  to PO
    Waiting for ur Reply's
    Regards,
    Shuja

    Check table :<u><b>T052U</b></u>
    Hope this’ll give you idea
    <b>P.S award the points.</b>
    Good luck
    Thanks
    Saquib Khan
    "Some are wise and some are otherwise"

  • Search user-exit for create purchase order

    Hi all,
    i'm searching the user-exit (or BADI) for create purchase order.
    Thanks for help.

    Hi CECG,
    GOTO SMOD and press F4
    then Click on  Information system
    and in the Package name give as     ME
    and press enter.
    you will get all user exits for Purchase Orders
    Hope this solves your problem.
    Please reward points if found helpful.
    Thanks and regards,
    Rajeshwar.

  • BADI-User exit required for updating Purchase order header field -IHREZ

    Hello All,
    We have requirement in our business to update the purchase order header field "our reference" EKKO-IHREZ with some text field. We need a BADI/user exit that can be used for updating this field . We have checked the BADI ME_PROCESS_PO_CUST and unfortunately we are not able to use this BADI as it getting triggered in enjoy SAP transactions ME21N , ME22N etc. We are not creating the purchase order manually and we are using ME59N for creating Purchase order . Hence we are looking for some user exit/BADI that can be used in ME59N for updating the purchase order header field IHREZ.
    Thanks in advance for your immediate response .
    With regards,
    Joseph Anand B

    TRY using the exist u2022     EXIT_SAPLME59_001
    You can also later on add this field by BAPI_PO_CHANGE

  • How to set up automatic payment for the purchase order

    Hi, All,
    I have one question how to set up automatically payment for the Rent Office purchase Order?
    There is the requirement from the client. They want to create one kind of purchase order for the Office Rent, then pay the fees in the certain time of every month to the vendor for the rent fees without any invoice. Whatu2019s the normal solution for this kind of purchase order? Is it ERS? Or something else?
    Please give me the details and business flow. Also please tell me how to setup in the SAP and T-code.
    Thanks in advance

    Either you can set up ERS or you can pay directly from the FI side.
    Prerequisites
    Evaluated receipt settlement must be flagged in the purchase order item.
    The vendor must be flagged as being subject to ERS in the vendor master record.
    The goods receipt must refer to a purchase order.
    Goods-receipt-based Invoice Verification must be defined for the purchase order item.
    A tax code must have been maintained in the purchase order item.
    The order price of the materials may not be an estimated price.
    If you flag a vendor as being subject to ERS, the system sets the ERS indicator as a default in each item when you create a purchase order for the vendor. You can prevent this happening for certain vendors by flagging the info record for the material and the vendor as not being subject to ERS.
    In Purchasing, you can delete the default ERS indicator in a purchase order item.
    Choose Logistics Invoice Verification ® Automatic Settlement ® Evaluated Receipt Settlement (ERS).
    The selection screen appears.
    You can use the following criteria to narrow down selection of the transactions to be settled:
    Company code
    Plant
    Goods receipt posting date
    Goods receipt document
    Fiscal year of the goods receipt
    Vendor
    Purchase order and order item
    You can define the selection criteria for the invoice documents by:
    Delivery
    Purchase order
    Purchase order item
    Goods receipt document
    Credit memo
    Invoice
    Currency
    Choose  Execute.
    The system issues a log for Evaluated Receipt Settlement, which displays the following:
    Settled
    In line with your selection criteria, the system displays all the order items that were settled (or if you are working in test mode, which would have been settled).
    Could not be settled
    In line with your selection criteria, the system displays all order items for which ERS is defined but could not be settled. It also lists the reasons.
    If the system reports being unable to invoice a transaction, you should exclude the transaction from ERS to avoid it being included in the log the next time ERS is run.
    Select the item and choose Exclude from ERS.
    The system also generates and possibly sends a message to inform the vendor(s) about the transaction settled, depending on the settings in Customizing.
    You can display the following environment information for the order items selected. To do this, choose Goto ®:
    Display purchase order
    Display invoice
    Display material document
    Display long text

  • I need output type NEU automaticaly for create purchase order document type

    Dear Experts,
    I need output type NEU automaticaly for create purchase order document type NB
    when transaction code MN04, I am doing the following:
    (1) I selected the third option Purchasing Output determination: Document type
    (2) I selected the output type NEU.
    (3) In condition records in document type , i have chosen NB.
    (4) In name its automatically coming as Purchase requisition
    Please suggest how Purchase Order NB will come

    Hi,
    Check & press F4, NB Purchase Order (for catagory F) will be there after entering PO output type NEU & then maintaion the condition record in MN04.
    Output type NEU automaticaly defaulted during purchase order creation with document type ,then just fine tune the output (message) type in following path:
    SPRO--->MM->Purchasing>Message>Output control->Message types> Define message type for Purchase Order----->Fine-Tuned Control: Purchase Order
    Now here select the check box corresponding to your output(message) type NEU to have print output automatically displayed & save.
    Now try to creating Purchase Order & you will have default message type NEU.
    Regards,
    Biju K

  • GR Based IV tick for Import Purchase Order

    Hello Friends
    Whats the significance of keeping GR based IV check box as unchecked for import purchase order.I am selecting this indicator and still i am able to do the process as follows
    1. ME21n 2. MIRO (BOE capturing) 3. MIGO 4. Post Excise invoice 4. MIRO (Material Vendor)
    Still could not understand why this indicator is suggested to keep as unchecked for import purchase order processing.
    Please clarify.
    Regards
    Vivek sharma

    Hi
    For import POs , it is required that the GRbased Inv ver key removed, as we need to pay the amount due to the customs. We are yet to receive the material in our Goodown i.e goods receipt is yet to be done but payment to Customs has to be made  only then material GR can be carried out. You have to enter manula values(amounts) for this to be processed. What you said  reg the MIRO rpocessing evenefore Material receipt, this is possible , duirng MIRO you need to anter the quanity and the correspondingamount to be processed. While if you have GRbased Inv.verification then you need not enter material quanity or value manually which is automatic.
    Regards

  • Data Migration for Open Purchase Order

    Hi, All,
    Is there anyone know how to Count the volume for Open Purchase Order. What's the normal strategy for the Data Migration and Cut-over stage?
    My client want to know how many Open Purchase Order in the legacy system and then determine manual or automatic data migration. If manual, how to do? If automatic, how to do? Because all materials and vendors, plants are different number. How to track? How to find out to match between new and old?
    Thank you very much

    JC,
    Sounds a bit early to be making decisions about the realization phase.  It doesn't sound like you have finished the Blueprinting phase yet, much less the testing phase.
    Anyhow, in my experience I typically use LSMW (Legacy system migration workbench) to load MM master data (material masters), Inventory (WIP, RM, FG, etc) Purchasing Master data (Vendors, Purchase Info Records, Source Lists, Quota Arrangements), and Purchasing transactional documents (POs, PurReqs, Scheduling Agreements, etc).  Depending on the complexity and volume of data, it  may be necessary to write custom programs to load the data.  You will find this out during your requirements gathering.
    It is uncommon but possible to load all of these data manually.  I have never run across a client that wants to pay a consultant's hourly rate to sit at a terminal to peck away loading master data, so if the client intends to have his own users enter the data manually, the project manager should make provision that there will be qualified TRAINED client employees available for this data entry.  I did help with a portion of a conversion once manually; of Sales Credits, but there were only about 30 SD docs to load.   I did this the evening before go-live day, while I was waiting for some of my LSMW projects to complete in the background.
    A good opportunity to 'practice' your data loads is right after you have completed your development and customization, and you have gotten the approval from the client to proceed from the pilot build to the full test environment.  Once you have moved your workbench and customization into the client's test environment, but before integration testing, you can mass load all, or a substantial portion of your conversion data into the qual system.  You can treat it like a dry run for go-live, and fine tune your processes, as well as your LSMW projects.
    Yes, it is good practice to generate comparisons between legacy and SAP even if the client doesn't ask for it. For Purchase orders on the SAP side, you could use any of the standard SAP Purchasing reports, such as ME2W, ME2M, ME2C, ME2L, ME2N.  If these reports do not meet the requirements of the client, you could write a query to display the loaded data, or have an ABAPer write a custom report.
    You didn't ask, but you should also do comparisons of ALL loaded data - including master data.
    It sounds like you are implying that the client wants YOU to extract the legacy data.  For an SAP consultant, this is not very realistic (unless the legacy system is another SAP system).  Most of us do not understand the workings of the myriad legacy systems.  The client is usually expected to produce one or more legacy system technical experts for you to liase with.  You normally negotiate with the technical expert about every facet of of the data migration.  In addition, you will liase with business users, who will help you and the implementation team to logically validate that the final solution (turnkey SAP production system, fully loaded with data) will meet the client's business needs.
    Finally, you mentioned how do you track the mapping of master data between legacy and SAP.  There are many ways to do this.  I normally try to get the legacy person do the conversion on his end, eg, when he gives you the load file, you would like to have already translated the master data and inserted the SAP relevant values into the file.  If this is not possible, I usually use MS Access databases to maintain a master map, and I perform the mapping on a PC.  If your data package is small, you can probably get by using MS Excel or similar.
    Good Luck,
    DB49

  • Urgent - How to change Item category for Open Purchase Order

    Hi Team,
    Lil bit tricky issue.
    My client has asked us to change the existing Item Category values, Combinations, Category Set etc. Its been changed and uploaded successfully.
    The question here is how we need to handle the category for Open Purchase Order. How to update the same.
    Do we need to do manually or any other way ?
    Please advice
    Regarads,
    John

    Hi John,
    This is reallly a tricky issue!
    I guess you cannot change the category of an existing PO's.
    This field will be greyed out once we save the form...there were no profiles/other setups to enable this field.
    For all new PO's since you have changed the new category value that should not be a issue.
    Lets wait for some of our colleuges opinion.
    I guess PO cancel should be the final option if we dont hear any new work arounds.
    Thanks
    -Arif.

  • Problem for Goods Receipt for Subcontracting Purchase Order

    Dear all,
    Presently, we are using SAP version 4.6C and we need to introduce GR for
    Subcontracting Purchase Order. We have developed a ABAP program to handle
    subcon Goods Receipt by uploading flat-files from our subcontractor. The
    scenario is as follows :
    Goods Receipt for Subcontracting Purchase Order
    1. In the ABAP program, function BAPI_GOODSMVT_CREATE will be used for goods
    movement.
    2. Data provided to the function are as follows :
    - Posting date
    - Document date
    - Material number
    - Plant
    - Storage location
    - Batch
    - Movement type (101)
    - Quantity
    - Purchase order number
    - Purchase order item
    - Movement indicator (B - Goods receipt for purchase order)
    3. The function will do data verification and automatically determine GI
    item for subcon stock:
    - Movement type (543)
    - Special stock (O - parts prov. vendor)
    - Material
    - Quantity
    - Plant
    Our problem is that :
    Only the GR item in the interface is to be transferred and the GI item is
    determined by the system. So, the quantity for subcon stock cannot be
    changed using this BAPI. Then the system will continue processing the goods
    receipt and create material document.
    Manually, by using transaction code MIGO, the user can display the subcon
    stock data and then change the quantity.
    By using transaction code MB01, after the user fills in all the GR fields,
    the system comes to line item 002 (subcon stock data) and then quantity can
    be changed.
    As per user requirement, quantity for GI item must be same with the quantity
    that has been transferred to subcon vendor in Delivery for Subcon
    (transaction code VL02N).
    We cannot achieve this requirement by using the BAPI mentioned above. Would
    appreciate any valuable help from anyone who is able to help us on this
    matter. Are there any other BAPI's that can help us to achieve the same
    result ?
    Thank you in advance and best regards.

    As far as i understood the problem I suggest u to create the
    BDC according to user actions that are performed in he manual
    operation.
    I can't say that the BAPI performs the exac solution what you want.
    I have done some BDC work using MB01 and suggest you to be careful
    and try to keep the complete in the logic as some chages in rows in BDC will
    change the complete scenario.And throw correct quantity val in correct
    material
    row.
    This methodology will help u even in mass uploads.
    Or in case of automation u can perform the call transaction BDC in
    background mode.
    so As per my understanding bdc program is the solution. pls try and let me
    know.

  • Need Component Overview details of Purchasing order

    Hi,
    I have a subcontract purchase order.
    Need to get the details of the component overview of all the material data for that purchase order. (you can view that in ME23>item>component overview)
    How to get it and from which table?
    rgds

    From Ekko and EKPO i get the sub contract purchase order details (item catergory = 3 or document type = NB13 and document category = L)
    but i need to get the details of its item component overview.
    Rich Heilman,
    Can u tell me how to get the component records from RSDB and RESB for a purchase order line item.
    Thanks

Maybe you are looking for

  • Help with error program not registered CPI-C error CM_ALLOCATE_FAILURE_RETR

    I have the following connection error in SM59 ... Connection error        program ZCCCOM_NZ_PMH01 not registered / CPI-C error CM_ALLOCATE_FAILURE_RETRY.  I have deleted and re-registered the program but still no connection. Any ideas as to what/wher

  • Premiere Elemente 12 - incompatible Display Driver on Win 8.1

    Hi Everybody! I am running Windows 8.1 on an HP Ultrabook equipped with 23" external Display via USB 3.0 Port Replicator. Primary Display is off, as Notebook is closed. I have installed PE12 before updating to W8.1. Starting PE 12 results in an alert

  • Mozilla 5.0 have problems with AVG Free version antivirus?

    hello, after I upgraded to 5.0 Mozillacame a warning saying that the antivirus AVG Free Edition, which has my laptop, was not compatible and that it was disabled. is this true? I had the antivirus review the laptop, got a problem and when I want to d

  • With SQL Developer 3.1.07 can't print Relational model

    Hello, With Oracle SQL Developer 3.1.07, I realized that option File -> Print is turned off or deactivated, when trying to print a Relational diagram. I'm trying to print what I dragged and dropped in tab: "Relational_1 (Untitled_1)".

  • How to make F8 key to be just F8 key?

    I have problem with MacBook (US keyboard) - F8 is mapped as trigger for keyboard backlight just as on MBP, while MB doesn't have kb backlit at all. I discovered problem when trying to install Windows XP in Parallels - Windows setup asks to press F8 t