ICal To Do's Multi-Level Sort

Since there does not appear to be a way to sort To Do's by more than one level in iCal's interface, does anyone know if there is a way to do this via AppleScript?
Essentially, I would like to sort my To Do's by Due Date, then Priority, then Title. This way, every due "today" will be at the top of the list, with the most important items first.

This has been a problem with iCal for at least the last five years. From time to time it has disappeared but has always reappeared again. It drove me away from iCal to Entourage because I have to be able to manually sort my tasks. I played with iCal in Leopard not long after it was released and was pleased to see that iCal had stopped randomly moving my manually sorted tasks around, so I took the time to move all my stuff back over to ical/mail/address book. Not long after that iCal started randomly moving the tasks around again. I've reported it as a bug a few times. Spent far too long researching on the web to see if there's a fix. Fact is it just infuriating and I've promised myself I'll try not to give it any more of my attention. Whoops! I just did.

Similar Messages

  • LightSwitch HTML multi-level tile navigation menu

    I am working on a multi-level tile navigation system for the LS HTML client.  The idea is to have tiles on the home screen that when tapped navigate to a lower-level screen with more tiles that eventually lead to browse screens with the actual LS data. 
    Here is what I have so far (simplified of course).  Looking for suggestions on how to improve this.  TIA!
    Home navigation tiles (these tiles appear on the application Home Screen)
    -Orders - tap goes to Orders Home screen with additional tiles.
    -Customers - tap goes to Customers Home screen with additional tiles.
    -Lookups - tap goes to Lookups Home screen with additional tiles.
    Order Navigation Tiles (these tiles appear on the Order home screen)
    -Orders (search/browse Orders)
    -Returns (screen based on a modeled query of Orders)
    -other tiles for screens based on modeled queries of Orders
    Customer Navigation Tiles (these tiles appear on a Customers home screen)
    -Customers (search/browse Customers)
    -other tiles based on modeled queries of Customers
    Lookup Navigation Tiles
    - Each tile links to a browse screen for one of the lookup tables.
    >>>>
    (didn't create an image/icon for this yet)
    >>> ItemTap leads to a browse screen for "Test Records".
    To power this menu system, there is a database table MenuTiles.
    MenuTiles:
    Title
    Description
    ScreenId
    MenuGroup choicelist
    -HomeGroup
    -OrderGroup
    -CustomerGroup
    ImageFileName (contains the name of the static image file for the tile)
    I have three modelled queries to get the tiles associated with each group.  The Home Screen gets its tiles from a modelled query selecting the tiles with MenuGroup == HomeGroup.  The other screens work the same way respectively.
    The Home screen has the following js.  The other screens have similar methods.
    myapp.Home.ImageFileName_render = function (element, contentItem) {
    contentItem.dataBind("value", function (newValue) {
    var newFileName = newValue;
    if (newFileName !== null && newFileName !== undefined) {
    element.innerHTML = "<image src='Content/Images/Tiles/" + newFileName + ".png'>";
    myapp.Home.MenuTilesHomeGroup_ItemTap_execute = function (screen) {
    var entity = screen.MenuTilesHomeGroup.selectedItem;
    var modelItem = entity.details.properties["ScreenId"].value;
    if (modelItem !== null && modelItem !== undefined) {
    myapp.showScreen('Browse' + modelItem);
    This all seems to work well.  The databind on the ImageFileName keeps the images updated on the screen if they are added or changed.  The ItemTap_execute function correctly navigates to a lower level navigation screen or a browse screen for the
    appropriate entity collection.
    The problem I have with it is it seems to rely on magic strings and that sort of thing.  For example, if the ScreenId does not match the name of a screen it will error.  If the ImageFileName does not match an image in the folder, it shows the default
    placeholder.  Is there a better way to do this?

    Nice Job Hessc!  I also like Dales tile menu that Dave mentioned.
    For a look at another example, albeit not multi-level, see how
    syncfusion does tiles in this demo:
    Javascript
    myapp.Home.ScreenContent_render = function (element, contentItem) {
    TileCreation(element, contentItem);
    $(".tile-li").on("click", function (args) {
    var screen = args.currentTarget ? $(args.currentTarget).attr('data') : "";
    myapp.showScreen(screen);
    function TileCreation(element, contentItem) {
    var SampleList = [
    { imgClass: "Editor", sampleName: "Editors", screenName: "BrowseEmployeeInfo" },
    { imgClass: "DatePicker", sampleName: "DatePicker", screenName: "DatePicker" },
    { imgClass: "DateTimePicker", sampleName: "DateTimePicker", screenName: "DateTimePicker" },
    { imgClass: "TimePicker", sampleName: "TimePicker", screenName: "TimePicker" },
    { imgClass: "Editor", sampleName: "TextBoxes", screenName: "TextBoxes" },
    { imgClass: "RichTextBox", sampleName: "RichTextEditor", screenName: "RichTextEditor" },
    { imgClass: "AutoComplete", sampleName: "AutoComplete", screenName: "AutoComplete" },
    { imgClass: "DropDownList", sampleName: "DropDownList", screenName: "DropDownList" },
    { imgClass: "Slider", sampleName: "Slider", screenName: "Slider" },
    { imgClass: "ProgressBar", sampleName: "ProgressBar", screenName: "ProgressBar" },
    { imgClass: "grid", sampleName: "Grid", screenName: "Grid" },
    { imgClass: "Chart", sampleName: "Chart", screenName: "Chart" },
    { imgClass: "CircularGauge", sampleName: "CircularGauge", screenName: "CircularGauge" },
    { imgClass: "LinearGauge", sampleName: "LinearGauge", screenName: "LinearGauge" },
    { imgClass: "DigitalGauge", sampleName: "DigitalGauge", screenName: "DigitalGauge" },
    { imgClass: "TreeMap", sampleName: "TreeMap", screenName: "TreeMapFlatCollection" },
    { imgClass: "Maps", sampleName: "Maps", screenName: "Maps" },
    { imgClass: "RangeNavigator", sampleName: "RangeNavigator", screenName: "RangeNavigator" },
    { imgClass: "BulletGraph", sampleName: "BulletGraph", screenName: "BulletGraph" },
    { imgClass: "ReportViewer", sampleName: "ReportViewer", screenName: "ReportViewer" }
    var root = $('<ul class="tile-ul"></ul>'), content = "";
    $(element).append(root);
    $(SampleList).each(function (i, val) {
    content = "<li class='tile-li' data='" + val.screenName + "'> " +
    "<div><span class= 'innerList tile-img " + val.imgClass + "'>" + "</span>"
    + "<span class= 'innerList tile-txt'>" + val.sampleName + "</span></div>"
    + "</li>"
    $(root).append(content);
    // to remove screen display name in layout
    $(".msls-label").remove();
    CSS:
    /*Sample Layout design CSS*/
    ul.tile-ul {
    list-style-type: none;
    margin: 30px 0;
    padding: 0;
    li.tile-li {
    float: left;
    font-size: 16px;
    height: 157px;
    width: 157px;
    li.charttile-li {
    float: left;
    font-size: 16px;
    height: 157px;
    width: 157px;
    li.charttile-li span.tile-img {
    border: 1px solid #606161;
    display: block;
    height: 100px;
    margin: 0 auto;
    width: 100px;
    background- center;
    background-repeat: no-repeat;
    background-color: #282827;
    .charttile-li > div {
    text-align: center;
    li.charttile-li span.tile-img:hover {
    border: 1px solid #606161;
    background-color: #474747;
    li.charttile-li span.tile-img:active {
    border: 1px solid #606161;
    background-color: #191818;
    li.charttile-li span.tile-img.Chart {
    background-image: url("SampleImg/Chart.png");
    li.gridtile-li {
    float: left;
    font-size: 16px;
    height: 157px;
    width: 157px;
    li.gridtile-li span.tile-img {
    border: 1px solid #606161;
    display: block;
    height: 100px;
    margin: 0 auto;
    width: 100px;
    background- center;
    background-repeat: no-repeat;
    background-color: #282827;
    .gridtile-li > div {
    text-align: center;
    li.gridtile-li span.tile-img:hover {
    border: 1px solid #606161;
    background-color: #474747;
    li.gridtile-li span.tile-img:active {
    border: 1px solid #606161;
    background-color: #191818;
    li.gridtile-li span.tile-img.grid {
    background-image: url("SampleImg/grid.png");
    .tile-li > div {
    text-align: center;
    li.tile-li span.tile-img {
    border: 1px solid #606161;
    display: block;
    height: 100px;
    margin: 0 auto;
    width: 100px;
    background- center;
    background-repeat: no-repeat;
    background-color: #282827;
    li.tile-li span.tile-img:hover {
    border: 1px solid #606161;
    background-color: #474747;
    li.tile-li span.tile-img:active {
    border: 1px solid #606161;
    background-color: #191818;
    li.tile-li span.tile-img.Editor {
    background-image: url("SampleImg/Editor.png");
    li.tile-li span.tile-img.grid {
    background-image: url("SampleImg/grid.png");
    li.tile-li span.tile-img.Employee {
    background-image: url("SampleImg/EmpManage.png");
    li.tile-li span.tile-img.CircularGauge {
    background-image: url("SampleImg/Radial Gauge.png");
    li.tile-li span.tile-img.DigitalGauge {
    background-image: url("SampleImg/Digital Gauge.png");
    li.tile-li span.tile-img.LinearGauge {
    background-image: url("SampleImg/Linear Gauge.png");
    li.tile-li span.tile-img.Chart {
    background-image: url("SampleImg/Chart.png");
    li.tile-li span.tile-img.RangeNavigator {
    background-image: url("SampleImg/RangeNavigator.png");
    li.tile-li span.tile-img.BulletGraph {
    background-image: url("SampleImg/BulletGraph.png");
    li.tile-li span.tile-img.TreeMap {
    background-image: url("SampleImg/TreeMap.png");
    li.tile-li span.tile-img.Maps {
    background-image: url("SampleImg/Maps.png");
    li.tile-li span.tile-img.ReportViewer {
    background-image: url("SampleImg/ReportViewer.png");
    li.charttile-li span.tile-img.MultipleAxes {
    background-image: url("SampleImg/MultipleAxes.png");
    li.charttile-li span.tile-img.Chart3D {
    background-image: url("SampleImg/Chart3D.png");
    li.charttile-li span.tile-img.LiveChart{
    background-image: url("SampleImg/LiveChart.png");
    li.charttile-li span.tile-img.CombinationChart {
    background-image: url("SampleImg/CombinationChart.png");
    li.charttile-li span.tile-img.DrillDown {
    background-image: url("SampleImg/DrillDown.png");
    li.gridtile-li span.tile-img.FlatGrid {
    background-image: url("SampleImg/FlatGrid.png");
    li.gridtile-li span.tile-img.Exporting {
    background-image: url("SampleImg/Exporting.png");
    li.gridtile-li span.tile-img.Summary {
    background-image: url("SampleImg/Summary.png");
    li.gridtile-li span.tile-img.ColumnTemplate{
    background-image: url("SampleImg/ColumnTemplate.png");
    li.tile-li span.tile-img.DatePicker {
    background-image: url("SampleImg/DatePicker.png");
    li.tile-li span.tile-img.DateTimePicker {
    background-image: url("SampleImg/DateTimePicker.png");
    li.tile-li span.tile-img.TimePicker {
    background-image: url("SampleImg/TimePicker.png");
    li.tile-li span.tile-img.RichTextBox {
    background-image: url("SampleImg/RichTextBox.png");
    li.tile-li span.tile-img.AutoComplete {
    background-image: url("SampleImg/AutoComplete.png");
    li.tile-li span.tile-img.DropDownList {
    background-image: url("SampleImg/DropDownList.png");
    li.tile-li span.tile-img.Slider {
    background-image: url("SampleImg/Slider.png");
    li.tile-li span.tile-img.ProgressBar {
    background-image: url("SampleImg/ProgressBar.png");
    .e-handle.e-select.ui-link {
    margin: 0 0 0 -16px !important;
    width: 28px !important;
    height:17px !important;
    .msls-label {
    margin-bottom: 8px;
    .innerList.tile-txt {
    display: block;
    word-wrap: break-word;
    font-family: 'Segoe UI';
    font-size: 14px;
    color: #cececd;
    margin-top:5px;
    .innerList.tile-txt:hover {
    color: #bababa;
    .innerList.tile-txt:active {
    color: #eaeaea;
    .msls-header .msls-header-area {
    padding: 2px 25px;
    .msls-title-container .msls-title{
    padding-top:2px;
    h1.msls-title .msls-text-container, .msls-control-header .msls-text-container {
    letter-spacing: 1px;
    white-space: pre-line;
    .ui-body-a, .ui-overlay-a {
    background: none repeat scroll 0 0 #111111 !important;
    .msls-dialog-inner-frame.ui-body-a.msls-rows-layout {
    background: none repeat scroll 0 0 #111111 !important;
    .msls-footer.ui-footer.ui-bar-a {
    background-color: black !important;
    .msls-dialog-inner-frame {
    border-color:#484848 !important ;
    .ui-header-fixed, .ui-footer-fixed {
    z-index:0;
    .msls-content {
    padding-top:8px;
    #msls-id-app-loading {
    border-top-width:1px;
    .msls-label.msls-label-align-left {
    padding-top:7px;
    .msls-tabs-container.ui-corner-all.ui-controlgroup.ui-controlgroup-horizontal {
    padding-top: 12px;
    @media (min-width: 320px) and (max-width:470px) {
    li.tile-li, li.gridtile-li, li.charttile-li{
    height: 150px;
    width: 140px;
    .msls-header .ui-title {
    color: #eee;
    font-family: "Segoe UI";
    font-size: 13px;
    @media (min-width: 480px) {
    li.tile-li, li.gridtile-li, li.charttile-li{
    height: 150px;
    width: 147px;
    Some things to notice are CSS classes are used to assign images and since it renders straight <UL> in a custom control, it prevents rendering all the extra DOM elements that LS tile list has - might make some customizations of look & feel
    easier.
    HTH,
    Josh

  • Service Ticket multi level category

    Hi
    We are in the process of extending our multi level categorzation for service tickets from 3 to 4 in CRM5
    But I realize that we have too many values to maintain in the code/code groups as well as category modeler and this is going to affect the response time, im talking of over 1000 values
    Is there a way for me to populate this new category 4 level with values direct from sort of table? I dont want this linked to my category 1,2,3 levels
    I thought that maybe theres a way for us to this instead of going EEWB and workbench route
    Please advise
    Thanks
    Krishna

    Hi Martin
    Multi-Level Categorization for Interaction Record is 100% completely possible.
    There is a snag however.
    In the Interaction Record you only get one field to view the category.
    So if you have say 3 tier category in your one field it would look like this.
    Kitchen equipment (Category 1)
    Cutlery (Category 2)
    Knives (Category 3)
    Forks (Category 3)
    Entertainment Equipment (Category 1)
    TV (Category 2)
    Widescreen (Category 3)
    Plasma (Category 3)
    Hifi (Category 2)
    Not so loud (Category 3)
    Really loud (Category 3)
    (There would be indentations between each level but is too hard to format within this interface)
    It looks really naff and doesn't take long before you start running out of space.
    It's fine of you have a handful of categories, but it just wasn't useful for us.
    We went with Service Tickets to 3 levels. SAP Standard will allow up to 4, plus customizing you can go to 9 I think.
    Each Category fits in it own field so very readible.
    Hope this helps
    Regards
    Arden

  • Multi-level BOM explosion using CS_BOM_EXPL_MAT_V2

    Hi All,
    I would like to know, if anyone has used the function module 'CS_BOM_EXPL_MAT_V2' to prepare a report to read multi-level BOM just like CS12. If anyone has, can you please let me know how we can read the individual materials in the BOM from this FM.
    Hope my question is clear, await inputs.
    Vivek

    Hi vivek,
    We use this code to restrict the BOM line item for particular movements. C if that can help u out.
    CALL FUNCTION 'CS_BOM_EXPL_KND_V1'
        EXPORTING
          capid                       = ''
          datuv                       = sy-datum
          emeng                       = 1
         mehrs                       = 'X'
          mtnrv                       = i_mseg-matnr
          stlal                       = '1'
          stlan                       = '1'
          stpst                       = 0
          svwvo                       = 'X'
          werks                       = i_mseg-werks
          vbeln                       = aufk-kdauf
          vbpos                       = aufk-kdpos
            VERID                       = ' '
          vrsvo                       = 'X'
          IMPORTING
            TOPMAT                      =
            DSTST                       =
         TABLES
           stb                         = ZStb
            MATCAT                      =
        EXCEPTIONS
          alt_not_found               = 1
          call_invalid                = 2
          material_not_found          = 3
          missing_authorization       = 4
          no_bom_found                = 5
          no_plant_data               = 6
          no_suitable_bom_found       = 7
          conversion_error            = 8
          OTHERS                      = 9
      IF sy-subrc <> 0.
          MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                  WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      SORT zstb BY mtart.
      LOOP AT zstb.
        IF zstb-mtart = 'Material type ' OR zstb-mtart = 'Material type ' .
        ELSE.
          DELETE zstb .
        ENDIF.
      ENDLOOP.
      CLEAR: v_menge, v_matnr, v_bwart, vv_menge, vvv_menge, zstb.
      LOOP AT zstb.
        SELECT menge matnr bwart
        INTO   (v_menge,v_matnr,v_bwart)
        FROM   aufm
        WHERE  aufnr = i_mseg-aufnr
        AND    werks = i_mseg-werks
        AND    matnr = zstb-idnrk
        AND    ( bwart = '261' OR bwart = '262' ).
              and    meins = 'FT2'.
         LOOP AT zstb.
          SELECT SINGLE matnr INTO vv_matnr FROM mara  WHERE  matnr = v_matnr
                                       AND mtart = zstb-mtart.
          IF sy-subrc = 0.
            CASE v_bwart.
              WHEN '261' .
                vv_menge = vv_menge + v_menge.
              WHEN '262' .
                vvv_menge = vvv_menge + v_menge.
            ENDCASE.
          ENDIF.
             ENDLOOP.
        ENDSELECT.
        CLEAR vf_menge.
        vf_menge = vv_menge - vvv_menge.
        CLEAR vv_menge.
        CLEAR vvv_menge.
    Regards,
    Vishal

  • Multi level where used list (cs_where_use_mat)

    How to get Multi level where use list of a component?
    CS_WHERE_USE_MAT has details of a material. but i need to dig where use list for all materials of that component.  CS15 does not give compleate details(only few fields are there)

    Check the below program :
    REPORT ZPPR_BOM_INFOL_REPORT no standard page heading
                     line-size 160
                     line-count 60.
    ======================================================================
    Program Name : ZPPR_BOM_INFOL_REPORT
    Table definition                                                    *
    TABLES: mast,
            stko,
            stpo,
            T418,
            makt.
    TYPE - POOLS
    TYPE-POOLS: slis.
    Constants
    constants : c_tcode(4) type c value 'CS03',
                gc_formname_top_of_page TYPE slis_formname
                VALUE 'TOP_OF_PAGE'.
    Variables
    data : v_maktx like makt-maktx,
           wa_stko like stko.
    DATA:
    Objekttyp 'Material'
       otyp_mat(1) TYPE c VALUE '1',
       ootyp_mat(1) TYPE c VALUE 'M',
    Objekttyp 'kein Objekt'
       otyp_noo(1) TYPE c VALUE '2',
    Objekttyp 'Dokument'
       otyp_doc(1) TYPE c VALUE '3',
    Objekttyp 'Klasse'
       otyp_kla(1) TYPE c VALUE '4',
    Objekttyp 'Intramaterial'
       otyp_ntm(1) TYPE c VALUE '5'.
    maximal anzeigbare Menge
    data:   max_num(7)  TYPE p DECIMALS 3 VALUE '9999999999.999',
            ueberl_kz(1) TYPE c VALUE '*',
            min_num(7)  TYPE p DECIMALS 3 VALUE '9999999999.999-',
            b_flag(1) TYPE c VALUE 'X',
            ecfld(250) TYPE c,
            v_flag type c.
    ALV Variables
    DATA: gt_fieldcat TYPE slis_t_fieldcat_alv,
          gs_layout   TYPE slis_layout_alv,
          gs_keyinfo  TYPE slis_keyinfo_alv,
          gt_sp_group TYPE slis_t_sp_group_alv,
          gt_events   TYPE slis_t_event.
    DATA: g_repid LIKE sy-repid.
    DATA: gt_list_top_of_page TYPE slis_t_listheader,
                g_tabname_header TYPE slis_tabname,
                g_tabname_item   TYPE slis_tabname,
                g_save(1) TYPE c,
                gx_variant LIKE disvariant,
                g_variant LIKE disvariant,
                g_default(1) TYPE c,
                g_exit(1) TYPE c.
    Includes                                                             *
    INCLUDE .
    Internal Table Declaration                                           *
    DATA: t_mast LIKE STANDARD TABLE OF mast WITH HEADER LINE.
    *DATA: t_makt LIKE STANDARD TABLE OF makt WITH HEADER LINE.
    BOM Function module Related
    DATA: t_matcat  LIKE cscmat OCCURS 0 WITH HEADER LINE.
    Internal Table for Level by Level Function module
    DATA: t_stb  LIKE stpox OCCURS 0 WITH HEADER LINE.
    Get the Relevant data from FM
    DATA: BEGIN OF hd_tab OCCURS 0,
             stufe LIKE stpox-stufe,
             vwegx LIKE stpox-vwegx,
          END OF hd_tab.
    Final Output
    DATA: BEGIN OF alv_stb OCCURS 0.
            INCLUDE STRUCTURE stpox_alv.
    DATA:   info(3)   TYPE c,
          END OF alv_stb.
    DATA: BEGIN OF stb_orig.
            INCLUDE STRUCTURE stpox.
    DATA: END OF stb_orig.
    DATA: BEGIN OF stb_add.
            INCLUDE STRUCTURE stpol_add.
    DATA: END OF stb_add.
    Internal Table for STPO
    *-- BOM Line item
    TYPES: BEGIN OF ty_stpo,
           stlty TYPE stpo-stlty,
           stlnr TYPE stpo-stlnr,
           stlkn TYPE stpo-stlkn,
           stpoz TYPE stpo-stpoz,
           idnrk TYPE stpo-idnrk,
           meins TYPE stpo-meins,
           menge TYPE stpo-menge, "Component Qty
           END OF ty_stpo.
    DATA: t_stpo TYPE STANDARD TABLE OF ty_stpo WITH HEADER LINE.
    *-- BOM Header
    TYPES: BEGIN OF ty_stko,
           stlty TYPE stko-stlty,
           stlnr TYPE stko-stlnr,
           stlal TYPE stko-stlal,
           stkoz TYPE stko-stkoz,
           bmein TYPE stko-bmein,
           bmeng TYPE stko-bmeng,
           END OF ty_stko.
    DATA: t_stko TYPE STANDARD TABLE OF ty_stko WITH HEADER LINE .
    data : t_makt like makt occurs 0 with header line.
    DATA: BEGIN OF cl_clstab OCCURS 0,                          "YHG079407
             class LIKE klah-class,                             "YHG079407
             klart LIKE klah-klart,                             "YHG079407
             chked LIKE csdata-xfeld,                           "YHG079407
             noobj LIKE csdata-xfeld,                           "YHG079407
             dsply LIKE csdata-xfeld,                           "YHG079407
          END OF cl_clstab.
    *-- Header table
    TYPES: BEGIN OF ty_main_material,
           matnr TYPE mast-matnr, "Material
           werks TYPE mast-werks, "Plant
           maktx TYPE makt-maktx, "Description
           stlal TYPE mast-stlal, "Alternative BOM
           stlnr TYPE stko-stlnr, "BOM Number
           bmein TYPE stko-bmein, "UOM
           bmeng TYPE stko-bmeng, "Base Qty
           expand(1) TYPE c,      "Expanding Field
           END OF ty_main_material.
    DATA: t_main_material TYPE STANDARD TABLE OF ty_main_material WITH
          HEADER LINE.
    *-- Item (Component) Table
    TYPES: BEGIN OF ty_item_material,
           matnr TYPE mast-matnr, "Material
           werks TYPE mast-werks, "Plant
           idnrk TYPE stpo-idnrk, "Component (Material)
           maktx TYPE makt-maktx, "Description
           stlal TYPE mast-stlal, "Alternative BOM
           stlnr TYPE stpo-stlnr, "BOM Number
           meins TYPE stpo-meins, "UOM
           menge TYPE stpo-menge, "Base Qty
           END OF ty_item_material.
    DATA: t_item_material TYPE STANDARD TABLE OF ty_item_material WITH
          HEADER LINE.
    Selection Screen                                                     *
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS: p_werks LIKE marc-werks DEFAULT '1000' OBLIGATORY.
    SELECT-OPTIONS s_stlal FOR mast-stlal .
    SELECT-OPTIONS s_stlan FOR mast-stlan DEFAULT '1'.
    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
    SELECTION-SCREEN SKIP.
    PARAMETERS: p_bomlst RADIOBUTTON GROUP g1 DEFAULT 'X'.
    SELECT-OPTIONS s_matnr FOR mast-matnr.
    SELECTION-SCREEN SKIP.
    PARAMETERS: p_compon RADIOBUTTON GROUP g1.
    SELECT-OPTIONS: s_idnrk FOR stpo-idnrk.
    SELECTION-SCREEN END OF BLOCK b2.
    SELECTION-SCREEN END OF BLOCK b1.
    selection-screen begin of block b03 with frame title text-b03.
    selection-screen begin of line.
    selection-screen comment 1(40) text-005.
    parameters: p_all radiobutton group r1 default 'X'.
    selection-screen end of line.
    selection-screen begin of line.
    selection-screen comment 1(40) text-006.
    parameters: p_one radiobutton group r1 .
    selection-screen end of line.
    selection-screen end of block b03.
    SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-003.
    PARAMETERS: p_vari LIKE disvariant-variant.
    SELECTION-SCREEN END OF BLOCK b3.
    At slection screen events                                            *
    *-- Process on value request
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_vari.
      PERFORM f4_for_variant.
    Intitialisation
    INITIALIZATION.
      g_repid = sy-repid.
      g_tabname_header = 'T_MAIN_MATERIAL'.
      g_tabname_item   = 'T_ITEM_MATERIAL'.
    *-- define keyinformation
      CLEAR gs_keyinfo.
      gs_keyinfo-header01 = 'MATNR'.
      gs_keyinfo-item01   = 'MATNR'.
      PERFORM e03_eventtab_build USING gt_events[].
      PERFORM e04_comment_build  USING gt_list_top_of_page[].
      PERFORM e07_sp_group_build USING gt_sp_group[].
      PERFORM e08_layout_build   USING gs_layout.
    Set Options: save variants userspecific or general
      g_save = 'A'.
      PERFORM variant_init.
    Get default variant
      gx_variant = g_variant.
      CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
           EXPORTING
                i_save     = g_save
           CHANGING
                cs_variant = gx_variant
           EXCEPTIONS
                not_found  = 2.
      IF sy-subrc = 0.
        p_vari = gx_variant-variant.
      ENDIF.
    S T A R T - O F - S E L E C T I O N *******************
    start-of-selection.
      if p_all = 'X'.
    Get the data from MAST and MAKT Table
        if p_bomlst = 'X'.
      Get the data Based On Material #
          perform get_data.
        else.
      Get the data Based On Component
          perform get_data_component.
        endif.
      else.
    Get the Single Level Report
    *-- Moved the fiedl catalog here inorder to change the layout based on
    *-- Selection
        PERFORM e01_fieldcat_init  USING gt_fieldcat[].
        PERFORM select_data.
      endif.
    E N D - O F - S  E  L  E  C  T  I  O  N *******************
    end-of-selection.
      if p_one = 'X'.
        perform alv.
      endif.
    User Command
    at line-selection.
    Interactive to CS03 Transaction
      case sy-ucomm.
        when 'PICK' or 'F2'.
          if not alv_stb-idnrk is initial .
            if not alv_stb-werks is initial.
              if not alv_stb-objty is initial.
                SET PARAMETER ID 'MAT' FIELD alv_stb-idnrk.
                SET PARAMETER ID 'WRK' FIELD alv_stb-werks.
                SET PARAMETER ID 'CSV' FIELD alv_stb-OBJTY.
                call transaction c_tcode and skip first screen.
              endif.
            endif.
          endif.
          clear alv_stb.
      endcase.
    *&      Form  get_data
          Get data from MAST and MAKT Table
    FORM get_data.
      data : wa_lines type sy-index.
      REFRESH : T_MAST,
                t_STB,
                t_MATCAT,
                alv_STB.
      CLEAR : T_MAST,
                t_STB,
                t_MATCAT,
                alv_STB.
    Get the data from MAST Table
    Get all the information from MAST - BOM Table
      SELECT * FROM mast INTO TABLE t_mast WHERE matnr IN s_matnr AND
                                                 werks = p_werks  AND
                                                 stlan IN s_stlan AND
                                                 stlal IN s_stlal.
      describe table t_mast lines  wa_lines.
      if wa_lines is initial.
        Write:/2 'List contains no data'.
        stop.
      endif.
      loop at t_mast.
        clear : v_maktx.
    Start of change  Seshu
    Reason - Remove the new page option
        if sy-tabix ne 1.
          skip 1.
        endif.
    End of Change  Seshu
    Get the material Description
        select single maktx from makt into  v_maktx
                                 where matnr = t_mast-matnr
                                 and   spras = 'E'.
    Get the material details from STKO Table
        select single * from stko into wa_stko
                        where STLTY = 'M'
                        and   STLNR = t_mast-stlnr
                        and   STLAL = t_mast-stlal.
    Main Header for Each Material
        format color 5 on.
        write:/2 'Material',20 'Material Description',65 'Alternative BOM',
             90 'Base Qty', 115 'Base Unit'.
        format color 5 off.
        format color 1 on.
        write:/2 t_mast-matnr,20 v_maktx,65 wa_stko-STLAL, 85 wa_stko-BMENG,
               115 wa_stko-BMEIN.
        format color 1 off.
    Use the Function Module and get the format level by level
        perform get_level_level.
      endloop.
    ENDFORM.                    " get_data
    Top of page                                                  *
    top-of-page.
      perform report_header .
    *&      Form  report_header
          text
    -->  p1        text
    <--  p2        text
    FORM report_header.
      new-page line-size 160 .
      format color col_heading intensified on.
      write:/ sy-uline(160) .
    *--- Write Company Name.
      perform calc_col_and_write using    text-h00
                                          sy-linsz.
    *--- Write Report Title.
      perform calc_col_and_write using    sy-title
                                          sy-linsz.
    *--- Write User Id, Date / Time, Program Id, Page etc.
      perform write_other_hdr_details.
      write:/ sy-uline(160) .
    ENDFORM.                    " report_header
    *&      Form  calc_col_and_write
          text
         -->P_TEXT_H00  text
         -->P_SY_LINSZ  text
    FORM calc_col_and_write USING    P_TEXT
                                     P_LINSZ.
      data: col1 type i,
             col2 type i,
              len  type i,
              str  type i.
      str  = strlen( p_text ).
      col1 = ( p_linsz / 2 ) - ( str / 2 ) .
      len  = p_linsz - col1 - 2.
      write: at  /1  '|'.
      write: at  col1 p_text,
             at  sy-colno(len) space.
      write  at  160 '|'.
    ENDFORM.                    " calc_col_and_write
    *&      Form  write_other_hdr_details
          text
    -->  p1        text
    <--  p2        text
    FORM write_other_hdr_details.
      data: col1 type i,
              col2 type i,
              len  type i.
      col1 = 3.
      write:/1 '|'.
      write: at  col1 'UserId  : ',
                      sy-uname.
      len = sy-linsz - 1.
      write at sy-colno(len) space.
      col2 = sy-linsz - 18.
      write: at col2 'Date: ',
                     sy-datum mm/dd/yyyy.
      write: at sy-linsz '|'.
      write:/1 '|'.
      write: at  col1 'ReportId: ',
                      sy-repid.
      write at sy-colno(len) space.
      col2 = sy-linsz - 18.
      write: at col2 'Page: ',
                      sy-pagno.
      write: at sy-linsz '|'.
    ENDFORM.                    " write_other_hdr_details
    *&      Form  get_data_component
          Get the data based on Component level
    FORM get_data_component.
      data wa_lines type i.
    *-- Get the BOM item details
      SELECT  stlty stlnr stlkn stpoz idnrk meins menge
              FROM stpo
              INTO TABLE t_stpo
      WHERE   idnrk IN s_idnrk.
      IF sy-subrc = 0.
        CLEAR wa_lines.
        DESCRIBE TABLE t_stpo LINES wa_lines.
        IF wa_lines > 0.
          SELECT  stlty stlnr stlal stkoz bmein bmeng
                  FROM stko
                  INTO TABLE t_stko
                  FOR ALL ENTRIES IN t_stpo
          WHERE stlnr = t_stpo-stlnr.
          CLEAR wa_lines.
          DELETE ADJACENT DUPLICATES FROM t_stko COMPARING ALL FIELDS.
          DESCRIBE TABLE t_stko LINES wa_lines.
          IF wa_lines > 0.
    *-- Get the BOM item details
            SELECT * FROM mast INTO TABLE t_mast FOR ALL ENTRIES IN t_stko
                                                WHERE werks = p_werks  AND
                                                  stlnr = t_stko-stlnr
                                                  and stlal in s_stlal.
          ENDIF.
        ENDIF.
      else.
        Write:/2 'List contains no data'.
        stop.
      endif.
      loop at t_mast.
        clear : v_maktx.
    Start of change  Seshu
    Reason - Remove the new page option
        if sy-tabix ne 1.
          skip 1.
        endif.
    End of change    Seshu
    Get the material Description
        select single maktx from makt into  v_maktx
                                 where matnr = t_mast-matnr
                                 and   spras = 'E'.
    Get the material details from STKO Table
        select single * from stko into wa_stko
                        where STLTY = 'M'
                        and   STLNR = t_mast-stlnr
                        and   STLAL = t_mast-stlal.
    Main Header for Each Material
        format color 5 on.
        write:/2 'Material',20 'Material Description',65 'Alternative BOM',
             90 'Base Qty', 115 'Base Unit'.
        format color 5 off.
        format color 1 on.
        write:/2 t_mast-matnr,20 v_maktx,65 wa_stko-STLAL, 85 wa_stko-BMENG,
               115 wa_stko-BMEIN.
        format color 1 off.
    Use the Function Module and get the format level by level
        perform get_level_level.
        clear : t_mast.
      endloop.
    ENDFORM.                    " get_data_component
    *&      Form  obj_ident
          text
    FORM obj_ident.
    weder Mat noch Doc
      CHECK: T_stb-objty NE otyp_mat,
             T_stb-objty NE ootyp_mat,
             T_stb-objty NE otyp_doc,
             T_stb-objty NE otyp_ntm.
    ?T418-WA schon ok
    nein
      IF T_stb-postp NE t418-postp.
        T418 einlesen
        PERFORM t418_lesen USING T_stb-postp.
      ENDIF.
      PERFORM cl_clstab_maint.
    ?MatNr-Eingabe bei diesem PosTyp moeglich
      und keine Textposition
    trifft zu
      IF     t418-matin NE '-'
         AND t418-txpos IS INITIAL.
        aktuelles Objekt ist Material NLAG
        T_stb-objty = '1'.
        PosKurztext in ObjKurztext uebernehmen.
        T_stb-ojtxp = T_stb-potx1.
        MODIFY T_stb.
      ELSE.
        IF T_stb-objty IS INITIAL.
          T_stb-objty = '2'.
          MODIFY T_stb.
        ENDIF.
      ENDIF.
    ENDFORM.                    " obj_ident
    *&      Form  t418_lesen
          text
         -->P_T_STB_POSTP  text
    FORM t418_lesen USING   lkl_postp LIKE stpo-postp.
    T418-WA initialisieren
      CLEAR:
         t418.
    Key angeben
      t418-postp = lkl_postp.
    PosTypDefinition lesen
      READ TABLE t418.
    ENDFORM.                    " t418_lesen
    *&      Form  cl_clstab_maint
          text
    FORM cl_clstab_maint.
    nur fuer Klassenpositionen
      CHECK t_STB-OBJTY EQ OTYP_KLA.
    Teilkey der Klassenpositionentabelle
      CL_CLSTAB-CLASS = t_STB-CLASS.
      CL_CLSTAB-KLART = t_STB-KLART.
    Klassenpositionentabelle lesen
      READ TABLE CL_CLSTAB
         WITH KEY CL_CLSTAB(21)
         BINARY SEARCH.
    aktuelle Klassenposition bereits in Klassenpositionentabelle
    nein
      IF SY-SUBRC <> 0.
        Klassenposition in Klassenpositionentabelle hinzufuegen
        INSERT CL_CLSTAB INDEX SY-TABIX.
      ENDIF.
    ENDFORM.                    " cl_clstab_maint
    *&      Form  alv_stb_prep
          Printing the data as LEVEL BY LEVEL
    FORM alv_stb_prep.
      CLEAR:
          alv_stb,
          stb_orig,
          stb_add.
      IF t_stb-hdnfo IS INITIAL.
        stb_orig = t_stb.
        IF t_stb-mngko >= max_num.
          stb_add-ovfls = ueberl_kz.
        ELSE.
          IF t_stb-mngko <= min_num.
            stb_add-ovfls = ueberl_kz.
          ELSE.
            CLEAR: stb_add-ovfls.
          ENDIF.
        ENDIF.
        IF NOT t_stb-xtlnr IS INITIAL.
          stb_add-bomfl = b_flag.
        ENDIF.
        IF    NOT t_stb-knobj IS INITIAL
           OR NOT t_stb-class IS INITIAL
           OR NOT t_stb-kzclb IS INITIAL.
          stb_add-knofl = 'X'.
        ENDIF.
      ELSE.
        CHECK t_stb-stufe > 1.
        alv_stb-info = 'C30'.
        IF t_stb-ttidx <> t_matcat-index.
          READ TABLE t_matcat INDEX t_stb-ttidx.
        ENDIF.
        stb_orig-hdnfo = t_stb-hdnfo.
        stb_orig-stufe = t_stb-stufe - 1 .
        stb_orig-ojtxp = t_stb-ojtxb.
        IF NOT t_stb-altst IS INITIAL.
          stb_orig-stlal = t_stb-stlal.
          IF stb_orig-stlal(1) EQ '0'.
            stb_orig-stlal(1) = ' '.
          ENDIF.
        ENDIF.
        stb_orig-idnrk = t_matcat-matnr.
      ENDIF.
      CLEAR:
        stb_add-dobjt,
        stb_add-objic.
      CASE t_stb-objty.
        WHEN otyp_mat.
          WRITE: stb_orig-idnrk TO ecfld.
          stb_add-objic = '@A6@'.
        WHEN 'M'.
          WRITE: stb_orig-idnrk TO ecfld.
          stb_add-objic = '@A6@'.
        WHEN otyp_noo.
          WRITE: stb_orig-potx1 TO ecfld.
          stb_add-objic = '@0Q@'.
        WHEN otyp_doc.
          write stb_orig-doknr to ecfld.                        "note 489354
          IF ecfld CP '*# '. ENDIF.                             "note 489354
          sy-fdpos = sy-fdpos + 1.                              "note 489354
          CONCATENATE
    *d      stb_orig-doknr                                      "note 489354
            stb_orig-dokar
            stb_orig-doktl
            stb_orig-dokvr
    *d      INTO ecfld                                          "note 489354
            INTO ecfld+sy-fdpos                                 "note 489354
            SEPARATED BY space.
          stb_add-objic = '@AR@'.
        WHEN otyp_kla.
          CONCATENATE
            stb_orig-class
            stb_orig-klart
            INTO ecfld
            SEPARATED BY space.
          stb_add-objic = '@7C@'.
        WHEN otyp_ntm.
          WRITE: stb_orig-intrm TO ecfld.
        WHEN OTHERS.
      ENDCASE.
    *d CONDENSE ecfld.                                          "note 515408
      stb_add-dobjt = ecfld(40).
      CLEAR: ecfld.
      WRITE stb_orig-stufe TO stb_add-dstuf NO-SIGN.
    *d  MOVE-CORRESPONDING stb_orig TO alv_stb.                 "note 331962
      MOVE-CORRESPONDING stb_add TO alv_stb.
      MOVE-CORRESPONDING stb_orig TO alv_stb.                   "note 331962
      APPEND alv_stb.
    ENDFORM.                    " alv_stb_prep
    *&      Form  get_level_level
          text
    FORM get_level_level.
      REFRESH : T_STB,
                T_MATCAT,
                ALV_STB.
      CLEAR : T_STB,
              T_MATCAT,
              ALV_STB.
      CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'
           EXPORTING
                capid                 = 'PP01'
                datuv                 = sy-datum
                mktls                 = 'X'
                mehrs                 = 'X'
                mtnrv                 = t_mast-matnr
                stlal                 = '01'
                stlan                 = '1'
                stpst                 = 0
                svwvo                 = 'X'
                werks                 = p_werks
                vrsvo                 = 'X'
           TABLES
                stb                   = t_stb
                matcat                = t_matcat
           EXCEPTIONS
                alt_not_found         = 1
                call_invalid          = 2
                material_not_found    = 3
                missing_authorization = 4
                no_bom_found          = 5
                no_plant_data         = 6
                no_suitable_bom_found = 7
                conversion_error      = 8
                OTHERS                = 9.
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      CLEAR: hd_tab.
            Entry der KlassenstatusTab. initialisieren
             cl_clstab,
            Entry 'Objekte von Klassen' initialisieren
             cl_objmemo.
      REFRESH: hd_tab.
      SORT t_matcat BY index ASCENDING.
    Get the All levels
      loop at t_stb.
        IF NOT t_stb-hdnfo IS INITIAL.
          EXIT.
        ENDIF.
    Object Identification
        PERFORM obj_ident.
        READ TABLE hd_tab
            WITH KEY stufe = t_stb-stufe
                     vwegx = t_stb-vwegx
            BINARY SEARCH
            TRANSPORTING NO FIELDS.
        ?gibt es diesen Satz schon
        nein
        IF sy-subrc <> 0.
           dann in SFP-Infosatzverweistab. aufnehmen
    *d       APPEND HD_TAB.                                       "HGH054648
          hd_tab-stufe = t_stb-stufe.
                                                                "HGH054648
          hd_tab-vwegx = t_stb-vwegx.
                                                                "HGH054648
          INSERT hd_tab                                         "HGH054648
            INTO hd_tab                                         "HGH054648
            INDEX sy-tabix.                                     "HGH054648
           PosNr initialisieren
          CLEAR: t_stb-posnr.
           SFP-InfosatzKz setzen
          t_stb-hdnfo = 'X'.
            stb-objty = otyp_mat.
                                                                "HGE246532
           als SFP-Infosatz in die STB aufnehmen
          append t_stb.
        ENDIF.
    *del  ENDIF.
        clear t_stb.
      endloop.
      SORT t_stb ASCENDING BY stufe
                  index ASCENDING
    *del        POSNR ASCENDING.                                  "HGC062735
                  posnr ASCENDING                               "HGC062735
                  hdnfo DESCENDING.
      LOOP AT t_stb.
        T_stb-index = sy-tabix.
        MODIFY T_stb.
        PERFORM alv_stb_prep.
      ENDLOOP.
    Displays the Value as Level by Level
      loop at ALV_stb.
        if sy-tabix = 1.
          format color 3 on.
          write:/2 'Level',12 'Item',22 'Component',
          42 'Material Description',82 'Base Qty',
          107 'Base Unit',120 'Assembly Indicator'.
          format color 3 on.
        endif.
        if alv_stb-MEINs is initial.
          v_flag = 'X'.
        endif.
        if v_flag = 'X'.
          format color 5 on.
          write:/2 ALV_stb-STUFE,12 alv_stb-posnr,22 alv_stb-idnrk,
                 42 alv_stb-OJTXP.
          format color 1 off.
        else.
          if alv_stb-STUFE = '1'.
            format color 1 on.
            write:/2 ALV_stb-STUFE,12 alv_stb-posnr,22 alv_stb-idnrk,
                   42 alv_stb-OJTXP,72 alv_stb-mngko,
                   107 alv_stb-MEINs, 120 alv_stb-bomfl .
            format color 1 off.
          elseif alv_stb-STUFE = '2'.
            format color 2 on.
            write:/2 alv_stb-STUFE,12 alv_stb-posnr,22 alv_stb-idnrk,
                   42 alv_stb-OJTXP,72 alv_stb-mngko,
                   107 alv_stb-MEINs,120 alv_stb-bomfl.
            format color 2 off.
          elseif alv_stb-STUFE = '3'.
            format color 3 on.
            write:/2 alv_stb-STUFE,12 alv_stb-posnr,22 alv_stb-idnrk,
                    42 alv_stb-OJTXP,72 alv_stb-mngko,
                    107 alv_stb-MEINs,120 alv_stb-bomfl .
            format color 3 off.
          elseif alv_stb-STUFE = '4'.
            format color 4 on.
            write:/2 alv_stb-STUFE,12 alv_stb-posnr,22 alv_stb-idnrk,
                    42 alv_stb-OJTXP,72 alv_stb-mngko,
                    107 alv_stb-MEINs,120 alv_stb-bomfl .
            format color 4 off.
          elseif alv_stb-STUFE = '5'.
            format color 5 on.
            write:/2 alv_stb-STUFE,12 alv_stb-posnr,22 alv_stb-idnrk,
                    42 alv_stb-OJTXP,72 alv_stb-mngko,
                    107 alv_stb-MEINs,120 alv_stb-bomfl .
            format color 5 off.
          elseif alv_stb-STUFE = '6'.
            format color 7 on.
            write:/2 alv_stb-STUFE,12 alv_stb-posnr,22 alv_stb-idnrk,
                   42 alv_stb-OJTXP,72 alv_stb-mngko,
                   107 alv_stb-MEINs,120 alv_stb-bomfl.
            format color 6 off.
          elseif alv_stb-STUFE = '7'.
            format color 7 on.
            write:/2 alv_stb-STUFE,12 alv_stb-posnr,22 alv_stb-idnrk,
                   42 alv_stb-OJTXP,72 alv_stb-mngko,
                   107 alv_stb-MEINs,120 alv_stb-bomfl .
            format color  7 off.
          else.
            format color 1 on.
            write:/2 alv_stb-STUFE,12 alv_stb-posnr,22 alv_stb-idnrk,
                    42 alv_stb-OJTXP,72 alv_stb-mngko,
                    107 alv_stb-MEINs,120 alv_stb-bomfl .
            format color  1 off.
          endif.
        endif.
        hide: alv_stb.
        clear : alv_stb.
        clear v_flag.
      endloop.
    ENDFORM.                    " get_level_level
    *&      Form  f4_for_variant
          text
    FORM f4_for_variant.
      CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
             EXPORTING
                  is_variant          = g_variant
                  i_save              = g_save
                  i_tabname_header    = g_tabname_header
                  i_tabname_item      = g_tabname_item
              it_default_fieldcat =
             IMPORTING
                  e_exit              = g_exit
                  es_variant          = gx_variant
             EXCEPTIONS
                  not_found = 2.
      IF sy-subrc = 2.
        MESSAGE ID sy-msgid TYPE 'S'      NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ELSE.
        IF g_exit = space.
          p_vari = gx_variant-variant.
        ENDIF.
      ENDIF.
    ENDFORM.                    " f4_for_variant
          FORM E03_EVENTTAB_BUILD                                       *
    -->  E03_LT_EVENTS                                                 *
    FORM e03_eventtab_build USING e03_lt_events TYPE slis_t_event.
      DATA: ls_event TYPE slis_alv_event.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
           EXPORTING
                i_list_type = 0
           IMPORTING
                et_events   = e03_lt_events.
      READ TABLE e03_lt_events WITH KEY name = slis_ev_top_of_page
                               INTO ls_event.
      IF sy-subrc = 0.
        MOVE gc_formname_top_of_page TO ls_event-form.
        APPEND ls_event TO e03_lt_events.
      ENDIF.
    ENDFORM.
          FORM E04_COMMENT_BUILD                                        *
    -->  E04_LT_TOP_OF_PAGE                                            *
    FORM e04_comment_build USING e04_lt_top_of_page TYPE slis_t_listheader.
      DATA: ls_line TYPE slis_listheader.
    Listenüberschrift: Typ H
      CLEAR ls_line.
      ls_line-typ  = 'H'.
    LS_LINE-KEY:  not used for this type
      ls_line-info = text-001.
      APPEND ls_line TO e04_lt_top_of_page.
    Kopfinfo: Typ S
      CLEAR ls_line.
      ls_line-typ  = 'S'.
      ls_line-key  = text-050.
      ls_line-info = text-010.
      APPEND ls_line TO e04_lt_top_of_page.
      ls_line-key  = text-051.
      APPEND ls_line TO e04_lt_top_of_page.
    Aktionsinfo: Typ A
      CLEAR ls_line.
      ls_line-typ  = 'A'.
    LS_LINE-KEY:  not used for this type
      ls_line-info = text-002.
      APPEND ls_line TO  e04_lt_top_of_page.
    ENDFORM.
          FORM E07_SP_GROUP_BUILD                                       *
    -->  E07_LT_SP_GROUP                                               *
    FORM e07_sp_group_build USING e07_lt_sp_group TYPE slis_t_sp_group_alv.
      DATA: ls_sp_group TYPE slis_sp_group_alv.
      CLEAR  ls_sp_group.
      ls_sp_group-sp_group = 'A'.
      ls_sp_group-text     = text-005.
      APPEND ls_sp_group TO e07_lt_sp_group.
    ENDF

  • Can we use SNP PDS in Multi level ATP ?

    Hi All,
    We do CTM planning with existing SNP PDS In APO and now we want to explore to use the Multi level ATP functionality for GATP.  I know, MATP can create the ATP trees if the stock is not available and these can be converted into PPDS order.
    My question is, can we use SNP PDS for this purpose?
    Thanks,
    Abhilasha

    Hi Abhilasha,
    There is no such specific mention anywhere in the literature that you cannot use SNP PDS for MATP. The only downside to using SNP PDS is that SNP PDS are meant for mid to long term planning and the activities/operations in SNP PDS are usually not in detail i.e only important activities or bottle neck components are usually used which will not always facilitate detailed scheduling.
    On the other hand MATP creates ATP tree structures by plan exlosion(which can be SNP/PDS) and saves the requirements groups(component requirements of header level) with dates/qts and source of supply. It uses PPDS component to convert these ATP tree structures into PPDS planned orders depending on the conversion horizon/requirements dates. It does that by reading the source of supply, requirements dates and quantities from ATP tree structure and by plan explosion.
    When MATP planned orders are created you should no longer plan them with automatic planning run as that will cause re-explosion of the plan and might cause incorrect down stream requirements if you had had substitutions at component leve during MATP check. In planned orders, you have an option of changing the allowed sources of supply (in source of supply section). But for orders created by MATP, you will not be allowed to change the source of supply field from SNP PDS to PPDS PDS in the planned order because it will re-explode the plan. So you can decide for yourself if you can use SNP PDS as source of supply for PPDS planned orders.
    Hope that answers your question.
    Regards,
    Mohan

  • How to create a multi-level configuration sales order?

    Hi,
        My client use configurable material to sell computers. And the production mode is MTO. One sales order item correspond with a production order
        Now my client also sell array which consist of two computers, two storage, one UPS power etc. That means I must realize multi-level configuration. First, choose the computer type. Second, based on the choosed computer in first step, choose the cpu, disk and so on. And then based on the sales order item, there must be several production order related to the same sales order item.
        Now I have semi-finished product B1,B2--computer. Class type is 300. Many characteristics is allocated to the class. B type material has the BOM which consist of cpu,disk etc.
        Then I created the finished product A--array. Class type is 300. Allocated characteristics is the B1,B2. A has the BOM which consist of B1,B2 etc.
        When I create sales order, I can only config the first level,choose computers for A, can not choose cpu,disk for computers.
        So, how can I find a solution for this scenario?
        Thanks in advance.

    Thanks, Waza
    1.  Does the Sales order BOM explode in the sales order?
    No. Just one top item would be ok for my client.
    2. Why do thy want this in the sales order?  They can explode the BOM in the production order, do they then need pricing at the component level?
    They do not need pricing at the component level. Exploding the BOM in the production order is acceptable. But how can I config the configurable material in components of production order?
    I tried collective order, but the second level of configurable material can not generate production order. I just make use of special procurement 52 in MRP2 of top finished product. Is there something I missed?
    Thanks again.

  • Multi Level Phantoms

    Looking for guidance / lessons learned on phantoms. I have several assemblies that use multi level phantoms assemblies and the problem I am encountering is when the the BOMs all get pushed up to the top level, the shop order cannot be cut due to duplicates.
    A very basic example is I have screw that goes into a plate. The plate is a phantom and used on two different sub assemblies. These sub assemblies are phantoms and report to the same top level assembly that I am building. When I attempt to cut a shop order, the screw that was all the way at the bottom appears twice on the top level BOM when the two phantom BOMs are pushed up and causes an errorpreventing me from moving forward.
    I currently set my special procurement type 50 in MM03. I have heard that I could set it up on the individual BOMs, however I do not see this fixing the problem as the material and item number of the duplicate will remain the same regardless of how it was set up.
    Any advice or inputs? Please let me know if you need more detail.
    Thanks.

    Hello
    Can you please provide more details about the error? Is there an error message? Can you please provide the message ID, number and the description?
    BR
    Caetano

  • Multi level follow up material in BOM

    Dear All,
    Our client have a requirement for multi lvel follow up material in BOM.
    for example
    BOM for Finish Good made of A.
    if material A is depleted then used material B
    if material B is depleted then used material C
    if A and B have stock used A(higher priority)
    I tried to used follow up material in MRP4 and BOM but it can not be used for multi level like this case.
    Is there any solution for this?
    Best regards,
    Fred

    Hi anyway I tested the BOM master data like this
    F/G 1 Master Box
    |--- A 10 PCS  Alt Group Z1  Priority 1 Usage 100% Strategy 2 (100% Check)
    |--- B 10 PCS  Alt Group Z1  Priority 2 Usage 100% Strategy 2 (100% Check)
    |--- C 10 PCS  Alt Group Z1  Priority 3 Usage 100% Strategy 2 (100% Check)
    Stock A is depleted
    Stock B enough
    stock C enough
    Expected result F/G only used B 10 PCS
    Actual result is
    F/G 1 Master Box
    |-- A 10 PCS
    |-- B 10 PCS
    |-- C 10 PCS
    Do ou have ides how should the percentage in BOm is maintain?
    Best regards,
    Fred

  • Multi level attribute form LDAP

    multi level attribute form LDAP
    I am trying to write an custom mapping to use to retrieve a value from a multialued field in LDAP (nsRole). Has anyone done this before?
    Rigth now all my mappings are 1:1. However the goal is to get a 1 : M and parse thru it till i get the desied value (1:1)

    Darwin Hammons - Assurant 
    2:44pm, May 17 
    Great conversation. I have a very similar question about the use of the custom JAVA mappings with the LDAP Login process. I want to include an additional (event) step in the login process. Does anyone have an example or experience with a custom Java Class mapping that can use an LDAP attribute (location)  queriing the data to execute an event that populates an RequestCenter OU or Group if the person login location equal say " Argentina" ? Looking for a way to manage / build catalog entitlements during login. Suggestions ?
    Great conversation. I have a very similar question about the use of the custom JAVA mappings with the LDAP Login process. I want to include an additional (event) step in the login process. Does anyone have an example or experience with a custom Java Class mapping that can use an LDAP attribute (location)  queriing the data to execute an event that populates an RequestCenter OU or Group if the person login location equal say " Argentina" ? Looking for a way to manage / build catalog entitlements during login. Suggestions ?
    Anthony Erickson
    2:52pm, May 18  
    Hi Darwin,
    We're about to embark on a piece of work with newScale which would be similar to this to support our Multilingual catalogue.  I'll provide any updates I'm able. 
    Thanks,
    Ant 
    Darwin Hammons - Assurant 
    3:25pm, May 18 
    Great, Thanks Anthony ! I hope our bringing up this topic will spark a bit of interest. The Custom Java Mapping  / Directory integration is documented more with RC 9.1. It will be good to hear more about your project and use of Java mappings with LDAP Directories. 

  • How to create multi level reports?

    The report I have created contains 25 columns and is to wide. I would like to create a multi level report in the fashion of below:
    Col 1 Col 2 Col 3
    Row1 Row1 Row1
    Row2 Row2 Row2
    Col 5 Col 6 Col 7
    Row1 Row1 Row1
    Row2 Row2 Row2
    I am assuming this needs to be done by modifying html in a template.
    I have cut up a normal report to try and illistrate what I am thinking.
    http://i71.photobucket.com/albums/i124/breinhar/multirow.jpg
    I greatly appreciate the help. Thanks.

    Hi,
    OK - I've put together a horizontal scrolling report template for a Theme 12/Standard report: [http://apex.oracle.com/pls/otn/f?p=33642:198]
    To create this, you need to:
    1 - Through Shared Components, Templates - create a new Report Template based on a copy of the existing Standard report template.
    2 - When you have your new template, edit it.
    3 - In the template's "Before Rows" setting, replace what's there with the following:
    &lt;style type="text/css"&gt;
    #table1 th {white-space: nowrap}
    #table1 td {white-space: nowrap}
    #table2 th {white-space: nowrap}
    #table2 td {white-space: nowrap}
    &lt;/style&gt;
    &lt;table cellpadding="0" cellspacing="0" summary="" style="padding:0px; border-collapse:collapse;"&gt;#TOP_PAGINATION#
    &lt;tr&gt;&lt;td&gt;
      &lt;tr&gt;
        &lt;td style="vertical-align:top; background-color:#EFEFEF; padding:0px; border:1px solid darkgray;"&gt;
          &lt;div id="d1" style="background-color:white; margin:0px; border:0px; padding:0px;"&gt;
          &lt;/div&gt;
        &lt;/td&gt;
        &lt;td style="vertical-align:top; padding:0px; border:1px solid darkgray;"&gt;
          &lt;div id="d2" style="overflow-X:scroll; margin:0px; border:0px; padding:0px; border-right:1px solid darkgray;"&gt;
    &lt;table cellpadding="0" border="0" cellspacing="0" summary="" class="t12Standard" id="table2"&gt;4 - In the template's "After Rows" setting, replace what's there with the following:
          &lt;/div&gt;
        &lt;/td&gt;
      &lt;/tr&gt;
    &lt;/table&gt;&lt;div class="t12bottom"&gt;#EXTERNAL_LINK##CSV_LINK#&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;#PAGINATION#&lt;/table&gt;
    &lt;script type="text/javascript"&gt;
    var d1 = document.getElementById("d1");
    var t2 = document.getElementById("table2");
    var t1 = t2.cloneNode(false);
    t1.style.width = "100%";
    t1.id = "table1";
    d1.appendChild(t1);
    var t2Rows = t2.rows;
    var k;
    var r;
    var c;
    for (k = 0; k &lt; t2Rows.length; k++)
    r = document.createElement("TR");
    t1.appendChild(r);
    c = t2Rows[k].cells[0].cloneNode(true);
    r.appendChild(c);
    t2Rows[k].deleteCell(0);
    d1.innerHTML += "";
    &lt;/script&gt;5 - On your report's Report Attributes, change the template used for the report from "Standard" to your new one
    6 - Also on the report's Report Attributes, set "Enable Partial Page Refresh" to No - this is required as we need the javascript in the template to be run whenever pagination happens and Partial Page Refresh does not seem to allow us the means to trigger javascript
    7 - Finally, on the report region's Region Footer, add in:
    &lt;style type="text/css"&gt;
    #d1 {width:75px;}
    #d2 {width:500px;}
    &lt;/style&gt;#d1 refers to the width of the frozen column and #d2 is the width of the rest of the report - you can adjust these figures as required.
    The template contains two DIV tags - d1 and d2. Initially, d1 is empty and d2 contains the report. The javascript moves the first cell in each row from d2 to d1. The styles then add the scrolling functionality.
    Andy

  • How to create multi-level style pulling in a .jpg image as a bullet?

    From within RoboHelp 8 HTML, when creating/editing a 3-tier multi-level style, I want to use a .jpg image for the bullet(s).  I can not find a way to point to the image while in Edit mode.  My only choices are predefined bullets for the List Style.
    When searching for an answer within the forum, I noticed mention of a Baggage folder in RoboHelp.  I do not have a Baggage folder.  I do have links to websites accessible from within the web-based Help file I've created beneath the URLs folder in the Project Manager.
    Thank you for any help you can provide.

    Hi there
    I never really played much with adding images to the oddly formatted Multi-list styles.
    The Project Manager has two views. Sounds like you are using the new "global" view. In that view you don't see a special area labeled Baggage Files. In this view the files are simply listed among the other content. If you change the view to Classic (I think it's the first icon on the left of the pod toolbar) you will then see the Baggage Files folder.
    Cheers... Rick
    Helpful and Handy Links
    RoboHelp Wish Form/Bug Reporting Form
    Begin learning RoboHelp HTML 7 or 8 within the day - $24.95!
    Adobe Certified RoboHelp HTML Training
    SorcerStone Blog
    RoboHelp eBooks

  • "Multi-level error propagation carried out" in SCM 5.0

    When I use the SNP PPM Generation With Lot Size Margin function in SCM 5.0, I got the following error:
    Multi-level error propagation carried out
    Message no. /SAPAPO/OM242
    Could you please give me this help?
    Thanks,
    Lian

    Hi,
    Thank you for the information, but the problem is still there though I de-activated all user-exits...
    I also saw the following error:
    Invalid planning version
    Message no. /SAPAPO/OM015
    Thanks,
    Lian

  • Multi-level error propagation carried out Error in APO

    Dear Experts,
    We had developed a custom program that is same as /sapapo/rrp3 report, but the issue is when we use planning version other then 000 the custom program is giving the error ""Multi-level error propagation carried out"" but the RRP3 report works fine with all the planning versions.
    Please help to find the cause and to solve the issue.
    Thanks.
    Regards
    Abhinav Nallani.

    Dear Arek,
          The problem is not yet resolved . we have raised an OSS note for the same.
    as the relevant notes are already implemented in our case.
    regards
    Kiran

  • Error "Multi-level error propagation carried out" when I run a report

    Hi All,
    When I run the report /SAPAPO/CDPS_REPT - Order and Resource Reporting with the below criteria I getting error "Multi-level error propagation carried out"
    Planning Version - Simulation Version XXX
    Evaluation Start - 05/03/2011
    Evaluation End - 12/31/2013
    Evaluation List - Extended Operation List
    I do not get error when I run the report with selection as Active version 000 and Evaluation List as Order List, Operation List.
    I have tried by ruuning Live cache consistancy check, but the issue is not fixed
    Please help me to resolve this issue
    Thanks & Regards,
    Rajkumar

    Hi Jack,
    Please do post the server log file here so that we can try and find a solution for the problem you are facing.
    I had a problem a while ago with the app server too. While trying to run an application, after a few times, it would give me an error message saying the Application Server cannot be started. I rebooted my machine and thankfully it worked again. Just try this too and see if it works.
    If it doesnt we can go through the server log and try to identify the cause of the problem.
    Cheers :-)

Maybe you are looking for

  • HOW to create new transaction code in SAP

    Dear All Thanking you for your cooperation Pls help, how to create a new transaction code and link with the process?????????? Thanking you

  • My macbook pro not connet to internet between 9pm-9am

    new to apple. have my mac book at oct.2011, after someday at dec.2011, my mac book can't connet to wi-fi between 9pm to 9 am. is anyone know what to do?

  • Counter in XI

    Hi! I'm wondering if it is possible to use a conter in message mapping like following : counter - > target field (initial value = 0000) (increment = 1) My question is if I can use 0000 as initial value? because when I test it it only writes out only

  • Set Transfer order Priority in T-Code LT0R.

    I need to set Tfr order priority, to customer specific value. I am using 4,7 version.. Please help me out to find the appropriate user exit, for the same. Thanks . Vickey.

  • How to delete singles of the week?

    I want to remove a song from my itunes library and my iPhone 5 but i cant find anyway to do it. Its a single of the week song and i have no idea how it ended up in my library. I cant delete it from the the library and when it says it will "hide" the