Need to add OR condition in cmis query

I am trying to retrieve some documents using the cmis query based on a condition where I need to specify the collection Id.To be more clear I have a folder outer within with which I have three subfolders first , second and third , I have a search condition where I need to query all the three subfolders here and bring me the results , but as soon as I start giving the collection ID of the outer most folder It searches only for that folder and does not recursively search the subfolders , So in my query I am trying to add the collection ids of the subfolder in OR condition but i get the error that OR is not a valid operand , AND , ORDER is expected .
Can any one help me to find if we can write queries with OR condition in UCM?

Hi ,
Thanks for the reply. I am pasting the query below along with the error mesg.
SELECT * FROM ora:t:IDC:GlobalProfile WHERE ora:p:xCollectionID = '888438448042000024' OR ora:p:xCollectionID = '888438448042000025' OR ora:p:xCollectionID = '888438448042000026' OR ora:p:xCollectionID = '888438448042000027' OR ora:p:xCollectionID = '888438448042000028' OR ora:p:xCollectionID = '888438448042000029' OR ora:p:xCollectionID = '888438448042000217'
Caused by: oracle.webcenter.doclib.internal.model.presenter.conf.PresenterConfigurationException: oracle.webcenter.content.integration.cmis.query.ParseException: Encountered " "OR" "OR "" at line 1, column 134.
Was expecting one of:
<EOF>
"AND" ...
"ORDER" ...
     at oracle.webcenter.doclib.internal.model.presenter.conf.QueryStringDatasource.toSearch(QueryStringDatasource.java:124)
     at oracle.webcenter.doclib.internal.model.presenter.conf.PresenterDatasource.validate(PresenterDatasource.java:321)
     ... 90 more
Caused by: oracle.webcenter.content.integration.cmis.query.ParseException: Encountered " "OR" "OR "" at line 1, column 134.
Was expecting one of:
<EOF>
"AND" ...
"ORDER" ...
     at oracle.webcenter.content.integration.cmis.query.CmisQueryParser.generateParseException(CmisQueryParser.java:1288)
     at oracle.webcenter.content.integration.cmis.query.CmisQueryParser.jj_consume_token(CmisQueryParser.java:1170)
     at oracle.webcenter.content.integration.cmis.query.CmisQueryParser.cmisQuery(CmisQueryParser.java:80)
     at oracle.webcenter.content.integration.cmis.query.CmisQueryParser.parseQuery(CmisQueryParser.java:34)
     at oracle.webcenter.content.integration.cmis.query.CmisSearch.getInstance(CmisSearch.java:61)
     at oracle.webcenter.doclib.internal.model.presenter.conf.QueryStringDatasource.toSearch(QueryStringDatasource.java:116)
     ... 91 more
<AbstractPresenterBean> <getConfiguration()> Jan 14, 2013 7:53:18 PM oracle.webcenter.doclib.internal.model.presenter.conf.PresenterConfigurationException asError
ALL: Query expression must be a valid, non-empty expression.
oracle.webcenter.doclib.internal.model.presenter.conf.PresenterConfigurationException: Jan 14, 2013 7:53:18 PM oracle.webcenter.doclib.internal.model.presenter.conf.PresenterConfigurationException asError
ALL: Query expression must be a valid, non-empty expression.
I also tried using the 'in clause' like xcollectionId in (<collectionId>,<collectionId>) but still had issues.

Similar Messages

  • How to add join conditions in ABAP Query.

    Hi,
    I need a help on "ABAP Query".
    How to add join conditions in ABAP Query.
    Thanks in advance.
    Thanks & Regards,
    Ramana

    Hi,
    See below code,
    *& Report  ZRNP_ALV_SO
    REPORT  zrnp_alv_so MESSAGE-ID z7rnp .
    INCLUDE zrnp_include .
    *SELECTION SCREEN                                                      *
    SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE text-004 .
    SELECT-OPTIONS: s_vbeln FOR vbak-vbeln ,
                    s_auart FOR v_auart ,
                    s_vkorg FOR v_vkorg ,
                    s_spart FOR v_spart ,
                    s_kunnr FOR v_kunnr ,
                    s_matnr FOR v_matnr .
    SELECTION-SCREEN END OF BLOCK blk1 .
    *AT SELECTION SCREEN                                                   *
    AT SELECTION-SCREEN.
      SELECT SINGLE vbeln
                     FROM vbak INTO vbak-vbeln
                     WHERE vbeln IN s_vbeln.
      IF sy-subrc <> 0.
        MESSAGE e202.
      ENDIF.
    *START OF SELECTION                                                    *
    START-OF-SELECTION .
      PERFORM data_select.
      PERFORM t_sort USING i_sort .
      PERFORM event_cat USING i_event .
      PERFORM fld_cat USING i_fldcat[] .
      PERFORM t_layout USING i_layout .
      PERFORM fld_cat2 USING i_fldcat2[] .
      PERFORM call_alv.
    * DATA SELECT                                                          *
    *&      Form  DATA_SELECT
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM data_select .
      REFRESH: it_vbfa, it_so1, it_del_ful ,it_del1 .
      BREAK-POINT.
      *SELECT*
            *a~vbeln*
            *a~auart*
            *a~vkorg*
            *a~spart*
            *a~kunnr*
            *b~posnr*
            *b~matnr*
            *c~maktx*
            *b~kwmeng*
            *b~vrkme*
            *INTO TABLE it_so1 FROM vbak AS a*
                  *INNER JOIN vbap AS b ON b~vbeln = a~vbeln*
                  *INNER JOIN makt AS c ON c~matnr = b~matnr*
                  *AND c~spras = sy-langu*
                  *WHERE a~vbeln IN s_vbeln .*
      IF sy-subrc = 0.
        SORT it_so1 BY vbeln.
        DELETE ADJACENT DUPLICATES FROM it_so1.
      ENDIF.
    * COLURING DISPLAY                                                     *
      DATA: ld_color(1) TYPE  c .
    *  LOOP AT it_so1 INTO wa_so.
    * Populate color variable with colour properties
    * Char 1 = C (This is a color property)
    * Char 2 = 3 (Color codes: 1 - 7)
    * Char 3 = Intensified on/off ( 1 or 0 )
    * Char 4 = Inverse display on/off ( 1 or 0 )
    *           i.e. wa_ekko-line_color = 'C410'
    *    ld_color = ld_color + 1.
    * Only 7 colours so need to reset color value
    *    IF ld_color = 8.
    *      ld_color = 1.
    *    ENDIF.
    *    CONCATENATE 'C' ld_color '10' INTO wa_so-line_color.
    **  wa_ekko-line_color = 'C410'.
    *    MODIFY it_so1 FROM wa_so.
    *  ENDLOOP .
    *  IF sy-subrc = 0.
      IF NOT it_so1[] IS INITIAL.
        SELECT vbelv
               posnv
               vbeln
               posnn
               vbtyp_n
               INTO TABLE it_vbfa
               FROM vbfa
               FOR ALL ENTRIES IN it_so1
               WHERE vbelv = it_so1-vbeln
               AND   posnn = it_so1-posnr
               AND vbtyp_n ='J' .
        IF sy-subrc = 0.
          SELECT vbeln
                 posnr
                 matnr
                 werks
                 lgort
                 charg
                 lfimg
                 vrkme
                 FROM lips INTO TABLE it_del_ful
                 FOR ALL ENTRIES IN it_vbfa
                 WHERE vbeln = it_vbfa-vbeln
                 AND   posnr = it_vbfa-posnn.
        ENDIF.
      ENDIF.
    ENDFORM.                    " DATA_SELECT
    **************** EVENT CATALOG ****************************************
    *&      Form  EVENT_CAT
    *       text
    *      -->P_I_EVENT  text
    FORM event_cat  USING    p_i_event TYPE slis_t_event .
      REFRESH p_i_event .
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
    * EXPORTING
    *   I_LIST_TYPE           = 0
       IMPORTING
          et_events             = p_i_event
    * EXCEPTIONS
    *   LIST_TYPE_WRONG       = 1
    *   OTHERS                = 2
    *  IF sy-subrc <> 0.
    ** MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    **         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    *  ENDIF.
      READ TABLE p_i_event WITH KEY name = slis_ev_top_of_page INTO t_event.
      IF sy-subrc = 0.
        MOVE 'TOP_OF_PAGE' TO t_event-form.
        MODIFY p_i_event FROM t_event INDEX sy-tabix TRANSPORTING form.
      ENDIF.
      CLEAR t_event .
    ENDFORM.                    " EVENT_CAT
    **********FORM FOR EVENT TOP_OF_PAGE**********************************
    FORM top_of_page .
      REFRESH i_listheader.
      DATA: t_header TYPE slis_listheader.
      DATA: v_text(50).
      WRITE sy-datum TO v_text.
      CLEAR t_header.
      t_header-typ = 'S'.
      t_header-key = "Date".
      t_header-info = v_text.
      APPEND t_header TO i_listheader.
      CLEAR t_header.
      CLEAR v_text.
      WRITE:  'SALES ORDER & DELIVERY DETAILS REPORT  ' TO v_text .
      t_header-typ = 'S'.
      t_header-key = 'TITLE'.
      t_header-info = v_text.
      APPEND t_header TO i_listheader.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary = i_listheader.
    *      I_LOGO             = 'ALV_BACKGROUND'.
    *   I_END_OF_LIST_GRID       =
    ENDFORM.                    "TOP_OF_PAGE
    ********  FIRST ALV GRID DISPLAY ***************************************
    FORM call_alv .
    * FORM TO MAKE THE CELL CONTENTS INVISIBLE.
    * PERFORM INVISIBLE_CELL_CONTENTS. *
    *EXCLUDE-DECLARATION.
      CLEAR wa_exclude.
      wa_exclude-fcode = '&VEXCEL'.
      APPEND wa_exclude TO i_exclude.
    *&      Form  CALL_ALV
    *       text
    *  -->  p1        text
    *  <--  p2        text
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
         i_callback_program                = sy-repid
    *    I_CALLBACK_PF_STATUS_SET          = 'SET_PF_STATUS'
         i_callback_user_command           = 'USER_COMMAND1'
         i_callback_top_of_page            = 'TOP_OF_PAGE'
         i_background_id                   = 'ALV_BACKGROUND'
         is_layout                         = i_layout
         it_fieldcat                       = i_fldcat[]
         it_excluding                      = i_exclude
         it_sort                           = i_sort
         it_events                         = i_event
        TABLES
         t_outtab                          = it_so1
    *  IF sy-subrc <> 0.
    ** MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    **         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    *  ENDIF.
    ENDFORM.                    " CALL_ALV
    ************** FIRST FIELDCATALOG *************************************
    *&      Form  FLD_CAT
    *       text
    *      -->P_I_FLDCAT[]  text
    FORM fld_cat  USING    p_i_fldcat TYPE slis_t_fieldcat_alv.
      CLEAR i_fldcat.
      i_fldcat-fieldname   = 'VBELN'. "FIELD FOR WHICH CATALOG ID FILLED
      i_fldcat-tabname     = 'IT_SO1'."TABLE NAME
      i_fldcat-seltext_m   = 'SALES ORDER NO.'.
      i_fldcat-col_pos     = 1.        " POSITION OF THE COLUMN.
      i_fldcat-outputlen   = 20.       " SET THE OUTPUT LENGTH.
      i_fldcat-emphasize   = 'X'.      " COLOR OF THIS COLUMN.
      i_fldcat-key         = 'X'.      " SO THAT THIS FIELD IS NOT
      "SCROLLABLE AND HIDDABLE.
      i_fldcat-hotspot     = 'X'.
      i_fldcat-just(1)     = 'C'.
      APPEND i_fldcat.
      CLEAR i_fldcat.
      i_fldcat-fieldname   = 'AUART'. "FIELD FOR WHICH CATALOG ID FILLED
      i_fldcat-tabname     = 'IT_SO1'."TABLE NAME
      i_fldcat-seltext_m   = 'SALES DOC. TYPE'.
      i_fldcat-col_pos     = 2.        " POSITION OF THE COLUMN.
      i_fldcat-outputlen   = 15.       " SET THE OUTPUT LENGTH.
      i_fldcat-emphasize   = 'X'.      " COLOR OF THIS COLUMN.
      i_fldcat-key         = 'X'.      " SO THAT THIS FIELD IS NOT
      "SCROLLABLE AND HIDDABLE.
      i_fldcat-just(1)     = 'C'.
      APPEND i_fldcat.
      CLEAR i_fldcat.
      i_fldcat-fieldname   = 'VKORG'. "FIELD FOR WHICH CATALOG ID FILLED
      i_fldcat-tabname     = 'IT_SO1'.
      i_fldcat-seltext_m   = 'SALES ORG.'.
      i_fldcat-col_pos     = 3.        " POSITION OF THE COLUMN.
      i_fldcat-outputlen   = 12.       " SET THE OUTPUT LENGTH.
      i_fldcat-emphasize   = 'X'.      " COLOR OF THIS COLUMN.
      i_fldcat-key         = 'X'.      " SO THAT THIS FIELD IS NOT
      "SCROLLABLE AND HIDDABLE.
      i_fldcat-just(1)     = 'C'.
      APPEND i_fldcat.
      CLEAR i_fldcat.
      i_fldcat-fieldname   = 'SPART'. "FIELD FOR WHICH CATALOG ID FILLED
      i_fldcat-tabname     = 'IT_SO1'.
      i_fldcat-seltext_m   = 'DIVISION'.
      i_fldcat-col_pos     = 4.        " POSITION OF THE COLUMN.
      i_fldcat-outputlen   = 10.       " SET THE OUTPUT LENGTH.
      i_fldcat-emphasize   = 'X'.      " COLOR OF THIS COLUMN.
      i_fldcat-key         = 'X'.      " SO THAT THIS FIELD IS NOT
      "SCROLLABLE AND HIDDABLE.
      i_fldcat-just(1)     = 'C'.
      APPEND i_fldcat.
      CLEAR i_fldcat.
      i_fldcat-fieldname   = 'KUNNR'. "FIELD FOR WHICH CATALOG ID FILLED
      i_fldcat-tabname     = 'IT_SO1'.
      i_fldcat-seltext_m   = 'SOLD TO PARTY'.
      i_fldcat-col_pos     = 5.        " POSITION OF THE COLUMN.
      i_fldcat-outputlen   = 15.       " SET THE OUTPUT LENGTH.
      i_fldcat-emphasize   = 'X'.      " COLOR OF THIS COLUMN.
      i_fldcat-key         = 'X'.      " SO THAT THIS FIELD IS NOT
      "SCROLLABLE AND HIDDABLE.
      i_fldcat-just(1)     = 'C'.
      APPEND i_fldcat.
      CLEAR i_fldcat.
      i_fldcat-fieldname   = 'POSNR'. "FIELD FOR WHICH CATALOG ID FILLED
      i_fldcat-tabname     = 'IT_SO1'.
      i_fldcat-seltext_m   = 'SALES DOC. ITEM'.
      i_fldcat-col_pos     = 6.        " POSITION OF THE COLUMN.
      i_fldcat-outputlen   = 17.       " SET THE OUTPUT LENGTH.
      i_fldcat-emphasize   = 'X'.      " COLOR OF THIS COLUMN.
      i_fldcat-key         = 'X'.      " SO THAT THIS FIELD IS NOT
      "SCROLLABLE AND HIDDABLE.
      i_fldcat-just(1)     = 'C'.
      APPEND i_fldcat.
      CLEAR i_fldcat.
      i_fldcat-fieldname   = 'MATNR'. "FIELD FOR WHICH CATALOG ID FILLED
      i_fldcat-tabname     = 'IT_SO1'.
      i_fldcat-seltext_m   = 'MATERIAL NO.'.
      i_fldcat-col_pos     = 7.        " POSITION OF THE COLUMN.
      i_fldcat-outputlen   = 20.       " SET THE OUTPUT LENGTH.
      i_fldcat-emphasize   = 'X'.      " COLOR OF THIS COLUMN.
      i_fldcat-key         = 'X'.      " SO THAT THIS FIELD IS NOT
      "SCROLLABLE AND HIDDABLE.
      i_fldcat-just(1)     = 'C'.
      APPEND i_fldcat.
      CLEAR i_fldcat.
      i_fldcat-fieldname   = 'MAKTX'. "FIELD FOR WHICH CATALOG ID FILLED
      i_fldcat-tabname     = 'IT_SO1'.
      i_fldcat-seltext_m   = 'DESCRIPTION'.
      i_fldcat-col_pos     = 8.        " POSITION OF THE COLUMN.
      i_fldcat-outputlen   = 20.       " SET THE OUTPUT LENGTH.
      i_fldcat-emphasize   = 'X'.      " COLOR OF THIS COLUMN.
      i_fldcat-key         = 'X'.      " SO THAT THIS FIELD IS NOT
      "SCROLLABLE AND HIDDABLE.
      i_fldcat-just(1)     = 'C'.
      APPEND i_fldcat.
      CLEAR i_fldcat.
      i_fldcat-fieldname   = 'KWMENG'. "FIELD FOR WHICH CATALOG ID FILLED
      i_fldcat-tabname     = 'IT_SO1'.
      i_fldcat-seltext_m   = 'QUANTITY'.
      i_fldcat-col_pos     = 9.        " POSITION OF THE COLUMN.
      i_fldcat-outputlen   = 15.       " SET THE OUTPUT LENGTH.
      i_fldcat-emphasize   = 'X'.      " COLOR OF THIS COLUMN.
      i_fldcat-key         = 'X'.      " SO THAT THIS FIELD IS NOT
      "SCROLLABLE AND HIDDABLE.
      i_fldcat-do_sum    = 'X'.        " For doing "SUM"
      i_fldcat-just(1)     = 'C'.
      APPEND i_fldcat.
      CLEAR i_fldcat.
      i_fldcat-fieldname   = 'VRKME'. "FIELD FOR WHICH CATALOG ID FILLED
      i_fldcat-tabname     = 'IT_SO1'.
      i_fldcat-seltext_m   = 'SALES UNIT'.
      i_fldcat-col_pos     = 10.       " POSITION OF THE COLUMN.
      i_fldcat-outputlen   = 10.       " SET THE OUTPUT LENGTH.
      i_fldcat-emphasize   = 'X'.      " COLOR OF THIS COLUMN.
      i_fldcat-key         = 'X'.      " SO THAT THIS FIELD IS NOT
      "SCROLLABLE AND HIDDABLE.
      i_fldcat-just(1)     = 'C'.
      APPEND i_fldcat.
    ENDFORM.                    " FLD_CAT
    ****************** ALV SORTING  ***************************************
    *&      Form  SORT
    *       text
    *      -->P_I_SORT  text
    FORM t_sort  USING    p_i_sort TYPE slis_t_sortinfo_alv .
      DATA: i_sort TYPE slis_sortinfo_alv .
      REFRESH p_i_sort .
      CLEAR i_sort.
      i_sort-spos = 1.
      i_sort-tabname = 'IT_SO1'.
      i_sort-fieldname = 'VBELN'.
      i_sort-up = 'X'.
      i_sort-subtot = 'X'.
      i_sort-group = '*'.
      APPEND i_sort TO p_i_sort.
    ENDFORM.                    " SORT
    *FORM SET_PF_STATUS USING rt_extab TYPE slis_t_extab.
    *  SET PF-STATUS 'ZSTANDARD'.
    *ENDFORM. "Set_pf_status
    ***********FORM FOR EVENT USER_COMMAND1********************************
    FORM user_command1 USING r_ucomm LIKE sy-ucomm
                             rs_selfield TYPE slis_selfield.
    *CASE R_UCOMM .
    *    WHEN '&IC1' .
    *    IF rs_selfield-FIELDNAME = 'VBELN' .
    *    ENDIF .
    * WHEN OTHERS .
    * ENDCASE .
      CLEAR wa_so.
      REFRESH: it_del1 .
      IF r_ucomm = '&IC1' AND rs_selfield-fieldname = 'VBELN' AND
      rs_selfield-value IS NOT INITIAL.
        READ TABLE it_so1 INTO wa_so INDEX rs_selfield-tabindex.
        IF sy-subrc = 0.
          LOOP AT it_vbfa INTO wa_vbfa WHERE vbelv = wa_so-vbeln
                                       AND   posnv = wa_so-posnr.
            READ TABLE it_del_ful INTO wa_it_del_ful
                 WITH KEY vbeln = wa_vbfa-vbelv
                          posnr = wa_vbfa-posnn.
            IF sy-subrc = 0.
              CLEAR wa_del.
              MOVE wa_it_del_ful TO wa_del.
              APPEND wa_del TO it_del1.
            ENDIF.
          ENDLOOP.
        ENDIF.
      ENDIF.
    ********* SECOND ALV GRID DISPLAY ***********************************
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
        i_callback_program                = sy-repid
    *   I_CALLBACK_PF_STATUS_SET          = 'SET_PF_STATUS'
        i_callback_user_command           = 'USER_COMMAND2'
        i_callback_top_of_page            = 'TOP_OF_PAGE'
        i_background_id                   = 'ALV_BACKGROUND'
        it_fieldcat                       = i_fldcat2[]
        it_sort                           = i_sort
        TABLES
        t_outtab                          = it_del_ful
    *  IF sy-subrc <> 0.
    ** MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    **         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    *  ENDIF.
    ENDFORM .                    "USER_COMMAND1
    ********** FORM FOR EVENT USER_COMMAND 2 ******************************
    FORM user_command2 USING r_ucomm LIKE sy-ucomm
                             rs_selfield TYPE slis_selfield.
      CLEAR wa_so.
      REFRESH: it_del1 .
      IF r_ucomm = '&IC1' AND rs_selfield-fieldname = 'VBELN' AND
      rs_selfield-value IS NOT INITIAL.
        READ TABLE it_so1 INTO wa_so INDEX rs_selfield-tabindex.
    *    IF SY-SUBRC = 0.
    *       LOOP AT it_vbfa INTO wa_vbfa WHERE vbelv = WA_SO-vbeln
    *                                    AND   posnv = WA_SO-posnr.
        READ TABLE it_del_ful INTO wa_it_del_ful
             WITH KEY vbeln = rs_selfield-value
                     " vbeln = wa_vbfa-vbeln
                      posnr = wa_vbfa-posnn.
        IF rs_selfield-fieldname = 'VBELN'.
          SET PARAMETER ID 'VL' FIELD wa_vbfa-vbeln .
          CALL TRANSACTION 'VL03' AND SKIP FIRST SCREEN.
        ENDIF .
    *       ENDLOOP.
    *    ENDIF.
      ENDIF.
    ENDFORM .                    "USER_COMMAND2
    ********* SECOND FIELDCATALOG ******************************************
    *&      Form  FLD_CAT2
    *       text
    *      -->P_I_FLDCAT2[]  text
    FORM fld_cat2  USING    p_i_fldcat2 TYPE slis_t_fieldcat_alv .
      CLEAR i_fldcat2.
      i_fldcat2-fieldname   = 'VBELN'. "FIELD FOR WHICH CATALOG ID FILLED
      i_fldcat2-tabname     = 'IT_DEL_FUL'."TABLE NAME
      i_fldcat2-seltext_m   = 'DELIVERY NO.'.
      i_fldcat2-col_pos     = 1.        " POSITION OF THE COLUMN.
      i_fldcat2-outputlen   = 20.       " SET THE OUTPUT LENGTH.
      i_fldcat2-emphasize   = 'X'.      " COLOR OF THIS COLUMN.
      i_fldcat2-key         = 'X'.      " SO THAT THIS FIELD IS NOT
      "SCROLLABLE AND HIDDABLE.
      i_fldcat2-hotspot     = 'X'.
      i_fldcat2-just(1)     = 'C'.
      APPEND i_fldcat2.
      CLEAR i_fldcat2.
      i_fldcat2-fieldname   = 'POSNR'. "FIELD FOR WHICH CATALOG ID FILLED
      i_fldcat2-seltext_m   = 'DELIVERY ITEM'.
      i_fldcat2-col_pos     = 2.        " POSITION OF THE COLUMN.
      i_fldcat2-outputlen   = 20.       " SET THE OUTPUT LENGTH.
      i_fldcat2-emphasize   = 'X'.      " COLOR OF THIS COLUMN.
      i_fldcat2-key         = 'X'.      " SO THAT THIS FIELD IS NOT
      "SCROLLABLE AND HIDDABLE.
      i_fldcat2-just(1)     = 'C'.
      APPEND i_fldcat2.
      CLEAR i_fldcat2.
      i_fldcat2-fieldname   = 'MATNR'. "FIELD FOR WHICH CATALOG ID FILLED
      i_fldcat2-seltext_m   = 'MATERIAL NO.'.
      i_fldcat2-col_pos     = 3.        " POSITION OF THE COLUMN.
      i_fldcat2-outputlen   = 20.       " SET THE OUTPUT LENGTH.
      i_fldcat2-emphasize   = 'X'.      " COLOR OF THIS COLUMN.
      i_fldcat2-key         = 'X'.      " SO THAT THIS FIELD IS NOT
      "SCROLLABLE AND HIDDABLE.
      i_fldcat2-just(1)     = 'C'.
      APPEND i_fldcat2.
      CLEAR i_fldcat2.
      i_fldcat2-fieldname   = 'WERKS'. "FIELD FOR WHICH CATALOG ID FILLED
      i_fldcat2-seltext_m   = 'PLANT.'.
      i_fldcat2-col_pos     = 4.        " POSITION OF THE COLUMN.
      i_fldcat2-outputlen   = 20.       " SET THE OUTPUT LENGTH.
      i_fldcat2-emphasize   = 'X'.      " COLOR OF THIS COLUMN.
      i_fldcat2-key         = 'X'.      " SO THAT THIS FIELD IS NOT
      "SCROLLABLE AND HIDDABLE.
      i_fldcat2-just(1)     = 'C'.
      APPEND i_fldcat2.
      CLEAR i_fldcat2.
      i_fldcat2-fieldname   = 'LGORT'. "FIELD FOR WHICH CATALOG ID FILLED
      i_fldcat2-seltext_m   = 'ST. LOCATION'.
      i_fldcat2-col_pos     = 5.        " POSITION OF THE COLUMN.
      i_fldcat2-outputlen   = 20.       " SET THE OUTPUT LENGTH.
      i_fldcat2-emphasize   = 'X'.      " COLOR OF THIS COLUMN.
      i_fldcat2-key         = 'X'.      " SO THAT THIS FIELD IS NOT
      "SCROLLABLE AND HIDDABLE.
      i_fldcat2-just(1)     = 'C'.
      APPEND i_fldcat2.
      CLEAR i_fldcat2.
      i_fldcat2-fieldname   = 'CHARG'. "FIELD FOR WHICH CATALOG ID FILLED
      i_fldcat2-seltext_m   = 'BATCH NO.'.
      i_fldcat2-col_pos     = 6.        " POSITION OF THE COLUMN.
      i_fldcat2-outputlen   = 20.       " SET THE OUTPUT LENGTH.
      i_fldcat2-emphasize   = 'X'.      " COLOR OF THIS COLUMN.
      i_fldcat2-key         = 'X'.      " SO THAT THIS FIELD IS NOT
      "SCROLLABLE AND HIDDABLE.
      i_fldcat2-just(1)     = 'C'.
      APPEND i_fldcat2.
      CLEAR i_fldcat2.
      i_fldcat2-fieldname   = 'LFIMG'. "FIELD FOR WHICH CATALOG ID FILLED
      i_fldcat2-seltext_m   = 'ACT. DEL. QTY.'.
      i_fldcat2-col_pos     = 7.        " POSITION OF THE COLUMN.
      i_fldcat2-outputlen   = 20.       " SET THE OUTPUT LENGTH.
      i_fldcat2-emphasize   = 'X'.      " COLOR OF THIS COLUMN.
      i_fldcat2-key         = 'X'.      " SO THAT THIS FIELD IS NOT
      "SCROLLABLE AND HIDDABLE.
      i_fldcat2-just(1)     = 'C'.
      APPEND i_fldcat2.
      CLEAR i_fldcat2.
      i_fldcat2-fieldname   = 'VRKME'. "FIELD FOR WHICH CATALOG ID FILLED
      i_fldcat2-seltext_m   = 'SALES UNIT.'.
      i_fldcat2-col_pos     = 8.        " POSITION OF THE COLUMN.
      i_fldcat2-outputlen   = 20.       " SET THE OUTPUT LENGTH.
      i_fldcat2-emphasize   = 'X'.      " COLOR OF THIS COLUMN.
      i_fldcat2-key         = 'X'.      " SO THAT THIS FIELD IS NOT
      "SCROLLABLE AND HIDDABLE.
      i_fldcat2-just(1)     = 'C'.
      APPEND i_fldcat2.
    ENDFORM.                                                    " FLD_CAT2
    ***************** ALV LAYOUT *******************************************
    *&      Form  LAYOUT
    *       text
    *      -->P_I_LAYOUT  text
    FORM t_layout  USING    p_i_layout TYPE slis_layout_alv .
      p_i_layout-zebra  = 'X'.
      p_i_layout-totals_text = 'GRAND TOTAL ='.
    *  p_i_layout-CONFIRMATION_PROMPT = 'X'.
    *  p_i_layout-DEF_STATUS  = ' '.
      p_i_layout-info_fieldname = 'LINE_COLOR'.
    ENDFORM.                    " LAYOUT

  • Need to add new condition type using   BAPI_SALESORDER_CHANGE

    Hi all,
    I am using BAPI_SALESORDER_CHANGE to add new condition type for an order item.
    I am able to add it, but problem here is, that i want that condition type to be manually changable. Here, in BAPI, after execution, condition type field becomes disable.
    My code is as follows:
                    MOVE 'B' TO wa_logic-pricing.
                      MOVE 'X' TO wa_logic-cond_handl.
                      wa_cond-itm_number = wa_vbap-posnr.
    *                  wa_cond-cond_st_no = it_konv1-stunr.
    *                  wa_cond-cond_count = it_konv1-zaehk.
                      wa_cond-cond_type =  it_discount-kschl.
                      wa_cond-CONDORIGIN = 'C'.
                      APPEND wa_cond TO i_cond.
                      CLEAR: wa_cond.
                      wa_condx-itm_number = wa_vbap-posnr.
    *                  wa_condx-cond_st_no = it_konv1-stunr.
    *                  wa_condx-cond_count = it_konv1-zaehk.
                      wa_condx-cond_type =  it_discount-kschl.
                      wa_condx-updateflag = 'I'.
                      wa_condx-COND_VALUE = 'X'.
                      APPEND wa_condx TO i_condx.
                      CLEAR: wa_condx.
    FORM f_update_order .
      CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
        EXPORTING
          salesdocument    = salesdocument
          order_header_in  = wa_headerdata
          order_header_inx = wa_headerdatax
          logic_switch     = wa_logic
        TABLES
          return           = it_return
          order_item_in    = i_itemdata
          order_item_inx   = i_itemdatax
          conditions_in    = i_cond
          conditions_inx   = i_condx.
      IF NOT it_return[] IS INITIAL.
        PERFORM f_commit_or_rollback.
      ENDIF.
    ENDFORM.
    Please let me know, if it could be achievable.
    Best regards,
    Meena
    Moderator Message: Corrected the code tags. You need to use flower brackets.
    Edited by: kishan P on Aug 25, 2010 6:04 PM

    Hi,
    This is the demo code i am writing:
    Even Change manual entry field in BAPI did not helped me.
    [code]REPORT  ZTESTM1.
    data: l_knumv type knumv.
    DATA: it_return        TYPE STANDARD TABLE OF bapiret2,         "Internal table for t_txt_ret
           wa_return        type  bapiret2.
    data: begin of it_konv occurs 0.
           include structure konv.
           data: end of it_konv.
    data: logic_switch type standard table of    BAPISDLS,
          wa_logic type BAPISDLS.
    data:itemdata type STANDARD TABLE OF BAPISDITM,
          wa_item type   BAPISDITM.
    data : salesorder type BAPIVBELN-VBELN.
    data:itemdatax type STANDARD TABLE OF BAPISDITMx,
          wa_itemx type   BAPISDITMx.
    data: wa_header type BAPISDH1,
          wa_headerx type BAPISDH1X.
    data: i_cond type STANDARD TABLE OF BAPICOND,
          wa_cond type BAPICOND.
    data: i_condx type STANDARD TABLE OF BAPICONDX,
          wa_condx type BAPICONDX.
    move '0060008601' to salesorder.
    move '000010'  TO wa_item-itm_number.
    append wa_item to itemdata.
    move ' '  to wa_header-BILL_BLOCK.
    move   'U'  to wa_headerx-UPDATEFLAG.
    move  'X' to wa_headerx-BILL_BLOCK.
    MOVE: 'U'  to wa_itemx-UPDATEFLAG,
         '000010'  TO wa_itemx-itm_number.
         append wa_itemx to itemdatax.
    move 'B' to wa_logic-PRICING.
    move 'X' to wa_logic-COND_HANDL.
    select single knumv from vbak into l_knumv where vbeln = '0060008601'  .
    select * from konv into table it_konv where knumv = l_knumv  and kposn = '000010'.
          wa_cond-ITM_NUMBER = it_konv-kposn.
          wa_cond-cond_type = 'Z550'.
          wa_cond-CONDCHAMAN = 'X'.
           append wa_cond to i_cond.
           clear: wa_cond.
    wa_condx-ITM_NUMBER = it_konv-kposn.
    wa_condx-COND_TYPE = 'Z550'.
    wa_condx-UPDATEFLAG = 'L'.
    append wa_condx to i_condx.
    clear: wa_condx.
    CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
      EXPORTING
        salesdocument               = salesorder
       ORDER_HEADER_IN             = wa_header
        order_header_inx            = wa_headerx
       LOGIC_SWITCH                = wa_logic
      tables
        return                      = it_return
       ORDER_ITEM_IN               = itemdata
       ORDER_ITEM_INX              = itemdatax
       CONDITIONS_IN               =   i_cond
       CONDITIONS_INX              =   i_condx
      EXTENSIONIN                 =
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.[code]
    Thank you.
    Meena

  • Need to Add a Table in Existing Query(SQVI)

    Hello All,
    I have a query zqry (in T-Code SQVI) using 2 tables mkpf & mseg, with some List Fields(Result) & some selection Fields(Select options).
    I need to add a new table makt into this existing query.
    Help is highly appriciated.
    Regards
    Arun.

    Hi Arun,
    look here:<a href="http://help.sap.com/saphelp_47x200/helpdata/en/b7/26dde8b1f311d295f40000e82de14a/frameset.htm">QuickViewer</a>
    and note: ...
    "Whenever you define a QuickView, you can specify its data source explicitly. Tables, database views, table joins, logical databases, and even InfoSets, can all serve as data sources for a QuickView. <b>You can only use additional tables and additional fields if you use an InfoSet</b> as a data source."...
    regards Andreas

  • In Top 10 with two dimension i need to add others in my MDX query

    Hi this is code working fine and return top 2  product in a  state. i need to add other sales also how can we do
    with set FIPS as [Geography].[State-Province].[State-Province]
    set TCat as
    Generate( {FIPS}, CrossJoin( {[Geography].[State-Province].CurrentMember},
    TOPCount(
             ([Product].[Subcategory].[Subcategory]),
             2,
             [Measures].[Sales Amount]
    SELECT { [Measures].[Sales Amount] } ON COLUMNS,
    TCat  ON ROWS
    FROM [Adventure Works]
    hi fond one code it is work for one dimension only, i need for two dimension
    WITH
    SET [TCat] AS
    TopCount([Product].[Subcategory].[Subcategory],10,[Measures].[Sales Amount])
    MEMBER [Product].[Subcategory].[Other] AS
    Aggregate([Product].[Subcategory].[Subcategory] - TCat)
    SELECT { [Measures].[Sales Amount] } ON COLUMNS,
    TCat + [Other] ON ROWS
    FROM [Adventure Works]

    Hi,
    We will have to generate a set of tuples that includes both dimensions:
    WITH
    SET [Top2] AS
    Generate
    {[Customer].[State-Province].[State-Province].MEMBERS}
    [Customer].[State-Province].CurrentMember
    ,TopCount
    (EXISTING
    [Product].[Subcategory].[Subcategory].MEMBERS)
    ,2
    ,[Measures].[Internet Sales Amount]
    MEMBER [Product].[Subcategory].[All].[top2Aggr] AS
    Aggregate((EXISTING [Top2]))
    MEMBER [Product].[Subcategory].[All].[all Subcat] AS
    [Product].[Subcategory].[All]
    MEMBER [Product].[Subcategory].[All].[others] AS
    Aggregate
    (EXISTING
    [Customer].[State-Province].CurrentMember
    ,[Product].[Subcategory].[Subcategory].MEMBERS
    [Top2])
    SELECT
    {[Measures].[Internet Sales Amount]} ON COLUMNS
    [Customer].[State-Province].[State-Province].MEMBERS
    [Product].[Subcategory].[top2Aggr]
    ,[Product].[Subcategory].[others]
    ,[Product].[Subcategory].[all Subcat]
    } ON ROWS
    FROM [Adventure Works];
    If you plan to tweek this solution, you may want to align the dimensionality of the [all Subcat] member with the others members by changing its definition:
    MEMBER [Product].[Subcategory].[All].[all Subcat] AS
    aggregate(EXISTING
    [Customer].[State-Province].CurrentMember
    ,[Product].[Subcategory].[All]
    The former defintion also works in our case because it's a singleton set and it is put in a tuple when crossjoined with the axis 1 giving it the right dimensionality.
    Philip,

  • Need to add new column in SAP Query - Please guide me in this regard

    Dear All,
    In SAP Query, I need to put a new coulmn of each record for the difference of Billing date and PGI date as a work days.
    eg: Billing Date = 02.05.2008
         PGI Date = 08.05.2008
    Take a Variable i.e. Days = Billing Date - PGI Date that will display as 5 days by excluding Saturday and Sunday.
    After doing calculation of these work days for each record, we need a to add a new coulmn in that record as field lable as "Work Days" and display.
    Please Guide me in this regard
    Regards,
    Sateesh.

    Hi Rama,
    In SQ01 when you are in the fields (first would be attributes, when you click next it takes you to field groups, and again when you click next if takes you to fields tab) check the following menu path
    EDIT -> LOCAL FIELD -> CREATE
    You can define the formula as per your requirement and populate the field.
    Hope this is helpful.
    Thanks,
    Pavan

  • Need to add Header condition

    HI All,
    Good Morning!!
    I have one requirement ,wherein  my client is asking to  put $50 at header level inspite of how many items are there in order.
    This Fine should not be distributed among items of the order.
    For ex:-
    Item 1- 100
    Item 2- 200
    Total Value- 300 +50(Fine)
    Total value Header = 350
    Please do the needful.
    Thanks,
    Vaibhav

    Hi,
    Go to SPRO
    In condition type setup, tick 'header condit'.
    In your SO, the condition type should be appeared on header only.
    Hope my solution can help you.
    Thanks.

  • How to insert 2 conditions in a Query

    Hi ,
    How can i apply 2 conditions to a query
    First i need to apply a condition X to query and then i need to apply condition Y to the  results which are based on condition X
    How can i acheve this

    Hi
    We can create multiple condition in one query
    When ever u select condition on tab it shows two options Chenge condition and new condition
    If we have 2 comndition in one query it works with AND function .
    If we have all applicable condition in one condition then it works with OR functionality.
    Assign points

  • No columns in Easy Report to Add/Modify Condition

    I have created an Easy Report, selecting columns for the report. When I try to modify the report Conditions by selecting RPT, Query definition tab and clicking on the Column drop down, no columns appear.
    How can I add a Condition to an Easy Report?
    Thank you

    This happens in APEX Rel 2.0 as well. HTML DB 2 Day Developer Tutorial's "Chapter 3 - How to Create a Drill Down Report Structured SQL Query" displays no columns either.
    The fix is as in "Thread: upgrade to 1.6.1.00.02 breaks add/modify conditions" - convert "SQL Query (Structured SQL Query)" to "SQL Query"

  • Add Column name conditionally in a query

    Hi i have an stored procedure where one parameter is passing
    @Type
    UserTable (columns) => username, canAdminDelete,canCustomerDelete,CanMerchantDelete
    i wants to add column conditionally like when usertype =1 then query should be like
    Select * from userTable where canAdminDelete=0
    when userType=2
    Select * from userTable where canCustomerDelete=0
    Like in this way. I know i can write three if statments and write specific query.
    But this is just an example i have very big query actually.
    Please give some idea.
    Thanks
    Niki

    Hi Niki,
    As per my understanding, I think the query post by Olaf is correct. It only return the results when column canAdminDelete = 0 and userTpe = 1 or column canCustomerDelete = 0 and userType = 2.
    So when userType=1 and column canAdminDelete=1, how could you get the results? Could you please test the issue again based on the query post by Olaf.
    If there are any misunderstanding, please elaborate the issue for further investigation.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • I need to add a single field from with_item table . need to write select query with reference to company code , account doc no , fiscal year

    I need to add a single field from with_item table . need to write select query with reference to company code , account doc no , fiscal year

    Hi Arun ,
    Can you explain little bit more ??
    what is account doc no? 
    what are the transactions should be displayed in your output??
    -Rajesh N

  • Need to add 2 columns in query

    Hello, I have a query that I need to add 2 of the columns together, but I have been unsuccessful in my attempts to this point. I'm using Oracle SQL Developer 1.2.1
    Here is the query:
    WITH group_by_4_column_results AS
    (SELECT m_atschunk.employee AS employee,
    SUM(CASE
    WHEN
    M_ATSCHUNK.rolloffDaysCount = '108545043' AND m_atschunk.infractiondate BETWEEN SYSDATE - 365 AND SYSDATE THEN 1 ELSE 0 END) as rolloffs,
    M_ATSCHUNK.INFRACTIONDATE + 365 as infractionDate,
    M_ATSCHUNK.calculationDate as CalcDate
    FROM M_ATSCHUNK
    group by employee, infractionDate, rolloffDaysCount, calculationDate
    SELECT g4.*,
    SUM (rolloffs) OVER (PARTITION BY employee) AS total_rolloffs
    FROM group_by_4_column_results g4
    ORDER BY total_rolloffs desc
    And it will output this:
    ||Employee||     ||Rolloffs||     ||InfractionDate||     ||CalcDate||     ||Total_Rolloffs||
    ||86707||     ||1||     ||3/8/2011||     ||(null)||     ||134||
    ||86707||     ||1||     ||3/9/2011||     ||(null)||     ||134||
    ||86707||     ||1||     ||3/10/2011||     ||(null)||     ||134||
    ||86707||     ||1||     ||3/11/2011||     ||(null)||     ||134||
    ||86707||     ||1||     ||3/12/2011||     ||(null)||     ||134||
    ||86707||     ||1||     ||3/13/2011||     ||(null)||     ||134||
    I know need it to add the InfractionDate + Total_RollOffs columns and output intot he CalcDate column
    The table was not created conventially using SQL, it was creating using a using a metabean file:
    customerForm = /com/merced/datamart/repository/forms/CustomerForm,\
    employee           = /com/merced/datamart/repository/Person,\
    filledOutBy      = /com/merced/datamart/repository/Person,\
    infractionDate      = /com/merced/metabeans/Date,\
    infractionCode      = /com/merced/apps/ATS/forms/enumerations/infractionCodeType,\
    WLB          = /com/merced/apps/ATS/forms/enumerations/WLBType,\
    rolloffDaysCount     = /com/merced/apps/ATS/forms/enumerations/atsyesNoType,\
    shiftInterval          = /com/merced/apps/ATS/forms/enumerations/shiftIntervalType,\
    premiumDays          = /com/merced/apps/ATS/forms/enumerations/atsyesNoType,\
    PABonusPoints          = /com/merced/apps/ATS/forms/enumerations/atsyesNoType,\
    comments      = /com/merced/metabeans/String,\
    appliedWLC     = /com/merced/apps/ATS/forms/enumerations/appliedWLCType,\
    calculationDate = /com/merced/metabeans/Date,\
    calculationInteger = /com/merced/metabeans/Integer

    If you want to use 0COUNTRY as a navgational atttr. first go to info object 0BPARTNER and make 0COUNTRY as a navigational attr. save activate.
    The go to cube or DSO and check Navigational attr box infront of this info object,
    And then it will be available as a navigational attr in your query.
    Hope this helps,
    Assgn points if helpful.
    Regards

  • Need to add condition to a template and can not make it work.

    I am trying to add a condition to a template and can not make it work. Mainly because I am new at this. I have a field that needs to have a condition set. The field is LTD. The maximum value is $233.00. If the amount is less the 233, that value is used. If it is over 233 then 233 is used. So, if LTD is greater then 233.00 then 233.00 else LTD.
    Can anyone help me write this for a Word BI Publisher Template. I need this report now but can't go to class until later this year.
    Thanks,
    Rick

    Replace LTD with the correct element name.
    <?choose:?>
    <?when: LTD > 233 ?>233<?end when?>
    <?otherwise:?><?LTD?><?end otherwise?>
    <?end choose?>

  • AssetApi Query to add Site condition

    Hi,
    How to add site condition to the asset api query.
    Thanks,
    Raghav

    Hello,
    Check the list of fields which are indexed using lucene - http://docs.oracle.com/cd/E29542_01/doc.1111/e29634/publicsearch_assetapi.htm#WBCSD2424
    For site, values are saved in this column "siteid", hence, build your search against it like:
    Query q = new QueryExpressionImpl("siteid", Operation.CONTAINS, siteId);
    //where siteId is the publication id or site id. You can get siteId using ics:sql tag (by searching against Publication table - Select id from Publication where name="AVI")
    Note: if you have multiple sites installed and assets are shared with all sites, then your query becomes like:
    q = q.or("siteid", Operation.EQUALS, "0");
    Regards,
    Guddu

  • Need to add navigational attribute in query level

    Hi,
        Im new to bi . in dso i have  a navigational attribute  0CRM_MKTELM _ 0BPARTNER . 0CRM_MKTELM is a master data and  0BPARTNER also a master data that dso is used in infoset , 0country is the attribute of 0bpartner. i need to bring the 0country into my query . how can i do that     
    Regards,
    Senthil

    If you want to use 0COUNTRY as a navgational atttr. first go to info object 0BPARTNER and make 0COUNTRY as a navigational attr. save activate.
    The go to cube or DSO and check Navigational attr box infront of this info object,
    And then it will be available as a navigational attr in your query.
    Hope this helps,
    Assgn points if helpful.
    Regards

Maybe you are looking for

  • Computer thinks it is connected to the internet when it's not

    I posted this in the "Using your PowerBook" category, but I realized it may have to do with internet and networking than anything else. So I thought I'd put it here too. When logging into my account on my PowerBook, I get the spinning colored wheel a

  • I cannot find "Acceptance At Origin" in PO

    I have searched previous post as well , but there is no clear answer about this. Some said you could find this in Line Item Delivery tab, but actually I cannot find it.

  • Failed to goto purchased Content in iTunes & App Store

    I have recently updated my  iPod to "iOS 6.0.1" and when I want to look at my purchased in ether iTunes and App Store it shows that as if it is working while you wait about 20 sec and then shows the home screen. Anyone know how to contact apple about

  • HT4847 how do I find the date that my mac membership needs refreshing?

    The settings 'seem' to have changed or moved or maybe it is my fading memory? I know that I will be sent and email in due course but I wish to find out now. It used to be as simple as clicking on your account and signing in.

  • Problem with floated elements in IE5.5

    I've apparently got a problem with a right sidebar float being dropped in a primitive version of IE and I can't figure out a remedy, as none are suggested in dwcs3's browser compatibility function. The site is lindafarronknapp.com... if anyone has an