Creating po in me21n with copy from other po

Can any one tell the procedure to create PO copying from other PO.
Edited by: Csaba Szommer on Jan 18, 2012 8:06 AM

Hi,
Option 1: Goto ME21N, In item Overview move to right side to 4th last column "Purchasing Doc." enter your PO number & press enter, PO will get copied if 1 item is there , otherwise if more than 1 item in PO then it will ask for which item Number you want to copy.
Option 2: Enter ME21N T.Code
Click u201CDocument Overview onu201D
Click u201CSelection Variantu201D and Select Purchase Orders and Enter your PO No. & execute
you will be able to view in document overview the PO No & Item No,
Select the PO you need to copy & Click u201CAdoptu201D and you will see all PO details related copy to new PO which you can save.
Option 3: Enter ME21N T.Code
Click u201CDocument Overview onu201D
Click u201CSelection Variantu201D and Select Purchase Orders and Enter your PO No. & execute
you will be able to view in document overview the PO No & Item No,
Now select 1st item and press Shift button(or you can also use Ctrl button on your keyboard for randomly selecting the line item) & with mouse select all line items and click 'Adopt' button (next to selection variant button).
All the 100 items will get copied in the New PO.
Refer below link for clarification,
[Copying old PO to New PO|Re: Copy the Purchase Order]

Similar Messages

  • How to create a new view by copying from standard view in IC webclient?

    Hello, expert,
    I need to enhance a sap standard component (BP_Factsheet), inside it I need to create a new view by copying from an existing standard view (Acitivities). However when I try to make a copy, I was asked for destination BSP application, I entered the Z-Application which I used when defining enhancement for the component. After the copy, I don't see the new view.
    Then I tried the destination BP_factsheet, instead of the z-application, then after the copy, I can see the new view. However since it's in SAP application, it seems like it's a MOD, not enhancemnet, and inside the new view, the classes (for context, context nodes, etc.) are not in custom namespace (not starting with Z).
    So please let me know how can I make a copy of sap standar view in custom namespace.
    Thanks in advance.
    Jayson

    When copying you can put any BSP name..normally the practice is to prefix the standard name with a Z.
    Secondly when you want to make changes to the individual classes and methods you need to right click and say enhance. Then the AZ class names etc would be generated. The view should appear in the component wherein you copied the original view from.
    I hope this helps.
    The cookbook should have details on this. Otherwise also its quite intuitive.
    Award points if it helps.
    Thanks.

  • Filling dynamic internal table with data from other internal table

    Hi Friends,
    My problem is that i have already built a dynamic internal table
    (class int_table->create) but now i want to fill it with data from other internal table.
    The dynamic table column name and the field value of the data filled internal table are same, but how to access that column name, since i cant hard code it anyway.
    Like if my werks field value is '8001'. I want to place it under the column 8001 of dynamic table, Can anybody help me in this regard?
    Awarding points is not a problem for even giving a slight hint.
    Best Regards

    Hi
    See this
    Dynamic internal table is internal table that we create on the fly with flexible column numbers.
    For sample code, please look at this code tutorial. Hopefully it can help you
    Check this link:
    http://www.****************/Tutorials/ABAP/DynamicInternaltable/DynamicInternalTable.htm
    Sample code:
    DATA: l_cnt(2) TYPE n,
    l_cnt1(3) TYPE n,
    l_nam(12),
    l_con(18) TYPE c,
    l_con1(18) TYPE c,
    lf_mat TYPE matnr.
    SORT it_bom_expl BY bom_comp bom_mat level.
    CLEAR: l_cnt1, <fs_dyn_wa>.
    Looping the component internal table
    LOOP AT it_bom_expl INTO gf_it_bom_expl.
    CLEAR: l_cnt1.
    AT NEW bom_comp.
    CLEAR: l_cnt, <fs_dyn_wa>, lf_mat.
    For every new bom component the material data is moved to
    temp material table which will be used for assigning the levels
    checking the count
    it_mat_temp[] = it_mat[].
    Component data is been assigned to the field symbol which is checked
    against the field of dynamic internal table and the value of the
    component number is been passed to the dynamic internal table field
    value.
    ASSIGN COMPONENT c_comp_list OF STRUCTURE <fs_dyn_wa> TO
    <fs_check>.
    <fs_check> = gf_it_bom_expl-bom_comp.
    ENDAT.
    AT NEW bom_mat.
    CLEAR l_con.
    ENDAT.
    lf_mat = gf_it_bom_expl-bom_mat.
    Looping the temp internal table and looping the dynamic internal table
    *by reading line by line into workarea, the materialxxn is been assigned
    to field symbol which will be checked and used.
    LOOP AT it_mat_temp.
    l_nam = c_mat.
    l_cnt1 = l_cnt1 + 1.
    CONCATENATE l_nam l_cnt1 INTO l_nam.
    LOOP AT <fs_dyn_table2> ASSIGNING <fs_dyn_wa2>.
    ASSIGN COMPONENT l_nam OF STRUCTURE <fs_dyn_wa2> TO <fs_xy>.
    ENDLOOP.
    IF <fs_xy> = lf_mat.
    CLEAR lf_mat.
    l_con1 = l_con.
    ENDIF.
    Checking whether the material exists for a component and if so it is
    been assigned to the field symbol which is checked against the field
    of dynamic internal table and the level of the component number
    against material is been passed to the dynamic internal table field
    value.
    IF <fs_xy> = gf_it_bom_expl-bom_mat.
    ASSIGN COMPONENT l_nam OF STRUCTURE <fs_dyn_wa> TO <fs_check>.
    CLEAR l_con.
    MOVE gf_it_bom_expl-level TO l_con.
    CONCATENATE c_val_l l_con INTO l_con.
    CONDENSE l_con NO-GAPS.
    IF l_con1 NE space.
    CONCATENATE l_con1 l_con INTO l_con SEPARATED BY c_comma.
    CLEAR l_con1.
    l_cnt = l_cnt - 1.
    ENDIF.
    <fs_check> = l_con.
    l_cnt = l_cnt + 1.
    ENDIF.
    ENDLOOP.
    AT END OF bom_comp.
    At end of every new bom component the count is moved to the field
    symbol which is checked against the field of dynamic internal table
    and the count is been passed to the dynamic internal table field
    value.
    ASSIGN COMPONENT c_count OF STRUCTURE <fs_dyn_wa> TO <fs_check>.
    <fs_check> = l_cnt.
    INSERT <fs_dyn_wa> INTO TABLE <fs_dyn_table>.
    ENDAT.
    ENDLOOP.
    Reward if useful
    Anji

  • I created an apple id with credentials from my credit card... after the details were entered, a transaction of rs 60 was shown on my credit card.. does apple charge to create and apple account

    I created an apple id with credentials from my credit card... after the details were entered, a transaction of rs 60 was shown on my credit card.. does apple charge to create and apple account

    schunfraulin wrote:
    ... does apple charge to create and apple account
    No.
    But it might be this  >  http://support.apple.com/kb/HT3702

  • When using panasonic remote2 app, videos shot on iPad appear upside down on the television.  This does not happen with videos from other sources. Any suggestions?

    When using panasonic remote2 app, videos shot on iPad appear upside down on the television.  This does not happen with videos from other sources. Any suggestions?

    Hi Steve
    worldweary wrote:
    Thanks again. I tried channel 13 and it seemed to work better, with less dropouts (albeit not perfect) but sadly my slightly ageing laptop wouldn't recognise the network at all with the Hub set to that channel, so I had to switch it back to 11!
    Will try the factory reset at some point to see if that improves things.
    I have the same issue with my iPad when streaming videos...like the issue posted on ‎25-04-2014 18h36 by Steve.
    Steve - Can you kinldy clarify how you resolved the problem finally.
    I was infact planning to change the iPad or sell it off due to this recurring problem.
    Thanks and regards
    Siva

  • Need to create service order in one system with SO from other sys

    Hi,
    i need to create a DTO program to copy service order from one system to other system. Both systems are SAP systems.
    My requirement is to create service order with same number as it was in the existing system.
    Service order type : SM03
    Now standard SAP automatically create a service order of type SM03 when i add repair qty within the repair tab of IRPA line within a RAS order.
    Can you please let me know if there is a way by which i can change the service order number while creating it from a RAS order??
    Thanks,
    Willban

    Hi!
    In the customizing, you have to set its numbering to
    external in the receiver system for the SM03 order type. And of course you have to set its range the same, as in the sender system. 
    It's working fine here.
    Regards
    Tamá

  • To populate dynamically created int table with data from other table

    Hi everybody,
    I have already created an internal table dynamically, but now want to populate it with data from another IT depending on the plant name.
    My dynamic int table contains fields with plant name like '8001' ,'8002' and so on.
    no I want to read data from the other table and depending on bwkey which contains similar data like plant name , want to append to this new dynamic int table through read key statement.
    I cannot reference the field name hard coded as it does not allow field symbol reference to be hard coded.
    Pls help.

    Hi,
    Check the code below:
    REPORT  ztestdyn.
    TYPE-POOLS : slis.
    TABLES: yyle0003.
    DATA:
      g_exit    TYPE c,
      g_save    VALUE 'A',               "For parameter I_SAVE
      g_repid   LIKE sy-repid,           "For program name
      g_variant TYPE disvariant.         "For parameter IS_VARIANT
    *Tables
      DATA: d_ref TYPE REF TO data,
            d_ref1 TYPE REF TO data,
            i_alv_cat1 TYPE TABLE OF lvc_s_fcat,
            ls_alv_cat1 LIKE LINE OF i_alv_cat1.
      DATA: BEGIN OF total_tab OCCURS 0 ,
            tknum TYPE yyle0003-tknum,
            quantity TYPE p,  "yyle0003-QUANTITY,
            END OF total_tab.
      DATA: BEGIN OF g_scandata_tab OCCURS 0.
              INCLUDE STRUCTURE yyle0003.
      DATA: END OF g_scandata_tab.
      DATA: g_yyle0003_tab LIKE yyle0003 OCCURS 0 WITH HEADER LINE.
      DATA: g_itab1 TYPE TABLE OF yyle0003.
      DATA: wa_itab1 LIKE g_scandata_tab.
      TYPES: BEGIN OF itab2,
             tknum TYPE yyle0003-tknum,
             vhilm TYPE yyle0003-vhilm,
             quantity TYPE p,
             END OF itab2.
      DATA: g_itab3 TYPE TABLE OF itab2.
      DATA: wa_itab3 TYPE itab2.
      DATA: g_itab5 TYPE TABLE OF itab2.
      DATA: wa_itab5 TYPE itab2.
      DATA: g_itab4 TYPE TABLE OF itab2.
      DATA: wa_itab4 TYPE itab2.
      DATA: gv_wa TYPE REF TO data.
      DATA : wa_tab TYPE itab2.
      DATA: BEGIN OF itab6 OCCURS 0,
             vhilm TYPE yyle0003-vhilm,
             quantity TYPE p,
             END OF itab6.
    ******************Start of Internal Table Definition *******************
      DATA:
            g_custom_container_0100 TYPE REF TO cl_gui_custom_container,
            g_alv_grid_0100    TYPE REF TO cl_gui_alv_grid,
            g_container_0100   TYPE scrfname VALUE 'LIST',
            g_mylayout         TYPE lvc_s_layo,
            ok_code            LIKE sy-ucomm.
      FIELD-SYMBOLS :<f_fs> TYPE table,
                     <f_fs11> TYPE table,
                     <f_fs1> TYPE table,
                     <f_fs3> TYPE ANY,
                     <f_fs4> TYPE ANY,
                     <f_field> TYPE ANY,
                     <f_fs5> TYPE ANY.
      FIELD-SYMBOLS: <fs_wa> TYPE ANY.
      DATA: l_var TYPE i,
            l_i   TYPE i.
      DATA: l_var1 TYPE char20,
            l_var2 TYPE char20.
    DATA: l_TOTAL TYPE I,
          L_FILL TYPE i,
          L_TOT  TYPE I.
    DATA: l_int TYPE i,
           l_sum TYPE i.
    FIELD-SYMBOLS: <f_fs2> TYPE  itab2, "
                     <f_fs6> TYPE ANY,
                     <f_fs7> TYPE ANY.
      DATA: l_var3 TYPE char15.
      DATA: l_quant TYPE p.
    FIELD-SYMBOLS: <f_fs8> LIKE itab6, "
                     <f_fs9> TYPE ANY,
                     <f_fs10> TYPE ANY.
    FIELD-SYMBOLS : <f_fs12> TYPE ANY,
                      <f_fs13> TYPE ANY.
      SORT g_scandata_tab BY tknum vhilm.
      LOOP AT g_scandata_tab INTO wa_itab1.
        MOVE-CORRESPONDING wa_itab1 TO wa_itab3.
        APPEND wa_itab3 TO g_itab3.
      ENDLOOP.
      LOOP AT g_itab3 INTO wa_itab3.
        COLLECT wa_itab3 INTO g_itab4.
      ENDLOOP.
      LOOP AT g_itab4 INTO wa_itab4.
        MOVE-CORRESPONDING wa_itab4 TO wa_itab5.
        MOVE-CORRESPONDING wa_itab4 TO itab6.
        APPEND wa_itab5 TO g_itab5.
        COLLECT itab6.
      ENDLOOP.
      CLEAR wa_itab3.
      SORT g_itab4 BY tknum vhilm.
      DELETE ADJACENT DUPLICATES FROM g_itab4 COMPARING vhilm.
      DESCRIBE TABLE g_itab4 LINES l_var.
      l_i = '2'.
      ls_alv_cat1-fieldname = 'TKNUM'.
      ls_alv_cat1-col_pos = 1.
      ls_alv_cat1-coltext ='ShipmentNo.'.
      APPEND ls_alv_cat1 TO i_alv_cat1.
      DATA: l_var4(10) TYPE c,
            l_var5(10) TYPE c,
            l_fieldname(20) TYPE c..
      LOOP AT g_itab4 INTO wa_itab4.
        IF l_var >= 1.
          CONDENSE wa_itab4-vhilm NO-GAPS.
          ls_alv_cat1-fieldname = wa_itab4-vhilm. "l_fieldname.
          ls_alv_cat1-col_pos = l_i.
          ls_alv_cat1-coltext = wa_itab4-vhilm.
          ls_alv_cat1-do_sum  ='X'.
          APPEND ls_alv_cat1 TO i_alv_cat1.
          CLEAR : ls_alv_cat1, l_fieldname.
          l_i = l_i + 1.
        ENDIF.
        AT LAST.
          ls_alv_cat1-fieldname = 'TOTAL'. "l_fieldname.
          ls_alv_cat1-col_pos = l_i.
          ls_alv_cat1-coltext = 'TOTAL'.
          ls_alv_cat1-do_sum  ='X'.
          APPEND ls_alv_cat1 TO i_alv_cat1.
          CLEAR : ls_alv_cat1, l_fieldname.
        ENDAT.
        SORT i_alv_cat1 BY fieldname.
        DELETE ADJACENT DUPLICATES FROM i_alv_cat1.
      ENDLOOP.
      SORT i_alv_cat1 BY col_pos.
      CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
          it_fieldcatalog = i_alv_cat1
        IMPORTING
          ep_table = d_ref.
      ASSIGN d_ref->* TO <f_fs>.
      CREATE DATA gv_wa LIKE LINE OF <f_fs>.
      ASSIGN gv_wa->* TO <fs_wa>.
      DELETE ADJACENT DUPLICATES FROM <f_fs> COMPARING ALL FIELDS.
        LOOP AT itab6.
        CLEAR wa_itab5.
        wa_itab5-tknum = 'Total'.
        MOVE-CORRESPONDING itab6 TO wa_itab5.
        APPEND wa_itab5 TO g_itab5.
        CLEAR wa_itab5.
      ENDLOOP.
         DESCRIBE TABLE g_itab5 LINES L_TOT.
           LOOP AT TOTAL_TAB.
          L_TOTAL = L_TOTAL + total_tab-quantity.
         ENDLOOP.
      LOOP AT g_final ASSIGNING <f_fs2>.
        ASSIGN COMPONENT 'TKNUM' OF STRUCTURE <f_fs2> TO <f_fs6>.
        ASSIGN COMPONENT 'TKNUM' OF STRUCTURE <fs_wa> TO <f_fs7>.
        <f_fs7> = <f_fs6>.
        CONDENSE <f_fs2>-vhilm NO-GAPS.
        ASSIGN COMPONENT 'VHILM' OF STRUCTURE <f_fs2> TO <f_fs3>.
        ASSIGN COMPONENT 3 OF STRUCTURE <f_fs2> TO <f_fs4>.
        MOVE <f_fs3> TO l_var1.
        ASSIGN COMPONENT l_var1 OF STRUCTURE <fs_wa> TO <f_fs5>.
        <f_fs5> =  <f_fs4>.
        CLEAR total_tab-quantity.
        READ TABLE total_tab WITH KEY tknum = <f_fs6>.
        IF sy-subrc = 0.
          ASSIGN total_tab-quantity TO <f_fs12>.
          ASSIGN COMPONENT 'TOTAL' OF STRUCTURE <fs_wa> TO <f_fs13>.
          <f_fs13> = <f_fs12>.
        ENDIF.
        L_FILL = L_FILL + 1.
        IF L_FILL = L_TOT.
         ASSIGN L_TOTAL TO <f_fs12>.
          ASSIGN COMPONENT 'TOTAL' OF STRUCTURE <fs_wa> TO <f_fs13>.
          <f_fs13> = <f_fs12>.
        ENDIF.
        AT END OF <f_fs2>-tknum.
          APPEND <fs_wa> TO <f_fs>.
          CLEAR  <fs_wa>.
        ENDAT.
      ENDLOOP.
      CLEAR: <f_fs6>,
              <f_fs7>.
      CLEAR <fs_wa>.
    CALL SCREEN 0100.
    *&      Module  STATUS_0100  OUTPUT
          text
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'ZVKS'.
      SET TITLEBAR 'ZVKS'.
      CHECK sy-ucomm IS INITIAL.
      SORT g_scandata_tab BY tknum vhilm.
      CREATE OBJECT g_custom_container_0100
             EXPORTING container_name = g_container_0100
             EXCEPTIONS
               cntl_error = 1
               cntl_system_error = 2
               create_error = 3
               lifetime_error = 4
               lifetime_dynpro_dynpro_link = 5.
      CREATE OBJECT g_alv_grid_0100
             EXPORTING i_parent = g_custom_container_0100.
      g_mylayout-grid_title = 'Display Scanning data'.
      CALL METHOD g_alv_grid_0100->set_table_for_first_display
        CHANGING
          it_outtab                     = <f_fs>
          it_fieldcatalog               = i_alv_cat1
                    EXCEPTIONS
                      invalid_parameter_combination = 1
                      program_error                 = 2
                      too_many_lines                = 3
                      OTHERS                        = 4.
      IF sy-subrc <> 0.
                  MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    Regards
    Kannaiah

  • Create package with prompt from other application

    Hi Experts!
    I need to create a package in the planning application. In the screen selection I need some dimensions of my planning cube and one dimension of the Ownership application. I don't have any problem with the current application dimension, but I need to retrieve the members of INTCO dimension from Ownership because the user should make the selection. Is it possible to create a prompt from other application?
    Thanks!!

    I create the package in Planning application: 
    PROMPT
    (SELECTINPUT,,,"Selction members","%ENTITY_DIM%,%CATEGORY_DIM%,%TIME_DIM%,%CURRENCY_DIM%,INTCO")
    When i try to select one member of INTCO dimension it appear the following message: "Dimension INTCO is not found". BPC is not finding this dimension because it pertain to another application.

  • Creating an employee by copying from other employee

    Hi Guys,
                   I need to create an employee by copying the other employee data for testing purpose.
    Can it been done ?
    Cheers

    Hi,
    When hiring the new employee via PA40, you can fill the "reference personnel number" field.
    By this way, some of the infotypes are copied to the new employee.
    However, there is no option of copying an employee entirely to a new employee number.
    Regards,
    Dilek

  • Images chopped off when creating a mobi file with kindlegen from inDesign epub

    I'm having difficulty with a reflowable ebook project which includes line drawing illustrations. They are mainly looking good all sized at 600px wide (all greyscale gifs under 127k) and exporting with object export options set to CSS: relative to text flow. Where they fall in the middle of text on a page they look great, most are landscape format, wider than they are tall. However once they are exported if they fall near the bottom of the page they just disappear off the page, in some cases you just catch a tiny glimpse of the top and the rest has gone, it does not appear on the following page. I've tried a variety of export combinations include page breaks before, after and before and after and it's just not making a difference.
    I'm using Indesign CC (2014) on a mac and then opening with Kindle previewer and letting kindlegen convert to a .mobi. If I open the epub with digital editions the same thing is occurring. It is an mobi file I need at the end of the process. It seems to happen whatever device I use to emulate the preview on The Kindle previewer and illustrations may appear whole in one view then disappear on another, depending on how it's reflowing. I've also sent it to my kindle and it's definitely chopping the images off on that.
    Is there anyway I can ensure the whole image is displayed, I thought adding a page break before would do it but this doesn't seem to be working I'd even live with the nasty gaps that would give me. I've applied paragraph styles, object styles and looked at the export options, wondering if I've got in a mess here somehow - what takes priority?
    I'd like to do this in inDesign, I have looked at the code in sigil and can only tell that the images are consistently coded, not sure how they should read.
    Any help with this would be great as I'm going round and round now!

    Hi Monica
    Thanks for your reply it made me focus on the export options and stop messing with styles. I decided it was time to start again, so I created a new document with the intent set to digital publishing (I've not bothered with this previously and it's not seemed to matter) and copied across the contents of the book I only had to recreate a TOC everything else styles wise copied across fine and I re-imported the meta-data then tried epub export again, in Object settings I selected use original image and selected relative to text flow, and it's working! I wonder if something has changed in InDesign CC 2014 because I never used a digital publishing intent document before as I thought the page setup had no bearing on the epub export..? (This was exactly the same export settings I had tried with my original document which was derived from a print version) Anyway I have a solution, I'm not needing to use the page breaks as the images are being put as I wanted in the text flow if they fit, on the next page if not, which is fine. Now if I could just sort the space before in paragraph styles when it's the first item in a text box, so that a dedication could sit in the middle of the page... but I guess that's another question!

  • Hyper-V 2012 R2 creating a new vhdx and copying from a source vhdx will physical file size reduce?

    Hi,
    I'm running Hyper-V 2012 R2 as part of Server 2012 Essentials.
    As seems common from other threads I've read I have created an expanding VHDX with a maximum size too large (almost the same size as the physical disc it lives on). Although there is only around 350GB of data in the VHDX, the actual file size is approaching
    900GB on the host.
    I'm using the "Add New Virtual Disk" wizard to make a new VHDX to replace this massive file. I want the contents of the old VHDX to be copied to the new one so in the add disk wizard I selected the option to copy the contents of my new disk from
    the original.
    So my question is: the source VHDX is 900GB, the data inside the is around 350GB. What size is my new VHDX likely to be? Is it likely to reduce to nearer the actual data size?
    I'm asking because I'm currently running this operation to an external USB drive and it's painfully slow - going to take hours to complete. If the size isn't going to reduce I may as well cancel it and look for a better option.
    Any comments appreciated.
    David

    I am assuming that you are using dynamic virtual disks for your VHDX (they can be dynamic or fixed).
    And, it is usually some type of transaction, backup agent, of the like that causes this type of behavior.  Some action that requires a cache on disk that is later deleted.
    There is a shrink action that can be done, but that will not optimize fully.
    The way to fully optimize is to mount the old virtual disk and create a new virtual disk and mount it, and then copy the contents from one to the other.  This lays the files out in a nice orderly way, without anything being written to the end of the
    virtual disk causing it to expand strangely.
    Over time, if you are still using the backup agent (for example) that got you into this situation, you will be there again.
    Brian Ehlert
    http://ITProctology.blogspot.com
    Learn. Apply. Repeat.

  • HT5181 iPhoto for iOS: Photos in iphoto's Camera Roll folder are not updated automatically with edits from other programs

    How can I solve the problem în the subject?

    How can I solve the problem în the subject?
    What exactly are you trying to do?
    Have you been editing photos in iPhoto and want to add them to your camera rool or photo stream?
    Then do exactly as the article describes, that you lonked to:
    iPhoto for iOS: Photos in Camera Roll are not updated automatically with edits from iPhoto
    Use iPhoto's Sharing to save a copy of the edited photo to the Caera Roll, or explain on mor e detail, what you want to do.
    Regards
    Léonie

  • Update Rows with info from other Rows in Same Table.

    I'm trying to update rows with information from the same table. The table gets loaded with info from a report that runs and it has to be a new entry every month but I would like to carry over some of the info from last month. This statement below runs but updates all rows in the new table load and in my test cases I only made a few match so only like 5 records should get updated. This is an example of what I'm trying to do. If I add this(C2.COL_INVC_ID = C1.COL_INVC_ID) to the last "*Where*" statement I get an invalid identifier for "C2.COL_INVC_ID". So what am I doing wrong here??? How can I update only the rows that where also in last months run???
    Thanks in advance for any help!
    Update OpenIssues OI1
    Set(OI1.Num, OI1.Status, OI1.Code, OI1.LastModifiedDate) =
    (Select OI2.Num, OI2.Status, OI2.Code, OI2.LastModifiedDate
    From OpenIssues OI2
    Where OI2.num = OI1.num and OI2.TableLoadDate = TO_DATE('01/31/2012 00:00:00', 'MM/DD/YYYY HH24:MI:SS')
    Where and OI1.TableLoadDate = TO_DATE('02/29/2012 00:00:00', 'MM/DD/YYYY HH24:MI:SS')
    SQLMe

    Hi,
    Welcome to the forum!
    SQLMe wrote:
    I'm trying to update rows with information from the same table. The table gets loaded with info from a report that runs and it has to be a new entry every month but I would like to carry over some of the info from last month. This statement below runs but updates all rows in the new table load and in my test cases I only made a few match so only like 5 records should get updated. This is an example of what I'm trying to do. If I add this(C2.COL_INVC_ID = C1.COL_INVC_ID) to the last "*Where*" statement I get an invalid identifier for "C2.COL_INVC_ID". If the aliases c1 and c2 aren't defined anywhere, then you can't use them anywhere.
    The WHERE clause of the UPDATE statement can only reference the table being updated, ot1 in this case.
    So what am I doing wrong here??? How can I update only the rows that where also in last months run???
    Thanks in advance for any help!
    Update OpenIssues OI1
    Set(OI1.Num, OI1.Status, OI1.Code, OI1.LastModifiedDate) =
    (Select OI2.Num, OI2.Status, OI2.Code, OI2.LastModifiedDate
    From OpenIssues OI2
    Where OI2.num = OI1.num and OI2.TableLoadDate = TO_DATE('01/31/2012 00:00:00', 'MM/DD/YYYY HH24:MI:SS')
    Where and OI1.TableLoadDate = TO_DATE('02/29/2012 00:00:00', 'MM/DD/YYYY HH24:MI:SS')
    ------------There's a syntax error in the last line. Either something got lost when you posted the code, or you just don't want the keyword AND. You certainly don't want AND immediately after WHERE.
    In general, if it's not obvious how to do an UPDATE, then UPDATE is the wrong tool: you want MERGE instead.
    Whenever you have a problem, please post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) from all tables involved.
    Also post the results you want from that data, and an explanation of how you get those results from that data, with specific examples.
    Simplify the problem as much as possible. Remove all tables and columns that play no role in this problem.
    If you're asking about a DML statement, such as UPDATE, the CREATE TABLE and INSERT statements should re-create the tables as they are before the DML, and the results will be the contents of the changed table(s) when everything is finished.
    Always say which version of Oracle you're using.
    See the forum FAQ {message:id=9360002}

  • Domain local groups with members from other (same forest) domains?

    I'm confused about granting access to a share via a domain local group that contains members from other domains. Consider this scenario:
    Joe Smith logs into his own domain (DALLAS.CORP.COM) and his token gets the DALLAS\sales global group.
    A share (named sales) in a different domain within the same forest (FORTSMITH.CORP.COM) assigns ntfs modify on its DACL via the FORTSMITH\sales_modify domain local group, which contains the DALLAS\sales global group.
    Joe goes to access the sales share...what happens, exactly?
    Since Joe logged into a DC in the DALLAS domain (outside the replication scope of the sales_modify group), his token does not contain sales_modify, right? So when he goes to access the sales share, that file server in FORTSMITH checks his token, doesn't
    see FORTSMITH\sales_modify in his token, and boom: access denied...right?

    Universal group is ok within the same forest but different domain.
    Domain local is ok between separate forest (Trust should be in place).
    Global is ok for same domain.
    See this for more details.
    http://msmvps.com/blogs/acefekay/archive/2012/01/06/using-group-nesting-strategy-ad-best-practices-for-group-strategy.aspx 
    Written by Ace Fecay-DS MVP.
    Regards~Biswajit
    Disclaimer: This posting is provided & with no warranties or guarantees and confers no rights.
    MCP 2003,MCSA 2003, MCSA:M 2003, CCNA, MCTS, Enterprise Admin
    MY BLOG
    Domain Controllers inventory-Quest Powershell
    Generate Report for Bulk Servers-LastBootUpTime,SerialNumber,InstallDate
    Generate a Report for installed Hotfix for Bulk Servers

  • Page with Information from other page

    I need to do a page where it shows information from other page.
    By example,I want that my page must a banner with the bursatil information.
    How can I do that?
    Thank by any idea.
    null

    So is anyone actually here to help with problems? What's the use of just seeing how many other people experience the same issue? Hello? I'm still having this problem with Firefox...

Maybe you are looking for

  • De-link PPM Item with SAP Project

    Hello, Can somebdoy throw a light on what to do in case I want to de-link a PPM-item with SAP project.This situation may rise if I want to change the project actuals going to bucket A to bucket B.As I can not change the relationship of an item with t

  • I forgot the password of my mac mini, how can I reset it

    I am new with an apple machine, I configured my computer from the begining with a password and I can't remember it. How can I restore it without loosing everthing. Thanks

  • Photo workflow in Preview- Looking for alternative app

    Hey all, I am struggling to view and delete unwanted photos quickly. I do a lot of wildlife photography and recently switched to Mac from Windows. I prefer to take lots of images and then go through, using the arrow pad to click through the, and dele

  • How to delete a waiting download

    I could not download the Star Trek extras on the ATV. It kept giving me an error. It did download on my PC, in Itunes, and synced to the ATV. Now I have this waiting download that I want to get rid of, but can't seem to figure out how to delete it. A

  • No archive information found for object type  and document type

    Hi All, When i try to view the print preview for a perticular doc type, system is giving the error as "No archive information found for object type  and document type" Diagnosis     No information was found about optical archiving. This may be due to