Selecting an option in a SELECT feild

lets say i have a form which allows me to edit details of
products stored in a database. on this edit form, i have a select
box where the user can indicate the color of the item.
since it is an EDIT form, there is already data abotu the
product in the database so when i display the form, if the item has
a value of RED for the color field, i want the select control to
have the RED option already selected when it loads.
i have always done it using the following method but it seems
liek there must be a better way of doing it:
<select name="color">
<option value="green" <CFIF #myquery.color# EQ
"Green">selected</CFIF>>Green</select>
<option value="orange" <CFIF #myquery.color# EQ
"Orange">selected</CFIF>>Orange</select>
<option value="red" <CFIF #myquery.color# EQ
"Red">selected</CFIF>>Red</select>
</select>
this always works, but it seems like putting a CFIF tag
inside an option tag is not the best way to go. is there a better
method of doing this?

I will often use the "immediate if" [iif()] function. It is
pretty much
the same concept, I do it mostly so I don't have the nested
angle brackets.
<select name="color">
<option value="green" #iif(myquery.color EQ
"Green",DE("selected"),DE(""))#>Green</select>
</select>
You also do not need the pound signs around "myquery.color"
in either
this version or your original <cfif...> tag version.
That helps cleans
up things as well.

Similar Messages

  • Error occurs during select-options

    hi friends,
    i am developed a report for extracting data from vbap using select-options
    i am using feilds,
    vbeln erdat ernam vbtyp vkorg vtweg feilds
    and vbeln vkorg vbtyp erdat as selection screen feilds.
    i got selection screen screen with required feilds well .
    but problem is with method onactiondisplay
    the coding like this
    method ONACTIONDISPLAY .
    TYPES: lty_r_vbeln TYPE RANGE OF vbeln,
           lty_r_erdat TYPE RANGE OF erdat,
            lty_R_VKORG TYPE RANGE OF VKORG,
            lty_r_vbtyp type range of vbtyp.
    DATA: lo_customer TYPE REF TO if_wd_context_node.
    Variables used to retrieve the values of select-options fields
      DATA: lt_sel_item TYPE if_wd_select_options=>tt_selection_screen_item.
      FIELD-SYMBOLS:
        <fs_sel_item> LIKE LINE OF lt_sel_item,
        <fs_vbeln>   TYPE lty_r_vbeln,
        <fs_vkorg>   TYPE lty_r_vkorg,
        <fs_vbtyp>   TYPE lty_r_vbtyp,
        <fs_erdat>   TYPE lty_r_erdat.
    Get the selection-screen items
      wd_this->m_handler->get_selection_screen_items(
        IMPORTING et_selection_screen_items = lt_sel_item ).
    Retrieve the values from the select-options items
      LOOP AT lt_sel_item ASSIGNING <fs_sel_item>.
        CASE <fs_sel_item>-m_id.
          WHEN `VBELN`.
            ASSIGN <fs_sel_item>-m_value->* TO <fs_vbeln>.
          WHEN `VKORG`.
            ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_vkorg>.
          WHEN `VBTYP`.
            ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_vbtyp>.
          WHEN `ERDAT`.
            ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_erdat>.
        ENDCASE.
      ENDLOOP.
    Retrieve the data from the database, for simplicity, the
    SELECT statement has been implemented here.
      SELECT * FROM vbak
        INTO TABLE wd_this->customer
        WHERE vbeln = <fs_vbeln>
          AND vkorg IN <fs_vkorg>
          AND vbtyp IN <fs_vbtyp>
          AND erdat IN <fs_erdat>.
    Bind the data to the context
      lo_customer = wd_context->get_child_node( name = `customer`).
      lo_customer->bind_table( wd_this->vbak ).
    ENDMETHOD.
    here customer is the node
    and i refer attributes
    m_handler = IF_WD_SELECT_OPTIONS
    M_SELECT_OPTIONS = IWCI_WDR_SELECT_OPTIONS
    and i defined vbeln as parameter only.
    and i got error as
    the feild customer is unknown but there is a feild with similar name wdctx_customer
    can any one explain clearly to extracts the data by using select options ..?

    Hello Karunakar,
    Since your problem was not getting solved, I took sometime to try this program on my own and figured out that getting value of parameter field is not same like selection field. we need to change only that part. anyhow since I tried this I;m sharing the complete code.
    code for creating the selection fields and parameter fields. verify whether you are doing the same in INIT method
      data lt_range type ref to data.
      data lr_vbeln type ref to vbeln.
      create data lr_vbeln.
      wd_this->m_handler->add_parameter_field(
          i_id    = 'VBELN'
          i_value = lr_vbeln ).
      lt_range = wd_this->m_handler->create_range_table( 'VKORG' ).
      wd_this->m_handler->add_selection_field(
          i_id                         = 'VKORG'
          it_result                    = lt_range ).
      lt_range = wd_this->m_handler->create_range_table( 'VBTYP' ).
      wd_this->m_handler->add_selection_field(
          i_id                         = 'VBTYP'
          it_result                    = lt_range ).
      lt_range = wd_this->m_handler->create_range_table( 'ERDAT' ).
      wd_this->m_handler->add_selection_field(
          i_id                         = 'ERDAT'
          it_result                    = lt_range ).
    and code the action method
      data:
            lt_sel_item type if_wd_select_options=>tt_selection_screen_item,
            lt_parameters type if_wd_select_options=>tt_selection_screen_item,
            lt_r_vkorg type range of vkorg,
            lt_r_vbtyp type range of vbtyp,
            lt_r_erdat type range of erdat,
            lv_condition type string,
            lt_customer type wd_this->elements_customer,
            lo_nd_customer type ref to if_wd_context_node.
      field-symbols:
            <fs_sel_item> like line of lt_sel_item,
            <fv_vbeln> type vbeln,
            <ft_r_vkorg> like lt_r_vkorg,
            <ft_r_vbtyp> like lt_r_vbtyp,
            <ft_r_erdat> like lt_r_erdat.
      wd_this->m_handler->get_parameter_fields( importing et_fields = lt_parameters ).
      wd_this->m_handler->get_selection_screen_items( importing et_selection_screen_items = lt_sel_item ).
      loop at lt_parameters assigning <fs_sel_item>.
        case <fs_sel_item>-m_id.
          when `VBELN`.
            assign <fs_sel_item>-m_value->* to <fv_vbeln>.
            if <fv_vbeln> is assigned and <fv_vbeln> is not initial.
              if lv_condition is not initial.
                concatenate lv_condition 'AND' into lv_condition separated by space.
              endif.
              concatenate lv_condition 'VBELN = <FV_VBELN>' into lv_condition separated by space.
            endif.
        endcase.
      endloop.
      loop at lt_sel_item assigning <fs_sel_item>.
        case <fs_sel_item>-m_id.
          when `VKORG`.
            assign <fs_sel_item>-mt_range_table->* to <ft_r_vkorg>.
            if <ft_r_vkorg> is assigned and <ft_r_vkorg> is not initial.
              if lv_condition is not initial.
                concatenate lv_condition 'AND' into lv_condition separated by space.
              endif.
              concatenate lv_condition 'VKORG IN <FT_R_VKORG>' into lv_condition separated by space.
            endif.
          when `VBTYP`.
            assign <fs_sel_item>-mt_range_table->* to <ft_r_vbtyp>.
            if <ft_r_vbtyp> is assigned and <ft_r_vbtyp> is not initial.
              if lv_condition is not initial.
                concatenate lv_condition 'AND' into lv_condition separated by space.
              endif.
              concatenate lv_condition 'VBTYP IN <FT_R_VBTYP>' into lv_condition separated by space.
            endif.
          when `ERDAT`.
            assign <fs_sel_item>-mt_range_table->* to <ft_r_erdat>.
            if <ft_r_erdat> is assigned and <ft_r_erdat> is not initial.
              if lv_condition is not initial.
                concatenate lv_condition 'AND' into lv_condition separated by space.
              endif.
              concatenate lv_condition 'ERDAT IN <FT_R_ERDAT>' into lv_condition separated by space.
            endif.
        endcase.
      endloop.
      select * from vbak into table  lt_customer where (lv_condition).
      lo_nd_customer = wd_context->get_child_node( name = wd_this->wdctx_customer ).
      lo_nd_customer->bind_table( lt_customer ).
    this is working as expected. hope this works for you as well
    BR, Saravanan

  • Plz help selection screen desplay issue

    Hi experts
    plz help
    small query
    i have two fields
    dateto and date from in my selection screen
    i ill have to use parameter for both the feilds i cannot use select-options here
    but wen i m using parameter its coming line by line
    like
    p_dateto    "i/o feild"
    but i want like we get in select option
    p_dateto    "i/o feild"           p_datfrm     "i/o feild"
    plz help me doin this .
    thanx i9n advance.

    hey,
    why dont u use select-options?
    but if u want parameters only,
    u can do like below.
    selection-screen begin of screen  <scrno>.
    selecion-screen begin of line.
    parameters: date_from type sy-datum,
    date_to type sy-datum.
    selection-screen end of line.
    selection-screen end of screen <scrno>.
    Message was edited by:
            Hymavathi Oruganti

  • Multiple selection at drill down.

    Hi Experts,
    I have a report which is in HierSQ ALV. Here I had created secodary HireSQ List and make this report as an ineractive.
    Now problem is when i click on perticular field on which i had set user command.
    But I want to choose more then one field at user command for use in querry.
    Please guide me to explore my knowledge.
    Thanks & regards,
    Nayan Lad

    I had use tabindex of perticular selected feild and use read table statement find the field using that index and create querry.
    Any ways thanks...

  • How to show check box in ALV grid??

    Hi All,
         I am using an option edit in the feild catalogue which allows me to change the values in a few columns in the ALV list.
    What I want is to be able to show a check box in a few columns which user can check and use the value X in the program for the later processing....
    Can somebody tell me how to show a check box in the ALV screen in the changeable format??
    Win full point by answering this typical question..
    Thanks - Chandan

    hi go through the fallowing code.
    *& Report  YGS_ALV_BOM                                                 *
    REPORT  YGS_ALV_BOM                             .
    TABLES : MAST,STKO,STPO.
    TYPE-POOLS: SLIS.
    TYPES : BEGIN OF TY_MAST,
            CHECK_BOX,
            MATNR TYPE MAST-MATNR,
            WERKS TYPE MAST-WERKS,
            STLAN TYPE MAST-STLAN,
            STLNR TYPE MAST-STLNR,
            STLAL TYPE MAST-STLAL,
            END OF TY_MAST.
    TYPES : BEGIN OF TY_STKO,
            STLTY TYPE STKO-STLTY,
            STLNR TYPE STKO-STLNR,
            STLAL TYPE STKO-STLAL,
            STKOZ TYPE STKO-STKOZ,
            BMENG TYPE STKO-BMENG,
            BMEIN TYPE STKO-BMEIN,
            END OF TY_STKO.
    TYPES : BEGIN OF TY_STPO,
            LIGHTS,
            STLTY TYPE STPO-STLTY,
            STLNR TYPE STPO-STLNR,
            STLKN TYPE STPO-STLKN,
            STPOZ TYPE STPO-STPOZ,
            IDNRK TYPE STPO-IDNRK,
            MENGE TYPE STPO-MENGE,
            MEINS TYPE STPO-MEINS,
            END OF TY_STPO.
    DATA : IT_MAST TYPE TABLE OF TY_MAST,
           WA_MAST TYPE TY_MAST,
           IT_STKO TYPE TABLE OF TY_STKO,
           WA_STKO TYPE TY_STKO,
           IT_STPO TYPE TABLE OF TY_STPO,
           WA_STPO TYPE TY_STPO.
    DATA : lt_fieldcat TYPE slis_t_fieldcat_alv,
           ls_layout TYPE slis_layout_alv,
           ls_event TYPE slis_alv_event,
           lt_event TYPE slis_t_event,
           it_sortinfo type slis_t_sortinfo_alv,
           ls_header TYPE slis_listheader,
           lt_header TYPE slis_t_listHEADER.
    DATA : IT_BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE.
    SELECT-OPTIONS : S_MATNR FOR MAST-MATNR.
    START-OF-SELECTION.
    PERFORM GET_DATA.
    PERFORM BUILD_FIELDCAT USING LT_FIELDCAT.
    PERFORM BUILD_LAYOUT.
    END-OF-SELECTION.
    PERFORM DISPLAY_DATA.
    *&      Form  GET_DATA
    *       text
    *  -->  p1        text
    *  <--  p2        text
    form GET_DATA .
    REFRESH : IT_MAST.
    SELECT MATNR
           WERKS
           STLAN
           STLNR
      FROM MAST
      INTO CORRESPONDING FIELDS OF TABLE IT_MAST
    WHERE MATNR IN S_MATNR.
    endform.                    " GET_DATA
    *&      Form  BUILD_FIELDCAT
    *       text
    *  -->  p1        text
    *  <--  p2        text
    form BUILD_FIELDCAT USING LT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
    DATA  : L_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
    REFRESH : LT_FIELDCAT.
            L_FIELDCAT-COL_POS = 1.
            L_FIELDCAT-FIELDNAME = 'MATNR'.
            L_FIELDCAT-TABNAME = 'IT_MAST'.
            L_FIELDCAT-REF_FIELDNAME = 'MATNR'.
            L_FIELDCAT-REF_TABNAME = 'MAST'.
            APPEND L_FIELDCAT TO LT_FIELDCAT.
            L_FIELDCAT-COL_POS = 2.
            L_FIELDCAT-FIELDNAME = 'WERKS'.
            L_FIELDCAT-TABNAME = 'IT_MAST'.
            L_FIELDCAT-REF_FIELDNAME = 'WERKS'.
            L_FIELDCAT-REF_TABNAME = 'MAST'.
            APPEND L_FIELDCAT TO LT_FIELDCAT.
            L_FIELDCAT-COL_POS = 3.
            L_FIELDCAT-FIELDNAME = 'STLNR'.
            L_FIELDCAT-TABNAME = 'IT_MAST'.
            L_FIELDCAT-REF_FIELDNAME = 'STLNR'.
            L_FIELDCAT-REF_TABNAME = 'MAST'.
            APPEND L_FIELDCAT TO LT_FIELDCAT.
    endform.                    " BUILD_FIELDCAT
    *&      Form  BUILD_LAYOUT
    *       text
    *  -->  p1        text
    *  <--  p2        text
    form BUILD_LAYOUT .
    CLEAR LS_LAYOUT.
    LS_LAYOUT-BOX_FIELDNAME = 'CHECK_BOX'.
    LS_LAYOUT-BOX_TABNAME =  'IT_MAST'.
    endform.                    " BUILD_LAYOUT
    *&      Form  DISPLAY_DATA
    *       text
    *  -->  p1        text
    *  <--  p2        text
    form DISPLAY_DATA .
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
    *   I_INTERFACE_CHECK              = ' '
    *   I_BYPASSING_BUFFER             =
    *   I_BUFFER_ACTIVE                = ' '
       I_CALLBACK_PROGRAM             = SY-REPID
       I_CALLBACK_PF_STATUS_SET       = 'PF_STATUS'
       I_CALLBACK_USER_COMMAND        = 'USER_COMMAND'
    *   I_STRUCTURE_NAME               =
       IS_LAYOUT                      = LS_LAYOUT
       IT_FIELDCAT                    = LT_FIELDCAT
    *   IT_EXCLUDING                   =
    *   IT_SPECIAL_GROUPS              =
    *   IT_SORT                        =
    *   IT_FILTER                      =
    *   IS_SEL_HIDE                    =
    *   I_DEFAULT                      = 'X'
    *   I_SAVE                         = ' '
    *   IS_VARIANT                     =
    *   IT_EVENTS                      =
    *   IT_EVENT_EXIT                  =
    *   IS_PRINT                       =
    *   IS_REPREP_ID                   =
    *   I_SCREEN_START_COLUMN          = 0
    *   I_SCREEN_START_LINE            = 0
    *   I_SCREEN_END_COLUMN            = 0
    *   I_SCREEN_END_LINE              = 0
    * IMPORTING
    *   E_EXIT_CAUSED_BY_CALLER        =
    *   ES_EXIT_CAUSED_BY_USER         =
      TABLES
        t_outtab                       = IT_MAST
    * 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.
    endform.                    " DISPLAY_DATA
    FORM PF_STATUS USING RT_EXTAB TYPE SLIS_T_EXTAB.
      SET PF-STATUS 'YSTATUS' OF PROGRAM SY-REPID
                               EXCLUDING RT_EXTAB.
    ENDFORM.
    FORM USER_COMMAND USING RF_UCOMM TYPE SY-UCOMM
                      SELFIELD TYPE SLIS_SELFIELD.
      CASE RF_UCOMM.
          WHEN '&NEXT'.
           PERFORM GET_DATA_BOM .
           PERFORM BUILD_FIELDCAT_BOM USING LT_FIELDCAT.
           PERFORM BUILD_LAYOUT_BOM.
           PERFORM DISPLAY_DATA_BOM.
      ENDCASE.
    ENDFORM.
    *&      Form  GET_DATA_BOM
    *       text
    *  -->  p1        text
    *  <--  p2        text
    form GET_DATA_BOM .
      CLEAR   : WA_STPO,
                WA_MAST.
      REFRESH : IT_STPO.
      DATA  : IT_CHECK TYPE TABLE OF TY_MAST.
      LOOP AT IT_MAST INTO WA_MAST.
          IF WA_MAST-CHECK_BOX EQ 'X'.
             APPEND WA_MAST TO IT_CHECK.
          ENDIF.
      ENDLOOP.
      SELECT STLTY
             STLNR
             STLKN
             VGKNT
             IDNRK
             MENGE
             MEINS
        FROM STPO
        INTO CORRESPONDING FIELDS OF TABLE IT_STPO
         FOR ALL ENTRIES IN IT_CHECK
       WHERE IDNRK EQ IT_CHECK-MATNR.
    CLEAR WA_STPO.
       LOOP AT IT_STPO INTO WA_STPO.
         SELECT SINGLE * FROM MAST WHERE MATNR EQ WA_STPO-IDNRK.
         IF SY-SUBRC = 0.
           WA_STPO-LIGHTS = '2'.
         ELSE.
           WA_STPO-LIGHTS = '1'.
         ENDIF.
         MODIFY IT_STPO FROM WA_STPO.
       ENDLOOP.
    endform.                    " GET_DATA_BOM
    *&      Form  BUILD_FIELDCAT_BOM
    *       text
    *  -->  p1        text
    *  <--  p2        text
    form BUILD_FIELDCAT_BOM USING LT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
    DATA  : L_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
    REFRESH : LT_FIELDCAT.
            L_FIELDCAT-COL_POS = 1.
            L_FIELDCAT-FIELDNAME = 'STLTY'.
            L_FIELDCAT-TABNAME = 'IT_STPO'.
            L_FIELDCAT-REF_FIELDNAME = 'STLTY'.
            L_FIELDCAT-REF_TABNAME = 'STPO'.
            APPEND L_FIELDCAT TO LT_FIELDCAT.
            L_FIELDCAT-COL_POS = 2.
            L_FIELDCAT-FIELDNAME = 'STLNR'.
            L_FIELDCAT-TABNAME = 'IT_STPO'.
            L_FIELDCAT-REF_FIELDNAME = 'STLNR'.
            L_FIELDCAT-REF_TABNAME = 'STPO'.
            APPEND L_FIELDCAT TO LT_FIELDCAT.
            L_FIELDCAT-COL_POS = 3.
            L_FIELDCAT-FIELDNAME = 'STLKN'.
            L_FIELDCAT-TABNAME = 'IT_STPO'.
            L_FIELDCAT-REF_FIELDNAME = 'STLKN'.
            L_FIELDCAT-REF_TABNAME = 'STPO'.
            APPEND L_FIELDCAT TO LT_FIELDCAT.
            L_FIELDCAT-COL_POS = 4.
            L_FIELDCAT-FIELDNAME = 'IDNRK'.
            L_FIELDCAT-TABNAME = 'IT_STPO'.
            L_FIELDCAT-REF_FIELDNAME = 'IDNRK'.
            L_FIELDCAT-REF_TABNAME = 'STPO'.
            APPEND L_FIELDCAT TO LT_FIELDCAT.
            L_FIELDCAT-COL_POS = 5.
            L_FIELDCAT-FIELDNAME = 'MENGE'.
            L_FIELDCAT-TABNAME = 'IT_STPO'.
            L_FIELDCAT-REF_FIELDNAME = 'MENGE'.
            L_FIELDCAT-REF_TABNAME = 'STPO'.
            APPEND L_FIELDCAT TO LT_FIELDCAT.
    endform.                    " BUILD_FIELDCAT_BOM
    *&      Form  BUILD_LAYOUT_BOM
    *      text
    * -->  p1        text
    *<--  p2        text
    form BUILD_LAYOUT_BOM .
    CLEAR  : LS_LAYOUT.
    LS_LAYOUT-LIGHTS_FIELDNAME = 'LIGHTS'.
    LS_LAYOUT-LIGHTS_TABNAME = 'IT_STPO'.
    endform.                    " BUILD_LAYOUT_BOM
    *&      Form  DISPLAY_DATA_BOM
    *       text
    *  -->  p1        text
    *  <--  p2        text
    form DISPLAY_DATA_BOM .
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    *   I_INTERFACE_CHECK                 = ' '
    *   I_BYPASSING_BUFFER                = ' '
    *   I_BUFFER_ACTIVE                   = ' '
       I_CALLBACK_PROGRAM                = SY-REPID
    *   I_CALLBACK_PF_STATUS_SET          = ' '
       I_CALLBACK_USER_COMMAND           = 'USER_COMMAND_BOM'
       I_CALLBACK_TOP_OF_PAGE            = 'TOP9'
    *   I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
    *   I_CALLBACK_HTML_END_OF_LIST       = ' '
    *   I_STRUCTURE_NAME                  =
       I_BACKGROUND_ID                   = 'ALV_BACKGROUND'
    *   I_GRID_TITLE                      =
    *   I_GRID_SETTINGS                   =
       IS_LAYOUT                         = LS_LAYOUT
       IT_FIELDCAT                       = LT_FIELDCAT
    *   IT_EXCLUDING                      =
    *   IT_SPECIAL_GROUPS                 =
    *   IT_SORT                           =
    *   IT_FILTER                         =
    *   IS_SEL_HIDE                       =
    *   I_DEFAULT                         = 'X'
    *   I_SAVE                            = ' '
    *   IS_VARIANT                        =
    *   IT_EVENTS                         =
    *   IT_EVENT_EXIT                     =
    *   IS_PRINT                          =
    *   IS_REPREP_ID                      =
    *   I_SCREEN_START_COLUMN             = 0
    *   I_SCREEN_START_LINE               = 0
    *   I_SCREEN_END_COLUMN               = 0
    *   I_SCREEN_END_LINE                 = 0
    *   IT_ALV_GRAPHICS                   =
    *   IT_HYPERLINK                      =
    *   IT_ADD_FIELDCAT                   =
    *   IT_EXCEPT_QINFO                   =
    *   I_HTML_HEIGHT_TOP                 =
    *   I_HTML_HEIGHT_END                 =
    * IMPORTING
    *   E_EXIT_CAUSED_BY_CALLER           =
    *   ES_EXIT_CAUSED_BY_USER            =
      TABLES
        t_outtab                          = IT_STPO
    * 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.
    endform.                    " DISPLAY_DATA_BOM
    FORM TOP9 .
    CLEAR   LS_HEADER.
    REFRESH  LT_HEADER.
    LS_HEADER-TYP = 'H'.
    LS_HEADER-INFO = 'BILL OF MATERIALS'.
    APPEND LS_HEADER TO LT_HEADER.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
      EXPORTING
        IT_LIST_COMMENTARY       = LT_HEADER
       I_LOGO                   = 'ENJOYSAP_LOGO'
    *   I_END_OF_LIST_GRID       =
    ENDFORM.
    FORM USER_COMMAND_BOM USING RF_UCOMM_BOM LIKE SY-UCOMM
                      SEL_FIELD TYPE SLIS_SELFIELD.
        CASE RF_UCOMM_BOM.
          WHEN '&IC1'.
          SET PARAMETER ID 'MAT' FIELD WA_STPO-IDNRK.
          SET PARAMETER ID 'WRK' FIELD WA_MAST-WERKS.
          SET PARAMETER ID 'CSA' FIELD WA_MAST-STLAN.
          CALL TRANSACTION 'CS03' AND SKIP FIRST SCREEN.
        ENDCASE.

  • Slow performance of alv report

    Hi,
    I have developed Invoice Register Report in ALV,
    there 25 Selection Feild all multiple range , 98 coulmns  & 26 database tables r used . its a very bulky report.
    i did optimized coding. still it is very slow . can anybody tell me the reason or any method to improve the performance .
    Regards
    Fozia

    Hi Fozia,
    As you are dealing with huge data it will be slow, however you can take some measures to optimize timing.
    1. SQL trace ST05 -
    > then chose the options accordingly.. trace on  once you have executed the object
    then trace off, list trace..... you can find out the difference.
    Use Se30 in conjunction with ST05. do a runtime analysis for the same.
    Also on top tips and tricks are mentioned which shows how can you improve the performance.
    I am sure that you have taken care of small nuances like number of joins not more than three, use of for all entries as much as possible. Do remove dead code from your object though will not make any huge difference.
    If possible to have an EWA Early watch analysis for your production then it would be  best.
    Mohinder

  • With holding tax

    Hi,
    If  i  select With holding  tab  when   entering Down payment request,Down payment and invoice for vendor,  i  am getting error message as  Withholding Tax information missing from line item
    Could you advise me where i made wrong cogfiguration for with holding tax.
    Your immediate response will be highly appreciated.
    With regards,
    V.K

    Hi
    Check Feild status group of G067 in OB14 and make sure that these are optional and also the Feild status group of WHT GL accounts you have assigned.
    There is always a possibility that these are in suppressed state.
    Award points if useful.
    sarma

  • How do I distinguish the header/footer from the two-colume format of a .pdf document?

    How do I get adobe to realize that there is a header and footer on each page, but the actual text in the file is in two columes. Is there a way to make this clear and embade it in the document so other programs recognize this too?
    I am finding tha when I copy/paset text from this .pdf document the pasted text combines thet text across each line especially when images are involved in the selected feild. This 600 page document is formated into two columnes but has headers and footers and inserted articles and pictures that obscure fields. Here isinimage of what I mean.

    Scripts can be placed in many different locations, but in this case an Action is the right choice since you want to process multiple files in the same manner.
    You can set the output option of the Action to "Do not save changes", since you're already taking care of that in the script and don't actually need to save the original files.
    It seems to me the script is doing what you want it to do, no? It creates the PDF files from the extract pages of each source file.
    All you have to do now is to combine all of these files together, which you can do by going to File - Create - Combine Files into a Single PDF and select the folder to which you saved all of these files.

  • Region filed is not diplaying any values in e-shop application

    Hi Experts,
    I am working on e-shop application of CRM e-commerce.In my e shop registration page ,i have one select option filed called region.it display the country region list according to which country use has to be select.here i have one problem,,that is.I have two registration profile in Backend system.In this one registration profile countries is diplaying or getting all regions in the select feild of region of e-shop appllication. And for other  registration profile it is not dipalying any regions.I am using the same logic for all coutries to diplay regions,but it is showing to some cooutries only.In the Backend all countries having region list.could you any body please suggest me? please suggest me the which RFC is calling for this.
    Its very urgent.
    Thanks in Advance!!!
    Regards,
    Kiran

    Hi Mark,
    I resolved the above problem.But i have another issue.i.e according to AddressforamtID ,layouts will change in B2C shops.as of now we are using to addressformatID s 0,1.But i created 2 more registratio profiles,so i have to change Layout for new registration profiles,could you please suggest me whic RFC or which configuration do we need to change.
    Thanks in Advance!!
    Thanks and Regards,
    Kiran

  • Master Data with text upload

    Hi expart,
    I have created customize infoobject for master data upload. Following steps I have done :
    1. Create info object for master data upload
    1.  Create Datasource( RSO2) in R/3 with text option ( R/3 table feilds code, description)
    2.  Replicate data source ( BI)
    3. Create transformation ( BI )
    I am unable to map description with info object.
    Pls. help which step I am missing.
    Thanks in advance,
    Goutam

    Hi Gautam,
      Check the properties of Master data infoobject.
    In Master data/texts tab page.
        i.       Select With master data and With texts if they are not already selected.
       ii.       In the field below Character. is InfoProvider, enter the technical name of your InfoArea and confirm your entry.
                   The system sets the indicator Character. is InfoProvider.
       iii.       For the characteristic  Select the indicator mentioning short/medium/ long text.
    Then activate the master data object. Now try to create the transformation...
    check the below link for step by step procedure..
    http://help.sap.com/saphelp_nw04s/helpdata/en/46/94bc9ab90819aee10000000a11466f/content.htm
    Edited by: Priya.D on Mar 15, 2010 9:43 AM

  • Activity Type Master Data

    In Activity Type master data we found these options allocation cost element feild.
    1     Manual entry, manual allocation
    2     Indirect determination, indirect allocation
    3     Manual entry, indirect allocation
    4     Manual entry, no allocation
    What is its relevance? . When to select what?.
    Please give example.

    Hi,
    We are using an activity type for Direct labour. eg of how we have defined the Master Data is below:
    ATyp category - 1
    1 is selected if Activity types use plan activity quantities. If you are going to plan the quantities for Activity type thru KP26 and then the Activity cost thru KP06 before calculating the Activity price thru KSPI, select 1.
    Price indicator - 1
    Act. price indicator - 5
    Regards,

  • Field status - Commitment Item

    We need to make the Commitment Item field in the GL entry screen in DISPLAY mode. The field status offers only Suppress, required and Optional.
    How do we configure the same??

    hello shivaji,
    then u are inputing the data through f-02 the fields status are affected what posting we are using and what g/l accounting we using that means the posting key control the feilds related through that posting key (ob41 select the posting key 40 and dispaly it and select feild status button for select of feild status) and what g/l account u are posting that g/l account holds feild status group (for example g001,t-code  obc4, select the g001 for select of feild status will inputing the data through posting).to control the feilds with to parameters the system follows one rule i.e., SDRO - suppress, display, required and optional,
    in            posting key                   feild status variant         result
    feild status   s/r                                   r/s                                s
                         r/o                               o/r                                 o
                         s/o                                o/s                               r
                         s/d/r/o                        s/d/r/o                             same
    when come to,  view the inputed data for example fbl3n select the  change layout
    arrange the reposting of posted its as required.
    i hope it may helps u.
    thanks,
    supriya thodimela.

  • Extra discount with combination of materials

    Hi All,
    I have a scenario, where I want to give an extra discount when I combine  two material.
    Example:
    Customer XXX
    Material A
    Material B
    Material C
    Material D
    When I sell material A or B AND material C or D to customer XXX, I want to give an extra discount 10%.
    Any body has Idea how to map this scenario?
    Thanks & Regards

    Hi,
    In Free Goods Condition Technique, while selecting feilds for tables select Material No field also.
    And maintain condition records for the same.
    Regards,
    Srikanth.P

  • How to create a web template with company logo

    how to create a web template with company logo . can any one help me with the steps. or any notes. thnaks in advance .
    2. i have 25000 articles and client want to have a selection feild to see top article ex:50,10,20, 100, 1000 etc . same for bottom articles . plz let me know how to do it . thanks for replay . i am new bw so plz .
    thanks to you all

    Hi
    1) Please read
    http://help.sap.com/saphelp_nw04/helpdata/en/4a/c8353c51aab32be10000000a114084/frameset.htm
    2) Create a condition in the Query Designer: Use a formula variable
    See http://help.sap.com/saphelp_nw04/helpdata/en/73/702e39074dc93de10000000a114084/frameset.htm
    Heike

  • Use user name as a variable in forms

    Hello
    I want to use a variable in select command instead of actual username. e.g.
    select field_name into 'x' from demo.tablename
    here demo is a user and i want to change it through programatically i.e. using variable and assign different values to variable.
    Gautam

    For dynamic SQL statements look at using the EXEC_SQL package. However, it may be that you can solve your requirement simply by using private synonyms on each user so your statements actually just use
    Select feild into x from tablename
    and let the database sort out the actual owner based on the synonym.

Maybe you are looking for

  • Getting Error when running sql from concurrent program in R12

    Hi All, I created concurrent program and attached EXECUTABLE which executable method as SQL plus . Using this program I am running one SQL file in R12 when I am running I am getting below error . Same king of program I have define in 11i and running

  • Problem with opening a Numbers document

    I have a problem with a Numbers document, which I created 3 weeks ago and step by step extended with additional functionality. I'm not anymore able to open the document. I can rename the document and maybe - I didn't try - delete the document. But wh

  • How to set default file type for screen capture?

    I want to change the default from .jpg2 to .jpg when doing a screen selection capture (cmd-shft-4). Where is the place to do this? Thank you, todd

  • Hope it may help our forum

    I guess it may help our forum in some way http://realhomeworking.com/nokia-ovi-suite-software-updater-error-1327-invalid-drive-g/ If my post helped you, click on Kudos button and if my solution provided is opt 2 u, accpt my solution

  • Linux application loader - will it work?

    Hello. There already is a tool named "lxrun" which emulates a Linux kernel (system calls) on Solaris. Unfortunately this tool requires a full set of shared libraries and many other files. I noticed that most C functions (such as fopen, strcmp, ...) a