cancel
Showing results for 
Search instead for 
Did you mean: 

Webdynpro with MDM backend

Former Member
0 Kudos

Hi All,

I need work with webdynpro using MDM backend. How can i connect to mdm backend and fetch the data in webdynpro. Any configuration is needed in the portal to connect MDM and the portal.

Kindly provide the inputs.

Regards,

Prasanthi

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Prasanthi,

You need to import MDM Java APIs. These APIs you can get along with the MDM package you have got. You will have to include these jars in the classpath.You will need to connect to MDM using these APIs.

If you are working on DC environment then have a look at the following link:

http://help.sap.com/saphelp_nw04s/helpdata/en/5a/2e2f4234135433e10000000a155106/content.htm

As you will have to use external library dc to integrate the MDM jars.

Have a look at the following WIKI which explains Ways to access MDM:

https://www.sdn.sap.com/irj/scn/wiki?path=/display/ep/ways%252bto%252baccess%252bmdm%252bfrom%252bpo...

Also look at the snippets at the following link:

Regards.

Rajat

Answers (10)

Answers (10)

Former Member
0 Kudos

Hi All,

Can somebody suggest me how can i do the insert update delete operations using webdynpro with MDM backend.

Kindly help

Former Member
0 Kudos

Hi,

If i want to do it through coding, i need to use different api's for different task?

How can i do the basic operations like search, insert, fetch kind of operations.

How can i use a workflow that is in MDM in my webdynpro..

Kindly help.

Former Member
0 Kudos

Hi Prasanthi,

It depends upon your requirement.

1) If your requirement is standard then do not go for coding infact create a MDM system in the Portal and then using the standard MDM search iview along with the resultset iview you can search the repository depending upon the input parameter.

2) If your requirement is customized one then you have no other option left other than coding yourself.

Regards.

Rajat

Former Member
0 Kudos

any suggestions......

Former Member
0 Kudos

Hi,

I need to search for some perticulaR ID which user inputs in webdynpro screen, and i need to get the other fields for this perticular ID. Shall i use any readymade iviews or i should do the coding stuff through webdynpro.

Kindly suggest.

Former Member
0 Kudos

SimpleConnection simpleConnection = null;

You can declare it globally between

//@@begin others
  //@@end

Hope this will clarify.

Regards

Narendra

Former Member
0 Kudos

What is this simpleconnection. Where did u initialise it.....

Former Member
0 Kudos

Hi,

Below are the jar files you need to use for using java apis

mdm-admin.jar

mdm-common.jar

mdm-core.jar

mdm-data.jar

mdm-protocol.jat

and the version of the jar should be the version of your mdm server which you can in mdm console by mounting the mdm server it will show the version on right hand side like Version 5.5 sp5(5.5.40.83)

for example 5.5.40.83 this should be the version of your jar files if above are the configuration of the mdm server.

If the jars are different than the version of mdm server you will get File Fail CRC check error

Below is the code for making connection to the mdm repository.

public void getRepositoryConnection(
		java.lang.String hostName,
		java.lang.String repositoryName,
		java.lang.String userId,
		java.lang.String passWord) {
		//@@begin getRepositoryConnection()
 
		try {
			if (simpleConnection == null) {
				simpleConnection =
					SimpleConnectionFactory.getInstance(hostName);
				System.out.print("Successfull 1");
				// Establish TCP Connection to the server
				if (simpleConnection != null) {
 
					//					WorkflowId workflowId = new WorkflowId(99998);
					//					CreateWorkflowJobCommand createWorkflowJobCommand =
					//						new CreateWorkflowJobCommand(simpleConnection);
					//					createWorkflowJobCommand.setWorkflowId(workflowId);
					//						wdComponentAPI.getMessageManager().reportSuccess("Got Connected");
					/** Establish a repository session with the respository */
					//Set the region properties
					RegionProperties dataRegion = new RegionProperties();
					/** Set region code for the session */
					dataRegion.setRegionCode("engUSA");
					/** Set the locale on data region */
					dataRegion.setLocale(new Locale("en", "US"));
					/** Set the name of data region */
					dataRegion.setName("US");
					// Createa repository identifier
					RepositoryIdentifier repositoryID =
						new RepositoryIdentifier(
							repositoryName,
							hostName,
							DBMSType.MS_SQL);
					System.out.print("Successfull 2");
 
					/** Create the User Session */
					CreateUserSessionCommand createUserSessionCommand =
						new CreateUserSessionCommand(simpleConnection);
					/** Set the repository identifier (mandatory)*/
					createUserSessionCommand.setRepositoryIdentifier(
						repositoryID);
					/** Set the region properties for the session (mandatory) */
					createUserSessionCommand.setDataRegion(dataRegion);
					System.out.print(
						"Successfull 3" + repositoryID.getDBMSType());
 
					createUserSessionCommand.execute();
					System.out.print("Successfull 4");
					/** Get the session identifier */
					userSession = createUserSessionCommand.getUserSession();
					System.out.print(
						"Successfull.................." + userSession);
					AuthenticateUserSessionCommand authenticateUserSessionCommand =
						new AuthenticateUserSessionCommand(simpleConnection);
					/** Set session identifier (mandatory)*/
					authenticateUserSessionCommand.setSession(userSession);
					/** Set id of repository user(mandatory) */
					authenticateUserSessionCommand.setUserName(userId);
					/** Set password (mandatory)*/
					authenticateUserSessionCommand.setUserPassword(passWord);
					System.out.print(
						"Successfull.................."
							+ authenticateUserSessionCommand.getUserName());
					/** Establish the session */
					authenticateUserSessionCommand.execute();
 
					SetUnicodeNormalizationCommand unicodeNormalizationCommand =
						new SetUnicodeNormalizationCommand(simpleConnection);
					unicodeNormalizationCommand.setSession(userSession);
					unicodeNormalizationCommand.setNormalizationType(
						SetUnicodeNormalizationCommand.NORMALIZATION_COMPOSED);
					unicodeNormalizationCommand.execute();
 
					CreateRepositorySessionCommand repositorySessionCommand =
						new CreateRepositorySessionCommand(simpleConnection);
					/** Set the repository identifier */
					repositorySessionCommand.setRepositoryIdentifier(
						repositoryID);
					/** Obtain repository session */
					repositorySessionCommand.execute();
					/** Store the session id into the variable repositorySession */
					this.repositorySession =
						repositorySessionCommand.getRepositorySession();
					/** Authenticate the users session */
					AuthenticateRepositorySessionCommand authenticatedRepositorySession =
						new AuthenticateRepositorySessionCommand(simpleConnection);
					/** set the session id */
					authenticatedRepositorySession.setSession(
						repositorySession);
					/** set id of the repository user */
					authenticatedRepositorySession.setUserName(userId);
					/** set password */
					authenticatedRepositorySession.setUserPassword(passWord);
 
					authenticatedRepositorySession.execute();
 
					/** Get the Repository schema */
					GetRepositorySchemaCommand repositroySchemaCommand =
						new GetRepositorySchemaCommand(simpleConnection);
					repositroySchemaCommand.setSession(repositorySession);
					repositroySchemaCommand.execute();
					this.schema = repositroySchemaCommand.getRepositorySchema();
 
				}
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
		//@@end
	}

Hope this will help.

Regards

Narendra

Former Member
0 Kudos

What MDM jars i need to include. Does this vary based on the requirement.

And kindly provide me the code to get connected to MDM.

Former Member
0 Kudos

Hi prashanthi,

For connecting to mdm database through web dynpro application you have to use Mdm Java Apis.

Through the java Apis you can connect to mdm and perform the operations.

please go through the below link in which i have clearly mentioned the steps for your requirement.

hope this will help

Regards

Narendra