cancel
Showing results for 
Search instead for 
Did you mean: 

How to fetch records using method Query

Former Member
0 Kudos

Hi everyone,

I'm using TM 8.1.

My requirement is to fetch data from STOP node for all entries present in ROOT table with some selection screen parameters. I'm passing lt_target_key ( DB_KEY of STOP table) as filter key and lt_selpar as selection parameters.

But i'm getting a dump as shown below for passing filter_key

Level    4     Class    CX_SY_DYNAMIC_OSQL_SEMANTICS

Program  /SCMTMS/CL_Q_SUPERCLASS=======CP Include  /SCMTMS/CL_Q_SUPERCLASS=======CM006 Row   150

Short Te Could not interpret the value 'AND'

Long Tex

An attempt was made to execute an Open SQL statement, in which the dynamic WHERE or SET

condition contains the illegal value 'AND'. For instance, one of the value fields,

addressed by a LIKE operator in the WHERE clause, is not type C.

I also displayed my code herewith.

 

  CALL METHOD lr_srvmgr_tor->query

    EXPORTING

      iv_query_key            = /scmtms/if_tor_c=>sc_query-stop-query_by_attributes

      it_selection_parameters = lt_selpar

      it_filter_key           = lt_target_key

      iv_fill_data            = abap_true

    IMPORTING

      eo_message              = t_message

      et_key                  = lt_target_key2

      et_data                 = l_stop_node.

Please guide me how to fetch data using method query by passing filter key.

Thanks in advance

Sunil

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello Sunil,

basically your approach seems to be corrrect in my opinion, however, when debugging a simular selection in our TM 8.1 maintenance system I found that there seems to be an error in a method evaluating the interface table IT_FILTER_KEY. If not yet done please create a CSS message for it.

Regards

Kristian