03-31-2006 7:14 AM
Hi All1
I had added a custom field onto a SAP standard GUI(subscreen).Now my requirement is to issue a error message when ever the user does not input values through list down box into the custom field with message suggesting him to enter values.Also it is required not to forward the transaction until the user inputs the value.
Please advise in which part of the standard program i have to coding to accomplish this.
Regards
Praneeth
03-31-2006 9:47 AM
Hello Praneeth,
As u have already touched the SAP screen program, simple make the field mandetory in the screen painter.
03-31-2006 7:24 AM
Hello Praneeth,
How have u added the custome field on the screen? This is needed as the flow logic may be available in the exit itself.
Usually the check is done in PAI and if u use chain endchain then on giving error it will block all other fields for inputs and open only the relavant fields.
Please provide the proram name where u have done this change.
03-31-2006 7:59 AM
Hi abhijit!
I had added the field onto the following programs
SAPLV02Z screen no. 0200
SAPMV45A screen no. 4309.
These subscreens are used in various sales transactions and to name a few are va02,xd01,xd02,xd03 etc..
Regards
Praneeth
03-31-2006 9:05 AM
When u say added in screen 200/4309 how have u added using exit or changed the std SAP program? Also what is the field that u have added. If u can set up check table then it will automatically not allow an invalid value.
03-31-2006 9:21 AM
Abhijit,
Actaually i had added the field by changing the standard SAP program .I had added a field called ZZKVGR6 and included it in all relevant tables through append structures.Also modified the userexit MOVE_FIELD_TO_VBAP to move the field to VBAP.
Also created check table to give user input.
Now my query was if the user doesn't select any value into this field then the program should issue an error saying that you should select some value before you proceed i.e. the program should not move ahead until unless the user selects some value into this field through drop down list.
Now i am struck,how to give this functionality to the user and through which include.
Please advise
Regards
PRaneeth
03-31-2006 9:34 AM
Hi Praneeth,
In the screen layout, under "Properties", you can make this particular field as mandatory.
Regards,
Anjali
03-31-2006 9:54 AM
Hi,
Just make the code in PAI of the screen.
if the field is initial.
message e000 with 'Enter a value'.
leave list-processing.
...You have to make it as error message[i.e. message e].Then it won't proceed further.
endif.
03-31-2006 9:15 AM
Hi Praneeth,
Write the validation for the screen field in the PAI of the screen. Please refer to the code sample below for validation.
PROCESS AFTER INPUT.
Add your validation here
FIELD zcrmt_0100_btx_ui02-zzcustomer_h0208
MODULE data_0200_validate ON REQUEST.
MODULE data_0200_validate INPUT.
Validation as required
IF zcrmt_0100_btx_ui02-zzcustomer_h0208
GT zcrmt_0100_btx_ui02-zzcustomer_h0206.
Display the error message
MESSAGE e111(zcrm_appl).
ENDIF.
ENDMODULE. " data_0200_validate INPUT'
Please reward some points if it helps you.
Regards,
Amit M. Mishra
03-31-2006 9:47 AM
Hello Praneeth,
As u have already touched the SAP screen program, simple make the field mandetory in the screen painter.
03-31-2006 10:30 AM
Thanks abhijit.
My problem got resolved.
Maximum points awarded.
I am opening another thread on other issue related to this topic.Please view and advise.
Regards
Praneeth