cancel
Showing results for 
Search instead for 
Did you mean: 

CMIS ABAP Connector repository - implement CMIS Query method in ABAP

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

vinod_kannur88
Explorer
0 Kudos

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.


Former Member
0 Kudos

Hi Vinod.

Thanks for the input.

Brgds, Søren.

Answers (0)