Forall change the values of columns in his order

Hi all,
I have a problem by using the forall-clause.
In the example you can see, that I declare a collection type which is based on a table structure with rowtype.
A select-statement fill my collection-type correctly.
After executing a insert with the forall-clause, a follwing select-statement shows me, that the values of my data are not in the correct column. The values of 3 columns are changed in there order.
But I know that the data correctly stored in the collection-type
How it can be? Actually, I can’t believe that.
Who can help me?
Example
declare
type foo_type is table of my_tab%rowtype;
foo foo_type;
begin
execute immediate 'select * from any_table'
bulk collect into foo;
forall i in foo.first..foo.last
insert into my_tab
values foo(i);
end;
Thanks in advanced for any help.
Michael

Hi,
the tables are only fictitious.
any_table can have
any_col1 number,
any_col2 varchar2(10)
any_col3 number
my_tab can have
my_col1 number,
my_col2 varchar2(10)
my_col3 number
In the program-code the structure of the collection-type is the same of the table in that I want to write the data.
Thanks
Michael

Similar Messages

  • Change the Value of column of the internal table at run time

    Hello Experts,
    With the below code i am able to determine the value hold
    by internal table at run time for a sepcific column but i am not getting the way
    of how to update the internal if one of the value is changed,
      lr_desc_table ?= cl_abap_typedescr=>describe_by_data( itab  ).
      lr_desc_struc ?= lr_desc_table->get_table_line_type( ).
    loop at itab assigning <fs_data>.
        loop at lr_desc_struc->components ASSIGNING <fs_comp_wa>.
          assign component  <fs_comp_wa>-name of structure <fs_data> to <fs_field>.
          lv_excel_row = <fs_field>.
         CALL FUNCTION 'SCP_REPLACE_STRANGE_CHARS'
            EXPORTING
              INTEXT  = lv_excel_row
            IMPORTING
              OUTTEXT = lv_excel_row.
          assign lv_excel_row to <fs_field>. "this is not changing the value actually hold in internal table
        endloop.
      endloop.

    Hi,
    Resolved this issue with the code mentioned below.
    Code:
    loop at lt_export_items assigning <fs_data>.
      ls_data = <fs_data>.
        loop at lr_desc_struc->components ASSIGNING <fs_comp_wa>.
          assign component  <fs_comp_wa>-name of structure <fs_data> to <fs_field>.
          lv_excel_row = <fs_field>.
          CALL FUNCTION 'SCP_REPLACE_STRANGE_CHARS'
            EXPORTING
              INTEXT  = lv_excel_row
            IMPORTING
              OUTTEXT = lv_excel_row.
              concatenate 'ls_data-' <fs_comp_wa>-name into  lv_var.
              assign (lv_var) to <fs_var>.
              <fs_var> = lv_excel_row.
        endloop.
        modify lt_export_items from ls_data .
        clear:ls_data.
      endloop.
    Take care,
    Sanju

  • Change the value of column from select and insert different

    Hi All,
    I have written a procedure where i am selecting values from some table and inserting in a new table. The code is below
    If you see the line 54 in code, you will find the combined_bu_code is is coming from one procedure and the value of BU is stored in prod.SEM_BACKLOG_LOG table. I have to check, if the combined_bu_code is coming as PWR then insert as POWER in BACKLOG_OTD_NEW table not as PWR.
    Looking for a help on this. Thanks in advance
    Regards
    Edited by: User_Apex on Jun 23, 2011 3:03 AM
    Edited by: User_Apex on Jun 23, 2011 3:53 AM

    Hi Martin,
    sorry i wrote wrong at that time
    If you see my code you will find alias of prod.SEM_BACKLOG_LOG is 'a' not 'b' and BU is coming from 'a'
    I just want a if startement to be written in this column "SMTC_OTD_CHART.get_combined_bu_code (a.BU)COMBINED_BU_CODE" that if the a.BU is PWR insert as POWER in the BACKLOG_OTD_NEW table
    Regards
    Edited by: User_Apex on Jun 23, 2011 3:02 AM

  • Change the value of order Person Responsible in bapi_alm_order_maintain

    Hi Expert,
    I want to change the value of person responsible in order Tab.  and also i want change Person Responsible for multiple order .
    How can i change ....  please  write code.

    Hi,
    You can use the remodelling here with the option " Replace Characteristics" with Customer exit. It will allow you to write an exit and change the value. Find more here:
    http://www.scribd.com/doc/7882193/Remodeling-in-BI-70-Using-Customer-Exit
    Thanks...
    Shambhu

  • Changing the descriptions of column

    Hi All,
    Is it possible to change the descriptions of columns in sales order?????
    Please suggest.
    Thanks & regards,
    Rupam.

    Hi,
    Yes, you can.
    Ask you ABAP guy to do it.
    You'll need a Access Key and Object Key form SAP to do the change.
    Best regards,
    Anupa

  • How to change the values of Map Region Column "REGION_NAME"

    Hi guys,
    To correspond with the values in my "CITY" column, I have to change the values of Region_name column in the map..
    region_name column contains the name of the territories in English
    but City column in my table contains the names of the territories in Arabic.
    To enable the link of the map, the values of both column ( CITY in my table, REGION_NAME in the map region ) should be identical.
    How can I change the values of REGION_NAME COLUMN ???
    This is the first time for me I deal with maps, and I hope my question is clear..
    Regards,
    Fateh

    Solved by using the following code
    var particulars = this.parent.COURSENAME.resolveNode("#items"); 
    this will bring the dropdown list into the variable particulars
    then
    for (var i = 1; i < particulars.nodes.length; i++)
    p = particulars.nodes.item(i);
    here p.value will have the dropdown line by line;
    add your valdiations etc

  • Dump when changing the value for a field (of 13 decimals) in alv grid.

    Hi Group,
    Its giving a dump when user is trying to change the value.
    dump description: Unable to interpret "70,000 " as a number.
    what is happening here is, the original value is 50,000 and he is deleting 5 and replacing it with 7, here its throwing the dump.
    If he removes the complete number 50,000 and then gives 70000 its  taking the value.
    I tried to use, the decimals options in alv field catalog but to no joy.
    Please can you give me an advice on this.
    Many Thanks.

    the problem is the comma in the 70,000....that's an alpha character.... Normally, we expect SAP to display numeric fields in a appropriate format, based upon their numeric type, but trying to forcibly insert '70,000' into a true numeric-type field can generate an 'unable to interpret xxx,xxxx  as number' error.
    You could experiment with changing your ALV column to a char17 (or appropriate width) and putting your numeric value into that to display, then converting back to type P, or other field type in the table, in a column that is not displayed, when the user changes the value....  essentially two columns, one not displayed with a routine to copy/convert the numeric field into the alpha field and the reverse when the field is changed.
    But, the better solution is probably for the user to understand that they're seeing a formatted numeric field, and that they need to replace the entire value with the only possible punctuation being a decimal and (if necessary) a negative sign.

  • How to change the "name of column" property of an text item in runtime?

    How to change the "name of column" property of an text item in runtime?
    I look the properties of items in help and found nothing about this!
    It's possible?

    Hi,
    an other solution is change the block property QUERY_DATA_SOURCE_TYPE from "Table" to "Sub-query" , than change at run time the property QUERY_DATA_SOURCE_NAME.
    First create block and add items
    The QUERY_DATA_SOURCE_NAME will be for ex. "Select 'A' as col1, 'B' AS col2, 'C' as col3 from dual"
    Set into items the column name property to col1 , col2 ...
    At run time change the query to "Select 'Z' as col1, 'X' as col2 , 'Y' as col3 from dual"
    in this way you can change the source of column value.
    Caution because if you change value type from varchar2 to date you must cast date into varchar2.
    May be that this way is valid only for view data not for insert-update, i don't remember.
    bye
    Message was edited by:
    Killernero

  • How do I change the width of column "rating"

    all columns are variable in widht. but not "rating" (stars). How do I change the width of column "rating"?

    Hi Emkaha,
    By the way the column "last played" can be reduced to a size which display the date "incorrect" as well (you'll see only the first number of the date which wouldn't make any sense too, but it is possible).
    True, but if you see date of "1" you will know you are not seeing a full date.  If you see 2 stars, it is a valid value, even if it is not correct.  At least, that is my supposition about why it is designed the way it is.
    Having said that, the extra width in the German version -- the Wertung column is wider than needed for 5 stars -- does seem odd.  In the English version for Windows PC, the Rating width is just enough for 5 stars.  You can report this to Apple via the iTunes Feedback page.

  • Issue using JS to change the value of an output text component dynamically

    I am developing an application and I need to change the output text component value at run time when the mouse moves over a field. I am using javascript and then using UIComponent.setproperty to change the value.
    I am not able to do this and am getting nothing.
    Kindly let me know what am I doing wrong
    I am using ADF 11g (10th November release).
    Regards,
    Deepak

    Hi i'm doing the same thing with an input text
    here is my code
    jspx:
    <af:inputText value="#{bindings.MiddleName.inputValue}"
    label="#{bindings.MiddleName.hints.label}"
    required="#{bindings.MiddleName.hints.mandatory}"
    columns="#{bindings.MiddleName.hints.displayWidth}"
    maximumLength="#{bindings.MiddleName.hints.precision}"
    shortDesc="#{bindings.MiddleName.hints.tooltip}"
    id="it4" autoSubmit="true">
    <f:validator binding="#{bindings.MiddleName.validator}"/>
    <af:clientListener type="valueChange" method="mo_UpperCase"/>
    </af:inputText>
    js:
    function mo_UpperCase(event){
    var inputField = event.getSource();
    if (event.getNewValue().toUpperCase()!=event.getNewValue())
    inputField.setValue(event.getNewValue().toUpperCase());
    In my case i change the input text to upercase when the value is changing
    I hope it works with output text also,
    change my examples clientlistener type from valueChange to mouseOver
    If you have more than one component and you need to pass parameters check this thread also:
    bug at af:clientAttribute 11.1.1.2.0
    Tilemahos

  • How to change the value

    Respected,
              I want to change the value of a order which is predefined,how it is done reply with the procedure .

    HI
    my question is very simple if you make an order{va01} for material A it picks the value x in amount column. From where did this value comes from ,where it is stored,what is the transaction code.
    IF my assumption is correct like your asking about the value / Amount of that particular condition Type
    suppose Material is X and maintained the Condition Record (VK11) with your combination
    at the time of Sale Order if you enter the Material with Qty system will take automatically what you maintained in Condition Record
    rate as a amount whether is Price / Discount & Surcharge/ VAT
    if you want to change that value try to check the Corresponding Condition type (T-Code :V/06) select that Condition type and TICK the Amount /Percentage Field 
    At the time of SO system will pick the Pricing Procedure based on the Sales Area + Doc.pricing procedure for Sales Doc.Type + Customer pricing procedure
    if you want to know the table and field name put the Cursor on amount col mum and press F1 or otherwise check in the VBAK, VBAP
    if i am wrong clarify
    Regards,
    Prasanna
    Edited by: prasanna_sap on Sep 13, 2011 1:00 PM

  • How to change the value of a two dimensional vector

    hi,
    I have a two dimensional array, Vector<Vector> myData, which contains strings. It's size is 5 rows and 6 columns
    I would like to change the value of, say, row 3, colum 5 from whatever it contains now to "new data"? I have searched and searched, but no luck
    thanks

    micheleg wrote:
    hi,
    I have a two dimensional array, Vector<Vector> myData, which contains strings. It's size is 5 rows and 6 columns
    I would like to change the value of, say, row 3, colum 5 from whatever it contains now to "new data"? I have searched and searched, but no luck
    thanksFirst off, you do not have an array of any dimension.You have a Vector that contains Vectors that contain Objects (you should provide a more specific type in your declaration).
    To change the element at position x in the y'th Vector, get the y'th Vector and change the x'th element in said Vector.
    As a side note, you should be using ArrayList instead of Vector these days.

  • CWB-Need to change the eligible salary column from yearly to monthly

    Hi All,
    I need to change the eligible salary column from yearly to monthly at Employee Allocation from Compensation Workbench.
    Kindly help me guys
    Regards,
    Sajid

    You can change the activity reference period in the Plan Form - > Not In Program tab from annually to monthly. However, it will impact all the calcuations as it will use monthly values for everything. Please be careful of this. I would suggest testing this (along with posting back the increases to ensure they are annual amounts) before proceeding with this.

  • I can't change the values in Property Palette

    I am working with Report Builder 3.0.5.17
    I generated a report layout with the wizard ;altough i set the width of the fields to certain dimensions (30 or 15),in the Property Palete it is diffrent(4000! or other and the most important thing : i can't change it! When i run the report, i get no data, it's empty! (i verified the interogation with Toad and everithing's fine)
    What could be the problem?
    Thanks!

    Hi,
    I'm quoting from Reports Builder Help:
    The Width property specifies the maximum number of characters that the values of the column can occupy. This Width refers to the width that Reports Builder uses internally for the column. It affects such things as the calculation of summaries and formulas. The size used to display the column's data, however, is determined by the size of the associated field in the Paper Layout view and its Vertical Elasticity and Horizontal Elasticity properties.
    If the Column Type is Database Scalar and the Datatype is Character, Date, Number, or Raw, Width is uneditable. However, this does not mean you cannot control the width of the column's values in the report output. You can change the width of the values in the output by modifying the field's width in the Paper Layout or the Field properties.
    About the report not containing any data, there could be several reasons:
    Make sure that the physical width of the columns is enough to display the values. Tyry changing the values for Horizontal / Vertical Elasticity in the property inspector.
    Also check the vertical / horizontal elasticity of the frame / repeating frame surrounding the field.
    Make sure that you are connecting to the DB with the correct username.
    Navneet.

  • SPEL? make REASON field required if user has changed the value in SALARY

    I have a requirement to make REASON field required if user has changed the value in SALARY field. Is it possible using spel? what are my options?

    Karan,
    You can change the Rendered Property through personalization.
    But in your requirement you need to attach the Spell through personalization & extend the existing CO to set the value of the SPELL based upon the condition.
    Note - Refer this thread http://forums.oracle.com/forums/thread.jspa?threadID=2176729&tstart=0. If you have worked on SSHRParams kindly help the user.
    Regards,
    Gyan

Maybe you are looking for

  • Firefox 18 no longer works with Mac OSX v10.8.2 Mountain Lion

    I have been running FireFox v17 with Mountain Lion (OSX 10.8.2) without any issues. The auto updater from Mozilla requested that I upgrade to FireFox v18, but since installing Mozilla FireFox crashes immediately. The browser opens but then does nothi

  • Is this normal or is my ipod broken?

    i cant play purchased songs. all it does is go through them all without stopping. just wondering if i should invest in a new one or not

  • How can I put data in FCE?

    Hello, After I had finally managed to install FCE (4.0) , I connected my Sony HDR-CX155 with my computer. It appears on the desktop and in FCE, I can also "look" in the camera's recorded clips via FCE, but it is not possible to get the chosen clips o

  • Need help fine tuning my pc

    can anyone give some help on the best setup for my system including over clocking here is the details of my system and thanx in advance processor intel pentium 4 code name northwood voltage 1.536v specification intel cpu 3.06ghz core speed 3006mhz mu

  • Safari crashes on opening - Safari for windows

    I have used Safari for Windows as my main internet browser for at least the past 4 months and I have never had any trouble with it. Yesterday when I tried to run Safari it simply crashed, even before loading anything. I have tried re-installing it bu