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: 

Bypass input checks

former_member533538
Participant
0 Kudos

Hi friends,i have a dialog program,one of subscreen has a table control、one delete row button、one copy row button,the screen flow logic is as below:

PBO

............

PAI

LOOP TABLE CONTROL TABLE.

  CHAIN:

    FIELD1 MODULE FIELD1_CHECK.

    FIELD2 MODULE FIELD2_CHECK.

    FIELDn MODULE FIELDn_CHECK.

    MODULE MODIFY_INT_TABLE.

ENDCHAIN.

ENDLOOP.

MODULE USER_COMMAND.                  "DELETE ROW AND COPY ROW

Now i face a problem:if one of screen field validation fail,i can't delete the error row ,when i click delete button,the screen will show error message to prevent me to delete row,so pls. tell how can i bypass the input check if i click delete button?thanks.

8 REPLIES 8

Former Member
0 Kudos

Use AT EXIT-COMMAND.

MODULE delete_rows AT EXIT-COMMAND.

Handle your code to delete here.

Also give function type of delete button as 'E'.

Former Member
0 Kudos

It's probably working correctly (IE the same as standard SAP programs).

I'd leave it as is.

Rob

0 Kudos

  

Re: Bypass input checks

Thanks,shambu, i think your solution would work, but i think it is not a standard solution.

Thanks,Rob,but it really didn't work,someone could tell me why?

0 Kudos

Hi,

the answer of Shambu VS is absolutely correct, and is fully supported by SAP. Why do you say you think it's not a standard solution?

Sandra

0 Kudos

Hi - Sandra - are you sure this is the the way SAP normally does things?

I think that if you have a table control where you have entered a number of rows and want to delete one, you would want to go through the normal validations.

Rob

0 Kudos

Hi Rob,

(sorry for the delay, I'm not comfortable yet with the new forum's options)

I was just saying what is technically possible, SAP uses it all the time to leave the screen, and sometimes for actions inside the screen (but you are correct that SAP does not do it often). Here, the "delete row" would simply bypass the FIELD ... MODULE ... failed checks, just to allow the deletion.

After the row has been deleted, the user can save the data, and the FIELD ... MODULE ... checks are executed again (as long as we don't use the ON REQUEST addition).

Sandra

0 Kudos

Sandra Rossi wrote:

... I'm not comfortable yet with the new forum's options.


There's a lot of that going around these days 

It's actually something I'm not familiar with. I was thinking that if you have an exit command that deletes a line (bypassing validations), then when the save or enter or whatever button is pressed afterwards, the normal validations would not take place, since nothing had changed since the row was deleted.

But I think you are saying those validations will take place because the previous exit command didn't execute them.

Rob

0 Kudos

I'm not so familiar with it too 😉

I just did a few tests:

  • when we execute an exit command after there was an error, the logic restarts from the point of the error in the PAI, without reaching the PBO. So, in the PAI, I had to skip checks when the "delete" key was pressed, so that the PBO is executed to see the line deleted. Then, pressing the enter key (by the way, remember to clear the okcode field at the end of the PBO), the checks were executed again.
  • about the conditional processing for changed values, I think this may occur only if you use MODULE ... ON (CHAIN-)REQUEST; otherwise the modules are always called (except the case where there is a restart from the module where there was an error)

Sandra