Limit numbers on display for flash actionscript 3 calculator!!

hello everyone
im making a flash calculator and ive nearly finished ive got one last thing i need to do and thats limit the amount of numbers i can enter to 10
this is my code so far and im struggling on this last part any help would be appreciated
var numbers:Array = [num0_btn,num1_btn,num2_btn,num3_btn,num4_btn,num5_btn,num6_btn,num7_btn,num8_btn,num9_bt n];
var operators:Array = [divide_btn,add_btn,subtract_btn,multiply_btn,equal_btn];
var op:String;
var num1:Number;
var num2:Number;
function addListeners():void
          for(var i:uint = 0; i < numbers.length; i++)
                    numbers[i].addEventListener(MouseEvent.CLICK, pressNumber);
          for(i = 0; i < operators.length; i++)
                    operators[i].addEventListener(MouseEvent.CLICK, pressOperator);
          clear_btn.addEventListener(MouseEvent.CLICK, clearAll);
          dot_btn.addEventListener(MouseEvent.CLICK, addDot);
          back_btn.addEventListener(MouseEvent.CLICK, backSpace);
function pressNumber(event:MouseEvent):void
          var instanceName:String = event.target.name;
          var numPushed:String = instanceName.charAt(3);
          if(window_txt.text == "0" || num1 == Number(window_txt.text))
                    window_txt.text = "";
          window_txt.appendText(numPushed);
function pressOperator(event:MouseEvent):void
          var instanceName:String = event.target.name;
          var currentOp:String = instanceName.slice(0, instanceName.indexOf("_"));
          if(!num1)
                    num1 = Number(window_txt.text);
                    op = currentOp;
          else if(!num2)
                    num2 = Number(window_txt.text);
                    showCalculation();
                    op = currentOp;
function clearAll(event:MouseEvent):void
          window_txt.text = "0";
          num1 = NaN;
          num2 = NaN;
function addDot(event:MouseEvent):void
          if(num1 == Number(window_txt.text))
                    window_txt.text = "0";
          if(window_txt.text.indexOf(".") == -1)
                    window_txt.appendText(".");
function backSpace(event:MouseEvent):void
    window_txt.text = window_txt.text.substring(0, window_txt.text.length-1);
function showCalculation():void
var dividedZero:Boolean;
switch(op)
case "multiply" :
num1 *= num2;
break;
case "divide" :
if(num2 != 0) {
    num1 /= num2;
}else{
     window_txt.text = "cannot divide by zero";
     dividedZero = true;
break;
case "add" :
num1 += num2;
break;
case "subtract" :
num1 -= num2;
break;
default :
break;
if(!dividedZero){
   window_txt.text = String(num1);
num2 = NaN;
addListeners();

Like most properties, you just assign it to the Textfield, as in...
yourTextField.maxChars = 10;
As far as tips go... you should spend time learning how to use the Help documentation provided for Flash.  One key thing to realize is that most classes of objects all have the same sets of elements making them up... properties, methods, and events.  The help documents define each one of them, including those that classes inherit from other classes.
So when I said you could use the maxChars property, all you should need to do is look up the maxChars property in the TextField class section of the help documents to see how it works.
And when you get better at using the help docs, you'll realize you didn't need to ask because the first place you look when you want to know about a class is to review its properties, methods, and/or events in the help documents

Similar Messages

  • What is the best way to create a 3d map for flash/actionscript?

    Hi
    what are good and easy to use tools to create a 3d map/world - terrain, buildings, .... - for use in flash? ideally I would be able to control the objects with actionscript.
    thanks,
    Chris

    first, you should pick a 3d framework (away3d, flare3d etc) to use.  that will determine what format/tools you can use for your 3d objects.

  • Dynamic text not displaying when publishing for flash 8

    This dynamic text works fine when the movie is published for
    flash 7, but when i export for the flash 8 player it seems to be
    invisible. Is there any obvious reason for this happenning?
    thanks
    jon

    Ok, thanks, looks like you've pointed me in the right
    direction. I havent fixed it yet though. Heres where i am at:
    eval(theTarget+".buttonPrime").tex.embedFonts = false;
    now i can see my text. of course its using a default font.
    var my_fmt:TextFormat = new TextFormat();
    my_fmt.font = "arial14b";
    eval(theTarget+".buttonPrime").tex.embedFonts = true;
    eval(theTarget+".buttonPrime").tex.text = "wasssup?";
    eval(theTarget+".buttonPrime").tex.setTextFormat = my_fmt;
    this isnt working. I have added a font object to the library
    and linked it for actionscript using the monkier "arial14b".
    however my text is quite invisible. i have checcked, 'export in
    first frame' for the font object i even tried it with this
    deselected. i have deselected the embed font option on the text
    feild itself. that doesnt work either (unless i dont try to set the
    text format, so long as i accept a default font, its fine).
    so err, help?
    confused
    jon
    ps further to this is have discovered more about this strange
    behaviour. i can set the text to a different string, provided i do
    not try to embed the font in any way. if i set the font to embed, i
    can have the text display with the correct font, until i change the
    text. then it dissappears. also i cannot seem to affect properties
    like font size by means of my TextFormat object. the textFormat
    object also does not seem to affect the font of the text.
    in short, when exporting for flash 8, i cannot seem to
    successfully embed fonts for dynamic text. the only thigs i have
    gotten to work are: static text (or a dynamic text feild with
    unchanged text) with an embedded font, or dynamic text with a
    default font.

  • Can anyone recommend any good books on leaning actionscript for flash?

    Can anyone recommend any good books on leaning actionscript
    for flash?
    Intermediate level
    I have been using flash for about 2 years more as a hobby
    than anything else, some websites etc but now I realise I am going
    to need to learn more actionscripting to do what I want, I have
    come to terms with the simple stuff like goto – basic
    variables – load mov – enough to programme up website
    navigation.
    I ideally want to learn more about the dynamic side of flash,
    mostly for designing user interfaces and websites etc
    I’m after a book that doesn’t get too heavy too
    fast yet I’m a little past the more basic functions
    Any thoughts?
    Cheers

    You appear to be stuck on iOS 4.2.1. That means up really have a 2G iPod. A real 3G can go to 5.1.1
    .To find compatible apps more app for 4.2.1 see:
    Old Apps
    VintApps 3.1.3 for iPhone, iPod touch, and iPad on the iTunes App Store
    apps for ios 4.2.1: Apple Support Communities
    Finding iOS 4.2.1 Apps Compatible with Older Devices - Apple Club
    HT4972 Touch Game 4.2.1 Apps: Apple Support Communities
    apps for 4.2.1 (also works for 3.1.3)
    Tip - Finding 4.2.1 apps that work on an...: Apple Support Communities
    4.2.1 iPod 2nd generation unable to use any...: Apple Support Communities

  • Best book for flash 8/Actionscript 2.0?

    I really need to get a good book - or a couple so that I can
    hammer out some of this Actionscript 2.0 stuff. Does anyone have a
    suggestion on good books?
    Thanks!
    Amanda

    You can find documentation in the Flash help. Also, remoting
    for Flash 8 is the same as remoting for Flash MX 2004 if you find
    something for mx 2004.

  • Call stack limitation (recursive limit) for Flash Lite

    What is the call stack limitation for Flash Lite?

    Thanks for the input
    I thought I had it figured out, but I still see an occasional crash.  I put my save to flash function in a vi of its own and it runs fine.  I use the standard "write to binary file.vi"  The problem seems to be when other loops are running in parallel.  If my diagram has any timed loop structures, then it crashes.  So I removed all of my timed loops and slowed down/simplified all of the other loops.  This helped a lot.  While it used to crash about every 5th time now it will run about 50 on average but still crashes about once a day.  I am rewriting my vis to run sequentially in a single loop so that they arbitrate with each other manually (so much for real-time)  I will see if that works, but in the meantime..
    I can try the upgrade to 3.3.0 if you think that will help, but do I also have to upgrade anything else in my design environment (ie can I leave the rest of labview alone and just update the cRIO)?  If the upgrade has trouble I need to be able to revert back to where I am now.  I can't afford to begin a large upgrade which will take me down for a while.  I had a lot of trouble installing all of the Labview environment the first time, so I don't want to start something that I will regret.
    Nathan

  • Where is "Using Flash Remoting for Flash 8 ActionScript 2.0.pdf"?

    I am looking for pdf documentation for Flash Remoting using
    Flash 8. I am not interested in Live Docs.

    You can find documentation in the Flash help. Also, remoting
    for Flash 8 is the same as remoting for Flash MX 2004 if you find
    something for mx 2004.

  • Exporting for Flash Display - Some Tips

    There have been many questions on Exporting for Flash playback on the Web. This Adobe ARTICLE might provide some useful tips, and help in the understanding of the various format.
    Hope that this helps,
    Hunt

    Because different Adobe NLE's (Non Linear Editors) handle Flash material differently, and some not much at all, one likely source of additional Flash handling would be Moyea. They have several Flash programs, and even offer a Flash Importer for PrPro (prior to CS4). Unfortunately, they do not yet have a plug-in Importer for PrE.
    Hunt

  • Will there ever be patches for Flash 8?

    I just wondered if Adobe intends to issue patches for Flash 8
    instead of just Flashplayer. I reported bugs over a year ago that
    were taken up as existing and have not heard a word since. Does
    anyone know what is happening?
    Brian

    Walter,
    thanks for the reply. Yes - truly irritating!
    Although some can't be classified as true "bugs" but are
    clearly usability issues.
    I can add to that list with a few of my own - i will pick
    one:
    Properties Panel, the field that displays the frame number of
    a nested animation in a Graphic
    symbol. It is only wide enough to show 2 digits, so any
    nested animations 100 frames or longer will
    not show the entire number of frames - very annoying when you
    spend a lot of time typing in frame
    numbers to control graphic symbols and nested animations.
    I have included the items from your list that are not already
    on mine and will do what i can to see
    that the next version of flash solves some of these issues.
    And yes - not having the ability to export movie clips and
    effects to video format is the biggest
    bummer for flash 8 - i knew it during the BETA and know it
    all too well now. But I haven't regarded
    it as a total loss - i choose to find work-arounds and
    thankfully www.flashants.com has a tool
    called SWF2Video - it has saved me on many flash to video
    projects that included graphics that had
    to have bitmap filtered effects.
    anyway - i appreciate your reply and if you have anymore
    gripes - send em my way please.
    -chris
    --> **Adobe Certified Expert**
    --> www.mudbubble.com
    --> www.keyframer.com
    Walter Elias wrote:
    >
    quote:
    Originally posted by:
    Newsgroup User
    >
    > What is it about Flash 8 that is not working for you?
    You haven't mentioned it
    > yet I don't think.
    >
    > ******************************************
    >
    >
    > 1)
    > I use Flash heavily to produce television animation. I
    use a TV-safe color
    > pallette which has several hundred colors. Now try this:
    add some colors to
    > your Flash color pallette. Bring it to more than 100
    colors. Then try selecting
    > a new color in the Color Mixer or clicking the color
    swatch on the Tools panel.
    > Guess what? The swatches go off the screen. There is no
    way to access any
    > swatches other than the lower 60 or so. You can't resize
    or drag that pallette
    > window. This was untrue in earlier versions of Flash. I
    can't tell you how
    > badly this slows down work for me and all my fellow
    animators. The
    > ex-macromedia tech people told me they flagged this as a
    "critical" issue.
    > Seems to me it would be simple to revert to the earlier
    methods of handling the
    > swatch windows and release a patch.
    >
    > 2) Apply timeline ActionScript to an object. Then on a
    later frame put a mask
    > on the timeline and apply it to that object. The
    ActionScript controlling the
    > object stops working. Same in reverse: if there's a mask
    that is removed, the
    > timeline AS stops working. Workaround: repeat the Action
    Script at every frame
    > where a mask starts and stops. This was also a bug in
    Flash 7. Macromedia tech
    > support worked with me for several weeks on this, and
    finally rated this to be
    > a "critical bug".
    >
    > 3) Put any movie clip on the timeline. Do not give it an
    instance name. Add a
    > keyframe later in the movie. On that later keyframe,
    give the movie clip an
    > instance name. Then put some ActionScript on the
    timeline that refers to that
    > movie clip's instance name. It won't work. You have to
    go back and apply the
    > same instance name to every instance of that movie clip
    anywhere on the
    > timeline, even before the AS appears. Otherwise it won't
    work. Can you imagine
    > the agony of having produced a complex animation with
    hundreds of keyframes,
    > only to later decide to apply a script to several movie
    clips. You have to go
    > back and apply instance names to every one of the
    hundreds of previous
    > instances of those movie clips, or the script won't
    work.
    >
    > Is that enough? Shall I continue with all the irritating
    little user interface
    > bugs? Such as the Controller window, which you used to
    be able to tuck away
    > beneath the Tools pallette, without sacrificing screen
    real estate. But now it
    > can only appear above the timeline, which means you have
    to sacrifice a bit on
    > the size of the stage. When doing animation, every pixel
    of viewable area is
    > important!
    >
    > I could go on and on. Most of the bugs I found are
    simple to fix, since most
    > of them were not bugs in Flash 7!
    >
    > To be very honest, even though I'm a designer and
    animator, I find the
    > 'graphic enhancements' in Flash 8, like the filters, to
    be mostly useless. If
    > my clients didn't require that I use Flash 8 so that I
    can send files back and
    > forth with them, I'd do like a huge number of animators
    I know and go back to
    > Flash MX (version 6), the last stable, elegant and truly
    user-friendly version
    > of Flash.
    >

  • ALV  display for  row  s   and columns in this format.have ur full points..

    Hi ALL
      I have to dispalay data in the ALV format as :
    Basic
    DA
    HRA
    PF
    VPF
    20000
    500
    5000
    | 1500     | 600  |          |
    Details :  Basic   HRA in one Row and   PF , VPF in  second Row.
    The Amount  regarding htese fields are also displayed in the next rows for all  emp. numbers.
    its urgent for me and need helpful answers...
    Regards
    Lakhan

    see the attached code it will display the hierarchial display as per your need
    change the internal tables with dat of your own orgn structure and pass it to the fun module.
    Description : Pick Status Report
    This is an ALV report using the heirarchical ALV list display. The
    report selects all deliveries that fulfil the selection criteria
    and displays a summary of all items in that delivery with reference
    to certain statuses: overall status, goods issue status, transfer
    order status, load to pallet status, pallet count status, loaded to
    van status, van manifest printed status and end of day manifest
    printed status. These statuses have been defined by the business.
    There is extra functionality required to trigger printing of the van
    and end of day manifests from this report, and to set the loading
    end status of a shipment if the last handling unit of a particular
    shipment has been loaded onto a van for which the van manifest has
    been triggered.
    REPORT zwmr_pick_status_report NO STANDARD PAGE HEADING
    MESSAGE-ID zw.
    Type Pools
    TYPE-POOLS: icon, slis.
    Tables
    TABLES: tvst,
    likp,
    t30b,
    vekp,
    *{ INSERT UKMK900355 4
    zhu_to_link, "AS03
    *} INSERT
    zpallettr,
    vttk, "MB01
    zvantr.
    Types
    TYPES:
    BEGIN OF ty_data,
    lgtor LIKE likp-lgtor, " door
    vbeln LIKE likp-vbeln, " delivery
    wbstk LIKE vbuk-wbstk, " Goods movement status
    kostk LIKE vbuk-kostk, " Picking status
    posnr LIKE lips-posnr, " item
    route LIKE likp-route, " route
    wadat LIKE likp-wadat, " goods issue date
    lvsta LIKE vbup-lvsta, " warehouse status
    packvorschr LIKE vekp-packvorschr, " pack mnemonic
    exidv LIKE vekp-exidv, " handling unit
    zpallet_no(10), "like zpallettr-zpallet_no, " pallet no
    zdep_point LIKE zpallettr-zdep_point, "Departur Point "Jvdm01
    zcount_check LIKE zpallettr-zcount_check," count check flag
    zvan_no(10), "like zvantr-zvan_no, " van no
    zvan_print LIKE zvantr-zvan_print, " van manifest print
    tknum LIKE vttk-tknum, " Shipment No "ANV 11523
    zeod_print LIKE zvantr-zeod_print, " eod manifest print
    zzpackclass LIKE vekp-zzpackclass, " package class
    zzti LIKE vekp-zzti, " T.I. value
    vstel LIKE likp-vstel, "Shipping point RM050906
    anzpk TYPE znopack, "No of packages in dlv MB01+
    END OF ty_data.
    TYPES:BEGIN OF x_likp ,
    vbeln LIKE likp-vbeln,
    vstel LIKE likp-vstel, "RM050906
    lgtor LIKE likp-lgtor,
    zzroute2lgtor LIKE likp-zzroute2lgtor, "MB01
    route LIKE likp-route,
    wadat LIKE likp-wadat,
    zz2route LIKE likp-zz2route, "MB01+
    zzexproute LIKE likp-zzexproute, "MB01+
    zzroute2 LIKE likp-zzroute2, "MB01+
    anzpk LIKE likp-anzpk,
    END OF x_likp.
    TYPES: BEGIN OF x_vbuk,
    vbeln TYPE vbuk-vbeln,
    wbstk TYPE vbuk-wbstk, " Goods movement status
    kostk TYPE vbuk-kostk, " Picking status
    END OF x_vbuk.
    TYPES: BEGIN OF x_lips,
    vbeln TYPE lips-vbeln, " delivery
    posnr TYPE lips-posnr, " item
    pstyv TYPE lips-pstyv,
    matnr TYPE lips-matnr,
    charg TYPE lips-charg,
    END OF x_lips.
    TYPES: BEGIN OF x_vbup,
    vbeln TYPE vbup-vbeln, " delivery
    posnr TYPE vbup-posnr, " item
    lvsta TYPE vbup-lvsta, " warehouse status
    END OF x_vbup.
    TYPES: BEGIN OF x_vepo,
    venum TYPE vepo-venum, "Internal Handling Unit
    Number
    vepos TYPE vepo-vepos, "Handling Unit Item
    vbeln TYPE vepo-vbeln, " delivery
    posnr TYPE vepo-posnr, " item
    exidv TYPE vekp-exidv,
    END OF x_vepo.
    TYPES: BEGIN OF x_vepo1,
    venum TYPE vekp-venum, "Internal Handling Unit
    Number
    exidv TYPE vekp-exidv,
    END OF x_vepo1.
    Start of changes by ANV SR#11523
    TYPES: BEGIN OF x_vttp,
    tknum TYPE tknum, " Shipment No
    tpnum TYPE tpnum, " Item No
    vbeln TYPE vbup-vbeln, " delivery
    laufk LIKE vttk-laufk, " leg indicator MB01+
    END OF x_vttp.
    End of changes by ANV SR#11523
    Data
    RANGES: r_del FOR likp-vbeln,
    r_lgtor FOR likp-lgtor.
    RANGES: r_vanno FOR zvantr-zvan_no,
    r_palno FOR zpallettr-zpallet_no.
    DATA: BEGIN OF number_range OCCURS 0,
    mark(1),
    id(3),
    num(10) TYPE n,
    desc LIKE zpalletmd-zdesc,
    END OF number_range.
    DATA: t_disp_tab TYPE STANDARD TABLE OF zpickdisp,
    t_data_tab TYPE ty_data OCCURS 0 WITH HEADER LINE,
    it_likp TYPE x_likp OCCURS 0 WITH HEADER LINE, "SUM
    it_vbuk TYPE x_vbuk OCCURS 0 WITH HEADER LINE, "SUM
    it_lips TYPE x_lips OCCURS 0 WITH HEADER LINE, "SUM
    it_vbup TYPE x_vbup OCCURS 0 WITH HEADER LINE, "SUM
    it_vepo TYPE x_vepo OCCURS 0 WITH HEADER LINE, "SUM
    it_vepo2 TYPE x_vepo OCCURS 0 WITH HEADER LINE, "SUM
    *{ INSERT UKMK900355 3
    t_vepo_low TYPE x_vepo OCCURS 0 WITH HEADER LINE, " AS01
    *} INSERT
    it_vepo1 TYPE x_vepo1 OCCURS 0 WITH HEADER LINE, "SUM
    it_vttp TYPE x_vttp OCCURS 0 WITH HEADER LINE, "ANV SR#11523
    t_disp_head TYPE STANDARD TABLE OF zpickhead.
    DATA wa_item_tab TYPE zpickdisp OCCURS 0 WITH HEADER LINE.
    "ANV SR#11113
    DATA: w_numrnge LIKE number_range,
    w_number(10) TYPE n.
    DATA: t_likp LIKE likp OCCURS 0 WITH HEADER LINE,
    t_lips LIKE lips OCCURS 0 WITH HEADER LINE,
    t_vbuk LIKE vbuk OCCURS 0 WITH HEADER LINE,
    t_vbup LIKE vbup OCCURS 0 WITH HEADER LINE,
    t_vepo LIKE vepo OCCURS 0 WITH HEADER LINE,
    t_vekp LIKE vekp OCCURS 0 WITH HEADER LINE,
    t_vantr LIKE zvantr OCCURS 0 WITH HEADER LINE,
    t_pallettr LIKE zpallettr OCCURS 0 WITH HEADER LINE,
    w_likp like likp,
    w_lips LIKE lips,
    w_vbuk LIKE vbuk,
    w_vbup LIKE vbup,
    w_vepo LIKE vepo,
    w_vekp LIKE vekp,
    w_vepo TYPE x_vepo1,
    w_vbup TYPE x_vbup,
    w_vttp TYPE x_vttp, " ANV SR#11523
    w_lips TYPE x_lips,
    w_vbuk TYPE x_vbuk,
    w_likp TYPE x_likp, "MB01-+
    w_tplst LIKE vttk-tplst. "MB01+
    DATA: s_variant LIKE disvariant, "MB01+
    def_variant LIKE disvariant.
    ALV DATA *****
    DATA:
    g_grid TYPE REF TO cl_gui_alv_grid,
    g_sort TYPE slis_t_sortinfo_alv,
    g_custom_container TYPE REF TO cl_gui_custom_container,
    g_layout TYPE slis_layout_alv,
    gt_fieldcat TYPE slis_t_fieldcat_alv,
    t_fldcat LIKE LINE OF gt_fieldcat,
    g_keyinfo TYPE slis_keyinfo_alv,
    gt_events TYPE slis_t_event,
    gs_event TYPE slis_alv_event,
    w_sy_repid LIKE sy-repid.
    DATA: BEGIN OF seltab OCCURS 0.
    INCLUDE STRUCTURE rsparams.
    DATA: END OF seltab.
    SYSTEM GENERATED TABLE CONTROL DATA ********
    DECLARATION OF TABLECONTROL 'TC_TABCON' ITSELF
    CONTROLS: tc_tabcon TYPE TABLEVIEW USING SCREEN 0100.
    LINES OF TABLECONTROL 'TC_TABCON'
    DATA: g_tc_tabcon_lines LIKE sy-loopc.
    DATA: ok_code LIKE sy-ucomm.
    Constants
    CONSTANTS: c_data_class LIKE klah-class VALUE 'DG_DATA',
    c_mat_class LIKE rmclf-klart VALUE '001',
    c_pack LIKE lips-mtart VALUE 'VERP',
    c_a(1) VALUE 'A',
    c_b(1) VALUE 'B',
    c_c(1) VALUE 'C',
    c_yes(1) VALUE 'X',
    c_no(1) VALUE ' '.
    Selection screen
    standard report select options block
    SELECTION-SCREEN BEGIN OF BLOCK a WITH FRAME TITLE text-002.
    SELECT-OPTIONS:
    s_wadat FOR likp-wadat NO-EXTENSION OBLIGATORY. " Goods Issue Date
    *parameters: "TR01-
    p_vstel like tvst-vstel obligatory. " Shipping Point "TR01-
    SELECT-OPTIONS: "TR01+
    p_vstel FOR tvst-vstel. " Shipping Point "TR01+
    SELECT-OPTIONS:
    s_lfart FOR likp-lfart, " Delivery type
    s_lgtor FOR t30b-lgtor, " Door selection
    s_exidv FOR vekp-exidv, " Handling Unit
    s_vbeln FOR likp-vbeln, " Delivery "MB01-+
    s_lfdat FOR likp-lfdat. " Delivery date
    PARAMETERS:
    p_exdata AS CHECKBOX. " Show extra columns flag
    SELECTION-SCREEN END OF BLOCK a.
    van/pallet specific select options block
    SELECTION-SCREEN BEGIN OF BLOCK b WITH FRAME TITLE text-001.
    SELECT-OPTIONS:
    s_palno FOR zpallettr-zpallet_no, " no-extension,
    s_vanno FOR zvantr-zvan_no. " no-extension.
    SELECT-OPTIONS:
    s_deppnt FOR zpallettr-zdep_point, "Jvdm01
    s_tplst FOR vttk-tplst. "MB01
    SELECTION-SCREEN END OF BLOCK b.
    MB01 - START - Display variant
    SELECTION-SCREEN BEGIN OF BLOCK c WITH FRAME TITLE text-019.
    PARAMETERS: p_vari LIKE disvariant-variant.
    SELECTION-SCREEN END OF BLOCK c.
    MB01 - END
    Value Request Events
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_palno-low.
    CLEAR: number_range, w_number .
    REFRESH number_range.
    select numbers and display pop up screen for selection
    PERFORM select_pal_nos.
    s_palno-low = w_number.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_palno-high.
    CLEAR: number_range, w_number .
    REFRESH number_range.
    select numbers and display pop up screen for selection
    PERFORM select_pal_nos.
    s_palno-high = w_number.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_vanno-low.
    CLEAR: number_range, w_number .
    REFRESH number_range.
    select numbers and display pop up screen for selection
    PERFORM select_van_nos.
    s_vanno-low = w_number.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_vanno-high.
    CLEAR: number_range, w_number .
    REFRESH number_range.
    select numbers and display pop up screen for selection
    PERFORM select_van_nos.
    s_vanno-high = w_number.
    MB01 - START - display variant
    F4-Help for variant
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_vari.
    PERFORM f4_for_variant.
    MB01 - END
    At Selection Screen
    AT SELECTION-SCREEN.
    PERFORM validate_selections.
    Initialization
    INITIALIZATION.
    MB01 - START INSERT
    1. Transportation planning point
    Import transportation planning point from user parameters and
    populate
    select option.
    GET PARAMETER ID 'TDP' FIELD w_tplst.
    MOVE: 'I' TO s_tplst-sign,
    'EQ' TO s_tplst-option,
    w_tplst TO s_tplst-low.
    APPEND s_tplst.
    2. Display variant
    CLEAR s_variant.
    s_variant-report = sy-repid.
    Get default variant
    s_def_variante = s_variant.
    CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
    EXPORTING
    i_save = 'A'
    CHANGING
    cs_variant = s_variant
    EXCEPTIONS
    not_found = 2.
    IF sy-subrc = 0.
    p_vari = s_variant-variant.
    ENDIF.
    MB01 - END INSERT
    Start of selection
    START-OF-SELECTION.
    clear all data tables
    CLEAR: t_likp,
    it_likp,
    t_lips,
    t_vbuk,
    t_vbup,
    t_vepo,
    t_vantr,
    t_pallettr,
    w_likp,
    w_lips,
    w_vbuk,
    w_vbup,
    w_vepo,
    w_vekp.
    REFRESH: t_likp,
    it_likp,
    t_lips,
    t_vbuk,
    t_vbup,
    t_vepo,
    t_vantr,
    t_pallettr.
    select data for ALV
    due to different input parameters being used, to streamline the data
    selection process, different selection methods are required
    IF NOT s_vanno IS INITIAL
    OR NOT s_palno IS INITIAL
    OR NOT s_deppnt IS INITIAL. "Jvdm01
    if selecting by van/pallet number, need to select the data from the
    handling unit upwards to delivery
    PERFORM select_data_up.
    ELSE.
    otherwise the data can be selected from the delivery downwards
    PERFORM select_data_down.
    ENDIF.
    End of selection
    END-OF-SELECTION.
    call hierarchical ALV display function module
    CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
    EXPORTING
    i_callback_program = 'ZWMR_PICK_STATUS_REPORT'
    i_callback_pf_status_set = 'SET_STATUS'
    i_callback_user_command =
    'USER_COMMAND' "custom gui status form
    is_layout = g_layout "user command form
    it_fieldcat = gt_fieldcat
    it_sort = g_sort
    i_save = 'X' "MB01+
    is_variant = s_variant
    it_events = gt_events
    i_tabname_header = 't_disp_head'
    i_tabname_item = 't_disp_tab'
    i_structure_name_header = 'ZPICKHEAD'
    i_structure_name_item = 'ZPICKDISP'
    is_keyinfo = g_keyinfo
    TABLES
    t_outtab_header = t_disp_head
    t_outtab_item = t_disp_tab.
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    FORMS
    Includes inserted by Screen Painter Wizard. DO NOT CHANGE THIS LINE!
    INCLUDE zwmr_pick_o01.
    INCLUDE zwmr_pick_status_reporto01 .
    INCLUDE zwmr_pick_i01.
    INCLUDE zwmr_pick_status_reporti01 .
    INCLUDE zwmr_pick_f01.
    INCLUDE zwmr_pick_status_reportf01 .
    *& Form select_pal_nos
    select pallet numbers for search help
    FORM select_pal_nos.
    DATA: BEGIN OF t_palno OCCURS 0,
    zpallet_no LIKE zpallettr-zpallet_no,
    END OF t_palno.
    select all available pallet numbers
    SELECT DISTINCT zpallet_no FROM zpallettr
    INTO CORRESPONDING FIELDS OF TABLE t_palno.
    LOOP AT t_palno.
    get pallet id
    SELECT SINGLE zpallet_id FROM zpallettr
    INTO number_range-id
    WHERE zpallet_no = t_palno-zpallet_no.
    get pallet description
    SELECT SINGLE zdesc FROM zpalletmd
    INTO number_range-desc
    WHERE zpallet_id = number_range-id.
    number_range-num = t_palno-zpallet_no.
    append to search help table
    APPEND number_range.
    ENDLOOP.
    call pop up dialog box
    CALL SCREEN 0100 STARTING AT 5 5.
    ENDFORM. " select_pal_nos
    *& Form select_van_nos
    select van numbers for search help
    FORM select_van_nos.
    DATA: BEGIN OF t_vanno OCCURS 0,
    zvan_no LIKE zvantr-zvan_no,
    END OF t_vanno.
    select available van numbers
    SELECT DISTINCT zvan_no FROM zvantr
    INTO CORRESPONDING FIELDS OF TABLE t_vanno.
    LOOP AT t_vanno.
    select van id
    SELECT SINGLE zvan_id FROM zvantr
    INTO number_range-id
    WHERE zvan_no = t_vanno-zvan_no.
    select van description (maintained in pallet tables)
    SELECT SINGLE zdesc FROM zpalletmd
    INTO number_range-desc
    WHERE zpallet_id = number_range-id.
    number_range-num = t_vanno-zvan_no.
    append to search help table
    APPEND number_range.
    ENDLOOP.
    call pop up dialog box
    CALL SCREEN 0100 STARTING AT 5 5.
    ENDFORM. " select_van_nos
    *& Form select_data_down
    select data if selecting from delivery down
    FORM select_data_down.
    select all deliveries from LIKP that fulfill selection criteria
    Start SU01 optmization changes
    SELECT vbeln vstel lgtor route wadat "RM050906
    SELECT vbeln vstel lgtor route wadat
    zzroute2lgtor zz2route zzexproute zzroute2 anzpk "MB01-+
    FROM likp INTO CORRESPONDING FIELDS OF TABLE it_likp"MB01-+
    WHERE vbeln IN s_vbeln
    AND vstel IN p_vstel
    AND lfart IN s_lfart
    AND wadat IN s_wadat
    AND lfdat IN s_lfdat "MB01+
    AND
    ( lgtor IN s_lgtor OR zzroute2lgtor IN s_lgtor ) ."MB01+
    IF sy-subrc NE 0.
    no data found
    MESSAGE i007.
    EXIT.
    ENDIF.
    IF NOT t_likp[] IS INITIAL. "SUM
    IF NOT it_likp[] IS INITIAL.
    SORT it_likp BY vbeln. "SUM
    select sales document headers from VBUK
    SELECT vbeln wbstk kostk
    FROM vbuk INTO TABLE it_vbuk
    FOR ALL ENTRIES IN it_likp "SUM
    WHERE vbeln EQ it_likp-vbeln. "SUM
    SORT it_vbuk BY vbeln.
    select all relevant delivery items from LIPS
    SELECT vbeln posnr pstyv matnr charg
    FROM lips INTO TABLE it_lips
    FOR ALL ENTRIES IN it_likp
    WHERE vbeln EQ it_likp-vbeln
    AND pckpf NE 'B' "cannot be packed "AS05
    AND pstyv NE 'ZPAC' "AS05
    AND pstyv NE 'ZGDP' "TR02+ "AS05
    AND lfimg GT 0. "TR01+
    ENDIF.
    IF NOT it_lips[] IS INITIAL.
    select all sales document line items from VBUP
    SORT it_lips BY vbeln posnr. "SUM
    SELECT vbeln posnr lvsta
    FROM vbup INTO TABLE it_vbup
    FOR ALL ENTRIES IN it_lips
    WHERE vbeln EQ it_lips-vbeln
    AND posnr = it_lips-posnr.
    SORT it_vbup BY vbeln posnr.
    select corresponding handling unit ID's (venum)
    TR03 Replace
    start
    select * from vepo appending corresponding fields of table t_vepo
    for all entries in t_lips
    where vbeln = t_lips-vbeln
    and posnr = t_lips-posnr
    and matnr = t_lips-matnr
    and charg = t_lips-charg.
    SELECT vepoVENUM vepoVEPOS vepovbeln vepoposnr
    FROM vepo as vepo
    INNER JOIN vekp as vekp ON vepovenum = vekpvenum
    APPENDING corresponding fields of table it_vepo
    FOR ALL ENTRIES IN it_lips
    WHERE vepo~vbeln = it_lips-vbeln
    AND vepo~posnr = it_lips-posnr
    AND vepo~matnr = it_lips-matnr
    AND vepo~charg = it_lips-charg
    AND vekp~exidv IN s_exidv.
    SELECT venum vepos vbeln posnr
    FROM vepo INTO TABLE it_vepo2
    FOR ALL ENTRIES IN it_lips
    WHERE vbeln = it_lips-vbeln
    AND posnr = it_lips-posnr
    AND matnr = it_lips-matnr
    AND charg = it_lips-charg.
    SORT it_vepo2 BY venum vepos.
    *{ INSERT UKMK900355 1
    Ice-multis: replace lower-level HUs with highest level " AS01
    PERFORM replace_highest_hu. " AS01
    *} INSERT
    Start of changes by ANV SR#11523
    MB01 - extract shipment header as well to populate leg indicator
    Therefore, join vttp with vttk
    Limit as well by transportation planning point
    SELECT vttptknum vttptpnum vttpvbeln vttklaufk
    FROM vttp INNER JOIN vttk
    ON vttptknum = vttktknum
    INTO TABLE it_vttp
    FOR ALL ENTRIES IN it_lips
    WHERE vttp~vbeln = it_lips-vbeln
    AND vttk~tplst IN s_tplst.
    MB01 - END
    End of changes by ANV SR#11523
    IF NOT it_vepo2[] IS INITIAL.
    SELECT venum exidv
    FROM vekp INTO TABLE it_vepo1
    FOR ALL ENTRIES IN it_vepo2
    WHERE venum = it_vepo2-venum
    AND exidv IN s_exidv.
    ENDIF.
    SORT it_vepo1 BY venum.
    CLEAR: w_vepo, it_vepo.
    LOOP AT it_vepo1.
    READ TABLE it_vepo2 WITH KEY venum = it_vepo1-venum.
    IF sy-subrc = 0.
    it_vepo2-exidv = it_vepo1-exidv.
    MODIFY it_vepo2 TRANSPORTING exidv
    WHERE venum = it_vepo1-venum .
    ENDIF.
    ENDLOOP.
    DELETE it_vepo2 WHERE exidv IS initial.
    it_vepo[] = it_vepo2[].
    TR03 Replace end
    ENDIF.
    build process table
    PERFORM move_to_table.
    ENDFORM. "select_data_down
    *& Form select_data_up
    select data if selecting from van/pallet up
    FORM select_data_up.
    IF NOT s_vanno IS INITIAL.
    if van then select van numbers and hence pallet numbers
    SELECT * FROM zvantr INTO TABLE t_vantr
    WHERE zvan_no IN s_vanno.
    and vstel eq p_vstel."TR01-
    IF NOT t_vantr[] IS INITIAL.
    SORT t_vantr BY zvan_id zvan_no vstel zpallet_no. "SUM
    SELECT * FROM zpallettr INTO TABLE t_pallettr
    FOR ALL ENTRIES IN t_vantr
    WHERE zpallet_no EQ t_vantr-zpallet_no
    AND zdep_point IN s_deppnt. "Jvdm01
    and vstel eq p_vstel."TR01-
    ENDIF.
    ELSE.
    otherwise can get pallet numbers directly
    SELECT * FROM zpallettr INTO TABLE t_pallettr
    WHERE zpallet_no IN s_palno
    AND zdep_point IN s_deppnt. "Jvdm01
    and vstel eq p_vstel."TR01-
    ENDIF.
    IF NOT t_pallettr[] IS INITIAL.
    from the pallet nos. we can select the handling units
    SORT t_pallettr BY zpallet_id zpallet_no vstel exidv. "SUM
    SELECT * FROM vekp INTO TABLE t_vekp
    FOR ALL ENTRIES IN t_pallettr
    WHERE exidv EQ t_pallettr-exidv
    AND exidv NE space
    AND exidv IN s_exidv "TR03+
    AND ( exida = 'E' "TR01+
    OR exida = 'F' ). "TR01+
    ENDIF.
    SORT t_vekp BY venum. "SUM
    IF NOT t_vekp[] IS INITIAL.
    build vbeln range from t_vekp.
    LOOP AT t_vekp.
    r_del-sign = 'I'.
    r_del-option = 'EQ'.
    r_del-low = t_vekp-vpobjkey.
    APPEND r_del.
    ENDLOOP.
    select all deliveries from LIKP that correspond to HU's
    SELECT * FROM likp INTO TABLE t_likp
    WHERE vbeln IN r_del
    AND wadat IN s_wadat
    AND lfart IN s_lfart.
    ENDIF.
    MB01- START
    SELECT vbeln lgtor route wadat
    FROM likp INTO TABLE it_likp
    WHERE vbeln IN r_del
    AND wadat IN s_wadat
    AND lfart IN s_lfart.
    SELECT vbeln vstel lgtor route wadat
    zzroute2lgtor zz2route zzexproute zzroute2 anzpk "MB01-+
    FROM likp INTO CORRESPONDING FIELDS OF TABLE it_likp
    WHERE vbeln IN r_del
    AND lfart IN s_lfart
    AND wadat IN s_wadat "MB01-+
    AND lfdat IN s_lfdat. "MB01+
    MB01- END
    ENDIF.
    IF NOT it_likp[] IS INITIAL.
    SORT it_likp BY vbeln . "SUM
    select sales document headers from VBUK
    SELECT * FROM vbuk INTO TABLE t_vbuk
    FOR ALL ENTRIES IN t_likp
    WHERE vbeln EQ t_likp-vbeln.
    SELECT vbeln wbstk kostk
    FROM vbuk INTO TABLE it_vbuk
    FOR ALL ENTRIES IN it_likp
    WHERE vbeln EQ it_likp-vbeln.
    SORT it_vbuk BY vbeln. "SUM
    select all relevant delivery items from LIPS
    SELECT * FROM lips INTO TABLE t_lips
    FOR ALL ENTRIES IN t_likp
    WHERE vbeln EQ t_likp-vbeln
    AND pstyv NE 'ZPAC'
    AND pstyv NE 'ZGDP' "TR02+
    AND lfimg GT 0. "TR01+
    SELECT vbeln posnr pstyv matnr charg
    FROM lips INTO TABLE it_lips
    FOR ALL ENTRIES IN it_likp
    WHERE vbeln EQ it_likp-vbeln
    AND pckpf NE 'B' "cannot be packed "AS05
    AND pstyv NE 'ZPAC' "AS05
    AND pstyv NE 'ZGDP' "TR02+ "AS05
    AND lfimg GT 0. "TR01+
    ENDIF.
    IF NOT it_lips[] IS INITIAL.
    SORT it_lips BY vbeln posnr. "SUM
    select all sales document line items from VBUP
    SELECT * FROM vbup INTO TABLE t_vbup
    FOR ALL ENTRIES IN t_lips
    WHERE vbeln EQ t_lips-vbeln
    AND posnr = t_lips-posnr.
    Start of changes by ANV SR#11523
    MB01 - START
    join vttp with vttk to obtain leg indicator
    SELECT tknum tpnum vbeln
    FROM vttp INTO TABLE it_vttp
    FOR ALL ENTRIES IN it_lips
    WHERE vbeln = it_lips-vbeln.
    SELECT vttptknum vttptpnum vttpvbeln vttklaufk
    FROM vttp INNER JOIN vttk
    ON vttptknum = vttktknum
    INTO TABLE it_vttp
    FOR ALL ENTRIES IN it_lips
    WHERE vttp~vbeln = it_lips-vbeln
    AND vttk~tplst IN s_tplst.
    MB01 - END
    End of changes by ANV SR#11523
    SELECT vbeln posnr lvsta
    FROM vbup INTO TABLE it_vbup
    FOR ALL ENTRIES IN it_lips
    WHERE vbeln EQ it_lips-vbeln
    AND posnr = it_lips-posnr.
    SORT t_vbup BY vbeln posnr. "SUM
    select corresponding handling unit ID's (venum)
    SELECT * FROM vepo APPENDING CORRESPONDING FIELDS OF TABLE t_vepo
    FOR ALL ENTRIES IN t_lips
    WHERE vbeln = t_lips-vbeln
    AND posnr = t_lips-posnr
    AND matnr = t_lips-matnr
    AND charg = t_lips-charg.
    SELECT venum vepos vbeln posnr
    FROM vepo APPENDING CORRESPONDING FIELDS OF TABLE it_vepo
    FOR ALL ENTRIES IN it_lips
    WHERE vbeln = it_lips-vbeln
    AND posnr = it_lips-posnr
    AND matnr = it_lips-matnr
    AND charg = it_lips-charg.
    *{ INSERT UKMK900355 1
    it_vepo2[] = it_vepo[]. " DS01
    PERFORM replace_highest_hu. " DS01
    it_vepo[] = it_vepo2[]. " DS01
    *} INSERT
    ENDIF.
    build process table
    PERFORM move_to_table.
    ENDFORM. "select_data_up
    *& Form move_to_table
    move data to processing table
    FORM move_to_table.
    LOOP AT it_vepo.
    CLEAR t_data_tab.
    delivery lines.
    CLEAR w_lips.
    READ TABLE it_lips WITH KEY vbeln = it_vepo-vbeln
    posnr = it_vepo-posnr
    INTO w_lips BINARY SEARCH. "SUM
    MOVE-CORRESPONDING w_lips TO t_data_tab.
    sales document line items
    CLEAR w_vbup.
    READ TABLE it_vbup WITH KEY vbeln = it_vepo-vbeln
    posnr = it_vepo-posnr
    INTO w_vbup BINARY SEARCH. "SUM
    if w_vbup-kosta = space. "TR01-
    not relevant for picking
    delete t_vepo. "TR01-
    continue. "TR01-
    else. "TR01-
    MOVE-CORRESPONDING w_vbup TO t_data_tab.
    endif. "TR01-
    sales doc header
    CLEAR w_vbuk.
    READ TABLE it_vbuk WITH KEY vbeln = it_vepo-vbeln
    INTO w_vbuk BINARY SEARCH. "SUM
    MOVE-CORRESPONDING w_vbuk TO t_data_tab.
    delivery header
    CLEAR w_likp.
    READ TABLE it_likp WITH KEY vbeln = it_vepo-vbeln
    INTO w_likp BINARY SEARCH. "SUM
    MOVE-CORRESPONDING w_likp TO t_data_tab.
    MB01 - START
    DATA: w_routetype TYPE i. "0=non-global,1=1st route,2=2nd
    route,3=both
    At this point move DOOR2 if it falls within the global route scenario
    and the door2 is satisfies the selection criteria for door
    1. Does delivery fall within global route scenario
    CLEAR w_routetype.
    IF w_likp-zz2route = 'Y' .
    1.a. First route - does door1 satisfy the selection criteria
    IF w_likp-lgtor IN s_lgtor.
    w_routetype = 1.
    MOVE w_likp-zzexproute TO t_data_tab-route.
    1.b. Second route - does door2 satisfy the selection criteria
    ELSEIF w_likp-zzroute2lgtor IN s_lgtor.
    here we need to move door2 to lgtor
    w_routetype = 2.
    MOVE w_likp-zzroute2lgtor TO t_data_tab-lgtor.
    MOVE w_likp-zzroute2 TO t_data_tab-route.
    ENDIF.
    If both routes satsify the criteria, append for 2nd leg ***REVISIT!
    IF w_likp-lgtor IN s_lgtor AND w_likp-zzroute2lgtor IN s_lgtor.
    w_routetype = 3.
    ENDIF.
    ENDIF.
    MB01 - END
    Start of changes by ANV SR#11523
    MB01 - If the delivery falls within the global route scenario... need
    to select either preliminary shipment leg OR subsequent leg
    when laufk= 1 (prelim) and linked to route1, if laufk = 2 (subseq) &
    linked to route2
    Shipment Number
    SORT it_vttp BY vbeln laufk.
    CLEAR w_vttp.
    CASE w_routetype.
    WHEN 0.
    READ TABLE it_vttp WITH KEY vbeln = it_vepo-vbeln
    INTO w_vttp BINARY SEARCH.
    WHEN 1.
    READ TABLE it_vttp WITH KEY vbeln = it_vepo-vbeln
    laufk = '1'
    INTO w_vttp BINARY SEARCH.
    WHEN 2.
    READ TABLE it_vttp WITH KEY vbeln = it_vepo-vbeln
    laufk = '3'
    INTO w_vttp BINARY SEARCH.
    WHEN 3. "REVISIT
    ENDCASE.
    MOVE w_vttp-tknum TO t_data_tab-tknum.
    MB01 - END
    End of changes by ANV SR#11523
    select handling unit info using vepo entry
    CLEAR w_vekp.
    IF t_vekp[] IS INITIAL.
    SELECT SINGLE * FROM vekp INTO w_vekp
    WHERE venum = it_vepo-venum.
    ELSE.
    READ TABLE t_vekp WITH KEY venum = it_vepo-venum
    INTO w_vekp BINARY SEARCH. "SUM
    IF sy-subrc NE 0.
    SELECT SINGLE * FROM vekp INTO w_vekp
    WHERE venum = t_vepo-venum.
    ENDIF.
    ENDIF.
    MOVE-CORRESPONDING w_vekp TO t_data_tab.
    *{ INSERT UKMK900355 2
    WM status for HU "AS03
    SELECT SINGLE * FROM zhu_to_link WHERE lgnum EQ w_vekp-lgnum"AS03
    AND exidv EQ w_vekp-exidv."AS03
    IF sy-subrc EQ 0. "AS03
    IF zhu_to_link-zpick_comp EQ space. "AS03
    t_data_tab-lvsta = 'B'. "AS03
    ELSE. "AS03
    t_data_tab-lvsta = 'C'. "AS03
    ENDIF. "AS03
    ENDIF. "AS03
    *} INSERT
    select pallet / van load information "Jvdm01-
    SELECT SINGLE zpallet_no zcount_check FROM zpallettr "Jvdm01-
    INTO (t_data_tab-zpallet_no, "Jvdm01-
    t_data_tab-zcount_check) "Jvdm01-
    WHERE exidv EQ w_vekp-exidv. "Jvdm01-
    PERFORM read_pallet. "MB01+
    SELECT SINGLE zpallet_no zcount_check zdep_point "Jvdm01+
    FROM zpallettr "Jvdm01+
    INTO (t_data_tab-zpallet_no, "Jvdm01+
    t_data_tab-zcount_check, "Jvdm01+
    t_data_tab-zdep_point) "Jvdm01+
    WHERE exidv EQ w_vekp-exidv. "Jvdm01+
    WHERE exidv EQ w_vekp-exidv "MB01-+
    AND zpallet_id = t_data_tab-lgtor."MB01+
    MB01 - INSERT START
    If pallet number specified and
    we are in the global route scenario & both doors fall within the
    selection criteria, we need to copy the one that is currently in a
    specified pallet
    IF NOT s_palno IS INITIAL AND not t_data_tab-zpallet_no in s_palno
    AND w_routetype = '3' .
    Switch doors & get 2nd shipment
    MOVE w_likp-zzroute2lgtor TO t_data_tab-lgtor.
    MOVE w_likp-zzroute2 TO t_data_tab-route.
    Read subsequent leg shipment
    READ TABLE it_vttp WITH KEY vbeln = it_vepo-vbeln
    laufk = '3'
    INTO w_vttp BINARY SEARCH.
    IF sy-subrc = 0.
    MOVE w_vttp-tknum TO t_data_tab-tknum.
    ENDIF.
    PERFORM read_pallet. "MB01+
    ENDIF.
    MB01 - INSERT END
    IF NOT t_data_tab-zpallet_no IN s_palno. "TR01+
    CONTINUE. "TR01+
    ENDIF. "TR01+
    IF sy-subrc = 0. "mb01+
    perform read_van. "MB01+
    SELECT SINGLE zvan_no zvan_print zeod_print FROM zvantr
    INTO (t_data_tab-zvan_no,
    t_data_tab-zvan_print,
    t_data_tab-zeod_print)
    WHERE zpallet_no EQ t_data_tab-zpallet_no.
    MB01 - INSERT START
    If van number specified and
    we are in the global route scenario & both doors fall within the
    selection criteria, we need to copy the one that is currently on a
    specified van
    IF NOT s_vanno IS INITIAL AND not t_data_tab-zvan_no in s_vanno AND
    w_routetype = '3' .
    Switch doors & get 2nd shipment
    MOVE w_likp-zzroute2lgtor TO t_data_tab-lgtor.
    MOVE w_likp-zzroute2 TO t_data_tab-route.
    Read subsequent leg shipment
    READ TABLE it_vttp WITH KEY vbeln = it_vepo-vbeln
    laufk = '3'
    INTO w_vttp BINARY SEARCH.
    IF sy-subrc = 0.
    MOVE w_vttp-tknum TO t_data_tab-tknum.
    ENDIF.
    PERFORM read_pallet. "MB01+
    perform read_van.
    ENDIF. "mb01-
    MB01 - INSERT END
    IF NOT t_data_tab-zvan_no IN s_vanno. "TR01+
    CONTINUE. "TR01+
    ENDIF. "TR01+
    ENDIF.
    APPEND t_data_tab.
    ENDLOOP.
    *-----> TR01+ start
    If the delivery has yet to be packed, then need to include in report
    Thus delete t_lips here and if any entries left after looping through
    t_vepo, these will also need to be added to t_data_tab
    if the selection is by handling unit though we do not want
    these"TR03+
    IF s_exidv IS INITIAL. "TR03+
    *{ REPLACE UKMK900355 1
    *\ LOOP AT it_vepo.
    *\ READ TABLE it_lips WITH KEY vbeln = it_vepo-vbeln
    *\ posnr = it_vepo-posnr
    *\ BINARY SEARCH. "SUM
    *\ IF sy-subrc = 0.
    *\ DELETE it_lips INDEX sy-tabix.
    *\ ENDIF.
    *\ ENDLOOP.
    Higher-level HUs can contain more than one delivery item " AS01
    LOOP AT it_lips. " AS01
    READ TABLE t_vepo_low WITH KEY vbeln = it_lips-vbeln " AS01
    posnr = it_lips-posnr. " AS01
    CHECK sy-subrc EQ 0. " AS01
    DELETE it_lips. " AS01
    ENDLOOP. " AS01
    *} REPLACE
    IF NOT it_lips[] IS INITIAL.
    move any unpacked items to the data table
    PERFORM move_lips_to_table.
    ENDIF.
    ENDIF. "TR03+
    *<---- TR01+ End
    get relevant status icons
    PERFORM select_icons.
    prepare ALV data
    PERFORM prepare_alv.
    ENDFORM. " select_data
    *& Form select_icons
    select icons for display and move data to display table
    FORM select_icons.
    DATA: w_disp_tab LIKE zpickdisp,
    w_disp_head LIKE zpickhead,
    w_color LIKE zpickdisp-color,
    ov_icon LIKE zpickdisp-ov_icon,
    gi_icon LIKE zpickdisp-gi_icon,
    to_icon LIKE zpickdisp-to_icon,
    lp_icon LIKE zpickdisp-lp_icon,
    pc_icon LIKE zpickdisp-pc_icon,
    lv_icon LIKE zpickdisp-lv_icon,
    vm_icon LIKE zpickdisp-vm_icon,
    em_icon LIKE zpickdisp-em_icon,
    sp_icon LIKE zpickdisp-sp_icon, " ANV SR#11523
    t_ovst_tab LIKE t_disp_tab WITH HEADER LINE.
    CONSTANTS: c_col1(3) VALUE 'C10',
    c_col2(3) VALUE 'C20'.
    SORT t_data_tab BY lgtor vbeln.
    w_color = c_col2.
    LOOP AT t_data_tab.
    AT NEW lgtor.
    fill ALV header table
    CLEAR w_disp_head.
    w_disp_head-lgtor = t_data_tab-lgtor.
    APPEND w_disp_head TO t_disp_head.
    ENDAT.
    goods issue status & overall amber/green only
    CASE t_data_tab-wbstk.
    WHEN c_c.
    MOVE icon_green_light TO gi_icon.
    MOVE icon_green_light TO ov_icon.
    WHEN OTHERS.
    MOVE icon_red_light TO gi_icon.
    MOVE icon_yellow_light TO ov_icon.
    ENDCASE.
    transfer order status
    CASE t_data_tab-lvsta.
    WHEN c_a.
    MOVE icon_red_light TO to_icon.
    WHEN c_b.
    MOVE icon_yellow_light TO to_icon.
    WHEN c_c.
    MOVE icon_green_light TO to_icon.
    WHEN space.
    write N/A
    to_icon = 'N/A'.
    ENDCASE.
    loaded to pallet status
    IF NOT t_data_tab-zpallet_no IS INITIAL.
    MOVE icon_green_light TO lp_icon.
    ELSE.
    MOVE icon_red_light TO lp_icon.
    ENDIF.
    pallet count status
    IF NOT t_data_tab-zcount_check IS INITIAL.
    MOVE icon_green_light TO pc_icon.
    ELSE.
    MOVE icon_red_light TO pc_icon.
    ENDIF.
    loaded to van status
    IF NOT t_data_tab-zvan_no IS INITIAL.
    MOVE icon_green_light TO lv_icon.
    ELSE.
    MOVE icon_red_light TO lv_icon.
    ENDIF.
    van manifest status
    IF NOT t_data_tab-zvan_print IS INITIAL.
    MOVE icon_green_light TO vm_icon.
    ELSE.
    MOVE icon_red_light TO vm_icon.
    ENDIF.
    Start of changes by ANV SR#11523
    Shipment status
    IF NOT t_data_tab-tknum IS INITIAL.
    MOVE icon_green_light TO sp_icon.
    ELSE.
    MOVE icon_red_light TO sp_icon.
    ENDIF.
    End of changes by ANV SR#11523
    end of day manifest status
    IF NOT t_data_tab-zeod_print IS INITIAL.
    MOVE icon_green_light TO em_icon.
    ELSE.
    MOVE icon_red_light TO em_icon.
    ENDIF.
    move working data table to display table
    MOVE-CORRESPONDING t_data_tab TO w_disp_tab.
    w_disp_tab-ov_icon = ov_icon.
    w_disp_tab-gi_icon = gi_icon.
    w_disp_tab-to_icon = to_icon.
    w_disp_tab-lp_icon = lp_icon.
    w_disp_tab-pc_icon = pc_icon.
    w_disp_tab-lv_icon = lv_icon.
    w_disp_tab-vm_icon = vm_icon.
    w_disp_tab-em_icon = em_icon.
    w_disp_tab-sp_icon = sp_icon. "ANV SR#11523
    w_disp_tab-color = w_color.
    fill N/A values for initial fields for display
    IF w_disp_tab-packvorschr IS INITIAL.
    w_disp_tab-packvorschr = 'N/A'.
    ENDIF.
    IF w_disp_tab-exidv IS INITIAL.
    w_disp_tab-exidv = 'N/A'.
    ENDIF.
    IF w_disp_tab-zpallet_no IS INITIAL.
    WRITE 'N/A' TO w_disp_tab-zpallet_no.
    ENDIF.
    IF w_disp_tab-zvan_no IS INITIAL.
    WRITE 'N/A' TO w_disp_tab-zvan_no.
    ENDIF.
    display different color for new doc number
    AT END OF vbeln.
    IF w_color = c_col1.
    w_color = c_col2.
    ELSEIF w_color = c_col2.
    w_color = c_col1.
    ENDIF.
    ENDAT.
    APPEND w_disp_tab TO t_disp_tab.
    CLEAR w_disp_tab.
    ENDLOOP.
    we have all the icons in display but need to check the overall status
    as this refers to the line items
    green and amber statuses already set and use the same criteria as the
    goods issue status unless detected as red here
    DATA: ov_stat_red(1).
    CLEAR w_disp_tab.
    SORT t_disp_tab BY vbeln.
    LOOP AT t_disp_tab INTO w_disp_tab.
    AT NEW vbeln.
    check all line items for delivery
    LOOP AT t_data_tab WHERE vbeln = w_disp_tab-vbeln.
    IF t_data_tab-lvsta = c_a.
    set overall status to red
    ov_stat_red = c_yes.
    EXIT.
    ELSE.
    leave green/amber status icon as previosly determined
    ENDIF.
    ENDLOOP.
    IF ov_stat_red = c_yes.
    set overall status to red for all items in that delivery
    CLEAR ov_stat_red.
    MOVE icon_red_light TO w_disp_tab-ov_icon.
    MODIFY t_disp_tab FROM w_disp_tab TRANSPORTING ov_icon
    WHERE vbeln = w_disp_tab-vbeln.
    ENDIF.
    ENDAT.
    ENDLOOP.
    ENDFORM. " select_icons
    *& Form fill_layout
    fill ALV layout parameters
    FORM fill_layout.
    CLEAR g_layout.
    g_layout-colwidth_optimize = c_yes. " column width optimisation
    g_layout-zebra = space. " alternate line colors
    g_layout-box_fieldname = 'MARK'. " checkbox fieldname
    g_layout-info_fieldname = 'COLOR'. " highlight row indicator
    g_layout-no_vline = space. " vertical line
    g_layout-key_hotspot = space. " hotspot field
    g_layout-f2code = 'PICK'. " F2 ok_code
    g_layout-numc_sum = c_yes. " sum numc fields
    g_layout-box_tabname = 't_disp_head'. " checkbox table name
    g_layout-expand_fieldname = 'EXPAND'. " expand field name
    ENDFORM. " fill_layout
    *& Form fill_sort
    fill ALV sort table
    FORM fill_sort.
    DATA: w_g_sort TYPE slis_sortinfo_alv.
    w_g_sort-spos = 1.
    w_g_sort-fieldname = 'LGTOR'.
    w_g_sort-tabname = 't_disp_tab'.
    w_g_sort-up = c_yes.
    APPEND w_g_sort TO g_sort.
    w_g_sort-spos = 2.
    w_g_sort-fieldname = 'VBELN'.
    w_g_sort-tabname = 't_disp_tab'.
    w_g_sort-up = c_yes.
    APPEND w_g_sort TO g_sort.
    w_g_sort-spos = 3.
    w_g_sort-fieldname = 'POSNR'.
    w_g_sort-tabname = 't_disp_tab'.
    w_g_sort-up = c_yes.
    APPEND w_g_sort TO g_sort.

  • Flex Component Kit for Flash CS3

    Hi,
    I created a flex component using the component kit for Flash
    CS3. The component contains a vector image wrapped as a MovieClip.
    In my flex application I add the component as child to a
    Canvas. It works well if i add it like -
    <mx:Canvas id="container" >
    <local:MyComponent />
    </mx:Canvas>
    or like -
    container.addChild (new MyComponent()); //DISPLAYED
    However, the component is not displayed when I do the
    following -
    var array:Array = new Array(new MyComponent());
    container.addChild(array[0]); //NOT DISPLAYED
    Can somebody tell me why this is so?
    I would also like to know if such components can be
    instantiated using flash.utils.getDefinitionByName.
    I tried it but I get Error #1065: Variable 'componentName' is
    not defined
    Could somebody please tell me what is going on?

    Hi bolaughlin,
    Thanks for you reply.
    Error 1065:
    import MyComponent;
    var comp:MyComponent = new MyComponent(); //Error 1065
    //Where MyComponent is the Flash CS3 clip that was converted
    to Flex component
    I have a workaround for this -
    I first add the component as an Mxml tag with visibility
    false and then remove the component
    with actionscript. Now all instantiations work normally (this
    includes all components in the SWC).
    <mx:Canvas id="container" >
    <local:MyComponent visible="false" />
    </mx:Canvas>
    and in <mx:Script>
    container.removeAllChildren();
    var comp:MyComponent = new MyComponent(); //Works
    var anotherComp:MyOtherComponent = new MyOtherComponent();
    //From the same swc; This also works.
    I have a feeling this problem is similar to the 'shared
    fonts' problem that
    existed with Flash MX and below.
    Anyway, even though I don't really know whats happening, my
    project can
    move ahead. Hopefully some Guru will explain this.
    Until then...thank you very much.

  • Something similar to lightbox for flash?

    Hi all,
    I'm searching something similar to the lightbox effect in javascript, but for flash.
    I already tried succesfully "flash lightbox v2" (http://blog.alancurtis.it/tag/flash/) but I'm searching something native for flash, without javascript.
    Is there something usefull around?
    TIA
    tony

    Lightbox like functionality in Flash is very basic and native to it. It is as simple as creating a displayobject, putting images on its display list and creating some transition effect with tween engine. But this requires knowledge of ActionScript.
    You can also do this these things on timeline manually.
    Because it is so basic, you, perhaps will not find any tutorials. Even beginner's level of Flash skills enables one to develop this kind of functionality.

  • Air Display for Windows 7 not working

    I recently installed Air Display v1.6.1 for my iPad 2 and Air Display for Windows.
    Both my laptop and iPad are connected to the same WiFi.
    Whenever I click on my iPad's name in Air Display on my laptop, nothing happens. My iPad's screen still stays on the Air Display instruction screen with no flashing of the screen as I see on YouTube videos. Any help would be appreciated .

    dwinpenny wrote:
    Hi,
    Have a new IMac and am trying to get Isight working in a Parallels Windows 7 VM environment.
    Isight works fine in Mac OS (Skye, Oovoo, etc).
    Tried to install the drivers from the Mac OS disk (appleisightinstaller.exe) and they appear to be installed okay.
    BUT, while the device exists, I cant see any picture or when I click on settings get no settings to change. Additionally, the Isight led on the device never comes on.
    Anyone got any ideas as to what I should do.
    I have tried:
    1. De-installing the driver and reinstalling
    2. Have edited the registry in Windows to delete all references
    The reason I would like to get this working is I am trying to use Polycom PVX video conferencing software (I need it for work) and so my idea was to run it in a Parallels VM as its only available for Windows.
    Hope you can help
    Cheers
    Dave W
    Welcome to Discussions, Dave (dwinpenny)
    I don't use Windows®, but here are a couple things to consider if you have not already done so and do not get better help here.
    (1) Does this help you? http://kb.parallels.com/5028
    (2) Consider XMeeting as a possible OSX alternative for connecting to your work's Polycom system:
      http://xmeeting.sourceforge.net/pages/index.php
    EZ Jim
    Mac Pro Quad Core (Early 2009) 2.93Ghz w/Mac OS X (10.6.2)  MacBook Pro (13 inch, Mid 2009) 2.26GHz (10.6.2)
    LED Cinema Display  G4 PowerBook 1.67GHz (10.4.11)  iBookSE 366MHz (10.3.9)  External iSight

  • Posting limit restriction ( UpTO 10000) for T Code FB60 - for specific GL

    Dear All,
    Posting limit restriction ( UpTO 10000) for T Code FB60 - for specific GL
    Is it Possibal ?
    Any other way to stop Posting Amt more than Rs 10000 ( Ten Thousand)
    In specific T Code FB60
    Required urgent Help,
    Your early reply / solution is expected
    Regards,
    S Kulkarni

    Hi,
    Just go to OB28, define a validation (if you do not use one already), define one step, define the prerequisites on BSEG level of the account and define the check.
    For example, you can use the validation for the following situation: You want to make sure that postings to the expense account "Telephone costs" can only be posted to the services cost center "Telephone". You can carry out the checks needed for this by using the validation.
    Activities
    If you want to define new validations, go through the following activities:
    1. Place the cursor on a line in which company code and callup point are entered (you can enter company code and validation callup point via Edit -> New entries).
    2. Afterwards select Environment -> Validation. You reach the first screen for maintaining a validation.
    3. Select Validation -> Create. Enter the required name. After pressing ENTER, you come to an overview screen of the validation activities belonging to the validation.
    4. Select Insert entry. On the next screen you can describe a new validation activity. You describe the check requirements and the actual check for this. The syntax to be used for this is described in the online help (F1 help) for the input fields for Requirements and Check. You can also define a message (warning or error message) which is sent if the check is not successful.
    If you want to change validations which already exist, proceed as follows:
    1. Place the cursor on an already existing entry and select Goto -> Validation.
    2. On the next screen select Validation -> Display or Validation -> Change. After pressing ENTER, you get to the overview screen of the validation activities belonging to the validation. If you select Insert entry, you can carry out changes if necessary.
    Regards,
    Eli

  • When I try to open the "markets" page on the Firefox hompage, it displays for 3 or 4 seconds and then drops off; I get a white screen; this does not happen with Explorer.

    When I open "markets" from the homepage, it comes up but drops off after a few seconds and
    I get a white page. This does not happen with Explorer. A similar but much more extensive
    problem happened a month or so ago (I couldn't open attachments). I called Microsoft and the
    fellow messed about with my computer for an hour or so, but ended up saying he couldn't help
    me. However, when he went away, the problems went away.
    == This happened ==
    Every time Firefox opened
    == two weeks ago?

    ~~red:<u>'''''displays for 3 or 4 seconds and then drops off'''''</u>~~
    If you have RealPlayer Browser Record Plugin <u>'''extension'''</u>, disable/remove the RealPlayer Browser Record Plugin extension in the RealPlayer Preferences (RP: Tools > Preferences > Download & Recording) . Restart Firefox and test.
    <u>See Noah_SUMO's illustrated answer in this thread if the above is not clear:</u> https://support.mozilla.com/en-US/forum/1/557689?
    The RealPlayer Browser Record Plugin <u>'''extension'''</u> adds some extra features like saving media files.
    Be sure not to get confused with the RealPlayer <u>'''plugin'''</u> (Tools > Add-ons > Plugins) that plays media files.
    https://support.mozilla.com/en-US/forum/1/557689?
    http://support.mozilla.com/en-US/forum/1/459823
    https://support.mozilla.com/en-US/forum/1/446905?
    https://support.mozilla.com/tiki-view_forum_thread.php?forumId=1&comments_parentId=472596
    http://support.mozilla.com/en-US/forum/1/461211
    http://support.mozilla.com/en-US/forum/1/376867
    See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]].
    ~~red:<u>'''''Other Issues'''''~~: to correct security/stability issues</u>
    <u>'''Update Java'''</u>: your ver. 1.6.0.17; current ver. 1.6.0.20 (<u>important security update 04-15-2010</u>)
    ''(Windows users: Do the manual update; very easy.)''
    See: '''[http://support.mozilla.com/en-US/kb/Using+the+Java+plugin+with+Firefox#Updates Updating Java]'''
    Do the update with Firefox closed.
    <u>'''Update Shockwave for Director'''</u>: your version 11.0; current version 11.5
    NOTE: this is not the same as Shockwave Flash; this installs the Shockwave Player.
    SAVE the installer to your hard drive (Desktop is a good place so you can find it). When the download is complete, exit Firefox (File > Exit), locate and double-click in the installer you just downloaded, let the install complete.
    IMPORTANT: I have found it wise to always restart your system after doing anything with Adobe products.
    See: '''[http://support.mozilla.com/en-US/kb/Using+the+Shockwave+plugin+with+Firefox#_Installing_Shockwave Installing Shockwave]'''

Maybe you are looking for

  • Installing RAC on Oracle Linux 6.3 using VMWare ESX

    Hi I have configured a pair of Linux servers following a guide on Oracle-base. Both servers have their own OS disks and they have four virtual disks that are shared between the two vm's (configured as sharable in VMWare using a separate SCSI controll

  • Open a movie in a frame i wan't

    the only part i now is this on (release) { geturl("..\\Menu\\menu.swf") i wanto to open this movie in frame 30 (for exemple) is missing rest some body can help me

  • Which is Better ODBC or 0040

    Hi, I am trying to get a report in Excel using VBA connecting to the Oracle Database. I have installed the ODBC Drivers using Oracle Universal Installer. I am able to connect to database by creating a reference to 0040 dll. I am unable to close the C

  • Using LiveCycle forms with a Tablet PC

    I developed a large PDF form created in designer for use on a Fujitsu Lifebook Tablet PC. The users are selecting a dropdownlist with the digitized pen(stylus), and immediately the dropdownlist does not select anything, then when the user clicks it a

  • TLS enabling on Email Server

    Hi We are planning to use TLS at the email server for authentication. We are using Oracle B2B 10g and in that using 'Custom document over generic exchange' protocol. Is there any other additional setting to be done in B2B for this set up? The TLS is