2013 Sep 13 9:11 AM
Dear all,
we wrote a report in which values of a field in selected sales documents are changed.
Problem: Upcoming an error while saving a document, such as duplicated purchase order, the whole program is terminated, leaving
other selected documents unprocessed.
What a user see: the program report an error, with "Enter" the whole report is end.
Errors are trigged in
CALL FUNCTION 'SD_SALES_DOCUMENT_SAVE'
How to go around the termination and continue to process other selected documents?
Thanks a lot!
Best Regards
2013 Sep 20 12:35 PM
In its attributes the FM is not released and it has no content under EXCEPTIONS.
Is it necessary to change the FM to released in order to catch the error?
Thank you very much!
Best regards
Dear all,
we wrote a report in which values of a field in selected sales documents are changed.
Problem: Upcoming an error while saving a document, such as duplicated purchase order, the whole program is terminated, leaving
other selected documents unprocessed.
What a user see: the program report an error, with "Enter" the whole report is end.
Errors are trigged in
CALL FUNCTION 'SD_SALES_DOCUMENT_SAVE'
How to go around the termination and continue to process other selected documents?
Thanks a lot!
Best Regards
2013 Sep 13 9:55 AM
Hello,
Not sure,but may be some problem in NUMBER RANGE !!!
Thanks
Gourav.
2013 Sep 13 10:05 AM
2013 Sep 20 10:03 AM
Used is a SAP Standard FM for update, there are no exceptions raised. Further more,
"commit work and wait." is used in this function module.
Is there a possibility to go around errors and continuing processing?
Thanks very much!
2013 Sep 20 10:12 AM
You can always catch ERROR_MESSAGE in the EXCEPTIONS option of the CALL FUNCTION statement even if the function has no exception in its signature.
Used is a SAP Standard FM for update
Yes, but check its atributes, it is not released (so use at your[company] risk) even if widely used.
(Use of Standard SAP function modules in custom development)
Regards,
Raymond
2013 Sep 20 12:35 PM
In its attributes the FM is not released and it has no content under EXCEPTIONS.
Is it necessary to change the FM to released in order to catch the error?
Thank you very much!
Best regards
2013 Sep 20 12:40 PM
No, you must not change a standard object if no proven and important need. You would thennrequire an acces key. (http://service.sap.com/sscr)
CALL FUNCTION 'SD_SALES_DOCUMENT_SAVE'
EXPORTING
referenced_document_number = ' '
referenced_document_type = ' '
synchron = ' '
i_no_messages = ' '
status_buffer_refresh = 'X'
requisition_buffer_refresh = 'X'
referenced_notification = ' '
referenced_pm_order = ' '
RESULT = ' '
i_vbakkom_ref = i_vbakkom_ref
IMPORTING
evbak = evbak
TABLES
efxvbep = efxvbep
efxvbap = efxvbap
attr_tab = attr_tab
efxvbpa = efxvbpa
EXCEPTIONS
error_message = 1.Regards,
Raymond
2013 Sep 23 10:28 AM
Yes we catched error messages without change of attributes of FMs
via
EXCEPTIONS
error_message = 1.
in CALL FUNCTION instruction
Now all left documents are processed.
Thanks a lot for your help!
Best regards
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |