on 11-11-2008 8:40 AM
Hi All ,
I have to create a BAdi for HCM forms which generate error message .
If i am putting the error message in the INITIALIZE method the error message is not coming on
the screen but if i am putting it in th DO_OPERATION method then
it generating me the error message on the screen .
I want to generate the error message as soon as we have the form in front of us .. i mean
in the initial point before you enter any data for the fields .
I am using message handler to generate the message's.
messagehandler->add_message EXPORTING ( message = message ) .
where message is of type symsg .
Thanks ,
Om
Hi Om,
I'm not sure 100% why, but if you want to set an error message in the Initialize method of the BAdI for HCM Processes and Forms, you can't do it the same way that you can inside the DO_OPERATION.
What I have done for error messages is create a field on the form, bind it to a field definition, then when looping through the SERVICE_FIELD_VALUES, assign the message to the field,
MESSAGE ID 'CLASS NAME' TYPE 'E' NUMBER '089' WITH 'my error message text' INTO l_err_msg.
The other thing I do as well, is if the message text within the Adobe form is not null or blank, i set the main subform presence to hidden. This way when a user loads the form, they will only see the error message and any other information that you want them to see, like the form tile and other static information.
I hope this helps.
Cheers,
Kevin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kevin ,
Ya that's true that can be a solution but i want to have the message on the message area ( in the top
where we usually get when we click the check button ) .
If we take a field and bind the error message to it then i guess the error message will be displayed on the form itself .
Can't we display the error in the error message area with the help of field .
Thanks ,
Om
You can use the "GET_HELP_VALUES" to return an error during initialize and it will show up in that area above the form.
Best regards,
Derrick Banks
Banks & Company, LLC
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Derrick,
Here I am also facing this issue, and your message gave me hope...
This is my first requirement in HCM process and forms..
If it is possible to populate error message during initialize and it will show up in message area above the form, pls explain me in more detail.
Thanks in Advance,
Krishna
Hey Om,
Are you creating ISRs using the PCR method of creation? I'm not too familiar with the method that you are talking about. Is that method called during the initialize phase?
One thing you could try is, like I mentioned before about setting a variable to the form from the initialize stage, is again, setting that variable, checking the form if that variable is set, and if it is, trigger a call to the backend, check to see if there is an error, and throw that error, and it will then appear in the header area above the form.
Cheers,
Kevin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Om,
When I first tried sending an error message to the framework, and it didn't show up, I debugged the application. It was showing that the error was being set the same way that it is done when you do it in the DO_OPERATION, but it never showed up above the form in the framework.
Let me do some digging around and see if I can't get you a definite answers.
Cheers,
Kevin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kevin ,
Check this IF_EX_QISR1~SCENARIO_PROCESS_USER_COMMAND when you are debugging it
here there is a case statement which will take you to different condtion based on the button clicked
check or initialize .
Can i do some coding in my program in the initialize method to pop up error message in the message
area which is there for the check button .
Thanks ,
Om
Hi Om,
I'm not sure 100% why, but if you want to set an error message in the Initialize method of the BAdI for HCM Processes and Forms, you can't do it the same way that you can inside the DO_OPERATION.
What I have done for error messages is create a field on the form, bind it to a field definition, then when looping through the SERVICE_FIELD_VALUES, assign the message to the field,
MESSAGE ID 'CLASS NAME' TYPE 'E' NUMBER '089' WITH 'my error message text' INTO l_err_msg.
I hope this helps.
Cheers,
Kevin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.