Friday, July 11, 2008

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 Template’s attributes as in the image below.

Save the Template.

Let’s 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.



Let’s display the profile header. Go to transaction EEDM08

Voila!


You have created a profile using the master data template.



Now, let’s 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 FOR SAP BLOG'.
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.

7 comments:

brian.andrews said...

Strategic Sourcing, Outsourcing.

We help clients make and execute
decisions on strategy, technology, operations, supply chain, compliance and change

http://www.wgaconsulting.com
Helping Organizations Evolve

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....

Ocean said...

You can use FM 'ISU_PRODUCT_PARAMETER_DIALOG' to get the container list, cheers Daniel

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??

Ramya k said...

Thanks for the great information, was looking for this information from long.Great blogSAP MM Training in Chennai

Fangyaya said...

ray ban sunglasses
cheap air jordans
nike blazers shoes
nike air max 90
true religion jeans
gucci handbags
gucci outlet
gucci belts
ray ban sunglasses uk
louis vuitton outlet
replica rolex watches
louis vuitton purses
true religion jeans
oakley sunglasses
ray ban sunglasses
kate spade
jordan retro 11
burberry handbags
kobe 9
oakley outlet
kevin durant shoes 7
coach outlet
louis vuitton purses
toms shoes
christian louboutin shoes
louis vuitton outlet
nike uk
nike trainers uk
nike store
nike sb janoski
20150507chenenen

Rahul said...

It was very nice blog to learn about SAP HR.Thanks for sharing new things.SAP HR