Web dynpro ALV requirement with search help

Hello Experts,
I developed a custom transaction in Web dynpro. It has an ALV display in editable mode where the user can enter Material number, plant, quantity and Batch as input fields for Production confirmation.
There is a requirement to add a search-help to BATCH field similar to the one that appears in std. MFBF transaction. Basically what it means is that I will have to capture the material, plant of that line in ALV table and get the stock and batch details from MCHB table and provide them in search help.
I created a dictionary search help with a search-help exit FM that will extract the details from MCHB table. I am having trouble in extracting the line index to get the material number and plant values from the view to export.
Please help me as to how to extract the line index of an ALV table for which the F4 help was clicked.
Also it would be great if I could find a much simpler and better approach to handle the requirement.
Regards
Pratyusha

Hi,
If you have set the help mode as dictionary search help in your context, and if you have defined your search help to have these importing and exporting parameters, then it will work without you doing anything else. Provided you have mentioned the name of the search help in the structure definition itself. You do not have to write explicit event handlers for dictionary search helps.
Or else, you can use an OVS search help. In that case, in the OVS event handler, you will have a parameter ovs_callback_object. Ovs_callback_object->context_element will give you the element on which the F4 was clicked. If you do a get_static_attributes on that, you will get the values of each attribute. Then you can call your function module to get the Batch field. I think OVS will suit your requirement. You can see examples of OVS in the component demo_value_help in the package swdp_demo.
Hope this helps.
Regards,
Nithya

Similar Messages

  • Search help for Web Dynpro using the SAP-search help

    Hi,
    I’m trying to create a generic search help for Web Dynpro using the SAP-search help. It should working so, that I construct a Web Dynpro-component, that gets the data of the search help from the SAP-system, interpreted it and creates the ui-elements and the needed context generic.
    The mapping between the Input field of the customerview and the right search help is to be made with an xml-file, which contains the information: name of the view, the input field, the search-help-name and the name of the field that will be returned.
    The xml-file is reading from a helper-class. That helper-class contains any information, witch need the search help-component as well as the customer-component.
    The initialization takes place in the method wdDoModify of the customer. The call of the search help from the customer should be implement with an Action, witch is bound to a Button(create dynamic in the helper-class behind the input field).
    In a second foot should be create a plugin for eclipse, witch insert the used files (search help component, helper class, …) in the project. In addition it should create the call in the customer generic.
    It would be great if someone can give me a feedback!

    Hi Mike,
    The BlanketAgreement.exe is a reference to the executable that will be created when you compile the solution you created in Part II - Part III. I think there is a mistake in the tutorial because it asks you to name the project 'Blanket' which means that by default the executable will be called Blanket.exe and not BlanketAgreement.exe. The tutorial also misses the step asking you to compile the Blanket project before you go on to create an installer. You should compile your Blanket project in Release mode before creating an installer. By compiling the project you'll get a Blanket.exe file in the bin folder of your Blanket project which you then need to add to the installer per the instructions.
    SAP do offer development courses in some areas and there is training material here on the SDN and on the SAP partner portal (and maybe the customer portal as well). Try searching this forum for 'training' or 'tutorial' and you should get a few links. There's also a development certification.
    Personally I'd recommend you give yourself a little project to work on and just get stuck in
    Kind Regards,
    Owen

  • Help required with search help exit

    Hi,
    I have the following code in my search help exit function module.
    FUNCTION ZTRAC_SH_OBJ_TYPE.
    ""Local Interface:
    *"  TABLES
    *"      SHLP_TAB TYPE  SHLP_DESCR_TAB_T
    *"      RECORD_TAB STRUCTURE  SEAHLPRES
    *"  CHANGING
    *"     REFERENCE(SHLP) TYPE  SHLP_DESCR_T
    *"     REFERENCE(CALLCONTROL) TYPE  DDSHF4CTRL
    Data lt_program TYPE TABLE OF zpr_program.
    DATA ls_program LIKE LINE OF lt_program.
    DATA id_obj_type TYPE zobj_type.
    CALL FUNCTION 'ZTRAC_GET_OBJ_TYPE_ACTUAL'
    IMPORTING
       ED_OBJ_TYPE       = id_obj_type.
    CASE callcontrol-step.
    *.SELONE step
        WHEN 'SELONE'.
          IF ID_OBJ_TYPE = 'PROGRAM'.
            CALL FUNCTION 'Z_PR_GET_PROGRAMS'
            EXPORTING
              IV_BSUITE_ID                      =
              IV_PTU_ORG_ID                     =
              IV_AUTHOR_ID                      =
              IV_CALLING_APPLICATION            =
              IT_INCLUDE_PHASE_IDS              =
              IT_EXCLUDE_PHASE_IDS              =
             IMPORTING
               ET_PROGRAMS                       = lt_program
              ET_PROGRAM_HEADER                 =
            EXCEPTIONS
              BSUITE_FOR_PRG_NOT_EXISTING       = 1
              PTU_ID_FOR_PRG_NOT_EXISTING       = 2
              OTHERS                            = 3
            IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
            ENDIF.
            LOOP AT lt_program INTO ls_program.
             APPEND lt_program-INT_PRG_NAME TO shlp.
             APPEND lt_program-INT_PRG_NAME TO shlp_tab.
    Below i am appending the result to the record_tab.
              APPEND ls_program-INT_PRG_NAME TO record_tab.      
           ENDLOOP.
      ELSEIF ID_OBJ_TYPE = 'PROJECT_CLUSTER'.
          ENDIF.
       WHEN 'DISP'.
    ENDCASE.
    When DISP ->  I want the values in the record_tab to be filled in my F4 help. What will the code in WHEN DISP be?
    Also i have appended the result only to record_tab. Do i have to append it to SHLP_TAB also?

    hi,
    In DISP , you have to filter the records according to search criteria if there is any and finally move the records to Record_tab.
    It would be something like this :
    LOOP AT gt_select_list INTO  gw_select_list WHERE carrid IN r_carrid.
            MOVE gw_select_list TO record_tab-string.
            CLEAR gw_select_list.
    ENDLOOP.
    the values in Record_tab will be displayed to the user.

  • Wrapping text with web dynpro ALV

    Hi there,
    I have got an web dynpro ALV and have set the SET_FIXED_TABLE_LAYOUT value to abap_true. This provides what i need apart from instead of not showing the text that can not be fit into the available column width I would like it to wrap the text, so it is all displayed. Is this possible?
    Also is there a way to allow the user to change the width of the columns by clicking on them and dragging them bigger/smaller.
    Thanks and Regards
    Mart

    Hi Mart,
    Please refer this [thread|Wrap in ALV], it might help.
    Also is there a way to allow the user to change the width of the columns by clicking on them and dragging them bigger/smaller.
    Refer the reply of Thomas Jung in this [thread|Adjusting Column width on Web Dynpro ALV].
    Regards
    Arjun
    Edited by: Arjun on Feb 23, 2009 10:48 AM

  • How to call an web dynpro abap application with an particular theme

    Dear friends,
    i have created one web dynpro abap application. i created one theme XYZ in portal with required font size. when i applied this theme on portal all web dynpro application use this theme.
    i want to use current theme for one application not for all.
    is it poosible to call an web dynpro abap appl with the particular theme where as others should not be temper with this theme.
    please guide me by some useful steps.
    regards
    sunil

    Sunil,
    Check if this helps.
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/7015b1f9-535c-2910-c8b7-e681fe75aaf8?QuickLink=index&overridelayout=true
    Cheers!
    Sandeep Tudumu

  • Web Dynpro ALV grid sub totals

    Hi,
    I have managed to get totals working with web dynpro ALV using code like this :
      DATA: lr_field TYPE REF TO cl_salv_wd_field.
    For total calculations...
      lo_value->if_salv_wd_std_functions~set_aggregation_allowed( abap_true ).
      lr_field = lo_value->if_salv_wd_field_settings~get_field( 'N_OF_DLRS' ).
      lr_field->if_salv_wd_aggr~create_aggr_rule( aggregation_type = if_salv_wd_c_aggregation=>aggrtype_total ).
    Please can someone advise how i can do subtotals also.  Thanks
    Edited by: Samir Vora on Jul 15, 2009 12:40 PM

    Hi,
    For creating subtotals, you can have a look at following article:
    [Tutorial for Creation Subtotals using ALV|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/user-interface-technology/wd%20abap/tutorial%20for%20creating%20totals%20and%20subtotals%20using%20alv.pdf].
    Hope this helps.
    Regards
    Manas Dua

  • Web Dynpro ALV grid format

    Hi,
    I have a web dynpro alv table that has many columns (about 20) I would like it to be displayed so that the user does not have to scroll right to see all the data.
    at the moment columns:
    col1 col2 col3 ......col19 col20
    i would like the second half of the table under the 1sta half:
    col1 col2 col3...col9 col10
    col11 col12...col19 col20
    Is there any way that i can get the table to be split into two or some other nice way to display without scrolling?

    You won't be able to do this with a single ALV.  I suppose you could have two ALVs and bind them both to the same context.  You wouldn't be able to sync the veritcal scrolling between the the two ALVs however.  I'm also not sure how usage this design is from a UI design pattern.  I would think the acceptible approach would be to use horizontal scrolling within the ALV.  You don't have to make the ALV display all columns at once as this can make your entire page very wide and require using the browser scrolling.  Instead consider using the set_scrollable_col_count method.

  • Changing PF status of Web dynpro ALV

    Hi Experts,
      In Web dynpro ALV there is a button called "EXPORT" with two menu items(Export to Microsoft Excel & Export to BOE).
    I would like to add two more menu items to that button. Is it possible. If yes, how?
    Thanks and regards,
    Venkat.

    Never thought about such requirement..what exactly you want to add to the export other than standard ones...I donot see any way..still exploring...I guess standard is of type either a CL_SALV_WD_FE_BUTTON_CHOICE or CL_SALV_WD_FE_TOGGLE_BUTTON...
    I think you can have it using a custom button.....adding a menu item to standard needs to be explored....

  • Issue With Search Help in Module Pool

    Dear All,
    I have an Issue with Search help. I have created a Module Pool Program. In this module pool, User requires the search helps for the fields.
    Imagine there are 3 fields on a screen. Field1, field2 and field3.
    Field2 entries depends on field1 and field3 entries depends on field1 and field2.
    I have created a collective search help. and created the corresponding Ztables to maintain the search help entries.
    Now I assigned the same collective search help to both the fields . i.e. field2 and field3. But when i execute the module pool program, and press F4 on these fields , the data shown is write. BUT for the 3rd field, when I select F4, The second field values are transfered to the screen, instead of third field value.
    Any Idea will be appreciated .
    Help me , Its very Urgent.
    Regards,

    Did you check the screen field names & search help name? is it identical & unique?
    Raja T

  • Using ALV as a search Help

    Has anyone used ALV as a search help presentation/selection method.  I'm thinking, in a simplistic sense, it would be just creating an itab and presenting it on a grid in a container on a new screen called by an exit....
    Probably too simple, huh?    Pointers to any snippets that implement this would be welcome. 
    (additionally, might have a need to save user layouts of this info as well)
    Thoughts, comments, pitfalls.... ?
    Thanks...
    ...Mike

    Hey Michael a working example I just made for some1
    thought u might be interested
    Q. i_checkbox_fieldname = 'CHECKBOX'
    A. If the table output in the popup has checkboxes at the beginning of the rows (e.g. for multiple selection), the internal table must contain a field containing the value of the checkbox.
    Assign the name of this field to the parameter I_CHECKBOX_FIELDNAME.
    Q. i_tabname = 'TLINE'
    A.  This is the name of ur input help internal table
    Q. it_fieldcat = fieldcat[]
    A  The table u gonna display has to have a fieldcat.
    Q. it_excluding = extab[].
    A. In case u wanna exclude some functions.
    Below is a working example, paste it in se38 and activate.
    !!! Warning SAVE IT AS A LOCAL OBJECT !!!
    report ztests1.
    type-pools: slis.
    data: index type i.
    data: l_kunnr like kna1-kunnr.
    data: input(10) type c,
           text(4) type c,
           text1(5) type c.
    data: begin of itab occurs 10,
           kunnr like kna1-kunnr,
           name1 like kna1-name1,
          end of itab.
    data: e_exit.
    data: fieldcat TYPE slis_t_fieldcat_alv WITH HEADER LINE.
    parameter: p_kunnr(10) type c.
    at selection-screen on value-request for p_kunnr.
      select kunnr name1 up to 10 rows
        from kna1
        into table itab.
      fieldcat-tabname = 'ITAB'.
      fieldcat-fieldname = 'KUNNR'.
      fieldcat-seltext_m = 'Cust'.
      fieldcat-ddictxt = 'M'.
      fieldcat-outputlen = 10.
      APPEND fieldcat.
      CLEAR fieldcat.
      fieldcat-tabname = 'ITAB'.
      fieldcat-fieldname = 'NAME1'.
      fieldcat-seltext_m = 'Cust Name'.
      fieldcat-ddictxt = 'M'.
      fieldcat-outputlen = 30.
      APPEND fieldcat.
      CLEAR fieldcat.
        CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'
          EXPORTING
            I_TITLE                       = 'Customer Selection'
          I_SELECTION                   = 'X'
          I_ALLOW_NO_SELECTION          =
          I_ZEBRA                       = ' '
          I_SCREEN_START_COLUMN         = 0
          I_SCREEN_START_LINE           = 0
          I_SCREEN_END_COLUMN           = 0
          I_SCREEN_END_LINE             = 0
          I_CHECKBOX_FIELDNAME          =
          I_LINEMARK_FIELDNAME          =
          I_SCROLL_TO_SEL_LINE          = 'X'
            i_tabname                     = 'ITAB'
          I_STRUCTURE_NAME              =
            IT_FIELDCAT                   = fieldcat[]
          IT_EXCLUDING                  =
          I_CALLBACK_PROGRAM            =
          I_CALLBACK_USER_COMMAND       =
          IS_PRIVATE                    =
          IMPORTING
          ES_SELFIELD                   =
            E_EXIT                        = e_exit
          tables
            t_outtab                      = itab
        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.

  • Web Dynpro ALV grid column colour

    Hi,
    I have tried to set the colour of a column for my web dynpro alv with the below code but it the colour for this column has not changed - it seems to remain the standard colour.  Is there something else i need to do?
      DATA: lt_columns TYPE salv_wd_t_column_ref
          , ls_columns  TYPE salv_wd_s_column_ref
          , lr_column TYPE REF TO cl_salv_wd_column
      lt_columns = lo_value->if_salv_wd_column_settings~get_columns( ).
      LOOP AT lt_columns INTO ls_columns.
        IF ls_columns-id CS 'TOTAL_'.
          lr_column = ls_columns-r_column.
          lr_column->set_cell_design( cl_wd_abstr_master_table_col=>e_cell_design-positive ). "CL_WD_TABLE_COLUMN=>E_CELL_DESIGN-GROUP_LEVEL1
        ENDIF.
      ENDLOOP.

    Hi Samir,
    You will have to create an attribut WDUI_TABLE_CELL_DESIGN and bind this attribute with the cell design property of the column. Check this wiki link [https://wiki.sdn.sap.com/wiki/display/Snippets/ABAP%20Web%20Dynpro%20ALV%20-%20Change%20Cell%20Colour%20based%20on%20Content], it will solve your issue.
    Regards,
    Radhika.

  • Web dynpro Alv ENHANCEMENT

    hI,
    i HAVE a requirement to add extra 2 columns in web dynpro alv of standard web dynpro component
    what are the steps to be taken.

    Hi Madhav,
    Please cehck Thomus answer in this thread..
    is possible to enhance standard ALV?
    Enhancement Implementation - Removing columns in standard ALV table
    Cheers,
    Kris.

  • Web Dynpro ALV grid totals

    Hi,
    I have created an application that uses a web dynpro alv grid.  I want to display totals - is there a setting that can do this automatically - if so, can you please tell me how to do this?    Thanks,

    Hi
    You can take help of following code snippet to create totals for a particular column
    Data: lr_function_settings TYPE REF TO CL_SALV_WD_CONFIG_TABLE.
      DATA: lr_column_settings TYPE REF TO if_salv_wd_column_settings,
            lr_column          TYPE REF TO cl_salv_wd_column,
            lt_column type salv_wd_t_column_ref,
            ls_column type salv_wd_s_column_ref.
    Data:  lr_field_amnt type REF TO CL_SALV_WD_FIELD.
    * get reference of ALV component
      lr_salv_wd_table = wd_this->wd_cpifc_OVERVIEW_EARNED_ALV( ).
      wd_this->alv_config_table = lr_salv_wd_table->get_model( ).
    *  get function settings
      lr_function_settings ?= wd_this->alv_config_table.
    * display columns in correct order
      lr_column_settings ?= wd_this->alv_config_table.
      lt_column = lr_column_settings->get_columns( ).
      loop at lt_column into ls_column.
    CASE ls_column-id.
    when 'AMOUNT'
    * aggregate field
            CALL METHOD LR_FUNCTION_SETTINGS->IF_SALV_WD_FIELD_SETTINGS~GET_FIELD
              EXPORTING
                FIELDNAME = 'AMOUNT'
              RECEIVING
                VALUE     = lr_field_amnt.
    * create aggregate rule as total
            CALL METHOD LR_FIELD_AMNT->IF_SALV_WD_AGGR~CREATE_AGGR_RULE
              EXPORTING
                AGGREGATION_TYPE = IF_SALV_WD_C_AGGREGATION=>AGGRTYPE_TOTAL
              RECEIVING
                VALUE            = lv_aggr_rule.
    endcase.
    Regards
    Manas DUa

  • Web Dynpro ALV grid equivalent of onLeadSelect

    Hi,
    I am new to web dynpro alv and would like to know how to implement the equivelent of the action onLeadSelect that you can do with a table UIElement, but I want to do this for the ALV table that I have.  Many thanks,
    Samir

    Hi,
    Go to the View's property tab and include you ALV in that.
    whenever you instantiate the ALV then in the view, METHODS tab, you can find the Event handler for the lead selection for that ALV. Implement that.
    Method name           Method type         Event        
    ONLEADSELECT     Eventhandler        ON_LEAD_SELECT
    Check out the links -
    Re: click event on ALV
    http://www.flickr.com/photos/31042772@N08/3408386623/
    Regards,
    Lekha

  • Web Dynpro ALV grid column width

    Hi,
    I have a web dynpro alv grid that has columns titles that are long.  What is the best way of displaying the data without taking up too much space with the titles? 
    For example is it possible to wrap the title into 2 or 3 rows
    Thanks,
    Samir

    Hi,
    DATA: lr_column type ref to cl_salv_wd_column,
    lr_colheader type ref to cl_salv_wd_column_header.
              CALL METHOD lrcolumn->get_header
                RECEIVING
                  value = lr_COLHEADER.
    lr_COLHEADER->set_ddic_binding_field( if_salv_wd_c_ddic_binding=>ddic_bind_short ).
    Refer this if_salv_wd_c_ddic_binding in se24 for more.
    Regards,
    Lekha.

Maybe you are looking for

  • How can I see my phone on my laptop?

    How can I see my phone on my laptop?

  • Execute query. Not all records retrieved.

    Hi everyone. I have made a screen with the data block and layout wizzards. When I click on the default toolbar "Execute query" it brings only 68 records and there are about 25,000!. I have a botton which displays a LOV of the same table and the LOV i

  • Line under the white paint

    so on the sides of my macbook it looks like their is streek of grey bubbles under the paint on one side... and on the other side their is like a blue line under the paint...I keep really good care of it, i have a case that I carry it in and i have tr

  • Can't directly convert pdf files.

    Why can I no longer launch ExportPDF directly from the document I wish to convert? Prior to my renewing my subsription to this service I could launch the conversion directly from the document using the "Save as" option. Instead I am getting a window

  • Bundle a few docs along with AIR app

    Hi, I need to bundle a few PDF and word docs along with my AIR application when it is installed by the user. I don't want to Embed the documents in the actual AIR app, but just ensure that the files get included in the AIR installation and end up in