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
Similar Messages
-
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 tables 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 tables 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'. -
Adding the customer screen to enhance the header for Enjoy PO
Dear Expert's,
My requirement is to add a new tab on Header for Enjoy PO by enhancing ME21N/ME22N and ME23N.
I have already implemented the BADI's ME_GUI_PO_CUST and ME_PROCESS_PO_CUST.
Actions Taken:
I have created a custom Function group and subscreen '9000'.
I have created a 'Z' structure as per the screen layout on the Header Tab
I have appended the custom fields in EKKO custom include CI_EKKO.
Reactions:
1. I am able to successfully display the screen on additional tab at header level.
2. The Display & Change is working perfectly for screen '9000' on ME21N/ME22N and ME23N header.
Problem:
I am unable to read the 'Z' fields from EKKO to populate the TAB Screen '9000' and neither able to save the 'Z' fields from '9000' TAb screen for header data.
I am not using any EXIT for this and have to use only BADI for this solution. Please help me to implement this solution using BADI only.
Also i have tried implementaing the transport Data object -> Model + Model -> Dynpro + Dynpro -> Model + Model -> Data object methods, but these methods are not getting triggered.
Please let me know if i can use EVENT_PBO & EVENT_PAI if yes , than how to trigger these events and where..?Hi ,
try to enhance PO header using SAP Note 407975
Summary
Symptom
You are using SAP customer enhancement MM06E005. There is no sample source
code for this enhancement.
More Terms
User exit, customer enhancement, MM06E005, example, sample
Cause and Prerequisites
You want to activate user exit MM06E005. Note that this is a consulting
note and not a correction of the user exit.
Solution
You can use the sample source code attached here to recognize the basic
functions of the exit. This example is, however, only one of many options
that are offered by the customer enhancement.
The sample source code includes the following functions:
o Supply of an additional field on header level
o Supply of an additional field on item level
o Derivation of a field on item level from the copied reference
document
Now, in order to be able to use the sample source code, you must create
field ZZFLAG on the header level of the document and field ZZFIELD on the
item level.
Double-click on Include table CI_EKKODB
Enter the following values:
- Name Component type DType Length DecPlace Short text
- ZZFLAG CHAR1 CHAR 1 0 1-digit indicator
Save and activate the include table.
Double-click on Include table CI_EKPODB
Enter the following values:
- Name Component type DType Length DecPlace Short Text
- ZZFIELD CHAR1 CHAR 1 0 1-digit indicator
Save and activate the include table.
In order to activate the sample source code, you additionally have to carry
out the following changes on screens 0101 and 0111.
1. Screen 0101: Create the following fields:
2010.02.05 Page 2 of 3
SAP Note 407975 - MM06E005: Collective note: Examples for
implementation
"Checkbox" Name: EKKO_CI-ZZFLAG
2. Screen 0111: Create the following fields:
"Input/output field" Name: EKPO_CI-ZZFIELD
"Pushbutton" Name: BUTTON
FctCode: ZZDETERMINE
The following assignments apply to the sample source code:
EXIT_SAPMM06E_006 --> LXM06F36
EXIT_SAPMM06E_007 --> LXM06F38
EXIT_SAPMM06E_008 --> LXM06F37
EXIT_SAPMM06E_009 --> LXM06F39
EXIT_SAPMM06E_016 --> LXM06F41
EXIT_SAPMM06E_017 --> LXM06F42
EXIT_SAPMM06E_018 --> LXM06F40
Copy the source code from the attachment and insert it into the
corresponding function modules. Save and activate the function modules.
Create the following variables in the corresponding TOP include in order
not to get any syntax errors:
INCLUDE ZXM06TOP
data: gl_aktyp type c,
gl_no_screen type c,
gl_rekko like ekko,
gl_ekko_ci like ekko_ci,
gl_ekpo_ci like ekpo_ci,
gl_ekpo like ekpo,
gl_ucomm like sy-ucomm.
types: begin of ekpo_tab,
ebeln like ekpo-ebeln,
ebelp like ekpo-ebelp,
ekpo like ekpo,
end of ekpo_tab.
data: gt_ref_ekpo_tab type table of ekpo_tab.
Save and activate the TOP include.
On header level, you can now store a character, X or space, via field
ZZFLAG on the database with the document and read it also again.
On item level, you can fill field ZZFIELD with a one-digit value and save
it with the document. If you copy this document, the system displays an
additional function button on tab page "Customer data". If you press this
button, the value of the reference document is copied to field ZZFIELD.
If you want to store the source code as sample source code in your system,
start Transaction SMOD. Enter MM06E005 as an enhancement. Select
"Components". Press "Change". Position the cursor on the corresponding
module and choose "Sample code". Create the corresponding include and copy
2010.02.05 Page 3 of 3
SAP Note 407975 - MM06E005: Collective note: Examples for
implementation
the source code from the note. Save the include. Note that, of course,
syntax errors may occur when you check components. This is because the
includes of the sample code are not integrated into a program but rather
are completely independent and, therefore, do not have any relationship to
each other either. For this reason, only save the include and do not
activate or check it. The sample code has to be copied into the
corresponding function modules in order to become active.
If you use the user exit in the new purchase order, it is not guaranteed
that the customer screen is always processed. To make sure that possible
required fields are checked, include a corresponding message into the
EXIT_SAPMM06E_012. This screen is always processed. -
Enhancement for Production Order Release and Batch Fixing.
Hi Experts,
I have assigned a enhancement for production order.The user exit is also given in the req as PPCO0001 through which i have to call a Z-Program for Batch fixing using Trans CO01 and release the order before saving once it is assigned to components.
Now my probs is where to start working for the enhancement -is it possible to use any BAPI instead of Batch (BDC) or I can use any BADI instead User Exit.
So if you guys have similar scenario worked on it or have similar example approach to solve it.Please do help.I will reward for all helpful answers.I figured out thr friends !
Thanks,
SriRam -
Looking for enhancement for the price control of purchasr oder
Hi,
I'm Looking for enhancement for the price control of purchasr oder
I need to develop programs to control the price of purchase orders according to some special rules while purchase order is creating, so,
can anybody tell me which enhancement is beeter to adopt?
Thanks and best regards.hi
following are there for purchase order...
AMPL0001 User subscreen for additional data on AMPL
LMEDR001 Enhancements to print program
LMELA002 Adopt batch no. from shipping notification when posting a
LMELA010 Inbound shipping notification: Transfer item data from IDO
LMEQR001 User exit for source determination
LMEXF001 Conditions in Purchasing Documents Without Invoice Receipt
LWSUS001 Customer-Specific Source Determination in Retail
M06B0001 Role determination for purchase requisition release
M06B0002 Changes to comm. structure for purchase requisition releas
M06B0003 Number range and document number
M06B0004 Number range and document number
M06B0005 Changes to comm. structure for overall release of requisn.
M06E0004 Changes to communication structure for release purch. doc.
M06E0005 Role determination for release of purchasing documents
ME590001 Grouping of requsitions for PO split in ME59
MEETA001 Define schedule line type (backlog, immed. req., preview)
MEFLD004 Determine earliest delivery date f. check w. GR (only PO)
MELAB001 Gen. forecast delivery schedules: Transfer schedule implem
MEQUERY1 Enhancement to Document Overview ME21N/ME51N
MEVME001 WE default quantity calc. and over/ underdelivery toleranc
MM06E001 User exits for EDI inbound and outbound purchasing documen
MM06E003 Number range and document number
MM06E004 Control import data screens in purchase order
MM06E005 Customer fields in purchasing document
MM06E007 Change document for requisitions upon conversion into PO
MM06E008 Monitoring of contr. target value in case of release order
MM06E009 Relevant texts for "Texts exist" indicator
MM06E010 Field selection for vendor address
MM06E011 Activate PReq Block
MMAL0001 ALE source list distribution: Outbound processing
MMAL0002 ALE source list distribution: Inbound processing
MMAL0003 ALE purcasing info record distribution: Outbound processin
MMAL0004 ALE purchasing info record distribution: Inbound processin
MMDA0001 Default delivery addresses
MMFAB001 User exit for generation of release order
MRFLB001 Control Items for Contract Release Order
No of Exits: 36
to search for any enhancement you can use the following prog..
report zfinduserexit.
tables : tstc, tadir, modsapt, modact, trdir, tfdir, enlfdir.
tables : 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 obligatory.
select single * from tstc where tcode eq p_tcode.
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 = '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.
at line-selection.
get cursor field field1.
check field1(4) eq 'JTAB'.
set parameter id 'MON' field sy-lisel+1(10).
execute the report and enter the transaction for which u want to find the enhancement and execute. it would show the available enhancements for that tcode.
<b>Please do reward if useful</b>
Regards
Dinesh -
Suggest EnhanceMent For SALES area determination In stock Transfer.
Suggest EnhanceMent For SALES area determination In stock Transfer.
V02V0001 Sales area determination for stock transport order Doesnt Work,Is user exit required, as the sales area will be different. Incase of Intra company stock transfer the process will be as under:
Create Purchase Order (ME21N)
Create Delivery in background (VL04, VL10a, VL10C, etc)
Change Delivery for picking / packing & PGI (VL02n)
Create Billing Document (VF01)
Assumption: Stock Transfer configuration is in place. Assistance can be taken from SAP Best Practices in help.sap.com
Incase of Inter-company, the process will be as under:
Create Sales Order (VA01)
Create Delivery (VL01N, etc)
Change Delivery (VL02N)
Create Billing Document (VF01)
Assumption: Configuration is in place. Assistance can be taken from SAP Best Practices in help.sap.com
Regards,
Rajesh Banka -
Badi / Exit / Enhancement for replacing INSMK during PO creation
Hi Gurus,
we want to default the INSMK field (stock type) during Purchase Order creation..
Can someone help me findind the right BAdI / exit / enhancement for it?
Thanks in advance,
Regards,
AlessioHi Alessio,
You may check these first:
Re: Negative postings to MVER table
Re: select stock type
Thanks,
Gordon -
I need the drivers of EDR Enhanced for LabVIEW 8.6 or more, please.
Hello, I want to acquire a signal with the microDAQ-Lite of EAGLE Technology and I need the EDR Enhanced LabView Driver. The one I have is for labview 6.x or 7. Currently I am working in Labview 2010 so I am needing the drivers for this version. I have found in a webpage (http://edr-enhanced-for-labview.software.informer.com/8.5/ ) that a version developed by National Instruments for version 8.5 exists, it says it is free, but i cant find it. Does anyone knows if a newer version exist? or where can I find the latest one?? Please help.
Thanks in advance.
Alejandra NI does not develop drivers for third-party DAQ devices. Contact the vendor or use the driver you have. You can load version 6 and 7 into LabVIEW 2010.
-
Implicit enhancement for report painter reports(For GRR3 and CJE3)
Hi,
We have a client requirement to add 5 fields (In selection screen) to report painter reports ( Reports of CJE3 and GRR3 ).We created Z reports as a copy of standard reports, added required 5 fields by implementing SAP notes and other settings.We have also done implicit enhancement for all these reports to make change in the behaviour of new fields.This is working fine in the development client but the problem is once we transport this to other client new reports get generated( With new name ) and implicit enhancement will be lost.
For eg:in development client for CJE1/CJE2 report the program name will be "GPAVPSATWFP4NN0YRDBIQBHI8MQ"
but when we transport it to other client new program "GP8O1UCNZTJYY5LTO8GN0UW2GQB" is generated in which implicit enhancements are not found.
Can you please suggest how to handle implicit enhancement in such cases? Or what is the correct way to transport it.
Thanks in advance
Regards,
ShekharHi,
Thanks for the quick reply..
I have already done implicit enhancement as you said ,my problem is to transport it to another client.
I have implemented implicit enhancement for one report lets say it as "ABC", and i transport it to another client with all the enhancement. But in another client new program "XYZ" is getting generated for same report( dynamic programs ), so my implicit enhancement is present but its applicable to "ABC" program but not for "XYZ".
Can you please suggest how can i handle this??
thanks in advance,
Greeshma.
Edited by: Accgreeshma on Jan 23, 2012 3:04 PM -
Implicit enhancement for report painter (CJE2 & GRR3 reports)
Hi,
We have a client requirement to add 5 fields (In selection screen) to report painter reports ( Reports of CJE3 and GRR3 ).We created Z reports as a copy of standard reports, added required 5 fields by implementing SAP notes and other settings.We have also done implicit enhancement for all these reports to make change in the behaviour of new fields.This is working fine in the development client but the problem is once we transport this to other client new reports get generated( With new name ) and implicit enhancement will be lost.
For eg:in development client for CJE1/CJE2 report the program name will be "GPAVPSATWFP4NN0YRDBIQBHI8MQ"
but when we transport it to other client new program "GP8O1UCNZTJYY5LTO8GN0UW2GQB" is generated in which implicit enhancements are not found.
Can you please suggest how to handle implicit enhancement in such cases? Or what is the correct way to transport it.
Thanks in advance
Greeshma.Hi,
Thanks for the quick reply..
I have already done implicit enhancement as you said ,my problem is to transport it to another client.
I have implemented implicit enhancement for one report lets say it as "ABC", and i transport it to another client with all the enhancement. But in another client new program "XYZ" is getting generated for same report( dynamic programs ), so my implicit enhancement is present but its applicable to "ABC" program but not for "XYZ".
Can you please suggest how can i handle this??
thanks in advance,
Greeshma.
Edited by: Accgreeshma on Jan 23, 2012 3:04 PM -
hi,
Can u please specify the particular enhancement which triggers between payment proposal and payment run.
Requirement:
I need to capture the username who performs the payment proposal and check with the same whether the same user is running the payment run....
Rgds.,
subashFDTAX001 Enhancement to Transaction FDTA (event after the downlo
FEDI0002 Function exits for EDI DOCS in FI - Incoming pyt adv.no
FEDI0003 Function exits for EDI docs in FI - Save PEXR segments
FEDI0004 Function exits for EDI docs in FI - particular events
FEDI0006 Function Exits for EDI-docs in FI: Save IDCR Segments
RFFOX003 Frame for user exit RFFOX003 (in program RFFOM100)
RFFOX041 Framework for user exit RFFOX041 (in program RFFOBE_I)
RFFOX042 Framework for user exit RFFOX042 (in program RFFOBE_E)
RFFOX043 Framework for user exit RFFOX043 (in program RFFOBE_D)
RFFOX061 Frame for user exit RFFOX061 (in program RFFOCH_P)
RFFOX062 Frame for user exit RFFOX062 (in program RFFOCH_P)
RFFOX063 Frame for user exit RFFOX063 (in program RFFOCH_P)
RFFOX064 Frame for user exit RFFOX064 (in program RFFOCH_P)
RFFOX065 Frame for user exit RFFOX065 (in program RFFOCH_P)
RFFOX066 Frame for user exit RFFOX066 (in program RFFOCH_P)
RFFOX071 Frame for user exit RFFOX071 (in program RFFOCH_U)
RFFOX072 Frame for user exit RFFOX072 (in program RFFOCH_U)
RFFOX073 Frame for user exit RFFOX073 (in program RFFOCH_U)
RFFOX074 Frame for user exit RFFOX074 (in program RFFOCH_U)
RFFOX075 Frame for user exit RFFOX075 (in program RFFOCH_U)
RFFOX081 Frame for user exit RFFOX081 (in program RFFOF__T)
RFFOX082 Frame for user exit RFFOX082 (in program RFFOF__T)
RFFOX100 Frame for user exit RFFOX100 (in program RFFOUS_T)
RFFOX101 Frame for user exit RFFOX101 (in program RFFOUS_T)
RFFOX102 Frame for user exit RFFOX102 (in program RFFOUS_T)
RFFOX103 Frame for user exit RFFOX103 (in program RFFOUS_T)
RFFOX104 user exit
RFFOX105 Frame for user exit RFFOX105 (in program RFFOUS_T)
RFFOX200 Frame for user exit RFFOX200 (in program RFFONZ_T)
RFFOX210 Frame for user exit RFFOX210 (in program RFFOAU_T)
RFFOX211 Frame for user exit RFFOX211 (in program RFFONZ_T)
RFFOX230 General program for user exit RFFOX230 (in program RFFO
RFFOX240 Enhancement for User Exit 240 (RFFOAT_P)
RFFOX250 Enhancement for User Exit 250 (RFFODK_E)
RFFOX901 Framework for user exit RFFOX901 (in program RFFOM100)
RFFOX902 Framework for user exit RFFOX902 (in program RFFOM100) -
F-48- Downpayement related to downpayment request and enhancements for PO
Hi to all,
Is there anyone that can explain me why in F-48 transaction, when I make a downpayment related to downpayment request, in the subsequent screen the fields are filled with the value retrieve from previous screen ( in which I selected the downpayent request related to DP I'm posting) all fields except the purchase order field that remains NOT filled ("space" ). So it should be filled by the user. I was asked to find a substitution in order to make this field automatically filled with the correct value without the user needs to fill it manually . The problem is that purchase order field seems to be related to another field called LPN (Long Procuerement Number ). Anyone can suggest a suitable enhancement for substitution ?
Thanks in advance...
AndrewThanks Tejas sir, AND VV sir,
Sri Problem resolved. But sir, we want while F-47 payment request special GL Indicator A in both case in F-48 too.. spl GL Indicator A only. while doing the same thing getting error.. see the error Below.
Special G/L indicator A is not defined for down payments
Message no. F5053
Diagnosis
The specified special G/L indicator is not classified as "down payment" or not listed in the list of the target special G/L indicators for indicator "F".
System Response
The entry is not accepted.
Procedure
Enter an allowed special G/L indicator or initiate a change of the default settings.
Kindly help me sir.
Thanks
Pranav Kr. Gupta
Note: i will give u the point. as well sir. -
Question about "Enhanced for loop"
public class NewLoopTest{
public NewLoopTest(){
int result=0;
int[] a=new int[20];
for(int i=0;i<a.length;i++){
a=i++;
for(int i:a){
System.out.println("i="+i+";"+"a["+i+"]="+a[i]+";result="+result+"+"+i+"="+(result+i));
result+=i;
System.out.println("-------------");
result=0;
for(int i=0;i<a.length;i++){
System.out.println("i="+i+";"+"a["+i+"]="+a[i]+";result="+result+"+"+i+"="+(result+i));
result+=i;
This code counts sum of the elements of a array.
At first I use the enhanced for loop and at second I use the traditional for.
Enhanced for loop in sdk1.5 returns only even elements of array, am I right?Enhanced for loop in sdk1.5 returns only even
elements of array, am I right?No. It covers them all.
The i in the enhanced for loop is not the index. It's the element at the current index. You don't have access to the index in the new loop because you don't need it.
for (int item : arr) {
System.out.println(item);
// is equivalent to
for (int ix = 0; ix < arr.length; ix++) {
int item = aa[ix];
System.out.println(item);
}The i in your new loop is the same as a [ i ] in the old loop. -
Documentation Enhancer for Java
Documentation Enhancer for Java is a tool that enhances Javadoc files by enriching them with new information. The information is gathered by statically analyzing the corresponding Java class files. This tool enhances the Javadoc HTMLs in three respects: semantic information, sorting, and navigability.
http://www.alphaworks.ibm.com/tech/docenhancer?open&S_PKG=&S_TACT=103AMW61&S_CMP=GR&ca=dgr-awjw03docenhancerFirst of all, can you explain what do you exactly mean by "is there a java api for java?"
About the second part of your question, if the desired file format is CSV, then you can use StringTokenizer class that by reading each line of your file, makes tokens based on some delimiter that you specify (space, tab, etc.) and then in each line, you have to concatenate each pair of tokens with a character ";" between them. However as I know, you cannot have text decoration (Bold, Italic, etc) with CSV format -
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,PrashantHi,
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.
Maybe you are looking for
-
Multiple iPods on 1 Computer, screwed up, HELP!
So before I realized that you have to create a separate library for each iPod (on one computer), I logged out of my Dad's iTunes store and into mine. I proceeded to download a few songs and now it won't let me sync them with my iPod because it's on h
-
: MSS 60.1.20 Reporting Workset
Please could someone give me a list of all the standard reports contained in the MSS Reporting Workset. Thanks!
-
The problem occurs on many public sites like Finnair, Gites-de-France etc. I can see only white on the screen. Sometimes it is possible to find the button by guessing where it might locate.
-
I have a lacie hard drive that i use mostly with my pc. I had some files on my macbook that I wanted to put on that hard drive but when i try to copy them it wont let me and says that the file cant be modified. what can i do?
-
Exporting from premiere pro CS4
I download a trial version of Adobe Premiere Pro CS4. I am thinking about purchasing one. I was going through some video tutorials on Adobe TV and on the tutorial when they were exporting, they had quite a few more formatting options than it shows on