Default Layout Variant using LIST Display FM

Hello All,
I'm using the FM REUSE_ALV_LIST_DISPLAYin my Report.
I want to save the layout Variant as a Default Layout Variant .
But when I'm clicking the option for saving a Layout I'm getting only one check box for User Specific Layout.
How can I set a layout created variant as a DEFAULT Layout Variant ?
Regards,
Deepu.K

Hi,
Once List is displayed, use the path: Setting->Layout>Layout Management->Click the check box against the layout which you want to set as the default. Then click on Define Default settings, first icon. You can follow the above instructions after running one of the DEMO pgms viz. BALVSD01.
I hope this helps,
Regards
Raju Chitale

Similar Messages

  • Resolved:how to set default LAYOUT for ALV list display

    hey guys,
      In my alv report there are 20 cloumns.
    after display i usualy choose 12 of them from CHOOSE LAYOUT option and then give it to print...
    how to set this LAYOUT as default
    sorry guys i figured it out..
    but can we give it programiticlay?
    Edited by: kumar gaurav on May 27, 2008 8:15 AM

    hi,
    you can do it.
    after declaring the catlog table you will give as
    wa_catlog-seltext_l = 'material'.
    wa_catlog-datatype = 'char'.
    wa_catlog-outputlen = 18.
    wa_catlog-fieldname = 'matnr'.
    append wa_catlog to i_catlog.
    clear wa_catlog.
    wa_catlog-seltext_l = 'plantl'.
    wa_catlog-datatype = 'char'.
    wa_catlog-outputlen = 4.
    wa_catlog-fieldname = 'werks'.
    append wa_catlog to i_catlog.
    clear wa_catlog.
    similarly what sequence you give here i.e. material  ,  plant  etc. you get the output in the same oder you can even give only the fields you want in the output.
    rewards points if useful.
    siri

  • Unable to set default layout variant in POWL

    Hi Experts
    We have performed below activity in POWL_QUERY to assign default layout variant.
      1.  Choose Layout variant.
      2.  A browser window for the POWL_MASTER_QUERY appears.
      3.  Change the sap-config-mode from "X" to "config" within the URL.
      4.  Now you can define your layout variant and save your changes.
      5.  Log on to the Customizing client and start transaction POWL_QUERY.
      6.  Assign your created layout variant in the Layout selection field.
    But Still I am not able to see selected layout.
    I am using NWBC 4.0 and  NW - 7.02.
    Please advice.
    Regards,
    Yogesh

    Hi!
              We have same problem!
             The layout can be selected in application, but it is not taken as default.
         We appreciate your feedback
    Best Regards.
    Angelica

  • Default Layout Variant

    Hi Friends,
       What is a default layout variant? How to create one?
    Thanks in advance.
    Tamilarasan

    hi, something additional to Raja input.
    you can load a layout for ALV in programing way.
    the ALV variant be stored in table V_LTDX, you can select out the variant record from it. So you can call the ALV with some difference, code like following:
    DATA: L_LAYOUT TYPE DISVARIANT.
    L_LAYOUT-REPORT = SY-REPID.
    L_LAYOUT-USERNAME = XXXX. "user name
    L_LAYOUT-VARIANT = XXXX. "the variant name you saved
    CALL METHOD GO_GRID->SET_TABLE_FOR_FIRST_DISPLAY
    EXPORTING I_STRUCTURE_NAME = 'SFLIGHT'
    IS_VARIANT = L_LAYOUT
    Then the ALV will be display as the layout you want, without special choose.
    Hope it will be helpful.
    thanks a lot

  • Define a line layout variant for item display

    I am getting the following message "Define a line layout variant for item display" while displaying the document via FPL9.
    Thanks for the help.
    Kumar

    Check customizing:
    Financial Accounting > Contract Accounts Receivable and Payable > Basic Functions > Account Balance Display > Define Proposal for Line Layout:
    You should have an entry like:
    SAPLFKL9 Account Balance     STD Standard callup of account display     VVV     0001
    Where VVV - Is you account balance variant that should have been defined in:
    Financial Accounting > Contract Accounts Receivable and Payable > Basic Functions > Account Balance Display > Define Line Layout Variants for Account Balance
    Cheers,

  • Default Layout for Multiple ALV displays

    Hello All,
    I have a requirement where I am displaying multiple ALV grid displays on different tabs of a screen.
    Now I have to set a default layout for each of the grids separately as they have different fields.
    Please let me know how to do it, I am using OO ALV display.
    Thanks a lot
    Ruchi

    Hi,
    According to your grid called pass the variant name
        gs_variant-report       = sy-repid.
        gs_variant-username     = sy-uname.
        gs_variant-variant      = v_vari.   " Your variant Name
        call method grid1->set_table_for_first_display 
          exporting
            is_layout                     = gs_layout
            is_variant                    = gs_variant  "<<<<<<<<<
            i_save                        = 'A'
            it_toolbar_excluding          = i_exclude[]
          changing
            it_outtab                     = i_output[]
            it_fieldcatalog               = i_fieldcat[]
          exceptions
            invalid_parameter_combination = 1
            program_error                 = 2
            too_many_lines                = 3
            others                        = 4.

  • SAP VIM Integrated Invoice Cockpit - single default layout variant for all exceptions

    Dear all,
    I hope some one has found the solution for this problem we are experiencing in SAP Vendor Invoice Management 600:
    For the Integrated Invoice Cockpit ( transaction /OPT/VIM_IIC ) we want to be able to define ONE global layout variant ( available for all users)  that is available for all exceptions in  the ICC. This so we only have to define and maintain one layout variant centrally.
    However this seems not possible: we tried to do so with the  transaction /OPT/VIM_EIIC_ADM  but  it appears that it is only possible to define global layout variants for each exception in the ICC separately ( which is a lot of maintenance work)
    Is there a solution available for this ?
    Many thanks in advance for your help.
    Kind Regards,
    Arjan

    Dear all,
    I hope some one has found the solution for this problem we are experiencing in SAP Vendor Invoice Management 600:
    For the Integrated Invoice Cockpit ( transaction /OPT/VIM_IIC ) we want to be able to define ONE global layout variant ( available for all users)  that is available for all exceptions in  the ICC. This so we only have to define and maintain one layout variant centrally.
    However this seems not possible: we tried to do so with the  transaction /OPT/VIM_EIIC_ADM  but  it appears that it is only possible to define global layout variants for each exception in the ICC separately ( which is a lot of maintenance work)
    Is there a solution available for this ?
    Many thanks in advance for your help.
    Kind Regards,
    Arjan

  • How do i change default sound when using AirPlay Display on Mavericks

    So i am using a TV with Apple TV attached as a second display for watching movies etc in the background
    Everytime i turn on the setting to enable to the display, it sets the Apple TV as my default sound and i have to go to settings to manually re-select my speakers attached to my iMac. Is there anyway to change this so it leaves the sound from my Mac as the default sound when enabling the screen.

    I looked into this a little more carefully.  It's not the Guest account.  It clearly indicates "Managed".
    Searching for more information, this is something related to Parental Control, but I can't seem to get this account to take on the characteristics of either an administrator or user role.

  • SUBTOTAL USING LIST DISPLAY

    Hi,
    Is it possible to calculate subtotals using reuse_alv_list_display instead of using reuse_alv_grid_display.
    Also i want to print sub-headings using ALV.
    Ex:
    Under the column Mark
    i want the subject names as sub_heading.
                                      MARKS
    ENG          HINDI           MATHS              SCIENCE
    Like this i want output.
    Thanx in advance.

    HI Anitha
    Initially you need to have the following coloumns in your internal table
    CLASS
    ROLL NO.
    ENG
    HINDI
    MATHS
    SCIENCE
    Populate the internal table with values.
    Please refer for ALV output
    http://www.sap-partner.hu/ABAP_HELP_INFO/An%20Easy%20Reference%20for%20ALV%20Grid%20Control.pdf
    Code for your ALV
    CALL SCREEN 100.
    * SCREEN PROGRAM SHOULD CONTAIN
    PROCESS BEFORE OUTPUT.
      MODULE status_0100.
      MODULE create_alv.
    PROCESS AFTER INPUT.
      MODULE user_command_0100.
    * DOUBLE CLICK ON THESE MODULES AND DO THE FOLLOWING CODE
    MODULE status_0100 OUTPUT.
    * DOUBLE CLICK ON 'S_LIST1' AND CREATE PF-STATUS
      SET PF-STATUS 'S_LIST1'.
      SET TITLEBAR 'T1'.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    MODULE create_alv OUTPUT.
    DATA: alv_dock    TYPE REF TO cl_gui_docking_container,
          alv_grid    TYPE REF TO cl_gui_alv_grid,
          gt_fieldcat TYPE lvc_t_fcat,
          wa_fieldcat TYPE lvc_s_fcat,
          it_sort     TYPE lvc_t_sort,
          wa_sort     TYPE lvc_s_sort,
      CLEAR wa_fieldcat.
      wa_fieldcat-tabname       = ITAB
      wa_fieldcat-fieldname     = 'CLASS'.
      wa_fieldcat-outputlen     = '10'.
      APPEND wa_fieldcat TO gt_fieldcat.
      CLEAR wa_fieldcat.
      wa_fieldcat-tabname       = ITAB
      wa_fieldcat-fieldname     = 'ID'.
      wa_fieldcat-outputlen     = '10'.
      APPEND wa_fieldcat TO gt_fieldcat.
      CLEAR wa_fieldcat.
      wa_fieldcat-tabname       = ITAB
      wa_fieldcat-fieldname     = 'MATHS'.
      wa_fieldcat-outputlen     = '10'.
      APPEND wa_fieldcat TO gt_fieldcat.
      CLEAR wa_fieldcat.
      wa_fieldcat-tabname       = ITAB
      wa_fieldcat-fieldname     = 'SCI'.
      wa_fieldcat-outputlen     = '10'.
      APPEND wa_fieldcat TO gt_fieldcat.
      CLEAR wa_fieldcat.
      wa_fieldcat-tabname       = ITAB
      wa_fieldcat-fieldname     = 'SOCIAL'.
      wa_fieldcat-outputlen     = '10'.
      APPEND wa_fieldcat TO gt_fieldcat.
      CLEAR wa_fieldcat.
      wa_fieldcat-tabname       = ITAB
      wa_fieldcat-fieldname     = 'ENG'.
      wa_fieldcat-outputlen     = '10'.
      APPEND wa_fieldcat TO gt_fieldcat.
      wa_layout-grid_title = sy-title.
      wa_layout-zebra      = 'X'.
      wa_layout-cwidth_opt = 'X'.
      wa_layout-sel_mode   = 'A'.
      wa_layout-info_fname = 'COLOR'.
      LOOP AT gt_fieldcat INTO wa_fieldcat.
        CASE wa_fieldcat-fieldname.
          WHEN 'CLASS' OR 'ID'.
           WHEN OTHERS.
            wa_fieldcat-do_sum = 'X'.
            MODIFY gt_fieldcat FROM wa_fieldcat.
        ENDCASE.
      ENDLOOP.
      wa_sort-fieldname = 'CLASS'.
      wa_sort-up = 'X'.
      wa_sort-subtot = 'X'.
      wa_sort-down = space.
      APPEND wa_sort TO it_sort.
      CHECK alv_dock IS INITIAL.
      CREATE OBJECT alv_dock
        EXPORTING
          extension  = 1200
         EXCEPTIONS
           OTHERS    = 1.
      IF sy-subrc <> 0 AND sy-batch IS INITIAL.
        MESSAGE a016(pn) WITH 'Unable to create output area'(e01).
      ENDIF.
      CREATE OBJECT alv_grid
        EXPORTING
          i_parent      = alv_dock
       EXCEPTIONS
          OTHERS    = 1.
      IF sy-subrc <> 0 AND sy-batch IS INITIAL.
        MESSAGE a016(pn) WITH 'Unable to create output area'(e01).
      ENDIF.
      CALL METHOD alv_grid->set_table_for_first_display
          EXPORTING
            i_structure_name              = 'ZPS_NI_SAVING'
            is_layout                     = wa_layout
    *      it_toolbar_excluding          = t_ui_functions
          CHANGING
            it_outtab                     = it_output
            it_fieldcatalog               = gt_fieldcat
            it_sort                       = it_sort
          EXCEPTIONS
            invalid_parameter_combination = 1
            program_error                 = 2
            too_many_lines                = 3
            OTHERS                        = 4.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                   WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDMODULE.
    MODULE user_command_0100 INPUT.
      CASE ok_code.
        WHEN 'BACK' OR 'CANCEL' OR 'EXIT'.
          CALL METHOD: alv_grid->free, alv_dock->free.
          FREE: alv_grid, alv_dock.
          SET SCREEN 0.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT

  • Reports 3.0 - Default Layout

    Can anyone help me with Reports 3.0? I'm changing the Data Model
    and want those changes to be reflected on Layout. (in Reports 2.5
    this used to be done via Default Layout, it used to display a
    Warning and after acceptance it used to change the layout
    according to new Data Model). How to do the same in Reports 3.0?
    Thanks in advance
    JP
    null

    JP (guest) wrote:
    : Can anyone help me with Reports 3.0? I'm changing the Data
    Model
    : and want those changes to be reflected on Layout. (in Reports
    2.5
    : this used to be done via Default Layout, it used to display a
    : Warning and after acceptance it used to change the layout
    : according to new Data Model). How to do the same in Reports
    3.0?
    : Thanks in advance
    : JP
    The only way I've been able to do this is to go into the layout
    editor and from the Edit menu pick 'select all' and delete
    everything. Then go into the margin and do the same thing. When
    you click the 'run' icon you will get a message that says
    'You cannot run without a layout. Would you like to create a
    default layout?'. Not pretty but it works, hope this helps.
    Karen
    null

  • Customize the layout set used when opening a folder in search result list?

    Hi,
    I have created a search result iView that uses a predefined search query to show a list of folders. If I click on a folder <i>(rnd:displayname(contentLink)</i>) its content is displayed in a new window. Here the layout set Consumer Explorer (default profile?) is used.
    I want to use a custom layout set in this window. How can I achieve this?
    Regards,
    Mario

    Hi Mario,
    here the answers:
    > <i>1. Develop an own UI Command where you can give
    > the LayoutSet as a parameter</i>.
    >
    > Do you know where I can find some code sample?
    You can either check the <a href="https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/Implementing%20Flexible%20UI%20One-Step-Screenflow.article">Implementing Flexible UI One-Step-Screenflow</a> tutorial by Thilo Brandt or search here on SDN for "UI Command implementation" examples.
    > <i>2. Create a Layout Profile with your own Layout
    > Set and define it as the Default Layout Profile.</i>
    >
    > How can I find out for which operations/standard
    > iViews in KM (copy, move, create link...) the default
    > layout is used to avoid surprises when changing the
    > default profile?
    Normally, as you can see in the above mentioned <a href="http://help.sap.com/saphelp_nw04/helpdata/en/25/59bb2eece725498427334e0e21b80c/content.htm">Priority of Settings</a>, whenever the KM Navigation component (com.sap.km.cm.navigation) is opened without a specific layout set the global default layout set is used. As you can give this parameters by different ways (as URL parameter, in the KM Navigation iView configuration, via OTH file definition, hardcoded or configured in the configuration of an UI Command, etc.) it is nearly impossible to find <b>all</b> situation where your users will get this default profile.
    The UI Commands (with selection) you mentioned like "copy","move","create_link" use the configured LayoutSet (ConsumerOnlyFolderSelector) from the KM Configuration (of the command).
    > <i>3. You can also create a Layout Profile and go to
    > the root folder(s) of the search on "Details" ->
    > "Settings" -> "Presentation" and select your profile
    > in the tab "Settings for all users".</i>
    >
    > I think it is to complex to change all existing KM
    > Navigation iViews to forced mode.
    >
    One idea would be to use the <a href="http://help.sap.com/saphelp_nw04s/helpdata/en/0f/764b87dfb948fcb13fd7695e157892/content.htm">Multiple Property Replacement</a> feature by SAP.
    > Can you give me a hint on the other possibilities you
    > want to publish?
    Of course. One other possibility I have in mind is to work with OTH files. You might also search here on SDN to see how to use them for setting the layout set for specific folder paths.
    Hope this helps,
    Robert

  • How to change layout for list display in background

    Hi All,
    I want to change layout for the list display of tcode fbl1n when i execute in background. is there anyway to select our own layout when i execute in background. When i execute in foreground we can change the layout by selecting change layout button, but how it possible when in backgroung, is there any way please let me know.
    Thanks in advance.
    Regards,
    Vishal

    Hi,
      Create a list variant by executing the program and changing the layout and saving..
      Then use the "Layout" parameter in the selection screen and give the variant you created earlier...
      Then while executing in background the list variant will be pickedup accordingly (given in the selection screen)..
    Hope this helps...
    THanks,
    Naren
    Message was edited by: Narendran Muthukumaran

  • Layout Variants - global defaults

    Is there a way for users to be able to setup a global layout variant, save it as their personal default and not affect anyone elseu2019s default global layout variant?
    In other words, say a manager wants to set up a layout variant for all of their subordinates; the manager sets up a global layout variant, the subordinates display and save that global layout variant as their personal default layout variant (without first saving it as a user-specific variant). It then becomes their personal default layout variant without changing the default global layout variant across the system.
    Thanks.

    Sorry my earlier solution won't work(I did't test).
    I think there is no straight option for doing this.but i'm sure some work around this would achieve our purpose.
    See,in this way you may need to create two exact same layouts for each user.One layout should be set as user-specific and  default both.
    And other one should not be set neither user-specific nor default just simply save and this one will be available for all other users.
    so this kind of work around and maintaining two exact layouts per user would solve our problem surely.

  • Multiple ALV Grid Controls per report - problem with default displ.variant

    Hi,
    I have a report with few screens called sequentialy. Each one of the screens has implemented own instance of ALV Grid Control within custom container, means:
    - screen 100 has container Cont100 and grid control "grid100",
    - screen 110 has container Cont110 and grid control "grid110"
    - screen 120 has container Cont120 and grid control "grid120"
    and so on...
    Each one of the grid controls is initialized with own field catalog table, with own layout and variant structure definitions. My problem occurs when the user changes the display variant for some of the grid controls and save the layout variant using "default setting" checkbox. In this case next time the program is started all other grid controls behaves like they don't have their own variant definitions, but uses the default setting of the mentioned screen. This leads (usualy) to unsuable grid controls by default, because usualy different controls have no equal field-definition tables. I have the same behaviour even when there are more than 1 ALV grids on a single screen (for example - 2).
    For now I don't provide variant variables at selection screen, but it seems there is no way to provide such variables for each one of the grid-controls.
    Is anyone aware how to control this? Means no matter if there is default setting in use for some of the grid-controls, how to manipulate other grid-controls not to use this default setting?
    Many thanks in advance.
    Regards,
    Ivaylo Mutafchiev

    check this sample code which displays 4 grids in 4 different tabs and with 4 different handles
    PROGRAM  sapmzsdpp MESSAGE-ID z1.
    Table Declarations                                                   *
    TABLES:
      vbpa,                                " Sales Document: Partner
      kna1,                                " Customer Master
      vbap.                                " Sales Document: Item Data
    Tab Strip Declarations                                              *
    CONTROLS:
      tabstrip_sdpp TYPE TABSTRIP.         " Tabstrip
    Constants declarations                                               *
    CONSTANTS:
      c_rep_zm(2)   TYPE c VALUE 'ZM',     " Outside Sales Representative
      c_rep_ve(2)   TYPE c VALUE 'VE',     " Inside Sales Representative
      c_rep_zi(2)   TYPE c VALUE 'ZI',     " Sales Manager
      c_abgru_08(2) TYPE c VALUE '08',     " Reason for Rej: SO Not Closed
      c_stock_ind_e TYPE c VALUE 'E',      " Stock Idctr : Orders on hand
      c_gauge(5)    TYPE c VALUE 'GAUGE',  " Characteristic Name - GAUGE
      c_width(5)    TYPE c VALUE 'WIDTH',  " Characteristic Name - WIDTH
      c_gauge_metric(12)                   " Character Name - GAUGE_METRIC
                    TYPE c VALUE 'GAUGE_METRIC',
      c_width_metric(12)                   " Character Name - WIDTH_METRIC
                    TYPE c VALUE 'WIDTH_METRIC',
      c_eng_metric(14)                     " Charac Value - ENGLISH_METRIC
                    TYPE c VALUE 'ENGLISH_METRIC',
      c_coil(4)     TYPE c VALUE 'COIL',   " For Value COIL
      c_spec_bf(7)  TYPE c VALUE 'SPEC_BF'," Charac value SPEC_BF
      c_wadat_ist(8)                       " Actual Goods Movement Date
                    TYPE c VALUE '00000000',
      c_mcha(4)     TYPE c VALUE 'MCHA',   " Database Table 'MCHA'
      c_classtype_022(3)
                    TYPE c VALUE '022',    " Class Type : BATCH
      c_pipe(2)     TYPE c VALUE '06',     " Material Pricing Group: Pipes
      c_item_ctgry_ztam(4)
                    TYPE c VALUE 'ZTAM',   " Item Cat:Certificate Mnfctr
      c_lab_result(10)                     " Charac Value LAB_RESULT
                    TYPE n VALUE '0000001392',
      c_none_reqd(10)                      " For Value NONE REQD
                    TYPE c VALUE 'NONE REQD.',
      c_passed(6)   TYPE c VALUE 'PASSED', " For Value PASSED
      c_pending(12) TYPE c                 " For Value TEST PENDING
                    VALUE 'TEST PENDING',
      c_bundling(13)                       " For Value TEST BUNDLING
                    TYPE c VALUE 'TEST BUNDLING',
      c_normal(2)   TYPE c VALUE '01'.     " Priority: Normal
    Internal Table Declarations                                          *
    DATA :
    Internal table to hold common data for all reports
    BEGIN OF t_common_data OCCURS 0,
       kunnr        LIKE vbak-kunnr,       " Customer Number
       vbeln        LIKE vbap-vbeln,       " Sales Document Number
       posnr        LIKE vbap-posnr,       " Sales Document Item Number
       ihrez_e      LIKE vbkd-ihrez_e,     " Mill Order Number
       matnr        LIKE vbap-matnr,       " Material Number
       pstyv        LIKE vbap-pstyv,       " Sales Document Item Category
       kwmeng       LIKE vbap-kwmeng,      " Cumulative Order Quantity
       lprio        LIKE vbap-lprio,       " Delivery Priority
       werks        LIKE vbap-werks,       " Plant
       kondm        LIKE vbap-kondm,       " Material Pricing Group
       aedat        LIKE vbap-aedat,       " Date of Last Change
       cuobj        LIKE vbap-cuobj,       " Configuration
       saldata      LIKE vbap-zzcust_req_avail,
                                           " Required Availability Date
    END OF t_common_data,
    Internal table to hold Customer Number
      BEGIN OF t_cust_temp OCCURS 0,
        kunnr       LIKE vbak-kunnr,       " Customer Number
      END OF t_cust_temp,
    Internal table to hold stock details
      BEGIN OF t_stock OCCURS 0,
       vbeln        LIKE mska-vbeln,       " Sales Document Number
       posnr        LIKE mska-posnr,       " Sales Document Item Number
       matnr        LIKE mska-matnr,       " Material Number
       werks        LIKE mska-werks,       " Plant
       charg        LIKE mska-charg,       " Batch Number
       kalab        LIKE mska-kalab,       " Valuated Stock
       ersda        LIKE mska-ersda,
    END OF t_stock,
    Internal table to hold deliveries
    BEGIN OF t_delivery_data OCCURS 0,
      vbeln         LIKE lips-vbeln,       " Delivery Document Number
      vgbel         LIKE lips-vgbel,       " Document No of Ref Document
      vgpos         LIKE lips-vgpos,       " Item No of Ref Item
    END OF t_delivery_data,
    Internal table to hold released tons & released days
    BEGIN OF t_released_tons_days OCCURS 0,
      vbeln         LIKE likp-vbeln,       " Delivery Document Number
      btgew         LIKE likp-btgew,       " Total Weight
      bldat         LIKE likp-bldat,       " Document Date in Document
    END OF t_released_tons_days,
    Internal table to hold Pre-Production-Pending Orders (Report-1)
    BEGIN OF t_pre_prod_ord OCCURS 0,
       sortl1       LIKE zcustcode-sortl,  " Customer Search Term
       ihrez_e1     LIKE vbkd-ihrez_e,     " Mill Order Number
       salord1(17)  TYPE c,                " Sales Order Document & Item
       descri       TYPE char70,           " Specification of the Item
       speci        TYPE char30,           " Description of the Item
       days_entry   LIKE zlgcyinfo-days_since_entry,
                                           " Days Since Entry
       dept         LIKE zlgcyinfo-bklog,  " Department
       notes1       LIKE zcsimemo-text,    " CSI File Memo Text
    */ Request No. DV2K904687
       chng_date    LIKE vbap-aedat,       " Date of Last Change
    END OF t_pre_prod_ord,
    Internal table to hold Delinquent Orders (Report-2)
    BEGIN OF t_delinquent_ord OCCURS 0,
       sortl2       LIKE zcustcode-sortl,  " Customer Search Term
       ihrez_e2     LIKE vbkd-ihrez_e,     " Mill Order Number
       salord2(17)  TYPE c,                " Sales Order Document & Item
       descri       TYPE char70,           " Specification of the Item
       speci        TYPE char30,           " Description of the Item
       saldata      LIKE vbap-zzcust_req_avail,
       schdate      LIKE vbep-edatu,       " Schedule Line Date
       days_late    LIKE zlgcyinfo-dayslate,
                                           " Days Late
       unit         LIKE zlgcyinfo-unit,   " Status of Consolidation Units
       days_at_unit LIKE zlgcyinfo-daysatunit,
       notes2       LIKE zcsimemo-text,    " CSI File Memo Text
    END OF t_delinquent_ord,
    Internal table to hold Processed Material Orders (Report-3)
    BEGIN OF t_processed_ord OCCURS 0,
       sortl3       LIKE zcustcode-sortl,  " Customer Search Term
       ihrez_e3     LIKE vbkd-ihrez_e,     " Mill Order Number
       salord3(17)  TYPE c,                " Sales Order Document & Item
       descri       TYPE char70,           " Specification of the Item
       speci        TYPE char30,           " Description of the Item
       order_tons   LIKE vbap-kwmeng,      " Cumulative Order Quantity
       fin_tons     LIKE mska-kalab,       " Val.Stock With Unres Usage
       fin_days     TYPE i,                " Finished Days
       rel_tons     LIKE likp-btgew,       " Total Weight
       rel_days     TYPE i,                " No.of.Days Order is Released
       status(15)   TYPE c,                " Status Of Stock
       tb_tons      LIKE zlgcyinfo-tons,   " Tons
       notes3       LIKE zcsimemo-text,    " CSI File Memo Text
    END OF t_processed_ord,
    Internal table to hold Flagged Orders (Report-4)
    BEGIN OF t_flagged_ord OCCURS 0,
       sortl4       LIKE zcustcode-sortl,  " Customer Search Term
       ihrez_e4     LIKE vbkd-ihrez_e,     " Mill Order Number
       salord4(17)  TYPE c,                " Sales Order Document & Item
       descri       TYPE char70,           " Specification of the Item
       speci        TYPE char30,           " Description of the Item
       saldata      LIKE vbap-zzcust_req_avail,
       unit         LIKE zlgcyinfo-unit,   " Status of Consolidation Units
       tons         LIKE zlgcyinfo-tons,   " Tons
       priority     LIKE vbap-lprio,       " Delivery Priority
       notes4       LIKE zcsimemo-text,    " CSI File Memo Text
    END OF t_flagged_ord,
    Internal table to hold CSI memo file data
    BEGIN OF t_csi_memo_data OCCURS 0,
       vbeln        LIKE zcsimemo-vbeln,   " Sales Document Number
       posnr        LIKE zcsimemo-posnr,   " Sales Order line item
       text         LIKE zcsimemo-text,    " CSI File Memo Text
    END OF t_csi_memo_data,
    Internal table to hold Customer Codes
    BEGIN OF t_customer_code OCCURS 0,
       sortl        LIKE zcustcode-sortl,  " Sort Field
       kunnr        LIKE zcustcode-kunnr,  " Customer Number
    END OF t_customer_code,
    Internal table to hold schedule line dates
    BEGIN OF t_schedule_line_date OCCURS 0,
       vbeln        LIKE vbep-vbeln,       " Sales Document Number
       posnr        LIKE vbep-posnr,       " Sales Document Item Number
       edatu        LIKE vbep-edatu,       " Schedule line date
    END OF t_schedule_line_date,
    Internal table to hold Characteristic values
      t_configuration
                    TYPE TABLE OF conf_out
                    WITH HEADER LINE,
    Internal tables to hold legacy data
      t_lgcyinfo    TYPE TABLE OF zlgcyinfo
                    WITH HEADER LINE.
    Work variables declarations                                          *
    DATA:
      gv_parvw      LIKE kupav-parvw,      " Partner function
      gv_abgru      LIKE vbap-abgru,       " Reason to eject sales order
      gv_gauge      LIKE conf_out-atwtb,   " Charac Value Description
      gv_width      LIKE conf_out-atwtb,   " Charac Value Description
      gv_ok_code    LIKE sy-ucomm,         " Usercommand
      gv_okcode     LIKE sy-ucomm,         " User Command
      gv_number     LIKE sy-dynnr
                    VALUE '0101',          " Initial Sub Screen Number
      gv_vbeln      LIKE vbak-vbeln,       " Sales Order
      gv_posnr      LIKE vbup-posnr,       " Sales Item
    */ Request No. DV2K904687
      gv_del_prio   LIKE vbap-lprio,       " Delivery Priority
      gv_obj_key    LIKE inob-objek,       " Object Key
      gv_config     LIKE inob-cuobj,       " Configuration
      gv_lab_result LIKE ausp-atwrt,       " Lab Result Value
      gv_pass_stock LIKE mska-kalab,       " Finished Stock
      gv_fail_stock LIKE mska-kalab,       " Failed Stock
      gv_tp_tons    LIKE mska-kalab,       " Test Pending Tons
      gv_csi_stock  LIKE mbew-lbkum,       " CSI Stock On Hand
      gv_val_stock  LIKE mska-kalab,       " Valuated Stock
      gv_fin_tons   LIKE mska-kalab,       " Finished Tons
      gv_fin_days   TYPE i,                " Finished Days
      gv_rel_tons   LIKE likp-btgew,       " Released Tons
      gv_rel_days   TYPE i,                " Released Days
      gv_no_delivery                       " Number of Delivery Documents
                    TYPE i,
      gv_bund_tons  LIKE zlgcyinfo-tons,   " Bundling Tons
      gv_net_weight LIKE mara-ntgew,       " Net Weight
      gv_tb_tons    LIKE zlgcyinfo-tons,   " Test/Bundling Tons
      gv_date       LIKE mska-ersda,       " Date
      gv_tabix      LIKE sy-tabix,         " Table Index
      gv_flg        TYPE c,                " Flag Variable
      gv_exit       TYPE c.                " For Parameter Exit
    Constant declarations for ALV Grid                                   *
    CONSTANTS:
      c_cont_pre_prod_ord
                     TYPE scrfname VALUE 'CUST_PPP',
                                           " Custom Container for Report-1
      c_cont_delinquent_ord
                     TYPE scrfname VALUE 'CUST_DIP',
                                           " Custom Container for Report-2
      c_cont_processed_ord
                     TYPE scrfname VALUE 'CUST_PMS',
                                           " Custom Container for Report-3
      c_cont_flagged_ord
                     TYPE scrfname VALUE 'CUST_FLGORD',
                                           " Custom Container for Report-4
      c_handle1(3)   TYPE c VALUE 'G_1',   " Handle for PPP rpt Grid
      c_handle2(3)   TYPE c VALUE 'G_2',   " Handle for DIP rpt Grid
      c_handle3(3)   TYPE c VALUE 'G_3',   " Handle for PMS rpt Grid
      c_handle4(3)   TYPE c VALUE 'G_4',   " Handle for FLGORD rpt Grid
      c_true         TYPE c VALUE 'X',     " For value 'X'
      c_save         TYPE c VALUE 'A'.     " User-Defd & Global Variants
    Selection Screen                                                     *
    SELECTION-SCREEN BEGIN OF SCREEN 500 AS WINDOW.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-014.
    PARAMETERS :
      p_osr       RADIOBUTTON GROUP g1
                  DEFAULT 'X',             " Outside Sales Representative
      p_isr       RADIOBUTTON GROUP g1,    " Inside Sales Representative
      p_s_mgr     RADIOBUTTON GROUP g1.    " Sales Manager
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-005.
    SELECT-OPTIONS:
      s_pernr     FOR vbpa-pernr
                  OBLIGATORY,              " Employee Number
      s_kunnr     FOR kna1-kunnr,          " Customer Number
      s_sortl     FOR kna1-sortl,          " Customer Search Term
      s_kondm     FOR vbap-kondm.          " Material Pricing Group
    SELECTION-SCREEN END OF BLOCK b2.
    SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-006.
    PARAMETERS:
      p_open      RADIOBUTTON GROUP g2
                  DEFAULT 'X',             " Open Orders
      p_closed    RADIOBUTTON GROUP g2.    " Closed Orders
    SELECTION-SCREEN END OF BLOCK b3.
    SELECTION-SCREEN BEGIN OF BLOCK b4 WITH FRAME TITLE text-007.
    PARAMETERS:
      p_var1      LIKE disvariant-variant, " Variant For Report-1
      p_var2      LIKE disvariant-variant, " Variant For Report-2
      p_var3      LIKE disvariant-variant, " Variant For Report-3
      p_var4      LIKE disvariant-variant. " Varinat For Report-3
    SELECTION-SCREEN END OF BLOCK b4.
    SELECTION-SCREEN END OF SCREEN 500.
    */ Begin of Modification - Request No. DV2K904687
    Selection Screen for Changing Sales Order Priority
    SELECTION-SCREEN BEGIN OF SCREEN 1100 AS WINDOW.
    SELECTION-SCREEN BEGIN OF BLOCK b5 WITH FRAME TITLE text-044.
    PARAMETERS    p_sonum  LIKE vbap-vbeln." Sales Order Number
    SELECT-OPTIONS s_item  FOR  vbap-posnr." Sales Order Item
    PARAMETERS     p_delpr LIKE vbap-lprio." Delivery Priority
    SELECTION-SCREEN END OF BLOCK b5.
    SELECTION-SCREEN END OF SCREEN 1100.
    */ End of Modification - Request No. DV2K904687
    CLASS lcl_gv_event_receiveriver DEFINITION                           *
    CLASS lcl_event_receiver DEFINITION DEFERRED.
    ALV Grid - Work Variables Declarations                               *
    DATA:
      gv_cont_pre_prod_ord   TYPE REF
                               TO cl_gui_custom_container,
                                           " Custom Cont For Report-1
      gv_cont_delinquent_ord TYPE REF
                               TO cl_gui_custom_container,
                                          " Custom Cont For Report-2
      gv_cont_processed_ord  TYPE REF
                               TO cl_gui_custom_container,
                                           " Custom Cont For Report-3
      gv_cont_flagged_ord    TYPE REF
                               TO cl_gui_custom_container,
                                           " Custom Cont For Report-4
      gv_grid_pre_prod_ord   TYPE REF
                               TO cl_gui_alv_grid,
                                           " Grid For Report-1
      gv_grid_delinquent_ord TYPE REF
                               TO cl_gui_alv_grid,
                                           " Grid For Report-2
      gv_grid_processed_ord  TYPE REF
                               TO cl_gui_alv_grid,
                                           " Grid For Report-3
      gv_grid_flagged_ord    TYPE REF
                               TO cl_gui_alv_grid,
                                           " Grid For Report-4
      gv_event_receiver      TYPE REF
                               TO lcl_event_receiver,
                                           " Object For Local Class
      gs_lay_pre_prod_ord    TYPE lvc_s_layo,
                                           " Work Area for Grid layout
      gs_lay_delinquent_ord  TYPE lvc_s_layo,
                                           " Work Area for Grid layout
      gs_lay_processed_ord   TYPE lvc_s_layo,
                                           " Work Area for Grid layout
      gs_lay_flagged_ord     TYPE lvc_s_layo,
                                           " Work Area for Grid Layout
      gs_var_pre_prod_ord    TYPE disvariant,
                                           " Layout Structure
      gs_var_delinquent_ord  TYPE disvariant,
                                           " Layout Structure
      gs_var_processed_ord   TYPE disvariant,
                                           " Layout Structure
      gs_var_flagged_ord     TYPE disvariant,
                                           " Layout Structure
      t_fcat_pre_prod_ord    TYPE lvc_t_fcat
                             WITH HEADER LINE,
                                           " Field Catalog For Report-1
      t_fcat_delinquent_ord  TYPE lvc_t_fcat
                             WITH HEADER LINE,
                                           " Field Catalog For Report-2
      t_fcat_processed_ord   TYPE lvc_t_fcat
                             WITH HEADER LINE,
                                           " Field Catalog For Report-3
      t_fcat_flagged_ord     TYPE lvc_t_fcat
                             WITH HEADER LINE,
                                           " Field Catalog For Report-4
      t_exclude              TYPE ui_functions,
                                           " Function Code Table
      gs_exclude             TYPE ui_func. " Function Code Structure
    CLASS lcl_gv_event_receiver DEFINITION                               *
    CLASS lcl_event_receiver DEFINITION.
      PUBLIC SECTION.
        METHODS:
          handle_hotspot
            FOR EVENT hotspot_click OF cl_gui_alv_grid
              IMPORTING e_row_id e_column_id es_row_no,
          handle_top_of_page
                          FOR EVENT print_top_of_page OF cl_gui_alv_grid,
    */ Begin of Modification - Request No. DV2K904687
        handle_toolbar
            FOR EVENT toolbar OF cl_gui_alv_grid
                IMPORTING e_object e_interactive,
        handle_user_command
            FOR EVENT user_command OF cl_gui_alv_grid
                IMPORTING e_ucomm.
    */ End of Modification - Request No. DV2K904687
    ENDCLASS.                              " LCL_EVENT_RECEIVER DEFINITION
    CLASS IMPLEMENTATION                                                 *
    CLASS lcl_event_receiver IMPLEMENTATION.
      METHOD handle_hotspot.
        CASE e_column_id-fieldname.
          WHEN 'SALORD1'.
            CLEAR t_pre_prod_ord.
            READ TABLE t_pre_prod_ord
                  INTO t_pre_prod_ord
                 INDEX e_row_id-index.
          Call VA03 To View Sales Order Line Item Details
            PERFORM call_va03 USING t_pre_prod_ord-salord1.
          WHEN 'SALORD2'.
            CLEAR t_delinquent_ord.
            READ TABLE t_delinquent_ord
                  INTO t_delinquent_ord
                 INDEX e_row_id-index.
          Call VA03 To View Sales Order Line Item Details
            PERFORM call_va03 USING t_delinquent_ord-salord2.
          WHEN 'SALORD3'.
            CLEAR t_processed_ord.
            READ TABLE t_processed_ord
                  INTO t_processed_ord
                 INDEX e_row_id-index.
          Call VA03 To View Sales Order Line Item Details
            PERFORM call_va03 USING t_processed_ord-salord3.
          WHEN 'SALORD4'.
            CLEAR t_flagged_ord.
            READ TABLE t_flagged_ord
                  INTO t_flagged_ord
                 INDEX e_row_id-index.
          Call VA03 To View Sales Order Line Item Details
            PERFORM call_va03 USING t_flagged_ord-salord4.
          WHEN 'SORTL1'.
            CLEAR t_pre_prod_ord.
            READ TABLE t_pre_prod_ord
                  INTO t_pre_prod_ord
                 INDEX e_row_id-index.
        Call ZSD11 for Customer Search Term
            PERFORM call_zsd11_cust_code USING t_pre_prod_ord-sortl1.
          WHEN 'SORTL2'.
            CLEAR t_delinquent_ord.
            READ TABLE t_delinquent_ord
                  INTO t_delinquent_ord
                 INDEX e_row_id-index.
          Call ZSD11 for Customer Search Term
            PERFORM call_zsd11_cust_code USING t_delinquent_ord-sortl2.
          WHEN 'SORTL3'.
            CLEAR t_processed_ord.
            READ TABLE t_processed_ord
                  INTO t_processed_ord
                 INDEX e_row_id-index.
          Call ZSD11 for Customer Search Term
            PERFORM call_zsd11_cust_code USING t_processed_ord-sortl3.
          WHEN 'SORTL4'.
            CLEAR t_flagged_ord.
            READ TABLE t_flagged_ord
                  INTO t_flagged_ord
                 INDEX e_row_id-index.
          Call ZSD11 for Customer Search Term
            PERFORM call_zsd11_cust_code USING t_flagged_ord-sortl4.
          WHEN 'IHREZ_E1'.
            CLEAR t_pre_prod_ord.
            READ TABLE t_pre_prod_ord
                  INTO t_pre_prod_ord
                 INDEX e_row_id-index.
          Call ZSD11 for Mill Order
            PERFORM call_zsd11_millorder USING t_pre_prod_ord-ihrez_e1.
          WHEN 'IHREZ_E2'.
            CLEAR t_delinquent_ord.
            READ TABLE t_delinquent_ord
                  INTO t_delinquent_ord
                 INDEX e_row_id-index.
          Call ZSD11 for Mill Order
            PERFORM call_zsd11_millorder USING t_delinquent_ord-ihrez_e2.
          WHEN 'IHREZ_E3'.
            CLEAR t_processed_ord.
            READ TABLE t_processed_ord
                  INTO t_processed_ord
                 INDEX e_row_id-index.
          Call ZSD11 for Mill Order
            PERFORM call_zsd11_millorder USING t_processed_ord-ihrez_e3.
          WHEN 'IHREZ_E4'.
            CLEAR t_flagged_ord.
            READ TABLE t_flagged_ord
                   INTO t_flagged_ord
                  INDEX e_row_id-index.
          Call ZSD11 for Mill Order
            PERFORM call_zsd11_millorder USING t_flagged_ord-ihrez_e4.
          WHEN 'NOTES1'.
            CLEAR t_pre_prod_ord.
            READ TABLE t_pre_prod_ord
                  INTO t_pre_prod_ord
                 INDEX e_row_id-index.
          Call zsd00087 program to edit CSI Memo Text
            PERFORM edit_notes USING t_pre_prod_ord-salord1.
          WHEN 'NOTES2'.
            CLEAR t_delinquent_ord.
            READ TABLE t_delinquent_ord
                  INTO t_delinquent_ord
                 INDEX e_row_id-index.
          Call zsd00087 program to edit CSI Memo Text
            PERFORM edit_notes USING t_delinquent_ord-salord2.
          WHEN 'NOTES3'.
            CLEAR t_processed_ord.
            READ TABLE t_processed_ord
                  INTO t_processed_ord
                 INDEX e_row_id-index.
          Call zsd00087 program to CSI Memo Text
            PERFORM edit_notes USING t_processed_ord-salord3.
          WHEN 'NOTES4'.
            CLEAR t_flagged_ord.
            READ TABLE t_flagged_ord
                  INTO t_flagged_ord
                 INDEX e_row_id-index.
          Call zsd00087 program to CSI Memo Text
            PERFORM edit_notes USING t_flagged_ord-salord4.
        ENDCASE.                           " CASE E_COLUMN_ID ...
      ENDMETHOD.                           " HANDLE_HOTSPOT
      METHOD handle_top_of_page.
        PERFORM write_report_header.
      ENDMETHOD.                           " METHOD HANDLE_TOP_OF_PAGE
    */ Begin of Modification - Request No. DV2K904687
      METHOD handle_toolbar.
        DATA: ls_toolbar  TYPE stb_button.
      append a separator to normal toolbar
        CLEAR ls_toolbar.
        MOVE 3 TO ls_toolbar-butn_type.
        APPEND ls_toolbar TO e_object->mt_toolbar.
        CLEAR ls_toolbar.
      append a button for Change Delivery Priority
        MOVE 'CHNG_PRIO' TO ls_toolbar-function.
        MOVE 'Change SO Delivery Priority'(048)
             TO ls_toolbar-quickinfo.
        MOVE 'Change SO Priority'(049) TO ls_toolbar-text.
        MOVE 0 TO ls_toolbar-butn_type.
        APPEND ls_toolbar TO e_object->mt_toolbar.
      ENDMETHOD.                           " handle_toolbar
      METHOD handle_user_command.
        DATA: t_sel_row  TYPE lvc_t_roid,
              gs_sel_row TYPE lvc_s_roid,
              gs_flagged_ord LIKE t_flagged_ord,
              lv_lines   TYPE i.
        CASE e_ucomm.
          WHEN 'CHNG_PRIO'.
            REFRESH t_sel_row.
            CLEAR e_ucomm.
            CALL METHOD gv_grid_flagged_ord->get_selected_rows
              IMPORTING
                et_row_no = t_sel_row.
            CLEAR: t_flagged_ord,
                   gv_vbeln,
                   gv_posnr,
                   gv_del_prio.
            DESCRIBE TABLE t_sel_row LINES lv_lines.
            IF lv_lines GT 1.
              MESSAGE i001 WITH 'Select only one row'(043).
            ELSEIF lv_lines EQ 1.
              READ TABLE t_sel_row INTO gs_sel_row INDEX 1.
              READ TABLE t_flagged_ord INTO gs_flagged_ord
                   INDEX gs_sel_row-row_id.
              IF sy-subrc EQ 0.
                SPLIT gs_flagged_ord-salord4 AT '-' INTO gv_vbeln gv_posnr.
                gv_del_prio = gs_flagged_ord-priority.
                CLEAR: s_item, s_item[].
                p_sonum    = gv_vbeln.
                p_delpr    = gv_del_prio.
                s_item-low = gv_posnr.
                APPEND s_item TO s_item.
                CLEAR  s_item.
              ENDIF.                       " IF sy-subrc EQ 0
            ENDIF.                         " IF lv_lines GT 1
            IF lv_lines LE 1.
              CALL SELECTION-SCREEN '1100' STARTING AT 30 2
                                           ENDING   AT 110 7.
              LEAVE TO SCREEN 100.
            ENDIF.
        ENDCASE.                           " CASE e_ucomm
      ENDMETHOD.                           " handle_user_command
    */ End of Modification - Request No. DV2K904687
    ENDCLASS.                              " LCL_EVENT_RECEIVER
    " IMPLEMENTATION
    Form  WRITE_REPORT_HEADER                                            *
    This subroutine displays Report Header which includes                *
    Report Name, Executed by, Execution date, Execution Time             *
    There are no parameters to be passed to this subroutine              *
    FORM write_report_header.
      DATA lv_rep_tit(72) TYPE c.
      FORMAT COLOR COL_KEY.
      MOVE sy-title TO lv_rep_tit.
      CONDENSE lv_rep_tit.
      SKIP 1.
      WRITE: /3  sy-repid,
              25 'California Steel Industries, Inc.'(040),
              75 'Page'(041),
              80(4) sy-pagno.
      WRITE: /3  sy-uzeit,
              25 lv_rep_tit,
              75 sy-datum.
      FORMAT RESET.
    ENDFORM.                               " WRITE_REPORT_HEADER
    At selection-output                                                  *
    AT SELECTION-SCREEN OUTPUT.
      CLEAR sy-ucomm.
      IF sy-dynnr EQ '0500'.
      Initialize layout variant for report-1
        CLEAR gs_var_pre_prod_ord.
        gs_var_pre_prod_ord-report = sy-cprog.
        gs_var_pre_prod_ord-handle = c_handle1.
        PERFORM initialize_layoutvariant CHANGING gs_var_pre_prod_ord.
        p_var1 = gs_var_pre_prod_ord-variant.
      Initialize layout variant for report-2
        CLEAR gs_var_delinquent_ord.
        gs_var_delinquent_ord-report = sy-cprog.
        gs_var_delinquent_ord-handle = c_handle2.
        PERFORM initialize_layoutvariant CHANGING gs_var_delinquent_ord.
        p_var2 = gs_var_delinquent_ord-variant.
      Initialize layout variant for report-3
        CLEAR gs_var_processed_ord.
        gs_var_processed_ord-report = sy-cprog.
        gs_var_processed_ord-handle = c_handle3.
        PERFORM initialize_layoutvariant CHANGING gs_var_processed_ord.
        p_var3 = gs_var_processed_ord-variant.
      Initialize layout variant for report-4
        CLEAR gs_var_flagged_ord.
        gs_var_flagged_ord-report = sy-cprog.
        gs_var_flagged_ord-handle = c_handle4.
        PERFORM initialize_layoutvariant CHANGING gs_var_flagged_ord.
        p_var4 = gs_var_flagged_ord-variant.
    */ Begin of Modification - Request No. DV2K904687
      ELSEIF sy-dynnr EQ '1100'.
        DATA t_exclude  TYPE TABLE OF sy-ucomm.
        SET PF-STATUS 'MENU_1100'.
      To use your own GUI status for a selection screen
        CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'
          EXPORTING
            p_status  = 'MENU_1100'
          TABLES
            p_exclude = t_exclude.
      ENDIF.                               " IF sy-dynnr EQ '0500'
    */ End of Modification - Request No. DV2K904687
    At Selection Screen                                                  *
    AT SELECTION-SCREEN.
    */ Begin of Modification - Request No. DV2K904687
      CASE sy-dynnr.
        WHEN '1100'.
          IF sy-ucomm IS INITIAL.
            CLEAR sy-ucomm.
            LEAVE TO SCREEN 1100.
          ENDIF.                           " IF sy-ucomm IS INITIAL
          CASE sy-ucomm.
            WHEN 'SAVE'.
              CLEAR sy-ucomm.
            Change Delivery Priority using BAPI method
              PERFORM change_del_priority.
              CLEAR: sy-ucomm,
                     gv_vbeln,
                     gv_posnr,
                     gv_del_prio,
                     p_sonum,
                     s_item,
                     s_item[],
                     p_delpr.
              LEAVE TO SCREEN 0.
            WHEN 'CANCEL'.
              CLEAR: sy-ucomm,
                     gv_vbeln,
                     gv_posnr,
                     gv_del_prio,
                     p_sonum,
                     s_item,
                     s_item[],
                     p_delpr.
              LEAVE TO SCREEN 0.
          ENDCASE.                         " CASE sy-ucomm
        WHEN '0500'.
          IF sy-ucomm EQ 'CRET'.
            LEAVE TO SCREEN 100.
          ELSEIF sy-ucomm IS INITIAL.
            LEAVE TO SCREEN 500.
          ENDIF.                           " IF SY-UCOMM EQ 'CRET'
      ENDCASE.                             " CASE sy-dynnr
    */ End of Modification - Request No. DV2K904687
    Selection Screen: Validations                                        *
    AT SELECTION-SCREEN ON s_pernr.
    Validate Employee Number
      PERFORM validate_employee_number.
    AT SELECTION-SCREEN ON s_kunnr.
    Validate Customer Number
      IF NOT s_kunnr IS INITIAL.
        PERFORM validate_customer_number.
      ENDIF.                               " IF NOT S_KUNNR IS INITIAL
    AT SELECTION-SCREEN ON s_sortl.
    Validate Search Term
      IF NOT s_sortl IS INITIAL.
        PERFORM validate_search_term.
      ENDIF.                               " IF NOT S_SORTL IS INITIAL
    AT SELECTION-SCREEN ON s_kondm.
    Validate Product
      IF NOT s_kondm IS INITIAL.
        PERFORM validate_product.
      ENDIF.                               " IF NOT S_KONDM IS INITIAL
    Validate p_var1
    AT SELECTION-SCREEN ON p_var1.
      CLEAR gs_var_pre_prod_ord.
      gs_var_pre_prod_ord-report  = sy-cprog.
      gs_var_pre_prod_ord-handle  = c_handle1.
      gs_var_pre_prod_ord-variant = p_var1.
      IF p_var1 IS NOT INITIAL.
        PERFORM validate_variant CHANGING gs_var_pre_prod_ord.
      ENDIF.                               " IF P_VAR1 IS NOT INITIAL
    Validate p_var2
    AT SELECTION-SCREEN ON p_var2.
      CLEAR gs_var_delinquent_ord.
      gs_var_delinquent_ord-report  = sy-cprog.
      gs_var_delinquent_ord-handle  = c_handle2.
      gs_var_delinquent_ord-variant = p_var2.
      IF p_var2 IS NOT INITIAL.
        PERFORM validate_variant CHANGING gs_var_delinquent_ord.
      ENDIF.                               " IF P_VAR2 IS NOT INITIAL
    Validate p_var3
    AT SELECTION-SCREEN ON p_var3.
      CLEAR gs_var_processed_ord.
      gs_var_processed_ord-report  = sy-cprog.
      gs_var_processed_ord-handle  = c_handle3.
      gs_var_processed_ord-variant = p_var3.
      IF p_var3 IS NOT INITIAL.
        PERFORM validate_variant CHANGING gs_var_processed_ord.
      ENDIF.                               " IF P_VAR3 IS NOT INITIAL
    Validate p_var4
    AT SELECTION-SCREEN ON p_var4.
      CLEAR gs_var_flagged_ord.
      gs_var_flagged_ord-report  = sy-cprog.
      gs_var_flagged_ord-handle  = c_handle4.
      gs_var_flagged_ord-variant = p_var4.
      IF p_var4 IS NOT INITIAL.
        PERFORM validate_variant CHANGING gs_var_flagged_ord.
      ENDIF.                               " IF P_VAR4 IS NOT INITIAL
    Selection Screen: Value Request for ALV GRID Variants                *
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_var1.
      CLEAR gs_var_pre_prod_ord.
      gs_var_pre_prod_ord-report = sy-cprog.
      gs_var_pre_prod_ord-handle = c_handle1.
      PERFORM f4_variant CHANGING gs_var_pre_prod_ord
                                  gv_exit.
      IF gv_exit NE c_true.
        p_var1 = gs_var_pre_prod_ord-variant.
      ENDIF.                               " IF GV_EXIT NE c_true
    F4 help for variant p_var2
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_var2.
      CLEAR:
        gs_var_delinquent_ord,
        gv_exit.
      gs_var_delinquent_ord-report = sy-cprog.
      gs_var_delinquent_ord-handle = c_handle2.
      PERFORM f4_variant CHANGING gs_var_delinquent_ord
                                  gv_exit.
      IF gv_exit NE c_true.
        p_var2 = gs_var_delinquent_ord-variant.
      ENDIF.                               " IF GV_EXIT NE c_true
    F4 help for variant p_var3
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_var3.
      CLEAR:
        gs_var_processed_ord,
        gv_exit.
      gs_var_processed_ord-report = sy-cprog.
      gs_var_processed_ord-handle = c_handle3.
      PERFORM f4_variant CHANGING gs_var_processed_ord
                                  gv_exit.
      IF gv_exit NE c_true.
        p_var3 = gs_var_processed_ord-variant.
      ENDIF.                               " IF GV_EXIT NE c_true
    F4 help for variant p_var4
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_var4.
      CLEAR:
        gs_var_flagged_ord,
        gv_exit.
      gs_var_flagged_ord-report = sy-cprog.
      gs_var_flagged_ord-handle = c_handle4.
      PERFORM f4_variant CHANGING gs_var_flagged_ord
                                  gv_exit.
      IF gv_exit NE c_true.
        p_var4 = gs_var_flagged_ord-variant.
      ENDIF.                               " IF GV_EXIT NE c_true
    Form  validate_employee_number                                       *
    This subroutine validates Employee Number                            *
    There are no parameters to need be passed to this subroutine         *
    FORM validate_employee_number.
      DATA lv_pernr LIKE vbpa-pernr.
      SELECT SINGLE pernr
        INTO lv_pernr
        FROM vbpa
       WHERE pernr IN s_pernr.
      IF sy-subrc NE 0.
        MESSAGE e001 WITH text-010.
      ENDIF.                               " IF SY-SUBRC NE 0
      CLEAR lv_pernr.
    ENDFORM.                               " VALIDATE_EMPLOYEE_NUMBER
    Form  validate_customer_number                                       *
    This subroutine validates Customer Number                            *
    There are no parameters need to be passed to this subroutine         *
    FORM validate_customer_number.
      SELECT SINGLE kunnr
        INTO t_common_data-kunnr
        FROM kna1
       WHERE kunnr IN s_kunnr.
      IF sy-subrc NE 0.
        MESSAGE e001 WITH text-011.
      ENDIF.                               " IF SY-SUBRC NE 0
      CLEAR t_common_data-kunnr.
    ENDFORM.                               " VALIDATE_CUSTOMER_NUMBER
    Form  validate_search_term                                           *
    This subroutine validates Search Term                                *
    There are no parameters need to be passed to this subroutine         *
    FORM validate_search_term.
      SELECT SINGLE sortl
        INTO t_customer_code-sortl
        FROM kna1
       WHERE sortl IN s_sortl.
      IF sy-subrc NE 0.
        MESSAGE e001 WITH text-012.
      ENDIF.                               " IF SY-SUBRC NE 0
      CLEAR t_customer_code-sortl.
    ENDFORM.                               " VALIDATE_SEARCH_TERM
    Form  validate_product                                               *
    This subroutine validates Product                                    *
    There are no parameters need to be passed to this subroutine         *
    FORM validate_product.
      SELECT SINGLE kondm
        INTO t_

  • Logo using  List ALV list dispaly

    Hi,
    I am using FM:REUSE_ALV_COMMENTARY_WRITE to print logo in ALv header with list display using REUSE_ALV_LIST_DISPLAY.
    Header is being displayed except logo.Below is the code.
    Please let me know if anything to be done additionally to get the logo ,if naybody has displayed logo using list display i mean above FMs.
    FORM TOP_OF_PAGE.
    Report title
      clear t_heading[].
      clear x_heading.
      x_heading-typ = 'H'.
      x_heading-info = ''.
      append x_heading to t_heading.
    Program name
      clear x_heading.
      x_heading-typ = 'S'.
      x_heading-key = 'Program: '.
      x_heading-info = sy-repid.
      append x_heading to t_heading.
    User who is running the report
      clear x_heading.
      x_heading-typ = 'S'.
      x_heading-key = 'User: '.
      x_heading-info = sy-uname.
      append x_heading to t_heading.
    Date of execution
      clear x_heading.
      x_heading-typ = 'S'.
      x_heading-key = 'Date: '.
      write sy-datum to x_heading-info.
      append x_heading to t_heading.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
      EXPORTING
           I_LOGO                   = 'ENJOYSAP_LOGO'
           IT_LIST_COMMENTARY       = t_heading
      I_END_OF_LIST_GRID       =
       I_ALV_FORM               = 'X'.
    ENDFORM.

    Hi,
    Kindly go through this below sample program:
    *+
    REPORT  YKC_ALV_OOPS_LOGO_DISPALY.
    tables: MARA.
    TYPE-POOLS cndp.
    data: begin of it_tab occurs 0,
          matnr like mara-matnr,
          ersda like mara-ersda,  "creation date
          ernam like mara-ernam,  "person created
          pstat like mara-pstat,  "maint stat
          lvorm like mara-lvorm,  "flg for deletion
          mtart like mara-mtart,  "mat type
          meins like mara-meins,  "uom
          end of it_tab.
    data: wa_it_tab like line of it_tab.  "making work area
    data: i_modified TYPE STANDARD TABLE OF mara,"For getting modified rows
          w_modified TYPE mara.
    CLASS lcl_events_d0100 DEFINITION DEFERRED.
    DATA: event_receiver1  TYPE REF TO lcl_events_d0100,
          i_selected_rows TYPE lvc_t_row,                "Selected Rows
          w_selected_rows TYPE lvc_s_row.
    *----declaration for logo display custom container
    DATA  url(132).
    custom container
    DATA pic_container TYPE REF TO cl_gui_custom_container.
    picture Control.
    DATA picture TYPE REF TO cl_gui_picture.
    Definition of Control Framework
    CLASS cl_gui_cfw DEFINITION LOAD.
          CLASS lcl_events_d0100 DEFINITION
    CLASS lcl_events_d0100 DEFINITION.
      PUBLIC SECTION.
       METHODS:
    *double_click FOR EVENT double_click
                            OF cl_gui_alv_grid
                            IMPORTING e_row
                                      e_column.
        METHODS
            handle_hotspot_click
            FOR EVENT hotspot_click OF cl_gui_alv_grid
            IMPORTING
                 e_row_id
                 e_column_id
                 es_row_no
                 sender.
    *---code addition for ALV pushbuttons
    *--for placing buttons
        METHODS handle_toolbar_set
            FOR EVENT toolbar OF cl_gui_alv_grid
            IMPORTING
                  e_object
                  e_interactive.
    *---user command on clicking a button
        METHODS handle_user_command
            FOR EVENT user_command OF cl_gui_alv_grid
            IMPORTING
                 e_ucomm.
    ENDCLASS.                    "lcl_events_d0100 DEFINITION
                        LOCAL VARIABLE
    DATA ok_code TYPE sy-ucomm.
                          FOR VARIANT
    DATA st_var TYPE disvariant .
    DATA save TYPE c.
    st_var-report = 'YKC_ALV_OOPS_LOGO_DISPALY'.
    save = 'A'.
            FOR LAYOUT
    DATA loyo TYPE lvc_s_layo.
    loyo-zebra = 'X'.
    loyo-detailinit = 'X'.
    loyo-info_fname = 'RED'.
              FOR FIELD CATALOG
    DATA fcat TYPE lvc_t_fcat.
    DATA wa_fcat LIKE LINE OF fcat.
    *--Declaration for toolbar buttons
    DATA : ty_toolbar      TYPE stb_button.
    DATA : e_object        TYPE REF TO cl_alv_event_toolbar_set,
           io_alv_toolbar  TYPE REF TO cl_alv_event_toolbar_set.
    *---custom container
    DATA container TYPE REF TO cl_gui_custom_container.
    DATA ref_grid TYPE REF TO cl_gui_alv_grid.
    CREATE OBJECT container
      EXPORTING
        container_name = 'CONTAINER'."name of container in module pool
    CREATE OBJECT ref_grid
      EXPORTING
        i_parent = container.
          CLASS lcl_events_d0100 IMPLEMENTATION
    CLASS lcl_events_d0100 IMPLEMENTATION.
    *---method for hotspot
      METHOD handle_hotspot_click.
        DATA:ls_col_id   TYPE lvc_s_col.
        READ TABLE it_tab INTO wa_it_tab
                                 INDEX e_row_id-index.
        IF sy-subrc = 0.
          CHECK ( wa_it_tab-matnr IS NOT INITIAL ).
          CASE e_column_id-fieldname.
            WHEN 'MATNR'.
              leave program.
            WHEN OTHERS.
          do nothing
          ENDCASE.
          CALL METHOD ref_grid->set_current_cell_via_id
            EXPORTING
              is_row_id    = e_row_id
              is_column_id = ls_col_id.
        ENDIF.
      ENDMETHOD.                    "handle_hotspot_click
    **---method for handling toolbar
      METHOD handle_toolbar_set.
        CLEAR ty_toolbar.
        ty_toolbar-function = 'EDIT'. "name of btn to  catch click
        ty_toolbar-butn_type = 0.
        ty_toolbar-text = 'EDIT'.
        APPEND ty_toolbar    TO e_object->mt_toolbar.
      ENDMETHOD.                    "handle_toolbar_set
      METHOD handle_user_command.
        DATA: wr_data_changed TYPE REF TO cl_alv_changed_data_protocol.
        DATA: lt_rows TYPE lvc_t_row,
              lt_index TYPE  lvc_s_row-index.
        CASE e_ucomm.
          WHEN 'EDIT'.
          perform save_database.
          CALL METHOD ref_GRID->REFRESH_TABLE_DISPLAY.
        ENDCASE.
      ENDMETHOD.                    "handle_user_command
    *---End of page
    ENDCLASS.                    "lcl_events_d0100 IMPLEMENTATION
    START-OF-SELECTION.
      PERFORM get_data.
      PERFORM field_catalog.
    *&      Form  get_data
          text : getting data into internal table
    -->  p1        text
    <--  p2        text
    form get_data .
      select matnr ersda ernam pstat lvorm mtart meins
             into table it_tab
             from mara
             where matnr GE '000000000000000001'.
    endform.                    " get_data
    *&      Form  field_catalog
          text
    -->  p1        text
    <--  p2        text
    form field_catalog .
      REFRESH fcat.
      DATA: lv_pos TYPE i.
      lv_pos = lv_pos + 1.
      wa_fcat-fieldname = 'MATNR'.
      wa_fcat-coltext = 'Material No'.
      wa_fcat-col_pos = lv_pos.
      wa_fcat-hotspot = 'X'.
      wa_fcat-outputlen = 18.
      APPEND wa_fcat TO fcat.
      CLEAR wa_fcat.
      lv_pos = lv_pos + 1.
      wa_fcat-fieldname = 'ERSDA'.
      wa_fcat-coltext = 'Creation Date'.
      wa_fcat-col_pos = lv_pos.
      wa_fcat-edit = 'X'.
      wa_fcat-outputlen = 18.
      APPEND wa_fcat TO fcat.
      CLEAR wa_fcat.
      lv_pos = lv_pos + 1.
      wa_fcat-fieldname = 'ERNAM'.
      wa_fcat-coltext = 'Person Created'.
      wa_fcat-col_pos = lv_pos.
      wa_fcat-outputlen = 18.
      APPEND wa_fcat TO fcat.
      CLEAR wa_fcat.
      lv_pos = lv_pos + 1.
      wa_fcat-fieldname = 'PSTAT'.
      wa_fcat-coltext = 'Maint Stat'.
      wa_fcat-col_pos = lv_pos.
      wa_fcat-outputlen = 18.
      APPEND wa_fcat TO fcat.
      CLEAR wa_fcat.
      lv_pos = lv_pos + 1.
      wa_fcat-fieldname = 'LVORM'.
      wa_fcat-coltext = 'Flag For Deletion'.
      wa_fcat-col_pos = lv_pos.
      wa_fcat-outputlen = 18.
      APPEND wa_fcat TO fcat.
      CLEAR wa_fcat.
      lv_pos = lv_pos + 1.
      wa_fcat-fieldname = 'MTART'.
      wa_fcat-coltext = 'Material Type'.
      wa_fcat-col_pos = lv_pos.
      wa_fcat-outputlen = 18.
      APPEND wa_fcat TO fcat.
      CLEAR wa_fcat.
      lv_pos = lv_pos + 1.
      wa_fcat-fieldname = 'MEINS'.
      wa_fcat-coltext = 'UOM'.
      wa_fcat-col_pos = lv_pos.
      wa_fcat-outputlen = 18.
      APPEND wa_fcat TO fcat.
      CLEAR wa_fcat.
      CREATE OBJECT event_receiver1.
    *---setting event handlers
    SET HANDLER event_receiver1->double_click         FOR ref_grid.
      SET HANDLER event_receiver1->handle_toolbar_set   FOR ref_grid.
      SET HANDLER event_receiver1->handle_user_command  FOR ref_grid.
      SET HANDLER event_receiver1->handle_hotspot_click FOR ref_grid.
              ALV GRID DISPLAY
      CALL METHOD ref_grid->set_table_for_first_display
        EXPORTING
          is_variant      = st_var
          i_save          = save
          is_layout       = loyo
        CHANGING
          it_outtab       = it_tab[]
          it_fieldcatalog = fcat.
      CALL SCREEN 100.
    endform.                    " field_catalog
    *&      Module  STATUS_0100  OUTPUT
          text
    module STATUS_0100 output.
    create the custom container
        CREATE OBJECT pic_container
                      EXPORTING container_name = 'CUSTOM'.
    create the picture control
    create the picture control
        CREATE OBJECT picture
                      EXPORTING parent = pic_container.
    Request an URL from the data provider by exporting the pic_data.
        CLEAR url.
        PERFORM load_pic_from_db CHANGING url.
    load picture
        CALL METHOD picture->load_picture_from_url
          EXPORTING
            url = url.
       init = 'X'.
        CALL METHOD cl_gui_cfw=>flush
          EXCEPTIONS
            cntl_system_error = 1
            cntl_error        = 2.
        IF sy-subrc <> 0.
    error handling
        ENDIF.
    *---for editing
      CALL METHOD ref_grid->register_edit_event
      EXPORTING i_event_id = cl_gui_alv_grid=>mc_evt_modified.
      SET PF-STATUS 'S100'.
      SET TITLEBAR 'XXX'.
    endmodule.                 " STATUS_0100  OUTPUT
    *&      Module  exit  INPUT
          text
    module exit input.
      CASE ok_code.
        WHEN 'EXIT' .
          CLEAR ok_code.
          LEAVE PROGRAM.
      ENDCASE.
    endmodule.                 " exit  INPUT
    *&      Form  SAVE_DATABASE
          text : saving into DDIC from internal table
    -->  p1        text
    <--  p2        text
    FORM SAVE_DATABASE .
    Getting the selected rows index
        CALL METHOD ref_grid->get_selected_rows
                    IMPORTING  et_index_rows = i_selected_rows.
    Through the index capturing the values of selected rows
        LOOP AT i_selected_rows INTO w_selected_rows.
        READ TABLE it_tab INTO wa_it_tab INDEX w_selected_rows-index.
        IF sy-subrc EQ 0.
          MOVE-CORRESPONDING wa_it_tab TO w_modified.
          APPEND w_modified TO i_modified.
        ENDIF.
      ENDLOOP.
      MODIFY mara FROM TABLE i_modified.
    ENDFORM.                    " SAVE_DATABASE
    *&      Form  LOAD_PIC_FROM_DB
          text : loading logo
         -->P_URL      text
    FORM load_pic_from_db  CHANGING p_url.
      DATA query_table LIKE w3query OCCURS 1 WITH HEADER LINE.
      DATA html_table LIKE w3html OCCURS 1.
      DATA return_code LIKE  w3param-ret_code.
      DATA content_type LIKE  w3param-cont_type.
      DATA content_length LIKE  w3param-cont_len.
      DATA pic_data LIKE w3mime OCCURS 0.
      DATA pic_size TYPE i.
      REFRESH query_table.
      query_table-name = '_OBJECT_ID'.
      query_table-value = 'ENJOYSAP_LOGO'.u201Dname of logo
      APPEND query_table.
      CALL FUNCTION 'WWW_GET_MIME_OBJECT'
        TABLES
          query_string        = query_table
          html                = html_table
          mime                = pic_data
        CHANGING
          return_code         = return_code
          content_type        = content_type
          content_length      = content_length
        EXCEPTIONS
          object_not_found    = 1
          parameter_not_found = 2
          OTHERS              = 3.
      IF sy-subrc = 0.
        pic_size = content_length.
      ENDIF.
      CALL FUNCTION 'DP_CREATE_URL'
        EXPORTING
          type     = 'image'
          subtype  = cndp_sap_tab_unknown
          size     = pic_size
          lifetime = cndp_lifetime_transaction
        TABLES
          data     = pic_data
        CHANGING
          url      = url
        EXCEPTIONS
          OTHERS   = 1. *+
    Hope it helps you
    Regrds
    Mansi

Maybe you are looking for

  • MDB transaction attributes

    Is there a special reason why NotSupported and Required are the only two supported transaction attributes? I understand that MDBs cannot have a client-initiated transaction, but there are other transaction attributes that indicate the same thing. If

  • Cancel Billing Document

    Hi All,   What is the use of release to accounting in cacelled invoice? Why in cancel invoice document release to accounting is there. I have gone to VF02 than give cancel billing document number. Here release to accounting is thr. Rewrad points for

  • Re: (forte-users) SCM Hooks

    I am still having trouble using the SCM hook. I have set everything up but when I integrate I get the following error message. Forte_cl0: SYSTEM ERROR: Cannot resolve the distributed reference for an object of class (qqrp_SCMServerProxy) named (site/

  • 1000 photos in my stream, now what

    I now have 1000 photos in my stream, some taken from my iphone, others from uploaded from Apeture and iPhoto. Now when I take a photo with my iphone it goes to the camera roll but not the photo stream. Photostream is supposed to be 1st in 1st out. Wh

  • StorE art 500GB not recognized on Windows 7

    Hi, I have problem with my HDD (its not working on my Windows 7 64 bit), -> it works on every xp, vista windows -> I am sure my USB cable etc. is ok -> my HDD is ok (I have two pieces of this and both not working on Windows 7 64 bit) -> when I phoned