Actionscript "recording" of events: not every event registers

Hi.
I am using a playbar and the hittestObject method to drop instances of movie clips onto the stage, triggered by 16 pads on the screen.  When I test the mini-application, most of my events register and drop a movie clip onto the stage. (These movie clips are "events" in themselves as they will interact with a second playback bar which will play a sound when the bar hits the recorded note.)
However why don't all of my events register?  I can post the code if necessary, but I will have to post only the critical parts as i recall that my code is rather long for posting in a usable forum post.
Thanks in advance,
-markerline
P.S.:   here is the partial code
function onTBoxPlayBackingPlay(e:Event):void{
    //trace("___________hello");
    if(e.target.hitTestObject(myPlayBackingBar)){
         e.target.play(); 
        var tmc:MovieClip=e.target.getChildAt(0) as MovieClip;
        tmc.play();
        trace("hit1");
//================
function onTBoxMouse(e:MouseEvent):void{
    CPressed=true;
    //if(myRecorDingGoing){
    //e.target.play();
    if(e.target){
        CPressedArr.push(e.target.name);
        trace(CPressedArr+":CPRESSEDARR============="+CPressedArr.length+" LENGTH");
        trace(CPressed+":CPRESSED");
            for(var i:int=1;i<10;i++){
                trace(i+" :i ==================");
                if(e.target.name==String(CPressedArr[i-1])){
                var tbox:MovieClip=new MovieClip();
                //tbox=MovieClip(getChildByName("box0"+i+"_mc"));
                C=Class(getDefinitionByName("box0"+String(i)+"_mc"));
                if(myRecorDingGoing){
                tbox.addChild(new C());
                CPressedArrText.text=String(CPressedArr.length);
                tbox.width=20;
                tbox.height=20;
                tbox.stop();
                var tmc:MovieClip=tbox.getChildAt(0) as MovieClip;
                tmc.stop();
                //tmc.name=String(i);
                //tmc.addEventListener(Event.ENTER_FRAME, onTBoxEnterFrame);
                tbox.x=myRecorDingBar.x/2.35+600;
                tbox.y=Number(String(CPressedArr[i-1]))*tmc.height+1;
                //C.stop();
                addChild(tbox);
                CObj.push(tmc);
                trace(CObj+" CObj is not null");
                if(CObj==null){
                    trace(CObj+" is null");
                    CObj=[];
                    CObj.push(tmc);
                tbox.addEventListener(Event.ENTER_FRAME, onTBoxPlayBackingPlay);
                tbox.addEventListener(Event.ENTER_FRAME, onTBoxPlayBackingPlayStop);
                tbox.addEventListener(MouseEvent.CLICK, onTBoxDelete);
                trace(C);
/////////=======================
Message was edited by: markerline

Read up the differences between target/currentTarget
http://stackoverflow.com/questions/8517437/as3-difference-between-target-vs-currenttarget
In most usecases, especailly with nested MovieClips, you have the best control over events with currentTarget.
Another problem is your usage of enterframe listners:
tbox.addEventListener(Event.ENTER_FRAME, onTBoxPlayBackingPlay);
tbox.addEventListener(Event.ENTER_FRAME, onTBoxPlayBackingPlayStop);
you add 2 differnt functions listening to the same event inside a for-loop.
That makes no sense.
add instead one ENTER_FRAME Listener to the stage
outside of any other  functions/loops
and put any logic inside there

Similar Messages

  • TS3999 When I record calendar events on iPhone or iPad i can use a 24hour basis but not on my Macbook How can I change macbook calendar entries to 24 hour 'clock'

    When I record calendar events on my iphone or ipad I use a 24 clock, which is the basis on which my business runs. I cannot do the same on my Macbook, which is very frustrating and counter-intuitive (i.e. using am/pm). I asked my Apple support here in South Africa. The rep' said he could not answer immediately but would get back to me. I'm still waiting. Surely this is not a 'big' or 'unusual' problem? 

    I get 24hr everywhere not just in the dialog box
    Here's a calendar entry
    But I am not sure why you don't, let me put out a call for assisitance,

  • [AS] Can Applescript record InDesign events ??

    Is is possible for the script editor to record apple events from Indesign? Ie. Press the record button in the script editor, do some stuff in Indesign and have the commands automatically recorded.
    If so, what is the criteria for this? CS1, CS2, CS3 ? MacOS 10.x ? Applescript version ?
    if not, is there a third-party plugin that will do this?
    (Many moons ago Quark (Agghhh) had an extension "ScriptMaster XT" which would allow the recording of events to the script editor)
    Currently wrestling with the limited topics that are covered in the Adobe AS guide. (Ie. lots of stuff on text, very little on images).
    Thanks in Advance.
    Matt.

    On 9/5/08 11:57 PM, "Matt McGregor" <[email protected]> wrote:<br /><br />> Is is possible for the script editor to record apple events from Indesign? Ie.<br />> Press the record button in the script editor, do some stuff in Indesign and<br />> have the commands automatically recorded.<br /><br />No. Very few apps are recordable these days.<br /><br />> (Many moons ago Quark (Agghhh) had an extension "ScriptMaster XT" which would<br />> allow the recording of events to the script editor)<br /><br />And what a dog's breakfast it used to produce...<br /><br />-- <br />Shane Stanley <[email protected]>

  • Record Keypress events of Virtual Keyboard in Iphone

    Hi. I am working on an IOS eng language dictionary and I need to record keypress events of virtual keyboard so that I can provide users with a dropdownlist (like an autocomplete) of words. I have done it through value changed event of UITextField but I am not getting anywhere with this. Is there any solution?

    Hi. I am working on an IOS eng language dictionary and I need to record keypress events of virtual keyboard so that I can provide users with a dropdownlist (like an autocomplete) of words. I have done it through value changed event of UITextField but I am not getting anywhere with this. Is there any solution?

  • Steps for Recording Portal Events in Database

    I want to record user events from our applicaiton to the portal database for reporting purposes. I know there are some configuration chnages to be made in the server for this purpose. Also I need to know from an applicaiton perspective how to code this.
    Can someone give some info regarding this.
    Thanks

    Hi Guys ,
    I am new to events & campaigns in portal .
    I need help in writing a custom event
    and then registering it so that it can be used
    to trigger a campaign .
    Even a simplest of example will do .
    Please help me with this.
    regards,
    Shilpa

  • I would like to detect all the keyboard key is okay, but not every key can be detected by using LabVIEW example, keyboard keycode

    I would like to detect all the keyboard key is okay, but not every key can be detected by LabVIEW example ( we can use 『basic input demo.vi』to detect normal key』.
    I want to detect some 『hot key』 for example some keys exist in the upper part like 『search key』、『e-mail key』、『volumn control key』...etc. They are very often to be watched in some new keyboards, but we still don't know how to detect if their functions are okay.
    Can we detect signals of these 『hot key』 in LabVIEW? We can apply these hot key's functions in XP, so we should detect their signal, I think, but I can't do it.
    I serach some information about this question, and somebody said we can detect hot key's signal by grabing 『keybode』 these hot key feedback. But I don't know how to do these. I can't use VC. So anyone can give me a LabVIEW VI to grab keycode? Or any other solution we can detect all the key on the keyboard, including hot keys?
    Thanks!
    Regards,

    Maybe that is the limitation of Acquire Input Data.vi.The vi can't identify the Unformal key.
    You can try to use Event structure and set to listen "key down" event.
    There are two terminals VKey, ScanCode will sent out the information when you press key.
    There are two pictures in attached file, 2.jpg will show you the detail.
    Good luck.
    Attachments:
    SpecialKey.zip ‏17 KB

  • In my first iPhone 5, the speaker didn't work and people could not hear me on Speaker phone when I used it. When I used the video recording it did not record sound at all only a hissing/static sound, no voice.

    In my first iPhone 5, the speaker didn't work and people could not hear me on Speaker phone when I used it. When I used the video recording it did not record sound at all only a hissing/static sound, no voice. I wished for a software fix. I did a hard reset, nothing. I did a full restore to factory settings not putting my backup on and the problem persisted.
    i have been provided with this info
    You can find troubleshooting tips, how-to articles, and moderated
    > > discussion forums on our support website:
    > >
    > > www.apple.com/support
    > >
    > > iPhone: Basic troubleshooting
    > > http://support.apple.com/kb/HT1737
    > >
    I did every step in the link that i have been provided with (thank you), but I’m
    still experiencing the same issue. My experience with Apple has been
    excellent and this has been the first time I have experienced something
    like this with an Apple product. I hope we can find a quick solution.
    In order to get the iPhone 5 as soon as it launched (being a major fan of
    Apple products!), I purchased my iPhone 5 from the UK through a friend of
    mine who lives there.
    My question is: can I have the faulty device replaced within Saudi by one
    of the official resellers here (we have 3: STC, Mobily and Zain)? I want to
    avoid the disruption, complication and expense of sending it back to the
    UK.
    Could you advise whether this is possible or not, and if not how should I
    go about having the device replaced?
    Thank you in advance for your cooperation.

    Nice try! Take a hike.

  • Display alternate color in rows  : : : record numbers are not in sequence to display alternate color.

    Post Author: SRK
    CA Forum: General
    Hi ,
      I am using  the following formula to display the alternate white and silver  background color in every reocrd but this does not work because the records numbers are not in sequence  for ex : its showing 54,56,58 which is not allowing the alternate color, Any advice.Thanks if   remainder(recordnumber,2) =0 then    crNoColorelse    Color (218,218,218); 

    Post Author: keiffer6
    CA Forum: General
    Could you simply add a running total for each record. That will give you the 1 2 3 4 5 6 ....
    Then in the details section color formula, use something like this:
    if RunningTotal Mod 2 = 0 then crSilver Else crNoColor.
    HTH

  • HT204411 why is not every song available in a country?

    Hi,
    I am wondering about why not every song is available in every country, especially in the European Union. I mean, we are one region without real boundaries anymore. But if I get over a "boundary" like Germany and I hear a song overthere, which is there already popular. Why can't I get this song through iTunes in The Netherlands. The Netharlands are not really big and I travel a lot throughout the European Union, but I can not download songs here, because they are not availible in the Dutch iTunes Store.
    I think it is a idea and a question. Why not throw away these "boundaries" and create an European iTunes store? Or making things faster available for every European country.
    I hope you are going to think about this. This is better for you, and your customers. I think there will be more users, if there is a faster respond to make things available in every European country.
    Kind regards,
    Alex Thuring

    CDs are a physical product that once sold to a reseller can be then resold by the reseller basically anywhere the reseller wishes. The record companies tried to prevent that but were unsuccessful in most countries. The region code system used on DVDs is a weak attempt to control distribution of physical copies instead.
    Digital downloads, however, require licensing from the content owners and in exchange for their permission they require that the download stores prohibit cross-border sales. With the content owners often being different from country to country and the differing copyright laws, this makes it virtually impossible for any download store to operate across country borders.
    Again, this is indeed something the EU would have to implement. If you want all the "nitty gritty" about their discussions, see:
    http://ec.europa.eu/licences-for-europe-dialogue/
    Regards.

  • Camcorder video error: "Unable to record. Resolution not supported by memory card."

    We purchased two Samsung Droid Charges the first day they were released and recently they've both been getting this error after 8-15 seconds of recording in HD (1280x720): "Warning: Unable to record. Resolution not supported by memory card."
    Called Verizon tech support, but they referred me to Samsung. Not knowing much about micro SDHC cards, I was alarmed to discover that the factory pre-installed 32gb card is only rated class 2 for speed. Samsung told me you need a minimum of speed class 4 or higher to record at this resolution. The only problem is you need an SD card installed in order to use the camcorder, period. In other words, all of us who payed an arm and a leg for the best phone Verizon sells now have to go buy our own micro sd card that actually supports all of the phone features as advertised?! The lowest prices I've seen for the faster cards are $70. Are we the only two Charge owners experiencing this problem?  I've read somewhere that lower speed class cards may initially support faster speeds than they are rated until they accumulate more files, so the problem may go undetected for some time until you have more files that are stored in different locations on the card (making them difficult to access at the faster speeds). This may explain why are the first ones to get this error since we've had the phones the longest and only 50% free space remaining on the SD card. Oh, Samsung also said they won't be able to replace your card for one that has the proper speed rating. Kind of seems like false advertising to say a feature is available (HD camcorder), and then not mention the fact that the memory card provided isn't sufficient for that feature (separate upgrade required). Anyone else sharing the same frustrations? Ideas?

    Thanks for the response. I've tried everything on that page. It's not an issue with the cable, or firewire port or the cable being connected properly, as the iSight camera works fine with iChat. I've disconnected the only other firewire device on the computer, didn't make any difference. Camera works fine in iChat, so it's not the camera itself. And, as I mentioned in the post, the same camera, if hooked up to my laptop, works just fine recording in QuickTime. So, it appears to be an issue with the QuickTime installation on this computer. I've done a search for the same error I'm getting and found some other occurrences with the same problems, but none that offered a solution.

  • How to delete a in place record that will not undeclare

    I have an "in-place" record that will not let me undeclare itself, not sure how it got created but here are some facts about it:
    when i first looked at it showed as checked out to (blank).  This is different from all of my other in-place records which show as checked out to "System Account".  I tried checking it out to me (and it let me) which was strange!!  When I
    try to undeclare it as a record by using the "compliance details" interface and click the undeclare record link, the reocrd status is changed from "Declared record on 1/17/2011" to "Record".  When I go back to the UI it still shows the record with the
    little lock on it.  If I try to delete the record using the library interface I get the message: "The item cannot be updated because it is locked as read-only".  I installed sharepoint manager 2010 (from codeplex) on my server and navigated to this
    item in the list and checked out the properties...
    in this tool it says "IsReadOnly" = false
    if I look at the individual properties of the item i see properties like
    ecm_ItmLockHolders  value = ecm_InPlaceRecordLock
    ecm_ItemDeleteBlockHOlders value= ecm_InPlaceRecordLock
    I suspect that this is why ic cannot get rid of the bloody record...  i don't know why undeclare doesn't take these locks off (Perhaps because someohw it got checked out to someone other than system).  I even tried going iinto the content database
    to set the CheckedOutTo column to null.  when i did this nothing happened
    i tried setting the id equal to the "system account" Id in the content database and the record vanished from the document library (although I can still see it in the content database)...
    this is a big mystery for me... all i want is to get rid of a record that somehow has been "corrupted"  we have been demoing some third party applications which upload to sharepoint and prerhaps they got the file in this state (its an email .msg format)...
    i definitely need to know the recommended way to clean a record that will not let you undeclare it... help!  my next course of action will be a ms support call...
    krd

    the record was declared as part of info mgmt policy (created +1 days, delcare record), then i have another step (declared record + 1 day, start a workflow).  I'm trying to delete the record using a workflow (because the OOTB disposition workflow doesn't
    work, i'm trying to create my own disposition workflow which undeclares the record first then deletes it).  But that is a bit of a side story (I haven't managed to get that working...)
    krd

  • How to check whether a Record Exists or not in Ztable

    Hi all,
    I have Req like this
    In ZTable i have 2 fields  * Legacy System , Legacy Material No*
    Environment Value is coming in one of the field in Idoc
    The logic is if the Environment Value is UK and a Record Exists on the ZTable for Legacy Sysyetm = Leg1 means i have send Legacy Material No , else  Send 01
    Please suggest me the process for this
    REgards
    Vamsi
    Edited by: Vamsi Krishna on May 19, 2009 5:31 PM

    Hi Michal / Aamir,
    Thanks for your replies.
    The ZTable is at R/3 side only, iam using RFC Lookup for this, but iam bit confuse on how to construct the logic to check whether there is a record Exists or not on Ztable
    Logic shld be If the Environment value is UK and a record exists on the Ztable for Legacy system "ABC" means then send Legacy material number else send 01
    In Table we will have the fields Legacy System   Legacy Material No  & Environment value is coming from Idoc itself( Ex: UK or US)
    Regards

  • Header ID does not exist on this record or does not match ID

    Hi ,
    I'm trying to import the sales order using OE_ORDER_PUB.process_order() API. If all my orders has equal no. of lines, I can able to import all the orders at one stoke. But if each order has different no. of lines, I'm unable to import all the orders at single stoke. At first run, certain no. of records are getting processed and remaining records are ending up with error stating *'Header ID does not exist on this record or does not match ID specified on header record. You require a valid header ID if the operation is Create*'. If I re-execute the errored records, its getting processed successfully.
    Please help me in getting it resolved.
    Find below the procedure code which I'm using to import sales order.
    CREATE OR REPLACE PROCEDURE XXRT_SALES_ORDER (ERRBUF VARCHAR2, RETCODE NUMBER)
    AS
    l_header_rec OE_ORDER_PUB.Header_Rec_Type;
    l_line_tbl OE_ORDER_PUB.Line_Tbl_Type;
    l_line_adj_tbl OE_ORDER_PUB.Line_Adj_Tbl_Type;
    l_return_status varchar2(200);
    l_msg_count number;
    l_msg_data varchar2(20000);
    l_header_val_rec OE_ORDER_PUB.Header_Val_Rec_Type;
    l_Header_Adj_tbl OE_ORDER_PUB.Header_Adj_Tbl_Type;
    l_Header_Adj_val_tbl OE_ORDER_PUB.Header_Adj_Val_Tbl_Type;
    l_Header_price_Att_tbl OE_ORDER_PUB.Header_Price_Att_Tbl_Type;
    l_Header_Adj_Att_tbl OE_ORDER_PUB.Header_Adj_Att_Tbl_Type;
    l_Header_Adj_Assoc_tbl OE_ORDER_PUB.Header_Adj_Assoc_Tbl_Type;
    l_Header_Scredit_tbl OE_ORDER_PUB.Header_Scredit_Tbl_Type;
    l_Header_Scredit_val_tbl OE_ORDER_PUB.Header_Scredit_Val_Tbl_Type;
    l_line_val_tbl OE_ORDER_PUB.Line_Val_Tbl_Type;
    l_Line_Adj_val_tbl OE_ORDER_PUB.Line_Adj_Val_Tbl_Type;
    l_Line_price_Att_tbl OE_ORDER_PUB.Line_Price_Att_Tbl_Type;
    l_Line_Adj_Att_tbl OE_ORDER_PUB.Line_Adj_Att_Tbl_Type;
    l_Line_Adj_Assoc_tbl OE_ORDER_PUB.Line_Adj_Assoc_Tbl_Type;
    l_Line_Scredit_tbl OE_ORDER_PUB.Line_Scredit_Tbl_Type;
    l_Line_Scredit_val_tbl OE_ORDER_PUB.Line_Scredit_Val_Tbl_Type;
    l_Lot_Serial_tbl OE_ORDER_PUB.Lot_Serial_Tbl_Type;
    l_Lot_Serial_val_tbl OE_ORDER_PUB.Lot_Serial_Val_Tbl_Type;
    l_action_request_tbl OE_ORDER_PUB.Request_Tbl_Type;
    v_remarks varchar2(250);
    v_count number;
    v_transaction_type number;
    v_cust_id number;
    v_invoice_to number;
    v_ship_to number;
    v_itemid1 number;
    v_itemid2 number;
    v_itemid3 number;
    v_itemid4 number;
    v_itemid5 number;
    v_item_type1 varchar2(15);
    v_item_type2 varchar2(15);
    v_item_type3 varchar2(15);
    v_item_type4 varchar2(15);
    v_item_type5 varchar2(15);
    cursor c_data_val is select * from XXSC_SALES_ORDER_IMPORT
    where process_flag='N';
    cursor c_data is select * from XXSC_SALES_ORDER_IMPORT
    where process_flag='N';
    Begin
    fnd_global.apps_initialize(1681,51411,660);
    for c_data_val_rec in c_data_val
    loop
    v_remarks:=NULL;
    select count(*) into v_count from apps.oe_order_headers_all
    where cust_po_number=c_data_val_rec.iwb_no;
    if v_count > 0 then
    v_remarks:='Customer PO already used';
    end if;
    BEGIN
    select transaction_type_id into v_transaction_type
    from apps.OE_TRANSACTION_TYPES_tl
    where name like c_data_val_rec.BILL_TO||'-DOMESTIC';
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    v_remarks:=v_remarks||'Invalid trans type';
    END;
    BEGIN
    select cust_account_id into v_cust_id
    from apps.hz_cust_accounts hca,
    apps.hz_parties hp
    where hca.party_id=hp.party_id
    and hp.party_name=c_data_val_rec.CUSTOMER_NAME;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    v_remarks:=v_remarks||'Invalid Customer name';
    END;
    BEGIN
    select SITE_USE_ID into v_invoice_to
    from apps.hz_parties hp,
    apps.hz_party_sites_v hps,
    apps.hz_cust_acct_sites_all hcasa,
    apps.hz_cust_site_uses_all hcsua
    where
    party_name=c_data_val_rec.CUSTOMER_NAME
    and hp.party_id=hps.party_id
    and hps.address1 like '%'||c_data_val_rec.BILL_TO||'%'
    and hps.site_use_type='BILL_TO'
    and hps.party_site_id=hcasa.party_site_id
    and hcasa.cust_acct_site_id=hcsua.cust_acct_site_id
    and SITE_USE_CODE='BILL_TO'
    and hcsua.Status='A';
    EXCEPTION
    WHEN OTHERS THEN
    v_remarks:=v_remarks||'Invalid BILL_TO';
    END;
    BEGIN
    select SITE_USE_ID into v_ship_to
    from apps.hz_parties hp,
    apps.hz_party_sites_v hps,
    apps.hz_cust_acct_sites_all hcasa,
    apps.hz_cust_site_uses_all hcsua
    where
    party_name=c_data_val_rec.CUSTOMER_NAME
    and hp.party_id=hps.party_id
    and hps.address1 like '%'||c_data_val_rec.SHIP_TO||'%'
    and hps.site_use_type='SHIP_TO'
    and hps.party_site_id=hcasa.party_site_id
    and hcasa.cust_acct_site_id=hcsua.cust_acct_site_id
    and SITE_USE_CODE='SHIP_TO'
    and hcsua.Status='A';
    EXCEPTION
    WHEN OTHERS THEN
    v_remarks:=v_remarks||'Invalid SHIP_TO';
    END;
    IF c_data_val_rec.item1 is not null then
    BEGIN
    select distinct inventory_item_id into v_itemid1
    from apps.mtl_system_items_b
    where segment1=c_data_val_rec.item1;
    EXCEPTION
    WHEN OTHERS THEN
    v_remarks:=v_remarks||'Invalid ITEM1';
    END;
    BEGIN
    select distinct Item_type into v_item_type1
    from apps.mtl_system_items_b
    where segment1=c_data_val_rec.item1;
    EXCEPTION
    WHEN OTHERS THEN
    v_remarks:=v_remarks||'Invalid Itemtype1';
    END;
    END IF;
    IF c_data_val_rec.item2 is not null then
    BEGIN
    select distinct inventory_item_id into v_itemid2
    from apps.mtl_system_items_b
    where segment1=c_data_val_rec.item2;
    EXCEPTION
    WHEN OTHERS THEN
    v_remarks:=v_remarks||'Invalid ITEM2';
    END;
    BEGIN
    select distinct Item_type into v_item_type2
    from apps.mtl_system_items_b
    where segment1=c_data_val_rec.item2;
    EXCEPTION
    WHEN OTHERS THEN
    v_remarks:=v_remarks||'Invalid Itemtype2';
    END;
    END IF;
    IF c_data_val_rec.item3 is not null then
    BEGIN
    select distinct inventory_item_id into v_itemid3
    from apps.mtl_system_items_b
    where segment1=c_data_val_rec.item3;
    EXCEPTION
    WHEN OTHERS THEN
    v_remarks:=v_remarks||'Invalid ITEM3';
    END;
    BEGIN
    select distinct Item_type into v_item_type3
    from apps.mtl_system_items_b
    where segment1=c_data_val_rec.item3;
    EXCEPTION
    WHEN OTHERS THEN
    v_remarks:=v_remarks||'Invalid Itemtype3';
    END;
    END IF;
    IF c_data_val_rec.item4 is not null then
    BEGIN
    select distinct inventory_item_id into v_itemid4
    from apps.mtl_system_items_b
    where segment1=c_data_val_rec.item4;
    EXCEPTION
    WHEN OTHERS THEN
    v_remarks:=v_remarks||'Invalid ITEM4';
    END;
    BEGIN
    select distinct inventory_item_id into v_item_type4
    from apps.mtl_system_items_b
    where segment1=c_data_val_rec.item4;
    EXCEPTION
    WHEN OTHERS THEN
    v_remarks:=v_remarks||'Invalid Itemtype4';
    END;
    END IF;
    IF c_data_val_rec.item5 is not null then
    BEGIN
    select distinct inventory_item_id into v_itemid5
    from apps.mtl_system_items_b
    where segment1=c_data_val_rec.item5;
    EXCEPTION
    WHEN OTHERS THEN
    v_remarks:=v_remarks||'Invalid ITEM5';
    END;
    BEGIN
    select distinct inventory_item_id into v_item_type5
    from apps.mtl_system_items_b
    where segment1=c_data_val_rec.item5;
    EXCEPTION
    WHEN OTHERS THEN
    v_remarks:=v_remarks||'Invalid Itemtype5';
    END;
    END IF;
    IF v_remarks is not null then
    update XXSC_SALES_ORDER_IMPORT
    set process_flag='E', remarks=v_remarks
    where iwb_no=c_data_val_rec.iwb_no;
    commit;
    END IF;
    end loop;
    for c_data_rec in c_data
    loop
    select transaction_type_id into v_transaction_type
    from OE_TRANSACTION_TYPES_tl
    where name like c_data_rec.BILL_TO||'-DOMESTIC';
    select cust_account_id into v_cust_id
    from hz_cust_accounts hca,
    hz_parties hp
    where hca.party_id=hp.party_id
    and hp.party_name=c_data_rec.CUSTOMER_NAME;
    select SITE_USE_ID into v_invoice_to
    from hz_parties hp,
    hz_party_sites_v hps,
    hz_cust_acct_sites_all hcasa,
    hz_cust_site_uses_all hcsua
    where
    party_name=c_data_rec.CUSTOMER_NAME
    and hp.party_id=hps.party_id
    and hps.address1 like '%'||c_data_rec.BILL_TO||'%'
    and hps.site_use_type='BILL_TO'
    and hps.party_site_id=hcasa.party_site_id
    and hcasa.cust_acct_site_id=hcsua.cust_acct_site_id
    and SITE_USE_CODE='BILL_TO'
    and hcsua.Status='A';
    select SITE_USE_ID into v_ship_to
    from hz_parties hp,
    hz_party_sites_v hps,
    hz_cust_acct_sites_all hcasa,
    hz_cust_site_uses_all hcsua
    where
    party_name=c_data_rec.CUSTOMER_NAME
    and hp.party_id=hps.party_id
    and hps.address1 like '%'||c_data_rec.SHIP_TO||'%'
    and hps.site_use_type='SHIP_TO'
    and hps.party_site_id=hcasa.party_site_id
    and hcasa.cust_acct_site_id=hcsua.cust_acct_site_id
    and SITE_USE_CODE='SHIP_TO'
    and hcsua.Status='A';
    IF c_data_rec.item1 is not null then
    select distinct inventory_item_id into v_itemid1
    from apps.mtl_system_items_b
    where segment1=c_data_rec.item1;
    select distinct Item_type into v_item_type1
    from apps.mtl_system_items_b
    where segment1=c_data_rec.item1;
    ELSE
    v_itemid1:= null;
    v_item_type1:= null;
    END IF;
    IF c_data_rec.item2 is not null then
    select distinct inventory_item_id into v_itemid2
    from apps.mtl_system_items_b
    where segment1=c_data_rec.item2;
    select distinct Item_type into v_item_type2
    from apps.mtl_system_items_b
    where segment1=c_data_rec.item2;
    ELSE
    v_itemid2:=null;
    v_item_type2:= null;
    END IF;
    IF c_data_rec.item3 is not null then
    select distinct inventory_item_id into v_itemid3
    from apps.mtl_system_items_b
    where segment1=c_data_rec.item3;
    select distinct Item_type into v_item_type3
    from apps.mtl_system_items_b
    where segment1=c_data_rec.item3;
    ELSE
    v_itemid3:=null;
    v_item_type3:=null;
    END IF;
    IF c_data_rec.item4 is not null then
    select distinct inventory_item_id into v_itemid4
    from apps.mtl_system_items_b
    where segment1=c_data_rec.item4;
    select distinct Item_type into v_item_type4
    from apps.mtl_system_items_b
    where segment1=c_data_rec.item4;
    ELSE
    v_itemid4:= null;
    v_item_type4:= null;
    END IF;
    IF c_data_rec.item5 is not null then
    select distinct inventory_item_id into v_itemid5
    from apps.mtl_system_items_b
    where segment1=c_data_rec.item5;
    select distinct Item_type into v_item_type5
    from apps.mtl_system_items_b
    where segment1=c_data_rec.item5;
    ELSE
    v_itemid5:= null;
    v_item_type5:= null;
    END IF;
    l_header_rec := OE_ORDER_PUB.G_MISS_HEADER_REC; -- Required attributes (e.g. Order Type and Customer)
    l_header_rec.order_type_id := v_transaction_type;
    l_header_rec.ordered_date := c_data_rec.iwb_date;
    l_header_rec.sold_to_org_id := v_cust_id;
    l_header_rec.price_list_id := 93174;
    l_header_rec.cust_po_number := c_data_rec.iwb_no;
    l_header_rec.ship_to_org_id := v_ship_to;
    l_header_rec.invoice_to_org_id := v_invoice_to;
    l_header_rec.CONTEXT:='566' ;
    l_header_rec.ATTRIBUTE1:=c_data_rec.DELIVERY_TYPE;
    -- l_header_rec.freight_term_code = NULL;
    l_header_rec.operation := OE_GLOBALS.G_OPR_CREATE;
    -- FIRST LINE RECORD. Initialize record to missing
    if c_data_rec.item1 is not null and
    c_data_rec.item2 is not null and
    c_data_rec.item3 is not null and
    c_data_rec.item4 is not null and
    c_data_rec.item5 is not null then
    l_line_tbl(1) := OE_ORDER_PUB.G_MISS_LINE_REC;
    l_line_tbl(1).inventory_item_id :=v_itemid1;
    l_line_tbl(1).ordered_quantity := c_data_rec.quantity1;
    l_line_tbl(1).CALCULATE_PRICE_FLAG :='N';
    l_line_tbl(1).UNIT_SELLING_PRICE := c_data_rec.price1;
    l_line_tbl(1).UNIT_LIST_PRICE := c_data_rec.price1;
    l_line_tbl(1).attribute13:= v_item_type1;
    l_line_tbl(1).operation := OE_GLOBALS.G_OPR_CREATE;
    --end if;
    -- SECOND LINE RECORD
    --elsif c_data_rec.item2 is not null then
    l_line_tbl(2) := OE_ORDER_PUB.G_MISS_LINE_REC;
    l_line_tbl(2).inventory_item_id := v_itemid2;
    l_line_tbl(2).ordered_quantity := c_data_rec.quantity2;
    l_line_tbl(2).CALCULATE_PRICE_FLAG :='N';
    l_line_tbl(2).UNIT_SELLING_PRICE := c_data_rec.price2;
    l_line_tbl(2).UNIT_LIST_PRICE := c_data_rec.price2;
    l_line_tbl(2).attribute13:=v_item_type2;
    l_line_tbl(2).operation := OE_GLOBALS.G_OPR_CREATE;
    --end if;
    -- THIRD LINE RECORD
    --elsif c_data_rec.item3 is not null then
    l_line_tbl(3) := OE_ORDER_PUB.G_MISS_LINE_REC;
    l_line_tbl(3).inventory_item_id := v_itemid3;
    l_line_tbl(3).ordered_quantity := c_data_rec.quantity3;
    l_line_tbl(3).CALCULATE_PRICE_FLAG :='N';
    l_line_tbl(3).UNIT_SELLING_PRICE := c_data_rec.price3;
    l_line_tbl(3).UNIT_LIST_PRICE := c_data_rec.price3;
    l_line_tbl(3).attribute13:=v_item_type3;
    l_line_tbl(3).operation := OE_GLOBALS.G_OPR_CREATE;
    --end if;
    -- FOURTH LINE RECORD
    --elsif c_data_rec.item4 is not null then
    l_line_tbl(4) := OE_ORDER_PUB.G_MISS_LINE_REC;
    l_line_tbl(4).inventory_item_id := v_itemid4;
    l_line_tbl(4).ordered_quantity := c_data_rec.quantity4;
    l_line_tbl(4).CALCULATE_PRICE_FLAG :='N';
    l_line_tbl(4).UNIT_SELLING_PRICE := c_data_rec.price4;
    l_line_tbl(4).UNIT_LIST_PRICE := c_data_rec.price4;
    l_line_tbl(4).attribute13:=v_item_type4;
    l_line_tbl(4).operation := OE_GLOBALS.G_OPR_CREATE;
    --END IF;
    -- FIFTH LINE RECORD
    --elsif c_data_rec.item5 is not null then
    l_line_tbl(5) := OE_ORDER_PUB.G_MISS_LINE_REC;
    l_line_tbl(5).inventory_item_id := v_itemid5;
    l_line_tbl(5).ordered_quantity := c_data_rec.quantity5;
    l_line_tbl(5).CALCULATE_PRICE_FLAG :='N';
    l_line_tbl(5).UNIT_SELLING_PRICE := c_data_rec.price5;
    l_line_tbl(5).UNIT_LIST_PRICE := c_data_rec.price5;
    l_line_tbl(5).attribute13:= v_item_type5;
    l_line_tbl(5).operation := OE_GLOBALS.G_OPR_CREATE;
    elsif c_data_rec.item1 is not null and
    c_data_rec.item2 is not null and
    c_data_rec.item3 is not null and
    c_data_rec.item4 is not null then
    l_line_tbl(1) := OE_ORDER_PUB.G_MISS_LINE_REC;
    l_line_tbl(1).inventory_item_id :=v_itemid1;
    l_line_tbl(1).ordered_quantity := c_data_rec.quantity1;
    l_line_tbl(1).CALCULATE_PRICE_FLAG :='N';
    l_line_tbl(1).UNIT_SELLING_PRICE := c_data_rec.price1;
    l_line_tbl(1).UNIT_LIST_PRICE := c_data_rec.price1;
    l_line_tbl(1).attribute13:= v_item_type1;
    l_line_tbl(1).operation := OE_GLOBALS.G_OPR_CREATE;
    --end if;
    -- SECOND LINE RECORD
    --elsif c_data_rec.item2 is not null then
    l_line_tbl(2) := OE_ORDER_PUB.G_MISS_LINE_REC;
    l_line_tbl(2).inventory_item_id := v_itemid2;
    l_line_tbl(2).ordered_quantity := c_data_rec.quantity2;
    l_line_tbl(2).CALCULATE_PRICE_FLAG :='N';
    l_line_tbl(2).UNIT_SELLING_PRICE := c_data_rec.price2;
    l_line_tbl(2).UNIT_LIST_PRICE := c_data_rec.price2;
    l_line_tbl(2).attribute13:=v_item_type2;
    l_line_tbl(2).operation := OE_GLOBALS.G_OPR_CREATE;
    --end if;
    -- THIRD LINE RECORD
    --elsif c_data_rec.item3 is not null then
    l_line_tbl(3) := OE_ORDER_PUB.G_MISS_LINE_REC;
    l_line_tbl(3).inventory_item_id := v_itemid3;
    l_line_tbl(3).ordered_quantity := c_data_rec.quantity3;
    l_line_tbl(3).CALCULATE_PRICE_FLAG :='N';
    l_line_tbl(3).UNIT_SELLING_PRICE := c_data_rec.price3;
    l_line_tbl(3).UNIT_LIST_PRICE := c_data_rec.price3;
    l_line_tbl(3).attribute13:=v_item_type3;
    l_line_tbl(3).operation := OE_GLOBALS.G_OPR_CREATE;
    --end if;
    -- FOURTH LINE RECORD
    --elsif c_data_rec.item4 is not null then
    l_line_tbl(4) := OE_ORDER_PUB.G_MISS_LINE_REC;
    l_line_tbl(4).inventory_item_id := v_itemid4;
    l_line_tbl(4).ordered_quantity := c_data_rec.quantity4;
    l_line_tbl(4).CALCULATE_PRICE_FLAG :='N';
    l_line_tbl(4).UNIT_SELLING_PRICE := c_data_rec.price4;
    l_line_tbl(4).UNIT_LIST_PRICE := c_data_rec.price4;
    l_line_tbl(4).attribute13:=v_item_type4;
    l_line_tbl(4).operation := OE_GLOBALS.G_OPR_CREATE;
    elsif c_data_rec.item1 is not null and
    c_data_rec.item2 is not null and
    c_data_rec.item3 is not null then
    l_line_tbl(1) := OE_ORDER_PUB.G_MISS_LINE_REC;
    l_line_tbl(1).inventory_item_id :=v_itemid1;
    l_line_tbl(1).ordered_quantity := c_data_rec.quantity1;
    l_line_tbl(1).CALCULATE_PRICE_FLAG :='N';
    l_line_tbl(1).UNIT_SELLING_PRICE := c_data_rec.price1;
    l_line_tbl(1).UNIT_LIST_PRICE := c_data_rec.price1;
    l_line_tbl(1).attribute13:= v_item_type1;
    l_line_tbl(1).operation := OE_GLOBALS.G_OPR_CREATE;
    --end if;
    -- SECOND LINE RECORD
    --elsif c_data_rec.item2 is not null then
    l_line_tbl(2) := OE_ORDER_PUB.G_MISS_LINE_REC;
    l_line_tbl(2).inventory_item_id := v_itemid2;
    l_line_tbl(2).ordered_quantity := c_data_rec.quantity2;
    l_line_tbl(2).CALCULATE_PRICE_FLAG :='N';
    l_line_tbl(2).UNIT_SELLING_PRICE := c_data_rec.price2;
    l_line_tbl(2).UNIT_LIST_PRICE := c_data_rec.price2;
    l_line_tbl(2).attribute13:=v_item_type2;
    l_line_tbl(2).operation := OE_GLOBALS.G_OPR_CREATE;
    --end if;
    -- THIRD LINE RECORD
    --elsif c_data_rec.item3 is not null then
    l_line_tbl(3) := OE_ORDER_PUB.G_MISS_LINE_REC;
    l_line_tbl(3).inventory_item_id := v_itemid3;
    l_line_tbl(3).ordered_quantity := c_data_rec.quantity3;
    l_line_tbl(3).CALCULATE_PRICE_FLAG :='N';
    l_line_tbl(3).UNIT_SELLING_PRICE := c_data_rec.price3;
    l_line_tbl(3).UNIT_LIST_PRICE := c_data_rec.price3;
    l_line_tbl(3).attribute13:=v_item_type3;
    l_line_tbl(3).operation := OE_GLOBALS.G_OPR_CREATE;
    end if;
    -- CALL TO PROCESS ORDER
    OE_Order_PUB.Process_Order(
    p_api_version_number=>1.0,
    p_header_rec => l_header_rec,
    p_line_tbl=> l_line_tbl,
    p_line_adj_tbl=> l_line_adj_tbl,
    -- OUT variables,
    x_header_rec =>l_header_rec
    , x_header_val_rec =>l_header_val_rec
    , x_Header_Adj_tbl =>l_Header_Adj_tbl
    , x_Header_Adj_val_tbl =>l_Header_Adj_val_tbl
    , x_Header_price_Att_tbl =>l_Header_price_Att_tbl
    , x_Header_Adj_Att_tbl =>l_Header_Adj_Att_tbl
    , x_Header_Adj_Assoc_tbl =>l_Header_Adj_Assoc_tbl
    , x_Header_Scredit_tbl =>l_Header_Scredit_tbl
    , x_Header_Scredit_val_tbl=>l_Header_Scredit_val_tbl
    , x_line_tbl =>l_line_tbl
    , x_line_val_tbl =>l_line_val_tbl
    , x_Line_Adj_tbl =>l_Line_Adj_tbl
    , x_Line_Adj_val_tbl =>l_Line_Adj_val_tbl
    , x_Line_price_Att_tbl =>l_Line_price_Att_tbl
    , x_Line_Adj_Att_tbl =>l_Line_Adj_Att_tbl
    , x_Line_Adj_Assoc_tbl =>l_Line_Adj_Assoc_tbl
    , x_Line_Scredit_tbl =>l_Line_Scredit_tbl
    , x_Line_Scredit_val_tbl =>l_Line_Scredit_val_tbl
    , x_Lot_Serial_tbl =>l_Lot_Serial_tbl
    , x_Lot_Serial_val_tbl =>l_Lot_Serial_val_tbl
    , x_action_request_tbl =>l_action_request_tbl,
    x_return_status=> l_return_status,
    x_msg_count=> l_msg_count,
    x_msg_data=> l_msg_data);
    if l_msg_count > 0 then
    for l_index in 1..l_msg_count loop
    l_msg_data := oe_msg_pub.get(p_msg_index => l_index, p_encoded => 'F');
    update XXSC_SALES_ORDER_IMPORT
    set process_flag='E',remarks=l_msg_data
    where iwb_no=c_data_rec.iwb_no;
    commit;
    dbms_output.put_line('Order Failed.'||l_msg_data);
    end loop;
    end if;
    -- Check the return status
    if l_return_status = FND_API.G_RET_STS_SUCCESS then
    update XXSC_SALES_ORDER_IMPORT
    set process_flag='Y',ORDER_NUMBER=l_header_rec.order_number,remarks='SUCCESS'
    where iwb_no=c_data_rec.iwb_no;
    commit;
    fnd_file.put_line (fnd_file.output,'Order no:'||l_header_rec.order_number||' Created for the IWB no:'||c_data_rec.iwb_no);
    dbms_output.put_line('Order..'||l_header_rec.order_number);
    Else
    dbms_output.put_line('Order Failed.');
    end if;
    commit;
    END LOOP;
    End;
    /

    Your code always sends 4 line records with each header. Code is not checking if it belongs to same header or not. Please check your code.

  • Info record Po text not printing in Po

    Hi all,
             Info record po text not printing in po print out. Info record po text showing in po at item level but it was not printing in po. In info record No matl text checked. In material master no text maintained. please help on this
             Thanks in advance for your help

    Hi Mahesh,
    Follow the path:
    SPRO--> MM --> Purchasing --> Messages --> Texts for Messages ---> Define texts for Purchase Order
    Double click on "Texts for Document Item" under Dialog Structure
    Click on new entries and then Fill the following fields:
    Pur. Doc. Category: Purchase Order
    Print Operation: New
    Doc. Type: NB
    Item Category: Standard
    Text Object: Purchasing Doc. Item texts (EKPO)
    Text Id: Info Record PO Text (F02)
    Print Sequence: 2
    Print Priority: 1
    and then Save
    Hope this helps
    Thanks,
    Ankur

  • "Audio File "Recording#27.aif" not found" Error Message- Please HELP!

    Hi Everyone-
    I was opening a podcast today to finish editing it and I got this error message, "Audio File "Recording#27.aif" Not Found" - and, naturally, when I opened the project, half of a phone interview was missing (or, rather, it shows up as purple balloons but each one says "File Not Found" inside). This file is the audio from the interviewer (the interviewee file is totally fine, as are all others in the podcast). When I load the project it asks if I want to search for this missing file, but when I click yes it says that it can't be found.
    How can I find this file? What happened to it? Thank you for any ideas, suggestions, etc. For reference, I'm using GarageBand 3.0.4 on a MacBook Intel Core Duo 2Ghz and Mac OS X 10.4.11

    no, GB wouldn't delete anything on it's own. it only deletes files for which you've deleted the entire region from the timeline and then saved
    if the file is not within the projects, i'm afraid it's gone, and i can't think of any way that could happen by itself B-(>
    Well i guess I should warn others that copying and pasting is very dangerous stuff! I had two podcasts- in podcast #1 GB saved the interview file as "Recording#27.aif" and in podcast #2 GB saved a little intro clip under the same name. When I pasted the intro clip from podcast #2 into podcast #1 my interview disappeared. I didn't delete it- I was never asked about it, I didn't delete the region from the timeline, etc. I have to assume that since they had the same name, GB thought I no longer needed the "Recording#27" from podcast #1 and now I can't find it anywhere! If anyone has any suggestions as to how I could find this file I would be very appreciative.

Maybe you are looking for

  • Error message: iTunes Library.itl file cannot be found or created

    I just upgraded to iTunes 7.0.2 and it will not launch. The following error appears: "The iTunes Library.itl file cannot be found or created. The default location for this file is in the "iTunes" folder in the "MyMusic" folder" I have uninstalled, re

  • Help! Incompatible power adaptor for my WVC54GCA!

    Hi, I just purchased 2 units of refurbished WVA54GCA cameras and realized the power adaptor is only suitable in US (i.e. 110V). I believe the model that works here is DSA-6G-05 FUK 050100. Can someone advise where can I get this type of adaptor from?

  • Upload/Insert PDF with Image Manager

    I used to be able to insert a PDF and MP3 file through the Image Manager within the Item Description area but for some time have not been able to. I had asked the question in the old forums to no resolve. I've tried multiple sites from multiple brows

  • SERIOUS IPOD PROBLEM! SCREEN! :(

    My iPod has worked fine so far. 5G, 30GB iPod White. Until today the screen has froze. It has lines that appear on your laptop if you pushed it on the back. Colored lines stretched accross the screen. I tried to reset, but it is the actual screen tha

  • IDOC:Master Data Records are not going to be updated after posting the IDOC

    I need to create employee Master data records in R/3 .I am using the IDOC HRMD_A07, though the IDOC posting is successful no tables, corresponding to employee master Data are getting  updated, Can anybody plz Let me know the possible reasons and solu