currently i am facing a problem on how to update a single row in an interactive grid. My Page contains multiple IGs and I have to use PL/SQL to update the rows.
Automatic Row Processing didn't work properly. Attached you can find the IG and the code I wrote. I don't know how to select the correct row with the rowid.
I have 4 columns in my table, note that I don't have a column ROWID. Any help is appreciated.
begin
case :APEX$ROW_STATUS
when 'I' then -- Note: In EA2 this has been changed from I to C for consistency with Tabular Forms --I for Insert
insert into poc_sofortmassnahme ( beschreibung_sofort, bearbeiter_sofort, zieldatum_sofort, wirksamkeit, sof_id )
values ( :BESCHREIBUNG_SOFORT, :BEARBEITER_SOFORT, :ZIELDATUM_SOFORT, :WIRKSAMKEIT, :P40_SOFORT_ID)
returning rowid into :ROWID;
when 'U' then -- U for Update
update poc_sofortmassnahme
set BESCHREIBUNG_SOFORT = :BESCHREIBUNG_SOFORT,
BEARBEITER_SOFORT = :BEARBEITER_SOFORT,
ZIELDATUM_SOFORT = :ZIELDATUM_SOFORT,
WIRKSAMKEIT = :WIRKSAMKEIT
where rowid = :ROWID;
when 'D' then -- D for Delete
delete POC_SOFORTMASSNAHME
where rowid = :ROWID;
end case;
end;
Sincerly,
EE