cancel
Showing results for 
Search instead for 
Did you mean: 

Dump SAPSQL_INVALID_FIELDNAME - CX_SY_DYNAMIC_OSQL_SEMANTICS in BW load

Former Member
0 Kudos

I Have the custom extractor ZCRM_COM_TA_R3_ID_ATTR based on the CRM table 'COM_TA_R3_ID' with the field "VALID_FROM" (timestamp so DEC 15). The customer want to use this field in Infopackage selection in BW but it's impossible to use a timestamp in selection so i've added a custom field (ZVALID_FROM_CHAR) - DATS to the extract structure and i've write abap code in cmod.

If i test the selection on CRM using RSA3 it works fine but when i try to launch the Infopackage in BW with the same "ZVALID_FROM_CHAR" selection i have a dump:

SAPSQL_INVALID_FIELDNAME

CX_SY_DYNAMIC_OSQL_SEMANTICS

...

One of the field names in the SELECT clause was not recognized

...

The reason for the exception is:

The SELECT clause was specified in an internal table at runtime.

It contains the field name "ZVALID_FROM_CHAR", but this does not occur in any of the database tables listed in the FROM clause.

I've added the new field only in extract structure and not in table 'COM_TA_R3_ID' .

This is the code:

WHEN 'ZCRM_COM_TA_R3_ID_ATTR'.

TABLES: COM_TA_R3_ID.

data: cm_zvalid_from_char(20) type c,

cm_data(8) TYPE c.

DATA: l_s_id LIKE ZOXPCS0111.

LOOP AT i_t_data INTO l_s_id.

i_tabix = sy-tabix.

clear l_s_id-zvalid_from_char.

SELECT single valid_from FROM COM_TA_R3_ID into cm_zvalid_from_char

WHERE PRODUCT_GUID = l_s_id-PRODUCT_GUID.

IF SY-SUBRC = 0.

replace '.' with ' ' into cm_zvalid_from_char.

replace '.' with ' ' into cm_zvalid_from_char.

condense cm_zvalid_from_char no-gaps.

move cm_zvalid_from_char+4(4) to cm_data(4).

move cm_zvalid_from_char2(2) to cm_data4.

move cm_zvalid_from_char(2) to cm_data+6.

move cm_data to l_s_id-zvalid_from_char.

ENDIF.

modify i_t_data from l_s_id index i_tabix.

endloop.

when others.

endcase.

Could you help me?

Tks

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member182470
Active Contributor
0 Kudos

Hi,

Please replicate your datasource again in BW and create a new infopackage.

Before the above step, please check whether the DS is active in RSA6 in R/3 side.

Regards,

Suman

Former Member
0 Kudos

Hi ,

Try changing the data type of cm_zvalid_from_char from 'c' to any other date data type at this line:  data:

cm_zvalid_from_char(20) type c,

Also , instead of Select single Valid_from , your  can write Select Valid_From .

The code is OK .

Former Member
0 Kudos

We got a similar problem (same DUMP SAPSQL_INVALID_FIELDNAME  CX_SY_DYNAMIC_OSQL_SEMANTICS) in Infopackage of 0COMP_CODE_TEXT.

The problem was solved by OSS Note 1712253:

Regards,

Marco Modesto

Vinicius Lima

Symptom

The extraction by datasource 0COMP_CODE_TEXT terminates with runtime  error SAPSQL_INVALID_FIELDNAME after implementing the note 1380527.

Other terms

SAPSQL_INVALID_FIELDNAME, CX_SY_DYNAMIC_OSQL_SEMANTICS, 0COMP_CODE_TEXT.

Reason and Prerequisites

The note 1380527 enables selection for field 'LANGU' to over come the warning message 'Assign a language field to IOBJ 0LANGU; danger of short dump;' generated by the infopackge of datasource 0COMP_CODE_TEXT. However the field 'LANGU' is not available in the view 'BIW_T001T' from which data is extracted.

Solution

Follow the manual steps given below or import the relevant support package.