Tryint to use modify

I am trying to use modify but my zzxmnga does not get updated but when i debug it has the correct value in it but doens't modify the record.  Here is the code
LOOP AT T_ZOXED10166 INTO W_ZOXED10166.
      wa_TABIX = SY-TABIX.
     READ TABLE T3_ZOXED10166 INTO W3_ZOXED10166 WITH KEY
                         RUECK = W_ZOXED10166-RUECK
                         GRUND = W_ZOXED10166-GRUND.
     IF SY-SUBRC = 0
     AND  W_ZOXED10166-GRUND+1(1) CP 'S'.
       W3_ZOXED10166-ZZXMNGA = W_ZOXED10166-XMNGA + W3_ZOXED10166-XMNGA.
       MODIFY T3_ZOXED10166  FROM W3_ZOXED10166 INDEX WA_TABIX.

Try:
  IF sy-subrc = 0 AND
     w_zoxed10166-grund+1(1) EQ 'S'.         "<=== CP changed to EQ
    w3_zoxed10166-zzxmnga = w_zoxed10166-xmnga + w3_zoxed10166-xmnga.
    MODIFY t3_zoxed10166 FROM w3_zoxed10166 INDEX wa_tabix.

Similar Messages

  • Problem in using modify statement inside a Perform

    Hi Experts,
    loop at t_data into wa_data.
    IF wa_data1-zbukrs IS INITIAL.
            wa_data1-zstat = 'E'.
            w_messg =  'Company code is blank in upload data'.
            CONCATENATE wa_data1-zbukrs w_messg INTO w_msg
              SEPARATED BY space.
              CONCATENATE w_msg  wa_data1-zmsg INTO w_msg
    SEPARATED BY
    '|'.
              wa_data1-zmsg = w_msg.
              MODIFY t_data1 FROM wa_data1.
    endif.
    IF wa_data1-zfwcd IS INITIAL.
             wa_data1-zstat = 'E'.
             w_messg =  'Forwarder code is blank in upload data'.
            CONCATENATE wa_data1-zfwcd w_messg INTO w_msg
              SEPARATED BY space.
              CONCATENATE w_msg  wa_data1-zmsg INTO w_msg
    SEPARATED BY
    '|'.
              wa_data1-zmsg = w_msg.
              MODIFY t_data1 FROM wa_data1.
    endif.
    IF wa_data1-zinvno IS INITIAL.
              wa_data1-zmsg = w_msg.
              MODIFY t_data1 FROM wa_data1.
       wa_data1-zstat = 'E'.
             w_messg =  'Invoice number is blank in upload data'.
            CONCATENATE wa_data1-zinvno w_messg INTO w_msg
              SEPARATED BY space.
              CONCATENATE w_msg  wa_data1-zmsg INTO w_msg
    SEPARATED BY
    '|'.
              wa_data1-zmsg = w_msg.
              MODIFY t_data1 FROM wa_data1.
    endif.
    endloop.
    My doubt is:
            wa_data1-zstat = 'E'.
            w_messg =  'Company code is blank in upload data'.
            CONCATENATE wa_data1-zbukrs w_messg INTO w_msg
              SEPARATED BY space.
              CONCATENATE w_msg  wa_data1-zmsg INTO w_msg
    SEPARATED BY
    '|'.
              wa_data1-zmsg = w_msg.
              MODIFY t_data1 FROM wa_data1.
    i want write the above code to be written in a perform statement
    becos iam using the above code in multiple places in my program.
    but the problem iam facing is modify not working in perform statement.
    Regards,
    Raj.

    hi Raj,
       use FIELD-SYMBOLS so that you don't have to use MODIFY statement.
    FIELD-SYMBOLS: <fs> like line of T_data.
    loop at t_data ASSIGNING <fs>.
    IF  <fs>-zbukrs IS INITIAL.
    <fs>-zstat = 'E'.
    w_messg = 'Company code is blank in upload data'.
    CONCATENATE <fs>-zbukrs w_messg INTO w_msg
    SEPARATED BY space.
    CONCATENATE w_msg <fs>-zmsg INTO w_msg
    SEPARATED BY   '|'.
    <fs>-zmsg = w_msg.
    endif.
    IF <fs>-zfwcd IS INITIAL.
    <fs>-zstat = 'E'.
    w_messg = 'Forwarder code is blank in upload data'.
    CONCATENATE <fs>-zfwcd w_messg INTO w_msg
    SEPARATED BY space.
    CONCATENATE w_msg <fs>-zmsg INTO w_msg
    SEPARATED BY '|'.
    <fs>-zmsg = w_msg.
    endif.
    endloop.

  • Database Updation and Insertion using Modify Statement

    Hi All,
    I am using Modify statment for data insertion and updation
    MODIFY zmpit_ven_bgg_rg FROM TABLE t_ven_bgg .
    But I am getting error
    The type of the database table and work area (or internal table) "T_VEN_BGG" are not compatible.
    I have defined my internal table of below type :
    TYPES : BEGIN OF ty_ven_bgg,
            mandt             TYPE mandt,
            lifnr                 TYPE lfa1-lifnr,
            bgg                 TYPE zmpit_ven_bgg_rg-matkl,
            ind                  TYPE zmpit_ven_bgg_rg-active_ind,
            created_by      TYPE zmpit_ven_bgg_rg-created_by,
            created_on      TYPE zmpit_ven_bgg_rg-created_on,
            last_changed_by TYPE zmpit_ven_bgg_rg-last_changed_by,
            last_changed_on TYPE zmpit_ven_bgg_rg-last_changed_on,
            remarks              TYPE zmpit_ven_bgg_rg-remarks,
            ind1(1)                TYPE c,
                 END OF ty_ven_bgg.
    Here, ind1 is not field  of the table.
    I have added a new field Remarks in the table and thus i included it in the Internal table also.
    Above Modify statement was working fine without Remarks field. I am not able to understand the error
    as work area is also of type ty_ven_bgg.
    Please suggest some solution.
    Regards,
    Nibha

    Hi,
    Though you have creaated one more internal tsble without the indc field, but you can do it using the same intrenal table by simply using
    1. MOVE-CORRESPONDING <internal table> to <ztable>.
    2.MODIFY <ztable>.
    will solve your problem
    Secondly declare the internal table using DATA after structure has been declared using TYPES.
    This is better approach to follow.
    Pooja

  • How to create database using modified INIT.ORA file

    anybody know anything about the creating a
    database using modified init.ora file?
    Thanks

    If you take a look at the "Getting Started" guides, there's a section on creating databases and init.ora files.
    Look for the document
    Oracle8i Enterprise Edition for Windows NT Getting Started
    Justin
    null

  • How to update specific fields of a db table using MODIFY

    Hi all.
    I understand that MODIFY allows us to insert a record into the database if the a record with the same key is not there. If a record is there, it would update that record.
    However, when the record is there, could i update SPECIFIC fields of the record, instead of updating ALL fields of the record?

    Yes, you can with exception that you can not modify primary key values.
    Here are the details about MODIFY db table command with examples
    MODIFY - Change a database table
    Variants:
    MODIFY dbtab. or   MODIFY *dbtab. or
      MODIFY (dbtabname) ... .
    MODIFY dbtab FROM TABLE itab. or   MODIFY (dbtabname) FROM TABLE itab.
    MODIFY dbtab VERSION vers. or   MODIFY *dbtab VERSION vers.
    Effect
    Inserts new lines or updates existing lines in a database table (s. relational database). If a line with the specified primary key already exists, an UPDATE is executed. Otherwise, an INSERT is performed. You can specify the name of the database table either in the program itself in the form MODIFY dbtab ... or at runtime as the contents of the field dbtabname in the form MODIFY (dbtabname) ... . In both cases, the database table must be defined in the ABAP Dictionary. If the program contains the name of the database table, it must also have a corresponding TABLES statement. Normally, records are inserted or updated only in the current client. Data can only be inserted or updated using a view, if the view refers to a single table and was created in the ABAP Dictionary with the maintenance status "No restriction".
    MODIFY belongs to the Open SQL command set.
    When the statement has been executed, the system field SY-DBCNT contains the number of edited lines.
    The Return code is set as follows:
    SY-SUBRC = 0:
        All lines were successfully inserted or updated.
    SY-SUBRC = 4:
        One or more lines could not be inserted or updated.
    Notes
       1. You cannot modify a line if there is already a line in the table with identical key field values in a UNIQUE index.
       2. Automatic definition of INSERT and UPDATE is expensive. You should therefore use MODIFY only if you cannot define the INSERT and UPDATE cases yourself in the program.
       3. Since the MODIFY statement does not perform authority checks, you have to program them yourself.
       4. Adding or changing lines with the MODIFY command is only completed after a database commit (see LUW) has been performed. Before the database commit has been performed, any database changes can be reversed with a database rollback (see Programming transactions).
       5. Synchronization of simultanous accesses by several users to the same set of data cannot be exclusively achieved with the lock mechanism of the database system. In several cases, you are recommended to use the SAP lock mechanism.
    Variant 1
    MODIFY dbtab. or
    MODIFY *dbtab. or
    MODIFY (dbtabname) ... .
    Extras:
    ... FROM wa
    ... CLIENT SPECIFIED
    See Cannot Use Short Forms and
    Cannot Use *Work Areas.
    Effect
    Inserts a new line or updates an existing line in a database table. If you specify the name of the database table yourself, the primary key for identifying the line to be inserted or updated and the relevant values are taken from the table work area dbtab or *dbtab (see TABLES). If you declare the name of the database table explicitly, the program must also contain a corresponding TABLES statement. If the name of the database table is not determined until runtime, you need to use the addition ... FROM wa.
    Example
    Insert or change data of the customer Robinson in the current client:
    TABLES SCUSTOM.
    SCUSTOM-ID        = '12400177'.
    SCUSTOM-NAME      = 'Robinson'.
    SCUSTOM-POSTCODE  = '69542'.
    SCUSTOM-CITY      = 'Heidelberg'.
    SCUSTOM-CUSTTYPE  = 'P'.
    SCUSTOM-DISCOUNT  = '003'.
    SCUSTOM-TELEPHONE = '06201/44889'.
    MODIFY SCUSTOM.
    Addition 1
    ... FROM wa
    Effect
    The values for the line to be inserted or updated are not taken from the table work area dbtab, but from the explicitly specified work area wa. When doing this, the data is read from left to right according to the structure of the table work area dbtab (see TABLES). Since the structure of wa is not taken into account, the work area wa must be at least as wide (see DATA) as the table work area dbtab and the alignment of the work area wa must correspond to the alignment of the table work area. Otherwise, a runtime error occurs.
    Note
    If a work area is not explicitly specified, the values for the line to be inserted or updated are also taken from the table work area dbtab if the statement is in a FORM or FUNCTION where the table work area is stored in a formal parameter or local variable of the same name.
    Addition 2
    ... CLIENT SPECIFIED
    Effect
    Switches off automatic client handling. This allows you to edit data across all clients even when dealing with client-specific tables. The client field is treated like a normal table field that can be programmed to accept values in the table work area dbtab or *dbtab where the line to be edited occurs.
    The addition CLIENT SPECIFIED must be specified immediately after the name of the database table.
    Variant 2
    MODIFY dbtab FROM TABLE itab.or
    MODIFY (dbtabname) FROM TABLE itab.
    Addition:
    ... CLIENT SPECIFIED
    Effect
    Mass modify: Inserts new lines or updates existing lines of a database table. The primary keys for identifying the lines to be inserted or updated and the relevant values are taken from the internal table itab. The lines of the internal table itab must satisfy the same conditions as the work area wa in addition 1 to variant 1.
    Note
    If the internal table itab is empty, SY-SUBRC and SY-DBCNT are set to 0.
    Addition
    ... CLIENT SPECIFIED
    Effect
    As for variant 1.
    Variant 3
    MODIFY dbtab VERSION vers. or
    MODIFY *dbtab VERSION vers.
    See Cannot Use the VERSION Addition.
    Note
    This variant is obsolete.
    Effect
    Inserts a new line or updates an existing line in a database table, the name of which is taken from the field vers at runtime. If no line exists with the specified primary key, an INSERT is executed. Otherwise, an UPDATE is performed. The database table must be defined in the ABAP/4 Dictionary and its name must conform to the naming conventions for R/2 ATAB tables. These stipulate that the name must begin with 'T' and may contain up to four further characters. The field vers must contain the table name without the leading 'T'. Only lines in the current client are inserted or updated. The line to be inserted is taken from the statically specified table work area dbtab or *dbtab.
    SY-SUBRC is set to 0 if the line is successfully inserted or updated. SY-SUBRC <> 0 is not possible since any other result causes a runtime error.
    Hope this helps.
    ashish

  • How to use  modify command?

    i want to modify table t_bseg which is used n BTE interface_00001050
    i want to modify only 1 specific line, how can i modify this line without using index because i get 0 when i use sy-tabix?
    ( i want to modify this line using the table keys ) .
    thanks

    Hi,
    MODIFY TABLE <itab> FROM <wa> [TRANSPORTING <f1> <f 2> ...].
    Check this link:
    http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3ac8358411d1829f0000e829fbfe/content.htm
    Regards
    Adil

  • End of file error using modified version Cont Pattern Input.

    Hi. I am using the Cont Pattern Input example, which is modified to write the Data Read to a file on the hard drive. A wire is connected from the Data Read to a "Write to I16 subVI" which is also modified to be a "Write to U8 subVI". It writes problem free to the file specified until the 2.1 GB when it displays a Error 4 "End of File Error". There is ample space on the hard drive. How do we get rid of this error as we would eventually need to write up to 60 GB of data?

    Unfortunately, the only thing to do is get a different operating system. I seem to recall that Windows has a fixed limit on file size of about 2G.
    Is there any way you can logically break the data you're collecting into smaller logical units? Alternately, you could structure your code to write to one file till it fills and automatically switch to a second, and a third and so on. As long as the routine that you write for working with these huge datasets keeps track of the various pieces of data it could all work as though it were all in one very very very large file.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • How to know no of records(in Internal Table) modified after using Modify statement

    Hi Experts ,
    I am using statement Modify internal table transporting XYZ FIELD.
    I just wanted to know how many Records/Count (assuming more then 1 ) get updated just after successful execution of this command.
    Is there any system field exist?
    if yes please let me know?
    Warm Regards,
    Santosh

    Hello Santosh,
    Try like below and it works for me.
    Count will have the number rows changed.
    DATA: itab_mara TYPE STANDARD TABLE OF mara,
          itab_mara1 TYPE STANDARD TABLE OF mara,
          str_mara TYPE mara,
          str_mara1 TYPE mara,
          diff LIKE IREF-IIND,
          count TYPE int2.
    SELECT * FROM mara INTO TABLE itab_mara UP TO 10 ROWS.
      itab_mara1[] = itab_mara[].
      str_mara-lvorm = 'X'.
    MODIFY itab_mara FROM str_mara TRANSPORTING lvorm WHERE VPSTA = 'KVB'.
    LOOP AT itab_mara INTO str_mara.
      READ TABLE itab_mara1 INTO str_mara1 WITH KEY matnr = str_mara-matnr.
    CALL FUNCTION 'COMPARE_STRUCTURE_DATA'
      EXPORTING
        i_ddic_name       = 'MARA'
        i_rec_old         = str_mara
        i_rec_new         = str_mara1
       I_CHECK_MODE      = 'Y'
    IMPORTING
       E_IS_DIFF         = diff.
    IF diff = 'X'.
      count = count + 1.
    ENDIF.
    ENDLOOP.
    WRITE:/ count.
    Regards,
    Thanga

  • How to make use Modifier automatically based on Condition

    Hello all,
    I need help in using Advance Pricing modifier to adjust the sub total value of the sales order.
    AM populating a value in sales order header DFF Attribute5 with value.Then i Compare the this value with Sub total value based on Pre book order event using plsql
    If there is difference then modifier needs to be applied automatically.
    Ex:
    Sales Order Sub total value :1000
    Value in Attribute5 = 1400
    Diff amount = 1400-1000 = 400.
    Now i need to make use of modifier to adjust the sub total value to 1400.
    This should be done automatically..is that feasible..
    if yes please advise.
    else please provide best approach for the solution.
    Please let me know if you need more clarity on requirement.
    Thanks,Sarath.

    Dear,
    The scheduling is based on your MRP parameters. If you select the basic dates scheduling while running MRP, the system will consider the material master in house production time. It will not consider the routing standard values. In lead time it consider the routing value means timing form routing and component are assign to the operation so it calculated the component reqt date. And do the scheduling of order.
    In OPU5 there is setting for scheduling Adjust dates to order start will work for you.
    Regards,
    R.Brahmankar

  • Capturing keystrokes; using modifier keys

    I want to create a shortcut using "Command-R" on the mac and
    "Control-R" on windows. I know how to capture a single keystroke
    (my code is attached), but how do I capture using the modifier
    keys?

    Hi Asu
    I don't think it's possible using vanilla AppleScript, but if you download and install the Jon's Commands scripting addition (free for non-commercial use) you'll be able to do this:
    on run
    if "Command" is in (keys pressed) then
    display dialog "Command key is down" buttons {"OK"} default button 1
    else
    display dialog "Command key is not pressed" buttons {"OK"} default button 1
    end if
    end run
    The script will also display the confirmation dialog if you run it in a script editor window using Command-R, but not if you run it by selecting "Run" from your script editor's menu menu.
    HTH
    H
    Save this as an application:

  • Adobe print engine failed to output your data due to an unknown problem using modified font

    I have a document I created in InDesign CS5.5 with no issues. One of the fonts had a some issues with how the letters looked, so I modified the font (True Type) with a font editor. The documet on screen looks fine and passes preflight with no issues, but when I try to print it to any printer or PDF (Adobe PDF or Winpdf wirter) I get the error: adobe print engine failed to output your data due to an unknown problem. I also tried to create a document in MS Word with the same modified font and had no issues printing. Can anyone check into the issue with InDesign with this font if I send it to you? I also did try to create a new document in InDesign with just some text using the modified font and it will not print that one either.

    ***Oops. Cross posted. Glad it is working.***
    If you desire to share the fonts I can look at them. Just send me a PM with a link.
    Did you change the internal naming/IDs when you created your varient? If not, try removing the version you began with. Paths all closed, etc?
    Ian's application works fine but I don't use the light version--isn't there some limitation with it?
    Mike

  • After using modify/contents some frames go out of stage dimension

    Hello,
    I have a question to all you animators out there.
    I work in after effects and sometimes do some simple illustrations/animations in flash - where I usually switch the bg colour to gray
    as not to see the stage rectangular as it's distracting to me. Then when I have my drawings and a few different frames done I go to
    modify/ choose bg colour to white and check contents to frame all the content inside the document - then I want to export it to swf
    so I can use it in after effects.
    At this point all seems fine, all the frames are in place, however I noticed that frequently when I reopen my flash documet after having done this some frames are outside
    the white stage box (usually later frames, the 1st is in place).
    How do you deal with this?

    Hi all,
    Sorry for the slow response - as I'm sure you can understand, running lots of exports takes a few days and so it's taken me a while to test your suggestions properly.
    The render completes using the media encoder without crashing (MPEG2 Blu-ray and H.264 Blue Ray both worked), however the picture quality has really blurred:
    Original:
    MPEG2 Blu-Ray
    I also ran it in H.264 Blur-ray and this also appeared blurry. Apologies for lack of a screenshot, I deleted the export to conserve disk space.
    This is very similar to the problems I had under File => Export => Movie, which went away after I tweeked the export settings to match as closely as possible the footage (however Premiere then crashed when I tried to export the entire movie rather than just a clip).
    Working settings under File => Export which crashed Premiere but prevented the blurriness:
    Export
    Video and audio
    Entire Sequence
    Filetype
    QuickTime
    Video Settings
    Compressor: H.264
    Frame size: 1280h 720v (1.000)
    Frame rate: 29.97 frames/second
    Pixel Aspect Ratio: Square Pixels (1.0)
    Fields: No Fields (Progressive Scan)
    Audio Settings
    Compressor: Uncompressed
    Sample rate: 48000 samples/second
    Channels: Stereo
    Sample type: 16-bit
    Settings under Adobe Media Encoder
    Any thoughts what I'm doing wrong? This is starting to get really frustrating and I'm genuinely wondering if Premiere is suitable for what I'm trying to do. I've another project a month late in getting started because I want to get Premiere to export this so I know I'm not going to run into the same problems again - but I really don't know what else to try? Any ideas?

  • Update a table using MODIFY

    Hi,
    We need your help.
    We want to update a table using the MODIFY command but it does not delete the previous entries instead it INSERTs a new entry.
    Scenario:
    1. Upon calling the Screen for Editing the entry, the previous entry must be deleted
    2. When SAVEd, the new entry must replace the previous entry.

    Make sure that in the definition or your table you have specified the key. Otherwise, the system may "think" that all the fields are part of the key, therefore all lines are different.
    This is a extract from SAP's documentation:
    "The line to be changed is determined by the fact that the content of the table key matches the content of the corresponding components in the wa work area. For tables with a key that is not unique, the first entry that is found is changed. "
    Regards.

  • Is There A Comprehensive List Of Actions Using Modifier Keys?

    I have been using Macs for nearly five years and thought I was reasonably proficient.
    A few minutes ago I was told that it is possible to MOVE a file from one HD to another (rather than COPY it) by holding down the Command key.
    I wonder how many more there are that I don't know!
    So are they listed somewhere? I have looked in all my books and the Help menus but can't find anything.
    Ian.

    Thanks Duane.
    I have just downloaded it and given it a test run.
    It's an interesting application but it seems rather limited. When used with Final Cut Express it only listed half a dozen keyboard shortcuts when there are actually scores if not hundreds.
    Ian.

  • CS 6 locks up when encoding using modified files from after effects

    I have not had any problems until I started trying to use a green screen, which has turned out to be a major pain. Ultra key did a good job, but I kept being told the after affects does a better job. My computer is a PC has 32 Gigs of ram a 4 gig video card, I7. I also just downloaded all the latest updates. I imported an AVCHD file after shooting a 30 min lesson on green screen. Had to do a lot of editing to get all put together so there were lots of cuts and I had alot nested sections so I can resize myself with the background to keep the perspective correct. After I had decent success with keying, though I wish it were better, I tried moving each indivdual video clip over to after effects to key in there. It looked like it might have been a little bit better than the using ultrakey. I tried serveral different turtioals, but finally found one that seemed to work pretty good. (BTW if you have a favorite turtorial that you like on keying, please share.)
    Anyways, after taking forever to get all these clip edited in after affects, I wanted to export my completed video so I could see how well it worked. I never got the the chance because no matter what I choose under MPG2 it would lock up around 8%. Even when I tried to get to encode a 2min section of the video, it still locks up. The only way to get out of the program is to force it closed. As I searched for answer to this problem, someone suggested holding he shift key down while you open CS6, but that did not help. BTW the same file exports fine as long as I do not send any of the footage to after effect
    I hop you guys can help because it would be nice to be able to try and use after affects as well so I can at least see if the final result of the keying is better or not.

    I failed to mention that I tried this on another computer as well with a completly different lesson. This time I brought the whole footage in to afteraffects and did the keying and then went back to CS6 and tried to render it, and it locked up my second computer the same way.

Maybe you are looking for

  • Encryption through SAP

    Dear Friends, I have developed one program which generate Text File on /interface folder on the root. Because of Security reason, I want to encrypt that text file through my program. Can anyone suggest me the best solution for this. Regards, Mukul

  • Webcam with my Macmini(2011)(OS X 10.7.3)

    Hi to all in my Mac family, i have just got a Macmini(2011) for myself and i am in love with it..i just have small question for all of you..may i know which webcam do you guys recommend that i can use with my Mac running on OS X 10.7.3..thanks to all

  • Quick search broken (happened shortly before Firefox 8) - is that a bug?

    Had been using Quick Search keywords forever but they suddenly stopped working (in one of the last FF 7 updates - I am now on FF 8). Now goes straight to Google with everything I've typed. This applies to both my own quick searches as well as the one

  • Regarding Doc, for a New Implementation

    Hello, Will you  pl, help me in getting complete documentation (Std / Template)for all stages of ASAP methodology, for a new module. If you provide at least URL, it will be of great help.

  • Why can't I get the average function work with empty cells?

    Why can't I get the average function work with empty cells?