Modify ME55 selection conditions and ALV output

Hi guys,
I need to modify ME55 transaction, i mean to modify the data selection and ALV report to add new columns, is it possible with some enhancement or should i copy the program RM06BF00?
The problem that i faced when copying ME55 transaction is that copy ALV output is not the same in the standard one, is it possible to copy the class LCL_FACTORY?
Any link or idea would be helpful, thank u in advance.
Sofiane.

hi,
You have to copy the standard program SAPMV75A to ZSAPMV75A, change them accordingly.

Similar Messages

  • How get window between selection screen and alv output

    Hi Friends,
    I am displaying ALV report now i want to display small window with one button and it should show list of fields before displaying alv output.
    means i want a window showing list of fields of internal table coming from program.and when i will click on yes button it should show ALV output.
    how can i achive this .
    Pls. help
    thanks in advance.

    Hi,
    Try to use the following command:
    <b><i>WINDOW STARTING AT <some-value> <some-value> ENDING AT <some-value> <some-value>.
    </i></b>
    notice that there is a space between <> <>.
    This statement should be used inside the AT USER-COMMAND event.
    i.e.,
    AT USER-COMMAND.
       CASE SY-UCOMM.
           WHEN 'XXX'.
                <b> <i> WINDOW STARTING AT <> <> ENDING AT <> <>.</i></b>
                 ..............statements....................
       ENDCASE.
    This should help you some what.
    Bye

  • Add new selection fields and ALV output  fields in VA05

    Hi,
    I want to add two new selection fields in VA05 'Further selection criteria' screen, also want to add some more fields in VA05 ALV output.
    Please help me how i can do it using user exit ?
    Thanks ,
    Archana

    hi,
    You have to copy the standard program SAPMV75A to ZSAPMV75A, change them accordingly.

  • Web Dynpro ABAP - Select Option and ALV Component Usage

    Hi,
    I'm new in ABAP Web Dynpro and i was trying to follow the SDN tutorial
    Web Dynpro ABAP - Select Option and ALV Component Usage  
    In this video, we create a new Web Dynpro ABAP component that uses both Select Options and ALV. Developers can learn the basic mechanisms for working with both of these reusable components.
    Following the link: https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/media/uuid/39c54fe7-0b01-0010-0eb6-d63ac2bdd637
    I implemented and generated the web dynpro with success but when i execute a test i get a dump on select-option definition.
    Note
    The following error text was processed in the system ECD : Exception condition "TYPE_NOT_FOUND" raised.
    The error occurred on the application server ITAWSECCS01D_ECD_00 and in the work process 0 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    Method: DESCRIBE_BY_NAME of program CL_ABAP_TYPEDESCR=============CP
    I went in debug and the piece of code dumping is:
    lt_range_table =
    wd_this->m_handler->create_range_table( i_typename = 'S_PROJ' ).
    Is there someone who can help me?
    Thanks in advance,
    Stefano.

    Hi,
    I'm new in ABAP Web Dynpro and i was trying to follow the SDN tutorial
    Web Dynpro ABAP - Select Option and ALV Component Usage
    In this video, we create a new Web Dynpro ABAP component that uses both Select Options and ALV. Developers can learn the basic mechanisms for working with both of these reusable components.
    Following the link: https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/media/uuid/39c54fe7-0b01-0010-0eb6-d63ac2bdd637
    I implemented and generated the web dynpro with success but when i execute a test i get
    an error as
    Note
    The following error text was processed in the system EI6 : Exception condition "TYPE_NOT_FOUND" raised.
    The error occurred on the application server EC6IDES_EI6_01 and in the work process 0 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    Method: DESCRIBE_BY_NAME of program CL_ABAP_TYPEDESCR=============CP
    I have created a table zmy_table and trying to make USERID field as a select-options.I've written the code as shown below .
    data: itab type standard table of zmy_table,
    wa type zmy_table.
    data:
    node_employee type ref to if_wd_context_node,
    elem_employee type ref to if_wd_context_element,
    stru_employee type wd_this->element_employee ,
    item_userid like stru_employee-userid.
    navigate from <CONTEXT> to <EMPLOYEE> via lead selection
    node_employee = wd_context->get_child_node( name = wd_this->wdctx_employee ).
    @TODO handle not set lead selection
    if ( node_employee is initial ).
    endif.
    get element via lead selection
    elem_employee = node_employee->get_element( ).
    @TODO handle not set lead selection
    if ( elem_employee is initial ).
    endif.
    alternative access via index
    Elem_Employee = Node_Employee->get_Element( Index = 1 ).
    @TODO handle non existant child
    if ( Elem_Employee is initial ).
    endif.
    get single attribute
    elem_employee->get_attribute(
    exporting
    name = `USERID`
    importing
    value = item_userid ).
    select *
    from zmy_table
    into table itab
    where userid = item_userid.
    node_employee = wd_context->get_child_node( 'EMPLOYEE' ).
    node_employee->bind_elements( itab ).
    Is there someone who can help me and can tell am i doing wrong?
    Thanks in advance,
    Dheeraj

  • Selection screen in ALV output

    Hi Experts,
    My requirement is - A selection screen should pop up on the click of a button in the ALV output. Using the parameters I input on the selection screen anothor ALV should be displayed on the same page at the bottom. I'm displaying ALV using cl_gui_alv_grid.
    Thanks.
    Ajith

    Hi Nimesh,
    The requirement has slightly been updated so as to display the 2nd ALV is another screen.
    As you suggested I used the call selection screen. How ever I did not use events for the same. I called the selection screen on checking sy-ucomm in PAI.
    After I input the values in the pop up selection screen , even if I click the cancel button(at bottom) or the close button( top corner)  the execution still  follows and the second ALV is displayed.
    Please help me in this so that If I click on cancel or close the second ALV is not displayed and the control remains in the first ALV
    Thank you.
    Edited by: Ajith  Krishna on Oct 31, 2008 10:24 PM

  • Select-options and ALV

    Hi all,
    I have create a select-options with 5 fields and alv  and a button(get list) in webdynpro, i have to retrieve the values into alv from table through select-options by clicking on button.
    and i have written a function module for select options. so based on input, the values are fetched from table in function module.
    i am getting confused with the coding part, so can anybody tel me the coding part for alv by calling function module nd how to pass the values to function module(i,e select-option fields.)
    ( written code for select-options in wddoinit)
    Thanks all in advance

    Hi VANI,
    I hope you have declared the component usage for select option properly.
    Now do as follows:-
    1. Add 2  attributes in the tab 'Attribute' to implement select option for a particular field.
    Like i want to implement select option in PO_NO ( EKPO-EBELN) & ITEM_NO( EKPO-EBELP).
    Declare usage in properties in particular view:-
    Declare attributes :-  M_HANDLER_Report           - Type ref to - IF_WD_SELECT_OPTIONS
                           M_WD_SELECT_OPTIONS_Report - Type ref to - IWCI_WDR_SELECT_OPTIONS
    In WDDOINIT :-
    create instantiate component usage from code wizard.
    then set normal properties for display:-
      WD_THIS->M_WD_SELECT_OPTIONS_REPORT = WD_THIS->WD_CPIFC_SELECT_OPTION_REPORT( ).
    init the select screen
      WD_THIS->M_HANDLER_REPORT = WD_THIS->M_WD_SELECT_OPTIONS_REPORT->INIT_SELECTION_SCREEN( ).
      WD_THIS->M_HANDLER_REPORT->SET_GLOBAL_OPTIONS(
                                  I_DISPLAY_BTN_CANCEL  = ABAP_FALSE
                                  I_DISPLAY_BTN_CHECK   = ABAP_FALSE
                                  I_DISPLAY_BTN_RESET   = ABAP_FALSE
                                  I_DISPLAY_BTN_EXECUTE = ABAP_FALSE ).
    To assign a field in select option code like below:-
    create a range table that consists of this new data element
      LT_RANGE_TABLE = WD_THIS->M_HANDLER_REPORT->CREATE_RANGE_TABLE( I_TYPENAME = 'EBELN' ). " enter  the data element of the field
    add a . field to the selection
      WD_THIS->M_HANDLER_REPORT->ADD_SELECTION_FIELD( I_ID = 'EBELN'  "field name
                                                 IT_RESULT = LT_RANGE_TABLE I_READ_ONLY = READ_ONLY ).
    to add more field proceed as above again with different field.
    create a range table that consists of this new data element
      LT_RANGE_TABLE = WD_THIS->M_HANDLER_REPORT->CREATE_RANGE_TABLE( I_TYPENAME = 'EBELP' ). " enter the data element of the field
    add a . field to the selection
      WD_THIS->M_HANDLER_REPORT->ADD_SELECTION_FIELD( I_ID = 'EBELP'  "field name
                                                 IT_RESULT = LT_RANGE_TABLE I_READ_ONLY = READ_ONLY ).
    Now in particular action by which you want to get values bind to your alv table:-
    Declare variable and field symbol to hold values from selection
    DATA: RT_PO_NO TYPE REF TO DATA.
    DATA: RT_ITEM_NO TYPE REF TO DATA.
    FIELD-SYMBOLS: <FS_PO_NO> TYPE TABLE,
                   <FS_ITEM_NO> TYPE TABLE,
    Retrieve the data from the select option
    RT_PO_NO = WD_THIS->M_HANDLER_REPORT->GET_RANGE_TABLE_OF_SEL_FIELD(
               I_ID = 'EBELN' ).
    Assign it to a field symbol
    ASSIGN RT_PO_NO->* TO <FS_PO_NO>.
    Retrieve the data from the select option
    RT_ITEM_NO = WD_THIS->M_HANDLER_REPORT->GET_RANGE_TABLE_OF_SEL_FIELD(
               I_ID = 'EBELP' ).
    Now use select statement to get data from table
    Select < field name > FROM  < table name > INTO CORRESPONDING FIELDS OF TABLE < internal table to hold data > WHERE
             PO_NO IN <FS_PO_NO> AND
             ITEM_NO IN <FS_ITEM_NO> .
    Regards,
    Monishankar C

  • Modify existing rebate condition and exclusion

    Hi
    We are rebate agreements for customers. Currently I want to modify rebate condition in one of rebate agreement.
    Scenario: let us June 10th 2010 onwards, the rebate % is 3% for Profit center 'xxxx' & customer 'yyyy' instead of 1%. And 3% needs to accrued on billing docs going forward. How to set up this.
    I tried to modify existing rebate condition using VBo2 as follows: went into rebate agreement using VBo2, changed rebate % for condition record with effective from 06/11/2010 and Saved.  problem when I ran VBOF program, system posted reversal accrual for old rebate condition 1%. Old condition record validity from 01/01/2009 Valid to 12/31/2011.
    I have one more question. We want to set up rebate condition for all materials exclude some of them. we have thousands of materials for which we need to calculate rebates. but we want to exclude some materials in the rebate agreement. How to set up such exclus
    any ideas really appreciated
    thnx

    The key of your condition table (the one supporting your condition record in the agreement) is evidently Profit Center / Customer.  So for any combination of profit center and customer, you can maintain a rate and validity period. 
    You are attempting to maintain two separate records having the same key.  As you have experienced, the system does not allow it.
    The simple solution is to expire that rebate agreement and start a new one with the updated validity period and conditions.
    As for excluding certain materials, you need a more detailed key in your condition table.  Something else from the material master seems appropriateu2014Commission Group for example.  Maintain commissionable materials in group 01 and non-commissionable ones in group 02.  Then a key combination of Commission Group / Profit Center / Customer  would work well for you.
    Regards,
    Ken

  • At line selection b/w normal output and alv output in 1 report

    hi,
    i had developed a report in which its starting output is normal out put and when i click on the itemid i should  display the alv which i had developed. i dont know how to display the functionality in my report.
    plzz provide me guideliens as help will be deifnately rewarded.

    its a interactive report.
    execute this sample report.
    *& Report  Z_ALVREPORT                                                 *
    report  z_alvreport .
    tables:vbak,vbap,mara.
    type-pools: slis.
    *PARAMETERS:P_VBELN TYPE VBAK-VBELN.
    types: begin of i_vbak,
           vbeln like vbak-vbeln,
           erdat like vbak-erdat,
           erzet like vbak-erzet,
           ernam like vbak-ernam,
          LINE_COLOR(4) TYPE C,                 "ROW COLOR
           end of i_vbak.
    data: it_vbak type standard table of i_vbak initial size 0,
          wa_vbak type i_vbak.
    *DATA:wa_sort1 TYPE slis_t_sortinfo_alv.
    *TYPES:BEGIN OF I_MARA,
         MATNR LIKE MARA-MATNR,
         MTART LIKE MARA-MTART,
         END OF I_MARA.
    *DATA: IT_MARA TYPE STANDARD TABLE OF I_MARA INITIAL SIZE 0,
         WA_MARA TYPE I_MARA.
    *DATA: WA_COLOR TYPE LVC_S_SCOL.            "FOR ROW COLOR
    *DATA: IT_COLOR TYPE TABLE OF LVC_S_SCOL.
    types: begin of i_vbap,
           vbeln like vbap-vbeln,
           posnr like vbap-posnr,
           matnr like vbap-matnr,
           matwa like vbap-matwa,
           end of i_vbap.
    data: it_vbap type standard table of i_vbap initial size 0,
          wa_vbap type i_vbap .
    *variable for current report ID
    data: v_repid like sy-repid .
    *declaration for fieldcatalog
    data: i_fieldcat type slis_t_fieldcat_alv,
          wa_fieldcat type slis_fieldcat_alv.
    data: it_listheader type slis_t_listheader.
    declaration for events table where user comand or set PF status will be defined
    data: v_events type slis_t_event,
          wa_event type slis_alv_event.
    declartion for layout
    data: alv_layout type slis_layout_alv.
    declaration for variant(type of display we want)
    data: i_variant type disvariant,
          i_variant1 type disvariant,
          i_save(1) type c,
          col_pos type i.
    *Title displayed when the alv list is displayed
    data:  i_title_vbak type lvc_title value 'FIRST LIST DISPLAYED'.
    data:  i_title_vbap type lvc_title value 'SECONDRY LIST DISPLAYED'.
    initialization.
      v_repid = sy-repid.
      perform build_fieldcatlog.
    PERFORM BUILD_LAYOUT.                             "FOR COLOR
      perform event_call.
      perform populate_event.
    start-of-selection.
      perform data_retrieval.
      perform build_listheader using it_listheader.
      perform display_alv_report.
    *&      Form  BUILD_FIELDCATLOG
          Fieldcatalog has all the field details from vbak
    form build_fieldcatlog.
      wa_fieldcat-tabname = 'IT_VBAK'.
      wa_fieldcat-fieldname = 'VBELN'.
      wa_fieldcat-seltext_m = 'SALES DOCUMENT NUMBER.'.
      wa_fieldcat-hotspot = 'X'.
    WA_FIELDCAT-COL_POS = 1.
      wa_fieldcat-emphasize = 'C110'.
      wa_fieldcat-edit = 'X'.
      append wa_fieldcat to i_fieldcat.
      clear wa_fieldcat.
      wa_fieldcat-tabname = 'IT_VBAK'.
      wa_fieldcat-fieldname = 'ERDAT'.
      wa_fieldcat-seltext_m = 'DATE.'.
    WA_FIELDCAT-COL_POS = 2.
      wa_fieldcat-emphasize = 'C210'.
      wa_fieldcat-edit = 'X'.
      append wa_fieldcat to i_fieldcat.
      clear wa_fieldcat.
      wa_fieldcat-tabname = 'IT_VBAK'.
      wa_fieldcat-fieldname = 'ERZET'.
      wa_fieldcat-seltext_m = 'ENTRY TIME'.
    WA_FIELDCAT-COL_POS = 3.
      wa_fieldcat-emphasize = 'C310'.
      append wa_fieldcat to i_fieldcat.
      clear wa_fieldcat.
      wa_fieldcat-tabname = 'IT_VBAK'.
      wa_fieldcat-fieldname = 'ERNAM'.
      wa_fieldcat-seltext_m = 'NAME'.
    WA_FIELDCAT-COL_POS = 4.
      wa_fieldcat-emphasize = 'C410'.
      append wa_fieldcat to i_fieldcat.
      clear wa_fieldcat.
      wa_fieldcat-tabname = 'IT_VBAK'.
      wa_fieldcat-fieldname = 'MATNR'.
      wa_fieldcat-seltext_m = 'MATERIAL NUMBER'.
    WA_FIELDCAT-COL_POS = 4.
      wa_fieldcat-emphasize = 'C510'.
      wa_fieldcat-hotspot = 'X'.
      append wa_fieldcat to i_fieldcat.
      clear wa_fieldcat.
    endform.                    "BUILD_FIELDCATLOG
    *form build_layout
    *FORM BUILD_LAYOUT.
    *ALV_LAYOUT-INFO_FIELDNAME = 'LINE_COLOR'.
    *ENDFORM. "END BUILD_LAYOUT.
    *&      Form  EVENT_CALL
      we get all events - TOP OF PAGE or USER COMMAND in table v_events
    form event_call.
      call function 'REUSE_ALV_EVENTS_GET'
       exporting
         i_list_type           = 0
       importing
         et_events             = v_events
    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.
    endform.                    "EVENT_CALL
    *&      Form  POPULATE_EVENT
         Events populated for TOP OF PAGE & USER COMAND
    form populate_event.
      read table v_events into wa_event with key name = 'TOP_OF_PAGE'.
      if sy-subrc eq 0.
        wa_event-form = 'TOP_OF_PAGE'.
        modify v_events from wa_event transporting form where name =
    wa_event-form.
      endif.
      read table v_events into wa_event with key name = 'USER_COMMAND'.
      if sy-subrc eq 0.
        wa_event-form = 'USER_COMMAND'.
        modify v_events from wa_event transporting form where name =
    wa_event-name.
      endif.
    endform.                    "POPULATE_EVENT
    *&      Form  data_retrieval
      retreiving values from the database table vbak
    form data_retrieval.
    *DATA:ID_COLOR(1) TYPE C.
      select vbeln erdat erzet ernam from vbak into table it_vbak .
    SELECT MATNR FROM MARA INTO TABLE IT_MARA.
    LOOP AT IT_VBAK INTO WA_VBAK.
       WA_VBAK-LINE_COLOR = 'C410'.
       ID_COLOR = ID_COLOR + 1.
    IF ID_COLOR = 7.
        ID_COLOR = 1.
    ENDIF.
    CONCATENATE 'C' ID_COLOR '10' INTO WA_VBAK-LINE_COLOR.
    MODIFY IT_VBAK FROM WA_VBAK.
    ENDLOOP.
    endform.                    "data_retrieval
    *&      Form  bUild_listheader
          text
         -->I_LISTHEADEtext
    form build_listheader using i_listheader type slis_t_listheader.
      data hline type slis_listheader.
      hline-info = 'THIS IS INTERACTIVE ALV'.
      hline-typ = 'H'.
    endform.                    "build_listheader
    *&      Form  Status
      using the PF-Status enable the SAVE, UPDATE, BACK, CANCEL and EXIT
      button and give some OKCODE has been give to each of these Button
      and this is handled in USER_COMMAND
    form status using p_extab type slis_t_extab.
    *----PF Status -
      set pf-status 'STATUS'.
    endform.                    " status
    *&      Form  display_alv_report
          text
    form display_alv_report.
      v_repid = sy-repid.
      call function 'REUSE_ALV_GRID_DISPLAY'
       exporting
         i_callback_program                = v_repid
         i_callback_pf_status_set          = 'STATUS'
         i_callback_user_command           = 'USER_COMMAND'
         i_callback_top_of_page            = 'TOP_OF_PAGE'
         i_grid_title                      = i_title_vbak
      I_GRID_SETTINGS                   =
         is_layout                         = alv_layout
         it_fieldcat                       = i_fieldcat[]
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
      IT_SORT                           = wa_sort1
      IT_FILTER                         =
      IS_SEL_HIDE                       =
        i_default                         = 'ZLAY1'
         i_save                            = 'A'
        is_variant                        = i_variant
         it_events                         = v_events
        tables
          t_outtab                          = it_vbak
    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_alv_report
    *&      Form  TOP_OF_PAGE
          text
    form top_of_page.
      call function 'REUSE_ALV_COMMENTARY_WRITE'
        exporting
          it_list_commentary       = it_listheader
          i_logo                   = 'ENJOYSAP_LOGO'
       I_END_OF_LIST_GRID       =  'TOP_OF_PAGE'.
    endform.                    "TOP_OF_PAGE
    *&      Form  USER_COMMAND
    form user_command using r_ucomm like sy-ucomm
    rs_selfield type slis_selfield.
      case r_ucomm.
        when '&IC1'.
        if rs_selfield-fieldname = 'VBELN'.
          read table it_vbak into wa_vbak index rs_selfield-tabindex.
          refresh i_fieldcat.
          perform build_fieldcatlog_vbap.
          perform event_call_vbap.
          perform populate_event_vbap.
          perform data_retrieval_vbap.
          perform build_listheader using it_listheader.
          perform display_alv_vbap.
        elseif rs_selfield-fieldname = 'MATNR'.
          set parameter id 'MAT' field mara-matnr.
          call transaction 'ZCHANG' and skip first screen.
        endif.
        when 'SAVE'.
        loop at it_vbak into wa_vbak.
        modify it_vbak from wa_vbak.
        endloop.
        endcase.
    endform.                    "user_command
    *&      Form  BUILD_FIELDCATLOG_VBAP
          text
    form build_fieldcatlog_vbap.
      wa_fieldcat-tabname = 'IT_VBAP'.
      wa_fieldcat-fieldname = 'VBELN'.
      wa_fieldcat-seltext_m = 'SALES DNO.'.
      wa_fieldcat-emphasize = 'C110'.
      append wa_fieldcat to i_fieldcat.
      clear wa_fieldcat.
      wa_fieldcat-tabname = 'IT_VBAP'.
      wa_fieldcat-fieldname = 'POSNR'.
      wa_fieldcat-seltext_m = 'ITEM'.
      wa_fieldcat-emphasize = 'C210'.
      append wa_fieldcat to i_fieldcat.
      clear wa_fieldcat.
      wa_fieldcat-tabname = 'IT_VBAP'.
      wa_fieldcat-fieldname = 'MATNR'.
      wa_fieldcat-seltext_m = 'MATERIAL NO.'.
      wa_fieldcat-emphasize = 'C310'.
      wa_fieldcat-edit = 'X'.
      append wa_fieldcat to i_fieldcat.
      clear wa_fieldcat.
    wa_fieldcat-tabname = 'IT_VBAP'.
      wa_fieldcat-fieldname = 'MATWA'.
      wa_fieldcat-seltext_m = 'MATERIAL'.
      wa_fieldcat-emphasize = 'C410'.
      wa_fieldcat-edit = 'X'.
      append wa_fieldcat to i_fieldcat.
      clear wa_fieldcat.
    endform.                    "BUILD_FIELDCATLOG_VBAP
    *&      Form  event_call_vbap
      we get all events - TOP OF PAGE or USER COMMAND in table v_events
    form event_call_vbap.
      call function 'REUSE_ALV_EVENTS_GET'
       exporting
         i_list_type           = 0
       importing
         et_events             = v_events
    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.
    endform.                    "event_call_VBAP
    *&      Form  POPULATE_EVENT
           Events populated for TOP OF PAGE & USER COMAND
    form populate_event_vbap.
      read table v_events into wa_event with key name = 'TOP_OF_PAGE'.
      if sy-subrc eq 0.
        wa_event-form = 'TOP_OF_PAGE'.
        modify v_events from wa_event transporting form where name = wa_event-form.
      endif.
      endform.                    "POPULATE_EVENT
    *&      Form  TOP_OF_PAGE
          text
    form f_top_of_page.
      call function 'REUSE_ALV_COMMENTARY_WRITE'
        exporting
          it_list_commentary       = it_listheader
       i_logo                   =
       I_END_OF_LIST_GRID       =
    endform.                    "TOP_OF_PAGE
    *&      Form  USER_COMMAND
    *retreiving values from the database table VBAP
    form data_retrieval_vbap.
    select vbeln posnr matnr matwa from vbap into table it_vbap.          " WHERE VBELN = P_VBELN.
    endform.
    form build_listheader_vbap using i_listheader type slis_t_listheader.
    data: hline1 type slis_listheader.
    hline1-typ = 'H'.
    hline1-info = 'CHECKING PGM'.
    endform.
    form display_alv_vbap.
    call function 'REUSE_ALV_GRID_DISPLAY'
    exporting
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                = ' '
      I_BUFFER_ACTIVE                   = ' '
       i_callback_program                = v_repid
      i_callback_pf_status_set          = 'GUI_STAT'
      I_CALLBACK_USER_COMMAND           = 'F_USER_COMMAND'
       i_callback_top_of_page            = 'TOP_OF_PAGE'
      I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  =
      I_BACKGROUND_ID                   = ' '
       i_grid_title                      = i_title_vbap
      I_GRID_SETTINGS                   =
      IS_LAYOUT                         = ALV_LAYOUT
       it_fieldcat                       = i_fieldcat[]
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
      IT_SORT                           =
      IT_FILTER                         =
      IS_SEL_HIDE                       =
      I_DEFAULT                         =
       i_save                            = 'A'
      IS_VARIANT                        =
       it_events                         = v_events
      tables
        t_outtab                          = it_vbap
    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.

  • Adding field in selection sreen and display output

    Hi,
    i got an requirement that to add a field in selection screen i have done that but abgru is reason for rejection if u give in selection screen that reason for rej : Z5 it should come only Z5 related sales orders only but here all the sales orders are displaying ,can any one check this code and correct it ans send me plz.
    select-options: s_abgru for vbap-abgru.
    DATA:  lv_vbtyp LIKE vbak-vbtyp,
             lv_bsark LIKE vbak-bsark,
             lv_matnr LIKE vbap-matnr,
             lv_abgru LIKE vbap-abgru.---->reason for rej
      IF NOT s_abgru IS INITIAL.
        SELECT SINGLE abgru INTO lv_abgru FROM vbap WHERE abgru IN s_abgru.
        IF sy-subrc NE 0.
          MESSAGE e000 WITH 'Invalid Reason for Rejection '.
        ENDIF.
      ENDIF.
    i have written this above code .plz correct it and send me /
    Thanks in advance,

    Hi
    You need to use the field in your select statement in the where condition.
    like
    REPORT  ytest.
    TABLES: vbak, vbap.
    TYPES: BEGIN OF ty_itab,
           vbtyp TYPE vbtyp,
           bsark TYPE bsark,
           matnr TYPE matnr_d,
           END OF ty_itab.
    DATA: itab TYPE STANDARD TABLE OF ty_itab WITH HEADER LINE.
    SELECT-OPTIONS: s_augru FOR vbak-augru.
    START-OF-SELECTION.
      SELECT k~vbtyp
             k~bsark
             p~matnr
             INTO TABLE itab
             FROM vbak AS k INNER JOIN
                  vbap AS p ON
                  kvbeln = pvbeln
             WHERE augru IN s_augru.
    Regards
    Raj

  • PF status of Selection screen and ALV Grid

    Hi,
    I need to create a report where on clicking the<b> 'ENTER'</b> key on application toolbar   on the <b>selection-screen</b> the processing logic should get  executed ( instead of clicking execute  pushbutton).
    For this i need to capture the function code associated with ENTER key on selection screen. How can i find this?
    Also , on clicking enter i have to display <b>an ALV grid</b> with the <b>SAVE</b> key activated on the toolbar.How can i activate SAVE key on application toolbar of ALV GRID. (<b>Selection-screen should not have save key</b> )
    thanks,
    vartika

    Hi
    you can just copy the alv standard pf status  into your alv.
    goto se41.
    enter "SAPLSLVC_FULLSCREEN"
    then copy the standard pf status " STANDARD_FULLSCREEN" to your program "xyz".
    in your prog, when you call the alv grid,
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                = ' '
      I_BUFFER_ACTIVE                   = ' '
        i_callback_program                = l_v_repid
        i_callback_pf_status_set         = 'SET_PF_STATUS'  <----
        i_callback_user_command           = 'USER_COMMAND'
        i_callback_top_of_page            = 'ALV_TOP_OF_PAGE'
      I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
    tHEN CPOY PASTE THIS CODE:
    NOTE:  No need to make a perform for this....
    *       FORM SET_PF_STATUS                                         *
    FORM set_pf_status USING rt_extab TYPE slis_t_extab.
      SET PF-STATUS '/FIR/RRF2S0BG_ALV'.
      "Copy of standard pf_status from
    ENDFORM.                    "set_pf_status
    Now can see the full tool bar enabled in your alv grid.
    delete all the unwanted buttons from your programs pf status .
    Hope that helps.
    Cheers
    Ravish Garg.
    <i>
    Reward if useful</i>

  • Chart for representing multiple inputs (conditions) and one output

    Hello everyone,
    I am using Microsoft Excel 2010.
    I have a list of sells. Each sell amount can be only one from the following range $25, $30, $50, $40, $75, $85, $100 and number of clients can be any number between 0 and 500 in each month. We assume each client will buy the services at least once a year or
    at most once a month. A sales representative will make 10% profit out of these sells.
    What type of chart representation can best show the minimum and maximum profits per month during a year for a sales rep.?
    Any help is appreciated in advance.
    Thanks

    Hello Ring Gee.
    Thanks for reply,
    Suppose you are working for a company, consider the followings at the end of the first month. They will pay you 10% commission if you sell the telephone services to 100 people. You will continue to receive this amount of commission for 12 months. If you
    sell the telephone services to 300 people your commission rate will be 14% and they will pay you this commission for 20 months. This means in the first case you will receive $3000 to $12000  (varies by sell's amount) and if you sell the services to 600
    clients you will receive between $96000 and $384000 (varies by sell's amount). 
    This way, life time and rate of your commission will increase if you increase the number of sells. 
    Is it clear enough? 
    I want to visualize this scenario using the chart that covers all conditions. There was no option to upload the actual excel file, so I took a picture of it. Look at the image bellow please: 

  • To get selected rows from alv output which is prepared with funciton module

    Hi ,
    I have a program which is prepared ALV with funciton modules.
    Now i have to get selected rows(more than one).
    Can i use method CL_GUI_ALV_GRID -> get_selected_rows.
    or any other way to get selected rows.
    thanks,
    shyla

    Under the callback subroutine ( u have passed them in I_CALLBACK_USER_COMMAND of ur function module) - u do like this -
    DATA : ref1 TYPE REF TO cl_gui_alv_grid,
               t_selcted_rows type LVC_T_ROID.
    CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
    IMPORTING e_grid = ref1.
    call method ref1->get_selected_rows
    importing ET_ROW_NO = t_selected_rows.
    Hope this solves ur problem.

  • Select -options (fields as mandatory) and alv

    Hi all,
    i have 5 fields in select options and alv table , based on selection criteria values will display in alv table. now i want to make 2 fields as mandatory in select-options. without entering values in those two fields it should not allow the values to display iin alv table , it should rise a message..
    (i have not created node for select-options ,i have directly used data type in wddoinit for select-options and for alv table i have created node)
    thanks all

    Hi,
    In wddoinit while creating select options by ADD_SELECTION_FIELD method ,it has a parameter called I_OBLIGATORY. Set it as X and thus the field becomes mandatory.
    Regards
    Karthiheyan M

  • Download only selected record from ALV

    Hi
      I want to download only selected records from ALV output with button.
    i hav to fix the button on ALV screen using &ZDL whenever user presses the button record should be downloaded.
    Pl with coding
    its very very urgent.

    Hi ,
    i dont have the exact code which suits to your requirement
    but declare the internal table
    like
    data: begin of itab occurs 0,
      check type c,
    fields
    end of itab.
    while filling the field catalog
    fieldcatalog-checkbox = 'X'
    for this check field.
    and display the grid
    now write this subroutine
    *&      Form  USER_COMMAND
          Called from within the ALV processes. Currently, '&IC1' is used
          to process the hotspot and display the document 'picked' by the
          user.
          PV_UCOMM    contains the sy-ucomm from ALV
          SELFIELD is a structure that contains all the data required to
                   process a user selection. The following is an example
                   of the SELFIELD structure and sample values:
    FORM USER_COMMAND USING PV_UCOMM LIKE SY-UCOMM
                            SELFIELD TYPE SLIS_SELFIELD.
      CASE PV_UCOMM.
        WHEN '&IC1'.
          loop at itab where check = 'X'.
    append all these records to another internal table itab1
         endloop.
    call function gui_download.
    pass the internal table itab1 in the tables statement
    and also you have to give the file path that may be static or dynamic
    if dynamic you have to call the function module
    f4_filename
    and get the filename and pass the same value to gui_download
    that will be download to the above said path
    endcase.
    end form.
    reward points if helpful,
    thanks & regards,
    venkatesh

  • Initial ALV output display

    Hello,
    I have one query witl regards to ALV output. After entering data in the selection screnn my ALV output gets displayed and there is no issue with it. The ALV is in display mode and if i click on the change button the ALV becomes editable. So fat it is fine.
    The area  of concern is the initial ALV output even though it is  in display mode  looks as if it is editable ALV.  On click of the change button, then the ALV is shown in display mode and it is easily identifiable.
    The user feels the initial ALV output is confusing and that he is not able to recognize whether it is display/editbale ALV. How can we fix it so that client can identify it?
    Also, how do we get all the standard ALV buttons that we get in SE38 output in webdynpro? Please help.
    Regards,
    Vaishnavi

    Hi,
    init your ALV settings with:
    DATA lr_alv_cfg TYPE ref to cl_salv_wd_config_table.
    lo_INTERFACECONTROLLER =   wd_this->wd_cpifc_alv_table( ).
    lr_alv_cfg = lo_interfacecontroller->get_model( ).
    lr_alv_cfg->IF_SALV_WD_TABLE_SETTINGS~SET_READ_ONLY( abap_true ).
    If you click change button do this:
    is_read_only = lr_alv_cfg->IF_SALV_WD_TABLE_SETTINGS~GET_READ_ONLY( ).
    if lv_is_read_only = abap_true.
        lr_alv_cfg->IF_SALV_WD_TABLE_SETTINGS~SET_READ_ONLY( abap_false ).
    else.
        lr_alv_cfg->IF_SALV_WD_TABLE_SETTINGS~SET_READ_ONLY( abap_true ).
    endif.

Maybe you are looking for

  • Test Portal  upgrade from 10.1.2.0.2 to 10.1.4.2 and then Portal 11g

    Is there any easy method to recreate production like envionment and test upgrade process. I have read Staging of test envionment http://download.oracle.com/docs/cd/B14099_19/core.1012/b13995/prodtest.htm#BHAHIHBH from production and it involves OID,P

  • Popup to query results

    Hi guys, I ve got a small question: In one of my pages, i ve got a query. Is it possible to create a pop up window to that query, so that when the user clicks on the detail in my query results(e.g in the column 'Name' the user clicks on some name ('T

  • New itunes 10.2.1.1  64 bit JAMS CPU Windows 7

    The new iTunes jams my CPU on a regular basis, have tried complete uninstall and reinstall twice, but no improvement. Any ideas?

  • Please help nokia 5130c-2

    i just get nokia 5130c-2 but,i need restriction code,my imei is ,please if anyone can help me "Personal details removed by a moderator. We kindly ask you not to share your personal contact details or your phone's IMEI number publicly on this forum."

  • How to go to Camera Raw from Lightroom

    Using Photoshop/Lightroom CC - Windows 7 Is there some way to open an image in Camera Raw directly from Lightroom? Thanks, RzzB