Regarding check boxes

Hi,
       could u plz clearly explain with syntex
      in selcction screen i have two check boxes,
      when i am selection one check box i want to selectc specified selection screen only ,
       when i selected second checkbox i need to select specific selection screen only,

HI ,
Try with this code u can understand easily.
SELECTION-SCREEN BEGIN OF BLOCK 1 WITH FRAME TITLE text-007.
PARAMETER:p_radio RADIOBUTTON GROUP gr1 USER-COMMAND scr11,
p_radio2 RADIOBUTTON GROUP gr1,
p_radio3 RADIOBUTTON GROUP gr1 DEFAULT 'X'.
SELECTION-SCREEN END OF BLOCK 1.
SELECTION-SCREEN BEGIN OF BLOCK 2 WITH FRAME TITLE text-001.
PARAMETER: p_file1 LIKE rlgrap-filename MODIF ID mm1.
SELECTION-SCREEN END OF BLOCK 2.
SELECTION-SCREEN BEGIN OF BLOCK 3 WITH FRAME TITLE text-001.
PARAMETER: p_file2 LIKE rlgrap-filename MODIF ID mm2.
SELECTION-SCREEN END OF BLOCK 3.
SELECTION-SCREEN BEGIN OF BLOCK 4 WITH FRAME TITLE text-001.
PARAMETER: p_file3 LIKE rlgrap-filename MODIF ID mm3.
PARAMETER: p_file4 LIKE rlgrap-filename MODIF ID mm3.
SELECTION-SCREEN END OF BLOCK 4.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF p_radio IS NOT INITIAL.
IF screen-group1 = 'MM2' OR screen-group1 = 'MM3'.
IF screen-name = 'P_FILE2' OR screen-name = 'P_FILE3' OR screen-name = 'P_FILE4' .
screen-active = 0.
screen-input = 0.
screen-invisible = 1.
ENDIF.
screen-active = 0.
screen-input = 0.
screen-invisible = 1.
ENDIF.
ENDIF.
IF p_radio2 IS NOT INITIAL.
IF screen-group1 = 'MM1' OR screen-group1 = 'MM3'.
IF screen-name = 'P_FILE1' OR screen-name = 'P_FILE3' OR screen-name = 'P_FILE4' .
screen-active = 0.
screen-input = 0.
screen-invisible = 1.
ENDIF.
screen-active = 0.
screen-input = 0.
screen-invisible = 1.
ENDIF.
ENDIF.
IF p_radio3 IS NOT INITIAL.
IF screen-group1 = 'MM1' OR screen-group1 = 'MM2'.
IF screen-name = 'P_FILE1' OR screen-name = 'P_FILE2'.
screen-active = 0.
screen-input = 0.
screen-invisible = 1.
ENDIF.
screen-active = 0.
screen-input = 0.
screen-invisible = 1.
ENDIF.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
here instead of radio buttons u have to use check boxes.
Thanks,CSR.
***PLease Reward if helpful

Similar Messages

  • Regard check box concept in alv grid display

    HI Friends,
            i am displaying the sales order details with check box. so my first field is checkbox. When user click on check box then he press the details icon.
            my question i need a logic for calling the tcode based on the vbeln when it is cheked.
            thanks in advance.
    Regards,
    Purna.

    hi,
    go through this program
    program bcalv_edit_05.
    Purpose:
    ~~~~~~~~
    This example shows how to use checkboxes within an ALV Grid Control.
    You learn:
    o how to define a column for editable checkboxes for an attribute
       of your list (see also remark below)
    o how to evaluate the checked checkboxes
    o how to switch between editable and non-editable checkboxes
    Important Remark
    ~~~~~~~~~~~~~~~~
    The checkbox functionality has been replaced by selection buttons
    in front of each row (field SEL_MODE of the layout structure
    set to 'A' or 'D'; when using the editable ALV Grid Control,
    these selection buttons are always visible).
    Class methods like GET_SELECTED_ROWS work only for this new
    functionality and not for checkboxes.
    Thus checkboxes should not be used for line selection but for
    a column as an additional or for an already existing attribute
    (like field SMOKER in SBOOK).
    To check program behavior
    ~~~~~~~~~~~~~~~~~~~~~~~~~
    Try out the functions displayed in the application toolbar:
    o The first sets all checked lines to initial values.
      (see form reset_selected_entries)
    o The seconds marks all checkboxes that are input enabled
    o The third unmarks all checkboxes that are input enabled
    o To try the forth, you have to select a line first using
      the selection buttons on the left.
      The function deactivates/activates a checkbox.
    Checkboxes may be locked/unlocked using a double click on the
    checkbox cell.
    Essential steps (search for '§')
    ~~~~~~~~~~~~~~~
    This example focusses on two aspects of checkboxes in an
    editable ALV Grid Control:
    A How to integrate, set, reset and evaluate checkboxes
    B What you must do to lock particular checkboxes against input
    A) Integrate, set, reset and evaluate checkboxes
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    A1.Extend your output table by a checkbox field.
    A2.Add an entry for the checkbox in the fieldcatalog
    A3.Optionally, check checkboxes initially after selecting data.
    A4.Before you (a)set, (b)reset, (c)(de)activate or
       (d)evaluate checkboxes, you must check the input cells.
    B) Lock particular checkboxes against input
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    B1.Extend your output table by a field to dis- or enable
        cells for input.
    B2.After selecting data,
        assign a style for each row of your checkbox column.
    B3.Use the layout structure to aquaint additional field to ALV.
    B4.Switch the style to dis- or enable a cell for input
    class lcl_event_receiver definition deferred.  "for event handling
    data: ok_code like sy-ucomm,
          save_ok like sy-ucomm,
          g_container type scrfname value 'BCALV_GRID_DEMO_0100_CONT1',
          g_grid  type ref to cl_gui_alv_grid,
          g_custom_container type ref to cl_gui_custom_container,
          g_event_receiver type ref to lcl_event_receiver,
          gt_fieldcat type lvc_t_fcat,
          gs_layout type lvc_s_layo,
          g_max type i value 100.
    *§A1.Extend your output table by a checkbox field.
        If you do not want to lock sole checkboxes against input
        you do not need field 'celltab'.
    types: begin of gs_outtab.
    types: checkbox type c.                "field for checkbox
    §B1.Extend your output table by a field to dis- or enable
        cells for input.
    types: celltab type lvc_t_styl.        "field to switch editability
            include structure sflight.
    types: end of gs_outtab.
    data: gt_outtab type gs_outtab occurs 0 with header line.
    LOCAL CLASSES
    This local class only handles event DOUBLE_CLICK.
    Wenn the user double clicks on a checkbox cell the status of
    this cell is switched from editable to not editable and vice versa.
    class lcl_event_receiver definition.
    public section.
    methods: catch_doubleclick
             for event double_click of cl_gui_alv_grid
             importing
                e_column
                es_row_no
                sender.
    endclass.
    class lcl_event_receiver implementation.
    method catch_doubleclick.
      data: ls_outtab type gs_outtab,
            ls_celltab type lvc_s_styl.
    Function:
    Switch between 'editable' and 'not editable' checkbox.
    If the user clicked on another column there is
    nothing to do.
      if e_column-fieldname ne 'CHECKBOX'.
        exit.
      endif.
      read table gt_outtab into ls_outtab index es_row_no-row_id.
    The loop is only needed if there are other columns that
    use checkboxes. At this point the loop could be
    replaced by a READ of the first line of CELLTAB.
          loop at ls_outtab-celltab into ls_celltab.
            if ls_celltab-fieldname eq 'CHECKBOX'.
    §B4.Switch the style to dis- or enable a cell for input
             if ls_celltab-style = cl_gui_alv_grid=>mc_style_enabled.
              ls_celltab-style = cl_gui_alv_grid=>mc_style_disabled.
             else.
              ls_celltab-style = cl_gui_alv_grid=>mc_style_enabled.
             endif.
             modify ls_outtab-celltab from ls_celltab.
            endif.
          endloop.
          modify gt_outtab from ls_outtab index es_row_no-row_id.
        call method sender->refresh_table_display.
    endmethod.
    endclass.
          MAIN                                                          *
    end-of-selection.
      call screen 100.
          MODULE PBO OUTPUT                                             *
    module pbo output.
      set pf-status 'MAIN100'.
      set titlebar 'MAIN100'.
      if g_custom_container is initial.
        perform create_and_init_alv.
      endif.
    endmodule.
          MODULE PAI INPUT                                              *
    module pai input.
      save_ok = ok_code.
      clear ok_code.
      case save_ok.
        when 'EXIT'.
          perform exit_program.
        when 'SELECT'.
          perform select_all_entries changing gt_outtab[].
        when 'DESELECT'.
          perform deselect_all_entries changing gt_outtab[].
        when 'RESET'.
          perform reset_selected_entries changing gt_outtab[].
        when 'SWITCH'.
          perform switch_activation changing gt_outtab[].
      endcase.
    endmodule.
          FORM EXIT_PROGRAM                                             *
    form exit_program.
      leave program.
    endform.
    *&      Form  BUILD_FIELDCAT
          text
         <--P_GT_FIELDCAT  text
    form build_fieldcat changing pt_fieldcat type lvc_t_fcat.
      data ls_fcat type lvc_s_fcat.
      call function 'LVC_FIELDCATALOG_MERGE'
           exporting
                i_structure_name = 'SFLIGHT'
           changing
                ct_fieldcat      = pt_fieldcat.
    *§A2.Add an entry for the checkbox in the fieldcatalog
      clear ls_fcat.
      ls_fcat-fieldname = 'CHECKBOX'.
    Essential: declare field as checkbox and
               mark it as editable field:
      ls_fcat-checkbox = 'X'.
      ls_fcat-edit = 'X'.
    do not forget to provide texts for this extra field
      ls_fcat-coltext = text-f01.
      ls_fcat-tooltip = text-f02.
      ls_fcat-seltext = text-f03.
    optional: set column width
      ls_fcat-outputlen = 10.
      append ls_fcat to pt_fieldcat.
    endform.
    *&      Form  CREATE_AND_INIT_ALV
          text
         <--P_GT_OUTTAB  text
         <--P_GT_FIELDCAT  text
         <--P_GS_LAYOUT  text
    form create_and_init_alv.
      data: lt_exclude type ui_functions.
      create object g_custom_container
             exporting container_name = g_container.
      create object g_grid
             exporting i_parent = g_custom_container.
      perform build_fieldcat changing gt_fieldcat.
    Exclude all edit functions in this example since we do not need them:
      perform exclude_tb_functions changing lt_exclude.
      perform build_data.
    *§ B3.Use the layout structure to aquaint additional field to ALV.
      gs_layout-stylefname = 'CELLTAB'.
      call method g_grid->set_table_for_first_display
           exporting is_layout             = gs_layout
                     it_toolbar_excluding  = lt_exclude
           changing  it_fieldcatalog       = gt_fieldcat
                     it_outtab             = gt_outtab[].
      create object g_event_receiver.
      set handler g_event_receiver->catch_doubleclick for g_grid.
    Set editable cells to ready for input initially
      call method g_grid->set_ready_for_input
       exporting
        i_ready_for_input = 1.
    endform.                               "CREATE_AND_INIT_ALV
    *&      Form  EXCLUDE_TB_FUNCTIONS
          text
         <--P_LT_EXCLUDE  text
    form exclude_tb_functions changing pt_exclude type ui_functions.
      data ls_exclude type ui_func.
      ls_exclude = cl_gui_alv_grid=>mc_fc_loc_copy_row.
      append ls_exclude to pt_exclude.
      ls_exclude = cl_gui_alv_grid=>mc_fc_loc_delete_row.
      append ls_exclude to pt_exclude.
      ls_exclude = cl_gui_alv_grid=>mc_fc_loc_append_row.
      append ls_exclude to pt_exclude.
      ls_exclude = cl_gui_alv_grid=>mc_fc_loc_insert_row.
      append ls_exclude to pt_exclude.
      ls_exclude = cl_gui_alv_grid=>mc_fc_loc_move_row.
      append ls_exclude to pt_exclude.
      ls_exclude = cl_gui_alv_grid=>mc_fc_loc_copy.
      append ls_exclude to pt_exclude.
      ls_exclude = cl_gui_alv_grid=>mc_fc_loc_cut.
      append ls_exclude to pt_exclude.
      ls_exclude = cl_gui_alv_grid=>mc_fc_loc_paste.
      append ls_exclude to pt_exclude.
      ls_exclude = cl_gui_alv_grid=>mc_fc_loc_paste_new_row.
      append ls_exclude to pt_exclude.
      ls_exclude = cl_gui_alv_grid=>mc_fc_loc_undo.
      append ls_exclude to pt_exclude.
    endform.                               " EXCLUDE_TB_FUNCTIONS
    *&      Form  build_data
          text
    -->  p1        text
    <--  p2        text
    form build_data.
      data: lt_sflight type table of sflight,
            ls_sflight type sflight,
            ls_celltab type lvc_s_styl,
            lt_celltab type lvc_t_styl,
            l_index type i.
      select * from sflight into table lt_sflight up to g_max rows.
      if sy-subrc ne 0.
    generate own entries if db-table is empty so that this example
    still works
        perform generate_entries changing lt_sflight.
      endif.
    *§A3.Optionally, check checkboxes initially after selecting data.
    (Omitted in this example)
      loop at lt_sflight into ls_sflight.
        move-corresponding ls_sflight to gt_outtab.
      if gt_outtab-connid eq '400'.
        gt_outtab-checkbox = 'X'.
      endif.
        append gt_outtab.
      endloop.
    §B2.After selecting data,
       assign a style for each row of your checkbox column.
    Initially, set all checkbox cells editable.
      ls_celltab-fieldname = 'CHECKBOX'.
      ls_celltab-style = cl_gui_alv_grid=>mc_style_enabled.
      loop at gt_outtab.
        l_index = sy-tabix.
        refresh lt_celltab.
        ls_celltab-fieldname = 'CHECKBOX'.
        ls_celltab-style = cl_gui_alv_grid=>mc_style_enabled.
        insert ls_celltab into table lt_celltab.
        insert lines of lt_celltab into table gt_outtab-celltab.
        modify gt_outtab index l_index.
      endloop.
    endform.                               " build_data
    *&      Form  generate_entries
          text
         <--P_LT_SLFIGHT  text
    form generate_entries changing pt_slfight type standard table.
    This form is only needed for the case that there is no
    data in database table SFLIGHT.
      data: ls_sflight type sflight,
            l_month(2) type c,
            l_day(2) type c,
            l_date(8) type c.
      ls_sflight-carrid = 'LH'.
      ls_sflight-connid = '0400'.
      ls_sflight-currency = 'DEM'.
      ls_sflight-planetype = '747-400'.
      ls_sflight-seatsmax = 660.
      do 110 times.
        ls_sflight-price = sy-index * 100.
        ls_sflight-seatsocc = 660 - sy-index * 6.
        ls_sflight-paymentsum = ls_sflight-seatsocc * ls_sflight-price.
        l_month = sy-index / 10 + 1.
        do 2 times.
          l_day = l_month + sy-index * 2.
          l_date+0(4) = '2000'.
          l_date4(2) = l_month0(2).
          l_date6(2) = l_day0(2).
          ls_sflight-fldate = l_date.
          append ls_sflight to pt_slfight.
        enddo.
      enddo.
    endform.                               " generate_entries
    *&      Form  select_all_entries
          text
         <--P_GT_OUTTAB  text
    form select_all_entries changing pt_outtab type standard table.
      data: ls_outtab type gs_outtab.
      data: l_valid type c,
            l_locked type c.
    *§A4ad. Before you (a)set, reset or (d)evaluate checkboxes,
          you must check the input cells.
    If all entries are ok, ALV transferes new values to the output
    table which you then can modify.
      call method g_grid->check_changed_data
                  importing
                     e_valid = l_valid.
      if l_valid eq 'X'.
        loop at pt_outtab into ls_outtab.
          perform check_lock using    ls_outtab
                             changing l_locked.
          if l_locked is initial
             and not ls_outtab-checkbox eq '-'.
            ls_outtab-checkbox = 'X'.
          endif.
          modify pt_outtab from ls_outtab.
        endloop.
        call method g_grid->refresh_table_display.
      endif.
    endform.                               " select_all_entries
    *&      Form  deselect_all_entries
          text
         <--P_GT_OUTTAB[]  text
    form deselect_all_entries changing pt_outtab type standard table.
      data: ls_outtab type gs_outtab.
      data: l_valid type c,
            l_locked type c.
    *§A4ad. Before you (a)set, reset or (d)evaluate checkboxes,
          you must check the input cells.
    If all entries are ok, ALV transferes new values to the output
    table which you then can modify.
      call method g_grid->check_changed_data
                  importing
                     e_valid = l_valid.
      if l_valid eq 'X'.
        loop at pt_outtab into ls_outtab.
          perform check_lock using    ls_outtab
                           changing l_locked.
          if l_locked is initial
             and not ls_outtab-checkbox eq '-'.
            ls_outtab-checkbox = ' '.
          endif.
          modify pt_outtab from ls_outtab.
        endloop.
        call method g_grid->refresh_table_display.
      endif.
    endform.                               " deselect_all_entries
    *&      Form  reset_selected_entries
          text
         <--P_GT_OUTTAB[]  text
    form reset_selected_entries changing pt_outtab type standard table.
      data: ls_outtab type gs_outtab.
      data: l_valid type c.
    *§A4b. Before you set, (b)reset or evaluate checkboxes,
         you must check the input cells.
    If all entries are ok, ALV transferes new values to the output
    table which you then can modify.
      call method g_grid->check_changed_data
                  importing
                     e_valid = l_valid.
      if l_valid eq 'X'.
        loop at pt_outtab into ls_outtab.
          if     not ls_outtab-checkbox is initial
             and not ls_outtab-checkbox eq '-'.
            clear ls_outtab.
            modify pt_outtab from ls_outtab.
          endif.
        endloop.
        call method g_grid->refresh_table_display.
      endif.
    endform.                               " reset_selected_entries
    form switch_activation changing pt_outtab type standard table.
      data: ls_outtab type gs_outtab.
      data: l_valid type c,
            lt_row_no type lvc_t_roid with header line.
    *§A4c. Before you set, reset, (c)(de)activate
         or evaluate checkboxes, you must check the input cells.
    If all entries are ok, ALV transferes new values to the output
    table which you then can modify.
      call method g_grid->check_changed_data
                  importing
                     e_valid = l_valid.
      if l_valid eq 'X'.
        call method g_grid->get_selected_rows
          importing
             et_row_no     = lt_row_no[].
        loop at lt_row_no.
           read table pt_outtab into ls_outtab index lt_row_no-row_id.
           if ls_outtab-checkbox ne '-'.
             ls_outtab-checkbox = '-'.
           else.
             ls_outtab-checkbox = ' '.
           endif.
           modify pt_outtab from ls_outtab index lt_row_no-row_id.
        endloop.
        call method g_grid->refresh_table_display.
      endif.
    endform.                               " switch_activation
    *&      Form  check_lock
          text
         -->P_LS_OUTTAB  text
         <--P_L_LOCKED  text
    form check_lock using    ps_outtab type gs_outtab
                    changing p_locked.
      data ls_celltab type lvc_s_styl.
      loop at ps_outtab-celltab into ls_celltab.
        if ls_celltab-fieldname = 'CHECKBOX'.
          if ls_celltab-style eq cl_gui_alv_grid=>mc_style_disabled.
            p_locked = 'X'.
          else.
            p_locked = space.
          endif.
        endif.
      endloop.
    endform.                               " check_lock
    Regards,
    Sindhu

  • Help needed regarding check box

    Hi,
    I have report which displays all the records and at the end it has a check box column. If i select the check box and click on the button 'GO' a mail should be sent to those check box selected.
    Please can any one help me in this.
    Thanks,

    user12174050 wrote:
    Here the mail is going but if i select more than one check box then mail is not going to the second one selected.Presumably because your call to apex_mail.send is taking place outside of the loop, so it should only send one mail.
    And by the way, looking at your process, you have the call: P17_BASE_LOGIN := v_base_login; -if you select multiple chckboxes, :P17_BASE_LOGIN is going to get changed each time, is that your expected behaviour?
    Also, don't forget to surround your code with: tags
    Ta,
    Trent                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Regarding check box

    hi,
    i have one  selection screen,
    here one radio button pp plant .i want to add a check box
    exactly right side of the radio button with same line ,
    how to do this???
    help

    Hi Sahoo,
    Try the below code.
    selection-screen begin of line.
    selection-screen comment +1(10) text-001.  "text-001 = 'P_R1'
    selection-screen position 15.
    parameters : p_r1 radiobutton group r1.
    selection-screen comment +20(10) text-002. "text-001 = 'P_R2'
    selection-screen position 32.
    parameters : p_r2 radiobutton group r1.
    selection-screen comment +38(10) text-003. "text-001 = 'P_C1'
    selection-screen position 50.
    parameters : p_c1 as checkbox.
    selection-screen end of line.
    This will place the 2 radiobuttons and the checkbox on the same line.
    Hope this helps.
    Thanks
    Balaji

  • Regarding Check boxes in ALV

    Hi
      Can anyone tell how to insert checkboxes in to ALV and based on the checkboxes selected i want to display the data.
    I have tried like this, but it is giving a dump as Field Symbol is not yet been assigned.
    Data: c1(1).
    wa_layout-box_fieldname = 'C1'.
    wa_layout-box_tabname = 'INTTAB'.
    Regards
    Haritha.

    report zpl_om_assignment3.
    type-pools : slis.
         Table Declarations
    tables : kona,
             ebox,
             kote008,
             kote007,
             kote006,
             ekbo,
             ekbe.
           DATA DECLARATIONS ---- INTERNAL TABLES
    data : begin of it_ebox occurs 0,
             knumh like ebox-knumh,
             vbeln like ebox-vbeln,
           end of it_ebox.
    data : begin of it_kona occurs 0,
             knuma like kona-knuma,
             boart like kona-boart,
             bonem like kona-bonem,
             bolif like kona-bolif,
             datab like kona-datab,
             datbi like kona-datbi,
             kobog like kona-kobog,
             botext like kona-botext,
             bukrs like kona-bukrs,
             ekorg like kona-ekorg,
             ekgrp like kona-ekgrp,
           end of it_kona.
    data : begin of it_kote occurs 0,
             kappl like kote008-kappl,
             kschl like kote008-kschl,
             ekorg like kote008-ekorg,
             lifnr like kote008-lifnr,
             datbi like kote008-datbi,
             knuma like kote008-knuma,
             datab like kote008-datab,
             knumh like kote008-knumh,
           end of it_kote.
    data : begin of it_final occurs 0,
             box type c,
             knuma like kona-knuma,          "Arrangement
             boart like kona-boart,          "Arrangement type
             datab like kona-datab,          "Validity data from
             datbi like kona-datbi,          "date to
             knumh like kote008-knumh,       "Condition Record
             kobog like kona-kobog,          "Condition type
             botext like kona-botext,         "Agreement desc
             bonem like kona-bonem,          "Rebate recipient
             lifnr like kote008-lifnr,        "Vendor number
             name1 like lfa1-lifnr,           "Vendor Name
             ekorg like kote008-ekorg,        "purchase organization
             ebeln like ekbe-ebeln,           "PO number
             aedat like ekko-aedat,            "PO Date
             ebelp like ekbe-ebelp,           "PO line item
             matnr like ekbe-matnr,            "MaterialNumber
             werks like ekbe-werks,           "Site Number
             maktx like makt-maktx,           "Material desc
             matkl like mara-matkl,            "Merchandise Category
             menge like ekpo-menge,           "Quantity
             meins like ekpo-meins,           "Unit of measure
             gjahr like ekbe-gjahr,            "Invoice Doc. Year
             bldat like rbkp-bldat,            "Invoice date
             cpudt like ekbe-cpudt,            "Inv. Update Date
             belnr like ekbe-belnr,            "Invoice Number
             xblnr like rbkp-xblnr,            "Reference
             buzei like ekbe-buzei,            "Invoice Line Item
             dmbtr like ekbe-dmbtr,            "Dollar Amount
             shkzg like ekbe-shkzg,             "Debit/Credit ind
             bukrs like kona-bukrs,            "Company code
           end of it_final.
    data : begin of it_ekbo occurs 0,
             ebeln like ekbo-ebeln,
             ebelp like ekbe-ebelp,
             knumh like ekbo-knumh,
             kopos like ekbo-kopos,
             budat like ekbo-budat,
             belnr like ekbo-belnr,
             buzei like ekbo-buzei,
             lifnr like ekbo-lifnr,
             matnr like ekbo-matnr,
             bltypn like ekbo-bltypn,
             bltypf like ekbo-bltypf,
             etenr like ekbo-etenr,
             zekkn like ekbo-zekkn,
             vgabe like ekbo-vgabe,
             gjahr like ekbo-gjahr,
           end of it_ekbo.
    data : begin of it_ekbe occurs 0,
             ebeln like ekbe-ebeln,
             ebelp like ekbe-ebelp,
            EBELP LIKE IT_EKBO-EBELP,
             gjahr like ekbe-gjahr,
             belnr like ekbe-belnr,
             buzei like ekbe-buzei,
             dmbtr like ekbe-dmbtr,
             shkzg like ekbe-shkzg,
             cpudt like ekbe-cpudt,
             matnr like ekbe-matnr,
             werks like ekbe-werks,
           end of it_ekbe.
    data : begin of it_lfa1 occurs 0,
             lifnr like lfa1-lifnr,
             name1 like lfa1-name1,
          end of it_lfa1.
    data : begin of it_mara occurs 0,
             matnr like mara-matnr,
             matkl like mara-matkl,
           end of it_mara.
    data : begin of it_makt occurs 0,
             matnr like makt-matnr,
             maktx like makt-maktx,
           end of it_makt.
    data : begin of it_ekko occurs 0,
             ebeln like ekko-ebeln,
             aedat like ekko-aedat,
           end of it_ekko.
    data : begin of it_ekpo occurs 0,
             ebeln like ekpo-ebeln,
             menge like ekpo-menge,
             meins like ekpo-meins,
           end of it_ekpo.
    data : begin of it_rbkp occurs 0,
             belnr like rbkp-belnr,
             bldat like rbkp-bldat,
             xblnr like rbkp-xblnr,
           end of it_rbkp.
    data : begin of t_ekpo occurs 0,
             mandt type mandt,
             ebeln type ekpo-ebeln,
             ebelp type ekpo-ebelp,
             aedat type ekpo-aedat,
             menge type ekpo-menge,
             meins type ekpo-meins,
           end of t_ekpo.
    data : it_fieldcat type slis_t_fieldcat_alv,
           it_fieldcat_ekpo type slis_t_fieldcat_alv with header line,
           it_events type slis_t_event,
           wa_events like line of it_events,
            v_ucomm like sy-ucomm,
            v_selfield type slis_selfield,
            v_value type slis_entry,
            it_layout type slis_layout_alv,
            it_layout_ekpo type slis_layout_alv,
            it_sort type slis_t_sortinfo_alv ,
            wa_sort type slis_sortinfo_alv,
            it_extab type slis_t_extab.
    data : begin of it_ebeln occurs 1,
             ebeln type ekpo-ebeln,
           end of it_ebeln.
         SELECTION-SCREEN ELEMENTS
    Block for rebate Arrangements
    selection-screen begin of block b1 with frame title text-001.
    select-options : s_knuma for kona-knuma default '42',
                     s_boart for kona-boart,
                     s_bolif for kona-bolif.
    selection-screen begin of line.
    selection-screen comment (5) v_1 for field p_datab .
    selection-screen position 33.
    parameters : p_datab like kona-datab.
    selection-screen position 52.
    selection-screen comment (3) v_2 for field p_datbi .
    selection-screen position 58.
    parameters : p_datbi like kona-datbi.
    selection-screen end of line.
    selection-screen end of block b1.
    Block for Condition Records
    selection-screen begin of block b2 with frame title text-002.
    selection-screen begin of line.
    selection-screen comment (5) v_3 for field p_vfrom .
    selection-screen position 33.
    parameters : p_vfrom like kona-datab.
    selection-screen position 52.
    selection-screen comment (3) v_4 for field p_vto .
    selection-screen position 58.
    parameters : p_vto like kona-datbi.
    selection-screen end of line.
    selection-screen end of block b2.
    Block for Organizational data
    selection-screen begin of block b3 with frame title text-003.
    select-options : s_ekorg for kona-ekorg,
                     s_ekgrp for kona-ekgrp.
    selection-screen end of block b3.
    parameters : p_dmemo as checkbox user-command chk,
                 p_vbeln like ebox-vbeln.
    INITIALIZATION
    initialization.
      v_1 = v_3 = 'Validity Period' .
      v_2 = v_4 = 'to' .
         AT SELECTION-SCREEN OUTPUT
    at selection-screen output.
      loop at screen.
        if p_dmemo = 'X'.
          if screen-name = 'P_VBELN' and screen-group1 = 'CHK'.
            screen-input = 'X'.
            modify screen.
          endif.
        else.
          if screen-name = 'P_VBELN'.
            screen-input = ' '.
            modify screen.
          endif.
        endif.
      endloop.
         START-OF-SELECTION
    start-of-selection.
      perform it_kona.
      if p_dmemo = 'X'.
        perform fetch_ebox.
      endif.
      perform it_kote.
      perform it_ekbo.
      perform it_ekbe.
      perform it_lfa1.
      perform it_mara.
      perform it_makt.
      perform it_ekko.
      perform it_ekpo.
      perform it_rbkp.
      perform populate_final.
      perform it_layout.
      perform display.
      perform get_events.
    *&      Form  FETCH_EBOX
    form fetch_ebox.
      select knumh
             lifnr
          from ebox
         INTO TABLE it_ebox
          appending corresponding fields of
          table it_kote
          where vbeln eq p_vbeln.
    endform.                    " FETCH_EBOX
    *&      Form  it_kona
    form it_kona .
      if not p_datab is initial and not p_datbi is initial.
        select knuma
               boart
               bonem
               bolif
               datab
               datbi
               kobog
               botext
               bukrs
               ekorg
               ekgrp
           from kona into
           table it_kona
           where knuma in s_knuma and
                 boart in s_boart and
                 datab le p_datab and
                 datbi ge p_datbi and
                 bolif in s_bolif and
                 ekorg in s_ekorg and
                 ekgrp in s_ekgrp.
      else.
        select knuma
               boart
               bonem
               bolif
               datab
               datbi
               kobog
               botext
               bukrs
               ekorg
               ekgrp
           from kona into
           table it_kona
           where knuma in s_knuma and
                 boart in s_boart and
                 bolif in s_bolif and
                 ekorg in s_ekorg and
                 ekgrp in s_ekgrp.
      endif.
    endform.                    " it_kona
    *&      Form  IT_KOTE
    form it_kote .
      if not it_kona[] is initial.
        if not p_vfrom is initial and p_vto is initial.
          select kappl
                 kschl
                 ekorg
                 lifnr
                 datbi
                 knuma
                 datab
                 knumh
            from kote008
             into table it_kote
             for all entries in it_kona
             where knuma eq it_kona-knuma and
                   datab le p_vfrom and
                   datbi ge p_vto.
          select kappl
                kschl
                ekorg
                lifnr
                datbi
                knuma
                datab
                knumh
             from kote007
             appending table it_kote
             for all entries in it_kona
             where knuma eq it_kona-knuma and
                   datab le p_vfrom and
                   datbi ge p_vto.
          select kappl
               kschl
               ekorg
               lifnr
               datbi
               knuma
               datab
               knumh
          from kote006
            appending table it_kote
            for all entries in it_kona
            where knuma eq it_kona-knuma and
                   datab le p_vfrom and
                   datbi ge p_vto.
        else.
          select kappl
            kschl
            ekorg
            lifnr
            datbi
            knuma
            datab
            knumh
       from kote008
        into table it_kote
        for all entries in it_kona
        where knuma eq it_kona-knuma.
          select kappl
                kschl
                ekorg
                lifnr
                datbi
                knuma
                datab
                knumh
             from kote007
             appending table it_kote
             for all entries in it_kona
             where knuma eq it_kona-knuma .
          select kappl
               kschl
               ekorg
               lifnr
               datbi
               knuma
               datab
               knumh
          from kote006
            appending table it_kote
            for all entries in it_kona
            where knuma eq it_kona-knuma.
        endif.
      endif.
    endform.                    " IT_KOTE
    *&      Form  IT_EKBO
    form it_ekbo .
      if not it_kote[] is initial.
        select ebeln
               ebelp
               knumh
               kopos
               budat
               belnr
               buzei
               lifnr
               matnr
               bltypn
               bltypf
               etenr
               zekkn
               vgabe
               gjahr
           from ekbo
           into table it_ekbo
           for all entries in it_kote
           where knumh eq it_kote-knumh.
      endif.
      sort it_ekbo by ebeln ebelp.
      delete adjacent duplicates from it_ekbo comparing ebeln ebelp.
    endform.                    " IT_EKBO
    *&      Form  IT_EKBE
    form it_ekbe .
      if not it_ekbo[] is initial.
        select ebeln
               ebelp
               gjahr
               belnr
               buzei
               dmbtr
               shkzg
               cpudt
               matnr
               werks
           from ekbe into
           table it_ekbe
           for all entries in it_ekbo
           where ebeln eq it_ekbo-ebeln
           and ebelp eq it_ekbo-ebelp and
           vgabe = '2'.
      endif.
    endform.                    " IT_EKBE
    *&      Form  it_lfa1
    form it_lfa1 .
      if not it_kote[] is initial.
        select lifnr
              name1
          from lfa1
          into table it_lfa1
          for all entries in it_kote
          where lifnr eq it_kote-lifnr.
      endif.
    endform.                                                    " it_lfa1
    *&      Form  it_mara
    form it_mara .
      if not it_ekbo[] is initial.
        select matnr
               matkl
            from mara
            into table it_mara
            for all entries in it_ekbo
            where matnr eq it_ekbo-matnr.
      endif.
    endform.                    " it_mara
    *&      Form  it_makt
    form it_makt .
      if not it_mara[] is initial.
        select matnr
               maktx
           from makt
           into table it_makt
           for all entries in it_mara
           where matnr eq it_mara-matnr and
                 spras eq sy-langu.
      endif.
    endform.                    " it_makt
    *&      Form  it_ekko
    form it_ekko .
      if not it_ekbo[] is initial.
        select ebeln
               aedat
            from ekko
            into table it_ekko
            for all entries in it_ekbo
            where ebeln eq it_ekbo-ebeln.
      endif.
    endform.                    " it_ekko
    *&      Form  it_ekpo
    form it_ekpo .
      if not it_ekko[] is initial.
        select ebeln
               menge
               meins
            from ekpo
            into table it_ekpo
            for all entries in it_ekko
            where ebeln eq it_ekko-ebeln.
      endif.
    endform.                    " it_ekpo
    *&      Form  populate_final
    form populate_final .
      loop at it_kote.
        it_final-knumh = it_kote-knumh.
        it_final-lifnr = it_kote-lifnr.
        it_final-ekorg = it_kote-ekorg.
        read table it_kona with key knuma = it_kote-knuma.
        it_final-knuma = it_kona-knuma.
        it_final-boart = it_kona-boart.
        it_final-datab = it_kona-datab.
        it_final-datbi = it_kona-datbi.
        it_final-kobog = it_kona-kobog.
        it_final-botext = it_kona-botext.
        it_final-bonem = it_kona-bonem.
        it_final-bukrs = it_kona-bukrs.
        read table it_ekbo with key knumh = it_kote-knumh.
        it_final-ebeln = it_ekbo-ebeln.
        it_final-ebelp = it_ekbo-ebelp.
        read table it_ekbe with key ebeln = it_ekbo-ebeln
                                   ebelp = it_ekbo-ebelp.
        it_final-matnr = it_ekbe-matnr.
        it_final-werks = it_ekbe-werks.
        it_final-gjahr = it_ekbe-gjahr.
        it_final-belnr = it_ekbe-belnr.
        it_final-buzei = it_ekbe-buzei.
        it_final-dmbtr = it_ekbe-dmbtr.
        it_final-shkzg = it_ekbe-shkzg.
        it_final-cpudt = it_ekbe-cpudt.
        read table it_lfa1 with key lifnr = it_kote-lifnr.
        it_final-lifnr = it_lfa1-lifnr.
        read table it_mara with key matnr = it_ekbo-matnr.
        it_final-matkl = it_mara-matkl.
        read table it_makt with key matnr = it_mara-matnr.
        it_final-maktx = it_makt-maktx.
        read table it_ekko with key ebeln = it_ekbo-ebeln.
        it_final-aedat = it_ekko-aedat.
        read table it_ekpo with key ebeln = it_ekko-ebeln.
        it_final-menge = it_ekpo-menge.
        it_final-meins = it_ekpo-meins.
        read table it_rbkp with key belnr = it_ekbo-belnr.
        it_final-bldat = it_rbkp-bldat.
        it_final-xblnr = it_rbkp-xblnr.
        append it_final.
      endloop.
    endform.                    " populate_final
    *&      Form  it_rbkp
    form it_rbkp .
      if not it_ekbo[] is initial.
        select belnr
               bldat
               xblnr
            from rbkp
            into table it_rbkp
            for all entries in it_ekbo
            where belnr = it_ekbo-belnr.
      endif.
    endform.                    " it_rbkp
    *&      Form  DISPLAY
    form display .
      call function 'REUSE_ALV_FIELDCATALOG_MERGE'
       exporting
         i_program_name               = sy-cprog
         i_internal_tabname           = 'IT_FINAL'
      I_STRUCTURE_NAME             = I_STRUCTURE_NAME
      I_CLIENT_NEVER_DISPLAY       = 'X'
         i_inclname                   = sy-cprog
      I_BYPASSING_BUFFER           = I_BYPASSING_BUFFER
      I_BUFFER_ACTIVE              = I_BUFFER_ACTIVE
        changing
          ct_fieldcat                  = it_fieldcat
       exceptions
         inconsistent_interface       = 1
         program_error                = 2
         others                       = 3
      if sy-subrc <> 0.
        message i000(bctrain) with 'Not Merged'.
      else.
    *message i000(bctrain) with ' Merged'.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.
      call function 'REUSE_ALV_LIST_DISPLAY'
       exporting
        I_INTERFACE_CHECK              = 'X'
        I_BYPASSING_BUFFER             = I_BYPASSING_BUFFER
        I_BUFFER_ACTIVE                = ' '
         i_callback_program             = sy-cprog
         i_callback_pf_status_set       = 'PF_STATUS'
         i_callback_user_command        = 'USER_COMMAND'
        I_STRUCTURE_NAME               = I_STRUCTURE_NAME
         is_layout                      = it_layout
         it_fieldcat                    = it_fieldcat[]
        IT_EXCLUDING                   = IT_EXCLUDING
        IT_SPECIAL_GROUPS              = IT_SPECIAL_GROUPS
        IT_SORT                        = IT_SORT
        IT_FILTER                      = IT_FILTER
        IS_SEL_HIDE                    = IS_SEL_HIDE
        I_DEFAULT                      = 'X'
        I_SAVE                         = ' '
        IS_VARIANT                     = IS_VARIANT
         it_events                      = it_events
        IT_EVENT_EXIT                  = IT_EVENT_EXIT
        IS_PRINT                       = IS_PRINT
        IS_REPREP_ID                   = IS_REPREP_ID
        I_SCREEN_START_COLUMN          = 0
        I_SCREEN_START_LINE            = 0
        I_SCREEN_END_COLUMN            = 0
        I_SCREEN_END_LINE              = 0
        IR_SALV_LIST_ADAPTER           = IR_SALV_LIST_ADAPTER
        IT_EXCEPT_QINFO                = IT_EXCEPT_QINFO
        I_SUPPRESS_EMPTY_DATA          = ABAP_FALSE
      IMPORTING
        E_EXIT_CAUSED_BY_CALLER        = E_EXIT_CAUSED_BY_CALLER
        ES_EXIT_CAUSED_BY_USER         = ES_EXIT_CAUSED_BY_USER
        tables
          t_outtab                       = it_final
       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
    *&      Form  get_events
    form get_events .
      call function 'REUSE_ALV_EVENTS_GET'
        exporting
          i_list_type     = 0
        importing
          et_events       = it_events
        exceptions
          list_type_wrong = 1
          others          = 2.
      if sy-subrc <> 0.
      endif.
    **USER_COMMAND EVENT
    READ TABLE IT_EVENTS INTO WA_EVENTS WITH KEY
                               NAME = 'USER_COMMAND'.
    IF SY-SUBRC = 0.
       WA_EVENTS-FORM = 'USER_COMMAND'.
       MODIFY IT_EVENTS FROM WA_EVENTS INDEX SY-TABIX.
    ENDIF.
    **PF_STATUS_SET EVENT
    READ TABLE IT_EVENTS INTO WA_EVENTS WITH KEY
                              NAME = 'PF_STATUS_SET'.
    IF SY-SUBRC = 0.
       WA_EVENTS-FORM = 'PF_STATUS'.
       MODIFY IT_EVENTS FROM WA_EVENTS INDEX SY-TABIX.
    ENDIF.
    TOP_OF_LIST EVENT.
      read table it_events into wa_events with key
                             name = 'TOP_OF_LIST'.
                             NAME = 'TOP_OF_PAGE'.
      if sy-subrc = 0.
        wa_events-form = 'TOP-OF-LIST'.
        modify it_events from wa_events index sy-tabix.
      endif.
    endform.                    " get_events
    *&      Form  USER_COMMAND
    form user_command using v_ucomm type sy-ucomm
                            v_selfield type slis_selfield .
      refresh it_fieldcat_ekpo.
      case v_ucomm.
        when 'DISP_DET'.
          refresh t_ekpo.
          refresh it_ebeln.
          loop at it_final.
            if it_final-box = 'X'.
              it_ebeln-ebeln = it_final-ebeln.
              append it_ebeln.
            endif.
          endloop.
          perform poitem_det.
      endcase.
    IF V_SELFIELD-FIELDNAME = 'EBELN'.
       V_VALUE = V_SELFIELD-VALUE.
    ELSE.
       MESSAGE I000(BCTRAIN) WITH 'SELECT PURCHASE ORDER FOR ITEM DETAILS'
                                    SY-LSIND.
       EXIT.
    ENDIF.
    SELECT EBELN
            EBELP
            AEDAT
            MENGE
            MEINS
         FROM EKPO
         INTO TABLE T_EKPO
         WHERE EBELN EQ V_VALUE.
    IF SY-SUBRC <> 0.
    MESSAGE I000(BCTRAIN) WITH  'NO ITEM DETAILS FOUND FOR PO :' V_VALUE.
      EXIT.
    ENDIF.
    **perform fldcat_merge.
    PERFORM IT_FIELDCAT_EKPO.
    PERFORM IT_LAYOUT_EKPO.
    PERFORM GET_EVENTS.
    PERFORM DISP_ITEMDET.
    REFRESH IT_FIELDCAT_EKPO.
    **ENDIF.
    endform.                    " USER_COMMAND
    *&      Form  DISP_ITEMDET
    form disp_itemdet.
      call function 'REUSE_ALV_LIST_DISPLAY'
       exporting
        I_INTERFACE_CHECK              = 'X'
        I_BYPASSING_BUFFER             = I_BYPASSING_BUFFER
        I_BUFFER_ACTIVE                = ' '
         i_callback_program             =  sy-cprog
        I_CALLBACK_PF_STATUS_SET       = ' '
        I_CALLBACK_USER_COMMAND        = 'TOP_OF_LIST'
        I_STRUCTURE_NAME               = I_STRUCTURE_NAME
         is_layout                      = it_layout_ekpo
         it_fieldcat                    = it_fieldcat_ekpo[]
        IT_EXCLUDING                   = IT_EXCLUDING
        IT_SPECIAL_GROUPS              = IT_SPECIAL_GROUPS
         it_sort                        = it_sort[]
        IT_FILTER                      = IT_FILTER
        IS_SEL_HIDE                    = IS_SEL_HIDE
        I_DEFAULT                      = 'X'
        I_SAVE                         = ' '
        IS_VARIANT                     = IS_VARIANT
        IT_EVENTS                      = IT_EVENTS
        IT_EVENT_EXIT                  = IT_EVENT_EXIT
        IS_PRINT                       = IS_PRINT
        IS_REPREP_ID                   = IS_REPREP_ID
        I_SCREEN_START_COLUMN          = 0
        I_SCREEN_START_LINE            = 0
        I_SCREEN_END_COLUMN            = 0
        I_SCREEN_END_LINE              = 0
        IR_SALV_LIST_ADAPTER           = IR_SALV_LIST_ADAPTER
        IT_EXCEPT_QINFO                = IT_EXCEPT_QINFO
        I_SUPPRESS_EMPTY_DATA          = ABAP_FALSE
      IMPORTING
        E_EXIT_CAUSED_BY_CALLER        = E_EXIT_CAUSED_BY_CALLER
        ES_EXIT_CAUSED_BY_USER         = ES_EXIT_CAUSED_BY_USER
        tables
          t_outtab                       = t_ekpo
       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.                    " DISP_ITEMDET
    *&      Form  IT_FIELDCAT_EKPO
    form it_fieldcat_ekpo .
      it_fieldcat_ekpo-fieldname = 'MANDT'.
      it_fieldcat_ekpo-seltext_l = 'CLIENT'.
      append it_fieldcat_ekpo.
      it_fieldcat_ekpo-fieldname = 'EBELN'.
      it_fieldcat_ekpo-seltext_l = 'PO NUMBER'.
      append it_fieldcat_ekpo.
      it_fieldcat_ekpo-fieldname = 'EBELP'.
      it_fieldcat_ekpo-seltext_l = 'PO ITEM'.
      append it_fieldcat_ekpo.
      it_fieldcat_ekpo-fieldname = 'AEDAT'.
      it_fieldcat_ekpo-seltext_l = 'PO DATE'.
      append it_fieldcat_ekpo.
      it_fieldcat_ekpo-fieldname = 'MENGE'.
      it_fieldcat_ekpo-seltext_l = 'QUANTITY'.
      it_fieldcat_ekpo-do_sum = 'X'.
      append it_fieldcat_ekpo.
      it_fieldcat_ekpo-fieldname = 'MEINS'.
      it_fieldcat_ekpo-seltext_l = 'UNIT OF MEASURE'.
      append it_fieldcat_ekpo.
    endform.                    " IT_FIELDCAT_EKPO
    *&      Form  TOP-OF-LIST
    form top-of-list.
      format color col_positive.
      write : 'ITEM DETAILS OF PURCHASE ORDERS : ' .
    endform.                    "TOP-OF-LIST
    *&      Form  PF_STATUS_SET
    form pf_status using it_extab type slis_t_extab.
      set pf-status 'DISP_DET' excluding it_extab.
    endform.                    "PF_STATUS_SET
    *&      Form  IT_LAYOUT
    form it_layout .
      it_layout-box_fieldname = 'BOX'.
      it_layout-box_tabname = 'IT_FINAL'.
    IT_LAYOUT-TOTALS_TEXT = 'TOTALS'.
    endform.                    " IT_LAYOUT
    *&      Form  IT_LAYOUT_EKPO
    form it_layout_ekpo .
      it_layout_ekpo-subtotals_text = 'SUBTOTALS'.
      it_layout_ekpo-totals_text = 'TOTALS'.
    *CLEAR IT_LAYOUT_EKPO-SUBTOTALS_TEXT.
    IT_LAYOUT_EKPO-NO_subtotals = ' '.
    endform.                    " IT_LAYOUT_EKPO
    *&      Form  fldcat_merge
    form fldcat_merge .
      call function 'REUSE_ALV_FIELDCATALOG_MERGE'
       exporting
         i_program_name               = sy-cprog
         i_internal_tabname           = 'T_EKPO'
       I_STRUCTURE_NAME             = I_STRUCTURE_NAME
       I_CLIENT_NEVER_DISPLAY       = 'X'
         i_inclname                   = sy-cprog
       I_BYPASSING_BUFFER           = I_BYPASSING_BUFFER
       I_BUFFER_ACTIVE              = I_BUFFER_ACTIVE
        changing
          ct_fieldcat                  = it_fieldcat_ekpo
       exceptions
         inconsistent_interface       = 1
         program_error                = 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.
    endform.                    " fldcat_merge
    *&      Form  it_fieldcat
    form it_fieldcat .
    *it_fieldcat-fieldname = 'KNUMA'.
    *IT_FIELDCAT-SELTEXT_L = 'AGGREMENT'.
    *APPEND IT_FIELDCAT.
    *it_fieldcat-fieldname = 'BOART'.
    *IT_FIELDCAT-SELTEXT_L = 'AGGREMENTTYPE'.
    *APPEND IT_FIELDCAT.
    *it_fieldcat-fieldname = 'DATAB'.
    *IT_FIELDCAT-SELTEXT_L = 'AGGREMENT FROM DATE'.
    *APPEND IT_FIELDCAT.
    *it_fieldcat-fieldname = 'DATBI'.
    *IT_FIELDCAT-SELTEXT_L = 'AGGREMENT TO DATE'.
    *APPEND IT_FIELDCAT.
    *it_fieldcat-fieldname = 'KNUMH'.
    *IT_FIELDCAT-SELTEXT_L = 'CONDRECORD'.
    *APPEND IT_FIELDCAT.
    *it_fieldcat-fieldname = 'KOBOG'.
    *IT_FIELDCAT-SELTEXT_L = 'CT GRP'.
    *APPEND IT_FIELDCAT.
    *it_fieldcat-fieldname = 'BOTEXT'.
    *IT_FIELDCAT-SELTEXT_L = 'CTGrpText'.
    *APPEND IT_FIELDCAT.
    *it_fieldcat-fieldname = 'BONEM'.
    *IT_FIELDCAT-SELTEXT_L = 'REB_RECEIPT'.
    *APPEND IT_FIELDCAT.
    *it_fieldcat-fieldname = 'LIFNR'.
    *IT_FIELDCAT-SELTEXT_L = 'VENDORNUM'.
    *APPEND IT_FIELDCAT.
    *it_fieldcat-fieldname = 'NAME1'.
    *IT_FIELDCAT-SELTEXT_L = 'VEN NAME'.
    *APPEND IT_FIELDCAT.
    *it_fieldcat-fieldname = 'EKORG'.
    *IT_FIELDCAT-SELTEXT_L = 'PUR_ORG'.
    *APPEND IT_FIELDCAT.
    *it_fieldcat-fieldname = 'EBELN'.
    *IT_FIELDCAT-SELTEXT_L = 'PO NUM'.
    *APPEND IT_FIELDCAT.
    *it_fieldcat-fieldname = 'AEDAT'.
    *IT_FIELDCAT-SELTEXT_L = 'PO DATE'.
    *APPEND IT_FIELDCAT.
    *it_fieldcat-fieldname = 'EBELP'.
    *IT_FIELDCAT-SELTEXT_L = 'PO ITEM'.
    *APPEND IT_FIELDCAT.
    *it_fieldcat-fieldname = 'MATNR'.
    *IT_FIELDCAT-SELTEXT_L = 'MATERIALNUM'.
    *APPEND IT_FIELDCAT.
    *it_fieldcat-fieldname = 'WERKS'.
    *IT_FIELDCAT-SELTEXT_L = 'SITE NUM'.
    *APPEND IT_FIELDCAT.
    *it_fieldcat-fieldname = 'MAKTX'.
    *IT_FIELDCAT-SELTEXT_L = 'MAT_DESC'.
    *APPEND IT_FIELDCAT.
    *it_fieldcat-fieldname = 'MATKL'.
    *IT_FIELDCAT-SELTEXT_L = 'MAT GRP'.
    *APPEND IT_FIELDCAT.
    *it_fieldcat-fieldname = 'MENGE'.
    *IT_FIELDCAT-SELTEXT_L = 'QUANTITY'.
    *APPEND IT_FIELDCAT.
    *it_fieldcat-fieldname = 'MEINS'.
    *IT_FIELDCAT-SELTEXT_L = 'UNITOF MEAS'.
    *APPEND IT_FIELDCAT.
    *it_fieldcat-fieldname = 'GJAHR'.
    *IT_FIELDCAT-SELTEXT_L = 'DOC YR'.
    *APPEND IT_FIELDCAT.
    *it_fieldcat-fieldname = 'BLDAT'.
    *IT_FIELDCAT-SELTEXT_L = 'INV DATE'.
    *APPEND IT_FIELDCAT.
    *it_fieldcat-fieldname = 'CPUDT'.
    *IT_FIELDCAT-SELTEXT_L = 'INV_UPDATE_DATE'.
    *APPEND IT_FIELDCAT.
    *it_fieldcat-fieldname = 'BELNR'.
    *IT_FIELDCAT-SELTEXT_L = 'INV NUM'.
    *APPEND IT_FIELDCAT.
    *it_fieldcat-fieldname = 'XBLNR'.
    *IT_FIELDCAT-SELTEXT_L = 'REFERENCE'.
    *APPEND IT_FIELDCAT.
    *it_fieldcat-fieldname = 'BUZEI'.
    *IT_FIELDCAT-SELTEXT_L = 'INV_LNITEM'.
    *APPEND IT_FIELDCAT.
    *it_fieldcat-fieldname = 'DMBTR'.
    *IT_FIELDCAT-SELTEXT_L = 'DOLLAR AMT'.
    *APPEND IT_FIELDCAT.
    *it_fieldcat-fieldname = 'SHKZG'.
    *IT_FIELDCAT-SELTEXT_L = 'DEB/CRD IND'.
    *APPEND IT_FIELDCAT.
    *it_fieldcat-fieldname = 'BUKRS'.
    *IT_FIELDCAT-SELTEXT_L = 'COMPANYCODE'.
    *APPEND IT_FIELDCAT.
    endform.                    " it_fieldcat
    *&      Form  poitem_det
    form poitem_det .
      if not it_ebeln[] is initial.
        select mandt
               ebeln
               ebelp
               aedat
               menge
               meins
            from ekpo
            into table t_ekpo
           for all entries in it_ebeln
           where ebeln = it_ebeln-ebeln.
      endif.
      perform it_fieldcat_ekpo.
      perform it_sort.
       perform it_layout_ekpo.
    perform get_events.
      perform disp_itemdet.
      refresh it_fieldcat_ekpo.
      clear it_layout_ekpo.
      refresh it_sort.
    endform.                    " poitem_det
    *&      Form  it_sort
    form it_sort .
      wa_sort-fieldname = 'EBELN'.
    it_sort-spos = 1.
    IT_SORT-TABNAME = 'T_EKPO'.
      wa_sort-up = 'X'.
      wa_sort-subtot = 'X'.
      wa_sort-group = 'UL'.
      append wa_sort to it_sort.
    endform.                    " it_sort

  • Please help me regarding check box..plzzzzz

    Hi,
         I posted the doubt about checkbox but no one replied. Please any one give me idea for making the operation. The attached VI shows the checkbox(regulated) in front panel with some textboxes below. So, now i want to make when the checkbox is clicked(on or regulated) i want to display first six textboxes with front labels and when it unchecked(off or unregulated) i want display only last two text boxes with front labels. And i want to deliver the data from read and write block to these text boxes.
                please help me i waste 3 days for this and i did not find any way. Looking for big help.
    Attachments:
    Basic_Serial_Write_and_Read.vi ‏32 KB

    First of all, if the user is supposed to operate the checkbox, it should be a control, not an indicator. right?
    Things like this are most easily done in a parallel event loop that handles nothing but UI changes. Here's a quick draft. It needs a little bit more code to stop the lower loop if the upper loop stops due to error. I am sure you can figure something out.
    Some other comments:
    Do you really need to configure the serial port and close the session with every iteration of the loop? Typically these things need to be done only once, before and after loop, respectively. That VI needs some serious work in general....
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    ChangeVisibility.png ‏19 KB
    Basic_Serial_Write_and_ReadMOD.vi ‏29 KB

  • When working with check box control goes to " MODULE (PBO) %_CTL_INIT "

    Hi All,
    I have a problem regarding check box.
    I have  a global itab and the itab is having some data. so now the iatb data i'm able to use in my module. When i'm writing code for my check box as below
    types : begin of t_ itab1 ,
            field type DB-FIELD,
            end of itab1.
    data : lt_itab1 TYPE TABLE OF t_itab1 WITH HEADER LINE.
    DATA : USER1 TYPE C.
    module USER_COMMAND_0300 input.
      case sy-ucomm.
      WHEN 'USER'.
    *IF USER1 = 'X'.
       LOOP AT itab.<-----global table
       SELECT field FROM DBtab INTO TABLE lt_itab1 WHERE field =
       itab-field.
       ENDLOOP.
    *ENDIF.
       when 'CAN'.
        LEAVE TO SCREEN 0.
         ENDCASE.
    endmodule.                 " USER_COMMAND_0300  INPUT
    This is my code.
    now when i'm debugging it when the cursur is at loop at statement i'm pressing F5 cursur is not going in to the select statement. it going into " MODULE (PBO) %_CTL_INIT " .
    method GET_CURRENT_DYNPRO.
    Can anybody tell me what is wrong in that? i should get the data in to lt_itab1.
    Thanks
    g.s.naidu

    Hi,
    Set one flag variable in itab of the table control and set taht flag = 'X whn you save the selected record into the ztable.Then In PBO, do like this.
    PROCESS BEFORE OUTPUT.
      LOOP AT   it_t001l INTO x_t001l   WITH CONTROL tc CURSOR tc-current_line.
        MODULE tc_get_lines.
      ENDLOOP.
    MODULE tc_get_lines OUTPUT.
    IF  x_t001l-flag = 'X'.
        LOOP AT SCREEN.
          IF screen-name = 'X_T001L-SEL'.
                  screen-input = 0.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.
    ENDMODULE.                    "TC_GET_LINES OUTPUT
    *---->In PAI, For saving
    MODULE user_command_9002 INPUT.
    CASE ok_9002.
    WHEN 'SAVE'.
    loop at it_marc into x_marc where sel = 'X'.
    <Modify the zable>.
    <b>x_marc-flag = 'X'.
    modify it_marc from x_marc transporting flag.</b>
    Endloop.
    ENDCASE.
    ENDMODULE. " USER_COMMAND_9002 INPUT "TC2_MODIFY INPUT
    Message was edited by:
            Vigneswaran S

  • Check boxes gone

    Hi,
    I've made a Application but I've a strange thing.
    When I select al columns to be shown in the program (and I run the program) I can select a record and modify it, thts perfect!
    BUT...
    When I deactivate some columns (Application->Page defenition->Regions->Reports and deactivate some columns). When I run the program I cant modify the records anymore... Anyone an idea?
    regards,
    Richard

    Richard,
    I have a few points with regards to your post that might make it a bit easier to help you:
    Is this a tabular form, if so, have you created it manually, or using the wizard? Your subject is regarding Check Boxes, but you have not mentioned them again in your post.
    Is it a process that is not firing, or your application that is erroring when trying to show this report and finally when you say you "deactivate" columns, are you setting the "Show" checkbox to unchecked, or are you setting them to be displayed conditionally?
    Cj

  • Regarding alv report with check boxes

    Hai,
    i have four check boxes as input named new,rejected,accepted and all.these four four check boxes information is nothing but the information that displayed under one field in my internal table.if i click the new check box means that corresponding
    data has to be display similarly for accepted and rejected .if i click the all check box means all records has to be displayed.now i am facing one problem if i suppose to click all check box with either new or rejected orelse accepted orelse with all the three with all check box means then it wont goes to output instead of that it remains in the same window i.e input screen. pls tell me the solution as soon as possible.
    with regards,
    R.Dhineshraj.

    hi dhinesh,
    one thing...wen ur writing a code for checkboxes ...checck for the following..
    1> for individual check box code...one check box should b selected at a time..
    2> for combination of checkboxes...after end-of-selection event...where u put this condition...give the if-clause with and condition...for all possible conditions of all 4 checkboxes...
    den accordingly...select the form-perform corresponding to the checkbox selection...
    example code..im writing here...for individual assignment...
    PARAMETERS: invoiced AS CHECKBOX.
    PARAMETERS: good_iss AS CHECKBOX.
    END-OF-SELECTION.
      IF invoiced = 'X'.
        PERFORM create_fieldcatalog.
        PERFORM display_data.
      ELSE.
        IFgood_iss = 'X'.
    let me knw if it helps u..
    regards
    kanika

  • Regarding Download data in MS Excel format and Check box

    Hi Friends
    In my Project some task is here i.e. select check box of the particular Customer number click on submit button. That time display of those customer details
    How we can do this if have any coding of this application can you sent me.
    And one more query
    One form having some data click on submit button that data will display in Excel format and Download data in MS Excel format
    Can you tell me how to work on these two concepts?
    Regards
    Vijay

    Dear Vijay,
    Please go through the [Download data in MS Excel format|http://wiki.sdn.sap.com/wiki/display/WDJava/ExporttoExcel(WithoutthirdpartyAPIs)]
    to download the table contents to MS Exel.
    & Also go through [How to Add Dynamic Checkboxes in a Web Dynpro Java |http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/90915916-c158-2c10-6fa0-f0e25f3ccd6b?quicklink=index&overridelayout=true] for check bok UI.
    Warm Regards,
    Upendra Agrawal

  • Regarding list having Check Boxes

    Hello All,
    I have a doubt regarding list having check boxes.
    I have a table having five values in rows.How to display that list having those 5 values along with check boxes.
    And i need to select only one particular check box.
    Please reply as soon as possible

    hi there,
    check this code.
    REPORT ZP5 no standard page heading.
    tables mara.
    *data: mark1 type c.
    data: begin of itab occurs 0,
          mark1(1),
          matnr like mara-matnr,
          werks like marc-werks,
          end of itab.
    select-options :so_matnr for mara-matnr.
    start-of-selection.
          select matnr
                 werks
                 from marc
                 into corresponding fields of table itab
                 up to 10 rows
                 where matnr in so_matnr
                 order by matnr .
                 loop at itab.
                 write:/ itab-mark1 as checkbox,
                         itab-matnr,
                         itab-werks.
                 endloop.
    regards,
    vikky.

  • Regarding enabled check box's in alv grid display

    hi ,
    in alv output i have three fields i have enabled check boxes of  this three field  i want to display the out put of them
    could u please explain clearly with code

    Hi,
    Go to Se38 --> Input BCALV_EDIT* and press F4. You can find many demo program with chekbox in ALV.
    Thanks,
    Sriram Ponna.

  • How to print Check Box in smartform

    HI,
      How to print check box in smartforms. I am using Include Sap Symbol but in the print it is coming as #. Do we need to do any setting like we do for barcode?
    Thanks
    Raghavendra

    hi,
    u can print a check box in different ways.. by inserting symbols and making window as check box..
    once go through the thread u will get to k now differnt ways
    putting checkboxes in smartform?
    Please Close this thread.. when u r problem is solved. Reward all Helpful answers
    Regards
    Naresh Reddy K

  • Preventing disabling of check box - item okay in MIGO

    Dear all,
    In the MIGO transaction - during goods receipt for subcontractor material, when the item (incoming) is checked as item okay - automatically the child material (Material sent to subcontractor) is also activated thereby to enable 543 movement.
    Unfortunately some of the users are disabling the check box (for the material sent to the subcontractor). This prevents depletion of stock from the subcontractor but inflates the stock of the incoming material.
    Is there any way - either by authorisation check to prevent users disabling the check box or other methods?
    Experts suggestion is required in this regard.
    Thanks in advance.
    Regards,
    M.M

    Hi Magesh,
    it is possible. use Badi enhancement
    MB_MIGO_BADI goto
    IF_EX_MB_MIGO_BADI~POST_DOCUMENT
    tell your abaper to put the logic like
    parent ID and subcomponent ID need to select
    if either of two is not selected
    then error message will prompt not to save the GR doc since subcomponent is unselected.
    reference field EKPO check PSTYP
    hope this help you.
    regards,
    Maia
    Edited by: Maia on Apr 18, 2008 3:07 PM

  • Free Goods check box in PO, for Services

    Hello,
    Is there any way to activate the Free goods checkbox for Services (item category 'D') in Purchase Order.
    This field seems not to be available in the screen layout.
    Your support is highly appreciated.
    Regards,
    Vijay.

    Hi,
    Per SAP Note 0000634395, activation of Free Goods Check box for services in not possible.
    Though there is an option to make the services unaccountable, by marking the service as contingency item in the service details from the services tab.
    The subitem total is the aggregate of the subitem net values. This subitem total excludes subitems marked as contingency or alternate lines.
    Please refer to the link provided;
    http://help.sap.com/erp2005_ehp_04/helpdata/EN/8d/7638d98f3f11d2b47f006094b93006/frameset.htm
    Regards,
    Sekhar.

Maybe you are looking for

  • Windows server 2012 R2 PXE boot is unworkable slow, I have this exact same set-up working in 2008 R2 What can I do?

    Hi there I'm trying to deploy a windows 7 image through Windows deployment services via PXE boot from a 2012 R2 server. Issue:    PXE boot is extremely slow, it takes up to more than 60 minutes for the device to download download the PXE boot Things

  • Ibooks author file not accepted by itunes producer

    I have completed a book with an Ibooks author file size of 830MB; it is not being accepted by itunes Producer for upload. Do I need to export it to IBooks format? I did this export but the resulting file is just 77MB. I did not try to upload it via I

  • Numeric or value error without size

    Is it possible to call SP or function with OUT VARCHAR 2 parameter without submitting size throught ODP.NET ? If I not submit size, i have the error ORA-06502: Numeric or Value error. Thank you

  • Issues when configure LDAP server in OBIEE

    Hi, I have a big issue, I configure LDAP server for authentication of users, and everything looks fine, but my problem is when I log in Interactive Dashbaords, I enter without any problem, but some parameters and some filters and some functions are N

  • HP Notebook 2000 cooling fan issue

    Hey, everyone. I've had my HP Notebook 2000 for a few years and I've discovered my first major issue just a few days ago when the cooling fan stopped working. I don't really mind it too much because I have a USB-powered cooling fan that my laptop res