cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Add new Custom Field to Notification Object SAP Work Manager 6.5

former_member625523
Discoverer
0 Kudos
638

Hi Experts,

I have to extend the Notification Object specifically screens "NotificationAddFromEquipment" and "NotificationAddFromFLOC".

In my screen, transactions and object i have added the field "Coding" and "CodingGroup".

When i see in the ATE the object has the properties are displayed correctly.

Then extension in POJO and BAPI Class.

Pojo:


public class ZNotification extends Notification {

	public String Coding;
	public String CodingGroup;

	public ZNotification() throws Exception {
		super();
	}

	public ZNotification(User u) throws Exception {
		super(u);
	}

	public ZNotification(User u, Table tbl, Table notesTbl, String returnUpdateDT) throws Exception {

		super(u, tbl, notesTbl, returnUpdateDT);
		setProperties(tbl);
	}


	public void setProperties(JCO.Table tbl) throws Exception {

		super.setProperties(tbl);


		setCodingGroup(tbl.getString("QMGRP"));
		setCoding(tbl.getString("QMCOD"));

	}

	

	public void setProperties(User u, NotificationPostBAPI bapi) throws Exception {

		super.setProperties(u, bapi);

		

		setCodingGroup(u.getString("transaction.notification.CodingGroup"));

		setCoding(u.getString("transaction.notification.Coding"));

	}




	public String getCoding() {

		return Coding;

	}




	public void setCoding(String coding) {

		Coding = coding;

	}




	public String getCodingGroup() {

		return CodingGroup;

	}




	public void setCodingGroup(String codingGroup) {

		CodingGroup = codingGroup;

	}




}

Notification BAPI Class


public class ZNotificationPostBAPI extends NotificationPostBAPI {




	public ZNotificationPostBAPI(User u) throws Exception {

		super(u);

	}




	public void setHeaderParameters() throws Exception {

		super.setHeaderParameters();

		

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

		

		setValue(header, "CODE_GROUP", _user.getString("transaction.notification.CodingGroup"));

		setValue(header, "CODING", _user.getString("transaction.notification.Coding"));

	}

}

I have changed the BAPI_WRAPPER and BAPI_CLASS parameters in Config Panel, everything works except that variables "Coding" and "CodingGroup" are empty when i set a breakpoint into my MDO Z Class, they must be retrieved in CODE_GROUP and CODING of BAPI into structure BAPI2080_NOTHDRI.

Thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

former_member625523
Discoverer
0 Kudos

This has been solved.

Thanks.

adelapava1
Explorer
0 Kudos
Hello how did you solve it? can yo share the .jar?

Answers (0)