How to hide some fields in ABAP Query

Hi,
My ABAP Query has a long list of extracted fields. I wanted to set some of these output to "HIDE".
This allow User the flexibility to decide what fields to show.
How can I set the field to "HIDE" in my query?
Thanks
bye

Hi Tim,
You can do this by setting the Report layout variant in following steps:
1. First define the parameter on selection screent for report variant.
2. Data decelaration for variant.
3. Value request to get already present variants on report:
4. If doesn't choose the layout take out the default report layout.
5. Initialize the report variant.
6. Apply the variant to the REUSE_ALV_GRID_DISPLAY funtion module.
         Here to generate report variant first to open report output and then as per according to user set the layout of report using the layout icon of ALV with summation on value fields (as required) and create layout name.
*Data Deceleration as below:
Data :g_save(1) TYPE c,
**      g_default(1) TYPE c,
g_exit(1) TYPE c,
gx_variant TYPE disvariant,
g_variant TYPE disvariant.
*First Define the parameter to give layout of Report variant.
SELECTION-SCREEN BEGIN OF BLOCK 3 WITH FRAME TITLE text-003.
PARAMETERS: p_vari TYPE disvariant-variant.
SELECTION-SCREEN END OF BLOCK 3.
* Process on value request
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_vari.
PERFORM f4_for_variant.
* Selection-Screen Checking
AT SELECTION-SCREEN.
PERFORM pai_of_selection_screen.
INITIALIZATION.
w_repid = sy-repid.
PERFORM variant_init.
* Get default variant
gx_variant = g_variant.
CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
EXPORTING
i_save     = g_save
CHANGING
cs_variant = gx_variant
EXCEPTIONS
not_found  = 2.
IF sy-subrc = 0.
p_vari = gx_variant-variant.
ENDIF.
FORM f4_for_variant .
CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
EXPORTING
is_variant = g_variant
i_save     = g_save
IMPORTING
e_exit     = g_exit
es_variant = gx_variant
EXCEPTIONS
not_found  = 2.
IF sy-subrc = 2.
MESSAGE ID sy-msgid TYPE 'S'      NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
**  ELSE.
**    IF g_exit = space.
**    ENDIF.
ENDIF.
ENDFORM.                    " f4_for_variant
FORM pai_of_selection_screen .
IF NOT p_vari IS INITIAL.
MOVE g_variant TO gx_variant.
MOVE p_vari TO gx_variant-variant.
CALL FUNCTION 'REUSE_ALV_VARIANT_EXISTENCE'
EXPORTING
i_save     = g_save
CHANGING
cs_variant = gx_variant.
g_variant = gx_variant.
ELSE.
PERFORM variant_init.
ENDIF.
ENDFORM.                    " pai_of_selection_screen
FORM variant_init .
CLEAR g_variant.
g_variant-report = w_repid.
ENDFORM.                    " variant_init
**While Showing report pass the variant :::
g_save = 'A'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = w_repid
i_structure_name   = 'IT_MAIN'
is_layout          = i_layout
is_print           = i_print
it_fieldcat        = i_fieldcat[]
it_events          = i_events[]
i_save             = g_save
is_variant         = g_variant
TABLES
t_outtab           = it_main
EXCEPTIONS
program_error      = 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.
Many Thanks / Himanshu Gupta

Similar Messages

  • Query: How to add new fields in ABAP query?

    Hi All,
    Can any one tell me how to add new fields in the ABAP query output?
    We have to add the new fields using query design or we have
    to add those in the background program(automatically generated behind query) by selecting new fields in the code?

    What kind of report? Usually, you have to add the field in the table declaration and then also in the SQL query. After that, include the field in what kind of report you are using.

  • How to sort the fields in ABAP query.

    Hi all
    I am not able to drag the fields in Sort tool box.
    Please help me how to add the fields in Sort tool bar.
    Regards
    Gangi

    In SQ01, when we are creating a query, we can define the default sort sequence & Totals also.
    This can be done when defining the basic list.

  • How to hide  some fields in default selection screen in hr abap

    Hi experts,
    I have created default selection screen,in that in the Period option I wants display only 'Today'.
    And in the selection criteria i wants to display personnel number,companycode,personnelsubarea,employee status and instead of payroll area i wants to display 'Org unit'.please tell me step by step procedure,that could be greate helpfull.
    Thanks in advance,
    mohan

    use this logic to display only today in the period option
    **Local constants
       CONSTANTS:
              c_0                   VALUE  '0'  ,
              c_089     TYPE char3  VALUE  '089',
              c_091     TYPE char3  VALUE  '091',
              c_095     TYPE char3  VALUE  '095',
              c_097     TYPE char3  VALUE  '097'.
                     At Selection Screen
    at selection-screen output.
    LOOP AT screen.
          IF
               screen-group4 = c_089 OR
               screen-group4 = c_091 OR
               screen-group4 = c_095 OR
               screen-group4 = c_097  .
          screen-active = c_0.
          MODIFY SCREEN.
         ENDIF.
      ENDLOOP.

  • Add fields in abap  query

    Hi,
      Please let me know , how to add two fields in ABAP Query.  Please it  showing  two fields in list fileds  but i want to add two into one.
    thanks,
    Sonar

    Thanks  for  Inf
    Here I want  to  print total  of two fields  into  one  field,  where  concatenate  should  be there
    mv_abrmenge, mn_abrmenge  
    select ebelnr, htariftyp, csparte, cvertrag, cvkont, mbelzart, cbegabrpe, cendabrpe, mv_abrmenge, mn_abrmenge, e~budat
    from erchc as e
    join dberchz1 as m
    on ebelnr = mbelnr
    join erch as c
    on mbelnr = cbelnr
    join ever as r
    on cvertrag = rvertrag
    join eanlh as h
    on hanlage = ranlage
    where h~tariftyp in @p1@
    and c~erchc_v = 'X'
    and c~simulation = space
    and c~tobreleasd = space
    and e~budat in @p2@
    and e~simulated = space
    Thanks,
    Sonar

  • Creation of local field in ABAP Query

    Hi
    Please let me know how to create a local field in ABAP query. I am finding the option inactive in SQ01.
    Regards
    Priyadarshini

    hi priya,
         *__Adding u201CLocal Fieldu201D (user defined field) in SAP Query_ :
    There is also facility to add the user defined fields in SAP query output. Also we can provide calculation formula for calculating values for this user defined field.
    Calculation formula consists of standard fields from standard SAP tables. So the values fetched for particular standard SAP fields from standard SAP tables get calculated as per the calculation formula defined for the user defined field and displays the value accordingly.
    To do this first go to change mode for Query which automatically takes you to screen shown below and click on icon   , as below :
    Then further screen will appears. So select the Field group and again click on the same icon button   .
    Then switch on the Short names for the fields and give the short names to fields which we need to use in Calculation formula.
    Give the short names and then created u201CLocal Fieldu201D, as shown in below screen shot. Also Short names are given to fields, which can be used further for calculation.
    Defining Local Field u201CREM_QTYu201D along with its field type and Calculation formula.
      In this case we have 
      defined field type for new  
      field as similar to
      ORD_QTY and
      Calculation formula is  
      defined.
    Also its possible to have Conditional logic for Local field by putting Condition in u201CConditionu201D line.
    Now activate this newly added Local field for coming it in output screen. To do the same again go to u201CBasic Listu201D and activate the Local Field as shown below :
    i think this will help u
    regards,
    sindhu.

  • Addition of checkbox and 2 fields in ABap query selection screen

    Hi
    I need to add chack boxes and 2 fields in ABAP query which is using LDB QMI. can u pls let me know how to do that.

    Hi Tarun,
    I am still not clear with the problem..I guess you require plant in your selection screen which you have.
    i guess if you go to sq01tcode there is a option infoset query from where you can give your selection options and value.
    have you selected all the fields in infoset and made a selection screen?
    When you have done with your infoset you just need to diplay the fields and there is a automatic program generated.
    Let me know...
    Regards,
    Nihkil.

  • 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

  • How to hide document fields in Bid Invitation

    While creating Bid invitation I need to hide some fields e.g. Attachements, upload a document, description, button Search & Add. These fields are available under tab  Header data -> Documents.
    BADI 'BBP_UI_CONTROL_BADI' works to hide Bid Invitation Basic data, but not for above.
    Can anybody let me know how to hide above fields.
    Nilesh Kumar

    Hi,
       I dont think there  is any BADI/screen variant for this requirement.But yes,if any of the 2 are available in the std,ITS template changes should be avoided.
       The foll are the screen variants available in SRM 5.0:
    Item data overview in the invoice without purchase order reference: Screen variant BBP_IV_NON_PO; Method GET_SCREENVARIANT_INV
    Item data overview in the invoice with purchase order reference: Screen variant BBP_IV, Method GET_SCREENVARIANT_INV
    Item data overview in the confirmation: Screen variant BBP_CF; Method GET_SCREENVARIANT_CONF
    Item data overview in the confirmation for time recording: Screen variant BBP_CF_TIMEREC; Method GET_SCREENVARIANT_CONF
    Item data overview in the purchase order: Screen variant BBP_PO; Method GET_SCREENVARIANT_PO
    Item data overview for contracts: Screen variant BBP_CTR_ITEMLIST; Method GET_SCREENVARIANT_CTR
    Item data overview for selection of contracts: Screen variant BBP_CTR_ITEM_SELLIST; Method GET_SCREENVARIANT_CTR
    Search results for changing/processing a purchase order: Screen variant BBP_SEARCH_PO_IN_PO; Method GET_SCREENVARIANT_SEARCH
    Search results for entering an invoice and/or confirmation: Screen variant BBP_SEARCH_PO; Method GET_SCREENVARIANT_SEARCH
    Search results for entering a purchase order: Screen variant BBP_SEARCH_SC; Method GET_SCREENVARIANT_SEARCH
    Search results for displaying/processing a bid invitation: Screen variant BBP_SEARCH_BID; Method GET_SCREENVARIANT_SEARCH
    Search  results for displaying/processing a bid: Screen variant BBP_SEARCH_QUOT; Method GET_SCREENVARIANT_SEARCH
    Search results for displaying/processing an auction: Screen variant BBP_SEARCH_AUC; Method GET_SCREENVARIANT_SEARCH
    Search results for displaying/processing an invoice: Screen variant BBP_CHANGE_IV; Method GET_SCREENVARIANT_SEARCH
    Search results for displaying/processing a confirmation: Screen variant BBP_CHANGE_CF; Method GET_SCREENVARIANT_SEARCH
    Search results for entering/displaying/processing/status of a shopping cart: Screen variant BBP_SC; Method GET_SCREENVARIANT_SC
    Worklist for Sourcing: Screen variant BBP_SOCO_WL; Method GET_SCREENVARIANT_SOCO
    Work area in Sourcing: Screen variant BBP_SOCO_GA; Method GET_SCREENVARIANT_SOCO
    Overview for the budget display: Screen variant BBP_BUDGET; Method GET_SCREENVARIANT_BUDGET
    BR,
    Disha.

  • When i hide some fields from the Editform using javascript, what will happen to the fields that hve been hidden

    I am working on an EnterpriseWiki site collection, and when users edit the page properties as follow:-
    then will get all the fields inside the EnterpriseWiki content type as follow:-
    now i want to hide all the fields except the ; Title & Name, so i edit the EditForm and i add the following script:-
    <script>
    $('#formTbl tr').filter(function ()
    return !$(".ms-standardheader", this).text().match(/Name|Title/i);
    }).remove();
    </script>
    so currently when users edit the wiki page properties they can only edit the Name & Title, because the script hide the other fields.
    My question is what will happen to the other values such as the page content, assign to , etc that have been hidden.. I test this and seems that when editing the name and title the other values will not get effected which is what i need, but not sure how
    did SharePoint handle this, i was afraid that hiding the other columns will set their values as null or empty if the user save the editform with only the title and name inside it ? can anyone adivce on this ?

    Hi John,
    From your description, my understanding is that you are worried about the values of some fields
     will been saved as empty if you hide them in EditForm.
    If you hide some fields in EditForm, it means that you could not edit them. These fields’ values will not be changed after editing Title field or Name field. When you click Save button, they will be still the values before changing the Title field or Name
    field.
    Best Regards,
    Vincent Han
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]
    i found this very critical issue with hiding the fields from the edit form, now i wrote the following script inside the edit form , to hide all the fields except the Name
    <script>
    $(document).ready(function(){
    $('#formTbl tr').filter(function () {
    return !$(".ms-standardheader", this).text().match(/Name/i); }).hide();
    $('#ctl00_ctl40_g_6c7d849e_da6b_4138_be9f_b99bde542065_ctl00_ctl02_ctl00_ctl04_c‌ ​tl00_WebPartMaintenancePageLink').hide(); });
    </script>"
    . and now if I submit the editform (which only contain the Name) all the html tables inside the wiki page content will be removed.

  • How to Hide some Rows in a List view Web Part using JavaScript ?

    How to Hide some Rows in a List view Web Part using JavaScript ?

     Here is the code that worked for me:
    var Elements = document.querySelectorAll('div[id=WebPartWPQ3] table[class=ms-listviewtable]>tbody tr .ms-vb-lastCell.ms-cellstyle.ms-vb2')
    for(var i=0, n = Elements.length; i < n; i++)
     if(Elements[i].innerHTML=="India")
    Elements[i].parentNode.setAttribute("style","display:none")
    WebPartWPQ3 -> ID of webpart Div
    ms-listviewtable -> class name of table in Div
    ms-vb-lastCell.ms-cellstyle.ms-vb2 -> classname of td to get text

  • How to hide the field from the view in the webdynpro application?

    Hi Gurus,
    I got a requirement where in which ,default layout has the field name Time.......To......... which is (2 input box ) and one lable assigned to the container.........
    Now my requirement is to hide this field from the layout for all cases of leave......(all types of leave)....
    I got a few inputs from forum that we can achieve this by implementing the following steps..........
    Create In context => Value attribute => Say Visibility
    Go to its properties
    Select com.sap.ide.webdynpro.uielementdefinitions.Visibility
    In View Layout
    Select UI Element Set Visible property to this context variable Visibility.
    In wdDoModifyView() You can set this property to false
    wdContext.currentContextElement().setVisibility(false);
    Can you people tell me where to create the value attribute........
    In the view context or in the component context...........
    and field that am talking about is assign to the container you want me to assign this context variable property to all ......Like to input box ,label and the container..........
    Please calrify this ASAP...........
    Thanks in Advance,
    Dharani

    Hi Manoj......
    Hi Murutuza,
    As per your guidelines I have created the value attribute in View context (which has the field..... which needs to be hide)inside the value node say FieldVisibility.......and attribute name OldTimeDuration......and I set this value with uidefeneitions Visibility .......
    and I bind this vaule with the field property visible(Time.......To..........)which I need to hide...........
    Now in the view implementation tab ..........I have coded in the doinit method(since my requirement to hide the field from the layout in all cases).........
    wdContext.currentFieldVisibilityElement().setOldTimeDuration(WDVisibility.NONE);
    But if I deploy the application and see still am getting the same field dispalying in the screen.........
    I even tried putting this code in wdmodifyview method.........same results........
    Kindly tell me how to hide the field permenantly from the screen............(without any conditions.)
    Thanks in Advance,
    Dharani

  • How i hide a field of a custom view in OAF 11

    Hi, im a new developer of OAF11.
    What should I do, to customize the Purchase Order screen, if then the requirement is to hide the field that i insert from extended VO.
    What I did was modify the XML of the page to add the field and then extended the original AM.
    I added the extended view into the custom AM to prevent that fail with the field that i insert.
    I must clarify that I modify the path of AM default for the path of the custom AM in the XML, then i upload the XML with the command import, and i see it the field in the page.
    I tried to hide another field that i created by customizing the page, but I couldnt do. That´s why i insert directly the field in the XML original.
    I Try to customize the driver involved with the page, but nothing happened.
    First try it on the controller Father and after the son.
    The page is in the POS module (iSupplier), and is POSVIEWPOG (PO Details).
    The code that attempts to hide the field is:
    OAApplicationModule am = paramOAPageContext.getApplicationModule(paramOAWebBean);
    OAViewObject oaviewobject1 =(OAViewObject)am.findViewObject("PosViewHeadersVO");
    if (oaviewobject1 != null)
    OARow row = (OARow)oaviewobject1.getCurrentRow();
    String vCustomType = (String)row.getAttribute("TypeName");
    if (vCustomType.equals("Blanket Agreement"))
    OAMessageStyledTextBean vHideField = (OAMessageStyledTextBean)paramOAWebBean.findChildRecursive("drbQuantity");
    vHideField.setRendered(true);
    else
    OAMessageStyledTextBean vHideField = (OAMessageStyledTextBean)paramOAWebBean.findChildRecursive("drbQuantity");
    vHideField.setRendered(true);
    Can anyone help me?
    If im grong other solution that i think is:
    How I can put a field on a page with code and how to hide the field with conditions?, consider that the field is from the VO extended.
    Thanks!!!

    Hi Yichao,
    Chk these links
    https://help.sap.com/saphelp_nw04/helpdata/en/5a/0c889a4d5911d2a5fb0000e82deaaa/content.htm
    http://help.sap.com/saphelp_45b/helpdata/en/cf/21ec5d446011d189700000e8322d00/frameset.htm
    thanks and regards
    srikanth.p

  • How to hide a field from table maintenance view?

    Hi,
    How to hide a field from table maintenance view? 
    The field is used for data created date. I need to hide it from display.
    Thanks

    Chk this link.
    http://help.sap.com/saphelp_nw04/helpdata/en/66/33f52010dd11d6999300508b5d5211/frameset.htm
    Maintenance Attributes
    You can assign a maintenance attribute P to individual fields in the maintenance view definition in the Dictionary (SE11). It can be  H (hidden)
    H (hidden)
    A field flagged H is not displayed on the screen. This field must also be filled in the background by a routine at an event.
    The system writes R and H fields to the database like all other fields when a new data record is saved.

  • How to insert some strings in a query with the clausule 'in' in a procedure

    Hello fellows.
    Do you know how to insert some strings in a query with the clausule 'in' in a procedure (with a variable)?.
    I tell us my problem with an example:
    I want to use this select but introducing a variable instead the 'value1', 'value2':
    select * from table1 where field1 in ('value1', 'value2');
    if I declare the variable var1 as:
    TC_VAR1 CONSTANT VARCHAR2(50) := '''value1'',''value2'''
    and I use it as:
    select * from table1 where field1 in (TC_VAR1);
    It doesn't work because Oracle takes TC_VAR1 as an all string. I think Oracle takes it as this:
    select * from table1 where field1 in ('value1, value2');
    If I use the data type TABLE, I don't know how to use well:
    TYPE varchar2_table IS TABLE OF VARCHAR2(10);
    tb_var varchar2_table;
    select * from table1 where field1 in (tb_var);->It returns an error and there ins't an method that it returns all values.
    A curious case is that if I have a sql script (for example script1.sh) with this query:
    select * fromt able1 where field1 in (&1)
    and I invoke this script as
    script1.sh "'''value1'',''value2'''". It works
    Can anybody helps me?.
    Thanks.

    Thanks to all. Really.
    First, sorry for my English. It's horrible. Thank to all for understand it (my English).
    I've resolved my problem with these links:
    ORA-22905: cannot access rows from a non-nested table item
    and
    http://stackoverflow.com/questions/896356/oracle-error-ora-22905-cannot-access-rows-from-a-non-nested-table-item
    At last, I have used someting like this:
    DECLARE
    number_table_tmp NUM_ARRAY:=NUM_ARRAY(410673, 414303, 414454, 413977, 414042, 414115, 413972, 414104, 414062);
    BEGIN
    FOR c1 IN (SELECT par_id, 1 acc_vdo_id FROM SIG_VIS_CAM
    WHERE par_id IN (SELECT * FROM TABLE(number_table_tmp))
    UNION ALL
    SELECT par_id, 2 acc_vdo_id FROM SIG_ACCAO a
    WHERE par_id IN (SELECT * FROM TABLE(number_table_tmp))) LOOP
    NULL;
    END LOOP;
    END;
    but first I had to create the type NUM_ARRAY like this:
    CREATE TYPE subjectid_tab AS TABLE OF NUMBER INDEX BY binary_integer;
    THANK YOU, GUYS. YOU ARE THE BESTS. ;-)
    Edited by: user12249099 on 08-sep-2011 7:37
    Edited by: user12249099 on 08-sep-2011 7:37

Maybe you are looking for

  • Error while running WFTest.java

    hi, i am new to workflow, so when i ran WFTest.java with following information as input.. it was executed with some errors, please help me on this. Please enter information to test connection to the database user: SYSTEM password: myadmin database (h

  • My iPhone 5 died after the iOS 6.1.2 update

    I updated my Iphone 5 to the new iOs 6.1.2 last Thursday and ever since, the battery drains within a few hours without me even using it. Last night it got to the point where it wouldn't even charge anymore and now I am stuck with a dead iPhone 5. Bef

  • Can't get Audio form my 8510p to my Moto Rokr S9-HD

    Recently I got the Bluetooth S9-HD to listen to music from my 8510p but have not been able to make it work. I am running Windows 7 (Eval) on the laptop. The laptop can see the headset and can connect to it.  I see it, correctly labeled as S9-HD in th

  • 2:30 movie is more megs than 3:00 when compressed? Why?

    I've got two short movies. One is 2:30 minutes. One is 3:00 minutes. For "Format" under Export>Quicktime Conversion I used the default "High Bandwidth" setting. (H.246) For reasons I cannot figure out, the 2:30 is 38 megs, and the 3:00 is 25 megs. Th

  • How to delete the subsiquent document for a sales order

    Hi, Please tell me the tcode to delete the subsequent document of a sales order and a sales quotation.I want to reject or delete the sales quotation. Please tell me the procedure. Currently i am trying to cancel the billing document for sales order b