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

Similar Messages

  • Error while implementing BADI ME_GUI_PO_CUST

    Hi Experts,
    My requirment is to add a new tab in ME21N screen.We have to implement the BADI ME_GUI_PO_CUST and methods SUBSCRIBE and MAP_DYNPRO_FIELDS will create a new tab.however i have got a problem in method MAP_DYNPRO_FIELDS.
    i have defined 2 z fields and i have appended it in EKKo as well.now in method MAP_DYNPRO_FIELDS i have written the code like this...
    LOOP AT ch_mapping ASSIGNING <mapping>.
        CASE <mapping>-fieldname.
          WHEN 'ZZPAYMENT_AGRE'.      <mapping>-metafield =mmmfd_cust_03.      "mmmfd_mat_grp.
          WHEN 'ZZPROJECT'.           <mapping>-metafield = mmmfd_cust_04.
        ENDCASE.
      ENDLOOP.
    if i do like that...it's not displaying the new tab but when i replace any of the custome fields(mmmfd_cust_03,mmmfd_cust_04) with  "mmmfd_mat_grp.it is displaying the new tab.
    can any one tell me what is the wrong in my code.

    solved by myself

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

  • 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

  • Problem after Implementing BADI

    Hi all,
    I implemented BADI MB_MIGO_BADI  it was working fine, but it was deleted
    and again trying to implement second time it is showing the message
    Implementation ZTEST_MIGO migrated (see long
    for instructions) and choose enhancement spot and i implemented the BADI but
    this time it is not triggering.
    what might  be the problem any help?
    Thanks
    Satish.

    Dear Satish,
    Once u implement  a BADI in ECC it will automatically generates the Enchament Spot. Here u deleted ur BADI implementation. Ur BADI got deleted and the enhancement for tht not get deleted. Thts y its showing error when  u r creating the second time. So implement ur badi inside the Enhancement Spot using SE19.
    With Regards,
    Sumodh.P

  • 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

  • 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

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

  • 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

  • BADI ME_GUI_PO_CUST in PO Creation

    hello people,
    I am having some trouble implementing BADI ME_GUI_PO_CUST.
    i have this code in my subscribe method.
    CHECK IM_APPLICATION = 'PO'.
    IF IM_ELEMENT     = 'ITEM'.
      CLEAR RE_SUBSCRIBERS[].
      LS_SUBSCRIBER-NAME = subscreen1.
      LS_SUBSCRIBER-DYNPRO = '0001'.
      LS_SUBSCRIBER-PROGRAM = 'SAPLMEPOBADIEX'. 
      LS_SUBSCRIBER-STRUCT_NAME = 'ZPOTBL'.
      LS_SUBSCRIBER-LABEL = 'SANDEEP'.
      LS_SUBSCRIBER-POSITION = 1.
      LS_SUBSCRIBER-HEIGHT = 7.
      APPEND LS_SUBSCRIBER TO RE_SUBSCRIBERS.
    ENDIF.
    Now i have gone to this program SAPLMEPOBADIEX in Screen Painter and on this particular screen, it has fields
    like
    MEPO_BADI_STRUCT-BADI_BSGRU
    MEPO_BADI_STRUCT-BADI_AFNAM
    MEPO_BADI_STRUCT-PLIFZ and so on
    now i have created a structure ZPOSTRUC with following fields
    ebeln, ebelp, rdate.
    the problem i m getting is, upon displaying the screen, under my customer tab. i m getting the standard fields.
    Now my question is, do i have to design the screen with all the fields and refer the program here, cos i tried that alreadyand it doesnt work.
    any help would be rewarded
    regards,
    sandeep salaria

    Hi,
    I think the worked one is the example given by SAP it seems am i rt?
    Anyway you can achieve this by using two methods not just the 'Subscribe' method.
    First create a structure with the required fields and then Create a screen using the same fields (it should be sub screen) and then mention the screen number and program name and structure name as mentioned in the example code of this method.
    Next you have to implement the next method 'MAP_DYNPRO_FIELDS'.
    And inside this write your code as mentioned below
    FIELD-SYMBOLS: <mapping> LIKE LINE OF ch_mapping.
      LOOP AT ch_mapping ASSIGNING <mapping>.
        CASE <mapping>-fieldname.
    WHEN 'WEEKNO'. <mapping>-metafield = mmmfd_cust_01.
    WHEN 'HRSWKED'. <mapping>-metafield = mmmfd_cust_02.
    WHEN 'HRLYRATE'. <mapping>-metafield = mmmfd_cust_03.
        ENDCASE.
      ENDLOOP.
    Use your fields names instead of the mentioned one and You can go on increasing the mmmfd_cust_01 variable to mmmfd_cust_09
    And activate the implementation.
    Reward points if it helpful.
    Regards,
    Prasanna

  • 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

  • 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

  • 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

  • Problem in Implementing Filter BADI

    Hi Experts ,
               I have a problem in Implementing Standard BADI  OIJ_NOMIT_VALIDATION , this one is a Filter BADI , with Filter type OIJ_NOMITEM_CHCK . i created a implementation ZOIJ_NOMIT_VALIDATION with filter ZOIJ_NOMIT and write code in method VALIDATE . But this is not triggered. Any additional configuration needed for this ?
    Point will be awarded .
    Thanks and regards
    Renjith MP

    Hi Ranjit,
                  After implementing the Filter BADI.You can define the Filter type <b>attributes</b> section.
    Regards

  • Implementing BADI TRIP_WEB_NUMBER, problem reading a field

    Hi All,
    Have anyone implemented BADI TRIP_WEB_NUMBER before,
    Interface : IF_EX_TRIP_WEB_NUMBER
    Method:     USER_EXIT_NUMBER_INTERNAL
    I need a help.
    In this method i have exporting parameter NUMBER_RANGE TYPE INRI-NRRANGENR
    so my requirement is just to change this parameter for particular conditon.
    Problem is to make condition i need a field SCHEMA
    You can check Structure HEAD_PERIO-SCHEM
    or elset T706S OR T706T...
    I need to read that field at runtime somehow, how can i achieve that pls help.
    i can able to read only the date....
    Pls help..
    Thanks

    Find out the main program name where the variable HEAD_PERIO-SCHEMA is declared. Then you can use the ABAP call stack method to retrieve the variable like below. This method can only be used to read a variable from ABAP call stack memory, that is the variable should be available in the scope of the program which is present in the run time call stack your BADI gets called in.
    DATA: lv_name_xvbak(30)  VALUE   '(SAPMV45A)VBAK'.
    FIELD-SYMBOLS: <xvbak> TYPE  vbak.
    * Retrieve Sales order details from abap stack
    ASSIGN (lv_name_xvbak) TO <xvbak>.
    IF sy-subrc NE 0.
      EXIT.
    ENDIF.
    In the above code you can replace SAPMV45A with the main program name where field SCHEMA is available and VBAK with HEAD_PERIO (the structure or internal table where the field you want is available)
    For accessing internal tables similarly
    DATA:  lv_name_xvbap(30)  VALUE   '(SAPMV45A)XVBAP[]'.
    FIELD-SYMBOLS: <xvbap> TYPE TABLE OF vbap.
    ASSIGN (lv_name_xvbap) TO <xvbap>.
    IF sy-subrc NE 0.
      EXIT.
    ENDIF.

Maybe you are looking for