If i press the Find button didn't get the all fields

Hi...........
If i press the find button only two fields get the values remaining fields didn't get the values
:CONTROL_1.ASSET_NUMBER := i.asset_serial_numebr;
:CONTROL_1.INSTANCE_NUMBER := i.serial_number; ---------------only this two fields are inserted.
actually in loop first i taken those two fields then i taken begin i wrote select statement it's not working i think tats why only two fields are get the values.
i wrote this code in find button
declare
     cursor c1 is
     select aa.serial_number asset_serial_numebr,
aa.instance_number serial_number
from mtl_eam_asset_numbers_v aa,
mtl_eam_asset_attr_values av
where aa.serial_number = av.serial_number
and aa.MAINTENANCE_OBJECT_ID= av.MAINTENANCE_OBJECT_ID
and av.attribute_category = 'Expected Life Details'
and av.c_attribute3 not in ('Stolen','Under Disposal')
and aa.inv_organization_id = :global.ORG_ID
and aa.inventory_item_id = :CONTROL.INV_ITEM_ID
order by aa.serial_number;
     cur1 c1%rowtype;
begin
     open c1;
     fetch c1 into cur1;
     if(c1%NOTFOUND) then
          go_block('CONTROL_1');
     clear_block;
          fnd_message.set_string('Asset not available for selected group');
     fnd_message.show();
raise form_trigger_failure;
     end if;
     close c1;
     :parameter.RECORD_COUNT := 0;
     go_block('CONTROL_1');
     clear_block;
     first_record;
     for i in c1
     loop
          :CONTROL_1.ASSET_NUMBER := i.asset_serial_numebr;
          :CONTROL_1.INSTANCE_NUMBER := i.serial_number;
     begin
     select
     depr_method,
     commision_date,
     asset_cost,
     asset_life,
     salvage_life,
     period,
     months,
     pre_depr_cost,
     pre_cost_after_depr,
     remarks
     into
     :CONTROL_1.DEPR_METHOD,
     :CONTROL_1.COMMISION_DATE,
     :CONTROL_1.ASSET_COST,
     :CONTROL_1.ASSET_LIFE,
     :CONTROL_1.SALVAGE_LIFE,
     :CONTROL_1.PERIOD,
     :CONTROL_1.MONTHS,
     :CONTROL_1.PRE_DEPR_COST,
     :CONTROL_1.PRE_COST_AFTER_DEPR,
     :CONTROL_1.REMARKS
     from xxeam_depreciation_master
     where org_id = :global.ORG_ID
     and inventory_item_id = :CONTROL.INV_ITEM_ID
     and instance_number = :CONTROL_1.ASSET_NUMBER;
     exception
          when no_data_found then
          null;
     end;
     :parameter.RECORD_COUNT := :parameter.RECORD_COUNT + 1;
          next_record;
     end loop;
     first_record;
end;
Please give me any solution................
Regards
Mohan

Mohan,
We cannot read your mind, so you need to describe what you are trying to do in greater detail.
And always post your indented code in code tags like this, {code}..your code here..{code}
begin
open c1;
fetch c1 into cur1;
if(c1%NOTFOUND) then
go_block('CONTROL_1');
clear_block;The Fetch is not in a loop, so only the first row will be read.
And then suddenly we see
for i in c1
loop
next_record;
end loop;And what FOR i doing in this place? Where is the fetch for the second record onwards?
Too many errors in the code.
Regards,

Similar Messages

  • "Find" button does not clear all the fields properly.

    Hi,
    A JSF jsp Query page is created and a set of components are dragged from the Data Control Palette. They include three inputTexts, two buttons (find, submit). Both of the buttons are dragged from the relationship from the Data Control Palette as well.
    At the first time the "Find" button is clicked, it clears all three inputTexts. The user can enter query and press submit button and go to the result page. Example:
    Zip: 85007
    First Name: Tom
    Last Name: Smith
    But when the user click the "Go back to query page" button on the result page to return to the query page, the "Find" button needs to be clicked 3 times in order to clear all the inputTexts.
    Anybody knows how to fix it? Thank you.
    Annie

    I just tried it with DEPT & EMP from HR. The problem is still there.
    I dragged a master-detail relationship from the data control palette where DEPT is the master and EMP is the detail. "Find" & "Execute" buttons are also dragged from the DepartmentView1 Operations. When I click "Find" button the very first time, it clears all the fields in DEPT (master) and I can put my query there. For example, I put 50 for DepartmentID then hit "Execute". It gives me 45 details. Then I click "Find" again to do another query. Here comes the problem. "50" is still in the DepartmentID field. If I click "Find" again, DepartmentName Shipping, ManagerId 121 and LocationId 1500 will all appear in the master. If I click "Find" button the 3rd time, it clears all the fields in DEPT for me to enter another query.
    I do not think this is the right way for the "find" button to work. Did I do anything wrong? What could be the problem? Please help. Thank you very much.
    Annie

  • How to add find button

    I want to add a find button in a screen, so what is the concept and code to impliment the functionality of find button.
    Points will be rewarded if help full.
    Thanks & Regards.
    SC Mahanta.

    hi,
    here i have done same...
    when user press find button , one screen get call and i enter search term in that and then it finds the row with same string...
    if u want so then do like this
    MODULE user_command_1000 INPUT.
    CASE sy-ucomm.
    WHEN 'BACK' OR 'UP' OR 'CANC'.
    LEAVE PROGRAM.
    WHEN 'FND'.
    CALL SCREEN 1001 STARTING AT 37 5 ENDING AT 87 22.
    ENDCASE.
    ENDMODULE. " user_command_1000 INPUT
    when user enters search term u need to call ur main screen
    MODULE user_command_1001 INPUT.
    CASE sy-ucomm.
    WHEN 'OK'.
    CALL SCREEN 1000.
    ENDCASE.
    ENDMODULE. " USER_COMMAND_1001 INPUT
    now u will have on module in PBO in which u fetching data...
    write this in that module..
    MODULE fetch_data OUTPUT.
    SELECT matnr matkl INTO CORRESPONDING FIELDS OF TABLE itab
    FROM mara
    WHERE matnr BETWEEN '000000000000000101' AND '000000000000000115'.
    IF strin IS NOT INITIAL.
    wa_itab-mark = 'X'.
    LOOP AT itab.
    IF itab-matnr = strin.
    line1 = sy-tabix.
    EXIT.
    ENDIF.
    ENDLOOP.
    IF line1 0.
    MODIFY itab INDEX line1 FROM wa_itab TRANSPORTING mark.
    SET CURSOR LINE line1.
    tab1-top_line = line1.
    ENDIF.
    ENDIF.
    ENDMODULE. " fetch_data OUTPUT
    strin is variable of screen 1001 in which i give search term..
    reward if usefull.

  • How to print the all content of JTextArea to several pages

    Hi there, my application have a JTextArea and user can type text in. When the jbPrint button is pressed, the all content of JTextArea should be printed to papers. But now my application can only print out the first page even the content of JTextArea is 3-page length, does anyone can give me some clue or example? Thanks in advance.!! Really hurry!!

    Use freely downloadable smart jprint classes from http://www.activetree.com. This package also allows you to print contents of any kind of JTextComponent such as JTextField, JTextArea, JEditorPane, and JTextPane.
    Print the swing components with or without showing in the UI. Line breaking is done automatically for you and prints in multiple pages.
    JTable printing is specially interesting.

  • Why does the sound stop after about 10 minutes? I like to listen to lectures, etc. and find it very annoying to have to press the on/off button to restart it every 10 minutes. Couldn't find a way to extend playing time in settings.

    I like to listen to lectures, etc. and find it very annoying to have to press the on/off button to restart it every 10 minutes. Couldn't find a way to extend playing time in settings. Any suggestions? This is my first iPod and I am ready to take it back if I am unable to extend the playing time. Frustrating!

    Rosapeas wrote:
    I like to listen to lectures, etc. and find it very annoying to have to press the on/off button to restart it every 10 minutes. Couldn't find a way to extend playing time in settings. Any suggestions? This is my first iPod and I am ready to take it back if I am unable to extend the playing time. Frustrating!
    I can imagine that is frustrating as heck.  My daughter has one of these and I know for a fact hers does not turn off after 10 minutes because I have to turn it off for her every night after she has fallen asleep.  Below is what Apple has to say about it from a troubleshooting standpoint.
    "If music stops when the iPod nano screen turns off m Make sure the earphone port is free of debris. m Make sure the earphone or headphone connector is pushed in all the way. To see an illustration, go to support.apple.com/kb/ts3700."
    Are you using aftermarket ear buds or speakers when you listen to these lectures???  If so maybe it has something to due with a compatibility issue.

  • LOve Firefox but it's annoying that if I'm using a search engine (I use lots of subscription legal search databases), when I press the back button all the data I entered in the search boxes has disappeared. I'm sure Firefox didn't use to do that?

    Love Firefox but it's annoying that if I'm using a search engine (I use lots of subscription legal search databases), when I press the back button all the data I entered in the search boxes has disappeared. I'm sure Firefox didn't use to do that?

    Please do the following.<br><br>
    #Click the Firefox button, go to '''Options '''| '''Options''' | '''Privacy'''.<br><br>
    #In the dropdown menu at the top, change it to "'''Use custom settings for history'''"<br><br>
    #Checkmark the option: "'''Remember Search and Form history'''".<br><br>
    #Remove the checkmark from: "'''Clear history when Firefox closes'''".

  • In find my iPhone can I shut the sound if I accidentally press the sound button?

    Can I shut the sound if I accidentally pressed the button in find my iPhone?

    The sound stops after a minute or two. To get it to stop before then, you would need to unlock your iPhone.

  • If you forgot your security questions and you pressed the reset button which is supposed to send you an email but didn't

    If you forgot your security questions and you pressed the reset button which is supposed to send you an email but didn't

    Alternatives for Help Resetting Security Questions and Rescue Mail
         1. Apple ID- All about Apple ID security questions.
         2. Rescue email address and how to reset Apple ID security questions
         3. Apple ID- Contacting Apple for help with Apple ID account security.
         4. Fill out and submit this form. Select the topic, Account Security.
         5.  Call Apple Customer Service: Contacting Apple for support in your
              country and ask to speak to Account Security.
    Note: If you have already forgotten your security questions, then you cannot
             set up a rescue email address in order to reset them. You must set up
             the rescue email address beforehand.
    How to Manage your Apple ID: Manage My Apple ID

  • Was just scrolling through my apps when the screen suddenly froze. A force shutdown didn't work and when I pressed the silent on/off button, there was no vibration either. The frozen screen faded to white with a few lines and about 10 minutes later, the

    I was just scrolling through my apps when the screen suddenly froze. A force shutdown didn't work and when I pressed the silent on/off button, there was no vibration either. The frozen screen faded to white with a few lines and about 10 minutes later, the edges started to turn black, forming a ring which got larger till about 4 hours later, the screen turned completely black. I tried connecting to iTunes but it wasn't detecting the phone and I can't do anything with it now... When it turned completely black, I charged it and after a while, the low batt screen came on but it was fuzzy and flickering with the white ring... What to do know ???????

    Restart your computer while holding down left mouse key. That will eject the CD and your Mac will start as normal.
    Lupunus

  • HT200150 I pressed the find my iphone delete button and then my phone showed the apply logo. I then got worried and turned it straight off and now it will not turn back on. The apple logo just comes up for about 10 seconds and it goes back off.

    I pressed the find my iphone delete button and then my phone showed the apply logo. I then got worried and turned it straight off and now it will not turn back on. The apple logo just comes up for about 10 seconds and it goes back off.

    Connect your phone to itunes on the computer you use itunes on and open up itunes.

  • I am updating my iPhone and am stuck on Find my iPhone. It won't let me press the next button and continue

    Please help me.  I am stuck on Find My iPhone.  It won't let me press the next button and continue.  I can go back to iCloud Backup and forward to Find My iPhone, but cannot continue, whether I choose Use or Don't Use.

    Make an appointment at the Genius Bar at Apple and have the device checked.

  • My MacBook Pro won't start it just goes beep beep beep when I press the power button

    My MacBook Pro won't start it just goes beep beep beep when I press the power button

    Hi Csound1,
    I haven't added any RAM my daughter was using the computer then it hung so powered it down then the beeping started. Do you know if there is a combination of buttons I can press when powering up that will put me in some kind of  safe mode so that I can find out what's up, I tried pressing D when the beeping started but it didn't make a difference.
    MC

  • I have frequent instances of my Macbook Pro beeping 3 times and then I have to forcefully shut it down by pressing the power button. What is this all about? Please help. Thank you.

    I have frequent instances of my Macbook Pro beeping 3 times and then I have to forcefully shut it down by pressing the power button. What is this all about? Please help. Thank you.
    I saw this report being sent to Apple:
    Interval Since Last Panic Report:  581719 sec
    Panics Since Last Report:          10
    Anonymous UUID: F4CF708D-D85C-4EC5-8047-4FC22C6B03AF
    Fri Mar  7 13:00:14 2014
    panic(cpu 0 caller 0xffffff80002d1208): Kernel trap at 0xffffff800020c590, type 14=page fault, registers:
    CR0: 0x0000000080010033, CR2: 0x0000000000000000, CR3: 0x0000000007541000, CR4: 0x0000000000040660
    RAX: 0xffffff8000000000, RBX: 0xffffff800d35a870, RCX: 0xffffff800cf55cd8, RDX: 0xffffff80008a8fcc
    RSP: 0xffffff805e5f3d60, RBP: 0xffffff805e5f3da0, RSI: 0x000000001dcd6500, RDI: 0xffffff800d168778
    R8: 0x0000000000000001, R9: 0xffffff805e5f3e88, R10: 0x0000000000000011, R11: 0x0000000000000000
    R12: 0x0000000000000000, R13: 0xffffff800d168770, R14: 0xffffff800d168778, R15: 0x0000000000000000
    RFL: 0x0000000000010082, RIP: 0xffffff800020c590, CS:  0x0000000000000008, SS:  0x0000000000000010
    Error code: 0x0000000000000000
    Backtrace (CPU 0), Frame : Return Address
    0xffffff805e5f3a00 : 0xffffff8000204d15
    0xffffff805e5f3b00 : 0xffffff80002d1208
    0xffffff805e5f3c50 :
    Model: MacBookPro8,1, BootROM MBP81.0047.B27, 2 processors, Intel Core i5, 2.3 GHz, 4 GB, SMC 1.68f99
    Graphics: Intel HD Graphics 3000, Intel HD Graphics 3000, Built-In, 384 MB
    Memory Module: global_name
    AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0xD6), Broadcom BCM43xx 1.0 5.100.198.104.5)
    Bluetooth: Version 2.4.5f3, 2 service, 12 devices, 1 incoming serial ports
    Serial ATA Device: Hitachi HTS545032B9A302, 298.09 GB
    Serial ATA Device: OPTIARC DVD RW AD-5970H
    USB Device: FaceTime HD Camera (Built-in), 0x05ac  (Apple Inc.), 0x8509, 0xfa200000 / 3
    USB Device: Hub, 0x0424 (SMSC), 0x2513, 0xfa100000 / 2
    USB Device: BRCM2070 Hub, 0x0a5c  (Broadcom Corp.), 0x4500, 0xfa110000 / 5
    USB Device: Bluetooth USB Host Controller, 0x05ac  (Apple Inc.), 0x821a, 0xfa113000 / 8
    USB Device: Apple Internal Keyboard / Trackpad, 0x05ac  (Apple Inc.), 0x0245, 0xfa120000 / 4
    USB Device: Hub, 0x0424 (SMSC), 0x2513, 0xfd100000 / 2
    USB Device: IR Receiver, 0x05ac  (Apple Inc.), 0x8242, 0xfd110000 / 3

    Hmm. The problem still may be the RAM - Apple buys the RAM it puts in its machines from third-party vendors (usually Hynix) so it could be a RAM problem.
    There are a couple of things that you can do yourself before taking your machine into an Apple Store or an AASP... download and run an application named Rember that will run a RAM test for you - let it run for a couple of hours or even overnight. If it turns out that your RAM is faulty, Rember will let you know. If it is faulty, then you have a couple of options - replace the RAM yourself or (particularly if you're under warranty still) take the machine to an Apple Store or AASP and have them replace the RAM.
    If Rember finds no fault with the RAM, then you'll need to take it into an Apple Store/AASP and get a free diagnosis on the machine. Three beeps do usually indicate faulty RAM, but if it tests good with Rember you likely have another problem - it could be something as simple as the RAM, somehow, not seated correctly or signs of another hardware problem.
    Run Rember first... call back with results.
    Good luck,
    Clinton

  • I just pressed the wrong button to erase of my IMac, how can I get back all information from my computer ?

    I just pressed the wrong button to erase of my iMac, how can i get back all information ?

    Possibly through a data rescue service (can cost a four-figure amount) if you didn't have an external backup.
    But you must stop using that Mac immediately, or your data will be over-written.

  • Hi! My macbook pro wont switch on at all, pressing the power doesnt do anything, when plugged it switch on to get the white background with the apple sign and a loading button that kept on forever. anyone has a clue?

    Hello as mentionned before I cannot get my macbook pro to switch on.
    when it is not plugged as I press the power button nothing happens, when the computer is power plugged, it gives me the white blackground with the apple centered and the loading button below but it keeps loading forever left it as for 4 hours and still nothing.
    I have try to reset the SMC but didn't change much, now instead of the apple logo I get a circle crossed
    My macbook is 1 year and 4months

    See Gray Screen, try holding the Shift key upon boot
     Cheat sheet to help diagnose and fix your Mac
    Drive may not boot, but if it's still working then data can be recovered
     Data recovery efforts explained
     Most commonly used backup methods explained

Maybe you are looking for

  • I am not satisfied with the font and size of print that I set. How do I change it?

    When I first set up Firefox on my desktop, I set the print size and font. I have found that it is too large and I really would like to change the font, also. I can't find a spot to do that. I might be looking right at it but don't realize it. Could y

  • Sequence in process flow (output from mapping)

    I have a mapping where I am using sequence operator and creating a record in the target table I need to pass this variable out of the mapping and as input to another mapping. I am not able to pass the sequence out of the mapping. How can we assign va

  • IBooks Author preview doesn't work

    I have created a partial iBook using iBooks Author. When I follow the instructions within the application to preview on ipad my ipad doesn't show up in the devices pane. What am I missing?

  • How to creating Service Contract using BAPI_SLSTRANSACT_CREATEMULTI

    Hi, In my requirement, I have to create a Service Contract from flat file by using BAPI - BAPI_SLSTRANSACT_CREATEMULTI  and data which are comming from flat files are, Serial number, Sold-to party, Ship-to party, Installation date, Contract start dat

  • ITunes keeps asking for a disk while I am trying to uninstall

    I am trying to uninstall iTunes so that I can reinstall it.  However, it keeps asking for a disk.  Also I have tried to use Windows Cleanup Utility 7.2, but get an error when I attempt to run it.  I think I may have started uninstalling the component