BADI ME_GUI_PO_CUST for PO screen

Hello,
I need to add a button to the ME21n/22/23 transaction to call my own screens. I am trying to identify some screen enhancements through which I can add my push button. I am working on ERP2005. I identified badi ME_GUI_PO_CUST, but it does not have a subscreen name in the subscreens tab. Does that mean that I need to modify the standard to include the subscreen. I am doing the screen enhancements for the first time and would appreciate your opinion. Please let me know if there is any other badi which is best suited for this requirement.
Thanks in advance.
Regards
Malthi

Hi Malthi
Even if you have a subscreen you cannot place a button in the subscreen. You can place only input/output fields only on a subscreen.
So, you can try for a menu-exit and from there call you own screens.
If you don't find any menu-exit you have to go for a modification only.
Regards
Surya.

Similar Messages

  • Error in badi ME_GUI_PO_CUST for ME21n/22n/23n

    Dear All,
    I want to add 1 tab in ME21n/22n/23n.
    In that 2 field in EKKO table using ci_ekkodb include is add
    For that I use badi ME_GUI_PO_CUST.
    in that
    MAP_DYNPRO_FIELDS
    TRANSPORT_FROM_MODEL
    TRANSPORT_TO_DYNP
    TRANSPORT_FROM_DYNP
    TRANSPORT_TO_MODEL
    these method find error do to field name passing.
    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 'ZZDEPT'.                                            " Field Name
              <mapping>-metafield = mmmfd_cust_03.
            WHEN 'ZZPOGR'.                                            " Field Name
              <mapping>-metafield = mmmfd_cust_04.
          ENDCASE.
        ENDLOOP.
    endmethod.
    Referening **************** - Step by step guide on adding a new tab in ME21N using a BADI
    Replay is appreciable.
    Regards,
    Pooja

    First you go to se18 and read documentation of this badi.
    You have to implement BAdI ME_PROCESS_PO_CUST before implementing this BAdI.
    Sample code is available here.... goto->sample code->display
    In case any doubt u ask..
    Regards
    Sreekanth

  • Implementation Of Badi ME_GUI_PO_CUST for adding fields in Purchase Order

    Hi All
       I am implementing BADI ME_GUI_PO_CUST / ME_PROCESS_PO_CUST to add additional fields in Purchase Order.
    The implementation of the BADI ie the Subscreen of the fields to be added appears in  transaction ME23N but it does not appear in the transaction ME22N and ME21N.
    Can anyone help me on this.
    Thanx.
    Moderator message - Duplicate post locked
    Edited by: Rob Burbank on Jul 10, 2009 12:10 PM

    check the answer
    [New tabs added by Badi ME_GUI_PO_CUST not seen in ME21N and ME22N;
    bye

  • Create new tab in header using badi ME_GUI_PO_CUST for tcode ME21N

    Dear all,
    i have implemented method SUBSCRIBE in ME_GUI_PO_CUST to create new tab in ME21N,
    but the tab is not coming
    following is the code snips, please tell where is the error, or some setting needs to be done
    method IF_EX_ME_GUI_PO_CUST~SUBSCRIBE.
    DATA: ls_subscriber LIKE LINE OF re_subscribers.
    if sy-tcode eq ' ME21N' OR SY-TCODE EQ 'ME22N' OR SY-TCODE EQ 'ME23N'.
      CHECK im_application = 'PO'.
      CHECK im_element     = 'HEADER'.
    CLEAR re_subscribers[].
      ls_subscriber-name = 'Customer-Data'.
      ls_subscriber-dynpro = '0101'.
      ls_subscriber-program = 'SAPLMEGUI'.
      ls_subscriber-struct_name = 'MEPO_SUBSCRIBERS'.
      ls_subscriber-label = 'Customer Data'.
      ls_subscriber-position = 10.
      ls_subscriber-height = 7.
      APPEND ls_subscriber TO re_subscribers.
    ENDIF.
    endmethod.
    Regards
    Sumodh

    Hi...I hv similar requirement.
    I need to show a custom field in the screen for the items.
    I tried using the methods "SUBSCRIBE" and "MAP_DYNPRO_FIELDS" as explained in the sample code.
    Below is my code. I have copied the sample code and changed it lil.
    Method "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     = 'ITEM'.
    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 = '9000'.
    the program where the dynpro can be found
      ls_subscriber-program = 'SAPLZMMPO1'.
    each subscreen needs his own DDIC-Structure
      ls_subscriber-struct_name = 'ZMM_PO_CUST_SCREEN'.
    a label can be defined
      ls_subscriber-label = text-t01.
    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.
    method "MAP_DYNPRO_FIELDS":
      FIELD-SYMBOLS: <mapping> LIKE LINE OF ch_mapping.
    *- customer fields
      CONSTANTS: mmmfd_cust_01 TYPE mmpur_metafield VALUE 90000000.
      LOOP AT ch_mapping ASSIGNING <mapping>.
        CASE <mapping>-fieldname.
          WHEN 'CLMNO'. <mapping>-metafield = mmmfd_cust_01.
        ENDCASE.
      ENDLOOP.
    I created a function group - "ZMMPO1" and created the subscreen 9000 in that. I placed the custom field in that screen. Tha main program of ZMMPO1 is "SAPLZMMPO1".
    I created a structure also - "ZMM_PO_CUST_SCREEN".
    I want to know whether this is sufficient to display the tab on the screen or am I missing something.
    It is mentioned that the implementation of "ME_PROCESS_PO_CUST" is a pre-requisite.
    could you lemme know the process please.
    Thanks,
    Ram.

  • 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

  • Added custom screen in PO using BADI ME_GUI_PO_CUST and ME_PROCESS_PO_CUST

    Hi All,
    I have added custom screen with two z fields at item level using BADI ME_GUI_PO_CUST and ME_PROCESS_PO_CUST i can see my screen in tcodes ME21N , ME22N , ME23N but I am not able to save data.
    and also screen is coming in change mode even in ME23N .
    thanks.

    Hi,
    I have added two xfields at item level.
    This is the code i have added in zimplementation ZME_GUI_PO_CUST .
    IN Zimplementation ME_PROCESS_PO_CUST I have added code only in method FIELDSELECTION_ITEM . after doing this I can see only screens in ME21N, ME22N, ME23N but when enter data in zfields and trying to save it is giving me message no data has changed.
    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     = 'ITEM'.
    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 = 'SAPLYMEPOBADIEX'.
    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.
      ENDIF.
    method IF_EX_ME_GUI_PO_CUST~TRANSPORT_FROM_MODEL.
      DATA: l_item       TYPE REF TO if_purchase_order_item_mm,
            ls_mepoitem  TYPE mepoitem,
            ls_customer  TYPE mepo_badi_exampl.
    system asks to transport data from the business logic into the view
      CASE im_name.
        WHEN subscreen1.
    is it an item? im_model can be header or item.
          mmpur_dynamic_cast l_item im_model.
          CHECK NOT l_item IS INITIAL.
    transport standard fields
          ls_mepoitem = l_item->get_data( ).
    transport customer fields
          CALL FUNCTION 'YMEPOBADIEX_GET_DATA'
            EXPORTING
              im_ebeln = ls_mepoitem-ebeln
              im_ebelp = ls_mepoitem-ebelp
            IMPORTING
              ex_data  = ls_customer.
    store info for later use
          MOVE-CORRESPONDING ls_mepoitem TO dynp_data_pbo.
          MOVE ls_customer-badi_bsgru TO dynp_data_pbo-badi_bsgru.
          MOVE ls_customer-badi_afnam TO dynp_data_pbo-badi_afnam.
        WHEN OTHERS.
      ENDCASE.
    endif.
    method IF_EX_ME_GUI_PO_CUST~TRANSPORT_TO_DYNP.
      CASE im_name.
        WHEN subscreen1.
          CALL FUNCTION 'YMEPOBADIEX_PUSH'
            EXPORTING
              im_dynp_data = dynp_data_pbo.
        WHEN OTHERS.
      ENDCASE.
    ENDIF.
    endmethod.
    method IF_EX_ME_GUI_PO_CUST~TRANSPORT_FROM_DYNP.
      CASE im_name.
        WHEN subscreen1.
          CALL FUNCTION 'YMEPOBADIEX_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.
    ENDIF.
    endmethod.
    method IF_EX_ME_GUI_PO_CUST~TRANSPORT_TO_MODEL.
    DATA: l_item       TYPE REF TO if_purchase_order_item_mm,
            ls_mepoitem  TYPE mepoitem,
            ls_customer  TYPE mepo_badi_exampl.
    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_item im_model.
          CHECK NOT l_item IS INITIAL.
          ls_mepoitem = l_item->get_data( ).
    standard fields changed?
         IF dynp_data_pbo-matkl NE dynp_data_pai-matkl OR
            dynp_data_pbo-plifz NE dynp_data_pai-plifz OR
            dynp_data_pbo-webaz NE dynp_data_pai-webaz.
    update standard fields
           ls_mepoitem-matkl = dynp_data_pai-matkl.
           ls_mepoitem-plifz = dynp_data_pai-plifz.
           ls_mepoitem-webaz = dynp_data_pai-webaz.
            CALL METHOD l_item->set_data( ls_mepoitem ).
         ENDIF.
            CALL FUNCTION 'YMEPOBADIEX_GET_DATA'
              EXPORTING
                im_ebeln = ls_mepoitem-ebeln
                im_ebelp = ls_mepoitem-ebelp
              IMPORTING
                ex_data  = ls_customer.
            ls_customer-badi_bsgru = dynp_data_pai-badi_bsgru.
            ls_customer-badi_afnam = dynp_data_pai-badi_afnam.
            CALL FUNCTION 'YMEPOBADIEX_SET_DATA'
              EXPORTING
                im_data = ls_customer.
         ENDIF.
        WHEN OTHERS.
      ENDCASE.
    ENDIF.
    method IF_EX_ME_PROCESS_PO_CUST~FIELDSELECTION_ITEM.
    DATA: l_persistent TYPE mmpur_bool.
    CONSTANTS:
    FIELD-SYMBOLS: <fs> LIKE LINE OF ch_fieldselection.
    l_persistent = im_item->is_persistent( ).
    *IF l_persistent EQ mmpur_yes.
    READ TABLE ch_fieldselection ASSIGNING <fs> WITH TABLE KEY
                         metafield = MMMFD_YYMAN_NUM."fd_cust_01.
    IF sy-subrc IS INITIAL.
    <fs>-fieldstatus = '*'. " Display <-- this one was as per the sample code given.
    <fs>-fieldstatus = '+'. " Input <-- this i added to make the field mandatory.
    ENDIF.
    READ TABLE ch_fieldselection ASSIGNING <fs> WITH TABLE KEY
                         metafield = MMMFD_YYMAN_DES."fd_cust_01.
    IF sy-subrc IS INITIAL.
    <fs>-fieldstatus = '*'. " Display <-- this one was as per the sample code given.
    <fs>-fieldstatus = '+'. " Input <-- this i added to make the field mandatory.
    ENDIF.
    *ENDIF.
    ENDIF.
    endmethod.

  • 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.

  • Customer screen using BADI :  ME_GUI_PO_CUST

    Hi
    I am implementing BADI : ME_GUI_PO_CUST to create custom screen at item level.
    Pls tell me the steps to be followed to get custom screen using BADI
    Thanks
    Vinay.

    Hi Vinay,
    go to transaction SE18, then enter your BADI.The in menu go to Goto -> Sample Code -> Display. You will see example of implementation of this BADI. All these examples are very well commented. Basically you will have to create your own function group with your new screen and call this screen from methods of BADI.
    Cheers

  • Custom screen not displaying using BADI ME_GUI_PO_CUST

    Hello Experts,
    I was working on BAD ME_GUI_PO_CUST to add custom subscreen on header
    I have created a subscreen ZNRD_SAPMEGUI_PO with number 9999.
    I have created implementation of ME_GUI_PO_CUST as ZME_GUI_PO_CUST.
    I have added screen details to the BADI.as follows
    CALLPROGRAM = SAPLMEGUI.
    Scr No = 1102
    Subscreen area = TABSTRIPCONTROL2SUB
    Program called = ZNRD_SAPMEGUI_PO
    Scr no = 9999.
    Now to the method SUBSCRIBE to the implemented BADI ZME_GUI_PO_CUST
    I have wriiten the following codes.
    method if_ex_me_gui_po_cust~subscribe.
    data: ls_subscriber like line of re_subscribers.
    if sy-tcode eq ' ME21N' or sy-tcode eq 'ME22N' or sy-tcode eq 'ME23N'.
    check im_application = 'PO'.
    check im_element = 'HEADER'.
    * CLEAR re_subscribers[].
    ls_subscriber-name = 'ZNRD_SAPMEGUI_PO'.
    ls_subscriber-dynpro = '9999'.
    ls_subscriber-program = 'SAPLMEGUI'.
    *ls_subscriber-struct_name = 'MEPO_SUBSCRIBERS'.
    ls_subscriber-label = 'Customer Data'.
    ls_subscriber-position = 10.
    ls_subscriber-height = 7.
    append ls_subscriber to re_subscribers.
    endif.
    endmethod.
    BADI is active
    Now when irun ME21N i dont see the additional custom tab on header coming up.
    Please guide will be appreciated.
    Regards,
    Ranjith

    Hi
    I have been through the documentation friends still I am unable to go ahead thats the I am seeking your help.
    Please guide.
    Shailaja could you please explain why do i need to use the user-exit  MM06E005 when I am using the BADI.
    Regards,
    Ranjith N

  • Required BADI for Overiew screen of PA20 and PA30

    Dear All,
    I need BADI for Overiew screen of PA20 screen as i have to restrict end user not to see the data.
    As of know i am able to see the BADI for display but not able to find the BADI for overview.
    Thanks
    Rav Jordan

    Hi,
        For pa20 screen Check with this badi  HRPAD00AUTH_CHECK.
    I hope it is useful to u.

  • Badi for fv05 screen exit

    hi all,
    i am finding the badi for fv05 screen exit.
    please tell me the badi for fv05 screen exit.
    thanks
    Sachin
    Edited by: Sachin Gupta on Jul 1, 2009 4:00 PM

    S0006595706 wrote:>
    > hi all,
    >
    > i am finding the badi for fv05 screen exit.
    >
    > please tell me the badi for fv05 screen exit.
    >
    >
    > thanks
    > Sachin
    >
    > Edited by: Sachin Gupta on Jul 1, 2009 4:00 PM
    Hi,
      Please use the following program to find out exits and badis by entering tcode to the program
    *& Report  Z_FIND_USEREXIT
    report  z_find_userexit.
    *&  Enter the transaction code that you want to search through in order
    *&  to find which Standard SAP User Exits exists.
    *& Tables
    tables : tstc,     "SAP Transaction Codes
             tadir,    "Directory of Repository Objects
             modsapt,  "SAP Enhancements - Short Texts
             modact,   "Modifications
             trdir,    "System table TRDIR
             tfdir,    "Function Module
             enlfdir,  "Additional Attributes for Function Modules
             tstct.    "Transaction Code Texts
    *& Variables
    data : jtab like tadir occurs 0 with header line.
    data : field1(30).
    data : v_devclass like tadir-devclass.
    *& Selection Screen Parameters
    selection-screen begin of block a01 with frame title text-001.
    selection-screen skip.
    parameters : p_tcode like tstc-tcode obligatory.
    selection-screen skip.
    selection-screen end of block a01.
    *& Start of main program
    start-of-selection.
    * Validate Transaction Code
      select single * from tstc
        where tcode eq p_tcode.
    * Find Repository Objects for transaction code
      if sy-subrc eq 0.
        select single * from tadir
           where pgmid    = 'R3TR'
             and object   = 'PROG'
             and obj_name = tstc-pgmna.
        move : tadir-devclass to v_devclass.
        if sy-subrc ne 0.
          select single * from trdir
             where name = tstc-pgmna.
          if trdir-subc eq 'F'.
            select single * from tfdir
              where pname = tstc-pgmna.
            select single * from enlfdir
              where funcname = tfdir-funcname.
            select single * from tadir
              where pgmid    = 'R3TR'
                and object   = 'FUGR'
                and obj_name = enlfdir-area.
            move : tadir-devclass to v_devclass.
          endif.
        endif.
    * Find SAP Modifactions
        select * from tadir
          into table jtab
          where pgmid    = 'R3TR'
            and object   = 'SMOD'
            and devclass = v_devclass.
        select single * from tstct
          where sprsl eq sy-langu
            and tcode eq p_tcode.
        format color col_positive intensified off.
        write:/(19) 'Transaction Code - ',
        20(20) p_tcode,
        45(50) tstct-ttext.
        skip.
        if not jtab[] is initial.
          write:/(95) sy-uline.
          format color col_heading intensified on.
          write:/1 sy-vline,
          2 'Exit Name',
          21 sy-vline ,
          22 'Description',
          95 sy-vline.
          write:/(95) sy-uline.
          loop at jtab.
            select single * from modsapt
            where sprsl = sy-langu and
            name = jtab-obj_name.
            format color col_normal intensified off.
            write:/1 sy-vline,
            2 jtab-obj_name hotspot on,
            21 sy-vline ,
            22 modsapt-modtext,
            95 sy-vline.
          endloop.
          write:/(95) sy-uline.
          describe table jtab.
          skip.
          format color col_total intensified on.
          write:/ 'No of Exits:' , sy-tfill.
        else.
          format color col_negative intensified on.
          write:/(95) 'No User Exit exists'.
        endif.
      else.
        format color col_negative intensified on.
        write:/(95) 'Transaction Code Does Not Exist'.
      endif.
    * Take the user to SMOD for the Exit that was selected.
    at line-selection.
      get cursor field field1.
      check field1(4) eq 'JTAB'.
      set parameter id 'MON' field sy-lisel+1(10).
      call transaction 'SMOD' and skip first screen.
    Edited by: Dande on Jul 1, 2009 2:27 PM
    Edited by: Dande on Jul 1, 2009 2:30 PM

  • 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.

  • 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

  • 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

Maybe you are looking for

  • Windows 7's Infection Rates Five Times Lower Than Windows XP

    "Windows 7's marketshare continues to grow at a steady pace at the expense of its two older siblings, Windows Vista and XP, according to the data from StatCounter. In terms of global usage, Windows XP is at 46.44%, Windows Vista at 12.5%, and Windows

  • MacBook Pro 1,1. OS X 10.6.8 Trying to connect an Edirol FA-101 via FireWire, Macbook not recognizing device.

    Hello, I'm trying to connect an Edirol FA-101 to my MacBook Pro. I'm running Snow Leopard 10.6.8. Other fireWire devices and drives work on the port, but the Edirol is not showing up in Audio MIDI setup or anywhere. I've tried both DC power and Bus p

  • Account Payable - Scheduled Payments

    Hello All, I am working in AP and need to identify any invoices that have a scheduled pay dates in the future. This must have to do with the AP_PAYMENT_SCHEDULES_ALL table. Metalink says almost nothig about these fields. (1) Is the "creation_date" th

  • Help in order by clause

    Hi, i have the following query.. SELECT 'EXERCISE_TYPE' AS entity_name, TO_CHAR(et.EXR_TYP_C) AS entity_code, et.EXR_TYP_T AS entity_description FROM EXERCISE_TYPE et, COMPANY_GROUP_EXERCISE_TYPE cget WHERE et.EXR_TYP_C = cget.EXR_TYP_C AND cget.ORG_

  • BI 7.0 webtemplates - How to save a bookmark

    Hi, In 3.x webtemplates/web reports we can save the bookmarks on the IE explorer current session directly(not going for FAVOURITES), where as in BI 7.0 webtemplates this functionality is not there. I want the same functionality to implement in BI 7 t