cancel
Showing results for 
Search instead for 
Did you mean: 

Validate columns in UDT against existing tables

Former Member
0 Kudos

I want to create a User Defined Table that has a column that is validated against an existing SBO table, such as OCRD. I can table validate against another UDT but AFAIK I can't against an existing table.

If I'm wrong (I hope so), can it be done from the GUI of SBO or can you do it in the SDK? If so, how? If not, how horrible (unwise) would it be to add a foreign key constraint directly from SQL?

TIA.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Knute,

AFAIK there is no possibility to do it "easyly". I havent tryed to create a foreign key constraint, as SAP doesn´t allow you to modify database metadata directly.

Did you try some stuff with formatted searches? If you explain a little what you want, perhaps there is another way.

What I have done before is to create combo in a form, populate it with the values in the related table, and bind it to the field you want to validate. But this needs some UI API coding.

Regards,

Ibai Peñ

Former Member
0 Kudos

The project is still in the design phase. I was fairly impressed with SBO's generic matrix to fill in a UDT but disappointed that it would only lookup values (with the little orange arrow) if the column was tied to another UDT and not a standard table.

My UDT will someday probably have a form attached to it but since it doesn't get updated very often, I was hoping for the first phase we could use SBO's generic matrix. Looks like we can't.

It's a Contract by Stock Item by Employee Level table. Right now there is only one Contract per Customer (BP) so it could be a Customer by Stock Item by Employee Level table. Customer would be validated by OCRD with a CardType of "C", Stock Item would be validated against OITM, and Employee Level is a UDT that indicates the Employee's level of experience and therefore pay rate.

Contracts change infrequently, but you can see the importance of validating the Customer and Item. If I have to do a full-blown form and do the validation programatically instead of letting the generic SBO UDT matrix do it, that just adds more to the first phase of the project and slows initial implementation.

It just seems odd that you can tie a UDF to a UDT but not a standard table.

Former Member
0 Kudos

Hi again Knute,

I don´t fully understand your problem, so this could be stupid. But can save lot of time if I´m right.

The field to be validated, is editable?

If it is, you could asign a formatted search to it.

You could set it as manual or automatic when data needed to validate the field is entered.

If validation isnt right, return a nonsense value, or set a invalid value, which will not let the user saving the data.

Regards,

Ibai Peñ

Former Member
0 Kudos

You know the screen that you get to from the SBO menu bar: Tools -> User Defined Tables -> [yourTableName]? That's what I'm talking about. That's the "no programming" solution. It's crude but would work well for a table that gets loaded once and changed infrequently. I don't know if you can put a formatted search into that; I'll try it. It's just too bad you can't link a column to an existing field, but I'll take that up with development.

Answers (1)

Answers (1)

Former Member
0 Kudos

I was able to put a Formatted Search into the Tools -> User Tables form, but it seems to work for only one cell. Is there a way to make the Formatted Search apply to the entire column? And if so, how does the $[$item.column.0] syntax work in the query?