cancel
Showing results for 
Search instead for 
Did you mean: 

Null Pointer Exception

Former Member
0 Kudos

Hi ,

We are using SO_DOCUMENT_SEND_API1 this BAPI to send mails in our application.Here we are passing values to the input parameters SENDER_ADDRESS,SENDER_ADDRESS_TYPE,COMMIT_WORK .

and we need to pass values to the tables also.one table name in the bapi is PACKING_LIST type SOPCKLSTI1(structure).

we have used the following code to pass the values to the table :

Sopcklsti1 input_doctype = new Sopcklsti1();

Sopcklsti1_List maillist = new Sopcklsti1_List();

input_doctype.setDoc_Type("RAW");

maillist.addSopcklsti1(input_doctype);

inputmail.setPacking_List(maillist);

When we are running the application it is giving us the java null pointer exception.

Any inputs on this .

Regards,

Pavani

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

Keep debugging messages and find out the line where exactly error is coming , still if not resolved post the entire code and the line where you are getting the error here.

Regards,

Charan

former_member283828
Participant
0 Kudos

Hi,

The error is because of calling instance method of a class with out instantiating the class.

carefully check the line no where the exception has occured and instantiate the class before calling the method..

Regards,

Kiran Kumar

Former Member
0 Kudos

Which line has an error? (use the debug option to find out)

Former Member
0 Kudos

Hi pavani,

follow this procedure,

1)First create object for the structure.

2)Using this object set values to attributes.

3)Bind this object to the node.

4)execute the bapi.

Regards,

Sunaina Reddy T