Skip to Content

CMIS ABAP Connector repository - implement CMIS Query method in ABAP

All.

I need to implement the CMIS Query method in my ABAP Connector repository for SAP Mobile Documents.

Does anybody know if there are any utility classes to help in handling the query string from the client ?

It could be in the form:

SELECT cmis:document.cmis:baseTypeId,cmis:document.cmis:objectTypeId,cmis:document.cmis:secondaryObjectTypeIds,<OtherCmisFields> FROM cmis:document WHERE cmis:objectId IN ('DOCID')

Thanks.

Søren Hansen

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Best Answer
    Apr 13, 2016 at 12:03 PM

    Hi Soren,

    You can call CMIS parser method to parse input statement IV_STATEMENT.

    For example, you call parser cl_cmis_simple_query_parser=>parse to parse the input query.

    DATA ls_simple_parse_result TYPE cl_cmis_simple_query_parser=>parse_result.

    DATA lv_where TYPE cmis_string.

    ls_simple_parse_result = cl_cmis_simple_query_parser=>parse( iv_statement ).

    lv_where = ls_simple_parse_result-where_clause.

    lv_orderby = ls_simple_parse_result-sort_order.





    Then call Regular expression to parse the string lv_where.


    CONSTANTS lc_regex TYPE string VALUE '\bLIKE\s+(.*)$'.

    DATA ls_regex_result TYPE match_result.


    FIND ALL OCCURRENCES OF REGEX lc_regex IN lv_where RESULTS lt_regex_result.


    ....


    From lt_regex_list, you can parse to fetch proper string to be searched.

    You can then call the CDESK_SRV_EXECUTE_SEARCH function module to search that string and prepare the results for CMIS objects.


    Hope this answers your question.


    Best Regards,

    Vinod.


    Add comment
    10|10000 characters needed characters exceeded