How do I add 'Traffic Lights' as sorting option?

Hi! We use MD04 most often. We are able to set the traffic lights, however 'Traffic Lights' does not show up on that next screen as a sorting option. Any ideas on why not? Thank you for any help!  Maria

Thanks for your response Steve, but Spier is correct I'm looking to add it as a print driver. I can export to pdf fine but sometimes when that isn't working or if I want the file to be compressed further I do File>Print and chose a printer, usually there is an option for Adobe PDF but the only option I currently have is Postscript. Looks like it was taken away. Thanks everyone!

Similar Messages

  • How to add Traffic Lights to a Report?

    Hi,
    How do U create a Traffic Light? and how to you change the Light? That's all I need.
    Thanks,
    Kishan

    hi dude,
    This is the way u add lights to ur alv report.
    I'm following this method and i'm getting lights. This will work for sure.
    In data declaration along with your alv display structure as a field named lights(any name).
    DATA : BEGIN OF wa_srr,
    vbeln LIKE vbak-vbeln, "Sales Order number
    posnr LIKE vbap-posnr, "Item nunmber
    matnr LIKE makt-matnr, "Material number Desc
    maktx LIKE makt-maktx, "Material Description
    gbstk LIKE vbuk-gbstk, "Completion status
    bukrs LIKE knb1-bukrs, "Company Code
    butxt LIKE t001-butxt, "Company Code description
    vkorg LIKE vbak-vkorg, "Sales organization
    vtext LIKE tvkot-vtext, "Sales Org description
    vtweg LIKE vbak-vtweg, "Distribution Channel
    dtext LIKE tvtwt-vtext, "Dist Channel description
    spart LIKE vbak-spart, "Division
    dvtxt LIKE tspat-vtext, "Division Description
    kunnr LIKE vbak-kunnr, "Customer Number
    name1 LIKE kna1-name1, "Customer Name
    land1 LIKE kna1-land1, "Country
    regio LIKE kna1-regio, "State
    ort01 LIKE kna1-ort01, "City
    erdat LIKE vbak-erdat, "Creation Date
    vdatu LIKE vbak-vdatu, "Due date
    kwmeng LIKE vbap-kwmeng, "Material Quantity
    netpr LIKE vbap-netpr, "unit net price
    netwr LIKE vbap-netwr, "Price
    wavwr LIKE vbap-wavwr, "Cost price
    bzirk LIKE vbkd-bzirk, "Sales District
    bztxt LIKE t171t-bztxt, "Sales District Discription
    lights, "Diplaying Status
    END OF wa_srr.
    While you are building the field cat do as follows
    FORM build_layout CHANGING l_wa_layout TYPE slis_layout_alv.
    l_wa_layout-zebra = cb_zebr. "Set alterante colored line
    l_wa_layout-colwidth_optimize = cb_colop. "Optimize column width
    l_wa_layout-no_vline = cb_novli. "No vertical line
    l_wa_layout-no_colhead = cb_nocol. "no column Header
    l_wa_layout-lights_fieldname = 'LIGHTS'. "Set light field
    (assigning the field u have added in ur structure here as light field in alv report)
    ENDFORM. " BUILD_LAYOUT
    Then as per the logic, u make green, yellow or red light
    Example,
    FORM build_light .
    LOOP AT it_srr INTO wa_srr. "for all entries in the table
    IF wa_srr-gbstk = 'C'. "If status is 'completed',
    wa_srr-lights = '3'. "Show green signal light
    ELSEIF wa_srr-gbstk = 'B'. "If status is 'Partial'
    wa_srr-lights = '2'. "Show yellow signal light
    ELSE. "If status is 'incomplete'
    wa_srr-lights = '1'. "Show red signal light
    ENDIF.
    MODIFY it_srr FROM wa_srr. "Update to table
    ENDLOOP.
    ENDFORM. " build_light
    after building ur layout, Pass it to ur alv function module like this.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    i_callback_program = sy-repid
    i_callback_top_of_page = 'TOP_OF_PAGE'
    i_background_id = 'ALV_BACKGROUND'
    i_grid_title = text-011
    pass ur layout structure here********
    is_layout = wa_layout
    it_fieldcat = it_fcat
    it_sort = it_sort
    i_save = v_save
    is_variant = wa_variant
    is_print = wa_print
    TABLES
    t_outtab = it_srr
    EXCEPTIONS
    program_error = 1
    OTHERS = 2.
    IF sy-subrc <> 0.
    MESSAGE i001. "List cannot be displayed
    ENDIF.
    wat all i did to add light is,
    1) adding an extra field in the main structure.
    2)create internal table with this structure as data table for alv report
    3) add 'field name' field in layout
    4) I have passed values(3, 2, 1) for green, yellow and red light resp, to the field(LIGHTS) in the internal table that is passed to alv function module.(Based on some condition)
    5) pass the layout structure layout to alv function module
    Thats it. If u do all this teps, u r done with it.
    Lemme know u solved it by giving points.
    with regards,
    praveen.

  • How to add "Traffic lights" to a webdynpro table

    Hi guys!
    What are the necessary steps to modify a Table cell in a table control in abap web dynpro.
    In particular i need those "traffic lights" in a table.
    can someone help me?
    thanks!

    Hello Thomas ,
                          Create an Attribute (say  LIGHT ) in the table node with type String .
    Now create a table column for this attribute and the cell editor for this column should be an
    'IMAGE' ui element . bind the attribute with ui element .
    Now at  runtime fill the LIGHT attribute with following values as required :
    light = 'ICON_RED_LIGHT'.
    or
    light = 'ICON_GREEN_LIGHT'
    or
    light = ''ICON_YELLOW_LIGHT'
    I hope this will help you .
    Regards
    Vivek

  • How to change the Traffic light positioning in ALV?

    Hai All,
    I am displaying a traffic light field in my ALV Grid. Now i want to display another field in the first position and move the traffic light to second or any other position. COL_POS seems to be not working, is there any chance of doing this?
    Best regards,
    rama

    >
    newtoAbap wrote:
    > Hai All,
    >
    > I am displaying a traffic light field in my ALV Grid. Now i want to display another field in the first position and move the traffic light to second or any other position. COL_POS seems to be not working, is there any chance of doing this?
    >
    > Best regards,
    > rama
    If you are using EXCP_FNAME in the ALV layout to display your traffic lights, it may not be possible to move your light field to any other position..
    One possiblity is to define your own field (as icon) in the internal table and assign the Traffic light icon to that field... By this approach, you can position that field in any place in your input structure while generating field catalog or defining your structure
    Here is an example with SALV,
    http://wiki.sdn.sap.com/wiki/display/Snippets/displayingiconsinalvusingclasscl_salv_table
    Example with icons in REUSE FM (can be used in ALV OO) and there should be umpteen examples in SDN also
    http://wiki.sdn.sap.com/wiki/display/Snippets/TrafficlightsinALVdisplay

  • How can I add the iPad cover lock option to the iPad 2?

    The iPad cover lock option doesn't come up on my settings on my iPad 2. How can I add it?

    Hi Sven,
    You can't. GC does not support the monitoring of standalone HTTP server installs. Only HTTP servers which have been setup through an iAS install can be monitored.
    I have had a SR raised with Oracle regarding this and a enhancement request has now been raised, but how long this will take is anyone's guess.
    Regards
    Brian

  • How can i add new identity in file option of menu bar

    ''locking as a duplicate - https://support.mozilla.com/en-US/questions/869755''
    how can i add new identity option in file option of menu bar

    There are, but not with a DVD written as a movie disk. It must be closed when completed, or it doesn't work.
    Apple's built in Burn utility also automatically closes any data CD, DVD or Blu-ray disk you burn. Doesn't matter how much space is unused, you can't use it. You'd have to use a more advanced disk creation app, such as Toast Titanium. I then have the option of choosing to write the data as a session:
    I can keep doing this until the disk is full. If I've written five sessions to the disk, when I put it in the drive, five CD/DVD icons will appear on the desktop since the OS will treat each session as if they are separate physical disks. At any point you choose Write Disk when writing a group of data, that means you're closing the disk, and again can't add anything after that. So if I had written two sessions, and the third was Write Disk, it's over. I can't put anything else on that disk.

  • How can I save my finder arrange/sort options once and for all?

    I'm opening the Finder View Options panel and resetting the arrange and sort options several times a day and it's driving me nuts. The Finder ignores my desperate pleas to apply these options system-wide and seems to purposely forget the options I chose the day before.
    I notice that the Icon view, List view, and even the Cover Flow view in the Finder get a "Use as Defaults" button in the View Options. Those of us in the Column View don't get that button, though. What have we done to deserve this?
    I'd like the Finder to now and forevermore open every window with the following options:
    Column View
    Arrange By > Kind
    Sort By > Name
    Can anyone help me make this happen? Thanks!

    I've found setting the Arrange By to anything other then None gives different results then what I expected.
    Select Column View from the Tool bar then open View Options and set Arrange By to None and Sort By to Name.
    If you then see the names in reverse alphabetical order click on list in the tool bar then on the Name column header to put them right. in Alphabetical order, then switch back to column view on the Tool bar. you should be good to go from there
    Whoever thought up Finders View logic should have their head checked.

  • How do I Add the Real Time Service option to our Informatica Cloud partner account

    Logging in a support request through MySupport works best.

    We need to add the Real Time Service option to our Informatica Cloud partner account.  What is the best way to do this? Should I contact the Informatica Cloud Global Customer Support team at: http://now.informatica.com/Cloud-ContactUs.html  Or should I log a support request through: https://mysupport.informatica.com/   .

  • How do I add accent light to my background?

    I'm trying to add a little accent light to my background to improve the separation between the background and the model. I tried using the render spotlight tool which added the light where I wanted it but it turned the rest of the background black. Is there a way to add light to the areas of the layer without changeing the rest of the layer?

    You should be able to do this by using a layer mask.

  • How do you add Blind Copy to the options listed in the mail address book?

    My I-Mac is the 20 inch Intel model running OS 10.4.7 and mail is 2.1.1.
    When trying to forward mail I can chose Bcc by going to "View" and selecting Bcc, but then when I go to the address book to select the names that I want to Bcc there are only two options listed in the address book and they are "To and Cc". The only way that I have been able to set the addresses into the forwarding message is to drag each address from the address book and place it into the Bcc field on the forwarded note. There must be some way to enable the address book to list Bcc. Does anyone know how? Thanks
    Bill
    I-Mac Model 5,1   Mac OS X (10.4.7)   1 Gig ram/Intel core 2 Duo
    I-Mac Model 5,1   Mac OS X (10.4.7)   I-Mac Intel 2 Duo

    Hi Austin,
    Thanks for the response, but you kind of misunderstand my question. I actually want something much simpler than this:
    When the Mail.app Data Detection recognises a telephone number or address, via a drop-down menu, I have the option to create a new contact or add the data to an existing contact. If I want to create a new AddressBook contact I am presented with a pop-up. This pop-up gives me the choice to enter a persons name, or by ticking the box, designate the entry as a company. I can edit the person's or company's name - this is often necessary as Data Detection, though generally quite good, doesn't always pick the correct data; for instance when the data is in the body of a forwarded e-mail. But what I can't seem to do is edit the entry to include a Contact Name and a Company Name. I may have to hand enter this information, I can accept that, but what I want to avoid is having to move away from Mail, open AddressBook and complete the contact creation therein.
    What I simply require is the option to enter at least the standard AddressBook 'new contact' template fields from within Mail. So I need to know: Is there is a way of configuring the pop-up fields beyond the Mail.app defaults?
    I hope this makes sense..
    Thanks again..

  • How to set(add) an e-mail encoding option in iPod Touch Mail?

    Hi.
    When I'm sending multi language e-mail in my iPod, it is shown in my desktop below.
    ?섏씠
    ?섏쓽 iPod?먯꽌 蹂대깂
    2009. 04. 06 ?ㅽ썑 6:16 "Kwansu Lee" <[email protected]> ?묒꽦:
    But I can read in Outlook2007, if I set encoding options as UTF-8.
    하이
    나의 iPod에서 보냄
    2009. 04. 06 오후 6:16 "Kwansu Lee" <[email protected]> 작성:
    It has no character set like
    <meta http-equiv=Content-Type content="text/html; charset=utf-8">
    How can I send an e-mail in my iPod without multilanguage encoding problem?
    Message was edited by: leesof

    I opened e-mail in IE Browser, I can get encdoing type like below.
    MIME-Version: 1.0
    Content-Type: multipart/alternative;
    boundary="----=NextPart_000_019C01C9B765.4C8DA160"
    여러 부분으로 구성된 MIME 형식의 메시지입니다.
    ------=NextPart_000_019C01C9B765.4C8DA160
    Content-Type: text/plain;
    charset="euc-kr"
    Content-Transfer-Encoding: 8bit
    ------=NextPart_000_019C01C9B765.4C8DA160
    Content-Type: text/html;
    charset="euc-kr"
    Content-Transfer-Encoding: quoted-printable
    What program produced that email? iPod? The one you sent me had two different charsets.
    I wrote a html e-mail in Outlook, and a plain text e-mial in my iPod.
    I think It's mismatch in character set and contents. Is it right?
    Sorry, but I can't understand what you are referring to. You sent me a message from your ipod. It had two different charsets. That is not a bug. Outlook does have a bug which makes it misread messages with two different charsets. Apple could accomodate that bug by having the ipod use the same charset instead of two different ones, and that is the easiest fix, because MS makes garbage software and never fixes its bugs.

  • I've lost my drop down menu for my back and forward buttons. I use them constantly. How do I add this or is that option gone for good?

    There used to be a drop down menu along side the forward and back buttons so you could skip several pages in between. I couldn't find that as an option to customize that feature back is that option no longer available?

    Hi Emclatchy,
    In Firefox 4 you should be able to get the history drop-down menu by left-clicking on the back button or the forward button and holding the mouse button down for a few seconds.
    Or, you can try installing this add-on:
    https://addons.mozilla.org/en-us/firefox/addon/backforedrop/
    I haven't tried it myself but it is supposed to add the history drop-down indicator back to Firefox 4, same as it was in previous versions.
    Hope that helps,
    --Jono Xia, Mozilla

  • How do you add a printer to Print_print_printer option?

    I cannot print to paper from Firefox. I have a MacBook Pro. I have done the about:config / print.print_printer, and it says "user set" type "string". I can print from Word and Safari, but not from Firefox. I have looked everywhere for an answer and cannot find anything that solves my problem. This problem first appeared about the time an update was downloaded.

    1. Buy a AirPrint enabled printer; see list below
    http://support.apple.com/kb/ht4356
    2. Run the CD provided and setup as network printer; this will setup your printer to the same network as your iPad
    http://i1224.photobucket.com/albums/ee374/Diavonex/1a30ee42.jpg
    3. Start printing from your iPad without wire
    http://i1224.photobucket.com/albums/ee374/Diavonex/93ec77e5.jpg

  • ABAP OO: traffic lights in ALV

    Hello,
    Instead of going the easy way, I decided to practise a bit of ABAP OO (which I am still quite unfamiliar with), and do ALV list to my new report by using CL_SALV_TABLE class.
    This seems to be quite clear if I just follow Rich's great instructions:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/eac1fa0b-0e01-0010-0990-8530de4908a6
    The only thing that is not so clear is that how can I add traffic (or led) lights to my ALV list when using  class CL_SALV_TABLE. Does someone has an example?
    Another bonus question: Do I always have to define the field catalog (with CL_SALV_TABLE) when using internal table of my own type?

    Hello
    Have a look at the sample report
    SALV_DEMO_TABLE_COLUMNS.Following is the in-line documentation of the report:
    *& Report  SALV_DEMO_TABLE_COLUMNS
    report salv_demo_table_columns no standard page heading.
    *... This report demonstrates the settings for the columns.
    *    The demonstration uses the new ALV API
    *      - cl_salv_table (Fullscreen Grid, Fullscreen List, Grid)
    *      - cl_salv_hierseq_table (hierseq. lists)
    *    If the table ALV_T_T2 is empty, please create data for the demo
    *    by running report BCALV_GENERATE_ALV_T_T2
    * §1   select data into global output table
    * §2   create ALV Table
    *      create instance of cl_salv_table for displaying a list of your
    *      output table
    * §2.1 create a ALV List by setting the parameter LIST_DISPLAY of the
    *      constructor cl_salv_table to 'X'
    * §2.2 create a ALV Fullscreen Grid by not setting the parameter
    *      LIST_DISPLAY of the constructor cl_salv_table to 'X'
    * §2.3 create a Grid by creating a Dynpro with a container in it. In
    *      PBO check if the container has been instantiated. If the
    *      container has not yet been instantiated then this is the first
    *      call:
    *            (1) create the container
    *            (2) create an instance of cl_salv_table
    * §3   Functions
    * §3.1 activate ALV generic Functions
    * §3.2 include own functions
    * §4   Cell Types
    * §4.1 Exception Column
    * §4.2 Icon Column
    * §4.3 Symbol Column
    * §4.4 Checkbox Column
    * §4.5 Hotspot Column
    * §4.6 Button Column
    * §4.7 Hyperlink Column
    * §4.8 Dropdown Column
    * §4.9 Tooltip Information for Exceptions, Icons and Symbols
    * §5   Color
    * §5.1 set the color of a complete column by calling the method
    *      set_color of cl_salv_column of the column
    * §5.2 set the color of a complete row
    *      note: by setting the columnname information the same
    *            technique can be used for setting the color of cells
    *      (1) register the column in which the color information
    *          for the row is held
    *      (2) set the color information to the row in the output
    *          table
    *          note: do not fill the parameter FNAME for setting the
    *                color of the complete row
    *                fill the parameter FNAME for setting the color
    *                of a cell (Row and Column are definied)
    * §6   Event Handler
    *      define a handler for the events of cl_salv_table
    * §6.1 define a local class for handling events of cl_salv_table
    *      define methods for the events which are to be handled
    * §6.2 implement the defined methods for handling the events of
    *      cl_salv_table
    * §7   Events
    *      register to events of cl_salv_table
    * §7.1 register to the event USER_COMMAND of cl_salv_table
    *      for receiving information when own functions has been selected
    * §7.2 register to the event DOUBLE_CLICK of cl_salv table
    *      for receiving information when user has double clicked on a line
    * §7.3 register to the event LINK_CLICK of cl_salv_table
    *      for receiving information when user has initiated a hotspot click
    * §8   Display
    *      display the configurated ALV Table by calling the method
    *      display of cl_salv_table.
    Regards
      Uwe

  • Displaying traffic lights in alv grid report?

    Hi everyone,
    I have an alv grid report.I m using the FM reuse_alv_grod_display to display my alv report.I am passing the fieldcatalogue automatically.I m getting the output perfectly.Now i have to add traffic lights to that alv report.
    Since i m passing the fieldcatalogue automatically i m confused to display the traffic lights?
    any suggestions please?
    Thank you.

    hi dp,
    look at the program i made... se the bold part you will be able to impelment lights easily,
    DECLARING TYPES POOL *
    All the definitions of internal tables, structures and constants
    are declared in a type-pool called SLIS.
    type-pools: slis.
    TABLES *
    tables: vbak,vbap,kna1.
    TYPES *
    *&--defining types for TABLE VBAK
    types: begin of t_vbak,
    vbeln type vbeln_va, "sales document
    kunnr type kunag,
    erdat type erdat,
    auart type auart,
    netwr type netwr_ak,
    waerk type waerk,
    vkorg type vkorg,
    vtweg type vtweg,
    spart type spart,
    name1 type name1_gp,
    stras type stras_gp,
    ort01 type ort01_gp,
    pstlz type pstlz,
    regio type regio,
    land1 type land1_gp,
    telf1 type telf1,
    end of t_vbak.
    *&--Defining types for TABLE VBAP
    types: begin of t_vbap,
    vbeln type vbeln_va,
    posnr type posnr_va,
    matnr type matnr,
    maktx type maktx,
    end of t_vbap.
    *&--MERGED FINAL SALES TABLE
    types: begin of t_sales_final,
    vbeln type vbeln_va,
    kunnr type kunag,
    posnr type posnr_va,
    erdat type erdat, "date of creation
    auart type auart,
    netwr type netwr_ak,
    waerk type waerk,
    vkorg type vkorg,
    vtweg type vtweg,
    spart type spart,
    name1 type name1_gp,
    v_lights type c,
    stras type stras_gp,
    ort01 type ort01_gp,
    pstlz type pstlz,
    regio type regio,
    land1 type land1_gp,
    telf1 type telf1,
    matnr type matnr,
    maktx type maktx,
    end of t_sales_final.
    defining wrokarea and IT.
    WORK AREA DECLARATION *
    *&---work area for Internal Tables
    data: wa_vbak type t_vbak.
    data: wa_vbap type t_vbap.
    data: wa_sales_final type t_sales_final.
    *&--work area for layout
    data: wa_layout type slis_layout_alv.
    INTERNAL TABLES DECLARATION *
    *&---Internal tables without Header Line.
    data : i_vbak type standard table of t_vbak,
    i_vbap type standard table of t_vbap,
    i_sales_final type standard table of t_sales_final.
    *&---Internal table for field catalog
    data : i_fieldcat type slis_t_fieldcat_alv,
    *&---Internal table for the sorting sequence.
    i_sortinfo type slis_t_sortinfo_alv,
    *&---Internal table for the event catalog.
    i_eventcat type slis_t_event,
    *&---Internal table for the top of page event
    i_listheader type slis_t_listheader.
    VARIABLE DECLARATION *
    data : v_progname like sy-repid, "Program name(system defined)
    v_gridtitle type lvc_title. "Grid Title
    INITIALIZATION EVENT *
    initialization.
    v_progname = sy-repid.
    refresh:i_vbak,
    i_vbap,
    i_sales_final,
    i_fieldcat,
    i_sortinfo,
    i_eventcat,
    i_listheader.
    clear: wa_vbak,
    wa_vbap,
    wa_sales_final,
    wa_layout.
    SELECTION SCREEN *
    SCREEN FOR ENTERING INFORMATION
    selection-screen begin of block b1 with frame title text-001.
    select-options: r_vbeln for wa_vbak-vbeln obligatory.
    select-options: r_erdat for wa_vbak-erdat obligatory.
    selection-screen end of block b1 .
    AT SELECTION SCREEN *
    at selection-screen.
    perform zf_validate_sales_doc_no.
    perform zf_validate_date.
    START OF SELECTION EVENT
    start-of-selection.
    perform zf_populate_header.
    perform zf_populate_detail.
    perform zf_append_sales_final.
    END OF SELECTION EVENT
    end-of-selection.
    *If Internal Table Is Populated Then Only Display Alv Report.
    if i_sales_final is not initial.
    Prepare fieldcatalog .
    perform zf_build_fieldcat using i_fieldcat.
    MODIFY the records IN the internal TABLE for the traffic lights.
    perform zf_modify_final.
    build event catalogue
    perform zf_eventcat using i_eventcat.
    build sorting
    perform zf_sorting using i_sortinfo.
    &---Build Listheader for TOP OF PAGE EVENT.
    perform zf_build_listheader using i_listheader.
    &---Build layout.
    perform zf_layout.
    &---Initializating Grid Title
    perform zf_build_grid_title.
    &---Display alv grid.
    perform zf_display_alv_grid.
    else.
    *If Table is not Populated ie Records Does not exist
    message 'Record Does Not Exist' type 'S'.
    endif.
    *& Form zf_validate_sales_doc_no
    text
    --> p1 text
    <-- p2 text
    form zf_validate_sales_doc_no .
    select single vbeln into wa_vbak-vbeln from vbak where vbeln in r_vbeln .
    if sy-subrc <> 0.
    message i101.
    endif.
    endform. " zf_validate_sales_doc_no
    *& Form zf_validate_date
    text
    --> p1 text
    <-- p2 text
    form zf_validate_date .
    if date is future
    if r_erdat-low >= sy-datum.
    message e102.
    elseif r_erdat-high >= sy-datum.
    message e103.
    endif.
    endform. " zf_validate_date
    *& Form zf_populate_header
    text
    --> p1 text
    <-- p2 text
    form zf_populate_header .
    select vbeln
    kunnr
    erdat
    auart
    netwr
    waerk
    vkorg
    vtweg
    spart
    into table i_vbak from vbak where vbeln in r_vbeln.
    if sy-subrc <> 0.
    message 'RECORD DOES NOT EXIST' type 'E'.
    endif.
    sort i_vbak by vbeln.
    *&--LOGIC TO GET FIELDS FROM TABLE KNA1 INTO INTERNAL TABLE I_VBAK
    loop at i_vbak into wa_vbak.
    select single name1 stras ort01 pstlz regio land1 telf1 into (wa_vbak-name1,
    wa_vbak-stras,
    wa_vbak-ort01,
    wa_vbak-pstlz,
    wa_vbak-regio,
    wa_vbak-land1,
    wa_vbak-telf1)
    from kna1
    where kunnr = wa_vbak-kunnr.
    modifying it_header.
    modify i_vbak from wa_vbak.
    clear wa_vbak.
    endloop.
    endform. " zf_populate_header
    *& Form zf_populate_detail
    text
    --> p1 text
    <-- p2 text
    form zf_populate_detail .
    if i_vbak[] is not initial.
    select vbeln
    posnr
    matnr
    into table i_vbap from vbap
    for all entries in i_vbak where vbeln = i_vbak-vbeln.
    endif.
    sort i_vbap by vbeln.
    sort i_vbap by posnr.
    *&--LOGIC TO GET FIELDS FROM TABLE MAKT INTO INTERNAL TABLE I_VBAP
    loop at i_vbap into wa_vbap.
    select single maktx into (wa_vbap-maktx)
    from makt where matnr = wa_vbap-matnr and spras = sy-langu.
    modifying it_header.
    modify i_vbap from wa_vbap.
    clear wa_vbap.
    endloop.
    endform. " zf_populate_detail
    *& Form zf_append_sales_final
    text
    --> p1 text
    <-- p2 text
    form zf_append_sales_final .
    sort i_vbak by vbeln.
    sort i_vbap by vbeln posnr.
    loop at i_vbak into wa_vbak.
    move-corresponding wa_vbak to wa_sales_final.
    read table i_vbap with key vbeln = wa_vbak-vbeln
    binary search transporting no fields.
    loop at i_vbap into wa_vbap from sy-tabix.
    if wa_vbap-vbeln <> wa_vbak-vbeln.
    exit.
    endif.
    move-corresponding wa_vbap to wa_sales_final.
    append wa_sales_final to i_sales_final.
    endloop.
    endloop.
    endform. " zf_append_sales_final
    *& Form zf_build_fieldcat
    text
    -->P_I_FIELDCAT text
    form zf_build_fieldcat using p_i_fieldcat type slis_t_fieldcat_alv.
    data: l_fieldcat type slis_fieldcat_alv. "local Workarea used
    clear l_fieldcat.
    FOR LIGHT IN COLUMN
    clear l_fieldcat.
    l_fieldcat-col_pos = '1'. " POSITION OF THE COLUMN.
    l_fieldcat-fieldname = 'V_LIGHTS'.
    " FIELD FOR WHICH CATALOG ID FILLED.
    *We are passing final internal table 'I_FINAL' to l_fieldcat(local
    *variable
    l_fieldcat-tabname = 'I_SALES_FINAL'.
    " INTERNAL TABLE TO WHICH THE FIELD BELONGS TO.
    l_fieldcat-just = 'C'. " FOR JUSTIFICATION.
    l_fieldcat-outputlen = 20.
    " TO DEFINE OUTPUT LENGTH OF THE COLUMN.
    append l_fieldcat to p_i_fieldcat.
    FIRST COLUMN ********************************
    l_fieldcat-col_pos = '2'. " POSITION OF THE COLUMN
    l_fieldcat-fieldname = 'VBELN'. " FIELD FOR WHICH CATALOG ID FILLED
    l_fieldcat-tabname = 'I_SALES_FINAL'. " INTERNAL TABLE BELONGS TO
    l_fieldcat-key = 'X'. " SO THAT this field is not scrollable hiddable.
    l_fieldcat-just = 'L'. " FOR JUSTIFICATION
    *l_fieldcat-hotspot = 'X'. " MARK THIS field as hotsopt
    l_fieldcat-lzero = 'X'. " OUTPUT WITH leading zeros.
    l_fieldcat-seltext_l = 'Sales Document'. " long text for header.
    l_fieldcat-seltext_m = 'Sales Doc'. " medium text for header.
    l_fieldcat-seltext_s = 'Sales Doc'. " sort text for header.
    l_fieldcat-outputlen = 20. " SET THE output length.
    l_fieldcat-ref_tabname = 'VBAK'. " FOR F1 & F4 help as
    append l_fieldcat to p_i_fieldcat.
    clear l_fieldcat.
    **************************SECOND COLUMN ********************************
    *l_fieldcat-col_pos = '3'. " POSITION OF THE COLUMN
    l_fieldcat-row_pos = '2'. " POSITION OF THE COLUMN
    l_fieldcat-fieldname = 'POSNR'. " FIELD FOR WHICH CATALOG ID FILLED
    l_fieldcat-tabname = 'I_SALES_FINAL'. " INTERNAL TABLE BELONGS TO
    l_fieldcat-key = 'X'. " SO THAT this field is not scrollable hiddable.
    l_fieldcat-just = 'L'. " FOR JUSTIFICATION
    l_fieldcat-hotspot = 'X'. " MARK THIS field as hotsopt
    l_fieldcat-lzero = 'x'. " OUTPUT WITH leading zeros.
    l_fieldcat-seltext_l = 'Sales Document Item'. " long text for header.
    l_fieldcat-seltext_m = 'Sales Document Item'. " medium text for header.
    l_fieldcat-seltext_s = 'Sales Document Item'. " sort text for header.
    l_fieldcat-outputlen = 20. " SET THE output length.
    l_fieldcat-ref_tabname = 'VBAP'. " FOR F1 & F4 help as
    append l_fieldcat to p_i_fieldcat.
    clear l_fieldcat.
    endform. " zf_build_fieldcat
    *& Form zf_eventcat
    text
    -->P_I_EVENTCAT text
    form zf_eventcat using p_i_eventcat type slis_t_event.
    data: l_eventcat type slis_alv_event.
    clear l_eventcat.
    call function 'REUSE_ALV_EVENTS_GET'
    exporting
    i_list_type = 0
    importing
    et_events = p_i_eventcat
    exceptions
    list_type_wrong = 1
    others = 2
    if sy-subrc 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    TOP OF PAGE FORM
    clear l_eventcat.
    read table p_i_eventcat into l_eventcat with key
    name = slis_ev_top_of_page.
    "(COMPONENT "NAME"of structure)
    if sy-subrc = 0. "if success
    move 'ZF_TOP_OF_PAGE' to l_eventcat-form.
    "matches name and moves form to workarea and modifies table
    modify p_i_eventcat from l_eventcat index sy-tabix
    transporting form.
    endif.
    PF_STATUS_SET FORM
    clear l_eventcat.
    read table p_i_eventcat into l_eventcat with key
    name = slis_ev_pf_status_set.
    if sy-subrc = 0.
    move 'ZF_PF_STATUS_SET' to l_eventcat-form.
    modify p_i_eventcat from l_eventcat index sy-tabix
    transporting form.
    endif.
    USER_COMMAND FORM
    clear l_eventcat.
    read table p_i_eventcat into l_eventcat with key
    name = slis_ev_user_command.
    if sy-subrc = 0.
    move 'ZF_USER_COMMAND' to l_eventcat-form.
    modify p_i_eventcat from l_eventcat index sy-tabix
    transporting form.
    endif.
    endform. " zf_eventcat
    *& Form zf_sorting
    text
    -->P_I_SORTINFO text
    form zf_sorting using p_i_sortinfo.
    endform. " zf_sorting
    *& Form zf_build_listheader
    text
    -->P_I_LISTHEADER text
    form zf_build_listheader using p_i_listheader type slis_t_listheader.
    data: l_listheader type slis_listheader.
    refresh p_i_listheader.
    clear l_listheader.
    HEADER
    l_listheader-typ = 'H'.
    l_listheader-info = 'FUJITSU CONSULTING INDIA LTD.'.
    append l_listheader to p_i_listheader.
    SELECTION
    l_listheader-typ = 'S'.
    l_listheader-key = 'Date:'.
    l_listheader-info = sy-datum.
    append l_listheader to p_i_listheader.
    ACTION
    l_listheader-typ = 'A'.
    *l_listheader-key =
    l_listheader-info = 'SALES ORDER ALV REPORT By Rohan Malik'.
    append l_listheader to p_i_listheader.
    endform. " zf_build_listheader
    *& Form zf_build_grid_title
    text
    --> p1 text
    <-- p2 text
    form zf_build_grid_title .
    v_gridtitle = 'List of Purchase Order'.
    endform. " zf_build_grid_title
    *& Form zf_display_alv_grid
    text
    --> p1 text
    <-- p2 text
    form zf_display_alv_grid .
    call function 'REUSE_ALV_GRID_DISPLAY'
    exporting
    i_callback_program = v_progname
    i_grid_title = v_gridtitle
    is_layout = wa_layout
    it_fieldcat = i_fieldcat
    it_sort = i_sortinfo
    it_events = i_eventcat
    IMPORTING
    E_EXIT_CAUSED_BY_CALLER =
    ES_EXIT_CAUSED_BY_USER =
    tables
    t_outtab = i_sales_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. " zf_display_alv_grid
    *& Form zf_top_of_page
    text
    --> p1 text
    <-- p2 text
    form zf_top_of_page .
    call function 'REUSE_ALV_COMMENTARY_WRITE'
    exporting
    it_list_commentary = i_listheader
    i_logo = 'ENJOYSAP_LOGO'
    I_END_OF_LIST_GRID =
    endform. " zf_top_of_page
    *& Form zf_user_command
    text
    --> p1 text
    <-- p2 text
    form zf_user_command using r_ucomm like sy-ucomm
    rs_selfield type slis_selfield .
    case r_ucomm. "FCODE
    when 'VA03'.
    read table i_sales_final into wa_sales_final index rs_selfield-tabindex.
    set parameter id 'AUN' field rs_selfield-value.
    call transaction 'VA03' and skip first screen .
    message i102 with rs_selfield-value .
    when '&IC1'. "for hotspot with VBELN, POSNR, MATNR, KUNNR.
    if rs_selfield-fieldname = 'MATNR'.
    set parameter id 'MAT' field rs_selfield-value.
    call transaction 'MM03' and skip first screen.
    return.
    message i103 with rs_selfield-value .
    endif.
    if rs_selfield-fieldname = 'VBELN'.
    set parameter id 'AUN' field rs_selfield-value.
    call transaction 'VA03' and skip first screen.
    return.
    message i104 with rs_selfield-value .
    endif.
    endcase.
    endform. " zf_user_command
    *& Form ZF_PF_STATUS_SET
    text
    --> p1 text
    <-- p2 text
    form zf_pf_status_set using rt_extab type slis_t_extab.
    set pf-status 'Z11_RM_ALV_SO'.
    endform. " ZF_PF_STATUS_SET
    *& Form zf_layout
    text
    --> p1 text
    <-- p2 text
    form zf_layout .
    wa_layout-zebra = 'X'.
    wa_layout-lights_fieldname = 'V_LIGHTS'.
    wa_layout-lights_tabname = 'I_SALES_FINAL'.
    " 1, 2 or 3 for red, yellow and green respectively.
    endform. " zf_layout
    *& Form zf_modify_final
    text
    --> p1 text
    <-- p2 text
    form zf_modify_final .
    CODE TO EXECUTE LIGHTS
    *start of loop
    loop at i_sales_final into wa_sales_final.
    *giving conditions and modifying as we want to change many rows
    if wa_sales_final-netwr <= 10000.
    wa_sales_final-v_lights = '1'.
    modify i_sales_final from wa_sales_final transporting v_lights.
    elseif wa_sales_final-netwr > 10000 and wa_sales_final-netwr <= 100000.
    wa_sales_final-v_lights = '2'. " Exception.
    modify i_sales_final from wa_sales_final transporting v_lights.
    else.
    wa_sales_final-v_lights = '3'. " Exception.
    modify i_sales_final from wa_sales_final transporting v_lights.
    endif.
    endloop.
    reward point s if helpful
    rohan malik

Maybe you are looking for

  • Family Sharing not showing Organizer's Purchases for other family members

    I have enabled Family Sharing on my device as the Organizer and added my wife's Apple ID to my list of family members.  She has accepted the invitation on her end and we both see each other in the Family Sharing list within Settings->iCloud->Family S

  • Is it not possible to create a PR with Fixed vendor without an Info-record

    Hi, We have a requirement in which data necessary for PR(Purchase Requisition) creation ( replenishment orders ) comes from a legacy system and we use the BAPI -BAPI_REQUISITION_CREATE to create the PR's. The problem is when we try to create PR by us

  • DVD Studio 2 Templates Location?

    Hi, I have a new iMac with Lion. I've upgraded to FCPX and all is fine, until I went to author a DVD... Now I still have FCS2, but it won't install in my new machine as it won't accept PowerPC installs. So I grabbed DVD Studio Pro from my back-up fro

  • Generic Data source based on Infoset

    Hi, I have a Generic data source based on Infoset. i need hostorical data from this data source, when i extract it is given me only current data. Infoset based on PNPCE logical database, in the Infoset query (ECC6) when i select "All" it gives all da

  • Accordion Ipad

    Hi All, I have created a new component based on SAP accordion. The only change is It will allow multiple sections to be opened at one time. However I am stuck up with tap and hold functionality of this. When user taps and holds the component for some