05-25-2012 5:12 PM
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.
05-25-2012 5:24 PM
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'.
05-25-2012 7:54 PM
It's probably working correctly (IE the same as standard SAP programs).
I'd leave it as is.
Rob
05-26-2012 1:37 AM
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?
05-27-2012 10:17 AM
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
05-28-2012 2:15 PM
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
06-05-2012 11:52 PM
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
06-06-2012 2:21 PM
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
06-06-2012 4:03 PM
I'm not so familiar with it too 😉
I just did a few tests:
Sandra