Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
You mean one field being able to represent two possible types of values?
(Ex an id which might reference Table A or table B) -
@Codex404 one field has multiple possible values, and you could choice as many as you want.
I don't know if I could do this through programing. It's SAP, so it's complicated, I can't really programm most things. Might have to choose other fields instead -
@groenkek that could have worked, if the field wasn't char2. FFS it keeps getting worse
-
@cantthinkofone I would link it to a multiple choice table and then make it a relationship (one to many or many to many depending on the data)
-
@Codex404 I'll see if I can do that. We try to avoid making tables (again, SAP, we can't do anything) but that might be the best solution, at least at the moment
-
@cantthinkofone otherwise you could make it even dirtier by placing semicolons between values and split it later.
-
TobyAsE28116yI have never worked with sap, but my boss one told me that you can change (almost) everything in sap.
Maybe you explore some paths deep in the sap/abap hell... -
@TobyAsE I mean, I could change the field type and some source code, but then when they update it and it doesn't work it's my fault and I don't want that.
That's why we avoid changing anything they did and only make our own transactions. You change one tiny thing everything stops working -
Store the first value in the field and all extra values in a one-to-many related table. That'd be the best option.
Now, if you can't change anything and they still expect you to make the field multivalued out of thin air, I'd say you'll have a lot of explaining ahead of you. 😉 -
@ethernetzero actually, just a couple of hours ago we talked about this and we decided we will be creating a field for each choice. Each field could only have one of two values: 'X' or empty. We have a few fields like that in the same table, so we'll just copy them. I suggested the 'creating a table' option that someone had already suggested, but then we would have to change some of the source code, it would be a mess.
Maybe it's not the best solution, because the values could change, but it's the best we can do with all the limitations we have.
Related Rants
Someone in the company wants to make one (database) field multiple choice. HOW THE HELL AM I SUPPOSED TO DO THIS
rant
sap
two choices one field