2010 Jun 18 6:49 PM
Hi Experts,
I have included a custom field with list box option to an infotype. The new filed displays the values based on the values selected in the standard field which has a list box option.
Now if we enter the transaction in change mode and change the standard field value without pressing ENTER and click SAVE button, it gets saved with an improper value in the custom field. The reason being the custom field values with drop down list is retreived only after we press enter (POV is triggered) after selecting a standard field.
Options tried:
I have included an error message (in PAI) to stop the values being saved, but the screen beomes disabled.
I have done my validation only on the custom field as there is no other possibility to validate any other fields on the screen (all are standard). Here the error message pops up and the field is in the enable mode, but it does not retrieve the possible values for the custom field based on my earlier selection for the standard field.( Because as POV does not get triggered in this case)
Ex. Std field value = USA
Custom field = United States of America
I changed the value in Standard field to = UK and click SAVE - It get saved
Now how to stop it from SAVING and let it know that there is an error in the custom field and it needs to select the right value from the list ie - United Kingdom.
Lakshmi
2010 Jun 18 7:54 PM
Perhaps a solution is to save the code value, not the text for the code, and only display the text. In this way, the database would have UK and when you re-entered the screen, a PBO module could obtain the text for UK for display.
Or, if you must store the text value instead of the code (seems redundant...you can look up the text anytime), an enhancement to the save to database logic to obtain the correct value from the current value of the code and save that to the database....