Skip to Content
Former Member
Nov 11, 2010 at 09:27 PM

Classification value validation


When Classifying a material (or any object for that matter) using BAPI_OBJCL_CREATE, If there is a problem with a value being assigned to a characteristic such as an invalid value being passed, the BAPI passes back the problem in tbapiret2 and does not save the allocation. The problem I have with this is that it only passes back the 1st problem it encounters. So after correcting the 1st problem, and callling the bapi again, the next error is then visible. This process has to be repeated until all errors are corrected. I thought I could write a "pre-edit" FM that would run thru all the characteristics and return to the user ALL validation errors at one time, saving large amounts of frustration and time.

What I have found is the function CTMS_CHAR_CHECK_VALUE which seem to do exactly what I want, but whenever it encounters an error it executes the message command causing the message to be sent to the screen and terminating the processing, so that I cannot check the next characteristic.

Does anyone know of a way I can accomplish checking ALL my characteristics in one pass?