Problem in update statment when using where condtion

Hi ,
      Iam using update statment to update field in Z-Table .My statment is not working fine as per my requirement.The statment is as below,
UPDATE ZFINAL_DATA  SET ZDATE_FLAG = SPACE where ZGLOBAL_CODE ( SELECT LIFNR FROM LFA1 WHERE KTOKK = 'ZLIE' ).
But this statment is doing my purpose .
My requirement is , I need to update ZDATE_FLAG = SPACE in ZFINAL_DATA table when LFA1 -LIFNR = ZFINAL_DATA-ZGLOBAL_CODE and LFA1-KTOKK = 'ZLIE'.
Can any correct the update statment which will be helpfull to proceed further .
Regards,
Sriram

Hi Sriram,
Have a look into the logic of the below query. Maybe this will fulfil the requirement.
TYPES:     BEGIN OF lt_lifnr,
         lifnr TYPE lifnr,
     END OF lt_lifnr.
DATA:      la_lifnr TYPE TABLE OF lt_lifnr,
       wa_zfinal_data TYPE zfinal_data,
       la_zfinal_data TYPE TABLE OF zfinal_data.
TABLES: zfinal_data.
SELECT lifnr
FROM lfa1
INTO TABLE la_lifnr
WHERE ktokk = 'ZLIE'.
SORT la_lifnr BY lifnr.
SELECT *
FROM zfinal_data
INTO TABLE la_zfinal_data.
LOOP AT la_zfinal_data INTO wa_zfinal_data.
  READ TABLE la_lifnr WITH KEY lifnr = wa_zfinal_data-zglobal_code
                      BINARY SEARCH TRANSPORTING NO FIELDS.
  IF sy-subrc = 0.
    wa_zfinal_data-zdate_flag = space.
    MODIFY la_zfinal_data
    FROM wa_zfinal_data
    INDEX sy-tabix
    TRANSPORTING zdate_flag.
  ENDIF.
ENDLOOP.
MODIFY zfinal_data FROM TABLE la_zfinal_data.
COMMIT WORK.

Similar Messages

  • Problems w/ race conditions when using attachmovie

    Hello,
       I'm having a strange problem w/ race conditions when using attachmovie.
    I have a class linked to a movie clip that I'm attaching to the stage.   The class is
    fired off when the movie clip is attached but also other classes are getting loaded at the same time
    while the movie clips is attached.     Even though the other classes are called after the
    movieclip is attached, they are getting loaded faster and therefor the class linked to the attached movie clip
    cannot access their functions. 
    I'm looking for a listener that will fire off an event ONLY when the attached movieclip is fully loaded but I can't
    seem to find any examples of associating a listener to a attachmovie method.
    Any ideas?
    Thanks,
    Clem C

    flash is single threaded so nothing happens simultaneously.  what do you mean by, "other classes are getting loaded at the same timewhile the movie clips is attached"

  • Problem to update UDO-recordsets using a matrix with DBDataSource

    Hello,
    I've got a problem with updating recordsets in an UDO-Table using DBDataSource.SetValue().
    Special szenario: I use a matrix bounded with DBDataSources. Adding new records and loading them via DBDataSource.Query() with conditions works fine. The UDO object type is "Document" without lines.
    In the simple way now I load just one record and after this I was trying to set an "message" to an simple, editable edittext-column via calling:
    oDBDataSource.SetValue("U_Message", 0, "Hello world");
    oMatrix.LoadFromDataSource();
    Now it's visible in the matrix.
    But when I call update via clicking the update-button, B1 do say, everything was ok (green status-message). Reloading this recordset you can see: it was not stored in the database
    Even not after:
    oMatrix.FlushToDataSource();
    As a workaround I do write the "message" via using Cell.Specific.
    Can anybody help me?
    I'am using SBO 2005 A SP 01 PL 39
    Edited by: Christian Bührig on Mar 18, 2008 4:48 PM

    look at
    New Row in Matrix is a Duplicate and Cannot update Object with new Row
    the next way is do it with recordset and directly insert to table.
    hope it helps
    Petr

  • Problem while updating Item category using Bapi_salesorder_change

    Hi,
    Iam facing a probelm while updating item category using bapi Bapi_salesorder_change
    In the Return table iam getting the folowing mesages.
    Inforation mesage : Field 'PSTYV' cannot be changed, VBAPKOM 000010  ready for input
    Error Message : Item 000010 cannot be processed.
    Please find the code below
    CLEAR wa_bapisdh1x.
      wa_bapisdh1x-updateflag = 'U'.
      CLEAR wa_order_item_inx.
      wa_order_item_inx-itm_number = wa_vbap-posnr.
      wa_order_item_inx-item_categ = 'X'.
      wa_order_item_inx-UPDATEFLAG = 'U'.
      APPEND  wa_order_item_inx TO it_order_item_inx.
      CLEAR wa_order_item_inx.
      CLEAR wa_order_item_in.
      wa_order_item_in-itm_number = wa_vbap-posnr.
      wa_order_item_in-item_categ = 'ABC'.
      APPEND wa_order_item_in TO it_order_item_in.
      CLEAR wa_order_item_in.
    CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
        EXPORTING
          salesdocument    = w_vbeln
          order_header_inx = wa_bapisdh1x
        TABLES
          return           = it_return
          order_item_in    = it_order_item_in
          order_item_inx   = it_order_item_inx
    How can i correct it..
    Regards
    Kumar

    Actually iam facing a strange problem here.
    When i copy the program into another sample program and execute it iam able to change both the item catgegory and delivery block for particular sales order and item number.
    But in my main program i have BDC for MB1B transaction to create the material document.
    Once the material document is created succesfully iam using BAPI Sales_order_change to change the item category and delivery block..
    In my main program iam not to change the item catgeory getting an error field PSTYV cannot be changed.
    But the same code is running percfectly in the copied one..
    How can i correct that..
    Regards
    Kumar

  • Orange mail software problem when using distribution lists : some lists cannot be used for writing e-mails. The problem does not exist when using Internet Explo

    When writing an e-mail directly on the Orange e-mail service (not on Thunderbird) I am facing the following problem : some distribution lists cannot be used to complete the adressees. The same lists can be used without difficulty if I use Internet Explorer instead of Firefox. The Orange hotline told me that probably my Firefox version was not updated. Unfortunately I checked that, and apparently the automatic updating works. I have also updated the plug ins, without any result.

    Please could you specify which webpage you mean ?
    The process with Orange is the following :
    - 1. click on "Write an e-mail" on the mail webpage
    - 2. click on "To" to reach the Contacts which opens a new window
    - 3. click on "Distribution lists"
    - 4. click on the selected list then click on "add". The list appears ot the box corresponding to the addresses .
    UNTIL THEN EVERYTHING WORKS WELL
    - 5. click on the button "validate", which closes the window previously opened and normally
    - 6. reloads the initial page with the complete list on the line "To". Instead of that I get the last e-mail address I previously used .
    Question : at which step of this process should I try your suggestions ? I tried when the initial page was reloaded with the wrong address, but it did not work to get back the rignt distribution list;
    Note that the whole process functions with OTHER Distribution lists. The only difference is that the problematic one has a larger number of adresses (62) however inferior to the maximum indicated by Orange (100).
    I also remind that there is no problem when using Internet Explorer instead of Firefox.
    Thanks for your help !

  • Problem quality of sound when use the microphone

    Hello,
    I have big problem.
    I have today buy the headphone HS-1000 gaming.
    My problem is when use the microphone (skype or mumble) my sound in game in very very poor !!!!
    I have latest drivers availible on creative website
    You have any idea ?
    Sorry for my bad english
    Regard
    Fifane

    Try converting to .mp3. You will almost always get some loss when converting one compressed format to another. It shouldn't be that noticeable though.
    What bit rate are your .wma files?

  • Problems with USB device when using WindowsNT

    Hi,
    my problem is that I want to use a simulator which can only be connected with USB to the computer.
    I used the VISA Driver Development Wizard as discribed in this link (http://zone.ni.com/devzone/conceptd.nsf/webmain/6792BAB18242082786256DD7006B6416) and it didn't work.
    I'm using Windows NT and VISA 3.1 and I read that it isn't possible to create a USB connection with VISA when using Windows NT. So my questions
    1) is this right
    2) Has someone a idea what I can do? I tried to use VISA USB Control and this also didn't work.
    I hope I discribed my problem detailed enough. It's my first post.
    Thanks for your responses
    Joerg

    As you can see in this table, USB is not supported by VISA under NT:
    http://digital.ni.com/public.nsf/websearch/EE34F21ECC2BE01286256C52005D1A1F?OpenDocument
    I would recommend to use Win2000 or XP. Using one of these OSes you could use this turorial  to create your VISA-driver:
    http://zone.ni.com/devzone/devzoneweb.nsf/Opendoc?openagent&1D0DD81FF1448CAE86256D90006EE2B4
    If it is not posssible to change the OS, you have to look for other ways of programming your usb-device. Check the web or the Microsoft site for help concerning Windows SDK and USB.
    Hope this helps a little!

  • Update bundling when using OO Programming

    How do I use update bundling when I try to save data to Multile tables, in OO programming concept? In classic SAP, we can use a perform on commit and roll back, but can I achieve this in OO prgramming, without having to create a function module specificly for saving? I am not using a OO transaction.
    Thanks

    For bundle updates you have to create a special update function module. You can find details here: http://help.sap.com/saphelp_erp2004/helpdata/en/41/7af4cba79e11d1950f0000e82de14a/frameset.htm

  • Wont update application when using itunes

    i cant update my apps. when using itunes,
    i update all my apps on itunes but when i apply it on my phone it wont take effect??
    PLS HELP!! >.<

    Are you able to update the apps using the App Store on your iPhone? 

  • Problem exporting to excel when using embedded web templates through WAD

    Using web templates designed with WAD, we are experiencing an issue when trying to export excel when using embedded web templates. 
    We have set up tabstrips within our templates that load other templates (embedded into the global template). 
    Upon right clicking on any query and choosing "Export to Excel", any query that is in one of the tabs using the embedded web template item does not show up.  Any queries in natively in the global web template will export and show up fine.
    Any thoughts on how to enable something like this, or workarounds to make this work?  We decided to split up these templates for performance reasons and can't go back from that decision.  Also let me know if you need a better explanation of what we're trying to do.
    Thanks in advance!
    Jonathan

    Hi SDBI,
    Is this in place of loading a new template per tab?  We are using container layouts in all of our templates so we can link things into tabstrips as well, we have just split up some templates to be embedded into tabs for performance reasons and data locking.
    Also when exporting, we are looking for all of the items displayed at that time to be exported, however only the items from the global template show up, not all of the displayed queries.  For example, anything outside of the tabstrip will export perfectly, but since the query embedded into the template the tabstrip is loading is not part of the native web template, it does not show up.
    Seems like a tool limitation to me when embedding templates?
    Thanks,
    Jon

  • I have problems typing certain characters when using gmail or online forums. Can someone help?

    When I try to use an apostrophe, when using online forums or my email (all in safari), a white bar appears at the bottom of the screen displaying the punctuation mark but it will not allow me to use it. Any idea how I can fix this?

    Have you tried resetting your iPad?
    Reset: Press the Home and On/Off buttons at the same time and hold them until the Apple logo appears (about 10 seconds).
    No data will be lost.

  • I have been having problems with YouTube functionality when using Firefox, some of them having begun with the latest Firefox update

    After a fairly recent update, I began having the option to paste text disappear, I've had backspace cause the browser to go back to the previous page while in a text box, and other issues which are apparently a matter of Firefox not recognizing the fact that I am typing in a text box.
    After the last update, suddenly YouTube video page URL links no longer translate into links containing the title of the video, and also things like the use of bookend asterisks in order to have text appear in bold typeface no longer work.

    i have the same problem with the above..firefox is running too slow with the games in facebook..but it runs good when browsing my updates, msgs, photos...firefox is totally opposite of IE..IE is faster with the games and slow while browsing..i love to use mozila but when i do games it really pisses me off...hope you could help me..

  • Ibook G4 having  problem with airport connection when using secure network

    Hi,
    I am currently using a brand new Macbook. I am connected wirelessly to a Comcast network through my Netgear Wireless-N 150 router model WNR 1000. The problem I am having is with the 4 year old ibook when I go to use the airport and connect to my existing network it says the password is incorrect. I spent time troubleshooting this with Netgear and basically we found out that the ibook does connect with the network when there is no security at all.
    I erased the hard drive on this ibook to prepare it for sale and it is back to the factory settings. Is there some kind of firmware or drivers I am missing to use the airport as described?? I want to be able to show the buyer that the internet works etc. I also may want to install a few things on the ibook before the sale.
    Thanks a mil
    Message was edited by: omshanti

    Did you reset the wireless router to see if by default, it has a different
    wireless security then, than however it presently is set up?
    The question you pose appears to be marked "answered or solved."
    When you reinstall an OS X, the setup asks if you have an existing
    wireless connection, or if you will be getting a new one; by default,
    the setup will make the existing one the automatic one for OS X.
    You should not have to add passwords or other, unless there has
    been one set in KeyChain or for the specific wireless base in question.
    Tiger 10.4.x does not require you to have a set password for wi-fi,
    but you will find several levels of secure options available in OS X.
    Not sure why your setup and configuration is problematic. Usually,
    a totally new OS X installation is without issue. Sometimes, you
    may have to administer a base station via Ethernet cable before
    some configurations can use it, but an existing network should be
    easy, unless it already has a password security in place.
    The Mac will work without a password-protected wi-fi internet source;
    often it will 'just work' even when moved to a new environment and
    a neighbor's network, if not password protected, will appear among
    other options in your vicinity and it will be automatically available.
    Not sure if any newer OS X update parts, from the Combo update
    files to take Tiger 10.4 to 10.4.11, plus others, would help the Mac
    connect better to whatever wireless source of internet available.
    I've not had that issue, as you state, except for when someone has
    a protected network or passwords in place. Mine has passwords to
    keep unauthorized neighbors from easy access; just in case.
    In remote locations where few neighbors exist who could access wi-fi
    from a lone source, no wireless security settings at all, work just fine.
    I've done that; and found a little greater range was gained in signals.
    And in the city (largest town in state) a computer I'd set up for use in
    a password protected wi-fi network - later worked fine and found the
    new owner's own wi-fi network without issues; and I had let the OSX
    setup assistant do its job. If a local network is protected by WEP or
    WPA2, etc with a password, one would be needed to access it. If not,
    then the connection should be automatic.
    Good luck & happy computing!

  • Problem with data integration when using KCLJ

    Hello,
    For a project, I had to integrate a new field using transaction KCLJ.
    For this I extented the DDIC structure of the sender structure, and after that, I updated the corresponding transfer rules.
    When I execute transaction KCLJ I have no error, and table BUT000 is updated with the data of the flat file.
    The problem is that erase also 6 BUT000's fields; they're not in the sender structure and so, have no transfer rules.
    Could you help me ?

    Hi
    Please read this.
    External Data Transfer
    These activities are not relevant if you use a CRM/EBP system.
    In the following activities you make definitions for transfer of business partner data or business partner relationship data from an external system to a SAP System.
    Data transfer takes place in several stages:
    1. Relevant data is read from the external system and placed in a sequential file by the data selection program. The data structure of the file is defined in the sender structure.
    This procedure takes place outside of the SAP environment and is not supported by SAP programs. For this reason, data changes can be made at this point by the data selection program.
    2. The sequential file is stored on an application server or a presentation server.
    3. The SAP transfer program reads data from the file and places this in the sender structure. This does not change the data. This step is carried out internally by the system and does not affect the user.
    4. Following transfer rules that have to be defined, the transfer program takes the data from the sender structure and places it in the receiver structure. During this step you can change or convert data.
    The receiver structure is firmly defined in the SAP system. Assignment of the sender structure to the transfer program, and of the transfer program to the receiver structure is made using a defined transfer category.
    5. The data records in the receiver structure are processed one after the other and, if they do not contain any errors, they are saved in the database.
    Before you transfer external data for the first time, make the following determinations:
    The structure of the data in the external system may not match the structure expected by the SAP system. You may have to supplement data.
    There are two ways in which you can adapt the structure:
    You make the required conversions and enhancements within the data selection program prior to beginning the transfer to the SAP system. This will be the most practical solution in most cases since you have the most freedom at this point.
    You do the conversion using a specially developed transfer program and transfer rules.
    You then define the fields of the sender structure. The system offers you the option of automatically generating a sender structure that is compatible with the receiver structure.
    You define transfer rules to create rules according to which the fields of the sender structure are linked with those of the receiver structure.
    You now carry out the transfer.
    SAP Enhancements for External Data Transfer
    The following SAP enhancements are offered in the following areas of External Data Transfer:
    Four Customer Exits exist for the data transfer or for the conversion from IDOC segments. The Exits are contained in the enhancement KKCD0001. As soon as the Customer Exits are activated, they are carried out for all sender structures or segments. The first two Customer Exits require minimal coding once they are activated. The sender structure concept is used when loading data into the SAP-System. The concept Segment is used in the context of the distribution of the SAP-System. It is a matter of a record of data to be transferred or converted. It is recommendable to code a CASE -instruction within the Customer Exit, where (differentiated according to sender structure (REPID) or segment) various coding is accessed. In the parameter REPID, the name of the segment for the conversion from IDOC segments. The parameter GRPID is not filled out with the conversion from IDOC segments. You should have a WHEN OTHERS branch within the CASE instruction, in which the 'SENDER_SET' is allocated to the 'SENDER_SET_NEW' or the 'RECEIVER_SET' to the 'RECEIVER_SET_NEW'. Utherwise the return code will have its initial value. You can view a possible solution in Code sample.
    The first Customer Exit is accessed before the summarizing or conversion. It is called up as follows:
    CALL CUSTOMER-FUNCTION '001'      EXPORTING            GRPID          = GRPID       "Origin            REPID          = REPID       "Sender program           SENDER_SET     = SENDER_SET  "Sender record      IMPORTING           SENDER_SET_NEW = SENDER_SET  "modified sender record            SUBRC          = SUBRC.      "Returncode
    If the variable 'SUBRC' is initial, the modified record is edited further or else passed over. The import parameter 'SENDER_SET_NEW ' must be filled out in the Customer Exit, as only this field and not the field 'SENDER_SET is further edited. This also especially means that you must allocate the import parameter 'SENDER_SET_NEW' the value of 'SENDER_SET' for records, for which no special handling will be carried out otherwise.
    The second Customer Exit is accessed after the summarization and before the update:
    CALL CUSTOMER-FUNCTION '002'   EXPORTING     REPID            = REPID           "Senderprogramm     GRPID            = GRPID           "Herkunft     RECEIVER_SET     = RECEIVER_SET    "verdichteter Satz   IMPORTING     RECEIVER_SET_NEW = RECEIVER_SET    "modifizierter verdichteter Satz     SUBRC            = SUBRC.          "Returncode
    The modified record is only updated if the variable 'SUBRC'
    is initial.
    The import parameter 'RECEIVER_SET_NEW' must be filled out in the Customer Exit, since only this field and not the field 'RECEIVER_SET _NEW' is updated.
    The third Customer Exit is used for replacing variables. It is called up when you load the transfer rules.
      CALL CUSTOMER-FUNCTION '003'     EXPORTING       REPID = REPID       GRPID = GRPID       VARIA = VARIA       RFELD = RFELD       VARTP = VARTP     CHANGING       KEYID = KEYID     EXCEPTIONS       VARIABLE_ERROR = 1.
    The parameters REPID and GRPID are supplied with the sender structure and the origin. The variable name is in the field VARIA. The name of the receiver field is in the parameterRFELD. Field VARTP contains the variable type. Valid types are fixed values of the domain KCD_VARTYP. You transfer the variable values in the parameter KEYID. If an error occurs you use the exception VARIABLE_ERROR.
    the fourth Customer Exit is required in EC-EIS only. It is called up after the summarization and before the determination of key figures. It is a necessary enhancement to the second Customer Exit. This is because changes to the keys are considered before the database is checked to see if records exist for the keys.
    The function is called up as follows:
    CALL CUSTOMER-FUNCTION '004' CHANGING    RECEIVER_SET = R    SUBRC = UE_SUBRC.
    The parameter RECEIVER_SET contains the receiver record to be changed. The parameter RECEIVER_SET is a changing parameter. No changes must be made to the function module if it is not used.
    The User-Exits can be found in the Module pool 'SAPFKCIM'. If you want to use the Customer Exits, you can create a project and activate the Customer Exits with the transaction 'CMOD'. The enhancement which you must use with it is KKCD0001.
    Note that when programming customer exits, that these will also run if corrected data records are imported into the datapool within the context of post processing for both test and real runs.
    I will provide some pointers soon. Give me some time.
    Hope this will help.
    Please reward suitable points.
    Regards
    - Atul

  • Problem in updating material master using  FM 'MD_MRP_LEVEL_CHANGE_DATA'

    hi experts,
    i m using this FM 'MD_MRP_LEVEL_CHANGE_DATA' to update the material master for MRP Area related data. i m passing the fields in the FM according to the requirement. when i execute the program it gives a msg
    000I : 000, i m not able to track this msg that what can be the error..........
    and also the changes are not reflected in MM03 transaction.
    and if i m trying to pass the same data directly from SE37 and executing the FM , its running perfectly and changes are reflected in MM03.
    please help me out to get out of this problem.
    points will be rewarded for the correct answer.
    thanks in advance..........
    Manisha

    Manisha,
    Can you please provide the code where u r having problems?
    Thanks
    Ganesh.S

Maybe you are looking for

  • Trying to move EP 7.0 from one MSSQL server to a different one

    We have created a distributed instance installation of NW2004s/EP7.0. We need to move the database instance from one windows server to a second server.  We do not need to move any other portions. We shutdown the MSSQL server and copied the files, and

  • Delete button disappeared in iTunes 10

    Today I downloaded Copytoy, a program to move files from my iPod to my computer (since my iPod contained more songs for some reason and I wanted them all together in my Music Library). iTunes copied the copies of every song automatically to my iPod,

  • How to refer to other objects?

    Greetings, I'm not sure how objects should refer to other objects. Example: Class Automobile needs to refer to objects from other classes, namely to tires, color, motor and company. So, the way I would do this in C++ or VB is to store all tire, color

  • Question on partition

    Hi All - We're experiencing a situation where we don't get any value while retrieving data using transparent partition and attribute dimension. Let's say, I've source BSO app (SrcApp) and target BSO app (TgtApp) in system 11.1.1. TgtApp doesn't conta

  • I am using iphone3g and upper portion of the screen is not working.

    I am using iphone3g 16GB and upper portion of the screen is not working and somebody suggest to get a new phone, should i get a replacemet to the old one..? i purchased on 2008