Вы находитесь на странице: 1из 6

ISU Master Data Template: How to create an EDM Profile

This mini article explains how you can create a simple master data template and a simple ABAP program to create an EDM Profile.

First step is to create the master data template.

To create a new master data template go to transaction EPRODCUST

Choose the MD Template Category as EDM_PROFHEAD. Unfortunately this MDT exists only in ECC6.0.

Configure the Templates attributes as in the image below.

Save the Template.

Lets now test the template.

In the same transaction EPRODCUST press the test button.

Fill in the parameters and then press Adopt button. Now press execute.

The Master Data Template was executed successfully and by pressing on the log button we can see the profile which has been created.

Lets display the profile header. Go to transaction EEDM08

Voila!

You have created a profile using the master data template.

Now, lets create a small ABAP report to create the profile. The FM we need to call is ISU_PRODUCT_IMPLEMENT. We need to provide 2 parameters: Master Data Template and the container.

In the container we need to specify all the parameters we created in the master data template and theirs values. For this we create an internal table it_container and fill each line with a parameter. The parameters must be provided in the table in the ascending order.

DATA it_container TYPE CCMCONT_T. DATA wa_container LIKE LINE OF it_container. DATA it_NEW_KEYS_TAB TYPE ISU_PROD_NEWOBJECT_KEYS_TAB. DATA wa_NEW_KEYS_TAB LIKE LINE OF it_NEW_KEYS_TAB. DATA it_DONE_NODE_TAB TYPE ISU_EPDNODE_TAB.

DATA : l_LOGID TYPE GUID_32, l_SCRIPT_INFO_TAB TYPE ISU_SCRIPT_INFO_TAB, l_IDE_STARTED TYPE EBA_FLAG, l_MDG_COMPLETED TYPE EBA_FLAG.

clear wa_container. wa_container-element = 'DATEFROM'. wa_container-elemlength = '255'. wa_container-type = 'C'. wa_container-value = '20080101'. Append wa_container to it_container.

clear wa_container. wa_container-element = 'DAY_OFFSET'. wa_container-elemlength = '255'. wa_container-type = 'C'. wa_container-value = '000000'. Append wa_container to it_container.

clear wa_container. wa_container-element = 'INTSIZEID'. wa_container-elemlength = '255'. wa_container-type = 'C'. wa_container-value = 'DAY'. Append wa_container to it_container.

clear wa_container. wa_container-element = 'MASS'. wa_container-elemlength = '255'. wa_container-type = 'C'. wa_container-value = 'KWH'. Append wa_container to it_container.

clear wa_container. wa_container-element = 'PROFILE'. wa_container-elemlength = '255'. wa_container-type = 'C'. Append wa_container to it_container.

clear wa_container. wa_container-element = 'PROFTEXT'. wa_container-elemlength = '255'. wa_container-type = 'C'. wa_container-value ='Profile Test'. Append wa_container to it_container.

clear wa_container. wa_container-element = 'PROFTYPE'. wa_container-elemlength = '255'. wa_container-type = 'C'. wa_container-value = '21' . Append wa_container to it_container.

clear wa_container. wa_container-element = 'PROFVALCAT'. wa_container-elemlength = '255'. wa_container-type = 'C'. wa_container-value = '1' . Append wa_container to it_container.

clear wa_container. wa_container-element = 'SPARTE'. wa_container-elemlength = '255'. wa_container-type = 'C'. wa_container-value = '02' . Append wa_container to it_container.

clear wa_container. wa_container-element = 'TIMEFROM'.

wa_container-elemlength = '255'. wa_container-type = 'C'. wa_container-value = '000000' . Append wa_container to it_container.

CALL FUNCTION 'ISU_PRODUCT_IMPLEMENT' EXPORTING X_PRODID = 'Z_PROFIL' X_CONTAINER = it_container X_RAISE_NO_EVENT = 'X' X_NO_BPCONTACT = 'X' * X_CONTRACTDATA = X_NO_ENV_SELECT = 'X' X_INDUSTRY = 'U' IMPORTING Y_LOGID = l_LOGID Y_SCRIPT_INFO_TAB = l_SCRIPT_INFO_TAB Y_IDE_STARTED = l_IDE_STARTED Y_MDG_COMPLETED = l_MDG_COMPLETED CHANGING XY_NEW_KEYS_TAB = it_NEW_KEYS_TAB XY_DONE_NODE_TAB = it_DONE_NODE_TAB EXCEPTIONS GENERAL_FAULT = 1 INPUT_ERROR = 2 AMBIGUOUS_ENVIRONMENT = 3 OTHERS = 4.

IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

clear it_container. READ TABLE it_NEW_KEYS_TAB index 1 into wa_NEW_KEYS_TAB. move wa_NEW_keys_tab-VALUE to P_l_profile. refresh it_new_keys_tab. refresh it_DONE_NODE_TAB.
at 2:18 PM

4 comments:

Vivekananda Rao said... Hi,

Can you please tell me how to adopt a method like this to create a new installation on an existing premise and an existing connection object.

Vivek....

4:05 PM

Ocean said... You can use FM 'ISU_PRODUCT_PARAMETER_DIALOG' to get the container list,

cheers Daniel

9:34 PM

R A J said... I use 2 MDT catgz namely,

CRMNEWCONTRACT for contract creation (1 util installation,contract) created and Crm_pod_inst for tech master data including POD and Util installation (1 CObject,premise,Util installation,POD created)

At the end of the process i get 2 util installations 1 from each Ctageory execution. But the requirement is to created Util installation via CRM_POD_INST and to use CRMNEWCONTRACT for creating contract for the previously created Util installation via CRM_POD_INST.

Pls advice me in suppressing 2 Util installations to be created or how can i use the CRMNEWCONTRACT MDT cat to call the previouslt created UTIL Installation from CRM_POD_INST.Any fm NEEDED OR NOTES TO BE IMPLEMENTED??