Custom subscreen on standard Transaction EEDM09, EEDM10 and EEDM11
Requirement is to add few fields on the SAP standard transaction EEDM09, EEDM10 and EEDM11. In Standard screen, it should appear under Header tab with one more tab “other”. These custom screen values should be updated in the standard table EUIHEAD.
If the data already exists during EEDM10 and EEDM11 transaction, the values should display on the screen.
Technical Solution: Identified the BADI ‘ISU_EDM_POD_CUSTOMER’ to attach sub screen on standard SAP Transactions EEDM09, EEDM10 and EEDM11.
TABLE: Include structure CI_EUIHEAD with necessary fields (ZZNAME1 and ZZMOB) in the standard table EUIHEAD.
Create a Module Pool Program ‘SAPMZTEST’ with screen number ‘800 ‘.
Make the screen as sub screen by clicking sub screen radio button on ‘Attributes’
Add two fields, ZZNAME1 and ZZMOB referred from data dictionary ‘EUIHEAD’ in layout as shown below.
In Flow Logic,write logic as shown below
tables : euihead.
DATA: obj TYPE REF TO IF_EX_ISU_EDM_POD_CUSTOMER.
DATA: im_head TYPE ISU_EUIHEAD_CUSTOMER,
im_head1 type euihead,
im_con TYPE ISU00_OBJ_CONTR.
Process Before Output write the logic as shown below
MODULE STATUS_0800 OUTPUT.
IF obj IS INITIAL.
CALL METHOD CL_EXITHANDLER=>GET_INSTANCE_FOR_SUBSCREENS
INSTANCE = obj
NO_REFERENCE = 1
NO_INTERFACE_REFERENCE = 2
NO_EXIT_INTERFACE = 3
DATA_INCONS_IN_EXIT_MANAGEM = 4
CLASS_NOT_IMPLEMENT_INTERFACE = 5
others = 6
if sy-SUBRC = 0.
CALL METHOD obj->GET_DATA_FROM_SCREEN
EXP_CONTROL_DATA = im_con
EXP_EUIHEAD_CUST_DATA = im_head
if im_head is not INITIAL.
euihead-zzname1 = im_head-zzname1.
euihead-zzmob = im_head-zzmob.
Make these custom fields as non-editable during display Mode(EEDM11)
IF im_con-wmode = ‘1’.
LOOP AT SCREEN.
SCREEN-INPUT = 0.
ENDMODULE. ” STAT
In Process After Input, write logic as shown below
MODULE USER_COMMAND_0800 INPUT.
if obj is not INITIAL.
im_head-zzname1 = euihead-zzname1.
im_head-zzmob = euihead-zzmob.
MOVE-CORRESPONDING im_head to im_head1.
CALL METHOD obj->PUT_DATA_TO_SCREEN
IMP_CONTROL_DATA = im_con
IMP_EUIHEAD_DATA = im_head1
Now save and activate the Module Pool Program
Go to transaction SE19 and create implementation Class ‘ZCL_IM_ISU_EDM_POD’
For the standard BADI ‘ISU_EDM_POD_CUSTOMER’.
Go to sub screen tab on the implementation Class and assign our Module pool program and screen number as follows.
We have two methods to be implemented based on our requirement in the interfaces tab namely,
In PUT_DATA_TO_SCREEN, write logic as follows. (The Default signature is already available)
method IF_EX_ISU_EDM_POD_CUSTOMER~PUT_DATA_TO_SCREEN .
me->if_ex_isu_edm_pod_customer~control_data = imp_control_data.
me->if_ex_isu_edm_pod_customer~euihead_data = imp_euihead_data.
In GET_DATA_FROM_SCREEN, write logic as follows.
Method IF_EX_ISU_EDM_POD_CUSTOMER~GET_DATA_FROM_SCREEN .
exp_control_data = me->if_ex_isu_edm_pod_customer~control_data.
Move-CORRESPONDING me-> if_ex_isu_edm_pod_customer~euihead_data to exp_euihead_cust_data.
Now Save and activate the implementation.
As soon as the object is activated, the custom sub screen is attached with SAP standard Transactions.
Now Execute the TCODE EEDM09 to create a new PoD with address and mobile number as follows
The values for Name and mobile will be created in EUIDHEAD table.