Hello
I'm using Apex 24.2, and in a modal form, I have a master detail regions. The master is a common query to a single record from a table called SE_BUSINESS_AREA_1 which is called from another page which is interactive report. This record has two fields as primary key ID_COMPANY and ID_BA1
The detail region is called SE_BUSINESS_AREA_2 and is an interactive grid which also have a two fields primary key, ID_COMPANY and ID_BA2. To perform the query on the detail region, I used this in the where section ID_COMPANY=:P61_ID_COMPANY and ID_BA1=:P61_ID_BA1

The query process in fact works as expected, and retrieve the information from both regions.
When a new record is created in the detail region, I've set the default values for the ID_COMPANY and ID_BA1 using the P61_ID_COMPANY and P61_ID_BA1. But, when I try to save the changes and perform the insert using the Business Subareas - Save Interactive Grid Data I'm getting the following error:
- ORA-01400: cannot insert NULL into ("MANTRA_BE"."SE_BUSINESS_AREA_2"."ID_COMPANY")
To discard any table design error, I inserted two record using this command without error: insert into se_business_area_2 values (1,null,6,'A','A',null,null,null)
I've checked in many ways if something may be affecting the assigning of the values ID_COMPANY and ID_BA1, even passed both values a text fields, but the error is shown anyway leaving me without no clue why this error is raised

Both values from Company and BA1 are created automatically when the IG record is created.
Anyone have any suggestions about where to look for answers about how to fix this error?
Thanks