2015 Nov 25 5:56 AM
Hi All,
In the Tcode VF11 i would like to display an error message with some validations when user press enter after entered the value .
I have tried in some userexits and the log i got is from the standard errors. I think my custom error message interrupting the standard process.
Can you please tell me , if i need to display the error message , do i need to display by the LOG option and not directly in the screen?.
Please share your ideas!
Thanks,
Pradeep.
2015 Nov 25 7:29 AM
Hi Pradeep,
It is better to display the error message in log, instead of triggering Error message from the user exit of Invoice creation.
We had earlier implemented the validation for VF01 in the user exit, but it had impacted the billing due list job. The job stopped without processing the other documents, when the error message was raised.
So we moved our logic to the VOFM requirement routine.For your scenario, you can try using the requirement routine which can be configured in VOFA.
In the tcode VOFA, the cancellation document type would be maintained for the source document (Check invoice type : FD, cancellation invoice type is S1). There you have a requirement routine which can be configured.
You need to create a custom VOFM routine and write your validation logic.
In the coding, you could set
IF condition IS TRUE.
perform vbfs_hinzufuegen using '000000' '112' VAR1 VAR2 VAR3.
sy-subrc = 4.
exit.
ENDIF.
PS: Search SCN to more about VOFM routines.
Thanks,
Karthikeyan
Hi Pradeep,
It is better to display the error message in log, instead of triggering Error message from the user exit of Invoice creation.
We had earlier implemented the validation for VF01 in the user exit, but it had impacted the billing due list job. The job stopped without processing the other documents, when the error message was raised.
So we moved our logic to the VOFM requirement routine.For your scenario, you can try using the requirement routine which can be configured in VOFA.
In the tcode VOFA, the cancellation document type would be maintained for the source document (Check invoice type : FD, cancellation invoice type is S1). There you have a requirement routine which can be configured.
You need to create a custom VOFM routine and write your validation logic.
In the coding, you could set
IF condition IS TRUE.
perform vbfs_hinzufuegen using '000000' '112' VAR1 VAR2 VAR3.
sy-subrc = 4.
exit.
ENDIF.
PS: Search SCN to more about VOFM routines.
Thanks,
Karthikeyan
2015 Nov 25 7:29 AM
Hi Pradeep,
It is better to display the error message in log, instead of triggering Error message from the user exit of Invoice creation.
We had earlier implemented the validation for VF01 in the user exit, but it had impacted the billing due list job. The job stopped without processing the other documents, when the error message was raised.
So we moved our logic to the VOFM requirement routine.For your scenario, you can try using the requirement routine which can be configured in VOFA.
In the tcode VOFA, the cancellation document type would be maintained for the source document (Check invoice type : FD, cancellation invoice type is S1). There you have a requirement routine which can be configured.
You need to create a custom VOFM routine and write your validation logic.
In the coding, you could set
IF condition IS TRUE.
perform vbfs_hinzufuegen using '000000' '112' VAR1 VAR2 VAR3.
sy-subrc = 4.
exit.
ENDIF.
PS: Search SCN to more about VOFM routines.
Thanks,
Karthikeyan
2015 Nov 25 9:11 AM
Hi Karthikeyan,
Thanks for your reply . Yes , i can do it in VOFM. But i think its better to do it in the userexits.
RV60AFZZ.
So if i populate my custom error message in perform vbfs_hinzufuegen using '000000' '112' VAR1 VAR2 VAR3. This will update in the LOG options right ?
2015 Nov 25 9:38 AM
And another issue is i am getting the following error log 73763739XX 000000 Document does not exist.
2015 Nov 25 9:39 AM
Hi Pradeep,
I think NO. Requirement routine is the ideal place to populate the error in VBFS internal table. If you populate the entry in RV60AFZZ userexits, it will have no impact.
You can think of an alternate approach to raise the error message from user exits.
Thanks,
Karthikeyan
2015 Nov 25 10:33 AM
Hi Karthikeyan,
Thanks. With the perform vbfs_hinzufuegen using '000000' '112' VAR1 VAR2 VAR3 i can able to
populate the custom message in log. But one problem i am missing the std message ' No billing documents were generated. See log' . which stops the transaction process.
I Need this message as well , so that i can stop the process when the log has my custom message,
regards,
Pradeep.
2015 Nov 25 11:10 AM
Have you set the value sy-subrc = 4 in the requirement routine.
You can get that message if you set the vbfs values in requirement routine and sy-subrc = 4. Only then billing document will be stopped from creation.
2015 Nov 25 11:23 AM
yes, in the include i have set sy-subrc = 4. after my custom message population. But i couln't get the VF 032 standard message in screen.
2015 Nov 26 9:22 AM
2015 Nov 26 9:51 AM
After the code, Has the cancellation invoice creation being stopped now? If you need VF 032, along with the custom error message, you can include that as well.
Thanks,
Karthikeyan
2015 Nov 27 9:19 AM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |