Hi, I have to insert/update an ERP column that is CHAR NOT NULL.
In this ERP, if the field is null, it must be filled with spaces
Example:
my_field char(100) not null;
So,
when I update this field with empty data, it must be:
update my_table set my_field = rpad(' ', 100)
That is an ERP requirement. I don“t have control over this.
I have a form that mantain a table from this ERP. In the PRE-INSERT and PRE-UPDATE trigger from the datablock I added:
:my_block.my_field := rpad(nvl(ltrim(:my_block.my_field), ' '), 100);
But I still get the error:
ORA-01407: cannot update ("BAAN"."TTBMTB108100"."T$NOCO$O") to NULL
Seems like it is trimming the value.
As workaround, i created a trigger "before insert or update" where i replace the null with spaces... but I wonder if there is an option/property or whatever in forms to make this work as (i think) it should.
Is there?