cancel
Showing results for 
Search instead for 
Did you mean: 

Running CSAP_MAT_BOM_MAINTAIN with JCo, is it possible?

Former Member
0 Kudos

Hello,

I am trying to use CA-PLM BAPI:s by the Java Connector but CSAP_MAT_BOM_MAINTAIN gives constant exception to my application:

JCO.AbapException: (126) ERROR: Terminate processing

At the same time for example BAPI_MATERIAL_SAVEDATA works fine.

Do You have any ideas what is the problem with the bom function, could it be used by the JCo or is there alternative BAPI for that?

regards,

a

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello

seems to me that this error comes from SAP so check if you call the BAPI with the right params (also try in directly in SAP to test BAPI with given parameters in SE37 and see if an ABAP exception is raised)

See JCO Docs:

-


public void execute(JCO.Function function)

Executes the function on the remote server synchronously

Parameters:

function - the function to execute on the remote server

Throws:

JCO.AbapException - thrown if something went awry in the called function.

JCO.Exception - thrown if something went wrong during communication, marshalling, etc.

---

unfortunately all exception from JCo are derived from RuntimeException, so they are unchecked and the Java compiler doesn't force you to catch them.

try something like this



JCO.Client client = .....
.....
try {
  client.execute (function)
} catch (JCO.AbapException ex) {
  System.out.println ("Exception raised by SAP System");
  System.out.println (ex.getKey() + ": " + ex.getMessage());
}
....

Regards

franz

reward points if useful

Former Member
0 Kudos

Thanks for a piece of advise,

in my case CSAP_MAT_BOM_MAINTAIN does not work with SE37 either. Lets solve that problem first and then JCo-solution will be succesful, I guess.

Own exception handling (AbapException) does not give extra info for Jco application, just ERROR (key) and Terminate application (message).

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

I am trying to use JCO for updating BOM. But, I always get the message "terminate processing" after execution. Any pointers?

-Vinay

Former Member
0 Kudos

Sorry, I got the answer myself. I had to input atleast one effectivity data before updating the BOM.