33

Hello not sure why Im getting this error. Basically I get it in these three lines:

PLS-00363: expression 'p_temp_foo.editable.modified_by' cannot be used as an assignment target
PLS-00363: expression 'p_temp_foo.editable.date' cannot be used as an assignment target
PLS-00363: expression 'p_temp_foo.editable.modified_by' cannot be used as an assignment target

procedure:

 PROCEDURE run_temp_procedure (p_temp_foo IN part_bean, p_member_number IN NUMBER)
 IS
 t_temp_foo part_bean;
  now   DATE;
  BEGIN
  now := SYSDATE;

             p_temp_foo.editable:= t_temp_foo.editable;
        p_temp_foo.editable.date := SYSDATE;
        p_temp_foo.editable.modified_by := p_member_number;


  END run_temp_procedure ;
Doc Holiday
  • 9,928
  • 32
  • 98
  • 151
  • 4
    You need to either assign the values to `t_hot_part` or make `p_hot_part` an `out` parameter. – Ben Apr 02 '12 at 13:20

2 Answers2

56

p_temp_foo is an IN parameter. By nature, these are read only. You could define it as an IN OUT parameter, or an OUT parameter.

For more info see here: http://plsql-tutorial.com/plsql-passing-parameters-procedure-function.htm

Flexo
  • 87,323
  • 22
  • 191
  • 272
N West
  • 6,768
  • 25
  • 40
3

Generate new VARCHAR2 type variable to assign your IN (input) string.

procedure sp_name(
ps_list              IN VARCHAR2,
...
other IN's and OUT's
...
)
as

ps_list_copy          VARCHAR2 (32000); 

begin 
ps_list_copy := ps_list;
...
do your works with ps_list_copy
...
...
Exception when others then
....
end sp_name;
elifekiz
  • 1,456
  • 13
  • 26