Application Development and Automation 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: 
Read only

Table Control wizard sy-ucomm is not cleared while scrolling.

VenkatRamesh_V
Active Contributor
0 Likes
3,956

Dear Experts,

In  Table control Wizard, user perform's  some action like 'Create'  Push button, then user scrolls the tab in table control wizard  the sy-ucomm remains  same (previous action 'Create' ), so the data's  created  many times because of scrolling.

When user click      (create So) push button (1) then scrolls  the tab(pic  2nd position ) .  sy-ucomm remains in  create so pushbutton(sy-ucomm).

Tried by , after performing the (create so) pushbutton cleared the sy-ucomm but it remains same in while scrolling. Front end contents are scrolled but the order are created many times.

Kindly need guidance.

Regards,

Venkat.

Dear Experts,

In  Table control Wizard, user perform's  some action like 'Create'  Push button, then user scrolls the tab in table control wizard  the sy-ucomm remains  same (previous action 'Create' ), so the data's  created  many times because of scrolling.

When user click      (create So) push button (1) then scrolls  the tab(pic  2nd position ) .  sy-ucomm remains in  create so pushbutton(sy-ucomm).

Tried by , after performing the (create so) pushbutton cleared the sy-ucomm but it remains same in while scrolling. Front end contents are scrolled but the order are created many times.

Kindly need guidance.

Regards,

Venkat.

7 REPLIES 7
Read only

RaymondGiuseppi
Active Contributor
0 Likes
3,018

So you should now understand why we should not use sy-ucomm, but some ok_code field that we are allowed to clear once handled.

Regards,

Raymond

Read only

0 Likes
3,018

Thank you  replying Raymond.

Tried but not  clearing.

Kindly see the steps  i used .

In User command.

MODULE USER_COMMAND_0100 INPUT.

CASE OK_CODE.

WHEN 'EXE'.                " After selecting  pushbutton.

CLEAR OK_CODE.

ENDCASE.

ENDMODULE.      


After clicking scrolling  ok_code is filled with 'EXE'.


Regards,

Venkat.


Read only

0 Likes
3,018

Is OK_CODE defined in program global area (top include) is the table control defined in a subscreen, etc.

Regards,

Raymond

Read only

0 Likes
3,018

Ok_code is declared globally and i never used  subscreen.

Regards,

Venkat.

Read only

renato_parise
Participant
0 Likes
3,018

Hi,

Usually, I move sy-ucomm to other variable and clean sy-ucomm. Ok_code for example.

Read only

bhuvneshkumar_gupta
Participant
0 Likes
3,018

Hi Venkat,

Write code like this -

Data: Ok_code like sy-ucomm,

          ok_code_save like ok_code.

MODULE USER_COMMAND_0100 INPUT.


clear ok_code_save.

move ok_code to ok_code_save.

clear ok_code.

CASE OK_CODE_SAVE.

WHEN 'EXE'.                " After selecting  pushbutton.

....<Your Code>......

ENDCASE.

ENDMODULE.  

Hope it will help you.

Regards,

Read only

mejias10
Explorer
0 Likes
3,018

I think you must clear sy-ucomm before the end of PAI module.

When you create a table wizard,

it generates a module for controlling the user command.

In this module, the first step is  gv_ucomm = sy-ucomm.

When you scroll in the table,

in this module your gv_ucomm takes the valor of your last sy-ucomm.