10-19-2015 11:26 AM
Hi,
I need to disable Confirmation Category key field (EKES-EBTYP) for change in Me23n. Alternative i can set a validation of the field as some one try to change it. It should fetch error message.I am using BADI ME_PROCESS_PO_CUST but not getting exact method to implement. Any suggestions ?
10-19-2015 11:45 AM
Hi.
You should implement IF_EX_ME_PROCESS_PO_CUST~CHECK method.
Inside, to gain access to global datas, you'll need to assign classes' objects in this way:
IM_ITEMS = IM_HEADER->GET_ITEMS( ).
IM_EKKO = IM_HEADER->GET_DATA( ).
Where IM_ITEMS and IM_EKKO declared as:
DATA: IM_EKKO TYPE MEPOHEADER.
DATA: IM_ITEMS TYPE PURCHASE_ORDER_ITEMS.
Inside you'll have CH_FAILED parameter to set error or you can use:
mmpur_message macro definition to manage ME2* messages (remember INCLUDE mm_messages_mac.)
Hope to help.
10-19-2015 1:51 PM
Roberto,
But with this solution i will be having access to only item data. I need to customize confirmation data.
10-19-2015 2:28 PM
Hi.
There's no a direct way to confirmation data. With item data you could try to call function module ME_CONFIRMATION_TABLES
or in another way, not so clean, you can try to access EKES data like:
FIELD-SYMBOLS: <lft_ekes> TYPE ANY TABLE.
ASSIGN ('(SAPLEINB)ETS[]') TO <lft_ekes>.
Hope to help.
Bye
10-22-2015 6:49 AM
Yes Roberto ! i have already tried with field symbols. but no success. Any ways thanks
10-22-2015 7:21 AM
You could use an assign casting from IF_PURCHASE_ORDER_MM to class CL_PO_HEADER_HANDLE_MM to be able to access those data.
Regards,
Raymond
10-20-2015 9:57 AM
10-20-2015 1:23 PM
Hi Neeraj,
if you want to disable the field without checking any condition means you can try with
Transaction Variant - A Step by Step Guide for Creation - Code Gallery - SCN Wiki
Hope it helpful,
Regards,
Venkat.