Help to work with 2 internal table with tricky  use

HI ,
I have 2 internal table one with new data and one with old data (same structure ) and i want to combine the 2 of them to final table .
what i need to do here is little bit tricky
The  table is build like this :
mandt
User
user_data
valid
if there is no different from the user data from table old to table new the user data in the final table should look like this
000
user1
userdata1
X
000
user1
userdata2
X
IF there is difference between of them the table entries in final table should like this
000
user1
userdata3
X
000
user1
userdata4
X
000
user1
userdata1
"Valid field is empty -abap false  since the user dont have this data (userdata1) any more
000
user1
userdata2
"Valid field is empty -abap false  since the user dont have this data (userdata2) any more
1. alwayes table new is coming with data that is valid field = abap_true
   and should be change the user entries just if there is new entries are diffrent than the old one .
2. table new can have new users with data so it enter the new users to final table with valid entry = abap_true
3. if in the new table there is no user which exist in the old table the user in the final table
should stay with the same entries but the valid entry should be abap false
What is the best way to do that ?
Regards
Chris
Edited by: Chris Teb on Nov 15, 2009 10:39 AM

HI
I have table with entries like that that i read from DB (i call it itab_old)
old_itab
mandt     User      user data      timestemp      valid
0     usr1      User_data1     X     TRUE
0     usr1      User_data2     X     TRUE
0     usr1      User_data3     X     TRUE
0     usr2      User_data1     X     TRUE
0     usr2      User_data2     X     TRUE
0     usr2      User_data3     X     TRUE
0     usr2      User_data4     X     TRUE
0     usr3     User_data1     X     TRUE
0     usr3     User_data2     X     TRUE
0     usr3     User_data3     X     TRUE
assume the user entry for usr 1 is changing i.e. (new entries in table itab_new) the table should look like this
new_itab
mandt     User      user data      timestemp      valid
0     usr1      User_data4     Y     TRUE
0     usr1      User_data2     Y     TRUE
0     usr1      User_data6     Y     TRUE
0     usr2      User_data1     Y     TRUE
0     usr2      User_data2     Y     TRUE
0     usr2      User_data3     Y     TRUE
0     usr2      User_data4     Y     TRUE
and the final_itab should look like that
usr1 old entries are mark as false and new recoreds is enter to the table for him ,
usr2 have the same entries so it not change
final_itab
mandt     User      user data      timestemp      valid
0     usr1      User_data1     X     FALSE
0     usr1      User_data2     X     FALSE
0     usr1      User_data3     X     FALSE
0     usr2      User_data1     X     TRUE
0     usr2      User_data2     X     TRUE
0     usr2      User_data3     X     TRUE
0     usr2      User_data4     X     TRUE
0     usr3     User_data1     X     TRUE
0     usr3     User_data2     X     TRUE
0     usr3     User_data3     X     TRUE
0     usr1      User_data4     Y     TRUE
0     usr1      User_data2     Y     TRUE
0     usr1      User_data6     Y     TRUE
0     usr7     User_data1     X     TRUE
0     usr7     User_data2     X     TRUE
0     usr7     User_data3     X     TRUE
last thing there is option that new user will come in table new_itab that is not exist in old table for this user we need to create new entry in final table (like user 7 )
Thanks in advance
Chris
Edited by: Chris Teb on Nov 15, 2009 10:50 PM

Similar Messages

  • Difference between work area and internal tables.

    Hi  I wanna know the difference between work area and internal tables.
    what happend if i give with out header line in internal table.
    also how to assosiate work area to internal table in that scenario.

    Hi Balaji..
    The internal table is an ABAP runtime object which has two parts the Body and the header.
    Whereas a work area cannot have a body.. It is mere a field or group of fields which can hold values at runtime..
    In the SAP higher versions mySAP ERP, the use of tables with header line is made obsolete.. But there is absolutely no problem with the same..
    Just think that when you define an internal table with occurs or with header line statement, the system automatically creates a workarea with this table, using which you can access the contents in the bosy of tyhe table.. You can read a record from the table body to this header or add a record in the header to the internal table body..
    When you work with a table ITAB without a header line, you can not use statements like READ TABLE, APPEND, INSERT etc without giving an explicit work area..
    Suppose i have an internal table like:
    DATA : itab TYPE STANDARD TABLE OF t001.
    This table will not have a header with it.
    If you will use APPEND itab. The compilor will give error.
    Here i will create a work area with same structure of the table.
    DATA : e_wa TYPE t001.
    Now i will write:
    APPEND e_wa TO itab.
    READ TABLE itab INTO e_wa WITH KEY xxxxxx
    LOOP AT itab INTO e_wa...           etc..
    In a better approach we use Field symbols with such tables, instead of structures
    FIELD-SYMBOLS: <fs_itab> TYPE t001.
    So,
    LOOP AT itab ASSIGNING <fs_itab>
    READ TABLE itab ASSIGNING <fs_itab> etc.. However we can not use field symbols in few cases..
    I hope this will help you..
    Thanks and Best Regards,
    Vikas Bittera.
    **Points for usefull answers**

  • Error when working with TableView using JCA

    Hi sdns,
    I am getting an iview rutnime error when working with Tableview using JCA. Here i am putting all my code, go thorugh it and tell me if any error is there.One more thing is Usermappping and all properties are set to system object.
    Now you can throught he code which is followed by error also.
    <u>Java file.</u>
    public class DisplayComponent extends PageProcessorComponent {
         public DynPage getPage() {
              return new DisplayComponentDynPage();
         public static class DisplayComponentDynPage extends JSPDynPage {
              private JCATviewBean bean;
              public void doInitialization() {
                   IPortalComponentProfile profile =
                        ((IPortalComponentRequest) getRequest())
                             .getComponentContext()
                             .getProfile();
                   Object o = profile.getValue("myBean");
                   if (o == null || !(o instanceof JCATviewBean)) {
                        bean = new JCATviewBean();
                        profile.putValue("myBean", bean);
                   } else {
                        bean = (JCATviewBean) o;
                   // fill your bean with data here...
                   IPortalComponentRequest request =
                        (IPortalComponentRequest) this.getRequest();
                   doJca(request);
              public void doProcessAfterInput() throws PageException {
              public void doProcessBeforeOutput() throws PageException {
                   this.setJspName("Report.jsp");
              private IConnection getConnection(
                   IPortalComponentRequest request,
                   String alias)
                   throws Exception {
                   IConnectorGatewayService cgService =
                        (IConnectorGatewayService) PortalRuntime
                             .getRuntimeResources()
                             .getService(
                             IConnectorService.KEY);
                   ConnectionProperties prop =
                        new ConnectionProperties(
                             request.getLocale(),
                             request.getUser());
                   return cgService.getConnection(alias, prop);
              public void doJca(IPortalComponentRequest request) {
                   IConnectionFactory connectionFactory = null;
                   IConnection client = null;
                   String rfm_name = "BAPI_COMPANYCODE_GETLIST";
                   try {
                        try {
                             //       pass the request & system alias
                             //       Change the alias to whatever the alias is for your R/3 system
                             client = getConnection(request, "MyIDES");
                        } catch (Exception e) {
                             System.out.println(
                                  "Couldn't establish a connection with a target system.");
                             return;
    Start Interaction
                        IInteraction interaction = client.createInteractionEx();
                        IInteractionSpec interactionSpec =
                             interaction.getInteractionSpec();
                        interactionSpec.setPropertyValue("Name", rfm_name);
    CCI api only has one datatype: Record
                        RecordFactory recordFactory = interaction.getRecordFactory();
                        MappedRecord importParams =
                             recordFactory.createMappedRecord(
                                  "CONTAINER_OF_IMPORT_PARAMS");
                        IFunctionsMetaData functionsMetaData =
                             client.getFunctionsMetaData();
                        IFunction function = functionsMetaData.getFunction(rfm_name);
                        if (function == null) {
                             System.out.println(
                                  "Couldn't find " + rfm_name + " in a target system.");
                             return;
    How to invoke Function modules
                        System.out.println("Invoking... " + function.getName());
                        MappedRecord exportParams =
                             (MappedRecord) interaction.execute(
                                  interactionSpec,
                                  importParams);
    How to get structure values
                        IRecord exportStructure = (IRecord) exportParams.get("RETURN");
                        String columnOne = exportStructure.getString("TYPE");
                        String columnTwo = exportStructure.getString("CODE");
                        String columnThree = exportStructure.getString("MESSAGE");
                        System.out.println("  RETURN-TYPE    = " + columnOne);
                        System.out.println("  RETURN-CODE    = " + columnTwo);
                        System.out.println("  RETURN-MESSAGE =" + columnThree);
    How to get table values
                        IRecordSet exportTable =
                             (IRecordSet) exportParams.get("COMPANYCODE_LIST");
                        exportTable.beforeFirst();
                        // Moves the cursor before the first row.
                        while (exportTable.next()) {
                             String column_1 = exportTable.getString("COMP_CODE");
                             String column_2 = exportTable.getString("COMP_NAME");
                             System.out.println(
                                  "  COMPANYCODE_LIST-COMP_CODE = " + column_1);
                             System.out.println(
                                  "  COMPANYCODE_LIST-COMP_NAME = " + column_2);
                        //       create the tableview mode in the bean
                        bean.createData(exportTable);
    Closing the connection
                        client.close();
                   } catch (ConnectorException e) {
                        //       app.putValue("error", e);
                        System.out.println("Caught an exception: \n" + e);
                   } catch (Exception e) {
                        System.out.println("Caught an exception: \n" + e);
    <u>Bena file</u>
    package com.sap.JCA.bean;
    import java.util.Vector;
    import com.sapportals.connector.execution.structures.IRecordSet;
    import com.sapportals.htmlb.table.DefaultTableViewModel;
    import com.sapportals.htmlb.table.TableViewModel;
    public class JCATviewBean {
         public DefaultTableViewModel model;
         public TableViewModel getModel() {
         return this.model;
         public void setModel(DefaultTableViewModel model) {
         this.model = model;
         public void createData(IRecordSet table) {
    //       this is your column names
         Vector column = new Vector();
         column.addElement("Company Code");
         column.addElement("Company Name");
    //       all this logic is for the data part.
         Vector rVector = new Vector();
         try {
         table.beforeFirst();
         while (table.next()) {
         Vector data = new Vector();
         data.addElement(table.getString("COMP_CODE"));
         data.addElement(table.getString("COMP_NAME"));
         rVector.addElement(data);
         } catch (Exception e) {
         e.printStackTrace();
    //       this is where you create the model
         this.setModel(new DefaultTableViewModel(rVector, column));
    <b>JSP File:</b>
    <%@ taglib uri="tagLib" prefix="hbj" %>
    <jsp:useBean id="myBean" scope="application" class="com.sap.JCA.bean.JCATviewBean" />
    <hbj:content id="myContext" >
      <hbj:page title="PageTitle">
       <hbj:form id="myFormId" >
       <br>
       <hbj:textView id = "tv1" text = "<b>TableView Example Using JCA</b> <br>"/>
    <hbj:tableView
        id="myTableView1"
        model="myBean.model"
        design="ALTERNATING"
        headerVisible="true"
        footerVisible="true"
        fillUpEmptyRows="true"
        navigationMode="BYLINE"
        selectionMode="MULTISELECT"
        headerText="TableView example1"
        visibleFirstRow="1"
        visibleRowCount="30"
        width="500 px"
        />
       </hbj:form>
      </hbj:page>
    </hbj:content>
    <b>Error when Executing this component:</b><u></u>
      Portal Runtime Error
    <b>An exception occurred while processing a request for :
    iView : N/A
    Component Name : N/A
    com/sapportals/portal/htmlb/page/PageProcessorComponent.
    Exception id: 12:21_28/10/05_0173_94105150
    See the details for the exception ID in the log file</b>  
    If anybody find the error please reply to this post.
    Regards,
    sireesha.

    Thanks for your response Martin,
    I have already seen the log file but im couldn't findout anything from that since it is so long here im putting some part of please see this.if u able to find it clarify me,
    <b>Here the log file:</b>
    1.5#001321FD6213005D0000907100001CB000040419258FBF4E#1130405957843#trexr3.com.sapmarkets.isa.services.schedulerservice.persistence.jdo.DataBaseJobStore#sap.com/crm.trexr3#trexr3.com.sapmarkets.isa.services.schedulerservice.persistence.jdo.DataBaseJobStore#J2EE_ADMIN#530##obtdev3_O09_94105150#Guest#8a2bbd20444711da932c001321fd6213#Thread[SchedulerThread,5,SAPEngine_Application_Thread[impl:3]_Group]##0#0#Info#1#/System/Scheduler/JobStore#Plain###With in the acquireLockForNextAvailableJob DataStore#
    #1.5#001321FD6213005D0000907200001CB00004041925916735#1130405957953#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#sap.com/crm.trexr3#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#J2EE_ADMIN#530##obtdev3_O09_94105150#Guest#8a2bbd20444711da932c001321fd6213#Thread[SchedulerThread,5,SAPEngine_Application_Thread[impl:3]_Group]##0#0#Info#1#/System/Scheduler#Plain###Acquired the job null#
    #1.5#001321FD6213005D0000907300001CB0000404192591688D#1130405957953#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#sap.com/crm.trexr3#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#J2EE_ADMIN#530##obtdev3_O09_94105150#Guest#8a2bbd20444711da932c001321fd6213#Thread[SchedulerThread,5,SAPEngine_Application_Thread[impl:3]_Group]##0#0#Info#1#/System/Scheduler#Plain###Did not find any job.So, Waiting for sometime for the next job#
    #1.5#001321FD621300650000120E00001CB00004041925C953D7#1130405961625#com.sap.aii.af.sample.adapter.ra.SPIManagedConnectionFactory##com.sap.aii.af.sample.adapter.ra.SPIManagedConnectionFactory.XIManagedConnectionFactoryController.run()######04d7f690469311da8d52001321fd6213#Thread[Thread-114,5,SAPEngine_System_Thread[impl:5]_Group]##0#0#Debug#1#/Applications/ExchangeInfrastructure/AdapterFramework/ThirdPartyRoot/comsap/Server/Adapter Framework#Java###MCF with GUID is running. (,)#3#964bfca0444711dabb51001321fd6213#com.sap.engine.services.deploy.server.ApplicationLoader@1586c77#964bfca0444711dabb51001321fd6213#
    #1.5#001321FD6213005D0000907400001CB000040419275B24FC#1130405987953#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#sap.com/crm.trexr3#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#J2EE_ADMIN#530##obtdev3_O09_94105150#Guest#8a2bbd20444711da932c001321fd6213#Thread[SchedulerThread,5,SAPEngine_Application_Thread[impl:3]_Group]##0#0#Info#1#/System/Scheduler#Plain###within the infinite of the Scheduler Thread#
    #1.5#001321FD6213005D0000907500001CB000040419275B25D9#1130405987953#trexr3.com.sapmarkets.isa.services.schedulerservice.persistence.jdo.DataBaseJobStore#sap.com/crm.trexr3#trexr3.com.sapmarkets.isa.services.schedulerservice.persistence.jdo.DataBaseJobStore#J2EE_ADMIN#530##obtdev3_O09_94105150#Guest#8a2bbd20444711da932c001321fd6213#Thread[SchedulerThread,5,SAPEngine_Application_Thread[impl:3]_Group]##0#0#Info#1#/System/Scheduler/JobStore#Plain###With in the acquireLockForNextAvailableJob DataStore#
    #1.5#001321FD6213005D0000907600001CB000040419275B2E27#1130405987953#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#sap.com/crm.trexr3#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#J2EE_ADMIN#530##obtdev3_O09_94105150#Guest#8a2bbd20444711da932c001321fd6213#Thread[SchedulerThread,5,SAPEngine_Application_Thread[impl:3]_Group]##0#0#Info#1#/System/Scheduler#Plain###Acquired the job null#
    #1.5#001321FD6213005D0000907700001CB000040419275B2EFA#1130405987953#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#sap.com/crm.trexr3#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#J2EE_ADMIN#530##obtdev3_O09_94105150#Guest#8a2bbd20444711da932c001321fd6213#Thread[SchedulerThread,5,SAPEngine_Application_Thread[impl:3]_Group]##0#0#Info#1#/System/Scheduler#Plain###Did not find any job.So, Waiting for sometime for the next job#
    #1.5#001321FD6213005D0000907800001CB0000404192924ED59#1130406017953#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#sap.com/crm.trexr3#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#J2EE_ADMIN#530##obtdev3_O09_94105150#Guest#8a2bbd20444711da932c001321fd6213#Thread[SchedulerThread,5,SAPEngine_Application_Thread[impl:3]_Group]##0#0#Info#1#/System/Scheduler#Plain###within the infinite of the Scheduler Thread#
    #1.5#001321FD6213005D0000907900001CB0000404192924EE36#1130406017953#trexr3.com.sapmarkets.isa.services.schedulerservice.persistence.jdo.DataBaseJobStore#sap.com/crm.trexr3#trexr3.com.sapmarkets.isa.services.schedulerservice.persistence.jdo.DataBaseJobStore#J2EE_ADMIN#530##obtdev3_O09_94105150#Guest#8a2bbd20444711da932c001321fd6213#Thread[SchedulerThread,5,SAPEngine_Application_Thread[impl:3]_Group]##0#0#Info#1#/System/Scheduler/JobStore#Plain###With in the acquireLockForNextAvailableJob DataStore#
    #1.5#001321FD6213005D0000907A00001CB0000404192924F652#1130406017953#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#sap.com/crm.trexr3#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#J2EE_ADMIN#530##obtdev3_O09_94105150#Guest#8a2bbd20444711da932c001321fd6213#Thread[SchedulerThread,5,SAPEngine_Application_Thread[impl:3]_Group]##0#0#Info#1#/System/Scheduler#Plain###Acquired the job null#
    #1.5#001321FD6213005D0000907B00001CB0000404192924F710#1130406017953#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#sap.com/crm.trexr3#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#J2EE_ADMIN#530##obtdev3_O09_94105150#Guest#8a2bbd20444711da932c001321fd6213#Thread[SchedulerThread,5,SAPEngine_Application_Thread[impl:3]_Group]##0#0#Info#1#/System/Scheduler#Plain###Did not find any job.So, Waiting for sometime for the next job#
    #1.5#001321FD621300650000120F00001CB000040419295CCD8B#1130406021625#com.sap.aii.af.sample.adapter.ra.SPIManagedConnectionFactory##com.sap.aii.af.sample.adapter.ra.SPIManagedConnectionFactory.XIManagedConnectionFactoryController.run()######04d7f690469311da8d52001321fd6213#Thread[Thread-114,5,SAPEngine_System_Thread[impl:5]_Group]##0#0#Debug#1#/Applications/ExchangeInfrastructure/AdapterFramework/ThirdPartyRoot/comsap/Server/Adapter Framework#Java###MCF with GUID is running. (,)#3#964bfca0444711dabb51001321fd6213#com.sap.engine.services.deploy.server.ApplicationLoader@1586c77#964bfca0444711dabb51001321fd6213#
    #1.5#001321FD6213005D0000907C00001CB0000404192AEEB1E2#1130406047953#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#sap.com/crm.trexr3#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#J2EE_ADMIN#530##obtdev3_O09_94105150#Guest#8a2bbd20444711da932c001321fd6213#Thread[SchedulerThread,5,SAPEngine_Application_Thread[impl:3]_Group]##0#0#Info#1#/System/Scheduler#Plain###within the infinite of the Scheduler Thread#
    #1.5#001321FD6213005D0000907D00001CB0000404192AEEB2C0#1130406047953#trexr3.com.sapmarkets.isa.services.schedulerservice.persistence.jdo.DataBaseJobStore#sap.com/crm.trexr3#trexr3.com.sapmarkets.isa.services.schedulerservice.persistence.jdo.DataBaseJobStore#J2EE_ADMIN#530##obtdev3_O09_94105150#Guest#8a2bbd20444711da932c001321fd6213#Thread[SchedulerThread,5,SAPEngine_Application_Thread[impl:3]_Group]##0#0#Info#1#/System/Scheduler/JobStore#Plain###With in the acquireLockForNextAvailableJob DataStore#
    #1.5#001321FD6213005D0000907E00001CB0000404192AEEBAD8#1130406047968#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#sap.com/crm.trexr3#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#J2EE_ADMIN#530##obtdev3_O09_94105150#Guest#8a2bbd20444711da932c001321fd6213#Thread[SchedulerThread,5,SAPEngine_Application_Thread[impl:3]_Group]##0#0#Info#1#/System/Scheduler#Plain###Acquired the job null#
    #1.5#001321FD6213005D0000907F00001CB0000404192AEEBB9E#1130406047968#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#sap.com/crm.trexr3#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#J2EE_ADMIN#530##obtdev3_O09_94105150#Guest#8a2bbd20444711da932c001321fd6213#Thread[SchedulerThread,5,SAPEngine_Application_Thread[impl:3]_Group]##0#0#Info#1#/System/Scheduler#Plain###Did not find any job.So, Waiting for sometime for the next job#

  • The work area (or internal table) "IT_ZLE_LAGERPLANUNG" is not flat,

    ***Data declaration
    TYPES : BEGIN OF t_zle_lagerplanung,
               SEl,                               "stores which row user has selected
               kdauf TYPE zle_lagerplanung-kdauf,
               kdpos TYPE zle_lagerplanung-kdpos,
               etenr TYPE zle_lagerplanung-etenr,
               papiermaschine TYPE zle_lagerplanung-papiermaschine,
               runnr TYPE zle_lagerplanung-runnr,
               prio  TYPE zle_lagerplanung-prio,
               werk TYPE zle_lagerplanung-werk,
               durchmesser TYPE zle_lagerplanung-durchmesser,
               breite TYPE zle_lagerplanung-breite,
               anzle TYPE zle_lagerplanung-anzle,
             occupied TYPE zle_lagerplanung-text30,
             free TYPE zle_lagerplanung-text30,
               lgpla TYPE zle_lagerplanung-lgpla,
               lgtyp  TYPE zle_lagerplanung-lgtyp,
               art TYPE zle_lagerplanung-art,
               anzhoehe TYPE zle_lagerplanung-anzle,
             zindicator TYPE zle_lagerplanung-text30,
               fa TYPE zle_lagerplanung-fa,
               field_style  TYPE lvc_t_styl, "FOR DISABLE
    END OF t_zle_lagerplanung.
    I am getting the data in internal table by using thiis select statement.
      SELECT kdauf kdpos etenr papiermaschine runnr prio werk durchmesser breite
             anzle lgpla lgtyp art anzhoehe fa
        FROM zle_lagerplanung INTO CORRESPONDING FIELDS OF TABLE it_zle_lagerplanung
       WHERE kdauf IN s_kdauf
    "     AND kdpos = p_kdpos
          AND KDPOS IN s_kdpos
         AND werk = p_werks.
    But while updating the particular field in ztable using this statement
          UPDATE zle_lagerplanung from table it_zle_lagerplanung.
    it is giving syntax error
    "The work area (or internal table) "IT_ZLE_LAGERPLANUNG" is not flat, or
    contains reference or internal tables as components. components.
    components. components. components."
    Could any one help me out how to resolve this problem....
    Thanks in advance

    Hi Shyamal,
    lvc_s_styl is a structure so you will get the same error.
    for your select and update statement you dont need field "field_style".
    regards
    rea

  • The type of the database table and work area (or internal table)...

    Hello
    I am trying to use a database and select all records from it and store them into an internal table.
    My code:
    Select * from xixi_dbcurrency into table gt_currency.
    The error:
    "The type of the database table and work area (or internal table) "GT_CURRENCY" are not Unicode-convertible . . . . . . . . . .     "
    Any suggestions?
    Thank you

    Hi Thomas,
    Thank you for your inputs above.
    But as you suggested is we use INTO CORRESPONDING FIELDS OF TABLE then it resolve the error.
    But I have below piece of code:
    DATA:    it_new_source TYPE STANDARD TABLE OF _ty_s_sc_1,
                  wa_source TYPE _ty_s_sc_1,
                  wa_new_source TYPE _ty_s_sc_1,
                  ls_target_key TYPE t_target_key.
    SELECT * INTO CORRESPONDING FIELDS OF TABLE it_new_source
           FROM /bic/afao06pa100
           FOR ALL ENTRIES IN SOURCE_PACKAGE
           where /bic/fcckjobno = SOURCE_PACKAGE-/bic/fcckjobno
           and /bic/fcckjitid = SOURCE_PACKAGE-/bic/fcckjitid.
    But since this is reading into corresponding fields of table the data load from one DSO to other DOS is running for long more that 15 hours and still not getting completed and giving dump.
    So if I switch the search to below:
    SELECT * FROM /bic/afao06pa100
       INTO TABLE it_new_source
           FOR ALL ENTRIES IN SOURCE_PACKAGE
           where /bic/fcckjobno = SOURCE_PACKAGE-/bic/fcckjobno
           and /bic/fcckjitid = SOURCE_PACKAGE-/bic/fcckjitid.
    Then I am getting below error:E:The type of the database table and work area (or internal table) "IT_NEW_SOURCE" are not Unicode convertible.
    Can you please advice on this, as performance need to improve in start routine code.
    Thank You.

  • How to populate one internal table from another using field symbols

    Hi Gurus,
      I have a problem. I have to populate one internal table (sructure t_otput) from another internal table (sructure t_from) using field symbol.
    Structure for from table.
    types: begin of t_from,
             year(4) type c,
             ww(2) type c,
             site type marc-werks,
             demand type i,
           end of t_from.
    Structure for output table.
    types: begin of t_display,
             title(30),
             WW1(10),
             WW2(10),
             WW3(10),
           end of t_display.
    The from table looks like this:
    Year | WW | Site | Demand
    2005 | 1  | OR1  | 12.00
    2005 | 2  | OR1  | 13.00
    2005 | 3  | OR1  | 14.00
    The display table which has to be populated should look like this:
    Title  | WW1   | WW2   | WW3
    OR1    |       |       |
    Demand | 12.00 | 13.00 | 14.00
    How to populate display table using field symbol?
    Please give code snippets
    Thanks,
    Gopal

    Gopal,
    Here is the code, however I am not vary clear about the ORG1 and Demand display that you have shown in the display. I am sure with this code it should not be a big deal to tweak in whatever manner you want.
    TABLES : marc.
    TYPES: BEGIN OF type_display,
    title(30),
    ww1(10),
    ww2(10),
    ww3(10),
    END OF type_display.
    TYPES: BEGIN OF type_from,
    year(4) TYPE c,
    ww(2) TYPE c,
    site TYPE marc-werks,
    demand TYPE i,
    END OF type_from.
    data : t_from type table of type_from,
           t_display type table of type_display.
    field-symbols : <fs_from> type type_from,
                    <fs_display> type type_display.
    data : wa_from type type_From,
           wa_display type type_display.
    wa_from-year = '2005'.
    wa_from-ww   = '1'.
    wa_from-site = 'OR1'.
    wa_from-demand = '12.00'.
    insert wa_from  into table t_from.
    wa_from-year = '2005'.
    wa_from-ww   = '2'.
    wa_from-site = 'OR1'.
    wa_from-demand = '13.00'.
    insert wa_from  into table t_from.
    wa_from-year = '2005'.
    wa_from-ww   = '3'.
    wa_from-site = 'OR1'.
    wa_from-demand = '14.00'.
    insert wa_from  into table t_from.
    data : variable(3) type c.
    field-symbols : <fs_any> type any.
    break-point.
    Loop at t_from assigning <fs_from>.
    variable = 'WW'.
    wa_display-title = <fs_from>-site.
    concatenate variable <fs_from>-ww into variable.
    assign component variable of structure wa_display to <fs_any>.
    <fs_any> = <fs_from>-demand.
    endloop.
    append wa_display to t_display.
    clear wa_display.
    loop at t_display assigning <Fs_display>.
      write :/ <fs_display>.
    endloop.
    Note : Please award points if this helps you.
    Regards,
    Ravi

  • Can sorting facilty in internal tables can be used on char fields?

    Can sorting facilty in internal tables can be used on char fields?

    there is no restriction to sort by any TYPE. u ve the freedom to sort on any TYPE of fields.
    sort itab by ascending / descending F1 F2 F2.
    abap doubts, i request you to try and practise your doubts befor posting here in forums. I can understand you are a buddy.Please remember, PRACTISE MAKES MAN PERFECT. Try to master on own and approch forum in worst case.
    Also award points to all helpful answers.
    All the Best
    Thanks & Best Regards
    Kiran

  • Help Required: Working with relational data

    Hi,
    I'm looking for some advice
    Scenario
    We have a customer who has an SE relational database with Apex for transaction processing. They require reporting functionality and are debating whether to buy BI SE One or BI EE; they will not buy the enteprise edition database though.
    Questions
    Here are my questions:
    1. In order to use answers and dashboards, does the relational data have to be in a dimensional format. Is this reccommended.
    2. We were debating on whether to create data marts for various business requirements. Is this standard procedure for relational data (Which is not too complex)
    3. If the data has to be in a dimensional format, is this best modelled using warehouse builder or the model layer of the repository using BI Administrator. (Baring in mind that the customer is an SME using a SE database)
    The main problem where having, been fairly new to warehouse building, is that we dont know what the best path is to take when working with relational data. Do we create dimensional models? What should we use? Is a relational structure suitable enough?
    Can anyone shed light on our problems
    Regards
    Kevin

    1. In order to use Answers and Dashboards you do not need to have a Data Warehouse. It can report out of both Transactional database as well as a data warehouse.
    2. It depends on what your business requirements are. BI EE/SE1 does not require you to have data marts. Data Marts would give performance gains, would help you in visualizing the transactional data from a business standpoint, is a big plus but not a mandate. If you want to go that route of creating Datamarts, you can easily do that using BI SE1 since that gives you warehouse builder which can be both used as a data modelling tool and a ETL tool.
    3. Warehouse Builder is a ETL tool. It helps in you visualizing/deploying data warehouses in databases. But BI EE Admin tool is more of a logical dimension modelling tool wherein the facts and dimensions do not exist physically but the tool uses them to do the querying/processing.
    Since you are just starting, what you can do is to use BI EE directly on top of the transactional system for the time being. But as a long term solution you can start working on your data marts and as soon as they are ready you can port the BI EE on top of them rather than the transactional system.
    Thanks,
    Venkat
    http://oraclebizint.wordpress.com

  • Work area and internal table

    hi friends,
    Please let me know when do we use work area and when do we use internal table.
    Thanks in advance
    Tina Wilson

    Work areas are used with internal tables.  For example if you have an internal table defined like this.
    data: itab type table of mara.
    This internal table can hold many rows of data, right?  SO say you need to read this data.  Well you will need to LOOP or READ the internal table, since this internal table has no header line(please to put the read data), you need to have a work area to put the data into.
    <b>data: wa like line of itab.</b>
    Loop at itab <b>into wa</b>.
    endloop.
    Now if you defined the internal table with a header line, there is no reason to have the work area and you can just do the same like this.
    data: itab type table of mara <b>with header line</b>.
    Loop at itab.
    endloop.
    It is now best practice to use work areas instead of header lines because in ABAP OO, header lines are not allowed.
    Regards,
    Rich Heilman

  • Working with Guides using ActionScript in Photoshop

    I am facing some troubles when working with Guides in Photoshop (AS/Flash extension)
    Let's create guides showinglayer bounds:
                    var bounds:Array = activeDocument.activeLayer.bounds;
                    var guide_a:Guide = activeDocument.guides.add(Direction.VERTICAL, bounds[0]);
                    var guide_b:Guide = activeDocument.guides.add(Direction.HORIZONTAL, bounds[1]);
                    var guide_c:Guide = activeDocument.guides.add(Direction.VERTICAL, bounds[2]);
                    var guide_d:Guide = activeDocument.guides.add(Direction.HORIZONTAL, bounds[3]);
    This works fine. Layer bounds are marked correctly.
    If I try to remove individual guides, I am facing an issue:
                    guide_a.remove();
                    guide_b.remove();
                    guide_c.remove();
                    guide_d.remove();
    PS starts throwing strange errors:
    Error: General Photoshop error occurred. This functionality may not be available in this version of Photoshop.
    - The object "guide 8 of document 35" is not currently available.
    It is not clear, what document 35 really means (it is not name of actual document .. internal name?). Also interesting that remove() is not availabel in JavaScript API's.
    Also if I try to bind on "coordinate" property of Bound, no changes seems to be propagated.
    Any idea?
    Thanks,
    --Petr

    Yes it definitely looks like there is a problem with the reference returned by add(). Looks like you can work around it though by getting the guide by reference immediately after adding it using the known index.
    For your question about events. The easiest way to see if there is some event you can listen for is to use the ScriptListener in Photoshop. With that, you can quickly see whether or not an event fires when you expect (there may not be one available to scripting). Once you know the event fires, you can add the handler, using this as a reference: http://cssdk.host.adobe.com/sdk/1.0/docs/WebHelp/app_notes/photoshop.htm.
    I don't see a clear way to check the visibility of guides. Although there may be some magic you can do using descriptors. Maybe we'll get some help from a real Photoshop scripting expert
    Zak

  • How to work with BI using Visual Composer....?

    Hi
    I want to work with BI report and BEx analyzer etc using  Visual Composer.
    I am using Visual Composer 7.1. I  have configured BI system connection using the following link
    http://help.sap.com/saphelp_nwce10/helpdata/en/7e/6dbcea3700452195e3bddaa47c5906/frameset.htm.
    In the above document i didnt understand the following para....
    Creating BI Users in the Portal
    Ensure that the BI back-end users also exist in the J2EE Engine. You can use the BI back end as the user store for the J2EE Engine or you can create the users manually. If you create the users manually, you should ensure that they have the same names as in the BI back-end; this avoids the need to configure user assignment.
    How to check BI back end user also exist in J2EE engine ?
    How to use BI kit in Visual composer. From where can i download BI kit for Visual Composer.
    What is the difference between developing application in VC using the above method and using BI kit.
    Please help me....
    Regards
    Sowmya....

    Hi,
    Without the BI kit you cannot do a lot of things in VC 7.1.
    This kit is not available with 7.1.
    The part that you did not understand meant that if you opening VC using a certain id in portal for eg "user" then the same id should be present in your backend system in this case BW system.
    Without this it wont be able to connect to the system.
    Hope this helps
    Regards
    Nikhil.
    Reward points if you find the answer helpful

  • Working Area for Internal Table

    Hi,
      i know that process of internal table if it is with headerline but i don't know how the data pass to our internal table if it is with out header line plzz give me the example code for that.
    Thanks in advance

    The following example shows two programs with the same function. One uses a header line, the other does not.
    With header line:
    TYPES: BEGIN OF LINE,
    COL1 TYPE I,
    COL2 TYPE I,
    END OF LINE.
    DATA ITAB TYPE HASHED TABLE OF LINE WITH UNIQUE KEY COL1
    WITH HEADER LINE.
    DO 4 TIMES.
    ITAB-COL1 = SY-INDEX.
    ITAB-COL2 = SY-INDEX ** 2.
    INSERT TABLE ITAB.
    ENDDO.
    ITAB-COL1 = 2.
    READ TABLE ITAB FROM ITAB.
    ITAB-COL2 = 100.
    MODIFY TABLE ITAB.
    ITAB-COL1 = 4.
    DELETE TABLE ITAB.
    LOOP AT ITAB.
    WRITE: / ITAB-COL1, ITAB-COL2.
    ENDLOOP.
    Without header line:
    TYPES: BEGIN OF LINE,
    COL1 TYPE I,
    COL2 TYPE I,
    END OF LINE.
    DATA: ITAB TYPE HASHED TABLE OF LINE WITH UNIQUE KEY COL1,
    WA LIKE LINE OF ITAB.
    DO 4 TIMES.
    WA-COL1 = SY-INDEX.
    WA-COL2 = SY-INDEX ** 2.
    INSERT WA INTO TABLE ITAB.
    ENDDO.
    WA-COL1 = 2.
    READ TABLE ITAB FROM WA INTO WA.
    WA-COL2 = 100.
    MODIFY TABLE ITAB FROM WA.
    WA-COL1 = 4.
    DELETE TABLE ITAB FROM WA.
    LOOP AT ITAB INTO WA.
    WRITE: / WA-COL1, WA-COL2.
    ENDLOOP.
    The list, in both cases, appears as follows:
    1 1
    2 100
    3 9

  • Difference between Field symbols and work area for Internal tables

    Hi,
    In ECC versions we all know that we need to declare the internal tables without headerline, and for handling the internal tables we need to use exclusive work areas.
    Currently i have an issue that we have been asked to use field symbols instead of work areas...can any one help me how to use the field symbols and also let me know how it will improve the performance of the program..
    Thanks and Regards,
    Kathir

    Hi
    DATA: WA TYPE ITAB.
    LOOP AT ITAB INTO WA.
    IF WA-FIELD = .....
    ENDIF.
    ENDLOOP.[(code]
    FIELD-SYMBOLS <WA> TYPE ANY.
    LOOP AT ITAB ASSIGNING <WA>.
    ENDLOOP.
    Now the problem is you can't know the name of the fields of the table at runtime, so you can't write:
    IF <WA>-FIELD = .....
    ENDIF.
    Anyway you can create a field-symbols strcturated like the table:
    [code]FIELD-SYMBOLS <WA> TYPE ITAB.
    LOOP AT ITAB ASSIGNING <WA>.
      IF <WA>-FIELD = .....
      ENDIF.
    ENDLOOP.
    I don't know which are the differences for the performance between to use a field-symbol and to use a structure as work-area.
    The differnce between the field-symbols and work-area is the field-symbol is assigned directly to the record, so u don't need to do a MODIFY statament to change something:
    LOOP AT ITAB INTO WA.
      WA-FIELD =
      MODIFY ITAB FROM WA.
    ENDLOOP.
    LOOP AT ITAB ASSIGNING <WA>.
      <WA>-FIELD =
    ENDLOOP.
    These two pieces of abap code do the same action, so probably the field-symbol improve the performance because it do an access directly to the record without to use an external structure as workarea.
    Max

  • NEWBIE HELP - Supress Header with Formula using Parameter

    Post Author: Melanie
    CA Forum: Crystal Reports
    Hi,
    I am new to CR10, and I am working with it and C#.
    I have a report that lists all calls made to a motor vehicle registry agent office after the office is selected from a dropdown on a webpage. I have been asked to make an enhancement whereby the user can select All from a dropdown menu and the report will show all calls for all registry offices. I can do that much and get it to group by the registry agent.
    The problem is the header which currently has the Reg. Office Name, Address, City listed on it. If the user now selects All from the dropdown, I just want it to display text "All Registry Offices". Otherwise, I want the name etc...of the registry office selected. I was trying to add a parameter in the code saying if all offices are selected:
    objReport.SetParameterValue("AllAgents", 1);
    and then in the report, I added a parameter called AllAgents (it showed up in my parameter list). Then I right clicked by the left side of the header, selected Section Expert -> the formula button by Suppressed and typed in this formula:
    if {?AllAgents} = "1"    then trueelse false
    Then when I saved everything, ran the app and try to view the report I get this error:
    Server Error in '/src' Application. -
    The resource cannot be found. Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly.
    Requested URL: /src/reports/temp/CallSummaryByQuestionAgentReport_paincme_21112007140219.pdf
    I can see when I go to where the pdf is generated that the pdf was never created. I am lost and stressed out a little bit by this.
    Any help is genuinely appreciated!

    Hi,
    1. (argh, I can't get it to paste! lol, just a simple little thing... :/):
    Yes it is (you've surely forgotten):source code > Strg or Ctrl A (if you want to send the whole code) > Strg or Ctrl C (copy) > Strg or Ctrl V
    2. garywpaul is surely right, BUT only to show you one way how you could center your image (from my German DW):
    Header 1
    yours:
    <body>
    <div class="container">
      <div class="header"><a href="index-2.html"><img src="images/I%26F%20Header.jpg" alt="I&amp;F Header" width="781" height="271" align="absmiddle" /></a><!-- end .header --></div><div class="sidebar1">
    new:
    <body>
    <div class="container">
      <div class="header">
        <div align="center"><a href="index-2.html"><img src="images/I%26F%20Header.jpg" alt="I&amp;F Header" width="781" height="271" align="absmiddle" /></a></div>
      <!-- end .header --></div><div class="sidebar1">
    Hans-G.
    P.S.
    You should delete the blanks in the names of your images,

  • Working with JSSE using multi-purpose keystore

    Hello,
    I am currently working on an application which employs the JCA for providing signatures, authenticating users etc., but also working with JSSE.
    More specifically: The application must be able to verify signatures on code packages created by known users and loaded at runtime; but for communication with other parts of the application, it shall use SSL connections.
    Now I worked through the JSSE manuals and I was able to set up a simple SSL application with client and server, using all the getDefaults() I could get a hold on.
    In the final application that I am working on, I will have a keystore with quite a lot of keys from users, public and possibly private ones, and also a key for the SSL communication. I have the strong feeling that I will not see many getDefault()s anymore.
    My problem is that by looking at the API, I don't have any clue how to tell the JSSE which key to use for the SSL connection from the keystore holding possibly many keys of users.
    Moreover, how do I pass the passphrase for unlocking the private key to the JSSE if it is not equal to the keystore password? (Which, by the way, seems to me to require passing via the command line - argh!)
    Help would be greatly appreciated.
    Michael

    I've got it.
    The secret is to create an own X509KeyManager. This key manager gets its keys from the keystore, so I have the chance to provide an alias which is intended to be used for SSL and to provide the key password.
    public class SpecialX509KeyManager implements X509KeyManager {
    public SpecialX509KeyManager(KeyStore keys, String sSSLAlias, String sPassword) {
    // browse the keystore,
    // get the key which has the given alias - and only this one -
    // and use the password to decrypt it
    // keep the key and its certificate chain
    The keystore must be loaded before, using the keystore password:
    KeyStore keys = KeyStore.getInstance("JKS");
    keys.load(new FileInputStream("server.ks"), "keystorepw".toCharArray());
    KeyManager[] akm = new KeyManager[1];
    akm[0] = new SpecialX509KeyManager(keys, "ssl", "ssl012");
    SSLContext sc = SSLContext.getInstance("TLS");
    sc.init(akm, null, null);
    SSLServerSocketFactory sslSrvFact = sc.getServerSocketFactory();
    That is, I have a keystore, using the password "keystorepw", containing keys with one using the alias "ssl" and the password "ssl012".
    Michael

Maybe you are looking for

  • Problem with a recording

    You know how you can drag and shrink a recorded line so that only part of it will play? Usually, you can always drag and expand it back to its original size. Somehow, my recording shrank so much that even if I zoom in all the way, I can select it and

  • Getting data from afru taking long time

    I have perform a select statement it takes a long time. SELECT SINGLE * FROM afru           WHERE werks = i_aufm2-werks             and wablnr EQ i_aufm2-mblnr             and aufnr eq i_aufm2-aufnr             AND stokz = 'X'. is any way to select e

  • Getting Data from Input Structure (in Web Dynpro)

    Hi All, in my Web Dynpro Application, i have problems to get the data form my Input-Structure. In the execution-method I implement the following code, to show the input parameters in my form (in context-nodes): IGPStructure inputStructure = execution

  • Upgrading to New iMac 2.4 ghz from iMac 1.8 ghz G5 - Logic 8 upgrade

    Hello all, Got a question and have not searched the forms yet for the answer but thought I would ask for a quick response.... I'm upgrading my iMac from 1.8 G5 to one of the New iMac 2.4 ghz. Will be buying this week. I had Logic 7 running on the old

  • Vision builder AI 可以用USB相机并使用外部触发吗

    刚刚接触NI的产品,下载了VBAI的评估版,觉得使用非常方便.但碰到一个问题,使用USB相机如何使用外部触发呢?请别笑话,我是用笔记本自带的摄像头测试的.我觉得外部触发通过serial I/O给电脑一个信号,然后电脑采集相机的图象,再作分析检测,应该可以实现.可是找来找去找不到这方面的资料,太困惑了.