ArtOfLiving
ArtOfLiving

Reputation: 1

com.sap.conn.jco.AbapException: (126) ERROR: ERROR Message 172 of class 29 type E

I am getting below exception while executing the JCoFunction.

JCoFunction functionBOMCreation = destination.getRepository().getFunction("CSAP_MAT_BOM_CREATE"); functionBOMCreation.execute(destination);

Getting this exception

com.sap.conn.jco.AbapException: (126) ERROR: ERROR Message 172 of class 29 type E
    at com.sap.conn.jco.rt.MiddlewareJavaRfc$JavaRfcClient.execute(MiddlewareJavaRfc.java:1824)
    at com.sap.conn.jco.rt.ClientConnection.execute(ClientConnection.java:1120)
    at com.sap.conn.jco.rt.ClientConnection.execute(ClientConnection.java:953)
    at com.sap.conn.jco.rt.RfcDestination.execute(RfcDestination.java:1317)
    at com.sap.conn.jco.rt.RfcDestination.execute(RfcDestination.java:1288)
    at com.sap.conn.jco.rt.AbapFunction.execute(AbapFunction.java:302)**

Upvotes: 0

Views: 2098

Answers (1)

Sandra Rossi
Sandra Rossi

Reputation: 13628

Generally speaking, when you get AbapException, it means that the called function has explicitly found an error. It may be an error in the arguments you pass to the function or an error due to data in SAP system.

You may possibly receive a message number with it. If so, you may obtain the text by either logging into SAP system manually (via SAP GUI) and run SE91 transaction code to display the messages, or your program can do an additional call to the function BAPI_MESSAGE_GETDETAIL to get the full message text (input parameters: ID, NUMBER, MESSAGE_V1, MESSAGE_V2, MESSAGE_V3, MESSAGE_V4; output parameter: MESSAGE).

In your case, the message ID 172 of class 29 corresponds to the text Enter a quantity. I don't know CSAP_MAT_BOM_CREATE so I can't tell you what exact parameter is concerned.

Upvotes: 1

Related Questions