Ansicht
Dokumentation

ABAPEXEC_PROCEDURE - EXEC PROCEDURE

ABAPEXEC_PROCEDURE - EXEC PROCEDURE

Addresses (Business Address Services)   Fill RESBD Structure from EBP Component Structure  
This documentation is copyright by SAP AG.
SAP E-Book

- EXECUTE PROCEDURE

EXEC SQL.
  EXECUTE PROCEDURE proc ( IN    p_in1,    IN    p_in2, ...
                           OUT   p_out1,   OUT   p_out2, ...
                           INOUT p_inout1, INOUT p_inout2, ... )
ENDEXEC.

Effect

In database systems, procedures can be defined as stored procedures. Since the syntax for calling this type of procedure and the associated parameter passing can vary widely for various database systems, a uniform statement exists in statically embedded Native SQL.

The statement EXECUTE PROCEDURE calls a procedure proc stored in the database. For all formal parameters of the procedure, actual parameters separated by commas must be specified. IN, OUT, or INOUT must be specified in front of every actual parameter, to indicate whether the parameter is an input, output, or input/output parameter. Literals or host variables indicated by colons (:) can be used for the actual parameters.

Notes

  • EXECUTE PROCEDURE can be used to call procedures with input and output parameters but cannot be used to call functions with return values. In SQL, functions are used directly in suitable operand positions (see Executable Example).

Example

Definition of a procedure abap_docu_demo_incprice using database-specific SQL statements and calling the procedure with the SAP-specific Native SQL statement EXECUTE PROCEDURE. The execution of the program section increases the price of every flight for the current client in the table SFLIGHT by a specific amount. See also the corresponding executable example for ADBC.










ABAP Short Reference   BAL Application Log Documentation  
This documentation is copyright by SAP AG.

Length: 3615 Date: 20240614 Time: 054610     sap01-206 ( 64 ms )