Update a field to a  Sequence based on another Field

Hello Everyone,
Little problem: -
CREATE TABLE: -
CREATE TABLE SEQTABLE
("GRP_NUM" VARCHAR2(20),
"ORDER" NUMBER(5),
"NEW_GROP" VARCHAR2(20) ) ; DATA:-
INSERT INTO SEQTABLE ("GRP_NUM" ,"ORDER" ,"NEW_GROP"     )     VALUES ('POIP1234567891234567' ,1 ,''  )
INSERT INTO SEQTABLE ("GRP_NUM" ,"ORDER" ,"NEW_GROP" ) VALUES ('POIP1234567891234567' ,2 ,''  )
INSERT INTO SEQTABLE ("GRP_NUM" ,"ORDER" ,"NEW_GROP" ) VALUES ('POIP1234567891234567' ,3 ,''  )
INSERT INTO SEQTABLE ("GRP_NUM" ,"ORDER" ,"NEW_GROP" ) VALUES ('LKJG1234567897412589' ,1 ,''  )
INSERT INTO SEQTABLE ("GRP_NUM" ,"ORDER" ,"NEW_GROP" ) VALUES ('JHGF1234567891234567' ,1 ,''  )
INSERT INTO SEQTABLE ("GRP_NUM" ,"ORDER" ,"NEW_GROP" ) VALUES ('JHGF1234567891234567' ,2 ,''  ) SELECT *
SQL> SELECT * FROM SEQTABLE;
GRP_NUM                ORDER        NEW_GROP
POIP1234567891234567          1
POIP1234567891234567          2
POIP1234567891234567          3
LKJG1234567897412589          1
JHGF1234567891234567          1
JHGF1234567891234567          2 Here my problem, I need to generate a smaller GRP_NUM in the NEW_GROP field. But cant just Substr the original field. This field has to be uniquie to the group.
Desired Results: -
GRP_NUM                  ORDER        NEW_GROP
POIP1234567891234567          1             10001
POIP1234567891234567          2             10001
POIP1234567891234567          3             10001
LKJG1234567897412589          1             10002
JHGF1234567891234567          1             10003
JHGF1234567891234567          2             10003 Any ideas guys

-- Data:
with seqtable as
select 'POIP1234567891234567' grp_num,1 "ORDER",'' new_grop  from dual union all
select 'POIP1234567891234567' ,2 ,''   from dual union all
select 'POIP1234567891234567' ,3 ,''   from dual union all
select 'LKJG1234567897412589' ,1 ,''   from dual union all
select 'JHGF1234567891234567' ,1 ,''   from dual union all
select 'JHGF1234567891234567' ,2 ,''  from dual
-- Query:
select grp_num, "ORDER",
       dense_rank() over (order by grp_num desc)
from seqtable;or:
-- Data:
with seqtable as
select 'POIP1234567891234567' grp_num,1 "ORDER",'' new_grop  from dual union all
select 'POIP1234567891234567' ,2 ,''   from dual union all
select 'POIP1234567891234567' ,3 ,''   from dual union all
select 'LKJG1234567897412589' ,1 ,''   from dual union all
select 'JHGF1234567891234567' ,1 ,''   from dual union all
select 'JHGF1234567891234567' ,2 ,''  from dual
-- Query:
select grp_num, "ORDER",
       10000 + dense_rank() over (order by grp_num desc)
from seqtable;I suggest not to use "ORDER" as column name, because it is an oracle reserved word.
You may ommit the quotes, when you use another column_name.

Similar Messages

  • Start routine to update some fields of a ODS based on the another ODS

    Hi I know i have to do abap coding at the start routine to update a ODS based on another ODS. I have tried doing the code for quite some time now and i have not been successful. I think I havenu2019t followed the definition required for this routine.
    I have 2 ODS, ODS1 has 3 key fields and ODS2 has 1 key field
    I have to map the ODS based on a 1:3 relation.
    I am writing this start routine for the update rules from ODS2 to ODS1.
    The logic is if the key field of ODS2 is equal to either Key field 1 or Key field 2 or Key field 3 of ODS1 then that record from ODS2 has to be updated to the corresponding matching record of ODS1, else no update. The 3 key fields of ODS1 have different character length and character types and the key field of ODS2 has a different character length and type when compared to the any of the key fields of ODS2 can match any of those.
    Like key field 1 of ODS1 has length 10. Key field 2 of ODS1 has length 10 and key field 3 of ODS1 has length 20 and all these fields are not alpha converted, but the key field of ODS2 has length 60 and it is alpha converted.
    Can anyone please help me in this code.
    My Code is as below.
    ITAB1-T_BOL = DATA_PACKAGE-/BIC/ZLBOL.
    ***********NISTEVO SELECT******************************
      SELECT /BIC/ZLBOL FROM /BIC/AWLONST0100 INTO ITAB1-T_BOL
                  WHERE /BIC/ZLBOL = ITAB1-T_BOL .
    **************R/3 SELECT*******************************
        SELECT /BIC/ZLRDELNU /BIC/ZLRSHIPNU /BIC/ZLREXTID
                  FROM /BIC/AWLOR3O0400
                  INTO CORRESPONDING FIELDS OF ITAB1
                  WHERE
                  /BIC/ZLRDELNU = ITAB1-T_BOL OR
                   /BIC/ZLRSHIPNU = ITAB1-T_BOL OR
                   /BIC/ZLREXTID = ITAB1-T_BOL .
          SORT ITAB1 BY T_DELNU T_SHIPNU T_EXTID .
          LOOP AT DATA_PACKAGE.
            READ TABLE ITAB1 WITH KEY T_DELNU = DATA_PACKAGE-/BIC/ZLBOL.
            IF SY-SUBRC = 0.
              EXIT.
            ENDIF.
            READ TABLE ITAB1 WITH KEY T_SHIPNU = DATA_PACKAGE-/BIC/ZLBOL.
            IF SY-SUBRC = 0.
              EXIT.
            ENDIF.
            READ TABLE ITAB1 WITH KEY T_EXTID = DATA_PACKAGE-/BIC/ZLBOL.
            IF SY-SUBRC = 0.
              EXIT.
            ENDIF.
            DELETE DATA_PACKAGE .
          ENDLOOP.
        ENDSELECT.
      ENDSELECT.
    Points will be awarded.
    Edited by: satish rajaram on Nov 6, 2008 4:51 PM
    Edited by: satish rajaram on Nov 7, 2008 11:40 AM
    Edited by: satish rajaram on Nov 7, 2008 11:43 AM

    The logic is if the key field of ODS2 is equal to either Key field 1 or Key field 2 or Key field 3 of ODS1 then that record from ODS2 has to be updated to the corresponding matching record of ODS1, else no update. The 3 key fields of ODS1 have different character length and character types and the key field of ODS2 has a different character length and type when compared to the any of the key fields of ODS2 can match any of those.
    Can you try below logic :
    Below is not code it needs to be manipulated as per requirement.
    ODS2 ---> ODS1
    SELECT <key fields of ODS1>
    FROM /BIC/A<ODS1>00
    INTO ITAB
    FOR ALL ENTRIES IN DATA_PACKAGE
    WHERE
    keyfield1 = data_package-key1
    or
    keyfield2 = data_package-key2
    or
    keyfield3 = data_package-key3
    **Now itab has all entries which neednot be deleted from data_package.****
    if sy-subrc=0.
    ***Check Itab and delete only those records not present in itab from data_package****
    endif.
    Hope this helps.

  • FM / BAPI to update STEUC field in marc Table basing on material and plant

    Hi,
    I need to to update STEUC field in marc Table basing on material and plant. please suggest FM / BAPI.
    Thanks.
    raviraj.

    Hi
    Try this BAPI function module:
    " BAPI_MATERIAL_MAINTAINDATA_RT "
    Data: LS_HEADDATA TYPE BAPIE1MATHEAD,
             LS_RETURN TYPE BAPIRETURN1,
              LT_PLANT TYPE TABLE OF BAPIE1MARCRT,          LS_PLANT TYPE BAPIE1MARCRT,
              LS_PLANTX TYPE BAPIE1MARCRTX,          LT_PLANTX TYPE TABLE OF BAPIE1MARCRTX.
            CALL FUNCTION 'BAPI_MATERIAL_MAINTAINDATA_RT'
                   EXPORTING
                       HEADDATA   = LS_HEADDATA
                   IMPORTING
                       RETURN     = LS_RETURN
                   TABLES
                       PLANTDATA  = LT_PLANT
                       PLANTDATAX = LT_PLANTX.
    Check the PLANTDATA in the above fm in which pass your ''STEUC'' to BAPIE1MARCRT-CTRL_CODE......
    Hope this works.....

  • Unable to update a field using the Data tab on a VIEW

    When viewing data using a VIEW instead of going to the table directly, am unable to change the values in any of the fields
    When I click on the list of VIEWs for a schema, then select a view that is based on a SELECT statement for a single table with a Primary key, and then click on the DATA tab to modify the value in one of the fields, SQL Developer does not allow me to change the value.
    Went into SQL Plus, and was able to execute an UPDATE statement against the same row of that VIEW, and update that field ("UPDATE vw_mytable SET thisfield = 'YES' WHEN row_id_number = 1'").
    Does SQL Developer not allow updating tables through a VIEW?
    Will it allow updating in the future? Please say yes.
    Oracle 10g DB and latest version of SQL Developer.

    Remember to add feature requests and vote on them on the SQL Developer Exchange!
    <br>
    <p>We have added updateable views to 1.1, but do remember, not all views are updateable - even in SQL*Plus.</p>
    <br>
    Sue

  • Update a field multiple times, but only if the field is empty

    I am having trouble updating a field in my table based upon a set of 7 different rules. I have been scratching my head at this for a few days, and am not sure what exactly is wrong, but am sure there is something small causing me problems. My current code
    is:
    BEGIN TRANSACTION
    UPDATE MyTable
    SET Field1 = 'Value1'
    WHERE svc = 'Y' AND Field1 = '' ;
    COMMIT TRANSACTION
    BEGIN TRANSACTION
    UPDATE MyTable
    SET Field1 = 'Value2'
    WHERE Dlv Is Null AND Cat = 'svc' AND Field1 = '';
    COMMIT TRANSACTION
    BEGIN TRANSACTION
    UPDATE MyTable
    SET Field1 = 'Value2'
    WHERE (prod LIKE 'ABC%') OR (prod LIKE 'ABB%') AND Field1 = '';
    COMMIT TRANSACTION
    BEGIN TRANSACTION
    UPDATE MyTable
    SET Field1 = 'Value3'
    WHERE Dlv = 'Elec' AND Field1 = '';
    COMMIT TRANSACTION
    BEGIN TRANSACTION
    UPDATE MyTable
    SET Field1 = 'Value4'
    WHERE Ord = '0' AND Cat = 'Hdw' OR Cat = 'Bnd' AND Field1 = '';
    COMMIT TRANSACTION
    BEGIN TRANSACTION
    UPDATE MyTable
    SET Field1 = 'Value5'
    WHERE Ord = '0' AND (NOT (Cat = 'Hdw')) AND (NOT (Cat = 'Bnd')) AND Field1 = '';
    COMMIT TRANSACTION
    BEGIN TRANSACTION
    UPDATE MyTable
    SET Field1 = 'Value4'
    WHERE (Ind = '1' AND Cat = 'Hdw') OR (Cat = 'Bnd') AND Field1 = '';
    COMMIT TRANSACTION
    BEGIN TRANSACTION
    UPDATE MyTable
    SET Field1 = 'Value5'
    WHERE (Ind = '1' AND NOT (Cat = 'Hdw')) AND (NOT (Cat = 'Bnd')) AND Field1 = '';
    COMMIT TRANSACTION
    BEGIN TRANSACTION
    UPDATE MyTable
    SET Field1 = 'Value6'
    WHERE Ind = '0' AND Cat = 'Hdw' OR Cat = 'Bnd' AND Field1 = '';
    COMMIT TRANSACTION
    BEGIN TRANSACTION
    UPDATE MyTable
    SET Field1 = 'Value7'
    WHERE (Ind = '0' AND NOT (Cat = 'Hdw')) AND (NOT (Cat = 'Bnd')) AND Field1 = '';
    COMMIT TRANSACTION
    My biggest problem seems to be that between the piece that updates Field1 as either Value4 or Value5 is that something is not right. I initially had this set up in MS Access, and so am using that as a comparison
    to check my final values once the field has been udpated. When I run in Access I get a total of 9,802 for Value6 and 14,107 for Value4, yet when I run the SQL code I get 19,548 for Value 6 and 4,478 for Value4.
    I also get some differences for the other values, but nowhere near as large of a difference as with the 2 values above. I feel fairly confident that I have something not quite right with my syntax, but I cannot
    figure out exactly what it is. Field1 at the beginning of the query is inserted into the table as a blank value.
    Thanks.

    Combining OR and AND may be tricky, so I think your problem lies here:
    UPDATE MyTable
    SET Field1 = 'Value4'
    WHERE Ord = '0' AND Cat = 'Hdw' OR Cat = 'Bnd' AND Field1 = '';
    You can change this to
    UPDATE MyTable
    SET Field1 = 'Value4'
    WHERE (Ord ='0' AND Cat IN ('Hdw','Bnd')) AND Field1 = '';
    For every expert, there is an equal and opposite expert. - Becker's Law
    My blog
    My TechNet articles

  • Error while updating Date Field on Process Form.

    Hi,
    I am using java code to pre-pop date on the process form.First I used a java code whic took java.sql.date as input and returned the same java.sql.date.But it gave an error that:java.lang.String cannot be converted to java.sql.date.......
    So I changed the java code and now it takes string as input and returns java.sql.date. This code works fine for Pre-pop adapter and the date is populated on the process form.
    But when i use the same code in a Process Task adapter to update the date, then it gives the following error:
    ERROR [ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)' XELLERATE.ADAPTERS - Class/Method: tcAdpEvent/updateDataSetValuePost encounter some problems: Adapter Execution Error: updateDataObjFieldValuePost: error updating UD_OID_USR_DATE_OF_BIRTH
    ERROR [ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)' XELLERATE.ADAPTERS - Class/Method: tcAdpEvent/updateDataSetValuePost encounter some problems: {1}
    Can anyone suggest any method to update date field on process form?

    Hi Abhi,
    Can you tell me how you have implemented populating an UDF based on Prepopulation of another UDF. I have a similar kind of requirement. It would be great if you share your code or relevant part of it.
    Regards,
    Sunny Ajmera

  • How to update flex field data on a human task?

    After entering a human task and assigning the data how do you then update flex field data whilst the task is still assigned. I'm using the task services to communicate with the task and applying filters based on the flex field data.
    I want to update the data when actions take place on the task e.g. suspend, aquire, release.
    Any ideas?

    You can fetch the task , change the flex attribute value and update the task. Find below the steps we do for updating one of the TextAttribute
    Task completeTask =  // get the task using task query service
    completeTask.getSystemMessageAttributes().setTextAttribute2(updatedfolderName);
    completeTask = // update the task using "updateTask" method

  • Update Record Field if Value Not Equal

    Hello All,
    I am using Toad for Oracle 10. I have a MERGE INTO Process that updates tbl_requisition based on FK - fk_allotment_id that equals parent table tbl_allotment PK - pk_allotment_id. Both tables have create, update and deletes triggers. The process is executed when a Apply Changes/update button is clicked from tbl_allotment. So, all the record data from tbl_allotment updates tbl_requisition record if the fk and pk keys are equal. My problem is if a record is updated within tbl_requisition. Now the record from tbl_requisition is different from tbl_allotment. If any value is updated from tbl_allotment for the matching pk_allotment_id = fk_allotment_id record from tbl_requisition. tbl_allotment record data will override the updated value within tbl_requisition. I would like to only update the values that were updated/changed and are not equal from tbl_allotment to tbl_requisition. Can anyone assist me with this?
    Begin
    MERGE INTO tbl_requisition req
    USING tbl_allotment alt
    ON (req.fk_allotment_id = alt.pk_allotment_id)
    WHEN MATCHED THEN
    UPDATE SET
         req.FK_JOBCODE_ID = alt.FK_JOBCODE_ID,
         req.FK_JOBCODE_DESCR = alt.FK_JOBCODE_DESCR,
         req.FK_JOBCODE_PAYRANGE = alt.FK_JOBCODE_PAYRANGE,
         req.FK_PAY_RANGE_LOW_YEARLY = alt.FK_PAY_RANGE_LOW_YEARLY,
         req.FK_DEPARTMENT_ID = alt.FK_DEPARTMENT_ID,
         req.FK_DIVISION_ID = alt.FK_DIVISION_ID,
         req.FK_NUMBER_OF_POSITIONS = alt.NUMBER_OF_POSITIONS,
         req.FK_DEPARTMENT_NAME = alt.FK_DEPARTMENT_NAME,
         req.FK_DIVISION_NAME = alt.FK_DIVISION_NAME,
         req.REPORT_UNDER = alt.REPORT_UNDER;
    EXCEPTION
      WHEN NO_DATA_FOUND THEN
        dbms_output.put_line('No data found');
    End; Thanks for reading this thread and I hope someone can provide some assistance. If the create tables or anything is needed that is not a problem to provide.

    Thanks for responding Frank and providing the EXCEPTION information also. Here are my create tables and insert statement. I changed the child table from tbl_requisition to tbl_allotment_temp, same process though.
    CREATE TABLE  "TBL_ALLOTMENT"
       (     "PK_ALLOTMENT_ID" NUMBER,
         "FK_DEPARTMENT_ID" VARCHAR2(5),
         "FK_DIVISION_ID" VARCHAR2(100),
         "FK_JOBCODE_ID" NUMBER,
         "FK_JOBCODE_DESCR" VARCHAR2(100),
         "FK_JOBCODE_PAYRANGE" NUMBER(*,0),
         "FK_PAY_RANGE_LOW_YEARLY" NUMBER(*,0),
         "NUMBER_OF_POSITIONS" NUMBER,
          CONSTRAINT "PK_ALLOTMENT_ID" PRIMARY KEY ("PK_ALLOTMENT_ID") ENABLE
    CREATE TABLE  "TBL_ALLOTMENT_TEMP"
       (     "PK_ALLOTMENT_TEMP_ID" NUMBER,
         "FK_DEPARTMENT_ID" VARCHAR2(5),
         "FK_DIVISION_ID" VARCHAR2(100),
         "FK_JOBCODE_ID" NUMBER,
         "FK_JOBCODE_DESCR" VARCHAR2(100),
         "FK_JOBCODE_PAYRANGE" NUMBER(*,0),
         "FK_PAY_RANGE_LOW_YEARLY" NUMBER(*,0),
         "NUMBER_OF_POSITIONS" NUMBER,
          CONSTRAINT "PK_ALLOTMENT_TEMP_ID" PRIMARY KEY ("PK_ALLOTMENT_TEMP_ID") ENABLE
    INSERT INTO tbl_allotment
    (FK_DEPARTMENT_ID, FK_DIVISION_ID, FK_JOBCODE_ID, FK_JOBCODE_DESCR,
    FK_JOBCODE_PAYRANGE, FK_PAY_RANGE_LOW_YEARLY, NUMBER_OF_POSITIONS)
    values
    (00002, 0000220000, 100408, 'Revenue Analyst',
      2210, 38389, 5);Once data is created for tbl_allotment, this insert statement inserts the data to tbl_allotment_temp.
    INSERT INTO tbl_allotment_temp(
         PK_ALLOTMENT_TEMP_ID,
         FK_JOBCODE_ID,
         FK_JOBCODE_DESCR,
         FK_JOBCODE_PAYRANGE,
         FK_PAY_RANGE_LOW_YEARLY,
         FK_DEPARTMENT_ID,
         FK_DIVISION_ID,
         NUMBER_OF_POSITIONS)
        VALUES (
         :P3_PK_ALLOTMENT_ID,
         :P3_FK_JOBCODE_ID,
         :P3_FK_JOBCODE_DESCR,
         :P3_FK_JOBCODE_PAYRANGE,
         :P3_FK_PAY_RANGE_LOW_YEARLY,
         :P3_FK_DEPARTMENT_ID,
         :P3_FK_DIVISION_ID,
         :P3_NUMBER_OF_POSITIONS);Once any update occurs to tbl_allotment, this process updates tbl_allotment_temp based on temp.pk_allotment_temp_id = alt.pk_allotment_id.
    Begin
    MERGE INTO tbl_allotment_temp temp
    USING tbl_allotment alt
    ON (temp.pk_allotment_temp_id = alt.pk_allotment_id)
    WHEN MATCHED THEN
    UPDATE SET
         temp.FK_DEPARTMENT_ID = NVL (alt.FK_DEPARTMENT_ID, temp.FK_DEPARTMENT_ID),
         temp.FK_DIVISION_ID = NVL (alt.FK_DIVISION_ID, temp.FK_DIVISION_ID),
         temp.FK_JOBCODE_ID = NVL (alt.FK_JOBCODE_ID,    temp.FK_JOBCODE_ID),
         temp.FK_JOBCODE_DESCR = NVL (alt.FK_JOBCODE_DESCR, temp.FK_JOBCODE_DESCR),
         temp.FK_JOBCODE_PAYRANGE = NVL (alt.FK_JOBCODE_PAYRANGE, temp.FK_JOBCODE_PAYRANGE),
         temp.FK_PAY_RANGE_LOW_YEARLY = NVL (alt.FK_PAY_RANGE_LOW_YEARLY, temp.FK_PAY_RANGE_LOW_YEARLY),
         temp.NUMBER_OF_POSITIONS = NVL (alt.NUMBER_OF_POSITIONS, temp.NUMBER_OF_POSITIONS);
    End;Once the data is created within tbl_allotment the data is also inserted within tbl_allotment_temp. If tbl_allotment_temp.NUMBER_OF_POSITIONS value is changed from 5 to 10 is fine. The problem is when a update occurs within tbl_allotment and the updated field is not NUMBER_OF_POSITIONS. The changed field values from tbl_allotment should only update the field data within tbl_allotment_temp.
    UPDATE tbl_allotment_temp
    SET
    NUMBER_OF_POSITIONS = 10
    UPDATE tbl_allotment
    SET
    FK_JOBCODE_DESCR = 'Revenue Test'Now within tbl_allotment_temp only field FK_JOBCODE_DESCR should be updated to Revenue Test but my MERGE INTO process will update all the field values. So the updated NUMBER_OF_POSITIONS value 10 will now be 5. I would only like to update any changed value from tbl_allotment to tbl_allotment_temp. If any record value from tbl_allotment_temp was changed that value should not be updated from the MERGE INTO Process within tbl_allotment unless those values have been updated within tbl_allotment. Let me know if this is not clear so I can clarity more Frank.
    Edited by: Charles A on Aug 29, 2011 8:41 AM

  • How to update Tr code FB02   and update the field reference key1 (bseg-xref

    Can any body
    help me how to update   Tr code   fb02
    and  update the field  reference  key1 (bseg-xref1)  with the interest amount
    calculated.
    Below i have  written My  program  flow logic
    The program should read the open items i.e debit items in the customer account,
    Based on the  invoice date and customer payment terms  calculate the due date and then the  interest should be  calculated on that item based on the due date.
    Use the  transaction  fb02  and update the field  reference  key 1 (BSEG-xref1)
    with the interest amount calculated
    Only  consider  customers whose  interest indicator  knb1-vzskz = 'vk'.
    Interest is to be  calculated for every  30  days
    at the rate of  1% .please see example below.
    Document date is 01.01.2007
    for amount  1000SGD   payment  term  7  days
    It becomes  due  on  08.01.2007
    until  06.02.2007 you should not  consider  for calculation of interest
    SGD  on   7.02.2007 run you can consider this  item for interest calculation

    Hi Robert,
    Thanks for answering.
    I am looking at Ref 2 should flow automatically to clearing document from the accounitng document for billing.
    Ex: Billing document is created and accounted. Ref 2 is AB
    Now when receipt is accounted for this biling document this AB should flow automatically to Ref 2 field.
    Thanks
    NNS.

  • CSV upload and update table fields

    Hi,
    Is there any way to update any field of the underlying table from HTMLDB while importing the CSV file?For e.g, if there are XYZ table have 200 ermployee where empno is primary key.
    Once we upload the data from CSV its fine.Now after 2 weeks i need to update the sal and ename corresponding to the previous 100 employees only.So now when i trying to update the data a unique constraints violation occurs since the empno have already present so my concern is that -- how to get out of this problem specially when updation of huge no. of records needed and also no updation required for some records already present?Do the CSV update be helpful on that circumstances?
    One thing we can do that we can track down the list of 100 employee whose information going to be updated.Put those info in excel and add rest 100 emplyee to that excel and again doing the CSV upload ?
    This is a huge issue and not only the tedious task but also errorprone and that task will be increased with the amount of data increasing in the table.
    Please anyone can suggest ?
    Regards,
    ROSY.

    The best way to solve your problem is next way.
    1º) Save the file with the data to import like a BLOV ITEM.
    Ok it can be done. CSV placed on BLOB data field.2º) Make a procedure to manage this BLOV item that can be fired by user pushing a buttom. (you can do it easy from HTMLDB).
    how to manage ? What need to be fire to push the CSV to the target table with the actual field population ?3º) Into this procedure insert the records freely and dont worry for anything more. (maybe you can be worry about duplicate records is so, only, into this same procedure make any pl/sql lines to be sure record is not duplicate before insert)
    ? ? ? If the data already exist it should be needed to truncate before insert that is not my reqr rather the existing data should be updated based on PK if any chages occurs in the CSV fo that data.4º) after you are sure the insert work properly and if you need any other treatment to record, with a trigger in the table or calling any other procedure from the same trigger make the traeataments that you need.
    that can be done highly .......before insert trigger.Remember. Dont put any commit.
    sure.......5º) Go down from horse. Dont take coffe or Tea in exceed. And remember all we are the same, people that only want go to eat with childs in week-end.
    i m in land no way to go down........nothing i take ya eat & eat much ....but this is not the right place for making comments about Weekend....Regards and good luck.
    anyway embargo starts...........enjoy Cheers...........Wish u All Hp XMas...

  • Update stceg field in mdkp table

    Hello ,
      Can anybody tell me the name of function module or BAPI which update data in MDKP table.
       In md06 transaction i want to update the process indicator flage for 3000 materials based on plant so any function module or BAPI which updates this field?
    Regards
    srinivas

    Hi Srinivas ..
    If you want to Set the Processing Flag for all the Materials based on a Plant.
    Goto Tcode MD06.
    you can See 2 Tabs:<b> Individual Processing</b> and <b>Collective processing.</b>
    Select the Collective processing flag Tab .
    Here you can enter the Plant and Set the Flag.
    So this flag will be Set for all the Materials under this Plant...
    If u still need a program for this u can do the Recording and create a BDC.
    Hope this gives u the Solution.
    <b>Reward if Helpful</b>

  • DataSource Update mode field

    I need to export data from BW (7.0) to another non-SAP Oracle based DB table. This external DB system has a text file interface that BW must export to that requires an update method field in order to use a delta method. The values required are "I" for input, "U" for update and "D" for delete.
    I was thinking of using a DSO with the 0RECORDMODE field to indicate the delta method. Research tells me that to populate the 0RECORDMODE field I need to add it to the "Record Mode Field" (INVFIELD) in the ROOSFIELD table. How do I do that without editing ROOSFIELD table directly, i.e. is there a transaction to edit like RSA2 Extraction tab, Record Mode Field?
    On a sidenote, has anyone else exported to a non-SAP Oracle DB from BW using a delta update?
    Al

    Hello,
    Not sure why you are going for ROOSFIELD tables.
    Since its a text file interface then you may want to use open hub to store the file imported from DSO to a text file and then use it as source for the oracle system.
    If you use the delta option from the DSO to update to the files then the recordmode field is automatically populated based on kind of change to the records.
    Since the delta will be loaded from the change log of the DSO therefore you need not maintain it manually in a table.You may not get the values which you are looking for like I and U but it will contain before and after image which you can try to use ...may be only after image is required.
    As far as I know nothing needs to be maintained for the table ROOSFIELD.
    Thanks
    Ajeet

  • Adobe Interactive - Problem Updating Form Fields within tables

    I am working with Interactive forms. My scenario is I download the form, update, upload to the Web and then submit to the backend, I am basically use a blend of the tutorials available. From a Web Dynpro perspective all is working well.
    The problem I am having is in the Form itself.
    I have 10 fields which I want the user to update.  Fields which are bound at Page Level, work fine. e.g.
    <CONTEXT>.<PAGE>.<FIELD>::Change
    Data_Source.Page1.Langu::Change
    However Fields in a table do not seemed to work properly. e.g.
    <CONTEXT>.<PAGE>.<TABLE>.<ROW[x]>.<CELL[y]>.<FIELD>::Change
    Data_Source.Page1.tblCusDetails.Row[0].Cell[1].Name
    If I perform an update in the form Langu works well, Name does not.
    e.g. Page1.Langu.rawValue = "EN"                             This works OK
           Page1.tblCusDetails.Row[0].Cell[1].Name = "Andrew "            This does not work.
    I got round this issue by searching for the attribute at runtime.
    Now (Based on my scenario) I am trying to update my form;
    I download the form to the front end. Update and save. When I open the form again only Langu has saved, Name reverts back to <Emtpy>.
    My workaround would be to remove all the tables, which I will start now, but  I am wondering if I am doing something wrong or if its a bug in the form,?
    Can anyone help?
    Andrew

    Hello Bhavik:
    Thank you, for your quick response.  To be honest, I went through the tutorial from SAP TechEd, "Creating Interactive Forms in Web Dynpro for JAVA, and it is drving me crazy.
    I did create under the Contect actually Value Node:
    DataSource and within that two Value Node for PersonalData and TravelData.  For PersonalData, the following Value Attribute: CostCenter, Department, Name etc etc........
    The properties is already set for the value attributes to string, I tried to change it to init it will not take it? 
    Please call me Amr.  Thank you,

  • How to use KAUF_AUFNR_CHANGE  to change Process order and Update a field

    Hello ,
    I am working on 4.6C system and I hve a requirement to change Process order and Update a field value passed from a ABAP Program. I am looking for suitable Function modules or Bapi ( available in 4.6c) .
    I have come across FM KAUF_AUFNR_CHANGE . Would appreciate any guidance on how to use the FM in my program and Update a field in the Process order.
    Many Thanks!

    All the importing parameters of this function module have a striaght structure of the transperent tables...
    i have checked the code and it has a modify statement based on the importing parameter..
    pick one record in databas and pass it to the importing parameters, with some values changed...
    i think that should work
    what values  to pass the import values of FM -KAUF_AUFNR_CHANGE.
    Edited by: ssm on Aug 4, 2011 7:19 PM

  • Auto-populating fields based on another field (must access dif record type)

    This is a long one. I basically want to know if it's possible to have several fields auto-populated based on the data in another. It gets a little tricky here, because the information I want to auto-populate will have to be searched for in another record type. An example will hopefully make my request clear:
    I have 10's of thousands of records of the "Product" record type that each have a product number. Well, let's say I have several fields to enter into an "Opportunity" record type, based on the information for this product number in the "Products" record type. I want to know if I can enter the product number on the "Opportunity" record, and have OnDemand go look up this product number in the "Product" record type, pull information from that record, and auto-populate that additional information in certain fields back on the "Opportunity" record that I am entering information for.
    I know a workflow can do this on simple things where you have a few different part numbers and can create a workflow for each, but I literally have 40k part numbers, and I can't very well create that many workflows. If there was a way to dynamically script the workflow to use the part number in the field on the "Opportunity" record and go fetch the data to auto-populate, that would be nice.
    I also can't use a cascading picklist because, again, there are around 40k products records and picklists have a limit to how many choices you can have.
    My think tank has run empty, and I am out of ideas. I was wondering if there is any other way to get this done, or if it's even possible?
    Thanks,
    B
    Edited by: user10885599 on Feb 5, 2009 11:54 AM

    As I read this, I am wondering if you would be able to use the new JoinFieldValue() function to update the fields. The problem is that the Opportunity record does not have a direct link to products. The Revenue table does however, so you should be able to do this from Revenue, if that is how you are using the application.
    The process would be to create a workflow that watches for new Revenue records, and updates the new fields in the Revenue object using the JoinFieldValue function to pull the data.

Maybe you are looking for

  • Unable to open scanned Kaiser Baas jpeg files in Photoshop Elements 6

    I have scanned photos and negatives using Kaiser Baas Photo & Negative scanner.  I am unable to open the jpeg files produced using Photoshop Elements 6, any advice on how to?

  • Chinese characters in CL_GUI_TEXTEDIT

    Hi Gurus. I am trying to show some Chinese characters in the CL_GUI_TEXTEDIT container. But they show as rectangular boxes (symbolic of junk). Is there any way I can allow keying in of Chinese characters in the text box? Thanks in adv.

  • Where Clause - Modification via SDK

    Good morning, We are currently experiencing quite a large performance impact as our record selection formulas, and parameters are not hitting our database (in where clause) and therefore a large amount of data is being pulled back and then filtered o

  • How do I add a selection screen parameter to get a application server file

    Hi All.. Can you please suggest how can we add a selection screen parameter to get a application server file ? Thanx in Advance... Regards, Deepak

  • SharePoint 2010 Zoom In Zoom Out Button

    Hey guys, I would like to insert a Zoom Out / Zoom In Button above an webpart. So I have to implement the ribbon directly in the space above the webpart, but I don't know how to do it. So I need a JavaScript function to do this. I hope you can help m