Code / Logic review

Hi All,
Please review the following code and logic used for uploading data by converting comma separated value column to multiple rows.
Tables Used.
create table temp_stg
(id number(16),
equip_name varchar2(200),
pcb1 varchar2(50),
pcb2 varchar2(50));
create table temp_org
(equip_name varchar2(200),
pcb varchar2(50));
insert into temp_stg
values (1, 'Equip1', 'PCB1 & PCB2', 'PCB3 & PCB4');
commit
I want the output of following records inserted into temp_org
Equip_name PCBS
Equip1 PCB1
Equip1 PCB2
Equip1 PCB3
Equip1 PCB4
Following is the PL/SQL code to do the same.
DECLARE
CURSOR cur_stg IS
select equip_name, pcb1 || '&' || pcb2 as pcbs
from temp_stg where id = 1;
rec_stg cur_stg%ROWTYPE;
PROCEDURE process_pcbs
IS
l_pcb_str VARCHAR2(500);
l_single_pcb VARCHAR2(50);
l_cnt PLS_INTEGER := 0;
BEGIN
l_pcb_str := rec_stg.pcbs;
while (length(trim(l_pcb_str)) > 0)
LOOP
IF instr(l_pcb_str,'&',1,1) > 0 THEN
l_single_pcb := substr(l_pcb_str,1,instr(l_pcb_str,'&',1,1));
l_pcb_str := substr(l_pcb_str, instr(l_pcb_str,'&',1,1));
ELSE
l_single_pcb := l_pcb_str;
l_pcb_str := NULL;
END IF;
INSERT INTO temp_org
VALUES (rec_stg.equip_name, l_single_pcb);
END LOOP;
COMMIT;
END process_pcbs;
BEGIN
OPEN cur_stg;
LOOP
FETCH cur_stg INTO rec_stg;
EXIT WHEN cur_stg%NOTFOUND;
IF rec_stg.pcbs IS NOT NULL THEN
process_pcbs;
END IF;
END LOOP;
CLOSE cur_stg;
EXCEPTION
WHEN OTHERS THEN
IF cur_stg%ISOPEN THEN CLOSE cur_stg; END IF;
RAISE;
END;
Thanks
Srini

Hi, Srini,
Srinivas_Reddy wrote:
Hi All,
Please review the following code and logic used for uploading data by converting comma separated value column to multiple rows.Code should always be formatted to show the range and structure of multi-line constructs (such as BEGIN... END or LOOP ... END LOOP),
When posting formatted text on this site, type these 6 characters:
{code}
(all lower-case letters, inside curly brackets) before and after sections of formatted text. Don't expect anyone to read your code if it's not formatted.
SQL was designed for handling sets of data. It's inefficient to run (and often more difficult to code) when you try to solve a problem like this by handling one row at a time. If you're INSERTing rows, try to add all the reos with a single INSERT statment, like the one below.
Thanks for posting the CREATE TABLE and INSERT statements.
You can do what you requested without PL/SQL:
INSERT INTO     temp_org (equip_name, pcb)
WITH    cntr     AS
     SELECT     LEVEL     AS n
     FROM      dual
     CONNECT BY     LEVEL <= 2 + ( SELECT  MAX ( LENGTH           ( pcb1 || pcb2 )
                                                       - LENGTH (REPLACE ( pcb1 || pcb2
                           FROM    temp_stg
SELECT     s.equip_name
,     TRIM ( REGEXP_SUBSTR ( s.pcb1 || '&' || s.pcb2
                           , '[^&]+'
                    , 1
                    , c.n
FROM     temp_stg    s
JOIN     cntr         c     ON     c.n     <= 2 + LENGTH          ( pcb1 || pcb2 )
                                  - LENGTH ( REPLACE ( pcb1 || pcb2
;There are good reasons for wanting to use PL/SQL. If you have one, then you can use an INSERT statement like this inside PL/SQL.
This solution does not assume that temp_stg has only one row.
Under some circumstances, such as if pcb1 or pcb2 is NULL, this may result in NULL pcbs being added to temp_org. If you don't want that, add a WHERE clause to the main query. (If you do, you'll probably find it easier to compute the new pcb in another sub-query, and test to see if that is NULL in the main query.)

Similar Messages

  • Color code logic not feasible in Pocket Browser

    Hi Team,
    We had a requirement in which we need to color the rows of SAP SRS application's ItemOverView table based on SalesOrder in a particular Purchase Order. My ex-colleague, did a solution with CellVariant that ran excellently well with Desktop applications.
    Client never tested this application in latest Mobile devices with the Pocket Browser and compatible OS.
    Now, when they tested it. First, I came to know that the standard functionality of SAP SRS MDE like GoFunctionKey is not working.
    Then, my onsite lead installed the Proper OS and Compatible Browser Pocket Browser and all the standard functionalities are working fine in SAP SRS MDE application.
    SAP had clearly mentioned to me that Cellvariant logic will not work with the Mobile Device and the Pocket Browser and also; I implemented the color code logic in the desktop application with cell design but the color code did not work with Cell Design and SAP also verified it.
    Now, please tell me how to differentiate the rows based on PO Number and the SalesOrder. They want it to be marked differently for one range and different for another range.
    OSS Message: ( 471108 / 2011 )
    17.06.2011 - 14:27:08 CET - Reply by SAP              
    Dear Kaushik,
    As mentioned in my reply dated:13.06.2011 14:28:53, yes the cell
    variants in the table UI is ignored., this is due to rich JavaScript
    and HTML support.
    Kindly close the message at your earliest.
    Thanks, Siraj
    OSS Message: ( 421670 / 2011 )
    SAP gave this link.
    https://websmp203.sap-ag.de/~sapidb/011000358700000304702008E
    UI Element Restrictions       Ignored Properties
    Table                                   design, enabled, readOnly, tooltip, width
    Thanks & Regards
    Kaushik Banerjee
    SAP Portal

    Not sure if you want to apply the blue/teal color to the name of the executive or the whole first paragraph, but you could try the following for just the name color change.
    Add this style rule:
    span.name {color: #258dbe; font-weight:bold;}
    and then for the html:
    <p><span class="name">Sandra Kozusko, President & CEO,</span> started her training and consulting career in 1988.  With more than 20 years experience in the design, development and delivery of leadership, price and profit management, change management, customer service, sales, retention, operations and technical training programs, Mrs. Kozusko has held various teaching positions at Union County College, Edison Township Adult School of Education, and The Cittone Institute.</p>
    This will change the title of the executive to blue.
    As for divs and classes... the important thing to remember is that you can use an ID (#nameofdiv) once per page, but a class can be used as many times as you like per page.

  • Sales Order - Project code logic

    Hi,
    I am trying to create a project/networks based on some conditions in the sales order (VA01/VA02) program. I would like to know where exactly the code logic for project creation is there in the sales order program SAPMV45A.
    Regards
    Sujay

    Hi,
    if a particular condition type has been defind as
    Cond. class           D         
    Calculat.type         A
    Cond.category      D
    THEN SYSTEM WILL ASK FOR TAX CODE.
    CHECK IF FOR ANY CONDITION TYPE YOU HAVE MAINTAINED THIS COMBINATION.
    THEN YOU CAN CHECK IN THE CONDITION RECORDS WHETHER ANY TAX CODE HAS BEEN ASSIGNED THER OR NOT.
    REGARDS
    RAVI

  • BW-ABAP start routine code logic

    Hello friends,
    I am writing start rotine code between ODS and InfoCube.I need your help determining the right logic.
    Requirement is as follows.
    1. Create one database table to store GL account ranges.
    2. This table will have multiple ranges of GL account.
    3. Write a code such a way that only GL acc. range in this table is included and  
        all the other records containing GL acc. outside this range should be deleted.
    Here is the logic which I have developed.
    Please help me with your suggestion.
    Message was edited by:
            John Anderson

    Hi John,
       I did not check the syntax of this program and I am very bad at remembering the syntax. Let me know if you face any problem with the code I am supplying.
    Code removed ....
    Best Regards,
    Kazmi
    Message was edited by:
            Kazmi

  • How to view the code/logic for the built-in oracle functions

    Hi,
    How can we view the logic behind the oracle supplied built-in functions like LAST_DAY , MONTHS_BETWEEN etc.,
    I tried to view the same using the sys.STANDARD package , the observations are given below
    function LAST_DAY(RIGHT DATE) return DATE;
    pragma BUILTIN('LAST_DAY',38, 12, 12); -- PEMS_DATE, DATE_LAST_DAY
    pragma FIPSFLAG('LAST_DAY', 1450);
    Regards
    Lok

    How can we view the logic behind the oracle supplied built-in functions like LAST_DAY , MONTHS_BETWEEN etc., You cannot. These built-ins, are 'built-in'.... As far as I know they are implemented in Oracle's kernel, as C code.

  • Abap code Logic for splitting is not working

    Hi,
    I have a requirement to split a single amount and product into several parts. so far my logic is not working as only the first row is being fetched.
    TYPES: BEGIN of map_tab,
             ZPRODH4 TYPE NEWMAPPINGTABLE-/BIC/ZNEW_MP,
             ZSPRATIO TYPE NEWMAPPINGTABLE-/BIC/ZSP_RATIO,
             ZMATERIAL TYPE NEWMAPPINGTABLE-MATERIAL,
           END OF map_tab.
    Data:IT_MAP_TAB TYPE HASHED table of MAP_TAB with unique Key ZPRODH4,
         wa_it_map_tab like line of IT_MAP_TAB.
    Data rp TYPE _ty_s_TG_1.
    LOOP AT RESULT_PACKAGE into rp.
    Clear wa_it_map_tab.
    read table IT_MAP_TAB into wa_it_map_tab with table key ZPRODH4 =
    rp-prodh4.
    IF sy-subrc EQ 0.
    select SINGLE /BIC/ZNEW_MP /BIC/ZSP_RATIO MATERIAL into corresponding
    fields of wa_it_map_tab from NEWMAPPINGTABLE
    where  PRODH4 = rp-PRODH4.
    IF sy-subrc EQ 0.
      rp-PRODH4 = wa_it_map_tab-ZPRODH4.
      rp-AMOUNT = rp-AMOUNT * wa_it_map_tab-Zspratio.
      rp-MATERIAL = wa_it_map_tab-ZMATERIAL.
    ENDIF.
    ENDIF.
    MODIFY RESULT_PACKAGE FROM rp.
    ENDLOOP.
    <br><br>
    This is how my tables looks like
    Source Table
    PROD                                       AMOUNT
    900006600999                          1000
    400004400000                           500
    NEW MAPPING TABLE
    PROD                                      NEWPROD                      MATERIAL                             SPLITRATIO
    900006600999                         1000066001111                    7000                                         0.5
    900006600999                         1000066002222                    7001                                         0.4
    900006600999                         1000066003333                    7002                                         0.1
    OLD MAPPING TABLE
    PROD                              MATERIAL
    4000044000000               7100
    TARGET TABLE
    PROD                        PROD3               MATERIAL        AMOUNT
    1000066001111         100006600            7000                 500            
    1000066002222         100006600            7001                 400          
    1000066003333         100006600            7002                 100
    4000044000000         400004400            7100                 500

    Hi,
    I rewrote the code the like this and it is still not working as the new value is not being fetched.
    {* TABLES: ...
    Defining tables
    Tables: /BIC/OLDTABLE,/BIC/NEWTABLE.
    $$ end of global - insert your declaration only before this line -
    The follow definition is new in the BW3.x
    TYPES:
    BEGIN OF DATA_PACKAGE_STRUCTURE.
    INCLUDE STRUCTURE /BIC/CS8ZSEM_TC03.
    TYPES:
    RECNO LIKE sy-tabix,
    END OF DATA_PACKAGE_STRUCTURE.
    DATA:
    DATA_PACKAGE TYPE STANDARD TABLE OF DATA_PACKAGE_STRUCTURE
    WITH HEADER LINE
    WITH NON-UNIQUE DEFAULT KEY INITIAL SIZE 0.
    New Material table
    DATA: BEGIN OF I_S_NEWTAB,
    PRODH4 TYPE /BIC/NEWTABLE-PRODH4,
    /BIC/ZNEW_MP TYPE /BIC/NEWTABLE-/BIC/ZNEW_MP,
    /BIC/ZSP_RATIO TYPE /BIC/NEWTABLE-/BIC/ZSP_RATIO,
    MATERIAL TYPE /BIC/NEWTABLE-MATERIAL,
    END OF I_S_NEWTAB.
    Data: i_t_newtab LIKE TABLE OF I_S_NEWTAB.
    *Old Material table
    DATA: BEGIN OF I_S_OLDTAB,
    PRODH4 TYPE /BIC/OLDTABLE-PRODH4,
    MATERIAL TYPE /BIC/OLDTABLE-MATERIAL,
    END OF I_S_OLDTAB.
    DATA: i_t_oldtab like table of I_S_oldTAB.
    data: e_s_result type STANDARD TABLE OF DATA_PACKAGE_STRUCTURE WITH
    HEADER LINE
    WITH NON-UNIQUE DEFAULT KEY INITIAL SIZE 0.
    data: e_t_result type STANDARD TABLE OF DATA_PACKAGE_STRUCTURE WITH
    HEADER LINE
    WITH NON-UNIQUE DEFAULT KEY INITIAL SIZE 0.
    data: amount type DATA_PACKAGE_STRUCTURE-/BIC/AMOUNT.
    data: CUSTSOLD type DATA_PACKAGE_STRUCTURE-/BIC/CUSTSOLD.
    selecting data from new table
    Select PRODH4 /BIC/ZNEW_MP /BIC/ZSP_RATIO MATERIAL FROM /BIC/NEWTABLE
    into corresponding fields of table i_t_newtab.
    SORT i_t_newtab by PRODH4.
    Selecting data from old material table
    Select PRODH4 MATERIAL FROM /BIC/OLDTABLE into corresponding fields
    of table i_t_oldtab.
    SORT i_t_oldtab by PRODH4.
    LOOP AT DATA_PACKAGE INTO e_s_result.
    read table i_t_oldtab into i_s_oldtab with key PRODH4 =
    e_s_result-PRODH4.
    if sy-subrc EQ 0.
    MOVE i_s_oldtab-PRODH4 to e_s_result-PRODH4.
    MOVE i_s_oldtab-PRODH4(14) to e_s_result-PRODH3.
    MOVE i_s_oldtab-MATERIAL to e_s_result-MATERIAL.
    APPEND e_s_result to e_t_result.
    ELSE.
    LOOP AT i_t_newtab into i_s_newtab where PRODH4 = e_s_result-PRODH4.
    amount = i_s_newtab-/BIC/ZSP_RATIO * e_s_result-/BIC/AMOUNT.
    CONCATENATE DATA_PACKAGE-SOLD_TO i_s_newtab-PRODH4(10) into AMOUNT.
    MOVE i_s_newtab-/BIC/ZNEW_MP to e_s_result-PRODH4.
    MOVE i_s_newtab-MATERIAL to e_s_result-MATERIAL.
    MOVE i_s_newtab-/BIC/ZNEW_MP(14) to e_s_result-PRODH3.
    MOVE amount to e_s_result-/BIC/AMOUNT.
    MOVE ZASTUOTE to e_s_result-/BIC/CUSTSOLD.
    APPEND e_s_result to e_t_result.
    ENDLOOP.
    ENDIF.
    ENDLOOP.
    REFRESH DATA_PACKAGE.
    MOVE e_t_result to DATA_PACKAGE[].}

  • Code Expert - Review Tool for PL/SQL

    Hi All,
    Please provide me some information on the Code Expert Tool(used for reviewing PL/SQL code).
    Thanks in advance.

    user597888 wrote:
    Please provide me some information on the Code Expert Tool(used for reviewing PL/SQL code).Any such s/w tool can only provide superficial information about how well that code is, that the tool is "+reviewing+".
    If such a s/w tool is clever and enough to review code "expertly".. it should by the same token be expert enough to write code.
    I have yet to see a tool clever and expert enough to write proper code.

  • T-Codes Logic

    Dear All
    Can u tell me the logic of T-Codes for remembaring.
    Thanks in Advance
    Parth

    Hi
    For Easy Identifying and remembaring the T Codes
    For Master data related
    For Gl related "S" indicates GL Master  postings ex: FS00
    For Customer related  "D" indicates Customer Master ex: XD01, FD01
    For Vendor related "K" indicates Vendor related ex: XK01, FK01
    For Asset Accounting
    Starts with "A" Indicator ex: AS01 & AS11
    For Transaction Data double entry system
    Starts with Number F-01 to F-20 GL postings
    Starts with F-20 to F-40 Customer postings
    Starts with F-41 to F-59 Vendor postings
    Starts with F-90 Asset postings
    If any input required pl....
    Rgds
    Vani

  • Help in abap code logic

    hallow
    i have two tables that i wont to move the data(price) to third table itab
    i wont to now how i can do that?
    <b>i reward kindly</b>
    i give the tabls.
    INTAB_A132[]
    resrc             date             knumh
    0000123456 20070101 0000014834
    0000123456 20070601 0000014835
    2) intab_konp
    knumh (key)     kbetr(price)    
    0000014834   200000.00
    0000014834   250000.00
    this is what i have in table zempkostlprice_rec and i wont to add price colman
    zempkostlprice_rec
    rserc                date
    1 0000123456 012007
    2 0000123456 022007
    3 0000123456 032007
    4 0000123456 042007
    5 0000123456 052007
    6 0000123456 062007
    7 0000123456 072007
    8 0000123456 082007
    9 0000123456 092007
    10 0000123456 102007
    11 0000123456 112007
    12 0000123456 122007
    13 0000123456 012008
    this is what i wont to add price colman to thired table from intab_konp
    u can see that price have to be change after 01062007 to 250000
    resrc                   date             price
    <b>1 0000123456  012007             20000.00</b>
    2 0000123456      01022007         20000.00
    3 0000123456     01032007        20000.00
    4 0000123456     01042007         20000.00
    5 0000123456     01052007          20000.00
    <b>6 0000123456  01062007         250000.00</b>
    7 0000123456     01072007          250000.00
    8 0000123456     01082007          250000.00
    9 0000123456     01092007         250000.00
    10 0000123456   01102007          250000.00
    11 0000123456    01112007         250000.00
    12 0000123456   01122007          250000.00
    13 0000123456   01 012008        250000.00
    hi itry with that code  but its not working i get in colman 2000000 in all rows
    i thihk i have to take care in dates but i dont now how?
    regards
    LOOP AT zempkostlprice_rec INTO wa_zem.
    READ TABLE intab_a132 INTO wa_intab_a132 WITH KEY resrc = wa_zem-resrc.
    READ TABLE intab_konp INTO wa_intab_konp WITH KEY knumh = wa_intab_a132-knumh.
    IF sy-subrc = 0.
    wa_zem-kbetr = wa_intab_konp-kbetr.
    MODIFY zempkostlprice_rec FROM wa_zem TRANSPORTING kbetr.
    ENDIF.
    ENDLOOP.

    Create a new zprogram and put this code and check the values of internal tables in debugging mode
    the price value chages according to knumh value becoz u have given intab_konp table which has common knumh so using this field only we can modify in ur zemp* table.
    REPORT  ZSHYTAL.
    TYPES: BEGIN OF t_a132,
    resrc LIKE a132-resrc,
    kostl LIKE a132-kostl,
    datbi LIKE a132-datbi,
    datab LIKE a132-datab,
    knumh LIKE a132-knumh,
    END OF t_a132.
    TYPES: BEGIN OF t_konp,
    knumh LIKE konp-knumh,
    kstbm LIKE konp-kstbm,
    kbetr LIKE konp-kbetr,
    konwa TYPE konp-konwa,
    END OF t_konp.
    types: begin of t_zemp,
            RESRC like a132-resrc,
            KOSTL LIKE a132-kostl,
            kstbm LIKE konp-kstbm,
            konwa TYPE konp-konwa,
            kbetr LIKE konp-kbetr,
            knumh LIKE konp-knumh,
          END OF t_zemp.
    DATA: intab_konp TYPE TABLE OF t_konp WITH HEADER LINE .
    DATA : intab_a132 TYPE TABLE OF t_a132 WITH HEADER LINE .
    data: it_zemp type TABLE OF t_zemp WITH HEADER LINE.
    it_zemp-resrc = '0000123456'.
    it_zemp-knumh = '0000014834'.
    APPEND it_zemp.
    it_zemp-resrc = '0000123456'.
    it_zemp-knumh = '0000014834'.
    APPEND it_zemp.
    it_zemp-resrc = '0000123456'.
    it_zemp-knumh = '0000014835'.
    APPEND it_zemp.
    intab_a132-resrc = '0000123456'.
    intab_a132-knumh = '0000014834'.
    intab_a132-datbi = '20070531'.
    intab_a132-datab = '20070101'.
    APPEND intab_a132.
    intab_a132-resrc = '0000123456'.
    intab_a132-knumh = '0000014835'.
    intab_a132-datbi = '200701231'.
    intab_a132-datab = '20070601'.
    APPEND intab_a132.
    intab_konp-knumh = '0000014834'.
    intab_konp-kbetr = '20000'.
    APPEND intab_konp.
    intab_konp-knumh = '0000014835'.
    intab_konp-kbetr = '25000'.
    APPEND intab_konp.
    clear: intab_konp, intab_a132, it_zemp.
    LOOP at it_zemp. "into wa_zemp.
      READ TABLE intab_a132 WITH KEY resrc = it_zemp-resrc.
      READ TABLE intab_konp WITH key knumh = it_zemp-knumh.
      if sy-subrc eq 0.
        move intab_konp-kbetr to it_zemp-kbetr.
        modify it_zemp." from wa_zemp.
      ENDIF.
    endloop.

  • Need code logic

    Hi
    I need help in interactive ALV Repot. When i executed the report, it is displaying the material Doc number ,material etc in grid layout.
    my requirement is , when i double click on material Document number , it has to show the sales order number, salesorder item and Delivery number. Same thing is required for when i click on material also.
    please help me in this.
    regards,
    Ram

    Hi
    see the sample code for one field double clicking
    FORM user_command USING r_ucomm     LIKE sy-ucomm
                            rs_selfield TYPE slis_selfield.
      DATA: index TYPE i,
            w_disp_head LIKE LINE OF t_disp_head,
            w_door LIKE likp-lgtor.
      CASE r_ucomm.
        WHEN 'PICK'. " Double click line
          IF ( rs_selfield-fieldname = 'MBLNR' or
               rs_selfield-fieldname = 'MATNR' ).
        Read data table, using index of row user clicked on
      Read the internal table in which these fields are there.
    take that records corresponding EBELn and EBELP fields for that MATNR or MBLNR fields
            READ TABLE t_disp_tab INTO wa_item_tab INDEX
                              rs_selfield-tabindex.
          fetch the sales order no and item data from EKKN table by passing the PO no and PO item
         <wa_item_tab-ebeln and wa_item_tab-ebelp>
    display the data using an internal table or in another ALV.
    endcase.
    endform..
    Reward points if useful
    Regards
    Anji

  • Changes in material code logic

    Dear SAP Gurus,
    Since last 4 years we are using alpha neumeric material coding but because of this we are facing lot of problems so we are thinkinking to make material coding numeric only. Is there any way that we can change entire material codes into numeric coding & what about previous records. Or only new code we can make numeric & existing will remain as it is. Please suggest
    Jayesh
    SAP PP

    Before Going to change Think that change is feasible or not
    Once the old material code is deleted and archived means , You can't able to get the past reports.
    My suggestion Use the same old format for easy understanding ( Alpha numeric means  You can easily Identifywhether it is Finished ,Sf, Rm Or spares.)
    Or otherwise use the Old material code as itis  and create anew material code with Number( check with MM consultant)
    Regards,
    Sundaresan

  • Require Fox-code logic for this scenario

    Hi folks,
    I have a multi-planning area consisting of one budget-planning cube and one actual cube. I am tryig to create a planning function using a Fox formula where-in  i need to map each Liquidity item in Actual cube with multiple fund centres in Budget cube and finaly save the data in budget cube.
    Can anyone please provide Fox- code for the above scenario?
    thanks in advance
    regards
    Peter

    Hi,
    What is the problem with the FOX?. Please provide more detail about what you want to do.

  • Fox Code logic for Object GUID

    Dear Folks,
    I have a requirement as below:
    I have a straight line depreciation calculation for 5 years.
    Problem is when i copy data from one fiscal year to another for same version,i dont get correct depreciation values.Reason for that is:
    for example
    jan 2014 i have amount  say 100.
    The same is coppied to Jan 2015.
    My logic is the depreciation should be calculated from feb 2014 going forth for 5 years on monthly basis.
    Same should be the case for coppied record i.e. Depreciation for Jan 2015 record should be initiated from Feb 2015 for remaining periods of 5 years.
    This is not happening.I executed the trace and could find out that depreciation for Jan 2014 record is calculated till Jan 2015 and for rest of the periods its considering the reference of Jan 2015 record and executing the calculation.
    This is because same Object Guid generated at the time of Copying data as it exists in character relationship which acts as key for that block.
    need your advice on this.
    Thanks,
    Dear All,
    Could anyone please provide some light on this as i have given several tries by different logic but ending up with same result

    Hi,
    What is the problem with the FOX?. Please provide more detail about what you want to do.

  • Suggest me a code logic to find the below Result.

    I have an account details table which contains start_dat and End_dat.
    For one account there are n no of account details.
    Start_dat for any accountdetail must greater than end date.(it must be started first then it can be ended ..basic logic) . But in the accountdetails table there are certain record where the end_dat is greater than start date.
    I want to check.
    start_date end_date
    08/02/01 08/02/01
    10/02/01 11/02/01
    12/02/01 11/02/01 -----> Here i want to trap this record..
    12/02/01 13/02/01
    12/02/01 16/02/01
    14/02/01 15/02/01. ----- > Last record must have null end date.
    If i found such case then i need to update
    start_Dat End_date
    08/02/01 08/02/01
    10/02/01 11/02/01
    12/02/01 12/02/01 ----> close the account with same start date
    13/02/01 13/02/01 -----> Increment the start date by End_dat+1
    14/02/01 14/02/01 -----> close the account with same start date
    15/02/01 Null ------> Update null in the last Enddat.

    Boss,
    Is this your production data? I hope not....because if it is, that is a mess and more importantly, the way you are planning to "clean it up" is even more dangerous.
    Make sure you know how you are planning to tally your updated data (provided you are able to update it LOGICALLY) with the original source.

  • I need the following form code logics?

    1)how to disable a field?
    2)code for submit button?
    Plz reply with the code if anyone knows . . .

    So, when you say "submit", you mean "execute a query"? If so, you shoulkd do the following:
    Create a block based on your table containing the data you want to show. Use the datablock wirzard to do so.
    In your button, put code like
    GO_BLOCK('YOURBLOCK');
    EXECUTE_QUERY;
    If you have a searchfield in another block and you want to use that as search-criteria, edit the block-properties for your block and add something like this in the property WHERE-clause:
    TABLE_COLUMN=:SEARCHBLOCK.SEARCHITEM

Maybe you are looking for

  • Eliminar item de Requisição com pedido de compra associado

    Bom dia. Trabalho em SAP diáriamente,nomeadamente em ERP Produção. O que gostaria de saber era se existe alguma possiblidade de eliminar um item de uma requisição de compra, estando essa requisição de compra associada a um pedido de compra? Por exemp

  • How do I add a google searchbox to the top bar?

    I have the beta test version of Firefox and my Google toolbar is not compatible. I now how no search box in my toolbar, and want a Google one, and cannot find how to do it. This is on my work PC. On my home Mac, the Google search box disappeared and

  • HDV CS3 Project to SD Encore CS3

    I have a HDV sequence I've edited in PPro CS3. I want to export the sequence to Encore CS3 in standard definition. What is the best way to accomplish this? Option 1: Export the HDV sequence from PPro to an uncompressed DV AVI in Widescreen format at

  • Issue while installing fresh Windows XP on Tecra 9000

    I have a Tecra 9000 running Linux. I would like to Install windows XP but the Installation CD I have loads drives and then locks up at windows is loading screen. I don't have any recovery or driver disks for this computer as I bought it used. and I d

  • DATE datatype in USER PARAMETER

    i'm now using forms6.0 and a date user parameter is still problematic. can't reference it as a date !!!? e.g.: user parameter P_DATE, datatype=date; pl/sql for after paramform has: declare var_date date := :P_DATE; runtime gives you: REP-1401: 'after