on 03-08-2010 2:06 AM
For example, I need to check the validation of a field, if OK, then the field will be inputted, otherwise, there will rise a message, how can I implement that?
Thanks and best regards,
Anders
Hi Andres,
U can write a code in Request Processing--DO_VALIDATE_INPUT
DATA: LR_BTADMINH TYPE REF TO CL_CRM_BOL_ENTITY.
LR_BTADMINH ?= ME->TYPED_CONTEXT->BTADMINH->COLLECTION_WRAPPER->GET_CURRENT( ).
LV_ZZAFLD000057 = LR_ENTITY->GET_PROPERTY_AS_STRING( 'ZZAFLD000057' ).
IF LV_ZZAFLD000057 IS INITIAL.
DATA: L7_MSG_SERVICE TYPE REF TO CL_BSP_WD_MESSAGE_SERVICE,
LVSP_MSG_V1 TYPE STRING VALUE 'Spare in Progress'.
L7_MSG_SERVICE = ME->VIEW_MANAGER->GET_MESSAGE_SERVICE( ).
L7_MSG_SERVICE->ADD_MESSAGE(
IV_MSG_TYPE = 'E'
IV_MSG_ID = 'ZBSP'
IV_MSG_NUMBER = '008'
IV_MSG_V1 = LVSP_MSG_V1 ).
ENDIF.Regards,
Lokesh.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Masood,
For a requirement to make the BP Role assignment block on Account creation screen required for a minimum of one BP Role. Can we also use DO_VALIDATE_INPUT here? My understanding is that this method is triggered on SAVE.
What is the best way to develop the Roles assignment block to be a required entry? What details would be neccessary for a developer to deveop this functionality so that if no entry is made in the Assignment block BPRoles/RolesList, then an error is thrown?
Thanks!
Anders,
You should always use BADIs to do field validations, as controlling of error messages from UI is difficult.
If they are not available, use method DO_HANDLE_DATA or DO_VALIDATE_INPUT.
Regards,
Masood Imrani S.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello, I trying to make a input validations I have already implement a Code like the original message but i have Casting Problems, my scenarios is :
The user put some dates, so these dates are in one specific View and i am making my validations in other view inside of the method DO_VALIDATE_INPUT.
I Have made some testing retrieving somes date of other Context of the same views and works well, but as mention the context in which the dates are is in other view.
Do you have any idea how to resolved it ?
Thanks a lot .
Hi There,
In the Get_ method of the attribute, do your validation . if NOT OK, clear the value and raise the message using confirm_popup etc or you can also add your message in global message container. You can find the threads on the forum on how to raise a message.
Thanks & Regards,
Suchita
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.