Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with Table control Cursor Position

Former Member
0 Kudos

Hi All,

  I am working with table control. I have save, delete all records button and a table control on my screen . If my TC is having 3 records and if i press delete all button, it will delete all 3 records ( TC will be empty ) & if user is trying to save the Empty record then I am displaying an RED ERROR message.

But, After RED ERROR message, total is screen is changing to display mode. Instead of this after displaying the message, cursor should be at first line of TC.

I have written ERROR message on PAI of SAVE Action. I am trying to write this in PAI -  TC looping - Chain & end chain. but after deleting the records it was not going to TC loop - Chain & Endchain.

Please help.

Thanks,

Vishnu 

3 REPLIES 3

Former Member
0 Kudos

Hi Vishnu,

Change the type of the message into success message but display as error message.

And if the message is triggerred, then in the PBO u can set the cursor on ur required field.

Regards,

Santanu Mohapatra.

0 Kudos

Hi

Thanks For your reply.

But Changes it as success message & display as error ?

my TC will not contain any lines IN PBO , how to set the cursor position on field of TC?

Please explain.

Thanks,

Vishnu

Former Member
0 Kudos

Hi Vishnu ,

Here is the code snippet for your help ....

Please implement it as per your requirement.

In PBO event write like this ........

Setting cursor position with error msg.

IF v_sr_desc_flag = 'X'.
     SET CURSOR FIELD 'ZSRTRACKER-SR_DESC'.
     MESSAGE i631 DISPLAY LIKE 'E'.
     EXIT.
   ENDIF.

   IF v_sr_work_grp_flag = 'X'.
     SET CURSOR FIELD 'ZSRTRACKER-WORK_GRP'.
     MESSAGE i632 DISPLAY LIKE 'E'.
     EXIT.
   ENDIF.

   IF v_sr_proj_mng_flag = 'X'.
     SET CURSOR FIELD 'ZSRTRACKER-PROJECT_MGR'.
     MESSAGE i662 DISPLAY LIKE 'E'.
     EXIT.
   ENDIF.

AND In PAI event .....

Set the flag for error msg. and to set the cursor position .....
IF zsrtracker-sr_desc      IS INITIAL.
     v_sr_desc_flag = 'X'.
     EXIT.
   ENDIF.


   IF zsrtracker-work_grp     IS INITIAL .
     v_sr_work_grp_flag = 'X'.
     EXIT.
   ENDIF.


    IF zsrtracker-project_mgr IS INITIAL.       
     v_sr_proj_mng_flag = 'X'.
    
EXIT.
    ENDIF.

Hope this will help .....

Regards,

AKS