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