HELP - FRM-40102: Record must be entered or deleted first

Why am i getting this here is a copy of my code

FRM-40102: Record must be entered or deleted first.

declare
  Cursor A1 is select question from SSAP_QUESTS where cat_id = :SSAP_DETS.CAT_ID and spec_id = :SSAP_DETS.spec_id   and action = :SSAP_DETS.det_action;
                  A1_tmp A1%rowtype;
        begin
                  
                  Go_block('SSAP_ANSWERS');

              for A1_tmp in A1 loop
                  
                        Create_Record;

                        :SSAP_ANSWERS.APS_ID := :PARAMETER.P_APS_ID;
                        :SSAP_ANSWERS.QUESTION := A1_tmp.Question;
                        :SSAP_ANSWERS.det := :ssap_dets.det;
                        select quest_seq.nextval into :SSAP_ANSWERS.quest_id from dual;                   
                  end loop;
              first_record;
              
        end;
MaritimerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

alexfrlCommented:
for A1_tmp in A1 loop
               
                    Create_Record;

                    :SSAP_ANSWERS.APS_ID := :PARAMETER.P_APS_ID;
                    :SSAP_ANSWERS.QUESTION := A1_tmp.Question;
                    :SSAP_ANSWERS.det := :ssap_dets.det;
                    select quest_seq.nextval into :SSAP_ANSWERS.quest_id from dual;      
VALIDATE(RECORD_SCOPE);        
               end loop;
            first_record;
0
peterside7Commented:
The problem comes because of the clear_record.
This block probably has values in it already (default values) or values in pre-block or something
generated in the go_block command.


Try this

Solution Description:  A call to the 'CREATE_RECORD' built-in should be made after navigating to the  block based on the database table which will contain the record. For example,  here is a sample code for the WHEN-BUTTON-PRESSED trigger:  

BEGIN      

GO_BLOCK('blockname');    
/** If there are records present in the block, the new record to be inserted after the last record **/    
LAST_RECORD;    
IF :SYSTEM.RECORD_STATUS != 'NEW'    
THEN             
    DO_KEY('CREATE_RECORD');    
END IF;  
END;
0
MaritimerAuthor Commented:
Still the same thing

declare
        Cursor A1 is select question from SSAP_QUESTS where cat_id = :SSAP_DETS.CAT_ID and spec_id = :SSAP_DETS.spec_id and action = :SSAP_DETS.det_action;
                  A1_tmp A1%rowtype;
        begin
                  
                  Go_block('SSAP_ANSWERS');

              for A1_tmp in A1 loop
                        message('1');message('1');
                        Create_Record;
                        
                        :SSAP_ANSWERS.APS_ID := :PARAMETER.P_APS_ID;
                        :SSAP_ANSWERS.QUESTION := A1_tmp.Question;
                        :SSAP_ANSWERS.det := :ssap_dets.det;
                        select quest_seq.nextval into :SSAP_ANSWERS.quest_id from dual; --GET_BLOCK_PROPERTY('SSAP_ANSWERS', CURRENT_RECORD);
                         VALIDATE(RECORD_SCOPE);
                                 
                  end loop;
              first_record;
              
        end;
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

peterside7Commented:
Or just try to do a   CLEAR_RECORD;   before the   CREATE_RECORD;
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
alexfrlCommented:
Go_block('SSAP_ANSWERS');

Are you sure that your start block doesn't have some required and EMPTY fields?
0
MaritimerAuthor Commented:
Sorry I took so long I was DOWNSIZED shortly afyter this just cleaning up some of my Questions.

Thanks
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.