BADI ME_GUI_PO_CUST how to

Hello,
Im implementing badi ME_GUI_PO_CUST under ZME_GUI_PO_CUST, and Im trying to use method FIELDSELECTION_HEADER_REFKEYS in order to deactivate a screen field, but I dont know how to use the parameters, does anyone know how to do it?
the parameters are
in->IM_HEADER     TYPE REF TO IF_PURCHASE_ORDER_MM
in/out->CH_KEY0     TYPE BREFN
in/out->CH_KEY1     TYPE BREFN
in/out->CH_KEY2     TYPE BREFN
in/out->CH_KEY3     TYPE BREFN
in/out->CH_KEY4     TYPE BREFN
in/out->CH_KEY5     TYPE BREFN
in/out->CH_KEY6     TYPE BREFN
but I dont know how can I use them!!!
Thanks!!!,
Gabriel P

I know this is a very old thread, but anyone who can tell how this can be solved?
Thanks in advance,
Tom

Similar Messages

  • Could not get Custom screen in me21n after implementing Badi ME_GUI_PO_CUST

    Hi.,
    I created implementation for the badi ME_GUI_PO_CUST... but i could not get the Tab and screen in header tab.
    also used below  link in the  forum to correct the issue ....but dint help me .
    Custom screen not displaying using BADI ME_GUI_PO_CUST
    Pls help me how to go abt...
    Thanks,
    Ranjitha.

    Hi ....
    Now the tab is reflecting in me22n & me23n but not in me21n ......can anybody tell what could be the reason?
    thanks
    ranjitha

  • Need help on implementing the BADI ME_GUI_PO_CUST

    Hi All,
    As per my requirement I need to do Enhancement for Unloading point field on PO.This filed will get all the department numbers applicable for the site on the line item.
    For this I need to Implement the BADI BADI ME_GUI_PO_CUST.
    The Method which needs to be Implemented is : TRANSPORT_TO_DYNP.
    Instructions have been given for the Screen design.
    Can anyone help me (with the sample code how) to Implement this method of the BADI in SE19.
    This BADI method is taking a view as an Input and I am not understanding how to proceed.
    Thanks and Regards,
    Smriti Singh

    Hi,
    my suggestion is to check the standard documentation of the interface IF_EX_ME_GUI_PO_CUST.
    After that you can check the method IF_EX_ME_GUI_PO_CUST~TRANSPORT_TO_DYNP in the example implementation class CL_EXM_IM_ME_GUI_PO_CUST.
    Usefull links:
    [Re: Implementing badi ME_GUI_PO_CUST;
    [Re: ME21N - PO Enhancement using BADI;
    Kind Regards.
    Andrea

  • Add new screen in ME23N with BADI ME_GUI_PO_CUST

    Hi folks, I have used the BADI ME_GUI_PO_CUST to add a custom tab in transaction ME23N.
    So good, sor far, I know how to used BADI and it works very well. I had to subscribe my own subscreen in the method subscribe of the interface, but something is boring me and I don't know if it's possible.
    Let's say I want to display my new tab according to the purchasing document type. Right now, my custom tab is always display. There is no method to unsubscribe a screen in the interface. What I could do is to used the get parameter id 'BES' in the subscribe method to get the current purchasing document display, then from there I could decide if I subscribe or not my own screen. The thing with the subscribe method is that it's only called once, when you enter in the transaction, if you stay in the transaction and select another purchasing document, this method will not be called.
    thanks
    Alex

    Hi Alexandre,
    First get the current Purchase Order Number using parameter ID 'BES' in the PBO of the custom subscreen.
    Then based on validation checks set SCREEN-INVISIBLE = 1 and SCREEN-ACTIVE = 0 and MODIFY SCREEN for all the screen fields.
    This will hide all the fields and eventually the tab may also disappear. This works for Screen Exits (i.e., if all the fields of a tab are made to disppear then the tab also disapears if is the tab is defined using Screen Exit). But I have never tried it out in a BADI.
    Try this, it might work.
    Hope it helps.
    Regards,
    Abhisek.

  • New tabs added by Badi ME_GUI_PO_CUST not seen in ME21N and ME22N

    Hi All
    I am implementing BADI ME_GUI_PO_CUST / ME_PROCESS_PO_CUST to add additional fields in Purchase Order Header.
    The implementation of the BADI ie the Subscreen of the fields to be added appears in Header of  transaction ME23N but it does not appear in the transaction ME22N and ME21N.
    Can anyone help me on this.How to make the tab appear on screen in transaction ME21N and ME22N.
    Thanx.

    Dear Friend,
    Just go to the Class CL_PO_HANDLER_MM
    This is the Super Class for the PO & PR.
    If u debug the PO u can see that PO is calling this super class.
    For this u want to create Subroutine in the Function Group calling the Screen .
    The Problem which u r facing is that the Instance are not yet created for that Cusotmer Data.
    Once u created this Subroutine u can see the fields..
    With Regards,
    Sumodh.P

  • Problem on Implementing badi ME_GUI_PO_CUST

    Hi Expert,
    I have implement BADI ME_GUI_PO_CUST, to add the new tab.
    I have managed to View the tab in Both ME21N, and ME22N with implement SUBSCRIBE and MAP_DYNPRO_FIELDS.
    method IF_EX_ME_GUI_PO_CUST~SUBSCRIBE
      DATA: ls_subscriber LIKE LINE OF re_subscribers.
      CHECK im_application = 'PO'.
      CHECK im_element = 'ITEM'.
      CLEAR re_subscribers[].
      ls_subscriber-name = subscreen1.
      ls_subscriber-dynpro = '0002'.
      ls_subscriber-program = 'ZRPP_ME_GUI_PO_CUST_SCREEN'.
      ls_subscriber-struct_name = 'CI_EKPODB'.
      ls_subscriber-label = text-001.
      ls_subscriber-position = 7.
      ls_subscriber-height = 7.
      APPEND ls_subscriber TO re_subscribers.
    METHOD : IF_EX_ME_GUI_PO_CUST~MAP_DYNPRO_FIELDS
      FIELD-SYMBOLS: <mapping> LIKE LINE OF ch_mapping.
      LOOP AT ch_mapping ASSIGNING <mapping>.
        CASE <mapping>-fieldname.
          WHEN 'ZCNUM'.      <mapping>-metafield = mmmfd_cust_01.
        ENDCASE.
      ENDLOOP.
    Method IF_EX_ME_GUI_PO_CUST~MAP_DYNPRO_FIELDS
      DATA: lw_fieldselection LIKE LINE OF ch_fieldselection.
      LOOP AT ch_fieldselection INTO lw_fieldselection.
        lw_fieldselection-fieldstatus = '+'.
        MODIFY ch_fieldselection FROM lw_fieldselection.
      ENDLOOP.
    I need to store the value, and some of thread said it required methods:
    TRANSPORT_FROM_MODEL
    TRANSPORT_TO_DYNP
    TRANSPORT_FROM_DYNP
    TRANSPORT_TO_MODEL
    I have click on the subcreen, or enter at the field, but it will not able to trigger the Above Methods.
    How do I do for the to trigger above Methods? Or Should I added some additional code at screen program? I want SAVE the data actually into EKPO.
    Thanks in advance.

    Hi Sim,
    Recently we have the same reqirement.
    You can have a look at the below code..
    First method: SUBSCRIBE  
    DATA: ls_subscriber LIKE LINE OF re_subscribers.* we want to add a customer subscreen on the Header tab
        CHECK im_application = 'PO'.
        CHECK im_element     = 'HEADER'.* each line in re_subscribers generates a subscreen. We add one subscreen in this example
        CLEAR re_subscribers[].
    * the name is a unique identifier for the subscreen and defined in this class definition
        ls_subscriber-name = subscreen1.
    * the dynpro number to use
        ls_subscriber-dynpro = '0001'.
    * the program where the dynpro can be found
        ls_subscriber-program = 'SAPLZKMMM_KAU86037'.
    * each subscreen needs his own DDIC-Structure
        ls_subscriber-struct_name = 'CI_EKKODB'.
    * a label can be defined
        ls_subscriber-label = text-001.
    * the position within the tabstrib can be defined
        ls_subscriber-position = 13.
    * the height of the screen can be defined here. Currently we suport two screen sizes:
    * value <= 7 a sevel line subscreen
    * value > 7  a 16 line subscreen
        ls_subscriber-height = 7.    APPEND ls_subscriber TO re_subscribers.Here, parameter u2018im_elementu2019 is defined as u2018HEADERu2019 as we are adding new tab in header section of PO.  
    Define a function group and take the main program and define it in ls_subscriber-program.
    Also define a sub screen with the required fields and assign it to the parameter ls_subscriber-dynpro.  
    Then method MAP_DYNPRO_FIELDS  
    FIELD-SYMBOLS: <mapping> LIKE LINE OF ch_mapping.
        LOOP AT ch_mapping ASSIGNING <mapping>.    CASE <mapping>-fieldname.      WHEN 'ZZPAYMENT_AGRE'.      <mapping>-metafield = mmmfd_cust_03.
          WHEN 'ZZPROJECT'.                     <mapping>-metafield = mmmfd_cust_04.
        ENDCASE.  ENDLOOP.  TRANSPORT_FROM_MODEL:
    DATA:     l_header       TYPE REF TO if_purchase_order_mm,
                  ls_mepoheader  TYPE mepoheader,
                  ls_customer    TYPE CI_EKKODB.*--------------------------------------------------------------------*
    * system asks to transport data from the business logic into the view
    *--------------------------------------------------------------------*    CASE im_name.      WHEN subscreen1.* is it an Header? im_model can be header or item.
            mmpur_dynamic_cast l_header im_model.
            CHECK NOT l_header IS INITIAL.* transport standard fields
            ls_mepoheader = l_header->get_data( ).* store info for later use
            MOVE-CORRESPONDING ls_mepoheader TO dynp_data_pbo.
          WHEN OTHERS.
        ENDCASE.    TRANSPORT_TO_DYNP:
    Define a FM 'ZK_KAU86037_PUSH' to push the values.CASE im_name.      WHEN subscreen1.        CALL FUNCTION 'ZK_KAU86037_PUSH'
              EXPORTING
                im_dynp_data = dynp_data_pbo.      WHEN OTHERS.
        ENDCASE.    TRANSPORT_FROM_DYNP:
      Define another FM 'ZK_KAU86037_POP'.CASE im_name.      WHEN subscreen1.        CALL FUNCTION 'ZK_KAU86037_POP'
              IMPORTING
                ex_dynp_data = dynp_data_pai.        IF dynp_data_pai NE dynp_data_pbo.
    * something has changed therefore we have to notify the framework
    * to transport data to the model
              re_changed = mmpur_yes.
            ENDIF.      WHEN OTHERS.
        ENDCASE.  TRANSPORT_TO_MODEL:     
            DATA: l_header             TYPE REF TO if_purchase_order_mm,
              ls_mepoheader        TYPE mepoheader,
              ls_customer          TYPE CI_EKKODB,
              l_po_header_handle   TYPE REF TO cl_po_header_handle_mm.*--------------------------------------------------------------------*
    * data have to be transported to business logic
    *--------------------------------------------------------------------*    CASE im_name.      WHEN subscreen1.* is it an item? im_model can be header or item.
            mmpur_dynamic_cast l_header im_model.
            CHECK NOT l_header IS INITIAL.        ls_mepoheader = l_header->get_data( ).* standard fields changed?
            IF dynp_data_pbo-zzpayment_agre   NE dynp_data_pai-zzpayment_agre
            OR dynp_data_pbo-zzproject        NE dynp_data_pai-zzproject.* update standard fields
              ls_mepoheader-zzpayment_agre   = dynp_data_pai-zzpayment_agre.
              ls_mepoheader-zzproject  = dynp_data_pai-zzproject.
              CALL METHOD l_header->set_data
                EXPORTING
                  im_data = ls_mepoheader.
            ENDIF.
          WHEN OTHERS.    ENDCASE. 
    Then we have to implement one more BADI to display the tab and update the values.
    Implement the BADI ME_PROCESS_PO_CUST. This cannot be used multiple times.  
    In this, we have methods (PROCESS_HEADER,PROCESS_ITEM).if we need to any validations for the fields we can write the logic here in this methods. In my case I need to check for the document type which I implemented in the method (PROCESS_HEADER).  
    Hope it helps you.
    Thanks
    Arbind

  • BAdI: ME_GUI_PO_CUST add customer field to item level

    Hi Experts,
    I want to add a customer field to PO item level, how to do that? the functional consultant told me to first implement the BAdI: ME_PROCESS_PO_CUST before I can use BAdI: ME_GUI_PO_CUST, can anyone show me the procedure on how to implement this? thanks in advance.
    Kind regards
    Dawson

    Hi Dawson,
    Those BADIs are having good documentation and sample code. Once gone through the documentation, you can refer below thread.
    Re: ME_GUI_PO_CUST & ME_PROCESS_PO_CUST   - ME21N/ME22N/ME23N
    Reddy

  • BADI - ME_GUI_PO_CUST ,can we have 10 plus cust feilds in  additional tab

    Hi Experts.....
    I have implemented a  BADI named ME_GUI_PO_CUST  and ME_PROCESS_PO_CUST in ME21N Transaction to add custom fields. With this I could get an extra custom tab in which I have included 7 Custom fields.
    Now my new req is to get add 8 more new feilds . but in the second method of the BADI -ME_GUI_PO_CUST  i.e ....MAP_DYNPRO_FIELDS we have only 10 customer feilds available to be mapped .i ,e MMMFD_CUST_01  --- MMMFD_CUST_02 -
    MMMFD_CUST_03 .....to ......MMMFD_CUST_10 .
    So the Problem is how to map my remaining 5 feilds ..
    Is it possible to add more than 10 feilds in the Customer subscreen  .If so please help me do it .
    Thank you in advance

    Hi,
    Yes you can add any no of fields in that tab.For Custom fields SAP suggested to use integer constants above 90000000, from which for mmfd_Cust_01 to mmfd_Cust_10  are just examples...But we can use any  constant above the above 90000000.
    For confirmation , check the where used list of mmfd_cust_01 and you will find 4 to 5 Fm where the logic will be like Metafield GE mmfd_cust_01 and not EQ in the standard Logic.
    Hope this helps you in closing the Thread
    Raj

  • Problems with TRANSPORT_FROM_MODEL in BADI ME_GUI_PO_CUST

    Hello,
    I tried implementing the BADI ME_GUI_PO_CUST along with all it's methods and subsequently I also got the custom screen visible in PO header. But problem is whenever I click on this subscreen, the code for the method TRANSPORT_FROM_MODEL doesn't trigger. Instead, it triggers TRANSPORT_TO_DYNP and understandably the methods does nothing because it couldn't fetch any data. Kindly help understanding why TRANSPORT_FROM_MODEL doesn't trigger when I click on the custom tab at PO header and how can I correct the same?
    Thanks,
    Manuel Chiarelli

    Hi Abhishek
    but how did You solve this problem. I have the same ...
    Kindly,
    Wolf-Peter

  • Capture refernce PO number in BADI ME_GUI_PO_CUST

    Hello all,
    I am workinmng on purchase order screen enhancement Using BADI ME_GUI_PO_CUST new custom fields are implemented and it is working fine.
    when i create new PO using reference PO ( dragging from document overview), need ot capture the reference PO number (EBELN) in this badi.
    let me know how it could be achieved .
    Thank you.

    Hello Mallikarjun,
    and what was the solution? I face the problem that I've implemented ME_GUI_PO_CUST and a Implementation of ME_PROCESS_PO_CUST is already in place but I can't see my own tab folder.
    Do you know more about this?
    Any help is appreciated.
    Kind regards....
    ...Hans

  • ME21N  ~~BADI - ME_GUI_PO_CUST ,can we have more than cust feilds.

    Hi Experts.....
    I have implemented a BADI named ME_GUI_PO_CUST and ME_PROCESS_PO_CUST in ME21N Transaction to add custom fields. With this I could get an extra custom tab in which I have included 7 Custom fields.
    Now my new req is to get add 8 more new feilds . but in the second method of the BADI -ME_GUI_PO_CUST i.e ....MAP_DYNPRO_FIELDS we have only 10 customer feilds available to be mapped .i ,e MMMFD_CUST_01 --- MMMFD_CUST_02 -
    MMMFD_CUST_03 .....to ......MMMFD_CUST_10 .
    So the Problem is how to map my remaining 5 feilds ..
    Is it possible to add more than 10 feilds in the Customer subscreen .If so please help me do it .
    Thank you in advance

    Subodh ,
    Yes You can use the BADI for header area as well .
    In the BADI Implementation , the first method in the interface - IF_EX_ME_GUI_PO_CUST~SUBSCRIBE
    there is an check for wether the BADI is meant for header or item .
    Code----
    we want to add a customer subscreen on the item detail tab
      CHECK im_application = 'PO'.
      CHECK im_element     = 'ITEM'.
    Code----
    And i have debugged , it triggers for header as well.
    so just change CHECK im_element  = 'ITEM'. to CHECK im_element  =  'HEADER'.
    It will work for header as well.
    Regards ,
    Rajesh .

  • BADI   ME_GUI_PO_CUST  Data Updation Query

    Hi
    I am adding Subscreen in PO at item level by using BADI ME_GUI_PO_CUST , subscreen is successfully implemented and
    visible at item level and the table which i have made for collecting the customer data but Z table is not populated.
    I have made changes to following interfaces
    SUBSCRIBE
    MAP_DYNPRO_FIELDS
    TRANSPORT_FROM_MODEL
    TRANSPORT_TO_DYNP
    TRANSPORT_FROM_DYNP
    TRANSPORT_TO_MODEL
    EXECUTE
    So what steps i will follow to update the data in Z table.
    Ankesh Jindal
    Edited by: Ankesh Jindal on Aug 20, 2009 12:28 PM
    Edited by: Ankesh Jindal on Aug 20, 2009 12:29 PM

    HI,
    Use the perform
    perform set_header_data(saplmepo) using ekko.
    Thanks,
    Shailaja Ainala.

  • Implementing badi ME_GUI_PO_CUST

    Hi,
    I created implementation for the badi ME_GUI_PO_CUST.
    In the method IF_EX_ME_GUI_PO_CUST~SUBSCRIBE
    I've written the below code
    DATA: ls_subscriber LIKE LINE OF re_subscribers.
      CHECK im_application = 'PO'.
      CHECK im_element     = 'HEADER'.
      CLEAR re_subscribers[].
      ls_subscriber-name = subscreen1.
      ls_subscriber-dynpro = '9000'.
      ls_subscriber-program = 'SAPMZTEST'.
      ls_subscriber-struct_name = 'MEPO_BADI_STRUCT'.
      ls_subscriber-label = 'New'.
      ls_subscriber-position = 5.
      ls_subscriber-height = 7.
      APPEND ls_subscriber TO re_subscribers.
    I've created one module pool program SAPMZTEST and a sub screen 9000 for that program .
    If it is not the correct procedure pls guide me.
    I could not see  a new tab in PO header. Could anyone pls let me know what should I do to get a new tab?
    Thanks,
    Poornima

    Hi,
    I have added tab in the header of the purchase oder and it is displaying in me21n, me22n and me23n.
    this tab contains three fields buyer name,buyer id,buyer phone no, this fields are appended in the ci_ekkodb structure of ekko.
    now the data is not saving in the database.
    i have created a table ci_ekkodb in function group zmepobadix in top include and created two function modules
    zdata_push and zdat_pop
    the code what i had return in methods of me_gui_po_cust is
    transport_from_model:----
    DATA: l_item       TYPE REF TO if_purchase_order_item_mm,
            ls_header type ref to if_purchase_order_mm,
            ls_mepoheader type mepoheader,
            ls_mepoitem  TYPE mepoitem,
            ls_customer  TYPE CI_EKKODB,
            DYNP_DATA_PBO type CI_EKKODB.
      case im_name.
        when subscreen1.
          mmpur_dynamic_cast ls_header im_model.
          check not ls_header is INITIAL.
         ls_mepoheader = ls_header->get_data( ).
    MOVE-CORRESPONDING ls_mepoheader TO dynp_data_pbo.
    WHEN OTHERS.
    ENDCASE.
    transport_to_dynp----
    DATA : DYNP_DATA_PBO TYPE CI_EKKODB.
       CASE im_name.
        WHEN subscreen1.
         CALL FUNCTION 'ZMEPOBADIEX_PUSH'
           EXPORTING
             im_dynp_data = dynp_data_pbo.
    CALL FUNCTION 'ZDATA_PUSH'
      EXPORTING
        im_dynp_data       = dynp_data_pbo.
        WHEN OTHERS.
      ENDCASE.
    transport_from_dynp----
    CONSTANTS :mmpur_yes                 TYPE c VALUE 'X'.
      DATA : DYNP_DATA_PAI TYPE CI_EKKODB,
             DYNP_DATA_PBO TYPE CI_EKKODB.
      CASE im_name.
        WHEN subscreen1.
    CALL FUNCTION 'ZDATA_POP'
    IMPORTING
       EX_DYNP_DATA       = dynp_data_pai.
          IF dynp_data_pai NE dynp_data_pbo.
    something has changed therefor we have to notify the framework
    to transport data to the model
            re_changed = mmpur_yes.
          ENDIF.
        WHEN OTHERS.
      ENDCASE.
    transport_to_model----
    DATA: l_item       TYPE REF TO if_purchase_order_item_mm,
             ls_header type REF TO if_purchase_order_mm,
             ls_mepoheader type mepoheader,
             ls_mepoitem  TYPE mepoitem,
             ls_customer  TYPE CI_EKKODB,
             dynp_data_pai TYPE CI_EKKODB,
             dynp_data_pbo TYPE CI_EKKODB.
       CASE im_name.
        WHEN subscreen1.
    mmpur_dynamic_cast ls_header im_model.
    check not ls_header is INITIAL.
         ls_mepoheader = ls_header->get_data( ).
      IF dynp_data_pbo-zzbuyer NE dynp_data_pai-zzbuyer OR
         ls_mepoheader-zzbuyer = dynp_data_pai-zzbuyer.
                 ls_header->set_data( ls_mepoheader ).
      endif .
    IF dynp_data_pbo-zzmail NE dynp_data_pai-zzmail OR
         ls_mepoheader-zzmail = dynp_data_pai-zzmail.
                 ls_header->set_data( ls_mepoheader ).
    endif.
    IF dynp_data_pbo-zzphone NE dynp_data_pai-zzphone OR
         ls_mepoheader-zzphone = dynp_data_pai-zzphone.
                 ls_header->set_data( ls_mepoheader ).
    endif.
    IF dynp_data_pbo-zzextno NE dynp_data_pai-zzextno OR
         ls_mepoheader-zzextno = dynp_data_pai-zzextno.
                 ls_header->set_data( ls_mepoheader ).
    ENDIF.
    WHEN OTHERS.
      ENDCASE.
    I'm not undustanding y the data is not saving in the database.
    Please help.
    Thanks in advance.
    Regards,
    Archana.

  • SOLUTION: tab not showing in ME21N/ME22N with badi ME_GUI_PO_CUST

    Hi,
    I implemented BADI's ME_GUI_PO_CUST and ME_PROCESS_PO_CUST to show a custom tab in the header section of ME21N, ME22N and ME23N.
    But after implementing the BADI's, the tab showed up in ME23N, but not in ME21N and ME22N.
    So I started looking for a solution in the SDN forum, and I saw that there were a LOT of people with the same problem, but nobody ever posted a solution.
    So here is the solution:
    So, I added the fields I wanted to show in the structure CI_EKKODB, implemented the BADI ME_GUI_PO_CUST (the methods SUBSCRIBE and MAP_DYNPRO_FIELDS), and the BADI ME_PROCESS_PO_CUST.
    After that the tab showed up in ME23N, not in ME21N or ME22N.
    So I found an SAP note saying the following:
    Question:
    I implemented the 'ME_GUI_PO_CUST' Business Add-In to display customer-
    specific tab titles in the EnjoySAP purchase order. They are only shown in display mode (ME23N) however, not in create or change. Why?
    Solution:
    You may have forgotten to assign a field status to the user-defined fields on these tabs. As a result, the system automatically interprets the field status as 'hidden' in create and change modes. However if a tab contains only hidden fields, then the entire tab is set to hidden. In display mode, fields without a field status are automatically set to display. That is why the tab is displayed in this case.
    To assign a field status to the user-defined fields, use the methods provided for this purpose in the Business Add-In 'ME_PROCESS_PO_CUST' (compare sample source code in the FIELDSELECTION_ITEM method).
    So in my case, I had to add some code to the  FIELDSELECTION_HEADER method of the BADI ME_PROCESS_PO_CUST.
    This is the code:
    method IF_EX_ME_PROCESS_PO_CUST~FIELDSELECTION_HEADER.
      DATA: l_persistent TYPE mmpur_bool.
      FIELD-SYMBOLS: <fs> LIKE LINE OF ch_fieldselection.
    * if the item is already on the database, we disallow to change field badi_bsgru
      l_persistent = im_header->is_persistent( ).
    *   IF l_persistent EQ mmpur_yes.
        READ TABLE ch_fieldselection ASSIGNING <fs> WITH TABLE KEY metafield = mmmfd_cust_01.
        IF sy-subrc IS INITIAL.
          <fs>-fieldstatus = '*'. " Input
        ENDIF.
    *   ENDIF.
    endmethod.
    But then, I realized that this BADI was never triggered. When I entered one of the transaction codes ME21N, ME22N or ME23N, the code in the fieldselection_header method was never executed.
    So I went to transaction SE18, and entered ME_PROCESS_PO_CUST in 'Enhancement Spot' and pushed the button display.
    And there in the tab 'Enhancement Implementations', I saw an implementation that was not mine, and that did not show up in the overview of the SE18 'BADI NAME' tab for the same BADI... which to me seems strange.
    So as you may know, there can never be more than one active implementation of the BADI ME_PROCESS_PO_CUST.
    So I disactivated my implementation and put my code in the existing implementation.
    And after that it worked!

    implement first badi :ZME_GUI_PO_CUST:
    METHOD if_ex_me_gui_po_cust~subscribe.
    DATA: ls_subscriber LIKE LINE OF re_subscribers.
    * we want to add a customer subscreen on the item detail tab
       CHECK im_application = 'PO'.
       CHECK im_element     = 'HEADER'.
    * each line in re_subscribers generates a subscreen. We add one subscreen in this example
       CLEAR re_subscribers[].
    * the name is a unique identifier for the subscreen and defined in this class definition
       ls_subscriber-name = subscreen1.
    * the dynpro number to use
       ls_subscriber-dynpro = '0001'.
    * the program where the dynpro can be found
       ls_subscriber-program = 'SAPLMEPOBADIEX'.
    * each subscreen needs his own DDIC-Structure
       ls_subscriber-struct_name = 'MEPO_BADI_STRUCT'.
    * a label can be defined
       ls_subscriber-label = text-001.
    * the position within the tabstrib can be defined
       ls_subscriber-position = 4.
    * the height of the screen can be defined here. Currently we suport two screen sizes:
    * value <= 7 a sevel line subscreen
    * value > 7  a 16 line subscreen
       ls_subscriber-height = 7.
       APPEND ls_subscriber TO re_subscribers.
    ENDMETHOD.
    implement 2nd badi : ZME_PROCESS_PO_CUST:
    method IF_EX_ME_PROCESS_PO_CUST~FIELDSELECTION_HEADER.
       DATA: l_persistent TYPE mmpur_bool.
       FIELD-SYMBOLS: <fs> LIKE LINE OF ch_fieldselection.
    * if the item is already on the database, we disallow to change field badi_bsgru
       l_persistent = im_header->is_persistent( ).
    *   IF l_persistent EQ mmpur_yes.
         READ TABLE ch_fieldselection ASSIGNING <fs> WITH TABLE KEY metafield = mmmfd_cust_01.
         IF sy-subrc IS INITIAL.
           <fs>-fieldstatus = '*'. " Input
         ENDIF.
    *   ENDIF.
    endmethod.

  • Additional tab at header level  in ME21N through BADI ME_GUI_PO_CUST

    Hi,
    I want to have additional tab at header level  in ME21n through BADI ME_GUI_PO_CUST.  But after all effort I am not getting display of  tab.  Let me explain what i did till now
    1. Appended  table EKKO with field
    2. Create one function Group -under that
    A. Created one Include u2013Paste the code given
    DATA: call_subscreen   TYPE sy-dynnr,
          call_prog        TYPE sy-repid,
          call_view        TYPE REF TO cl_screen_view_mm,
          call_view_stack  TYPE REF TO cl_screen_view_mm OCCURS 0,
          global_framework TYPE REF TO cl_framework_mm,
          global_help_view TYPE REF TO cl_screen_view_mm,
          global_help_prog TYPE sy-repid.
    FORM SET_SUBSCREEN_AND_PROG *
    --> DYNNR *
    --> PROG *
    --> VIEW *
    --> TO *
    --> CL_SCREEN_VIEW_MM *
    FORM set_subscreen_and_prog USING dynnr TYPE sy-dynnr
    prog TYPE sy-repid
    view TYPE REF TO cl_screen_view_mm.
    call_subscreen = dynnr.
    call_prog = prog.
    call_view = view.
    ENDFORM. "set_subscreen_and_prog
    B. Created one screen  (9000)
    3. Implemented BADI ME_GUI_PO_CUST and paste the code.
    data: ls_subscribe like line of re_subscribers.
    CHECK im_application = 'PO'.
    CHECK im_element = 'HEADER'.
    CLEAR re_subscribers[].
    ls_subscribe-name = ' ZMMSCR1'.
    ls_subscribe-dynpro = '9000'.
    ls_subscribe-program = ' ZMMSCR1'.
    ls_subscribe-struct_name = 'EKKO'.
    ls_subscribe-label = text-001..
    ls_subscribe-position = 15.
    ls_subscribe-height = 7.
    append ls_subscribe to re_subscribers.
    Please help me what s going wrong .and what else I will do to get success.
    Edited by: Vishal A Vijaywargia on Jul 29, 2009 2:24 AM

    Hi Prosengit,
    I am not aure about u r BADI,
    BUt last week i have custom tab in the PO header data using this enahncement 'MM06E005'.
    IN thi senhancement u have thrre screen exits.In this enhancement
    SAPMM06E        0111 CUSTSCR1 SAPLXM06        0111 Subscreen: PO item
    u can add subscreen and u can add u r own fields here .
    and u can write u r code in 'EXIT_SAPMM06E_006'.
    if u want to change the title of the program.
    Go to program SAPLXM06 then go to text element give text symbol no as '111' and u can change the title of u r tab.
    I hope this solves u r problem.

Maybe you are looking for

  • Report for login and logout time

    Dear All, Please can some one help me urgently. I have to find out users login and logout time over the last six months. I need to find out how many hours per user are being used.  What report do I need to run to find out ?

  • Opening a Portal page from UWL item's click

    Hi, I have written a custom UWL connector that connects to 3rd party system to fetch tasks. This custom connector has  been registered with UWL and tasks from this 3rd party system are now appearing in my UWL. The requirement is to open a Portal page

  • Flickering problem in Ipad 2?

    Flickering screen on my iPad 2.  It also presses buttons on its own.

  • Vendor cash discount

    Hi experts please give me solution for how to calculate the cash discount on vendor line items as per the payment term within 30 days  15% cash discount , if we pay the amount before due date(any day from 1 to 30 days) we will receive the cash discou

  • Continuing... to select more points or items in illustrator with click shift and drag?

    OK, here is the dilemma, and i bet there is a nifty shortcut to it. We all know how to continue select say object or points within illustrator yes, in saying this we will select one point, and then use thte mouse to select more points by covering spa