userID написал(а):
Цитата:
или просто написать
EXCEPTIONS OTHERS = 4. ???
в таком варианте все заработало может я в цифирьках не понимаю что они означают? от 1 до 8 это что? возврат кода ошибки sy-subrc для каждого параметра или что?
А что F1 не доступно?
Цитата:
Addition 5
... EXCEPTIONS exc1 = n1 exc2 = n2 ...
Addition 6
... error_message = n_error
Addition 7
... OTHERS = n_others
Effect
Using EXCEPTIONS, return values can be assigned to non-class-based exceptions exc1, exc2, ... Syntax and meaning of the addition are the same as for CALL METHOD - with the exception that a predefined exception error_message can be specified here. If no exception occurs, a function module call sets sy-subrc to 0.
If the error_message addition is specified after EXCEPTIONS, all MESSAGE statements that are executed during the processing of the function module and do not have the RAISING addition are affected as follows:
Messages of the type S, I, or W are not sent but are noted in the log background processing.
Messages of the type E and A trigger the exception error_message and set sy-subrc to n_error. The message class, message type, message number, and the contents of possible placeholders for the MESSAGE statement are in the fields sy-msgid, sy-msgno, sy-msgty, and sy-msgv1, ... , sy-msgv4. With messages of the type A, the ROLLBACK WORK statement is also explicitly executed.
Messages of the type X are not influenced. As always, they cause program termination with a short dump.
If the RAISING statement is specified in a MESSAGE statement within the function module and a return value is assigned to the corresponding exception exc1, exc2, ... sy-subrc is set to this value. If no return value is assigned to the exception after RAISING, the message is influenced, as described above, by the error_message addition.
As of Release 6.10, function modules can pass on class-based exceptions if exception classes are specified in the Function Builder. In this case, the EXCEPTIONS addition must not be specified