Thursday, December 29, 2011

MDM– Designing a Repository (Part 4)

Creating the Main Table :

Finally, we’d create the main table for Customer. Here, you’d notice that all the steps taken to create the main table are similar to how we’ve created the lookup table and tuple tables.

1. Right click on TEST_Monster.

image

2. Select “Add table”.

image

3. Go to table details and insert the name, code, description, display field (yes/no), unique field (yes/no), whether there’s key mapping (yes/no) and etc. Then select the table type as “Main” since this would be the main table that we’d be creating.

image

4. Here, I’d name the main table “CUSTOMER”. Click on “CUSTOMER” and you’d be able to see the fields created in the main table with all its details at the bottom pane.

image

5. To add a field. Repeat the same thing as you’ve done earlier when creating the lookup and tuple tabl( Refer : http://learnitfromnutzx.blogspot.com/2011/12/mdmdesigning-repository-part-3.html )

Wednesday, December 28, 2011

MDM Console–Start / Stop Repository

In order to create a new table or modify and existing table in a repository, you would have to unload the repository. Once the repository has been unloaded, other MDM applications such as the import manager , data manager and syndicator would be unable to access while changes are being made in the console.

To Unload / Stop the Repository:

1. Right click on the repository and select “Stop Repository”.

2. Here, you’d have several options to unload it either immediately or stop it for several minutes.

3. Once it has been successfully unloaded, the green rectangle icon would changed into a red square icon. This symbol would appear next to the database icon.

image_thumb[17]

Loading/Start-up the repository :

1. To start the repository, just right click on the repository and update it.

2. A dropdown list would appear which shows that you could either start the repository immediately or update indices. It’s recommended to start the repository by updating its indices.

3. To view the loading status of the repository, view Status field in the Repositories pane. Alternatively, you could view the symbol next to the database icon while loading the repository. Here, you’d see a blue arrow on the repository while its loading and once it has successfully loaded, the blue arrow changes to a green triangle.

image_thumb[19]

Tuesday, December 27, 2011

MDM–Designing a repository (Part 3)

Create Tuple Tables :

Here in part 3 we’re going to create the tuple tables.

In the console hierarchy, you’d be able to see a branch called tuples at the far bottom.

Click on tuples and you’d be able to see a similar view as shown below. There’s the tuples window which would list down the tables created in the tuple while the below window shows the details of the tuple tables.

image

To create a new table in the tuple. Just “right click” in the Tuple window and select “Create”.

Here, I’d create a “DNB_Candidate” as the tuple table.

Once, the table created, you’d be able to modify the tuple details in the bottom window. Under the tuple details tab, I’d insert the name, code, and select “yes” under the display field. Once the field details have been confirmed, save the details by clicking “Shift + Enter”.

image

Once created, next I’d create the fields in the tuple.

1. Select the tuple table where you want to insert the fields. Here I’d click on DNB_Candidates which I’ve created earlier.

2. Right click on the top right pane and select “Add Member Field”.

3. Insert the member field details at the bottom window :
  
   Name – Give a name to the field.
   Code – Create a code for the field created
   Description – Simple description of the field created. This would be used as   
   reference by others if there are any changes to be made in future.
   Type – Data type of the field such as text,integer,Boolean,char and etc.

image

Repeat the steps above in order to create several tuple tables if necessary. With all these few basic steps, you’ve completed the creation of a tuple table as well as inserted the fields in the tuple table.

Monday, December 26, 2011

MDM – Creating a New Repository (Part 1)

Creating a New Repository in MDM involves using the SAP MDM Console. To start MDM Console, double click on the icon below:

image

Once the Console is launched, you’d be able to see the page below appears. Generally it consist of three different panes. The left pane is known as Console Hierarchy pane while the top right pane is the objects pane and the bottom right pane is the object details pane. 

Console Hierarchy pane - which shows you a list of MDM servers, repositories and tables.

Objects pane – shows you a list of MDM objects listed in the server.

Objects details pane – shows the details of the object.

First, you’d have to manually connect to the SAP MDM Server.

image

Right click on the MDM Server and select “Mount MDM Server”.

image

Select a MDM Server to mount.

image

Then you’d be able to see the list of MDM Servers mounted from the Console Hierarchy pane.

image

Click on the “+” next to the server to expand the branch. Here, you’d be able to see all the list of the repositories created in the server.

image

In order to create a new repository, we’d right click on the server and select “Create Repository” .

image

A prompt would show “Create MDM Repository” would appear and you’d be able to insert a new Username, Password and Port for the newly create repository. The DBMS Server would be automatically generated to be connected to the configured server. 

image

Here I’m going to create a repository with Username: “TEST_Monster” which you can see in the Console Hierarchy highlighted below;

image

Once it has been created, you’d see a database icon with an “X” created in the Console Hierarchy. To connect to the new repository, right click and select “Connect to Repository”.

image

A prompt out box would appear where you’d be able to insert the username and password set earlier for that particular repository.

image

Once you have successfully open the repository, you’d see the database icon change it’s symbol from “X” to a “red box”. This means that the repository has be unloaded/stop.

image

Expand the branch for the TEST_Monster by clicking on the “+” symbol next to it and you’d be able to see the list of tables within the repository. In the above right pane, you’d be able to see a list of MDM objects that correspond to the selected node in the tree with each of their details listed in the bottom right pane.

image

With all these steps completed, you’ve successfully created a new repository !! (^.^)

MDM–Designing a repository (Part 2)

Designing a repository is no other than to decide which type of records to be stored in the table(s), listing down all the fields to be included in the repository, decide what type of data each fields will contain, decide which data can be stored in lookup tables or tuples, describing the taxonomy of product categories and attributes needed to define each category.

There are several types of tables :
  • Main table – It's normally a flat table which with records and fields (rows and columns) that contains primary information about the business object such as product, customers, employee or supplier.
  • Lookup table – Used to store values that are shared by many records in other tables. In layman terms, its a dropdown list.
  • Hierarchy table – Organizes information in an ordered mannered where each record is related to a parent record or sibling/child records. Picture a tree (parent record) with multiple branches (sibling / child records)
  • Taxonomy –  It is similar to a lookup table, but only used to store specific attributes that applies to a specific category. For example, for a given product such as a gear, you would have different specifications for two similar gears in terms of size, the number of teeth, the diameter and etc. Thus, all these specifications are stored into the taxonomy table.
  • Tuple -  A list of record template that groups together and names a set of related fields but without the actual storage of an instance.
First step to designing the repository starts by mounting the MDM Server and opening the related repository to work on.

**Refer to MDM – Creating a New Repository (Part 1)


Select the respective repository that you’d want to create the table(s). Then you’d be able to view the list of tables associated to the server on the top right window while the table details are listed at the bottom pane.

From the console hierarchy, you’d see the a yellow file icon which signifies the main table in the repository.

image

Let’s start by creating a lookup table in the TEST_Monster repository.
Right click in the tables pane to add a new table. Once a new table is created, you’d be able to see a white-coloured file icon below the main table. This would represent your newly created lookup table / sub-table.
 
image

After adding a new table, next we’d add the fields in each of the newly created tables. Just click on any of the lookup tables created and you’d be able to see the list of fields associated to the table listed on the top right pane with its field details listed at the bottom pane.

image

To add a new table, just right click in the field pane above and select “Add field” and you’d be able to insert/modify the field details at the bottom pane. Field details are able to be modified are as below:

  • Name – give a field name.
  • Code – give a field code.
  • Field description – a simple description of the given field.
  • Field type – describes the data type such as text,integer,Boolean,hierarchy,tuple,main and etc.
  • Display field (yes/no) – whether this field would be displayed in the main table.
  • Unique field (yes/no) – describes if the field is a unique field or not.
Other than the common fields describe above, you can also set the other field details if you do not want to keep the default values.

After you’ve completed the fields, select “Shift + Enter” to save the details or alternatively you can click on the above field pane to save the details.

image


Reordering of the field details :

Once you’ve completed creating the lookup table, you may also want to reorder the field details in the table. For example if you have an country name code listed before the country code/abbrevation (eg: Argentina, Ag) and wish to have it appear the other way round (eg: Ag,Argentina). Just right click on the field pane and click “Reorder”.

 image

A Reorder Field Positions prompt up box would appear. Select and drag the fields in the box to reorder the position.

image

Once the position of the fields have been changed as shown below, click “OK” and you’d be able to see the position of the fields in the above right window pane changed.

image

Thursday, August 4, 2011

Conditions and Conditional Operators

Numerical Comparison Operators






















































































































































OperatorSyntax Description
<a < bResult is true if a is less than b; otherwise, it is false.
<=a <= bResult is true if a is less than or equal to b; otherwise, it is false.
>a>bResult is true if a is greater than b; otherwise, it is false.
>=a>=bResult is true if a is greater than or equal to b; otherwise, it is false.

Boolean Logical Operators








































































































































































































































































































































































































































































































































































































































































































































































OperatorDescriptionExamplesResult
&&Conditional -ANDfalse && falsefalse
false && truefalse
true && falsefalse
true && truetrue
Conditional -ORfalse falsefalse
false truetrue
true falsetrue
true truetrue
&Logical-ANDfalse & falsefalse
false & truefalse
true & falsefalse
true & truetrue
Logical-ORfalse falsefalse
false truetrue
true falsetrue
true truetrue
^Logical -XORfalse^falsefalse
false^truetrue
true^falsetrue
true^truefalse



Compound Assignment Operators:









































































































Operator





Description





Example





Same Result as





+=





Increment assignment operator





x += 5;





x = x + 5;





–=





Decrement assignment operator





x –= 5;





x = x – 5;





*=





Multiplication assignment operator





x *= 5;





x = x * 5;





/=





Division assignment operator





x /= 5;





x = x / 5;





%=





Modulus assignment operator





x %= 5;





x = x % 5;


Basic if , if-else, switch statements

if Statement

Syntax:

if (condition)
{
...
java statements;
...
}

Example:

// == results in a Boolean value true or false
if (RandomNumber % 2 == 0)
{
System.out.println("Even");
}


If-Else Statement

Syntax:

if (condition)
{
java_statements_for_true_condition;
}
else
{
java_statements_for_false_condition;
}

Example :

if (a % 2 == 0)
{
System.out.println("even");
}
else
{
System.out.println("odd");
}

You can eliminate the else statement when using the Boolean variable.

Example:

Typical if-else statement:

if (hungry)
{
System.out.printIn (" Go find food !! ")
}
else
{
System.out.printIn (" Continue working !! ")
}

Alternatively to eliminate the else statement by using the not operator

if (!hungry)
{
System.out.printIn (" Continue working !! ")
}

Switch Conditional Statement

Syntax:

switch (expression) {
case value1:
statements_for_value1;
break;
case value2:
statements_for_value2;
break;
case value3:
statements_for_value3;
break;
default:
statements_for_any_other_value;
}

Example:
switch (n)
{
Case 1:
System.out.printIn("I miss you!!");
break;
Case 2:
System.out.printIn("I care for you!!");
break;
Case 3:
System.out.printIn("I love you!!");
break;
default:
System.out.printIn("Best friends forever!!");
}

Wednesday, August 3, 2011

First Java Applet

(1) Create a file JavaProgramming.java with the source code below and compile it.

Source Code:

/*
*JavaProgramming
*Applet
*/

//imports the graphics class
import java.awt.Graphics;

//extends class characteristics and capabilities
public class JavaProgramming extends java.applet.Applet {

public void paint(Graphics g)
{
//tells the applet to print out the string quoted in a specified (x=10,y=50)
coordinate
g.drawString("Welcome to Java Programming!!" ,10, 50);
}

}

(2) In order to run the Applet, you would need to write HTML doc and include the applet within it.Alternatively used the sample below and save it as JavaProgramming.html.

Source Code:



(3)To run the applet. Type the following command prompt:

appletviewer JavaProgramming.html

Congratulations!! You've just run your first basic Applet.

Tuesday, August 2, 2011

Creating First Java Application

Basic steps to creating your first Java Application:

(1) Create a file name JavaProgramming.java. To do this, you can start by using Notepad and write your own source code or alternatively copy the source code below and save it. ( Note that the file name is case-sensitive)

(2) Sample source code:

/*
* Welcome to Java Programming
*/

//class definition
public class JavaProgramming {

//main method definition
public static void main(String args[])
{

//print out Welcome to Java Programming!! Big Achievement!!
System.out.println("Welcome to Java Programming!! Big Achievement!!");
}

}

(3) Before you run any Java Application, you would need to compile the source code by using javac command.For example at your operating system’s command prompt (such as the DOS prompt), type javac JavaProgramming.java


If you face any problems such as



'javac' is not recognised as an internal or external command, operable program or batch file. This is a commanly known issue as you may have not specify the PATH correctly during installation.Basically,you would have to find where you have installed the jdk(version no.) file and the bin directory and execute the command.

Eg:
C:\Java\jdk7.0.1\bin>javac JavaProgramming.java



Once completed, you have successfully converted your source code into Java byte code.The file extension for Java byte code is .class. Thus, you should see a new file named HelloWorld.class created by the Java compiler in the same directory as the source code file.

Final step is to run the file. To do this, just type java JavaProgramming

And you should be able to see the screen shot below:



Congratulations!! You have successfully created your first Java Program !!

Monday, August 1, 2011

Windows Installation for JAVA SDK/SRE

Open Source Software Downloads Sites:

Before you start learning Java Programming make sure that you have downloaded the latest version of the SDK/JDK as well as the JRE from

(1) Sun Website:

http://java.sun.com/j2se/1.3/docs.html.

or

(2) Oracle Website:
http://www.oracle.com


Windows Installation and Setup:

Follow these instructions if you are running Windows operating systems(OS).

(1) Run the SDK installer program. If you install JDK in the default directory, a folder named jdk(version no.) will be created on your C drive.

(2) Update the PATH variable. The PATH variable tells your system which directories to look in when running commands or .EXE files. Setting the PATH variable allows you to easily compile and run your Java programs from any directory. Before you do this, you need to verify where your SDK’s bin folder is. If you used the default installation directory, the path is C:\jdk(version no.)\bin. If you installed to a different directory, you need to find the jdk(version no.) directory, which will contain the bin directory.