Problems in creating (working) DataControl

Hi,
I have written a Customer class with name, age and email attributes. Next I wrote a CustomersService that has a "List getAllCustomers()" method and return a hardcoded list of 5 customer objects.
When I try to create a DataControl from the CustomerService, it doesn't look like it is working ok. It creates a data control but only shows a single attribute "element" instead of the attributes of the Customer class. I've modified the BeanClass from CustomerService to Customer but it didn't work.
Thanks,
/t

Hi,
I reproduced it with an ArrayList that returns a list of object and it works. It seems that the data control cannot resolve the structure of the list. try create the files below and build you DataControl again
package beanprj;
public class PersonClass
private String name;
private int age;
public PersonClass()
public void setName(String name)
this.name = name;
public String getName()
return name;
public void setAge(int age)
this.age = age;
public int getAge()
return age;
package beanprj;
import java.util.ArrayList;
public class PeopleBean
private ArrayList people = new ArrayList();
public PeopleBean()
int i = 0;
for (i = 0; i < 4; i++)
PersonClass p = new PersonClass();
p.setName("ORCL"+i);
p.setAge(30+i);
people.add(p);
public void setPeople(ArrayList people)
this.people = people;
public ArrayList getPeople()
return people;
Create the datacontol from PeopleBean
Frank

Similar Messages

  • Problem while creating work centre

    Dear friends when i am creating work centre i am facing problem in entering activity types. The error message occurs as activity type was planned in fiscal year 2008 as non allocatable. Can any body help me please

    Dear Vijay,
    While assigning the activity type,just confirm whether the activity type which you are trying to use in the work centre has got a rate for
    that cost center (assigned in the work center).
    In T code KP26,a rate will be assigned for the cost center+activity type combination.
    1.Check the valid from date of the cost centre and work center.
    2.Cost center's will be created in T code KS01.
    3.Activity types will be created in T code KL01.
    4.Assign rate for activity types to cost centre in KP26 for the financial period 2008.
    Regards
    Mangalraj.S

  • Problem in creating work center using bapi

    hai all,
    i am creating work center using " CRAP_WORKCENTER_CREATE ", it is also getting created successfully when I try to check CAPACITY for capacities and scheduling it is giving a error called.
    " in table T006 entry is missing " . why it is comming like that.

    Hi Goutam/Ram,
        I am trying to create capicity . I am useing CRAP_CAPACITY_CREATE .
       But I am getting so many errors. Is it the right Bapi or do know any other BAPI.
       We are trying to copy Capacities and work center from one plant to other.
    Plz send if you any documentation or code. Also send work order creating code.
    Thanks in Advance.

  • Error while creating work repository

    Hi all,
    I am facing problem while creating work repository in ODI.
    I have successfuly created master repository and also test connection comes out to be succesull for work repository.
    But while i click on OK it gives CREATION error stating
    No data found : \snps_login_security.xml(Access is Denied)
    Thanks and Regards,
    Priyanka

    Hi ,
    u r having Oracle DB......?
    You have the databases and ODI installed in the same machine.....?
    Have u chkd ur databse/schema rigts .....
    can u plz chk on this front .....as well as the user/pw ur using for ur connections.....
    Thanks
    Ananda

  • Facing problem in creating socket in a method from an already deployed application exe while same method is working from another exe from same environment from same location.

    Dll Created In: - MFC VC
    6.0
    Application Exe Developed In:
    - VC 6.0, C# and VB.net (Applications which are using dll)
    OS: - Windows XP sp2 32bit
    / Windows Server 2008 64 bit
    Problem: - Facing problem in creating socket
    in a method from an already deployed application exe while same method is working from another exe from same environment from same location.
    Description: - We have product component which
    has an exe component and from exe we invoke a method, which is defining in dll, and that dll is developed in MFC VC6.0. In the dll we have a method which downloads images from another system after making socket connection. But every time we are getting Error
    code 7, it is not giving desire result while same method is working from another exe from same environment from same location. And also me dll is deployed on many systems and giving proper output from same application.
    Already Attempt: - Because error is coming on
    client side so what we did, we created a driver in C# which invokes same method from same environment(on client machine) using same dll and we are astonished because it worked fine there.
    Kindly Suggest: -
    We are not able to figure out root cause because nothing is coming in windows event logs but what I did, for finding the problem line, I wrote logs on each line and found the exact line in application exe which is not working,
    actually  it is not executing Create () method,
    I will give snippet of the code for understanding the problem because we are not finding any kind solution for it.
    Kindly assist us in understanding and fixing this problem.
    Code Snippet: -
    Int Initialize (LPTSTR SiteAddress, short PortId)
    try
    CClientTSSocket *m_pJtsSockto;
    m_pJtsSockto = new CClientTSSocket;
    LONG lErr = m_pJtsSockto->ConnectTS(csIPAddress,PortId);
    ErrorLog (0, 0, "--------ConnectTS has been called ------------","" );
    catch(...)
    DWORD errorCode = GetLastError();
    CString errorMessage ;
    errorMessage.Format("%lu",errorCode);
    ErrorLog (0, 0, "Image System", (LPTSTR)(LPCTSTR)errorMessage);
    return  IS_ERR_WINDOWS;
    Note: -
    CClientTSSocket extends CAsyncSocket
     IS_ERR_WINDOWS is a macro error code which value I found 7.
    LONG ConnectTS(CString strIP, UINT n_Port)
    ErrorLog(0,0,"ConnectTS is calling Create [is going to call]","");
    if(!Create())
    ErrorLog(0,0,"ConnectTS is calling [Create not called successfully] ","");
     n_Err = GetLastError();
     ErrorLog(n_Err,0,"ConnectTS is calling1111111111111111Erorrrrrrrrrrrrr","");
    return NET_INIT;
    ErrorLog(0,0,"ConnectTS is calling2222222222222222222","");
    if(!AsyncSelect(0))
    n_Err = GetLastError();
    return NET_INIT;
    if(!Connect(strIP,n_Port))
    n_Err = GetLastError();
    ErrorLog(n_Err,0,"ConnectTS","");
    return SERVER_NOT_CONNECTED;
    Code description: -
    From
    int GETImage_MT() method we call Initialize() method and pass client machine IP and Port and there we call
    ConnectTS() method, In this method we Create() method and finally it returns the error code as mention in macro 7.
    Logs after running the program: -
    --------ConnectTS has been called ------------
    ConnectTS is calling Create [is going to call]
    Image System 
    0
    Note: - According to logs, problem is coming in Create method().
    Here 0 is errorMessage received in catch block. And from catch block it returns macro value 7. And when we run same method individually from same machine, same environment through same dll
    from different exe, it is working fine and we are facing any kind of problem. While same problem application was working properly earlier but now continuously it showing problem.
     Kindly assist us to resolve the issue.

    Pointer variable was already initialized; I have mention in code; kindly assist us.
    Dll Created In: - MFC VC 6.0
    Application Exe Developed In: - VC 6.0, C# and VB.net (Applications which are using dll)
    OS: - Windows XP sp2 32bit / Windows Server 2008 64 bit
    Problem: - Facing problem in creating socket
    in a method from an already deployed application exe while same method is working from another exe from same environment from same location.
    Description: - We have product component
    which has an exe component and from exe we invoke a method, which is defining in dll, and that dll is developed in MFC VC6.0. In the dll we have a method which downloads images from another system after making socket connection. But every time we are getting
    Error code 7, it is not giving desire result while same method is working from another exe from same environment from same location. And also me dll is deployed on many systems and giving proper output from same application.
    Already Attempt: - Because error is coming
    on client side so what we did, we created a driver in C# which invokes same method from same environment (on client machine) using same dll and we are astonished because it worked fine there.
    Kindly Suggest:
    - We are not able to figure out root cause because nothing is coming in windows event logs but what I did, for finding the problem line, I wrote logs on each line and found the exact line in application exe which is not
    working, actually it is not executing Create () method, I will give snippet of the code for understanding
    the problem because we are not finding any kind solution for it. Kindly assist us in understanding and fixing this problem.
    Code Snippet: -
    Int Initialize (LPTSTR SiteAddress, short PortId)
    try
    CClientTSSocket *m_pJtsSockto;
    m_pJtsSockto = new CClientTSSocket;
    LONG lErr = m_pJtsSockto->ConnectTS(csIPAddress,PortId);
    ErrorLog (0, 0, "--------ConnectTS has been called ------------","" );
    catch(...)
                       DWORD errorCode = GetLastError();
                       CString errorMessage ;
                       errorMessage.Format("%lu",errorCode);
                       ErrorLog (0, 0, "Image System", (LPTSTR)(LPCTSTR)errorMessage);
                       return  IS_ERR_WINDOWS;
    Note: - CClientTSSocket extends CAsyncSocket
     IS_ERR_WINDOWS is a macro error code which value I found 7.
    LONG ConnectTS(CString strIP, UINT n_Port)
              ErrorLog(0,0,"ConnectTS is calling Create [is going to call]","");
              if(!Create())
                       ErrorLog(0,0,"ConnectTS is calling [Create not called successfully] ","");
              n_Err = GetLastError();
              ErrorLog(n_Err,0,"ConnectTS is calling1111111111111111Erorrrrrrrrrrrrr","");
                      return NET_INIT;
              ErrorLog(0,0,"ConnectTS is calling2222222222222222222","");
              if(!AsyncSelect(0))
                       n_Err = GetLastError();
                       return NET_INIT;
              if(!Connect(strIP,n_Port))
                       n_Err = GetLastError();
                       ErrorLog(n_Err,0,"ConnectTS","");
                       return SERVER_NOT_CONNECTED;
    Code description: - From int GETImage_MT() method
    we call Initialize() method and pass client machine IP and Port and there we call ConnectTS() method, In
    this method we Create() method and finally it returns the error code as mention in macro 7.
    Logs after running the program: -
    --------ConnectTS has been called ------------
    ConnectTS is calling Create [is going to call]
    Image System  0
    Note: - According to logs, problem is coming in Create method(). Here
    0 is errorMessage received in catch block. And from catch block it returns macro value 7. And when we run same method individually from same machine, same environment through same dll from different exe, it is working fine and we are facing any kind of problem.
    While same problem application was working properly earlier but now continuously it showing problem.
     Kindly assist us to resolve the issue.

  • Problem while Creating Service order through Work Order

    Hi Gurus,
    I have a problem While creating Service order (me21n) through - Work order it contains service requisitions.
    So that means they carry information such as G/L and work order number while entering the requistion no in PO Creation Screen (me21n)  which automatically should be picked from the work order refference.
    But problem here is the service items and all other are assigned to PO except the Account Assingnment tab which is GL Account and Work Order No and Cost center..
    Can anyone explain me this?
    Is this something that one can explain?
    Regards,
    Murugesh R
    Rewards for value replies.

    Closed..

  • Problem in creating part time work schedules

    Hello All,
    I have to create some part time work schedules rules for part time employees
    Work: Tuesdays to Fridays
    a)Tues-Thurs 6.5 hours per day   i.e. 9.30 to 5
      9:30 u2013 14:30 work
      14:30 u2013 15:30 - 1hr lunch break
       3:30 u2013 17:00
    b) Friday - 7 hours (9:30 to 14:30)
    Total hours per week are= 26.5
    1) I created one fixed break schedule 14:30 u2013 15:30 (unpaid)
    2) I created 2 Daily work schedules
    Tuesday to Thursday u2013 NOR & (created variant A)
    Only Friday u2013 NOR1
    3) I created one Period work schedule u2013
    P/Time u2013 Mon is FREE, Tue to Thursday as NOR , Fridayas NOR1 & Sat, Sun as FREE
    4) When I try to create Work schedule rule I got stuck in between:
    I configured weekly working hours as 26.5
    I configured monthly & annually working hours.
    But  I had problem to put daily working hours???
    because Tue u2013 Thurs are 19.5 hours (6.5 into 3) & Friday (7Hrs) =26.5
    Hence how to I club both the working patterns in one Work schedule rule???
    Please help me out in same
    Regards,
    Nithi

    niti
    actually i dont have SAP Login here
    in the Table V_T508A
    u define the annul working hours , Monthly working hours  right
    Can u tell wht are the other feilds there
    26.5 hrs is the Combination of two Periodic Work Schedule right ..........if yes
    26.5/31  31 is ur working days
    Edited by: Sikindar on Apr 6, 2009 10:10 AM

  • Facing some problems in creating a custom tabs in CRMD_ORDER Transaction

    Hi Friends,
    I am facing some problems in creating a custom tabs in CRMD_ORDER Transaction code in Solution Manager of SAP.
    Actually my requirement is adding of two tabs(one is header & another is item tab) in the above Transaction, i was able to put one tab i.e header tab but i was not able to keep item tab. i found a badi CRM_CUSTOMER_I_BADI in which documentation was given & i processed in the same way.
    For information i used the Badi CRM_CUSTOMER_H_BADI for header tab which i was able to add the tab & all functions like change, save working Good.
    But i want how to add custom tab in which item details were to be attached.
    i was done with the necessary SPRO settings(or Tcode CRMV_SSV) & able to see the 2 tabs thats it, but the functionality save is not working for the second tab & not saving in table CRMD_CUSTOMER_I (in this table there is one CI include where we added our item fields).
    And also i had a doubt whether to use ALV or Table Control. And if possible can any one can sent me the screen design & the code for the above requirement in detail.
    can any one who have knoweldge in Solution Manager & in the above Badi implementation can give me a right solution which will help me a lot.
    Thanks a lot in advance.
    Thanks
    Ravi.
    can any one give the solution regarding to the above one.
    Edited by: ravikanth on Jul 23, 2008 8:13 AM

    Hello Priyanka,
    I have the same problem by using Service Ticket in SAP CRM 5.0.
    Did you already solved this issue? If so, can you please provide the solution!?
    How can I activate and check the transfer log?
    Thanks and regards
    Alex

  • Problem in creating table maintenance generator for 61 fields in table

    Hi Experts,
    I am facing problem in creating a table maintenance genarator for a ZTABLE which has 61 fields
    i am using below details whicle creating the TMG
    in Maintenance screen
    i am giving maintenance type as two step
    Maint screen no overview screen 2
                              single screen        3
    Dialog Data Transport details
    Recording routine    standard recording routine
    but it is giving following error
    screen SAPL<ZTABLE NAME>    0003 could not be generated
    In DYNPFIELD_ATTR mandatory field LINE has no value
    please let me know how to sort out these errors.
    Is there any limit on the number of fields for which we can create table maintenance generetor.
    Thanks a lot in advance
    Sudipto

    Hi Sudipto,
    There is not limit to the number of fields of the Table which can be used in TMG for generation. But, from the usability point of view this will horrible.
    I created a Z table and added 64 fields and was able to generate the TMG with the screens perfectly. So, I guess there should not be any problem.
    Well, have a look at the Function Group. I guess the screen numbers are already used by some other screens. You can set the system to propose freely available screen numbers from the pool.
    Also, check whether proper authorization is assigned or not.
    And if nothing is working, you can degenerate all the generated screens and then can have a new regeneration of it.
    Hope these tips will work.
    Thanks,
    Samantak

  • Problem in Creating Check boxes as a column in a table using MVC

    I am trying to display a table format using the Model view controlers, with 1st column as a checkbox. if the user chooses some check boxes and submit the screen then i need to update the information in a custome table.
    I am having a problem in creating the check boxes, also pls tell me how to catch the line items checked by the user in the table...
    Sri

    HI Srinivas
       I am not getting what the exact problem is.....
    I am giving you a work around.....to me it does not seems to be an Ideal Solution..But Probably it will solve your problem....
    Changes To be Made in Page Layout...
    In Pagelayout     
    <htmlb:tableView id   = "tvX"                           width                 = "100%"                           visibleRowCount       = "8"                           fillUpEmptyRows       = "X"                         selectedRowIndexTable = "<%= selectedRowIndexTable %>"
    <b>selectedrowindex      = "<%= selectedrowindex %>"
    onrowselection        = "select"</b>
    selectionMode   = "MULTISELECT"                           table                 = "<%= sflight %>" />
    <b>selectedindexrow is an attribute of type INT4</b>
    In Do handle event.....instead of using the previous code use this one...
    if event->id = 'SUBMIT'.  
    DATA:      WA  TYPE  INT4.     
    LOOP AT SELECTEDROWINDEXTABLE INTO WA.
    *Here you can read your table of TABLEVIEW with index *equal to WA into a workarea and then use that workarea *to update the customer table      ENDLOOP.   
    elseif event->id = 'tvX'.
    tv ?= CL_HTMLB_MANAGER=>GET_DATA( request = request                                      name    = 'tableView'                                      id      = 'tvX' ).  
    IF tv IS NOT INITIAL.    
    table_event = tv->data.   
    selectedRowIndex = table_event->SELECTEDROWINDEX.
    append selectedrowindex into SELECTEDROWINDEXTABLE.
    endif.
    ENDIF.
    Meanwhile..Let me check why that code does not work.....
    Hope it solve your problem....
    Cheers:)
    Mithlesh

  • I have a problem in creating a Process Chain(PC).

    Hi GURU's
    I have a problem in creating a Process Chain(PC). The PC should run on first 3 business days of the month for six times i,e 6am, 7am,8am, 9am,10am,11am.
    For this i have created 3 PC like BD1, BD2, BD3, and i selected the Factory calender provided workday 1, 2 , 3 and time for three chains.
    Now should i schedule it for 6times in a day.
    I tried creating a new job for one of PC's but i have to change the timings for  every month (this is not the proper solution).
    Please help me.
    Regds
    Lajwanth

    Hi Friend,
    For the days part, you can create a new factory calendar with first 3 business days of each month only as working days.
    Then in the scheduling -> Restrictions; you can mention that Factory Calendar id and select radio button for "Move job to next working day". Schedule the chain as Periodic "Hourly".
    Then for the Time part -> You can insert process type "Decision between multiple alternatives" after the start variant.
    After you insert this process type you can create a formula in it to check for system time. In the if condition check for system time i.e., whether it is between 6 - 11. If only the system time is between 6 AM to 11 AM only then the decision step would turn to green and go to the successor step in the process chain.
    Process chain would be like:
    Start variant -> Decision Step -> Rest of the chain.
    So in short the factory calendar will take care of which days the chain will run and decision step will take care of the timings.
    Regards
    Hemant Khemani

  • Problem while Creating MVLOG with synonym in Oracle 9i:Is it an Oracle Bug?

    Hi All,
    I am facing a problem while Creating MVLOG with synonym in Oracle 9i but for 10G it is working fine. Is it an Oracle Bug? or i am missing something.
    SQL> select * from v$version;
    BANNER
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
    PL/SQL Release 10.2.0.1.0 - Production
    CORE    10.2.0.1.0      Production
    TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    SQL>
    SQL> create table t ( name varchar2(20), id varchar2(1) primary key);
    Table created.
    SQL> create materialized view log on t;
    Materialized view log created.
    SQL> create public synonym syn_t for t;
    Synonym created.
    SQL> CREATE MATERIALIZED VIEW MV_t
      2  REFRESH ON DEMAND
      3  WITH PRIMARY KEY
      4  AS
      5  SELECT name,id
      6  FROM syn_t;
    Materialized view created.
    SQL> CREATE MATERIALIZED VIEW LOG ON  MV_t
      2  WITH PRIMARY KEY
      3   (name)
      4    INCLUDING NEW VALUES;
    Materialized view log created.
    SQL> select * from v$version;
    BANNER
    Oracle9i Enterprise Edition Release 9.2.0.6.0 - Production
    PL/SQL Release 9.2.0.6.0 - Production
    CORE    9.2.0.6.0       Production
    TNS for Solaris: Version 9.2.0.6.0 - Production
    NLSRTL Version 9.2.0.6.0 - Production
    SQL>
    SQL> create table t ( name varchar2(20), id varchar2(1) primary key);
    Table created.
    SQL> create materialized view log on t;
    Materialized view log created.
    SQL> create public synonym syn_t for t;
    Synonym created.
    SQL> CREATE MATERIALIZED VIEW MV_t
    REFRESH ON DEMAND
    WITH PRIMARY KEY
    AS
      2    3    4    5  SELECT name,id
    FROM syn_t;   6
    Materialized view created.
    SQL> CREATE MATERIALIZED VIEW LOG ON  MV_t
    WITH PRIMARY KEY
    (name)
      INCLUDING NEW VALUES;  2    3    4
    CREATE MATERIALIZED VIEW LOG ON  MV_t
    ERROR at line 1:
    ORA-12014: table 'MV_T' does not contain a primary key constraintRegards
    Message was edited by:
    Avinash Tripathi
    null

    Hi Nicloei,
    Thanks for the reply. Actually i don't want any work around (Creating MVLOG on table rather than synonym is fine with me) . I just wanted to know it is actually an oracle bug or something else.
    Regards
    Avinash

  • Problem when creating a sales order with reference by BAPI

    I am facing one problem when creating Sales Order.
    <b>The scenario is like this while creating SO With reference to an Order type, a new SO will be automatically created with a diff order Type</b>.
    I am using "BAPI_SALESORDER_CREATEFROMDAT2".
    I am calling this BAPI in USEREXIT_REFRESH_DOCUMENT.
    Am I using the right exit to call this Bapi ?
    <b>Problems are like :
    1. Ref Sales Order creating without Sales Unit .
    2. "Object Status does not exist" error msg is coming for Header and Item level(when clicking the status tab and then object status pushbutton).</b> But if testing the bapi from SE37 in test sequence....no such problem persists.
    As for example in case of sales unit,in the debugging mode i have seen that BAPI uses a perform to fill the values in the VBAP structure.But after that when it come back to the main program VBAP remains blank.This ocuurs when the BAPI is called from the exit whereas  if tested from SE37, VBAP retains the value.
    Can u suggest in this ? This is very very urgent............
    Thx in Adv.........................

    Thanks........
    Your suggestion was a great help to me.I have used a custom FM and called it in <b>starting new task</b>.
    Since i am a university fresher working in SAP for nearly 1 year.....can you please explain me the difference between <b>in update task</b> and <b>starting new task</b>.Why the problem was occuring for which you have suggested to call a custom function module.
    what is V1 update and V2 update?Is it attached with asynchronous ans synchronous update.It would be a great help to me if you kindly clear my confusions....
    thanks in advance.

  • Problems in creating a chart..

    Hi,
    I have Problems in creating the following chart..
    I dont know where the problem of the Publisher is, because the same structers already shows me a Table full of Data...
    I ve tested something and realized when i m deleting the SUM() Part everything works fine. Ist it maybe an error in the sum function?
    its such a simple statement but it wont work...
    XML Code:
    chart:
    <Graph graphType="PIE">
    <Title text="" visible="true" horizontalAlignment="CENTER"/>
    <LocalGridData rowCount="{count(xdoxslt:group(DATA/query_DATA/ROW, CURRENY))}" colCount="1">
    <RowLabels>
    <xsl:for-each-group select="DATA/query_DATA/ROW" group-by="CURRENCY">
    <xsl:sort select="CURRENCY"/>
    <Label>
    <xsl:value-of select="current-group()/CURRENCY"/>
    </Label>
    </xsl:for-each-group>
    </RowLabels>
    <DataValues>
    <xsl:for-each-group select="DATA/query_DATA/ROW" group-by="CURRENCY">
    <xsl:sort select="CURRENCY"/>
    <RowData>
    <Cell>
    <xsl:value-of select="sum(current-group()/PRICE)"/>
    </Cell>
    </RowData>
    </xsl:for-each-group>
    </DataValues>
    </LocalGridData>
    </Graph>
    Greeting

    It doesnt work, because i deleted the ' while chaning the caption to currency....
    OK here is my original Text....
    chart:
    <Graph graphType="PIE">
    <Title text="" visible="true" horizontalAlignment="CENTER"/>
    <LocalGridData rowCount="{count(xdoxslt:group(DATA/query_DATA/ROW, 'POS_EURO_TXT'))}" colCount="1">
    <RowLabels>
    <xsl:for-each-group select="DATA/query_DATA/ROW" group-by="POS_EURO_TXT">
    <xsl:sort select="POS_EURO_TXT"/>
    <Label><xsl:value-of select="current-group()/POS_EURO_TXT"/></Label>
    </xsl:for-each-group>
    </RowLabels>
    <DataValues>
    <xsl:for-each-group select="DATA/query_DATA/ROW" group-by="POS_EURO_TXT">
    <xsl:sort select="POS_EURO_TXT"/>
    <RowData>
    <Cell><xsl:value-of select="sum(current-group()/NET)"/></Cell>
    </RowData>
    </xsl:for-each-group> </DataValues>
    </LocalGridData>
    </Graph>
    <DATA>
    <query_DATA><ROW>
    <KUNGRUPPE>ABC</KUNGRUPPE>
    <POS_EURO_TXT>USD</POS_EURO_TXT>
    <NET>7785763.25</NET>
    </ROW><ROW>
    <KUNGRUPPE>ABC</KUNGRUPPE>
    <POS_EURO_TXT>EURO</POS_EURO_TXT>
    <NET>15242332211.9</NET>
    </ROW><ROW>
    <KUNGRUPPE>XXX</KUNGRUPPE>
    <POS_EURO_TXT>EURO</POS_EURO_TXT>
    <NET>7894268.84</NET>
    </ROW></query_DATA>
    </DATA>
    Greetings

  • Problems with creating a complex cursor

    Let me prefix this post with the fact that I am really new at this and this is my first shot at creating a Stored Proc. I have the shell and I have tried to code this but I am having some issues with the cursor. Any tips or tricks that you can give me would be greatly appreciated.
    Below is what I am trying to accomplish
    Looking for the best approach to work with a complex cursor.
    I have 4 files that are going to dump into a temp table. This is a sample of the Temp Table
    CHAN_ADDR,BRA,SRC_ID,R_Flag,C_Flag,S_Flag,N_Flag,Expire_Date,Wireless_Flag
    1111111111,R,1-a,,,,NDNC,7/7/2006,
    2222222222,R,2-b,,,SDNC,NDNC,7/7/2006,WIR
    3333333333,R,3-c,,,SDNC,NDNC,7/8/2006,
    4444444444,R,4-d,y,,SDNC,NDNC,7/9/2006,WIR
    5555555555,R,5-e,y,,SDNC,,7/10/2006,
    6666666666,R,6-f,y,,,,,WIR
    7777777777,R,7-g,,,,,,
    8888888888,R,8-h,y,,,NDNC,7/7/2006,WIR
    I need to take this data and dump it into another table that looks like the following:
    ADDR     Per_ID     Method     Name     Expire Date     Flag
    1111111111     1-a     Phone     Nat     7/7/2006     Y
    2222222222     2-b     Mobile     State     7/7/2006     Y
    2222222222     2-b     Mobile     Nat     7/7/2006     Y
    4444444444     3-c     Mobile     R     7/9/2006     y
    4444444444     3-c     Mobile     State     7/9/2006     y
    4444444444     3-c     Mobile     Nat     7/9/2006     y
    know that I need to use a cursor using loop and fetch but I am kind of confused on how to make this work. I am fairly new to writing PL/SQL so any tips and tricks would be greatly appreciated.
    For each phone number there can be 1 to 3 records written based on the flags. For each of those records I must store the phone number, the id, flag data, expire date (for only State or National) and Flag must always be checked.
    I have put together a small shell of the program but what goes in the middle is where I am having some problems.
    CREATE OR REPLACE PROCEDURE USP_EIM_CONTACT3_UPD
    IS
    CURSOR dnc_cursor IS
    SELECT CHAN_ADDR,
         BRA,
         SRC_ID,
         R_FLAG,
         C_FLAG,
         S_FLAG,
         N_FLAG,
         EBR_EXPIRE_DATE,
         WIRELESS_FLAG
    FROM eim_admin.RCCL_OPT_OUT_TMP;
         v_counter                     NUMBER := 0;
         v_insert                     NUMBER := 0;
         v_sysdate                     DATE:=SYSDATE;
         v_chan_addr                    eim_admin.RCCL_OPT_OUT_TMP.chan_addr%TYPE;
    BEGIN
         DBMS_OUTPUT.PUT_LINE ('***Begining USP_EIM_CONTACT3_UPD, time is ' ||
    TO_CHAR (v_sysdate, 'MON-DD-YYYY HH24:MI.SS'));
         DBMS_OUTPUT.NEW_LINE;
    FOR rec IN dnc_cursor LOOP
         v_counter:=v_counter+1;
         BEGIN
         SELECT CHAN_ADDR
         INTO v_chan_addr
         FROM eim_admin.RCCL_OPT_OUT_TMP;
         EXCEPTION
    WHEN OTHERS THEN
              DBMS_OUTPUT.PUT_LINE('*** Could not lookup RCCL_OPT_OUT_TMP. ***');
              DBMS_OUTPUT.PUT_LINE('ORA-'||SQLCODE||' '||SQLERRM);
         END;
    BEGIN
              INSERT INTO siebel.S_PER_COMM_ADDR
         (ADDR)
    VALUES
    (rec.CHAN_ADDR);          
              v_insert := v_insert + SQL%ROWCOUNT;
         EXCEPTION WHEN OTHERS THEN
              DBMS_OUTPUT.PUT_LINE('*** Failed to insert into siebel.S_PER_COMM_AADDR DDR ***');
              DBMS_OUTPUT.PUT_LINE('ORA-'||SQLCODE||' '||SQLERRM);
         END;
    END LOOP;
    --Output STATISTICS.
    DBMS_OUTPUT.PUT_LINE('**Number records read :'||v_counter);
    DBMS_OUTPUT.NEW_LINE;
    DBMS_OUTPUT.PUT_LINE ('***Completing USP_EIM_CONTACT3_UPD, time is ' ||
    TO_CHAR (SYSDATE, 'MON-DD-YYYY HH24:MI.SS'));
    EXCEPTION
         WHEN OTHERS THEN
         DBMS_OUTPUT.PUT_LINE(' ****Error in USP_EIM_CONTACT3_UPD ****'||SQLCODE||SQLERRM);                              
    END USP_EIM_CONTACT3_UPD;
    I have already created the table. What we are going to do is using sqlloader to load our text files into our temp table. From there we are going to read the data from the temp table into a table that is already created.
    Basically what I am trying to do is the following:
    Cursor 1
    select * from Temp where, State_Flag and National_Flag is not null
    Insert into Siebel.S_PER_COMM_ADDR
    set id = source var
    set phone = chann_add var
    If
    wireless flag is not null
    set method = 'Mobile"
    else
    set method = 'Home'
    end if
    If
    Brand = 'r' and R_Flag is not null
    set name flg1
    set flag as 'T'
    and so on.
    I am getting confused as to where to call the variables:
    set id = source var
    set phone = chann_add var
    I am also confused on how to do the sets and how to set the date for S_Flag and N_Flag.
    One of the other issues is that I need to go and look at the base table to pick up anyone else that has the phone number and update or delete based on the data in the table.

    I am getting confused as to where to call the variables:
    set id = source var
    set phone = chann_add var have you defined your variables in the DECLARE area? is that a cursor variable or plain variable? need more info.

Maybe you are looking for

  • Is there any way to merge data from multiple user accounts on the same mac?

    After a HD crash I reconstructed from Time Machine. Somehow I created multiple users and the data is different. I'd like to eliminate the user accounts and get to just a single user. Anything there?

  • HP Officejet Pro 8500 "phone off hook"

    HP Officejet Pro 8500 panel shows "phone off hook" and faxes will not come in and it is on a dedicated phone line.  I can send out without any problem.  The telephone technician determined the problem is not with the phone service.  

  • Setting up a working development environment (gcc & SunStudio 12)

    Hi, every time I set up a new OS / zone installation for development use I stumble upon the same problems and can't get out of it . First, here's my path : 11:38:22|grattojf@bergen:~] echo $PATH /opt/csw/gcc4/bin:/usr/ucb:/usr/ccs/bin:/usr/bin:/usr/s

  • Constrain ratio

    In Illustrator CS2 holding down the shift key whilst resizing an object no longer constrains the proportions of the object. Does anybody know why?

  • Question: Design help Epub FXL

    Hello friends. I'm building a fixed layout epub with the newest version of indesign. So far it's pretty amazing, but there are a couple of things I would like to do, but don't know how. Any help would be GREATLY appreciated. 1. I'm adding a video to