cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI Service Notification

Former Member
0 Kudos

Hi,

i am using the following BAPI's for creating the Customer Service Notification:

Transaction - IW59

1. - BAPI_SERVNOT_CREATE

2. - BAPI_SERVNOT_SAVE

3. - BAPI_TRANSACTION_COMMIT

I am getting exception about Notif_No !!!

How can i set/get the Notifynumber? or it will be assigned automatically to the Notification.

using the following but not recieving any Notifynumber:

wdContext.currentBapi_Servnot_Create_InputElement().modelObject().getOutput().getNotifheader_Export().getNotif_No()

I dont know whats the matter ........... i want to create a service notification successfully...please help me!

Thanks

Adnan

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

The problem was wrong parameter values like Notification tye etc. After passing the correct parameter values. Now WDJ application is able to Create a service notification.

Edited by: Adnan Mehboob on Jan 5, 2009 2:52 PM

Edited by: Adnan Mehboob on Jan 5, 2009 2:53 PM

Former Member
0 Kudos

Hi,

Can u tell what type of exception it is and when are u getting it?

is it an exception or a warning message.

Regards,

Satya.

Former Member
0 Kudos

Hi,

it is giving an exception that there is problem during the creation of Notification Number.

Im using following code for notifno:

-


String notifNo = "0";

if (wdContext.currentBapi_Servnot_Create_InputElement().modelObject().getOutput().getNotifheader_Export().getNotif_No() != null)

notifNo = wdContext.currentBapi_Servnot_Create_InputElement().modelObject().getOutput().getNotifheader_Export().getNotif_No();

wdComponentAPI.getMessageManager().reportSuccess("Information: The Notifnr is: " + notifNo);

//check if number is given

if (notifNo.compareTo("")==0 || notifNo == null || notifNo.compareTo("0")==0)

{

throw new Exception("Not able to create a Notifno.");

}

Bapi_Servnot_Save_Input bapiSaveInput = new Bapi_Servnot_Save_Input();

wdContext.nodeBapi_Servnot_Save_Input().bind(bapiSaveInput);

bapiSaveInput.setNumber(Notifno);

-


I dont know wut to do now

Thanks

Former Member
0 Kudos

HI

initially u have assigned a value

String notifNo = "0";

and u r checking

if (notifNo.compareTo("")==0 || notifNo == null || notifNo.compareTo("0")==0)

and throwing an exception .

so it is giving ann exception.

remove the assignement

String notifNo = "0";

and try.

also can u post the exception?

Regards,

Satya.

Former Member
0 Kudos

Hi,

im using the Transaction iw21 to create a Service Notification.

i am using following code in Web Dynpro Java

Which parameters i must fill?

1: First i am using

Bapi2080_Nothdri notifHeader = new Bapi2080_Nothdri();

& then setting the param

-notifHeader.setDistr_Chan

-notifHeader.setSales_Org

-notifHeader.setNotif_Date

-notifHeader.setReportedby

-notifHeader.setShort_Text

& as well as long text

Bapi2080_Notfulltxti longtext = new Bapi2080_Notfulltxti();

-longtext.setObjkey

-longtext.setObjtype

-longtext.setText

-longtext.setFormat

-bapiInput.addLongtexts(longtext);

-bapiInput.setNotif_Type

Executing it.

2: Then im using the Save Bapi and setting the number:

Bapi_Servnot_Save_Input bapiSaveInput = new Bapi_Servnot_Save_Input();

wdContext.nodeBapi_Servnot_Save_Input().bind(bapiSaveInput);

-bapiSaveInput.setNumber("1111111");

Executing it.

3: Then

Bapi_Transaction_Commit_Input bapiCommitInput = new Bapi_Transaction_Commit_Input();

wdContext.nodeBapi_Transaction_Commit_Input().bind(bapiCommitInput);

Executing it and

wdContext.nodeOutput().invalidate();

Which parameters have to be setted from me or all above-mentioned parameters must me setted?

Is Notification number will be generated automatically or i have to set it also? How to set it?

How can i see the R3 return message?

I am new here , it will be great if anybody answer my questions

Thanks

Adnan

former_member192434
Active Contributor
0 Kudos