Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Run time error SAPSQL_INVALID_FIELDNAME

Former Member
0 Likes
450

Hi,

I am getting an runtime error when trying to display a document from transaction CV03N, QS23 etc.

The error details are mentioned as below:

Runtime Errors SAPSQL_INVALID_FIELDNAME

Except. CX_SY_DYNAMIC_OSQL_SEMANTICS

What happened?

Error in the ABAP Application Program

The current ABAP program "CL_ALINK_CONNECTION===========CP" had to be

terminated because it has

come across a statement that unfortunately cannot be executed.

Error analysis

An exception occurred that is explained in detail below.

The exception, which is assigned to class 'CX_SY_DYNAMIC_OSQL_SEMANTICS', was

not caught in

procedure "FIND" "(METHOD)", nor was it propagated by a RAISING clause.

Since the caller of the procedure could not have anticipated that the

exception would occur, the current program is terminated.

The reason for the exception is:

An Open SQL clause was specified dynamically. The contained field name

"MANDT" does not exist in any of the database tables from the FROM clause.

Source Code Extract

Line SourceCde

186 append_condition( exporting name = 'RESERVE' value = l_documentclass changing conditio

187 append_condition( exporting name = 'DEL_DATE' value = del_date changing conditio

188

189 * build up condition for select - from until

190 if not ( from_ar_date is initial ) or

191 not ( until_ar_date eq sy-datum ).

192 append_between_condition(

193 exporting

194 name = 'AR_DATE' from = from_ar_date until = until_ar_date

195 changing

196 condition = l_condition

197 ).

198 endif.

199

200 * get list of connection tables

201 l_toaco_tab[] = connection_tables[].

202

203 * add dummy entry for adk access

204 l_toaco-connection = space.

205 append l_toaco to l_toaco_tab.

206

207 * for each connection table

208 loop at l_toaco_tab into l_toaco.

209

210 if l_toaco is initial.

211 call function 'ARCHIVELNK_READ_ALL_OBJECTS'

211 call function 'ARCHIVELNK_READ_ALL_OBJECTS'

212 tables

213 connections = l_archived_connections.

214 else.

215 * start database selection

>>> open cursor with hold l_cursor for

217 select * from (l_toaco-connection)

218 client specified

219 where (l_condition)

220 and mandt in l_ra_mandt

221 and sap_object in l_ra_sap_object

222 and object_id in l_ra_object_id

223 and archiv_id in l_ra_archiv_id

224 and arc_doc_id in l_ra_arc_doc_id

225 and ar_object in l_ra_ar_object

226 and ar_date in l_ra_ar_date

227 and del_date in l_ra_del_date

228 and reserve in l_ra_reserve

229 %_hints DB2 '&SUBSTITUTE VALUES&'.

230 endif.

231 do.

232 * check if termination is requested

233 if l_terminate = 'X'.

234 exit.

235 endif.

Thanks and regards

Nikhilesh Ray

1 REPLY 1
Read only

Former Member
0 Likes
373

I got the SAME problem recently even after activate the 'SD_SWU_ACTIVE' parameter in user account.

There is another way to solve this?, many thanks!