Use
If you use the function SAP_CMPERR in the SAP development library for your C program, you get a short error description if an error occurs.

CM_RETCODE return_code;
..
CMALLC(convid,&return_code);
if (return_code != CM_OK)
{
printf("SAP-INFO: %s\n", SAP_CMPERR());
}
..