cancel
Showing results for 
Search instead for 
Did you mean: 

SAP ME - Creating Custom Screens and Navigation Link

Former Member
0 Kudos

Hi Experts,

I am an MII consultant and very new to SAP ME and custom development.

There is a situation in my project where-in I have the following requirement:

1) In the SAP ME Screen, the user wants to see a new link added that opens a new custom screen developed using SAP ME SDK.

2) He wants to create a new request, save it and then exit the screen.

I did a lot of research and reading around how that can be done. Finally I have come up with the following step-by-step approach.

Not sure if the elaborated version is ok to be shared on the forum. Moderators please mind me if not.

Please have a look at the following steps and let me know if I my understanding is correct and if i am wrong, where and how.

Your support and guidance will help me a lot. Thank you.

1) Install SAP ME SDK on your machine. (Build tool is not required)
2) In Eclipse, Go to Web Application project to make code changes.
3) In the Web Folder, create your JSP for the User Interface. As many JSP as required.
4) For obtaining data from SAP ME, follow 1 of the 2 options:
           a) Available PAPI Web Services
           b) Direct Database connection with SAP ME WIP Database
5) For posting data back in SAP ME, follow 1 of the 2 options:
           a) Available PAPI Web Services
           b) Direct Database connection with SAP ME WIP Database
6) Go to Project Build Resources --> Script --> build.xml. Right Click build.xml and
      Run on Ant. From the options of Targets, select build.web.
7) The war file can be found in SAP\SAPME\SDK\IDE\build\results\server\package.sca\ear or SAP\SAPME\SDK\IDE\build\results\server\sda.
      The name of the war file is: me.common.web-6.0.4.0.war
😎 In the Deployment Perspective of the Eclipse, Import the Deployable archive:    me.common.web-6.0.4.0.war
9) Go to Windows --> Preferences --> SAP AS Java. Add the Java Instance of the Server where the SAP ME is installed or hosted.
10) Go to Deploy View, right-click the .war and deploy after giving User Name and Password.
11) Once the war is deployed on the SAP ME server, we should be able to see the activity on the SAP ME Screen.
12) Login to SAP ME, and go to Activity Maintenance. We will be able to see the new screen name in the pop up box.
13) Add it to see the new link in the navigation pane in the left.

Regards,

Gita

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Thank you Chandan,

I was able to add an activity, group and link. It works really fine..

But I am not sure how I will be able to add my JSP there under the type External URL.

I just tried adding www.google.com as the URL. But that did not work.

It was trying to open a link: http://<host>:<port>/manufacturing/com/sap/me/system/client/www.google.com which is obviously incorrect.

This means that the custom page that I create needs to be available under http://<host>:<port>/manufacturing/com/sap/me/system/client/

If I deploy my war file on the java AS, will my page and relevant files automantically get added in this folder?

Also, Can you please confirm that the steps I have written above are correct?

Thank you so much.

Regards,

Gita

0 Kudos

Hi Gita,

As concerns External URL, please check SAP Note 1782366. It was designed for usage within POD.

Regards,
Sergiy

Answers (10)

Answers (10)

Former Member
0 Kudos

Hi All,

I did manage it using the following code:

IUser user;

user = UMFactory.getAuthenticator().getLoggedInUser();

String CURRENT_USER = user.getUniqueName();

Enabling SSO worked for me.

Thank you.

Former Member
0 Kudos

Hi Gita,

May I know the steps what you followed for exporting web project as EAR and and got it deployed on Netweaver using NWDS?

After deployment how you are accessing the web page. Sample URL would be helpful.

How did u manged the authentication of logged on user. I mean password of ME logged on user.

Regards, Eshwar.

Former Member
0 Kudos

Hi All,

My requirement is of a standalone java web project which is capable of interacting with multiple systems. Also, we just don't want to host it on SAP ME but standalone too.

Thus, I have a dynamic web project in eclipse and a few JSP pages calling web services etc.

After the coding is done, I am testing it using my local Tomcat server and it works fine.

Now I want to deploy this on my Netweaver. I exported the EAR and and got it deployed on Netweaver using NWDS.

The application works fine there too.

In SAP ME activity maintenance, I have created some activities and added the JSP there as standalone JSP.

Now I want to capture the name of the user who logs on to SAP ME from my JSP page.

Is that possible?

If not, how can I insert a security login into my page where the user can enter SAP UME credentials and I can capture it from my JSP?

Please help in this regard.

G

Former Member
0 Kudos

Hi Oksana,

I am using ME 6.1.3 version.

For the custom development, I am not using SDK, but eclipse. In eclipse I have create dynamic web project and within it I have a few JSP's. I want my JSP to fetch the username with which the user has been logged on the SAP ME site.

I tried to import the com.sap.security.api.jar and used the following code in my servlet.

IUser username = UMFactory.getLogonAuthenticator().getLoggedInUser();

  userid = username.getName();

But it fails and does not even run.

PLease help in this regard.

Thank you in advance.

former_member185234
Active Participant
0 Kudos

Gita ,

You will not be able to create custom UI without using SDK tool.

So you should install SDK tool that comes with eclipse and has special build system to compile and build custom code.

Regards,

Oksana

Former Member
0 Kudos

Hello Gita,

Just a thought,you can deploy .ear of your dynamic web project on NW uisng NWDS but it may disturb the existing components on NW.Never tried.

I would suggest to go for SAP ME SDK using NWDS for customizing SAP ME.

Regards, Eshwar

Former Member
0 Kudos

Thank you Oksana,

I did create a servlet class in my project and wrote your code there. But it is not recognizing this CommonMethod class. Is there any jar that I need to import or any other library changes?

I am not an expert in java and servlet, so I am facing difficulty in achieving this.

Regards,

Gita

former_member185234
Active Participant
0 Kudos

Hello Gita ,

What ME version do you use - 6.0 or 6.1 ?

Do you use SDK tool or NWDI/NWDS to create custom UI screen ?

Thanks,

Oksana

Former Member
0 Kudos

Thank you for the reply Oksana,

But will it work for my scenario?

I have made a separate java project calling ME web services. and the JSP files of that java project are created in SAP ME using activity maintenance.

I want to capture the site or user id of the SAP ME user who logs in and then uses this standalone application.

Shall I include your code in my standalone JSP page?

Regards,

Gita

former_member185234
Active Participant
0 Kudos

Hello Gita ,

f you call this custom standalone activity from activity manager you should
be logged in to ME aplication and then you can capture this values by using
CommonMethods class. You will not be able to use custom standalone activity
without authorization . You should include my code to servlet class , it is contorller class for your JSP.

Regards,

Oksana

Former Member
0 Kudos

Hello Moderators,

This is regarding my forum for ME custom Development for which I seek your help. I have created a few standalone JSP pages and I am adding them as activities in my SAP system. My current requirement is to capture the user that has logged on to the system. Is there any way we can pass the name of the current logged on user in the URL we write in the Activity maintenance as session parameters?

Your prompt reply will help me with many complicated situations currently my organization is facing.

Regards,

Gita

former_member185234
Active Participant
0 Kudos

Hello Gita ,

At ME 6.1 you can get site and user ID for current logged in user at Servlet class from CommonMethods class:

String site = CommonMethods.getSite();

String userId = CommonMethods.getUserId();

Regards,

Oksana

Former Member
0 Kudos

Thank you Sergiy,

I did read this note and tried creating an activity of Type "Standalone GUI (.jsp)".  It worked at least some sample jsp page, like. JSP Tutorial. So I think it will work for my jsp too.

Now I have a requirement where in I want to send the current site, and logged on user name to this JSP that I am calling. Is there a way to pass these to values in the URL as session variables? so that my jsp page can read these variables?

Thank you group. PLease reply.

Regards,

Gita

Former Member
0 Kudos


Thats exactly my requirement.

Just like we see the links "Material Maintenance", "Operation Maintenance" and other links, I want a new link say "Job Request". And on clicking on that link, my custom screen should open on the right side. This custom screen should be able to look up the values of materials, operations, routings etc needed to create the job and then on clicking the save button, should be able to save everything in the WIP database.

I understood that for the look up and saving the data back to WIP I can make use of PAPI web services.

But I don't have idea of how I can create this new link "Job Request" and make my custom screen visible on SAP ME screen.

Regards,

Gita

former_member206397
Contributor
0 Kudos

Hi Gita,

Please find here the steps to meet your requirement.

In ME Activity list link open "Activity Maintenance"

-  In Main Tab put the Activity name (for example TEST_ACTIVITY), Description, Class/Program: <Page URL>, Type: External URL

-  Activity Groups Tab -> from left side select “Product” and assign it to “Assigned   Activity Groups”

- Save it

Now open “User Group Maintenance” activity link

- Put User Group: ADMINISTRATORS

- In Permissions tab select the activity (The name (TEST_ACTIVITY) you have given at the time of activity creation) from Product Group

- Save it

Logout and Login in ME. You will get your activity (the link) in ME Menu within Product Activity Group.

Thanks

Chandan


former_member206397
Contributor
0 Kudos

Hi Gita,

Another way you can add any custom screen in ME as an activity also. Suppose you have developed a custom screen using SAP ME PAPI services to show data from WIP to screen and after doing changes you want to save it to WIP. Now you are able to run the screen as a standalone. To integrate it in ME you need to create an activity with URL of the page. Now the same activity you can provide within a POD through a button or put as link in Menu. It depends on the exact requirement.

Thanks

Chandan

tim_drury
Active Participant
0 Kudos

As for #5: do _not_ push data directly back into the SAP ME WIP database.  You would be bypassing all validation, business logic, and extension mechanisms.