on 06-09-2008 2:51 AM
Hi experts I have the following code from an abap programa
I have done a conection with Sql
And I want to do a SELECT.. WHERE one value from a column in the table is the same that the ones I write like an input parameter... but when is done the comparation
appears the 207 error from Sql I don't know how to fix it
Please help me ¡¡
REPORT Z_CONEXBD_ARACELI2.
DATA: c_copi TYPE FLIGHTS-COPILOT.
DATA: c_pilot TYPE FLIGHTS-PILOT.
DATA: c_id TYPE FLIGHTS-ID.
DATA: con_name LIKE dbcon-con_name VALUE 'CON'.
*Here is the declaration of the parameter
PARAMETERS: P_PILOT LIKE FLIGHTS-PILOT.
EXEC SQL.
SET CONNECTION :con_name
ENDEXEC.
IF sy-subrc <> 0.
Connection not yet opened.
EXEC SQL.
CONNECT TO :con_name
ENDEXEC.
endif.
Do something on connection 'con_name'
EXEC SQL.
select PILOT, COPILOT, ID
into :c_pilot, :c_copi, :c_id
from FLIGHTS
*Here is the where clause comparing with the parameter P_PILOT
Where PILOT = P_PILOT
ENDEXEC.
*Commit the changes on 'con_name'
EXEC SQL.
COMMIT
ENDEXEC.
EXEC SQL.
SET CONNECTION :con_name
ENDEXEC.
EXEC SQL.
DISCONNECT :con_name
ENDEXEC.
WRITE: /5 'CATALOGO DE VUELOS'.
WRITE: /5 :c_copi, :c_pilot, :c_id.
Thank you very much
Edited by: ARACELI GONZALEZ on Jun 9, 2008 3:51 AM
Hi , I think this is a post for abap programmers.
Antonio.
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 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.