I have a main block ( A ) which will prompt to the user based on the selection records from the query search. Records will then displayed in the tabular form and user will like to select further record based on a check box that created for further action. I have created a action button on when_button_pressed to insert the records that checked by the user.
My statement as below :-
INSERT INTO ACT_INV_GRN_LBL_TMP ( SELECT ITEM_CODE, ITEM_DESC, :A.TEXT_ITEM11 FROM ACT_VW_GRN_LBL WHERE :A.TEXT_ITEM11 = 1 AND GRN_NO = :A.GRN_NO );
But the screen seem like doing nothing after execute the button.
The problem is my check box ( text_item11 ) where if I click on the record and enable the check box for two records, the insert record only saved the last record where my cursor stop. The query result show three lines, I checked print for two lines, but it only insert to my temp table the last record.
You are checking the last check box and then pressing the Button ? So i think your loop starts with the last record .
After GO_Block check where the cursor is with MESSAGE(:SYSTEM.CURSOR_RECORD). If it gives you last record, go to first record before you start the loop.
To got to first record you can use FIRST_RECORD built-in.