BADI enhancement for Enjoy PO Tcodes at "header level".

I could successfully add an item level tab to MEXXN PO tcodes. Somebody help me with the ME_GUI_PO_CUST and ME_PROCESS_PO implementations to add a customer field , say ZZ_ETYP in a separate header level tab "Expense type".
Do I need to add subscreen2 attribute to the implementing class ?
Will one structure do for both header and item level data ?
Do I need to create a separate table ( like ZMEPO_BADI_EXAMPL for items ) for the header also ?
It would be gr8 if i could get the code for the above BADIs and MEPOBADIEX's function modules.

Dear Iyer,
Kindly go through the code.. hope this will help you...
<b>DETAILED DATABASE DESIGN SPECIFICATIONS</b>
<b>1. ZTPTP_HEADER</b>
Header: Expense Type
Field Name     Field Type     Key Information     Field Description
MANDT     MANDT     X     Client
EBELN     EBELN     X     Purchasing Document Number
ZZ_EXPTYPE     ZZEXPTYPE          Expense Type
<b>2. ZTPTP_ITEM</b>
Item: Retainage
Field Name     Field Type     Key Information     Field Description
MANDT     MANDT     X     Client
EBELN     EBELN     X     Purchasing Document Number
EBELP     EBELP     X     Item Number of Purchasing Document
ZZ_RETAINAGE      ZZRETAINAGE           Retainage
<b>3. ZSPTP_HEADER</b>
PO Enhancement structure: Header
Field Name     Field Type     Key Information     Field Description
EBELN     EBELN          Purchasing Document Number
ZZ_EXPTYPE     ZZEXPTYPE          Expense Type
<b>4. ZSPTP_ITEM</b>
PO Enhancement structure: Item
Field Name     Field Type     Key Information     Field Description
EBELN     EBELN          Purchasing Document Number
EBELP     EBELP          Item Number of Purchasing Document
ZZ_RETAINAGE      ZZRETAINAGE           Retainage
Detailed logic
<b>LZPTP_PORETAINAGETOP (TOP INCLUDE) FG: ZPTP_PORETAINAGE</b>
persistent item data
data: git_persistent_data type sorted table of ztptp_item
                         with unique key mandt ebeln ebelp,
actual item data
      git_data            type sorted table of ztptp_item
                         with unique key mandt ebeln ebelp.
persistent header data
data: git_persistent_head type sorted table of ztptp_header
                         with unique key mandt ebeln ,
actual header data
      git_head            type sorted table of ztptp_header
                         with unique key mandt ebeln .
dynpro output structure
tables: zsptp_item,
        zsptp_header.
definitions required for dynpro/framework integration
data: ok-code type sy-ucomm.
Following is a SAP include.
include lmeviewsf01.
<b>1. ZPTP_COMMIT_HEADER FG: ZPTP_PORETAINAGE</b>
Get the sample function module code from the standard FM: MEPOBADIEX_COMMIT. In this Function module we update the database table ZTPTP_HEADER i.e. as per a change / insert or delete command at the header level. This database table’s size will always be low. It just contains the PO s data just being edited or created.
The interface would look like:
     TABLES
      IMT_DATA_NEWHD STRUCTURE ZTPTP_HEADER
      IMT_DATA_OLDHD STRUCTURE ZTPTP_HEADER
      Comparing the old and new data we update 3 different internal tables and using these we can update the internal tables ZTPTP_HEADER before actually updating the database table EKKO.A similar logic is coded in the sample FM : MEPOBADIEX_COMMIT
<b>
2. ZPTP_COMMIT_ITEM FG: ZPTP_PORETAINAGE</b>
Get the sample function module code from the standard FM: MEPOBADIEX_COMMIT. In this Function module we update the database table ZTPTP_HEADER i.e. as per a change / insert or delete command at the item level. This database table’s size will always be low. It just contains the PO s latest data just being edited or created.
The interface would look like :
     TABLES
       IMT_DATA_NEW STRUCTURE  ZTPTP_ITEM
  IMT_DATA_OLD STRUCTURE  ZTPTP_ITEM
      Comparing the old and new data we update 3 different internal tables and using these we can update the internal tables ZTPTP_HEADER before actually updating the database table EKPO. A similar logic is coded in the sample FM : MEPOBADIEX_COMMIT
<b>3. ZPTP_GET_DATA_HEADER FG: ZPTP_PORETAINAGE</b>
Get the sample function module code from the standard FM: MEPOBADIEX_GET_DATA. This FM is responsible for updating an internal table (git_head) which would hold the data the user has changed or created or displayed till the current point of time. It would also hold the latest customer header data that is to be displayed in case of a change transaction.
The interface would be as follows:
Local Interface:
IMPORTING
     REFERENCE(IM_EBELN) TYPE  EBELN
     REFERENCE(IM_EBELP) TYPE  EBELP OPTIONAL
EXPORTING
     REFERENCE(EX_HEAD) TYPE  ZTPTP_HEADER
Read expense type from git_header. If not found, get expense value from EKKO.
<b>4. ZPTP_GET_DATA_ITEM FG: ZPTP_PORETAINAGE</b>
Get the sample function module code from the standard FM: MEPOBADIEX_GET_DATA. This FM is responsible for updating an internal table (git_data) which would hold the data the user has changed or created or displayed till the current point of time. It would also hold the latest customer item data that is to be displayed in case of a change transaction.
The interface would be as follows:
Local Interface:
  IMPORTING
     REFERENCE(IM_EBELN) TYPE  EBELN
     REFERENCE(IM_EBELP) TYPE  EBELP
  EXPORTING
     VALUE(EX_DATA) TYPE  ZTPTP_ITEM
Read Retainage from git_data. If not found, get Retainage value from EKPO.
<b>5.  ZPTP_INIT FG: ZPTP_PORETAINAGE</b>
Get the sample function module code from the standard FM: MEPOBADIEX_INIT. This FM is responsible for clearing the header and item internal tables.
clear: git_persistent_data[], git_data[],git_persistent_head[],git_head[].
<b>6. ZPTP_OPEN FG: ZPTP_PORETAINAGE</b>
Get the sample function module code from the standard FM: MEPOBADIEX_OPEN.  This FM is responsible for existing information from respective database tables.
The interface would be as follows:
Local Interface:
IMPORTING
REFERENCE(IM_EBELN) TYPE  EBELN
Get Expense type and Retainage from customer created Tables and assign it to respective global internal tables.
<b>7.  ZPTP_POP_HEADER FG: ZPTP_PORETAINAGE</b>
Get the sample function module code from the standard FM: MEPOBADIEX_POP. This FM is responsible for getting header values from screen fields.
The interface would be as follows:
Local Interface:
EXPORTING
   REFERENCE(EX_DYNP_DATAHD) TYPE  ZSPTP_HEADER
get dynpro data
  ex_dynp_datahd = zsptp_header.
<b>8.  ZPTP_POP_ITEM FG: ZPTP_PORETAINAGE</b>
Get the sample function module code from the standard FM: MEPOBADIEX_POP. This FM is responsible for getting item values from screen fields.
The interface would be as follows:
Local Interface:
EXPORTING
   REFERENCE(EX_DYNP_DATA) TYPE  ZSPTP_ITEM
get dynpro data
  ex_dynp_data = zsptp_item.
<b>9.  ZPTP_POST_HEADER FG: ZPTP_PORETAINAGE</b>
Get the sample function module code from the standard FM: MEPOBADIEX_POST. This FM is responsible for preparing header data for posting.
Local Interface:
IMPORTING
   VALUE(IM_EBELN) TYPE  EBELN
prepare customers data for posting
  check not im_ebeln is initial.
  lit_data_newhd[] = git_head.
  lit_data_oldhd[] = git_persistent_head.
  lwa_head-mandt = sy-mandt.
  lwa_head-ebeln = im_ebeln.
  modify lit_data_newhd from lwa_head transporting mandt ebeln where ebeln is initial.
Commit data in Database ztptp_header.
  call function 'ZPTP_COMMIT_HEADER'
    tables
      imt_data_newhd = lit_data_newhd
      imt_data_oldhd = lit_data_oldhd.
<b>10. ZPTP_POST_ITEM FG: ZPTP_PORETAINAGE</b>
Get the sample function module code from the standard FM: MEPOBADIEX_POST. This FM is responsible for preparing item data for posting.
"Local Interface:
IMPORTING
    VALUE(IM_EBELN) TYPE  EBELN
  data: lwa_data like line of git_data,
        lit_data_new type standard table of ztptp_item,
        lit_data_old type standard table of ztptp_item.
prepare customers data for posting
  check not im_ebeln is initial.
  lit_data_new[] = git_data.
  lit_data_old[] = git_persistent_data.
  lwa_data-mandt = sy-mandt.
  lwa_data-ebeln = im_ebeln.
  modify lit_data_new from lwa_data transporting mandt ebeln where ebeln is initial.
Commit data in Database ztptp_item.
  call function 'ZPTP_COMMIT_ITEM' in update task
    tables
      imt_data_new = lit_data_new
      imt_data_old = lit_data_old.
<b>11.  ZPTP_PUSH_HEADER FG: ZPTP_PORETAINAGE</b>
Get the sample function module code from the standard FM: MEPOBADIEX_PUSH. This FM is responsible for populating header values to screen fields.
Local Interface:
  IMPORTING
     REFERENCE(IM_DYNP_DATAHD) TYPE  ZSPTP_HEADER
set dynpro data
  zsptp_header = im_dynp_datahd .
<b>12.  ZPTP_PUSH_ITEM FG: ZPTP_PORETAINAGE</b>
Get the sample function module code from the standard FM: MEPOBADIEX_PUSH. This FM is responsible for populating item values to screen fields.
Local Interface:
IMPORTING
   REFERENCE(IM_DYNP_DATA) TYPE  ZSPTP_ITEM
set dynpro data
  zsptp_item = im_dynp_data .
<b>13. ZPTP_SET_DATA_HEADER FG: ZPTP_PORETAINAGE</b>
Get the sample function module code from the standard FM: MEPOBADIEX_SET_DATA. This FM is responsible for keep update header  information in git_header.
delete a line from git_data
    delete table git_head with table key mandt = sy-mandt
                                        ebeln = im_datahd-ebeln.
update customer data
    read table git_head assigning <lf_datahd> with table key
                                        mandt = sy-mandt
                                        ebeln = im_datahd-ebeln.
    if sy-subrc is initial.
update existing data
      <lf_datahd>-zz_exptype = im_datahd-zz_exptype.
    else.
make a new entry into the data table
      lwa_head = im_datahd.
      lwa_head-mandt = sy-mandt.
      insert lwa_head into table git_head.
    endif.
<b>14. ZPTP_SET_DATA_ITEM FG: ZPTP_PORETAINAGE</b>
Get the sample function module code from the standard FM: MEPOBADIEX_SET_DATA. This FM is responsible for keep update item information in git_data.
delete a line from git_data
    delete table git_data with table key mandt = sy-mandt
                                        ebeln = im_data-ebeln
                                        ebelp = im_data-ebelp.
update customer data
    read table git_data assigning <lf_data> with table key
                                        mandt = sy-mandt
                                        ebeln = im_data-ebeln
                                        ebelp = im_data-ebelp.
    if sy-subrc is initial.
update existing data
      <lf_data>-zz_retainage = im_data-zz_retainage.
    else.
make a new entry into the data table
      lwa_data = im_data.
      lwa_data-mandt = sy-mandt.
      insert lwa_data into table git_data.
    endif.
<b>DETAILED SCREEN DESIGN SPECIFICATIONS</b>
<b>screen 0002</b>
Item Retainage
ZSPTP_ITEM-ZZ_RETAINAGE     DEC     5     Retainage
Screen Logic / Process before Output
  call method call_view->handle_event( 'PBO' ).
Screen Logic / Process after Input
call method call_view->handle_event( 'PAI' )
<b>Screen 0003</b>
Header: Expense type
ZSPTP_HEADER-ZZ_EXPTYPE     NUMC     4     Expense Type
Screen Logic / Process before Output
  call method call_view->handle_event( 'PBO' ).
Screen Logic / Process after Input
call method call_view->handle_event( 'PAI' )
<b>DETAILED CLASS DESIGN SPECIFICATIONS</b>
<b>A. ZCL_IM_ME_GUI_PO_CUST</b>
Description
Imp. Class ZME_GUI_PO_CUST
Attributes
Name     Level     Visibility     Type
SUBSCREEN1     Constant     Public     MEPO_NAME
SUBSCREEN2     Constant     Public     MEPO_NAME
DYNP_DATA_PBO     Instance Attribute     Private     ZSPTP_ITEM
DYNP_DATA_PAI     Instance Attribute     Private     ZSPTP_ITEM
DYNP_DATA_PBOHD     Instance Attribute     Private     ZSPTP_HEADER
DYNP_DATA_PAIHD     Instance Attribute     Private     ZSPTP_HEADER
Methods
Name     Level     Visibility
IF_EX_ME_GUI_PO_CUST~SUBSCRIBE     Instance Attribute     Public
IF_EX_ME_GUI_PO_CUST~MAP_DYNPRO_FIELDS     Instance Attribute     Public
IF_EX_ME_GUI_PO_CUST~TRANSPORT_FROM_MODEL     Instance Attribute     Public
IF_EX_ME_GUI_PO_CUST~TRANSPORT_TO_DYNP     Instance Attribute     Public
IF_EX_ME_GUI_PO_CUST~TRANSPORT_FROM_DYNP     Instance Attribute     Public
IF_EX_ME_GUI_PO_CUST~TRANSPORT_TO_MODEL     Instance Attribute     Public
<b>1. SUBSCRIBE</b>
Description
Publisch Customer's Own Screens
Detailed logic
  when lc_item.
the name is a unique identifier for the subscreen and defined in this class definition
  lwa_subscriber-name = subscreen1.
the dynpro number to use
  lwa_subscriber-dynpro = '0002'.
the program where the dynpro can be found
  lwa_subscriber-program = 'SAPLZPTP_PORETAINAGE'.
each subscreen needs his own DDIC-Structure
  lwa_subscriber-struct_name = 'ZSPTP_ITEM'.
a label can be defined
  lwa_subscriber-label = text-001.
the position within the tabstrib can be defined
  lwa_subscriber-position = 1.
  lwa_subscriber-height = 7.
  append lwa_subscriber to re_subscribers.
Header subscreen
  when lc_header.
the name is a unique identifier for the subscreen and defined in this class definition
  lwa_subscriber-name = subscreen2.
the dynpro number to use
  lwa_subscriber-dynpro = '0003'.
the program where the dynpro can be found
  lwa_subscriber-program = 'SAPLZPTP_PORETAINAGE'.
each subscreen needs his own DDIC-Structure
  lwa_subscriber-struct_name = 'ZSPTP_HEADER'.
a label can be defined
  lwa_subscriber-label = text-002.
the position within the tabstrib can be defined
  lwa_subscriber-position = 1.
  lwa_subscriber-height = 7.
  append lwa_subscriber to re_subscribers.
  endcase.
<b>2. MAP_DYNPRO_FIELDS</b>
Description
Build Up Field Catalog
Detailed logic
  loop at ch_mapping assigning <lf_mapping>.
*Assignment of metafields to the customer fields.
    case <lf_mapping>-fieldname.
      when 'EBELN'.       <lf_mapping>-metafield = mmmfd_preq_no_po.
      when 'EBELP'.       <lf_mapping>-metafield = mmmfd_preq_item_po.
      when 'ZZ_RETAINAGE'. <lf_mapping>-metafield = mmmfd_cust_01.
      when 'ZZ_EXPTYPE'.   <lf_mapping>-metafield = mmmfd_cust_02.
    endcase.
  endloop.
<b>
3. TRANSPORT_FROM_MODEL</b>
Description
Data Transport from Business Object
Detailed logic
    when subscreen1.
Get the item object
      mmpur_dynamic_cast lif_item im_model.
      check not lif_item is initial.
      lwa_mepoitem = lif_item->get_data( ).
transport customer fields
      call function 'ZPTP_GET_DATA_ITEM'
        exporting
          im_ebeln = lwa_mepoitem-ebeln
          im_ebelp = lwa_mepoitem-ebelp
        importing
          ex_data  = lwa_customer.
store info for later use
      move-corresponding lwa_mepoitem to dynp_data_pbo.
      move lwa_customer-zz_retainage to dynp_data_pbo-zz_retainage.
    when subscreen2.
Get the header object
      mmpur_dynamic_cast lif_header im_model.
      check not lif_header is initial.
transport standard fields
      lwa_mepohead = lif_header->get_data( ).
transport customer fields
      call function 'ZPTP_GET_DATA_HEADER'
        exporting
          im_ebeln = lwa_mepohead-ebeln
        importing
          ex_head  = lwa_customerhd.
store info for later use
      move-corresponding lwa_mepohead to dynp_data_pbohd.
      if not lwa_customerhd-zz_exptype is initial.
        move lwa_customerhd-zz_exptype to dynp_data_pbohd-zz_exptype.
      else.
        move dynp_data_paihd-zz_exptype to dynp_data_pbohd-zz_exptype.
      endif.
    when others.
  endcase.
<b>4. TRANSPORT_TO_DYNP</b>
Description
Data Transport to Screen
Detailed logic
case im_name.
    when subscreen1 .
   Pushing item data to screen fields
      call function 'ZPTP_PUSH_ITEM'
        exporting
          im_dynp_data = dynp_data_pbo.
    when subscreen2 .
   Pushing header data to screen fields
      call function 'ZPTP_PUSH_HEADER'
        exporting
          im_dynp_datahd = dynp_data_pbohd.
    when others.
  endcase.
<b>5. TRANSPORT_FROM_DYNP</b>
Description
Data Transport from Screen
Detailed logic
case im_name.
    when subscreen1.
Getting item data from screen fields
      call function 'ZPTP_POP_ITEM'
        importing
          ex_dynp_data = dynp_data_pai.
      if dynp_data_pai ne dynp_data_pbo
       or dynp_data_paihd ne dynp_data_pbohd.
If data  changed we have to notify the framework
to transport data to the model
        re_changed = mmpur_yes.
    endif.
    when subscreen2.
Getting header data from screen fields
      call function 'ZPTP_POP_HEADER'
        importing
          ex_dynp_datahd = dynp_data_paihd.
      if dynp_data_paihd ne dynp_data_pbohd
      or dynp_data_pai ne dynp_data_pbo.
If data changed we have to notify the framework
to transport data to the model
        re_changed = mmpur_yes.
      endif.
    when others.
  endcase.
<b>6. TRANSPORT_TO_MODEL</b>
Description
Treatment of Function Codes
Detailed logic
  case im_name.
    when subscreen1.
is it an item? im_model can be header or item.
      mmpur_dynamic_cast lif_item im_model.
      check not lif_item is initial.
      lwa_mepoitem = lif_item->get_data( ).
standard fields changed?
      if dynp_data_pbo-ebeln ne dynp_data_pai-ebeln  or
         dynp_data_pbo-ebelp ne dynp_data_pai-ebelp or
         dynp_data_pbo-zz_retainage ne dynp_data_pai-zz_retainage.
update standard fields
        lwa_mepoitem-ebeln = dynp_data_pai-ebeln.
        lwa_mepoitem-ebelp = dynp_data_pai-ebelp.
        lwa_mepoitem-zzretainage = dynp_data_pai-zz_retainage.
        call method lif_item->set_data( lwa_mepoitem ).
      endif.
customer fields changed?
      if dynp_data_pbo-zz_retainage ne dynp_data_pai-zz_retainage.
        call function 'ZPTP_GET_DATA_ITEM'
          exporting
            im_ebeln = lwa_mepoitem-ebeln
            im_ebelp = lwa_mepoitem-ebelp
          importing
            ex_data  = lwa_customer.
        lwa_customer-zz_retainage = dynp_data_pai-zz_retainage.
Commit changes to database.
        call function 'ZPTP_SET_DATA_ITEM'
          exporting
            im_data = lwa_customer.
      endif.
    when subscreen2.
is it an header? im_model can be header or item.
      mmpur_dynamic_cast lif_header im_model.
      check not lif_header is initial.
      lwa_mepohead = lif_header->get_data( ).
standard fields changed?
      if dynp_data_pbohd-ebeln ne dynp_data_paihd-ebeln or
      dynp_data_pbohd-zz_exptype ne dynp_data_paihd-zz_exptype.
update standard fields
        lwa_mepohead-ebeln = dynp_data_paihd-ebeln.
        lwa_mepohead-zzexptype = dynp_data_paihd-zz_exptype.
        call method lif_header->set_data( lwa_mepohead ).
      endif.
customer fields changed?
      if dynp_data_pbohd-zz_exptype ne dynp_data_paihd-zz_exptype.
        call function 'ZPTP_GET_DATA_HEADER'
          exporting
            im_ebeln = lwa_mepohead-ebeln
          importing
            ex_head  = lwa_customerhd.
        lwa_customerhd-zz_exptype = dynp_data_paihd-zz_exptype.
Commit changes to database.
        call function 'ZPTP_SET_DATA_HEADER'
          exporting
            im_datahd = lwa_customerhd.
      endif.
    when others.
  endcase.
<b>
B. ZCL_IM_ME_PROCESS_PO_CUST</b>
Description
Imp. Class for BAdI imp. ZME_PROCESS_PO_CUST
Methods
Name     Level     Visibility
IF_EX_ME_PROCESS_PO_CUST~INITIALIZE     Instance Attribute     Public
IF_EX_ME_PROCESS_PO_CUST~OPEN     Instance Attribute     Public
IF_EX_ME_PROCESS_PO_CUST~PROCESS_HEADER     Instance Attribute     Public
IF_EX_ME_PROCESS_PO_CUST~PROCESS_ITEM     Instance Attribute     Public
IF_EX_ME_PROCESS_PO_CUST~POST     Instance Attribute     Public
IF_EX_ME_PROCESS_PO_CUST~CLOSE     Instance Attribute     Public
<b>
1. INITIALIZE</b>
Description
Initializations (Invoked Once Only)
Detailed logic
initializations
  call function 'ZPTP_INIT'.
<b>2. OPEN</b>
Description
Open a Purchase Order
Detailed logic
data: lwa_mepoheader type mepoheader.
read customer data
this has to be done when we open a persistent object
  check im_trtyp eq 'V' or im_trtyp eq 'A'.
  lwa_mepoheader = im_header->get_data( ).
read customer data from database
  call function 'ZPTP_OPEN'
    exporting
      im_ebeln = lwa_mepoheader-ebeln.
<b>3. PROCESS_HEADER</b>
Description
Processing of Header Data
Detailed logic
data: lwa_mepohead type mepoheader,
        lwa_customerhd type ztptp_header.
  include mm_messages_mac. "useful macros for message handling
here we check customers data
  lwa_mepohead = im_header->get_data( ).
  if lwa_mepohead-loekz eq 'D'.
a physical deletion of the header was carried out.
    lwa_customerhd-ebeln = lwa_mepohead-ebeln.
    call function 'ZPTP_SET_DATA_HEADER'
      exporting
        im_datahd                  = lwa_customerhd
        im_physical_delete_request = 'X'.
  endif.
<b>4. PROCESS_ITEM</b>
Description
Processing of Item Data
Detailed logic
data: lwa_mepoitem type mepoitem,
        lwa_customer type ztptp_item.
  include mm_messages_mac. "useful macros for message handling
here we check customers data
  lwa_mepoitem = im_item->get_data( ).
  if lwa_mepoitem-loekz eq 'D'.
a physical deletion of the item was carried out. therrefor we have to
delete customer data on the level of the item
    lwa_customer-ebeln = lwa_mepoitem-ebeln.
    lwa_customer-ebelp = lwa_mepoitem-ebelp.
    call function 'ZPTP_SET_DATA_ITEM'
      exporting
        im_data                    = lwa_customer
        im_physical_delete_request = 'X'.
  endif.
<b>5. POST</b>
Description
Post
Detailed logic
*Posting header data
      call function 'ZPTP_POST_HEADER'
        exporting
          im_ebeln       = im_ebeln.
*Posting item data
      call function 'ZPTP_POST_ITEM'
        exporting
          im_ebeln       = im_ebeln.
<b>
6. CLOSE</b>
Description
Closing Processing
Detailed logic
close customer data
  call function 'ZPTP_INIT'.

Similar Messages

  • Exit/BADI/Enhancement for Payroll driver

    Dear Friends,
    When we run transaction pc00_m10_calc for US payroll driver for an employee for a period,we can see the renumeration statement in the output screen.
    I need to modify the internal table xrt to add the similar wage types in one period before it passes to form , which exit / BADI enhancement should for this purpose.
    Pls. advice.
    Thanks..
    Regards,Prashant

    Hi,
        Please check the below.
    Enhancement
    HRUSRCU0                                Enhancement for Customer Exit for RPCTRCU0.
    Business Add-in
    PC10_PAY0001                            User exit for base_wages in a gross up calculation
    PC10_PAY0002                            Exit to determine if negative taxables should be allowed
    PC10_PAY0003                            Exit to determine if distribution calc should be allowed
    PC10_PAY0004                            Work Tax Area Override Add-In: Activation
    PC10_PAY0005                            Work Tax Area Override Add-In: Default proration of wages
    PC10_PAY0006                            User exit for additional ESS W4 (PZ10) fields; before output
    PC10_PAY0007                            User exit for PZ10 and IT0210 fields; after input
    PC10_PAY0008                            More than 99 exemptions for US payroll withholding tax calc
    Regards,
    Srini.

  • BADI / Enhancement for WBS filtering

    Hi,
    I want to add my code to filter the IDOC PROJECT01 on 'Company code' via BAPI, BAPI_PROJECT_SAVEREPLICA. There are two BADIs but they are called before the standard code for filter objects.
    Kindly suggest a BADi / Enhancement to satisfy the above mentioned requirement.
    Thanks

    There is one Enhacement Spot (ES) that can solve ur purpose : ES_SAPL2002
    Hope That Helps
    Anirban M.

  • BADI/enhancement for CRMD_ORDER

    HI,
    In CRMD_ORDER transaction i want a BADI/enhancement in which i get both pricing structure and crmd_orderadm_h table .
    Actuallu my requirement is that i want to update the total pricing tax data calulated at each item level in the custom field of orderadm_h table.
    Iam calculating pricing tax data in PRC_DATA_SOURCE BADI.
    Thanking you.

    Thread closed

  • Enhancement for Enjoy Reqs

    I'm looking for an enhancement (BADI or otherwise) that would allow me to add a custom button to the enjoy requisition transactions.
    Any help would be appreciated.
    Thanks!
    Heather

    I'm looking for an enhancement (BADI or otherwise) that would allow me to add a custom button to the enjoy requisition transactions.
    Any help would be appreciated.
    Thanks!
    Heather

  • BADI enhancement for ME21N

    Hello experts,
    I have a couple of queries regarding the BADI implementations ME_GUI_PO_CUST/ME_PROCESS_PO_CUST .
    1. I want to add a new tab under the PO item <b>based on the PO item type</b>. E.g., If the PO item type is 'D' (service) then the new tab should be displayed otherwise not.
    2. How can I disable the editing of a PO item field (say PO item number) or a PO header field (say Company code) in edit mode? I know its through fieldselection but a detailed example would be of great help.
    Thanks for your help in advance.
    Best regards,
    Yuvaraj

    Hi,
      FIrst you need to implement the 2 BADIs in SE19.
    The BADI ME_GUI_PO_CUST is responsible for Screen display and data exchange b/n db and the screen.
    The second BADI ME_PROCESS_PO_CUST is responsible for PO upadate.
    To get the screen in the Transaction you need to code in the method SUBSCRIBE of the first BADI.
    Example:
    ls_subscriber-name = subscreen4.
        ls_subscriber-dynpro = 0700.
        ls_subscriber-program = prog_name.
        ls_subscriber-struct_name = structure.
        ls_subscriber-label = TEST.
        ls_subscriber-position = 4.
       ls_subscriber-height = 6.
        ls_subscriber-height = 8.                           
        append ls_subscriber to re_subscribers.
        clear ls_subscriber.
    Plz go through the sample code provided by SAP for the BADIs in SE18.
    Hope this will help..

  • To find out BADI implementation for a standard transaction

    Like for User Exit is there any standard code to find the BADI implemetation for a Transaction Code.
    If so please paste the code.

    Hi pagal,
    The following is the code for the report program which lists Userexits and BAdi's for a given Tcode...
    Regards
    Karthik D
    <b>P.S.: Reward Points if this is Helpful</b>
    *& Report  ZDK_FIND_BADI
    REPORT  ZDK_FIND_BADI.
    TABLES : TSTC,
    TADIR,
    MODSAPT,
    MODACT,
    TRDIR,
    TFDIR,
    ENLFDIR,
    SXS_ATTRT ,
    TSTCT.
    DATA : JTAB LIKE TADIR OCCURS 0 WITH HEADER LINE.
    DATA : FIELD1(30).
    DATA : V_DEVCLASS LIKE TADIR-DEVCLASS.
    PARAMETERS : P_TCODE LIKE TSTC-TCODE,
    P_PGMNA LIKE TSTC-PGMNA .
    DATA wa_tadir type tadir.
    START-OF-SELECTION.
    IF NOT P_TCODE IS INITIAL.
    SELECT SINGLE * FROM TSTC WHERE TCODE EQ P_TCODE.
    ELSEIF NOT P_PGMNA IS INITIAL.
    TSTC-PGMNA = P_PGMNA.
    ENDIF.
    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 EQ ENLFDIR-AREA.
    MOVE : TADIR-DEVCLASS TO V_DEVCLASS.
    ENDIF.
    ENDIF.
    SELECT * FROM TADIR INTO TABLE JTAB
    WHERE PGMID = 'R3TR'
    AND OBJECT in ('SMOD', 'SXSD')
    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:/(105) SY-ULINE.
    FORMAT COLOR COL_HEADING INTENSIFIED ON.
    * Sorting the internal Table
    sort jtab by OBJECT.
    data : wf_txt(60) type c,
    wf_smod type i ,
    wf_badi type i ,
    wf_object2(30) type C.
    clear : wf_smod, wf_badi , wf_object2.
    * Get the total SMOD.
    LOOP AT JTAB into wa_tadir.
    at first.
    FORMAT COLOR COL_HEADING INTENSIFIED ON.
    WRITE:/1 SY-VLINE,
    2 'Enhancement/ Business Add-in',
    41 SY-VLINE ,
    42 'Description',
    105 SY-VLINE.
    WRITE:/(105) SY-ULINE.
    endat.
    clear wf_txt.
    at new object.
    if wa_tadir-object = 'SMOD'.
    wf_object2 = 'Enhancement' .
    elseif wa_tadir-object = 'SXSD'.
    wf_object2 = ' Business Add-in'.
    endif.
    FORMAT COLOR COL_GROUP INTENSIFIED ON.
    WRITE:/1 SY-VLINE,
    2 wf_object2,
    105 SY-VLINE.
    endat.
    case wa_tadir-object.
    when 'SMOD'.
    wf_smod = wf_smod + 1.
    SELECT SINGLE MODTEXT into wf_txt
    FROM MODSAPT
    WHERE SPRSL = SY-LANGU
    AND NAME = wa_tadir-OBJ_NAME.
    FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
    when 'SXSD'.
    * For BADis
    wf_badi = wf_badi + 1 .
    select single TEXT into wf_txt
    from SXS_ATTRT
    where sprsl = sy-langu
    and EXIT_NAME = wa_tadir-OBJ_NAME.
    FORMAT COLOR COL_NORMAL INTENSIFIED ON.
    endcase.
    WRITE:/1 SY-VLINE,
    2 wa_tadir-OBJ_NAME hotspot on,
    41 SY-VLINE ,
    42 wf_txt,
    105 SY-VLINE.
    AT END OF object.
    write : /(105) sy-ULINE.
    ENDAT.
    ENDLOOP.
    WRITE:/(105) SY-ULINE.
    SKIP.
    FORMAT COLOR COL_TOTAL INTENSIFIED ON.
    WRITE:/ 'No.of Exits:' , wf_smod.
    WRITE:/ 'No.of BADis:' , wf_badi.
    ELSE.
    FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
    WRITE:/(105) 'No userexits or BADis exist'.
    ENDIF.
    ELSE.
    FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
    WRITE:/(105) 'Transaction does not exist'.
    ENDIF.
    AT LINE-SELECTION.
    data : wf_object type tadir-object.
    clear wf_object.
    GET CURSOR FIELD FIELD1.
    CHECK FIELD1(8) EQ 'WA_TADIR'.
    read table jtab with key obj_name = sy-lisel+1(20).
    move jtab-object to wf_object.
    case wf_object.
    when 'SMOD'.
    SET PARAMETER ID 'MON' FIELD SY-LISEL+1(10).
    CALL TRANSACTION 'SMOD' AND SKIP FIRST SCREEN.
    when 'SXSD'.
    SET PARAMETER ID 'EXN' FIELD SY-LISEL+1(20).
    CALL TRANSACTION 'SE18' AND SKIP FIRST SCREEN.
    endcase.

  • Valuation price with user exit/BADI/Enhancement Spot (In valuation variant)

    Hi all,
    i am facing problem finding enhancement when creation of sales order of Valuation price with user exit/BADI/Enhancement Spot  (In valuation variant)
    For refferenece:
    When going to t.code VA03, select one item and go to extras in the menu bar and select costing then you find some amounts calculation i.e valuation price automatically.
    So when creation of sales order i am giving material and that material price automatically takes from material master and creating sales order.
    My customer requirement is to get the valuation price of the input material from Z-table during the sales order cost estimate.
    This Z-table contains the material code, plant , grade  of the material.
    Ex:
    Material         Plant   Grade Price
    A                1000    XYZ     25000
    A                1000    PQR     35000
    A                1000    BCD     45000
    Suppose it depends on sales document type and which grade price i have to take.
    So first of all i am unable to find enhancement where to change this code to get change the valuation price.
    Does anybody have any idea , is there any user exit/BADI/enhancement for this.
    So please help me in this issue.
    Thanks & Regards,
    lokeshgoud

    pls allow me to post the questions

  • BADI Enhancement VENDOR_ADD_DATA_CS

    Hi,
      I am working on a BADI Enhancement for adding Customer Sub Screen in Vendor master Data. I used standard BADI enhancements  VENDOR_ADD_DATA and VENDOR_ADD_DATA_CS. Using this I am able to call the Z program and it's screens via these BADI's. Can any one help me how to pass the values from the main program ( Ex. Vendor No.(Screen field   RFO02K-LIFNR)) into the called Z Program ?
    Thanks in Advance,
    Bala S

    Dear Bala,
    Instead of helping you i'm asking info from you. i need to implement the screen exit for the same bapi, upto now i never implement the screen exit in badi's. could you please help the how i need proceed for this.
    please provide the sample code how u add screen exit and fields into screen and passing values to it.
    Please provide you code or documentation for this.
    you can mail me at [email protected]
    Regards,
    Vijaya M

  • Partial rejection of some of lines in multiline cart for header level SC WF

    Hi,
    We are on SRM 7.1 ECS.
    We ahve configured the N step process level workflow for shopping cart at the header level(for entire document).
    The issue we are facing is doing partial rejection.Earlier in SRM 5,even though the header level worklfow was activated when an approver used to get a work item,he could see two radio buttons,one for APPROVE and other for REJECT so that he could partially reject some of the lines(for a multi line cart).
    Now in SRM 7,how do I partially reject lines in a multiline cart if the PCW is active at header level i.e. decision type is "Decison for entire document".
    Pls advise.

    Hi,
    Depending on your requirement on who has to approve what you can use the below options
    1) Item Based Decision for Entire Document : Approver has option to accept and reject all items individually
    2) Overall Decision for Partial Document : Approver can accept items which he is resposible for. Other approver in parallel can accepts other items in the same SC he is resposible for.
    3) Item Based Decision for Partial Document : Approver has option to accpet and reject items individually but only items he is responsible for. Other approver in parallel can accept and reject other items in the same SC he is resposible for.
    Hope this solves your issue
    Regards
    Sam

  • Copry control routine at header level

    Hi
    How to maintain a copy control routine at header level ie. transaction to transaction.
    This is required to copy field values from parent opportunity to the follow up transaction.
    Thanks
    Vidushi

    hi
    you can implement crm_copy_badi in se19.
    for filter you will point copying routine that you created in spro in "badi: enhancements for copying control". this routine should also be pointed in spro in "Define copying control for transaction types" in Copying routine column.
    in this badi you will have to find apropriate method that is being used by the system while making follow-up between your transactions.
    regards
    Radek

  • FB03 GOS (Generic Object Services) not working at header level

    Hi all,
    We have a problem with transaction FB03 when we try to display attached image documents for Fi documents.
    At Header level we have no image.
    At post level we can see the attached image.
    How can we let the display of image list active from Header level.
    Thank you in advance.
    Kind Regards
    Mohammed

    Hi,
    I have same problem but in this case only user specific.
    2 users with same authorization. First can park the invoice, attach document and can view after document save. Then he post document and able view attachment added during park.
    But other user when upload attachment during park document not able to view same attachment when document is posted. Also strange part is when this user upload new attachment during posting other users are not able to see new attachment he has attached during posting.
    I dont see any authorization difference in two except parameter values for F02, F03 and FP is different.
    Can anybody tell me how this can be resolved?
    Thanks,
    Bharati

  • Excise getting calculated on header level

    Dear All ,
    When I make PO for 2 items with same vendor one with Excise and other is without excise , system calculates excise for both the items on header level . But ideally it must be for one item which is applicalbe for Excise . Please guide
    Detailed issue :
    We have created the PO with 2 line items
    1) with Excise Duty : Material Number entered in PO . Correct Excise Duty Determined automatically through the conndintion record. Condition record is maintained on the basis of Country / Plant/ Control Code . . Control Code is maintained in Material Master .
    2) Without Excise : No material Number is entered in PO. There is no excise applicable for the item . Only CST is applicable with Net value .
    Issue : System calculates the excise for line 2 , even though excise is not applicable for the item . We checked in the analysis system picks up control code and condition record from line item 1 . We did not found any relation why system calculates the excise duty. There is no material Num for line item 2   & also there is no control code .
    A )When we save that PO and opened it again and see line item 2 taxes details System do not show the Excise and only shows CST , which is correct .
    B) But when we see the Taxes details of item 1 system shows all excise duty and CST , which is correct .
    C) Again when we go on item num 2 system shows excise duty , which is not correct . Ideally system must show the CST only. As described in  point A .
    Why system calculate the Excise Duty on line item 2 without any relation and there is no such condition record maintained .
    Also we checked the conditions properties in Customising . Excise conditions are at item level only.  Item level Check box is Ticked . There is no check mark on header level.
    For excise determination we maintained the condition record at Country +Plant + Control Code level
    For line item 2 there is no relation of control code as there is no material master record and so that no control code . Even though the system picks the excise .
    Edited by: Bhushan Bivalkar on Mar 25, 2009 4:25 PM

    Bit interesting!
    Check in FV13 for condtion once again do we hav maintanined the condition at Tax classification level for the conditions on which system is calculating tax on non taxable material. as we use to do it for assiging the tax procedure to country and it will overright all codition master.
    if that is not the case then try with diffrent tax code for both the line item and then check to tax. and at the the of GR chcek what system do. or make two different GRs as we need the excise invoice recod for excisable materila only.
    Rgds
    S

  • Mapping at header level

    Hello All,
    I have implemented a logic for field MATNR at the header level in the message mapping. Logic is when the value is not coming for a field it throws a customized exception.And the same field has different logic in the mapping under header.
    As per my understanding the header level logic will be executed firsrt and if ever it is true then only rest of the mapping will be executed. Correct me If I am wrong here
    Thanks,
    Regards,
    Moorthy

    Hi Moorthy,
    The mapping works in a hierarchial manner. If the header mapping fails or is not true, the corresponding values of sub nodes will also not be executed/populated for that particular context. (Context is extremely important in this regards).
    Think it as a nested if stmnt. Ex:
    if() <- check condition for header
    if() <- check condition for first node after header - doesnt get here when the above if stmnt is false
    if () { <- check condition for second node after header and so on
    Hope this clarfies. Let me know if any doubts.
    Cheers,
    Souvik
    Edited by: Souvik Chatterjee on Apr 14, 2011 3:59 PM

  • In which table are PurchGrp in all GOAs (header level)?

    Hi,
    In which table can i find the the assigned purchasing group for a Global Outline Agreement (header level)?
    Transaction bbp_pd (BUS2000113) seems not to provide this information.
    My intention is to retrieve all purchasing groups in Contracts (in SRM) in a list
    Thanks for your help
    Isam

    Hi Petr,
    Yes, in the document numbering screen, you can change the names of the Purchase Documents as well as their respective menu entries.
    I've also tried that approach (updating the menu/form string/title), but if a form refresh event occurs, the form's title reverts to it's original name.
    The same thing happens when we change a system menu string. If the menu is refreshed, it reverts to the original string...
    Regards,
    Vítor Vieira

Maybe you are looking for

  • Error while deploying an application on Weblogic 10.3 Application Server

    Hi All, i have installed latest weblogic 10.3 Application server. - installation of Weblogic was successful. - tried to deploy my application but it failed to do so during that point of time and throw an exception:- !MESSAGE [javax.management.Runtime

  • Problem in creating a user in Identity management

    hi all i work on portal 7.0 and am involved in the branding of the portal. when i try to create an user in Identity mgt the following error message is displayed.. ..current user has user creation permissions in th UME , but cannot create users in the

  • Needed SAP CRM Data model with Object, Entity and Attribute level details

    Hello all,              We are working on a huge IS-U / CRM implementation and we are still in the data gathering phase. The client has a whole load of legacy systems that will be replaced with IS-U and CRM. Right now we are in the process of develop

  • Non-additive measure

    Hi, I'm just learning OBIEE and have this logical modelling question. Let's say that I have a fact table. The grain of this fact table is day/product/price. So there is one row per day per product and the price of the product on that day. Price obvio

  • Lenovo G555 black screen

    Hi, I have one G555 and it's not booting up, it showed black scren, the display doesn't turn on. So far I've tried troubleshooting with these steps 1. Removed the battery 2. 1 stick RAM moved to 2nd slot 3. removed the HDD with the RAM stick inserted