Skip to Content
0

Cursor Position in Module Pool when on last record while pressing enter it should move on next page?

Apr 11, 2017 at 04:10 AM

148

avatar image

Hi All,

I am doing the module pool program, I have one table control in one screen.

I have 3 editable column and 5 rows in table in table control.

when user while press enter cursor will move to 2nd field and when again user press enter it will move towards third field and after that on next row.this functionality is working fine.But when all the five rows are field and then user press enter it is not moving on next line or next page the cursor came back to first record. if i am able to move the cursor to next page

then the cursor functionality of moving towards 2nd and 3rd field on pressing enter does not work the cursor get stuck on the first field of new page or new line?

Please Provide any Solution.

Thanks

---------------Screen 100------------------
process before output.
module status_0100.

loop at it_smst into wa_smst with control tabfi

                             cursor tabfi-current_line.


endloop.


module screen_dis.

module set_cursor.

process after input.

module md_exit_command at exit-command.

loop at it_smst.

chain.

field : wa_smst-ptx_emp_cde,

        wa_smst-ptx_amt,

        wa_smst-ptx_hrs

module validation.

endchain.

module modify_tabfi.

endloop.

module md_exit_command at exit-command.

module user_command_0100.


----------------module set_cursor---------------

module set_cursor output.

  describe table it_smst lines ln2.

  if ln2 is initial.

    ln2 = 1.

  else.

    read table it_smst into wa_smst index ln2 .

  endif.

  if f eq 'WA_SMST-PTX_EMP_CDE' and  wa_smst-emp_nam  is not initial.

    set cursor field 'WA_SMST-PTX_AMT'  line ln2 .


  elseif f eq 'WA_SMST-PTX_EMP_CDE' and wa_smst-emp_nam is initial.

    set cursor field 'WA_SMST-PTX_AMT' line ln2.

  endif.


  if f eq 'WA_SMST-PTX_AMT' and wa_smst-ptx_amt  is not initial.

    set cursor field 'WA_SMST-PTX_HRS' line ln2.


  elseif f eq 'WA_SMST-PTX_AMT' and wa_smst-ptx_amt is initial.

    set cursor field 'WA_SMST-PTX_AMT' line ln2.

  endif.

  ln2 = ln2 + 1.

  " INCREMENTATION OF LINE IN TABLE CONTROL.

  if f eq 'WA_SMST-PTX_HRS' and wa_smst-ptx_amt is not initial.

    set cursor field 'WA_SMST-PTX_EMP_CDE' line ln2.

  elseif f eq 'WA_SMST-PTX_HRS' and wa_smst-ptx_amt is initial.

    set cursor field 'WA_SMST-PTX_EMP_CDE' line ln2.

  endif.

endmodule.                 " SET_CURSOR  OUTPUT

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers