cancel
Showing results for 
Search instead for 
Did you mean: 

Notification details edit in work manager 6.2

CRVMANISH
Contributor
0 Kudos

Hello Experts,

There is no WorkCenter field in Notification edit. WorkCenter exists in transaction and object property, so i easily added WorkCenter to NotificationEdit Screen ,  but it does not replicate  when i deploy and run on client.

Please suggest where i am doing wrong.

Regards

Manish

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Manish,

Does it means that standard code does not support Work center update for notification.

Can you tell me what changes we need to do in SAP side also to get the work center update.

Thanks,

Madhur

CRVMANISH
Contributor
0 Kudos

Hi Madhur,

Its still a problem , not able to achieve it.

Let me know if you resolve it

Regards

Manish

0 Kudos

Hi Manish,

Ensure from client - you could use Agentry Test Evironment - where you are getting work center from the client.

Debug java eg: Notification.java where you are setting the work center that you are getting from the transaction.

From WM6.2 - Notification Post current transaction calls Notification Post steplet - where you could put break point from execute() - you could navigate the dubug and identify the problem. Hope this helps.

Thanks

Resmi

Former Member
0 Kudos

Hello Resmi,

Quick question is work center update not a standard out of box solution provided  by SAP.

When we transfer work order using work center . We need to transfer notification and update work center field over there.

My assignment both work order and for  notification is at header work center level.

Looking forward to hear from you soon.

Thanks,
Madhur kanungo

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

Madhur,

Please create a Discussion marked as a Question.  Not only so others may benefit from your solution once it is found, but also because you will have more folks looking to provide a solution when your issue has the greater visibility of a Discussion.  Also suggest that you visit the Getting Started link at the top right of each SCN page for help with creating a good Discussion.

--Bill

CRVMANISH
Contributor
0 Kudos

Correct line:

u.getString("transaction.notification.Z_NewField");

Where you able to resolve notification edit issue?

Regards

Manish

Former Member
0 Kudos

I am not posting entry while editing, i am posting while creating an notification.

But not able to get the planner group value, it is going as blank.

Not able to get the hit this method.

public void setProperties(User u, ZNotificationPostBAPI bapi)

  throws Exception

  {

  super.setProperties(u, bapi);

  setPlannerGroup(u.getString("transaction.notification.PlannerGroup"));

  setPlanningPlant(u.getString("transaction.notifcation.PlanningPlant"));

  setWorkCenter(u.getString("transaction.notification.WorkCenter"));

     }

any idea how to call this method.

Thanks,

Madhur

CRVMANISH
Contributor
0 Kudos

Hello

Bill Froelich's Profile | SCN

Work Center update is not working don't know where i am going wrong.

Regards

Manish

i834235
Product and Topic Expert
Product and Topic Expert
0 Kudos

Manish,

You need to analyze where the issue exists

1) Put a break point in custom JAVA code and check whether controls stops in your code.  if control doesn't  stop then  your most likely  your JAVA code is not called at the runtime..   Couple of things to check a) It is mostly related to parameters definition in config. panel.  - check if all relevant parameters are changed point to Z class.   Cross check against any standard parameter. b) Make sure that if SMP server is restarted after parameter change

2) if you see Work center value populated in JAVA layer  then put a break point on SAP side..to check if work center value is  received,   Basically you  have to debug and check what happens with WC value passed from Agentry client.

Hope it my answers help you to narrow down issue.

Thanks

Manju.

CRVMANISH
Contributor
0 Kudos

I have tested backend by passing value in debugger to check if work center updates or not, it works fine.

We are facing problem from Agentry itself, value is not passing from agentry.

Work center field is already there in object properties and transaction.

We have extended following BAPI

1.  NotificationEditBAPI

2.  NotificationPostBAPI

Steps we followed

1. Extended mentioned above classes.

2. Extended steplet and step handler for both the above classes.

3. Maintained java class for steplet in agentry steps

4. Changed config for both above classes in syclo config panel

Do we need to write steplet and steplet handler , as in forum it was said not to use step and stephandler for SAP WM 6.2 version.

Please suggesr

Regards

Manish

i834235
Product and Topic Expert
Product and Topic Expert
0 Kudos

Manish,

if work center value is not passed from Agentry side then there is no point in debugging on SAP side.

Couple of things are not clear to me -  Under steps we followed section you said you have extended step let and step handler but towards the end your asking

whether to extend steplet and stephanlder. 

is your issue :-

1)  is work Center value  not passed from Agentry to  JAVA ? or

2) Is custom java code not invoked at the runtime ?

for case 1) use ATE to debugging why Work Center value is getting cleared ?  Debug Notification Add/Edit transaction and check it out ?  Check any rules  or transmit action which I believe creates transaction on the fly.

case 2) extend steplet and step handler check what happens ?  Just follow standard product way of doing things.

Unfortunately  there is no easy answer  to your issue. Debug is the only option to analyze your issue.

check this thread http://scn.sap.com/thread/3511278 ,http://scn.sap.com/thread/3542583

Thanks

Manju.


CRVMANISH
Contributor
0 Kudos

Thanks resolved.

Appreciate your help.

Regards

Manish

former_member201041
Participant
0 Kudos

This message was moderated.

Answers (1)

Answers (1)

CRVMANISH
Contributor
0 Kudos

Hello Experts,

It was screen platform issue. Now i can see the work center, when i populate and transmit it does not replicate in SAP. What changes i need to do in java side. I am using NotificationEdit transaction.

Regards

Manish

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

Manish,

The Notification Edit is a two step transaction process.  You will need to look at the NotificationPostCurrent action which is responsible for sending the change to the backend.  This in turn will call the NotificationPostSteplet which will call the NotificationPostStepHandler which you will probably need to be extended to set the WorkCenter in the backend.

--Bill

CRVMANISH
Contributor
0 Kudos

Hello Bill,

In Worker Manager 6.2 , i was told you need not to extend steplet and stephandler, it automatically takes care, please confirm if i need to extend it or not.


Regards

Manish

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

Manish,

I will ask but I was not aware of that. 

In the meantime, you could try debugging the java code and confirm the Work Center is populated as expected before being sent back to SAP.

--Bill

CRVMANISH
Contributor
0 Kudos

Hello 

Can you check this code, what is wrong here. I am not getting debugger on setHeaderParameter.


package com.syclo.sap.component.notification.custom.bapi;

import java.util.ArrayList;

import com.syclo.sap.*;

import com.syclo.sap.component.notification.bapi.NotificationPostBAPI;

import com.syclo.sap.jco.JCO;

public class ZnotificationPostBAPI extends NotificationPostBAPI{

  public ZnotificationPostBAPI(User u) throws Exception {

  super(u);

  }

  @Override

    protected void setHeaderParameters(Logger log) throws Exception{

    if (_bapiType.equals("CREATE")) {

    if (_notification.getIsLocal()) {

         JCO.Structure header = _imports.getStructure("IS_NOTIF_HEADER");

         setValue(header, log, "PM_WKCTR", _notification.getWorkCenter());

    }   

  

    }

    else if (_bapiType.equals("UPDATE")) {

       JCO.Structure header = _imports.getStructure("IS_NOTIF_HEADER");

         JCO.Structure xStruct = _imports.getStructure("IS_NOTIF_HEADER_X");

         setEditValue(header, xStruct, log, "PM_WKCTR", _notification.getWorkCenter());

      

        

           }       

  }

}

Regards

Manish

CRVMANISH
Contributor
0 Kudos

Need your help here.

Regards

Manish

marshal_oliveras2
Active Contributor
0 Kudos

If the debugger is not stopping then the problem is not related to the code.

Set a breakpoint to the execute() method in the standard steplet class called when a Notification is created/edited in Agentry. In WM 6.1 this is the class: com.syclo.sap.component.notification.steplet.NotificationPostSteplet

Then you can debug all the process. In the step handler class you will see if your custom class is retrieved from the configuration portal, which probably is the cause of your problem

Former Member
0 Kudos

Dear Manish,

I have written similar code to update Planner group field in SAP. But getting this error in POJO class.

Are you aware on how to resolve it.

Please find my BAPI and POJO code.

POJO Class:-

POJO class has error on line number 50; The type com.syclo.agentry.User cannot be resolved. It is indirectly referenced from required .class files.

But i have added all libaries and references, still i am getting that error.

BAPI CLass for reference:.

It is giving me error in steplet class, JAVA class not found, I have configured the custom class properly in SAP config panel.

Any help would be much appreciated.

Thanks.

Madhur Kanungo