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

Error in table maintenance event after save

Former Member
0 Likes
2,264

Hi,

I would like to issue an error in table maintenace event without exiting the screen.

When I am going to save in table maintenace then i am getting error but at the same time it is exiting table maintenace screen. I want to stay on the same screen but only want to give error message. Please can you help me in this ?

Below is the code I have written in event:

    DATA lwa_row TYPE ztemp.

  LOOP AT total.
    clear lwa_row.
    if <vim_total_struc> is ASSIGNED.
      MOVE-CORRESPONDING <vim_total_struc> to lwa_row.
    endif.

    if <action> NE 'D' and <action> is NOT INITIAL and <action> NE 'X'.


      if lwa_row-hkont = ''.
        MESSAGE 'Please enter GL?' TYPE 'E'.

        vim_abort_saving = 'X'.
      ELSEIF lwa_row-ind = ''.
        MESSAGE 'Please enter indicator?' TYPE 'E'.

        vim_abort_saving = 'X'.
      endif.

    endif.
  ENDLOOP.

Many Thanks.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,545

Hi,

What`s event you are using, '01' ?

And change your code to this: 'MESSAGE 'Please enter indicator?' TYPE 'S' DISPLAY LIKE 'E'.'?

regards,

Archer

Hi,

I would like to issue an error in table maintenace event without exiting the screen.

When I am going to save in table maintenace then i am getting error but at the same time it is exiting table maintenace screen. I want to stay on the same screen but only want to give error message. Please can you help me in this ?

Below is the code I have written in event:

    DATA lwa_row TYPE ztemp.

  LOOP AT total.
    clear lwa_row.
    if <vim_total_struc> is ASSIGNED.
      MOVE-CORRESPONDING <vim_total_struc> to lwa_row.
    endif.

    if <action> NE 'D' and <action> is NOT INITIAL and <action> NE 'X'.


      if lwa_row-hkont = ''.
        MESSAGE 'Please enter GL?' TYPE 'E'.

        vim_abort_saving = 'X'.
      ELSEIF lwa_row-ind = ''.
        MESSAGE 'Please enter indicator?' TYPE 'E'.

        vim_abort_saving = 'X'.
      endif.

    endif.
  ENDLOOP.

Many Thanks.

4 REPLIES 4
Read only

Former Member
0 Likes
1,546

Hi,

What`s event you are using, '01' ?

And change your code to this: 'MESSAGE 'Please enter indicator?' TYPE 'S' DISPLAY LIKE 'E'.'?

regards,

Archer

Read only

0 Likes
1,545

Hi,

Yes, I am using event  '01'.

Tried with Type 'S' and Display like 'E'.  It stays on the same page and displaying error but it is allowing entry to save. I don't want entry to save.

Many thanks for your reply.

Read only

0 Likes
1,545

Hi,

You could do your validation in the PAI module of Table maintenance screen.

Read only

Former Member
0 Likes
1,545

Check the below link...might be helpful. You might have to perform same task in PAI.

Regards,

Sai