Apply validations on internal table fields before updating table

I have to upload data from a CSV file to R3 ztable, but before that I have to apply diffrent validations to check if fileds does not contaion invalid characters ....
eg
for a currency field I want to check if user has entered value in decimail format e.g 3.23, -22.33 etc but not like this 3..2, _+3.33, e3e& etc
How can I do this .....

hi ,
There are lots of thread  related to upload data  .
you can search in SDN  .
  One method is to upload data in excel format  and getting data in one internal table and then validatiing
  before insert or update  .
Moderator message - Please respect the 2,500 character maximum when posting. Post only the relevant portions of code
Regards
Deepak.
Edited by: Rob Burbank on Oct 3, 2010 3:36 PM

Similar Messages

  • How to read table fields form a table  having length of 7 characters

    HI all,
    could you please tell me how to read table fields from a table having length 7 characters, i have requirement that in my ztable i have 30 fields out of which 20 fields are location fields, i want to select 20 fields which have 7 characters length.
    please could any body suggest me on this issue.
    thanks,
    sre.

    hi,
    try like this
    create a data variable of type i as
    data: len type i.
    create internal table for 20 fields as
    data:begin of itab,
               fld 1 type .......
            end of itab.
    data:itab type itab1 occurs 0 with header line.
    loop at itab2. // original internal table which all fields.
    read table itab2 with index sy-tabix.
    len = strlen (itab2-fld).
    if len eq 7.
          move itab2 itab1.
          append itab1.
    endif.
    endloop.
    if helpful reward some points.
    with regards,
    Suresh.A

  • Compare table A and table B and update table B ,,,,table B has 300k rows

    Hi,
    I m trying to write a code, I have tables A and table B.
    I need to compare table A and table B , and update table B with one column.
    using joins b/w A&B tables, I selected one record from table A in cursor.
    After Begin I m trying to open cursor and in FOR LOOP
    Im trying to update table B WHERE CURRENT OF Cursor.
    this is erroring out.
    could you let me know on this.
    there is another way like selecting required columns from both table.but i was told to do as above.
    Thanks

    > this is erroring out.
    You haven't posted nearly enough for anyone to help you.  You didn't even tell us what error you are getting.
    So about the only thing we can do is post a generic MERGE statement which you'll have to modify for your use.
    merge into tableB b
    using (select some_key, some_column from tableA where etc.) u
    on (u.some_key = b.some_key)
    when matched then update
    set b.some_column = u.some_column;

  • Update a Table Field of QMEL Table Using Function Module

    hello Guru
    I want to update a field of QMEL table suing FM which was created by user. how to write code for that. i have some idea but it is not helpful for us.....
    Moderator Message: Searching the forums/Google is a good start.
    Edited by: kishan P on May 19, 2011 12:13 PM

    hi Ram,
    You can use update query on table setting particular field value...There is no Function module for it.
    Regards,
    Pawan.

  • Process triggered before update table filled

    Hello,
    We have a program that
    - calls one FM (RSSM_SDL_INFOPACKAGE_DIALOG) that gives direct access to a specific infopackage (via program parameters) that is uploading an ODS when executed
    - secondly calls another FM (BP_EVENT_RAISE) that triggers an event that activates the ODS (and some other processes afterwards).
    The problem is: The event is triggered when the infopackage is left - and the infopackage might be left before the update table is filled. So the activating process might start before the filling of the update table has been done (monitor status not green).
    How can this issue be solved keeping in mind that the end-user should only execute one transaction (the one that's execute the program).
    Kind regards,
    Johnny

    Hi Simon,
    Can you provide me with information of how to build in this loop. Please check the relevant part of our program:
      CALL FUNCTION 'RSSM_SDL_INFOPACKAGE_DIALOG'
        EXPORTING
          SOURCE.......
    IMPORTING
    EXCEPTIONS
       error                  = 1
       OTHERS                 = 2.
      IF sy-subrc <> 0.
      PERFORM log_nogo.
        MESSAGE e001(00) WITH 'FM Error: Infopackage error message succesfully logged'.
      ELSE.
        IF NOT p_evtid IS INITIAL.
          PERFORM raise_event
               USING p_evtid
            CHANGING ret_code.
          IF ret_code <> 0.
            MESSAGE e002(zbps) WITH 'Error raising event '
                                   p_evtid.
          ELSE.
            MESSAGE s002(zbps) WITH 'Event'
                                  p_evtid
                                  ' successfully' ' raised'.
          ENDIF.
        ENDIF.
      ENDIF.
    Thanks,
    Johnny

  • How to find internal table fields from which table.

    Hello Experts,
    I have to use a dynamic select inner join query.
    SELECT (lv_string)
      FROM (from_tab)
      INTO CORRESPONDING FIELDS OF TABLE <fs_itab1>
      WHERE (where_tab).
    ELSEIF table_1 NE ''.
      SELECT *
      FROM (table_1)
      INTO CORRESPONDING FIELDS OF TABLE <fs_itab1>
      WHERE (where_tab).
    in that LV_string is dynamicaly select. from a structure which is a combination of say  VBAK and VBAP
    i have to
    CONCATENATE 'VBAK~' wa_fields-fname INTO str_temp.
    CONCATENATE lv_string str_temp INTO lv_string SEPARATED BY space
    CONCATENATE 'VBAP~' wa_fields-fname INTO str_temp.
      CONCATENATE lv_string str_temp INTO lv_string SEPARATED BY space.
    with there identifire....how to find that...
    Regards,
    Ketan.

    Ketan,
    I believe you CAN find this only when you are creating lv_string from your structure (or whatever it is).
    So paste that code that what is your 'structure' type and on what conditions you want to Fill lv_string from it.
    in that LV_string is dynamicaly select. from a structure which is a combination of say VBAK and VBAP
    If you have a custom or standard Structure from which you need to fill lv_string, then you should have no worries to full VBAK~ or VBAP~ because fieldnames will be always unique in any Structure and hence ~ additions are not necessarily needed.
    The issue can be in the case where you are picking few fields each from std tables VBAK and VBAP in your lv_string and
    your "(from_tab)" is an inner join condition. I believe in that case you should be able to identify VBAK~ and VBAP~ while populating lv_string itself. Also you can use DB view MASSVBAP.
    Regards,
    Diwakar

  • Creating a new Search Help on a standard SAP table field?

    Good day, everyone!
    As part of a report I am writing, the customer would like to have Search Help added to the AUFEX field in table AUFK.  They would like this functionality so that when they are changing an order via t-code ko02, they can get a list of valid values to put in field AUFEX.  I would like to tie it to a zTable I've created; in my zTable, I have just 2 fields:  a key value (that will go into AUFEX) and a text description of the key value.  This zTable is used in my report.
    While I've created a Search Help on this table already for table maintenance, I've never added a custom Search Help to an existing standard SAP table field before.  I've done some Googling and other searching to see what I need to know, but I've only been able to find information on Collective Search Helps.  AUFEX doesn't yet have a Search Help field, so I don't think Collective Search Helps is my answer.
    Is this possible?  Can I add a custom Search Help to a standard SAP table field that doesn't have any Search Help linked to it yet?  Is there an existing thread or guide somewhere that can tell me how to do this?
    Thank you!

    Hi
    Yes u can: u can assign the search help to (A) data element livel or (B) field table livel.
    After creating your search help:
    A) Run SE11, insert your data element (AUFEX), press edit and insert the search help in "Search Help" area on DEFINATION tab;
    B) Run SE11, insert your table (AUFK), press edit, place the cursor on your field (AUFEX) and go to GoTo->Search help->for field
    But u should consider it'll mean to change a standard object for both cases: so u need to get the access key from your OSS.
    Max

  • Invoice List Cancellation Status table field

    Hi,
    I need to know, which table field is updated when we cancel an invoice List using VF26. If there is cancellation once the VBRK-SFAKN is updated with the cancelled Invoice List Number. But in case there are multiple cancellations, the SFAKN field still contains the first cancelled Invoice list #. There is no status field in VBRL to indicate whether the status of the invoice list is cancelled or active.
    How to trace whether the subsequent invoice lists are cancelled or not?
    Thanks,
    Amit

    Amit,
    I don't find any field being updated on the original Invoice list  while u are cancelling it.
    So unfortunately you can't find from its VBRK entries that it was cancelled.
    This is my understanding.... Let me know if you discover any thing new.
    Coming to how we live up with it......
    Before sending the invoice list to the customers we will check whether any entry exist in VBRK table with the same number in SFAKN(Cancelled billing doc #)..  So if any entry exist in VBRK, that means this document was cancelled, so ignore it from the send list.
    Let me know if you would like to know anymore details....
    Thanks,
    Aj.

  • How to show all table fields in correct alv disply

    Hi all,
    This is my report that disply in ALV . but this is only displying the join table (t_p0001_p0002) fields.i want to disply the other two table fields i.e t_pa0315 and t_pa0007.what is the logic to ALV disply the other two table fields like the table t_pa0001_pa0002.pls help me regarding this.
    send me the code its urgent.
    thanks!
    Vipin
    pls find the code below:->
    REPORT Y_WP03 .
    DEFINE m_fieldcat.
      add 1 to ls_fieldcat-col_pos.
      ls_fieldcat-fieldname   = &1.
      ls_fieldcat-ref_tabname = &2.
      append ls_fieldcat to lt_fieldcat.
    END-OF-DEFINITION.
    TYPE-POOLS: slis.                      " ALV Global types
    tables:pa0001,
           pa0315,
           pa0007,
           disvariant.
         Selection-Screen
    SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001.
    *SELECTION-SCREEN SKIP 1.
    SELECT-OPTIONS: s_pernr FOR pa0001-pernr.            " Personnel No
    SELECT-OPTIONS: s_orgeh FOR pa0001-orgeh .           " Organization unit
    SELECT-OPTIONS: s_werks FOR pa0001-werks.            " Personnel Area
    SELECT-OPTIONS: s_plans FOR pa0001-plans.            " Position
    SELECT-OPTIONS: s_ebeln FOR pa0315-ebeln.            " Purchase order
    SELECTION-SCREEN END OF BLOCK blk1.
    SELECTION-SCREEN BEGIN OF BLOCK b2k2 WITH FRAME TITLE text-002.
    *SELECT-OPTIONS: s_var FOR disvariant-variant.
    PARAMETERS: p_disva1 LIKE disvariant-variant.
    SELECTION-SCREEN END OF BLOCK b2k2.
                     Type Definition                                     *
    TYPES :
    BEGIN OF ty_pa0001_pa0002,
        pernr TYPE pa0001-pernr , " Personnel no.
        endda TYPE pa0001-endda , " end date
        begda TYPE pa0001-begda , " start date
        bukrs TYPE pa0001-bukrs , " company code
        werks TYPE pa0001-werks , " Personnnel area
        persg TYPE pa0001-persg , " Employee group
        persk TYPE pa0001-persk , " Employee subgroup
        btrtl TYPE pa0001-btrtl , " Personnnel subarea
        abkrs TYPE pa0001-abkrs , " Payroll area
        kostl TYPE pa0001-kostl , " cost center
        orgeh TYPE pa0001-orgeh , " Organizational Unit
        plans TYPE pa0001-plans , " Position
        nachn TYPE pa0002-nachn , " Last name
        vorna TYPE pa0002-vorna , " First name
        midnm TYPE pa0002-midnm , " Middle name
      END   OF ty_pa0001_pa0002 ,
    BEGIN OF ty_pa0315,
       pernr TYPE pa0315-pernr , " Personnel no.
       kostl TYPE pa0315-kostl , " Sending cost center
       lstar TYPE pa0315-lstar , " Activity type
       werks TYPE pa0315-werks , " Plant
       lifnr TYPE pa0315-lifnr , " Vendor number
       ebeln TYPE pa0315-ebeln , " Sending pruchase ord
       ebelp TYPE pa0315-ebelp , " Sending PO item
       lstnr TYPE pa0315-lstnr , " Activity number
    END   OF ty_pa0315,
    BEGIN  OF ty_pa0007,
      pernr TYPE pa0007-pernr,
      schkz TYPE pa0007-schkz,
    END  OF ty_pa0007.
    *BEGIN  OF ty_pa0002,
    pernr TYPE pa0002-pernr,
    nachn TYPE pa0002-nachn,
    vorna TYPE pa0002-vorna,
    midnm TYPE pa0002-midnm,
    *END  OF ty_pa0002.
                     Data Declaration                                    *
    DATA :
      t_pa0001_pa0002 TYPE STANDARD TABLE OF ty_pa0001_pa0002 ,
      w_pa0001_pa0002 TYPE ty_pa0001_pa0002 ,
      t_pa0315 TYPE STANDARD TABLE OF ty_pa0315 ,
      w_pa0315 TYPE ty_pa0315 ,
      t_pa0007 TYPE STANDARD TABLE OF ty_pa0007 ,
      w_pa0007 TYPE ty_pa0007 .
    t_pa0002 TYPE STANDARD TABLE OF ty_pa0002 ,
    w_pa0002 TYPE ty_pa0002 .
    START-OF-SELECTION .
      SELECT a~pernr
             a~endda
             a~begda
             a~bukrs
             a~werks
             a~persg
             a~persk
             a~btrtl
             a~abkrs
             a~kostl
             a~orgeh
             a~plans
             b~nachn
             b~vorna
             b~midnm
             INTO TABLE t_pa0001_pa0002
             FROM pa0001 AS a INNER JOIN pa0002 AS b
             ON apernr = bpernr
             WHERE a~pernr IN s_pernr
             AND   a~werks IN s_werks
             AND   a~orgeh IN s_orgeh
             AND   a~plans IN s_plans.
      SORT t_pa0001_pa0002 BY pernr .
      IF NOT t_pa0001_pa0002[] IS INITIAL .
        SELECT pernr
               kostl
               lstar
               werks
               lifnr
               ebeln
               ebelp
               lstnr
               FROM pa0315
               INTO TABLE t_pa0315
               FOR ALL ENTRIES IN t_pa0001_pa0002
               WHERE pernr = t_pa0001_pa0002-pernr
               AND   kostl = t_pa0001_pa0002-kostl
               AND   ebeln IN s_ebeln.
        SELECT pernr
               schkz
               FROM pa0007
               INTO TABLE t_pa0007
               FOR ALL ENTRIES IN t_pa0001_pa0002
               WHERE pernr = t_pa0001_pa0002-pernr.
        SELECT pernr
               nachn
               vorna
               midnm
               FROM pa0002
               INTO TABLE t_pa0002
               FOR ALL ENTRIES IN t_pa0001
               WHERE pernr = t_pa0001-pernr .
      ENDIF.
    PERFORM f_display_data.
    FORM f_display_data.
      DATA:
        ls_fieldcat TYPE slis_fieldcat_alv,
        lt_fieldcat TYPE slis_t_fieldcat_alv.
    Build the field catalog
      m_fieldcat 'PERNR' 'PA0001'.
      m_fieldcat 'NACHN' 'PA0002'.
      m_fieldcat 'VORNA' 'PA0002'.
      m_fieldcat 'MIDNM' 'PA0002'.
      m_fieldcat 'BUKRS' 'PA0001'.
      m_fieldcat 'WERKS' 'PA0001'.
      m_fieldcat 'PERSG' 'PA0001'.
      m_fieldcat 'PERSK' 'PA0001'.
      m_fieldcat 'BTRTL' 'PA0001'.
      m_fieldcat 'ABKRS' 'PA0001'.
      m_fieldcat 'ORGEH' 'PA0001'.
      m_fieldcat 'PLANS' 'PA0001'.
      m_fieldcat 'SCHKZ' 'PA0007'.
      m_fieldcat 'KOSTL' 'PA0315'.
      m_fieldcat 'LSTAR' 'PA0315'.
      m_fieldcat 'WERKS' 'PA0315'.
      m_fieldcat 'LIFNR' 'PA0315'.
      m_fieldcat 'EBELN' 'PA0315'.
      m_fieldcat 'EBELP' 'PA0315'.
      m_fieldcat 'LSTNR' 'PA0315'.
      m_fieldcat 'BEGDA' 'PA0001'.
      m_fieldcat 'ENDDA' 'PA0001'.
    Display the list
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program      = sy-cprog
          i_callback_user_command = 'USER_COMMAND'
          it_fieldcat             = lt_fieldcat
        TABLES
          t_outtab                = t_pa0001_pa0002.
    ENDFORM.                               " F_DISPLAY_DATA_VBAK
          FORM USER_COMMAND                                             *
    FORM user_command USING u_ucomm     TYPE syucomm
                            us_selfield TYPE slis_selfield.     "#EC CALLED
      CASE u_ucomm.
        WHEN '&IC1'.
          READ TABLE t_pa0001_pa0002 INDEX us_selfield-tabindex INTO
    w_pa0001_pa0002.
          CHECK sy-subrc EQ 0.
      ENDCASE.
    ENDFORM.                               " USER_COMMAND

    Hey,
    Look at ur code.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    i_callback_program = sy-cprog
    i_callback_user_command = 'USER_COMMAND'
    it_fieldcat = lt_fieldcat
    TABLES
    t_outtab = <b>t_pa0001_pa0002</b>.
    Here you're passing only the join table t_pa0001_pa0002. If you want to display the other tables as well, then u must have an internal table that has the columns of all the 3 tables. Then u need to buil;d the fieldcatalog accordingly and then display that table,
    Cheers,
    Sam

  • Setup table vs Update table

    Hi,
    What is the difference between the setup table and update table? Kindly clarify.
    I really appreciate all your help. Thanks.
    Regards,
    Jon.

    Hi
    <b>Update Tables :</b>
    Update tables are the intermediate tables which store data read from document tables. The V3 runs collects deltas in form of LUWs from these update tables and populates the delta queues.
    Update tables are use in V3 update scenario . It acts as staging before loading the delta queue . You can thought it as buffer , it continously refreshed , each time the v3 update takes place .Update table is used when u r loading the data through V3 update method . In this scenario it acts as a buffer between the r/3 and delta queue .. Everytime the v3 update takes place this tableis continuously refreshed ...
    Document tables are the actual application tables where the data is posted when you post a document in R/3.
    Examples can be MSEG, VBRK etc.
    Document tables MKPF/MSEG
    Update tables - VBHDR then V3 Update .

  • Slow update on 11g in conjuction with before update trigger

    Hello,
    I have strange problem - when on table exists before update trigger(in its body is nothing important, maybe problem is on other triggers aswell), then repeating update on this table is slower and slower on 11g, on 10g it is ok. Problem is on windows and linux platform aswell.
    I created some scripts to simulate this behavior, in table is 60 000 row. In one loop I update all 60 000 rows from table and measure time.
    Can someone tell me where problem is and if it is possible to manage it with some settings or anyway ? In our application it is big problem, similar operation takes days ......
    thanks tomas
    times for 10g:
    Trigger disabled
    Loop 1 - 6,13 secs
    Loop 2 - 2,92 secs
    Loop 3 - 3,19 secs
    Loop 4 - 2,95 secs
    Loop 5 - 3,39 secs
    Trigger enabled
    Loop 1 - 4,83 secs
    Loop 2 - 3,78 secs
    Loop 3 - 4,75 secs
    Loop 4 - 3,91 secs
    Loop 5 - 3,81 secs
    times for 11g:
    Trigger disabled
    Loop 1 - 2,27 secs
    Loop 2 - 2,4 secs
    Loop 3 - 2,3 secs
    Loop 4 - 2,42 secs
    Loop 5 - 2,36 secs
    Trigger enabled
    Loop 1 - 8,01 secs
    Loop 2 - 17,22 secs
    Loop 3 - 29,21 secs
    Loop 4 - 58,43 secs
    Loop 5 - 115,59 secs
    script for create test table
    CREATE TABLE SD3Test
       (MPID INTEGER NOT NULL ENABLE,
    ROWCOUNT NUMBER(10,0),
    CLOSEDROWCOUNT NUMBER(10,0),
    AMOUNT NUMBER(18,2) DEFAULT 0 NOT NULL ENABLE,
    LOCALAMOUNT NUMBER(18,2) DEFAULT 0 NOT NULL ENABLE,
    CLOSED CHAR(1 BYTE) DEFAULT 'N' NOT NULL ENABLE);
    ALTER TABLE SD3Test ADD CONSTRAINT SD3TestPK PRIMARY KEY (MPID);
    --fill test data
    DECLARE mCnt INTEGER;
    BEGIN
    mCnt := 0;
    FOR mCnt IN 1..60000 loop
      INSERT INTO SD3Test (MPID, Amount, LocalAmount, RowCount, ClosedRowCount)
      VALUES(mCnt, 0, 0, 0, 0);
    END loop;
    END;
    --create trigger
    CREATE OR REPLACE TRIGGER SD3TestAU
      BEFORE UPDATE ON SD3Test FOR EACH ROW
    DECLARE
    mInt INTEGER;
    BEGIN
      /*original code of our trigger, but performance problem is
    not depend on it, just depend on existence of this trigger
    IF ((:new.RowCount=:new.ClosedRowCount) and (:new.RowCount>0)) THEN
      :new.Closed:='A';
    ELSE
      :new.Closed:='N';
    end if;
    mInt := 1;
    END;
    / script for run test
    --test for updates with trigger disabled and enabled
    set serveroutput on;
    DECLARE
      mCnt INTEGER;
      mLoop INTEGER;
      mDisEna INTEGER;
      mStart NUMBER;
      mStop NUMBER;
    BEGIN
    --2 loops - first with disabled trigger, second with enabled trigger
    FOR mDisEna IN 1..2 loop
      IF mDisEna = 1 THEN
       execute immediate 'ALTER TRIGGER SD3TestAU disable';
       dbms_output.put_line('Trigger disabled');
      ELSE
       execute immediate 'ALTER TRIGGER SD3TestAU enable';
       dbms_output.put_line('Trigger enabled');
      END IF;
      -- 3 inner loops for measure time
      FOR mLoop IN 1..3 loop
        --update on all records in table
       mStart := dbms_utility.get_time;
       FOR mCnt IN 1..60000 loop
        UPDATE SD3Test
         SET
        ROWCOUNT = ROWCOUNT+1,
        CLOSEDROWCOUNT = CLOSEDROWCOUNT+1,
        AMOUNT = AMOUNT + mCnt,
        LOCALAMOUNT = LOCALAMOUNT + mCnt
        WHERE
         MPID = mCnt;
       END loop;
       mStop := dbms_utility.get_time;
       dbms_output.put_line('Loop ' || mLoop || ' - ' || round((mStop - mStart)/100,2) || ' secs');
      END loop;
    END loop;
    END;
    /

    Hello,
    Your case has been reported as a bug #7173924 (TRIGGER IS MUCH SLOWER IN 11G) few days ago.
    Still on analyze.
    Nicolas.

  • How to Track the changes made to the custom table field value

    I want to track the changes made to the custom table field value in table maintenance generator.please help me it is very urgent
    Thanks & Regards,
    Kranti

    Hi Satya,
    These are the steps you've to do.
    1. Enable the change document flag in the data element level for the fields of the tables you want to monitor.
    2. Go to transaction SCDO. Create a new change object, and add your table to this object. After generation, you'll get a function module.
    3. Call this function module in the table maintainence generator screen, after the data is saved to the database table. This function module automaticallly writes the changes, with the old and new values, and the fields that were changed to the tables CDHDR and CDPOS.
    4. You can keep track of the changes made to the table by monitoring these tables.
    Regards
    Anil Madhavan

  • Need a Query to update table from another table.

    I have two tables Table A and Table B , till now in table “A”. I have a column which consist of IDs and duplicate IDs( which are basically formed by Original Ids) , I have another table i.e. table “B” , which gives a mapping between original ids and duplicate Ids
    TABLE A:
    ID/DUPLICATEID      NAME
    1     Rahul
    1_CAD     Pawan
    2     Nikhil
    3     TOM
    3_CAD     Ravi
    3_MQ     Puneet
    TABLE B:
    ORIGINALID     DUPLICATEID
    1     1_CAD
    3     3_CAD
    3     3_MQ
    Now I want to have another column in Table “A” , which will give me the mapping between the original Id and duplicate Id as shown in updated table “A”.
    UPDATED TABLE A:
    ID/DUPLICATEID     NAME     ORIGINAL_ID
    1     Rahul     
    1_CAD     Pawan     
    2     Nikhil     
    3     TOM     
    3_CAD      Ravi     
    3_MQ     Puneet     
    Now I want to write a Query in which I can update this column (ORIGINAL_ID) of Table “A”, from the table B(basically want to update mulitple rows using single query), because table B already has this mapping. Can any one help me in this. I am basically a Java guy , so I don’t know much about it. I hope to get a positive response from you people, Thanks in advance!

    Here you go...
    <pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%">
    <code>
    SQL&gt; CREATE TABLE A (ID VARCHAR2(10), NAME VARCHAR2(10), NEW_ID VARCHAR2(10));
    Table created.
    SQL&gt; INSERT INTO A VALUES ('1', 'Rahul', '');
    1 row created.
    SQL&gt; INSERT INTO A VALUES ('1_CAD', 'Pawan', '');
    1 row created.
    SQL&gt; INSERT INTO A VALUES ('2', 'Nikhil', '');
    1 row created.
    SQL&gt; INSERT INTO A VALUES ('3', 'TOM', '');
    1 row created.
    SQL&gt; INSERT INTO A VALUES ('3_CAD', 'Ravi', '');
    1 row created.
    SQL&gt; INSERT INTO A VALUES ('3_MQ', 'Puneet', '');
    1 row created.
    SQL&gt; CREATE TABLE B (ID VARCHAR2(10), NAME VARCHAR2(10));
    Table created.
    SQL&gt; INSERT INTO B VALUES ('1', '1_CAD');
    1 row created.
    SQL&gt; INSERT INTO B VALUES ('3', '3_CAD');
    1 row created.
    SQL&gt; INSERT INTO B VALUES ('3', '3_MQ');
    1 row created.
    SQL&gt; COMMIT;
    Commit complete.
    SQL&gt; UPDATE A
    2 SET NEW_ID = NVL((SELECT B.ID FROM B WHERE A.ID = B.NAME),A.ID)
    3 /
    6 rows updated.
    SQL&gt; COMMIT;
    Commit complete.
    SQL&gt; SELECT * FROM A;
    ID NAME NEW_ID
    1 Rahul 1
    1_CAD Pawan 1
    2 Nikhil 2
    3 TOM 3
    3_CAD Ravi 3
    3_MQ Puneet 3
    6 rows selected.
    </code></pre>
    Note: While asking question do give us DML/DDL script. It will make peoples life better.
    Karthick.
    http://www.karthickarp.blogspot.com/

  • How to get the database table field names from program

    Hi,
    Can any one tell me,whether any function module is there which can get the table field name and its details ,when we pass database table name to it.
    Thanks in Advance
    <REMOVED BY MODERATOR>
    Regards
    Shibin
    Edited by: Alvaro Tejada Galindo on Feb 14, 2008 12:41 PM

    Hi,
    DD02L Table contains the SAP Tables.
    DD02T Table contains the SAP Table Texts.
    DD01L Table contains the Domains
    DD01T Table contains the Domain Texts.
    DD03L Table contains the Table Fields.
    DD03T Table contains the Table Field Texts. (Language Dependent)
    DD04L Table contains the Data Elements.
    DD04T Table contains the Data Element Texts.
    DD05s Table contains the Foreign Key Fields
    last words with L and T only. L->Database Fetch T-> Text
    For ur question use table DD03L or DD03T.
    Regards,
    Chandru

  • Create table field (not record) using ADDT software

    Hi,
    I wondered if anyone can give me detailed help on how to create a table field on-the-fly instead of creating records, using ADDT software.
    For Example:
    I have two tables.
    One table holds language names and codes, ie Australia and AU for the shortened code.
    The other table holds country descriptions, but each table field is the shortened country code (in this case AU)
    So what I want to do, is when I add a new language in the admin (ie, France) then it will create france in table 1, and also create the table field FR in table 2.
    I am not up on programming, so if anyone can detail as much as possible, you will be saving my bacon here.
    Many thanks
    Mark

    Hi.
    Sounds like what you need is a "foreign key" in the detail table that points to the id of the country in the country table.
    ADDT is perfect for this even if the documetation (and this klunky forum) is now third class.
    I suggest that you read this http://help.adobe.com/en_US/Dreamweaver/9.0_ADDT/help.html?content=MXK3_052000_MX_K3_cont rol_panel.htm
    Make special note of Step 2, item 5, second bullet point.
    (Note item 4 demonstrates the point about pathetic documentation)
    This would be applicable to your Detail Table that needs to have its foreign key pointing to the id of the country table.
    For example, consider two tables with these fields:
    Countries:
    id_cou (the record ID)
    name_cou (the name of the country)
    isocode_cou (the ISO code for the country eg: AU for OZ)
    Details:
    id_det (the record ID)
    idcou_det (the foreign key which is the ID in the Countries table - so this is an interger field - not a text field)
    detailfield1_det (some detail info)
    detailfield2_det (some more detail info)
    etc
    etc
    So in the Dynamic LIst Wizard for the Details list you make sure that the foreign key points to the primary key of the Countries record.
    Now, here is the neat thing: When you get to creating the form for the Details table the foreign key gets displayed as a menu showing the actual names of the countries listed in the countries table.
    Experiment with that and see how you go.

Maybe you are looking for

  • RFC hangs with a call to function module SSFC_PARSE_CERTIFICATE

    Hello , We are working on BI 7.0  SP9 . When we try to test the RFC connection from the WAS Abap to the portal ( WAS JAVA ) using  SM59  , the test is hanging but we can read in the bottom of the screen 'Connexion bcv51sf2... OK' !!! The test connect

  • How do I make Merge operation into the target table case insensitive?

    Hi All, We have a target table that has a varchar 2 column called nat_key and a map that copies over data from a source table into the target table. Based on wheteher the values in the nat_key column matches between the source and the target, an upda

  • TS3212 ITUNES download error for windows 8

         After I install itunes an error message pops up saying apple application support was not found. I have uninstalled and re installed 5 times and still the same message pops up.  Is there anyone else who has this problem?

  • Mac. brush preview not anti aliased.

    not sure if this is a bug, my friend recently bought a mac and is running CS6, the brush preview doesnt seem to be smooth as usual, as you can see the hardness is 50% and should have a soft edged preview display, but thats not occuring, and the brush

  • Harddrive backup

    what is the best external hard drive for macbook pro?