Po enhancement thro badi

Hi experts,
I have implemented me_gui_po_cust and me_process_po_cust to get a new tab in po screen header.i am getting the tab.
problem is its not getting saved in ekko table.
subscibe method
  DATA: ls_subscriber LIKE LINE OF re_subscribers.
  CHECK im_application = 'PO'.
  CHECK im_element     = 'HEADER'.
  CLEAR re_subscribers[].
  ls_subscriber-name = subscreen.
  ls_subscriber-dynpro = '0001'.
  ls_subscriber-program = 'SAPLZMM_FUNCGROUP'.
ls_subscriber-struct_name = 'ZPO_CUSTOMFIELDS'.
  ls_subscriber-struct_name = 'CI_EKKODB'.
  ls_subscriber-label = text-001.
  ls_subscriber-position = 13.
  ls_subscriber-height = 8.
  APPEND ls_subscriber TO re_subscribers.
METHOD if_ex_me_gui_po_cust~map_dynpro_fields. 
FIELD-SYMBOLS: <mapping> LIKE LINE OF ch_mapping.
INCLUDE MM_MESSAGES_MAC.
TYPE-POOLS: MMMFD.
  LOOP AT ch_mapping ASSIGNING <mapping>.
    CASE <mapping>-fieldname.
      WHEN 'ZTENDER'.
        <mapping>-metafield = mmmfd_cust_05.
      WHEN 'ZEMDAPPLICABLE'.
        <mapping>-metafield = mmmfd_cust_06.
      WHEN 'ZPBGAPPLICABLE'.
        <mapping>-metafield = mmmfd_cust_07.
      WHEN 'ZEMDAMOUNT'.
        <mapping>-metafield = mmmfd_cust_08.
      WHEN 'ZEMDVALIDITY'.
        <mapping>-metafield = mmmfd_cust_09.
    ENDCASE.
  ENDLOOP.
ENDMETHOD.
METHOD if_ex_me_gui_po_cust~transport_from_model.
  DATA:     l_header  TYPE REF TO if_purchase_order_mm,
            ls_mepoheader  TYPE mepoheader,
            ls_customer TYPE ci_ekkodb.
            ls_customer TYPE ekko.
BREAK-POINT.
  CASE im_name.
    WHEN subscreen.
      mmpur_dynamic_cast l_header im_model.
      CHECK NOT l_header IS INITIAL.
     ls_customer = l_header->get_data( ).
      ls_mepoheader = l_header->get_data( ).
      CALL FUNCTION 'ZMM_GET_DATA'
        EXPORTING
          im_ebeln       = ls_mepoheader-ebeln
           im_ebelp       = ls_mepoheader-ebelp
       IMPORTING
         ex_data        = ls_customer .
      MOVE-CORRESPONDING ls_mepoheader TO dynp_data_pbo.
      MOVE ls_customer-ztender TO dynp_data_pbo-ztender.
      MOVE ls_customer-zemdapplicable TO dynp_data_pbo-zemdapplicable.
      MOVE ls_customer-zpbgapplicable TO dynp_data_pbo-zpbgapplicable.
      MOVE ls_customer-zemdamount TO dynp_data_pbo-zemdamount.
      MOVE ls_customer-zemdvalidity TO dynp_data_pbo-zemdvalidity.
    WHEN OTHERS.
  ENDCASE.
ENDMETHOD.
METHOD if_ex_me_gui_po_cust~transport_to_dynp.
  CASE im_name.
    WHEN subscreen.
      CALL FUNCTION 'ZMM_PUSH'
        EXPORTING
          im_dynp_data = dynp_data_pbo.
    WHEN OTHERS.
  ENDCASE.
ENDMETHOD.
method IF_EX_ME_GUI_PO_CUST~TRANSPORT_FROM_DYNP.  
CASE im_name.
  WHEN subscreen.
  CALL FUNCTION 'ZMM_POP'
   IMPORTING
     ex_dynp_data = dynp_data_pai.
  IF dynp_data_pai NE dynp_data_pbo.
     re_changed = mmpur_yes.
   ENDIF.
   WHEN OTHERS.
    ENDCASE.
endmethod.
METHOD if_ex_me_gui_po_cust~transport_to_model.
  DATA: l_header TYPE REF TO if_purchase_order_mm,
        ls_mepoheader TYPE mepoheader,
     ls_customer TYPE ekko,
        l_po_header_handle   TYPE REF TO cl_po_header_handle_mm.
  CASE im_name.
    WHEN subscreen.
      mmpur_dynamic_cast l_header im_model.
      CHECK NOT l_header IS INITIAL.
      ls_mepoheader = l_header->get_data( ).
      IF dynp_data_pbo-ztender NE dynp_data_pai-ztender
        OR dynp_data_pbo-zemdapplicable NE dynp_data_pai-zemdapplicable
        OR dynp_data_pbo-zpbgapplicable NE dynp_data_pai-zpbgapplicable
        OR dynp_data_pbo-zemdamount NE dynp_data_pai-zemdamount
        OR dynp_data_pbo-zemdvalidity NE dynp_data_pai-zemdvalidity.
        ls_mepoheader-ztender = dynp_data_pai-ztender.
        ls_mepoheader-zemdapplicable = dynp_data_pai-zemdapplicable.
        ls_mepoheader-zpbgapplicable = dynp_data_pai-zpbgapplicable.
        ls_mepoheader-zemdamount = dynp_data_pai-zemdamount.
        ls_mepoheader-zemdvalidity = dynp_data_pai-zemdvalidity.
                 CALL METHOD l_header->set_data
          EXPORTING
            im_data = ls_mepoheader.
              ENDIF.
    WHEN OTHERS.
  ENDCASE.
ENDMETHOD.
please guide me if anybody has solved this isuue already.in transport_to_model changes are updated to ls_header.but after this it goes to transport_from model.here ls_header is again populated by this stmt
ls_header = l_header->get_data.
after this ls_header doesnot have have any custom field values.

Hi,
Thanks for your reply.I implemented me_gui_po_cust and me_process_po_cust .i followed the sample code of both the badi's.
data is getting saved in ztable which has all my custom fields.i want to save it in ci_ekkodb customer include in ekko table.
Thanks in advance.
Kavitha

Similar Messages

  • Enhancement pt /badi/exit to restrict Creation/edition of Note txt (STXH)

    Hi All,
    I am trying to restrict creation/edition of Note(text) in PA30 for qualification(infotype 024) . The BADI(HRBAS00INFTY) which triggers  when the qualification is changed ,  is NOT  having any data in old_image and New_image when Notes are changed .
    Any info on how to restrict enhancement point /badi/exit for this will be very helpful .
    Thank you in advance 
    Brajesh .

    No user exits or badis are available to control the transactions or master data long texts. It is only available for SO10 texts (Standard Text). I have read this somewhere in the SAP Notes.

  • Screen enhancement in badi's

    Hi all,
      I want to do screen enhancement in BADI.I found some badis which are providing the screen enhancements but dont know how to go further.
    Also i dont know in which transaction this screen will appear.
    And how to search for the BADI in standard transaction ,so that i can add the my own subscreen in satandard sap transaction using BADI screen enhancements.
    Please tell me the way in which i can do the sceen enhancement using BADI.
    Thanks and Regards,
    Sugeet.

    hi,
    check this..
    http://help.sap.com/saphelp_nw04/helpdata/en/9d/12233a0edd7978e10000000a11402f/frameset.htm
    regards
    vijay

  • Enhancement or BADI for E1IDB02 IDoc segment

    I need to change some field values on the E1IDB02 segment before the IDoc is generated.  Basically, I need to clear the last 90 bytes of the record and map an IBan number for the BA partner type.  This is the source bank and generally, SAP does not populate that via standard mapping.  I there either an Enhancement or BADI that would allow me to map values in this segment?

    Hi,
    Re: User exit to modify the segment E1IDB02 data
    Regards,
    PP

  • Need any Enhancement Or BADI of transaction /N/SCWM/PRDI in EWM system

    Hi Team
    Is there any Enhancement or BADI's available before warehouse task creation through Transaction /N/SCWM/PRDI in EWM system.
    Once got to transaction /N/SCWM/PRDI and entered the inbound ERP and execute it. Then select the line and go to Menu bar select the Inbound Delivery > Follow-on Function> Warehouse Task.
    Then select the item and Clicked on CREATE+SAVE OR SAVE button then find out the Enhancement OR BADI's where we have to do some validation on Delivery items before creation of warehouse creation.
    Thanks in Advance!!
    Abhishek.

    Hi,
    Goto transaction SPRO (customizing)
    select: Extended warehouse management=>Business Addins=>Cross-Process Settings=>Warehouse task.
    In this topic you can find enchancements you could use.
    Cheers,
    Koen.

  • Required Enhancements OR BADI's on /N/SCWM/PRDI EWM system

    Hi Team
    Is there any Enhancement or BADI's available before warehouse task creation through Transaction /N/SCWM/PRDI in EWM system.
    Once got to transaction /N/SCWM/PRDI and entered the inbound ERP and execute it. Then select the line and go to Menu bar select the Inbound Delivery > Follow-on Function> Warehouse Task.
    Then select the item and Clicked on CREATE+SAVE OR SAVE button then find out the Enhancement OR BADI's where we have to do some validation on Delivery items before creation of warehouse creation.
    Thanks in Advance!!
    Abhishek.

    Hi,
    Goto transaction SPRO (customizing)
    select: Extended warehouse management=>Business Addins=>Cross-Process Settings=>Warehouse task.
    In this topic you can find enchancements you could use.
    Cheers,
    Koen.

  • BAPI enhancements Vs BADI

    Hi All,
      Can any one explain me briefely, what is the relation between 'BAPI enhancements' and 'BADI'?
    Thanks
    naveen

    BADI is just an object-oriented version of user-exit. Instead of entering program code into some function module (as in customer-exit), you define some class which has to implement predefined methods and those methods are fired at predefined points just like an old user-exit. Some BADI can have multiple independent implementations which is much better for software deployment as several developers can implement the same BADI independently.

  • CRM Datasource enhancement using BADI

    Hi Guys,
    There is a lot of confusion among our BW community here about the implementation of the "CRM_BWA_MFLOW" BADI to enhance the datasources. It would be a great service is someone can clear the fog on this.
    The steps that I followed in doing this are
    1. Appended the standard datasource structure with the additional fields that need to be populated.
    2. Unhid the fields in the transaction RSA6.
    3. Created an implementation of the BADI "CRM_BWA_MFLOW" and tried to map the fields to the append structure.
    This is where I am stranded. How do we map the fields from the BDoc to the append structure fields. If someone can provide with a sample code with some documentation, that would be a great help for many of us here.
    I have earlier implemented the User exit to enahnce the datasource but it really is a big pain, especially when you know that using the BAdi can be easier.
    Really appreciate your contribtion.
    Doniv

    hi,
    sample code can be found in the BadI, somewhere go to or utility - sample code, it seems quite similar with old zxrsau01. sap gave us note 850817 when suggest using BadI for certain case, take a look :
    850817-CRM-BW: Using BDocs for the enhancements in BADi
    https://websmp103.sap-ag.de/~form/sapnet?_FRAME=CONTAINER&_OBJECT=012006153200000232372005
    692195-FAQ: Sales Analytics and CRM-BW data Extraction
    https://websmp103.sap-ag.de/~form/sapnet?_FRAME=CONTAINER&_OBJECT=012003146900000332772003

  • Data source enhancement using BADI

    Hi,
    We had a 2LIS_* extractor which is enhanced with ZZ fields.
    I look for the sode in CMOD which i couldn't able to find any
    My assumption is the data source is enhanced using BADI.....As i am not familiar with BADI's how can i create for my data source enhancement code in BADI
    Thanks

    Hi ,
    Not sure on your question.
    Is the Enhancement already done and you want  to check whether it is done in BADI/CMOD.
    Or
    You want to populate the Data using BADI/CMOD.
    In any case you can use CMOD or BADI to populate the data ,the recomendded is BADI which can be created in SE24..you can google for some Docs on its creation and steps to be followed.
    And if tis CMOD you have to create a project and then write the code and for that also there are DOcs avaliable.
    Rgds
    SVU

  • Data source Enhancements Using Badis

    HI gurus,
    Can you please let me know the process in detail to implement the data source enhancements using badi's.
    Please provide me the step by step proceedure.
    Appropriate answer will be highly rewarded.
    Thanks,
    Shashikanth.

    http://www.sap-img.com/abap/difference-between-badi-and-user-exits.htm
    I have a few links for u! Just download the documents and have a reading. You will get an idea:
    http://www.esnips.com/doc/e06e4171-29df-462f-b857-54fac19a9d8e/ppt-on-badis.ppt
    http://www.esnips.com/doc/43a58f51-5d92-4213-913a-de05e9faac0d/Business-Addin.doc
    http://www.esnips.com/doc/10016c34-55a7-4b13-8f5f-bf720422d265/BADIs.pdf
    http://www.esnips.com/doc/1e10392e-64d8-4181-b2a5-5f04d8f87839/badi.doc
    /people/thomas.weiss/blog/2006/04/18/how-to-implement-a-badi-and-how-to-use-a-filter--part-4-of-the-series-on-the-new-enhancement-framework
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/4493c4a6-0301-0010-62a2-efd6ded61e04
    Reward points if helpful
    Regards
    Edited by: Aadil on Jan 23, 2008 8:42 AM

  • What is the main difference between Enhancements and BADI.?

    What is the main difference between Enhancements and BADI.?plzz tell
    Edited by: Alvaro Tejada Galindo on Feb 13, 2008 3:48 PM

    CMOD is the Project Management of SAP Enhancements (i.e., SMOD Enhancements). SMOD contains the actual enhancements and CMOD is the grouping of those SMOD enhancements.
    Difference Between BADI and User Exits
    BADI's can be used any number of times, where as USER-EXITS can be used only one time.
    Ex:- if your assigning a USER-EXIT to a project in (CMOD), then you can not assign the same to other project.
    BADI's are oops based.
    Business Add-Ins are a new SAP enhancement technique based on ABAP Objects. They can be inserted into the SAP System to accommodate user requirements too specific to be included in the standard delivery. Since specific industries often require special functions, SAP allows you to predefine these points in your software. 
    As with customer exits two different views are available:
    In the definition view, an application programmer predefines exit points in a source that allow specific industry sectors, partners, and customers to attach additional software to standard SAP source code without having to modify the original object. 
    In the implementation view, the users of Business Add-Ins can customize the logic they need or use a standard logic if one is available.
    In contrast to customer exits, Business Add-Ins no longer assume a two-level infrastructure (SAP and customer solutions), but instead allow for a multi-level system landscape (SAP, partner, and customer solutions, as well as country versions, industry solutions, and the like). Definitions and implementations of Business Add-Ins can be created at each level within such a system infrastructure.
    SAP guarantees the upward compatibility of all Business Add-In interfaces. Release upgrades do not affect enhancement calls from within the standard software nor do they affect the validity of call interfaces. You do not have to register Business Add-Ins in SSCR.
    The Business Add-In enhancement technique differentiates between enhancements that can only be implemented once and enhancements that can be used actively by any number of customers at the same time. In addition, Business Add-Ins can be defined according to filter values. This allows you to control add-in implementation and make it dependent on specific criteria (on a specific Country value, for example).
    All ABAP sources, screens, GUIs, and table interfaces created using this enhancement technique are defined in a manner that allows customers to include their own enhancements in the standard. A single Business Add-In contains all of the interfaces necessary to implement a specific task.
    The actual program code is enhanced using ABAP Objects. In order to better understand the programming techniques behind the Business Add-In enhancement concept, SAP recommends reading the section on ABAP Objects.

  • Difference between user exit,enhancement and BAdi

    hello guys,
    what is the difference between user exit,enhancement and BAdi.
    Please do let me know..
    Thanks in advance.
    regards,
    praveen.

    Pls do search the forum before posting*

  • Screen amd menu enhancement throgh BADI

    Hi all,
    I need to show badi Defn and implementation in a training.
    I tried to create the BADI in se18 screen without the enhancement point i.e with classical BADI.
    But there I dont find the Fcode and Subscreen option which are used for screen and menu enhancement throhg BADI.
    How can we do that then throgh classical BADI.
    Please suggest.
    Thanks and Regards,
    Smriti Singh

    Hi.
    You should create classical Badi definition from dialog
    appearing when you press edit object button in se80 transaction.
    There there are multiple use and filter-Depend. checkboxes managing
    with fcodes and subscreens tabs.

  • Programing paradigm for dynpro enhancements via BADI

    Hi Experts,
    do You know programing paradigm in system for dynpro enhancements via BADI ? I must extend a dynpro with a new subscreen tabstrip via BADI. I know BADI's very well but no in relation with dynpros.
    Thank You in advance
    Peter

    Hi,
    CRM_CUSTOMER_H_BADI  / CRM_CUSTOMER_I_BADI -  To change the name of custom-defined tab in lead either in header or item level.
    hope it helps.
    Regards
    Sidd

  • Sample Code for CRM enhancement in BADI

    hi,
      can anybody please give me sample code for BADI for CRM enhancement.
    i have added couple of z field in a extract structure. now i have to write code in BADI to populate those fields.
    please do not send code for user exit.
    Regards
    Subrata

    Hi Aviral,
    Please consider below thread :
    http://scn.sap.com/thread/2069370
    Best regards - Christophe

Maybe you are looking for