2007 Jul 04 5:47 PM
Hi all,
By seeing the sample codes in the forum I got to add a routine - Event 01 - in the V_TVIMF that checks if the ZLIFNR field content exists in the LFA1 before saving the record.
Inside LOOP AT TOTAL, I set a error message 'Vendor doesn't exist' to avoid the record is written when ZLIFNR is invalid. The problem is the cursor skips to a new line after that. In addition, the other lines get locked.
After displaying the error message, I would like the cursor pointed to the field where the ZLIFNR is invalid by keeping it enabled in order to allow the user to correct the content.
Any help is welcome.
Regards,
Tiago.
2007 Jul 05 4:21 AM
Use CHAIN -ENDCHAIN.
CHAIN.
FIELD <YOUR FIELD> MODULE <CHECK_FIELD>.
ENDCHAIN.
MODULE <CHECK_FIELD>.
GET CURSORE LINES <CURRENT_LINE_ON_TC>
-
ERROR Message.
ENDLOOP.
IN PBO.
SET THE CURSOR AT <CURRENT_LINE_ON_TC>
Any further clarifications, please revert.
Regards,
A.Singh
2007 Jul 05 4:21 AM
Use CHAIN -ENDCHAIN.
CHAIN.
FIELD <YOUR FIELD> MODULE <CHECK_FIELD>.
ENDCHAIN.
MODULE <CHECK_FIELD>.
GET CURSORE LINES <CURRENT_LINE_ON_TC>
-
ERROR Message.
ENDLOOP.
IN PBO.
SET THE CURSOR AT <CURRENT_LINE_ON_TC>
Any further clarifications, please revert.
Regards,
A.Singh
2007 Jul 05 4:53 AM
Dialog screen field validation
Code to demonstrate screen validation for dialog programs. The following code should be inserted into the PAI module
Validate single field via module call
FIELD sc_field-ebeln
MODULE validate_screen_field "validation code performed in module
ON INPUT.
* Validate multiple fields via module call
CHAIN.
FIELD: sc_field-ebeln, sc_field-ebelp.
MODULE validate_screen_field. "validation code performed in module
ENDCHAIN.
* Validate field via table selection
FIELD sc_field-ebeln
SELECT *
FROM ekko
WHERE ebeln = sc_field-ebeln
INTO ekko
WHENEVER NOT FOUND SEND ERRORMESSAGE 001
WITH ' Document Number
ON INPUT.reward points if it is usefull ...
Girish
2007 Jul 05 5:37 AM
Hi,
Please try to use this statement after the message line:
"Set cursor position" to next line.
If u do not no the syntax take help of its documentation.
Pls reward points.
Regards,
Ameet
2007 Jul 05 3:44 PM
Hi all,
Thanks for your replies.
I'm trying to insert your suggestions in the code now. As soon as possible I'll provide you the points and the feedback about these modifications.
Thank you very much for the help until now.
Tiago.
2007 Jul 06 2:14 PM
Hi all,
I finally got to do what you suggested. Thank you very much.
Regards,
Tiago.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |