Moving data between tables (how to find out if the 2nd table is empty)

Hi,
I have 2 tables, and I'm copying records from one table to another.
I've followed the Wiki: [https://www.sdn.sap.com/irj/sdn/wiki?path=/display/vc/movingdatabetween+tables]
So far, everything works ok.
Here is my question: how do I get the number of records passed?
I mean, how do I know the number of rows in the 2nd table? (Remember that this number is variable, because it depends on how many rows I've inserted and deleted on the 2nd table).
I've tried to achieve that using a data store with a numeric field, but I couldn't find the way to increment/decrement the numeric field on data store, and insert/delete the row on table at the same time .
All I want is to find out if the 2nd table is empty or not.
Any ideas to solve this?
Thanks in advance!
Help will be point-rewarded.
Marcelo

Hi Ahmed
thanks for your reply, it was very helpful!! (I've assigned points to you)
However the user can add twice or more times the same row... so the counter doesn't reflect the real number of rows in the 2nd table.
I've partially solved this also using a data store with a parameter called key_list, where I add (I mean, concatenate) the key field for the selected row.
So, if I have a table with 4 rows with key fields "key1", "key2", "key3", the parameter key_list would get "key1;key2;key3".
So far, it's ok. But when I remove a row previosly added.... I can't remove the key from the key_list parameter. (I mean, from 2nd table I choose to remove the "key2" row, but I don't know how also remove the key name from the key_list)
I hope be clearly enough.
Any help will be really appreciated and point-rewarded.
Thanks again.
Best Regards
PS: is there any way of "mark" a row that has been added to the 2nd table? I mean, using (for example) a hidden boolean field named "added", that becomes true when the selected row is added to the 2nd table.

Similar Messages

  • How to find out that the database table is empty

    Hello all,
    How to find out in ABAP in the best performant way, that the database table is empty. The table could have several milions of records or be empty. SELECT count( * )  looks to me as not the best way.
    Kind regards
    Radim Benek
    Moderator message: FAQ, please search for previous discussions of similar topics.
    example: "SELECT SINGLE" vs. "SELECT UP TO 1 ROWS"
    Moderator message: Please Read before Posting in the Performance and Tuning Forum
    Edited by: Thomas Zloch on Aug 11, 2011 5:06 PM

    Hi,
    One approach is:
    check lt_mytable is initial.
    This will be true if there are no lines.
    Another:
    describe table lt_mytable lines lv_count
    if lv_count = 0.
    "Empty
    Thanks.
    Anitha a

  • How to find out what the underlying table/query of a form in Oracle Apps.

    Hi
    I am trying to find out who owns the underlying objects of a query when a user runs the Transactions > Line_Items form for Receivables .
    I have selected Help > Record History but I get a message Record History not available here.
    The query is running slow and I'd like to see if the objects have been analyzed lately.
    Thanks
    Andy

    Hi
    I should have said in the ticket that this is version 11.5.10
    It was close to giving me the answer I need. It gives me the following details. Unfortunately it doesn't give me the underlying sql. I hhave tried using v$session and sys.v_$sql but the sql is over 1000 characters long so I dont get to see the table/object being referenced.
    I appreciate the feedback.
    Thanks
    Andy
    Database Server
    RDBMS : 10.2.0.4.0
    Oracle Applications : 11.5.10.2
    Machine : alabama
    User : APPS
    Oracle SID : accausr1
    System Date : 12-SEP-2011 13:33:58
    Database Server PID : 16875
    Session SID : 1065
    SERIAL# : 1273
    AUDSID : 201640233
    Database CPU Usage (in secs) : 8.85
    Forms Server
    Oracle Forms Version : 6.0.8.27.0
    Application Object Library : 11.5.0
    Machine : AUSTIN
    Forms User CPU (secs) : 3.430000
    Forms System CPU (secs) : 0.840000
    Forms Process ID : 6347
    Forms Server Environment Variables
    AU_TOP : /oracle/finapps/accausr1/accausr1appl/au/11.5.0
    FDBDMCHK : [Unset]
    FDFGCXDBG : [Unset]
    FDSQLCHK : [Unset]
    FDUDEBUG : [Unset]
    FNDNAM : APPS
    FND_TOP : /oracle/finapps/accausr1/accausr1appl/fnd/11.5.0
    FORMS60_APPSLIBS : APPCORE FNDSQF APPDAYPK APPFLDR GLCORE HR_GEN HR_SPEC ARXCOVER
    FORMS60_CATCHTERM : 1
    FORMS60_ERROR_DATETIME_FORMAT : [Unset]
    FORMS60_ERROR_DATE_FORMAT : [Unset]
    FORMS60_FORCE_MENU_MNEMONICS : 0
    FORMS60_MAPPING : http://austin.accanet.org:8002/OA_TEMP
    FORMS60_MMAP : [Unset]
    FORMS60_OUTPUT : /oracle/finapps/accausr1/accausr1comn/temp
    FORMS60_OUTPUT_DATETIME_FORMAT : [Unset]
    FORMS60_OUTPUT_DATE_FORMAT : [Unset]
    FORMS60_PATH : /oracle/finapps/accausr1/accausr1appl/au/11.5.0/resource:/oracle/finapps/accausr1/accausr1appl/au/11.5.0/resource/stub:/oracle/finapps/accausr1/accausr1appl/au/11.5.0/forms/US
    FORMS60_RESOURCE : [Unset]
    FORMS60_TIMEOUT : 5
    FORMS60_USER_DATETIME_FORMAT : DD-MON-RRRR HH24:MI:SS
    FORMS60_USER_DATE_FORMAT : DD-MON-RRRR
    FORMS60_USE_CBO : [Unset]
    GWYUID : APPLSYSPUB/PUB
    NLS_DATE_FORMAT : DD-MON-RR
    NLS_DATE_LANGUAGE : AMERICAN
    NLS_LANG : AMERICAN_UNITED KINGDOM.WE8ISO8859P1
    NLS_NUMERIC_CHARACTERS : .,
    ORACLE_HOME : /oracle/finapps/accausr1/accausr1ora/8063
    ORACLE_PATH : [Unset]
    ORA_NLS_CHARSET_CONVERSION : [Unset]
    TNS_ADMIN : /oracle/finapps/accausr1/accausr1ora/8063/network/admin/accausr1_austin
    TWO_TASK : accausr1
    Current Form
    Form Application : Receivables
    Form Name : ARXTWMAI
    Form Path : /oracle/finapps/accausr1/accausr1appl/ar/11.5.0/forms/US/ARXTWMAI.fmx
    Form Version : 11.5.200
    Form Last Modified : $Date: 2005/01/07 11:50 $
    Forms
    APPSTAND : 11.5.33
    ARXRWMAI : 11.5.21
    ARXRWMAI : 11.5.21
    ARXTWMAI : 11.5.200
    FNDSCSGN : 11.5.122
    Form Menus
    FNDMENU : 11.5.51
    Forms PL/SQL
    APPCORE : 11.5.151
    APPFLDR : 11.5.55
    ARXARWIN : 11.5.65
    ARXBOEIF : 11.5.2
    ARXCWUTL : 11.5.8
    ARXPLCOM : 11.5.68.15104.2
    ARXQRCIF : 11.5.2
    ARXRCTIF : 11.5.2
    ARXRWBAT : 11.5.96
    ARXRWMAI : 11.5.19
    ARXTWBAT : 11.5.11
    ARXTWMAF : 11.5.27
    ARXTWMAI : 11.5.302.15104.9
    ARXTWUTL : 11.5.39.15104.2
    FNDSQF : 11.5.111
    GHR : 11.5.174
    GLOBE : 11.5.38
    GMS : 11.5.230.90.7
    IGILUTIL2 : 11.5.97
    IGILUTIL : 11.5.29
    OPM : 11.5.33.115100.2
    PQH_GEN : 11.5.124
    PSA : 11.5.162
    PSAC : 11.5.16
    PSB : 11.5.24
    VERT : 11.5.6

  • How can we find out that the Z table is adjusted or not???

    Dear Friends,
    How can we find out that the Z table is adjusted or not???
    I have activated it but I need to se that the table is adjusted or not? I know we can do it from SE14 but I don't have an authorization ,
    Thnaks,
    Sridhar

    Hi, Thanks for the reply,
    As per ur suggestion of path direction I have checked the table in production and development both.
    In my Z table, I have 2 key fields and for those 2 key fields the primary indexs are created automaticaly and displayed in Developement but in Production there is no indexs are created for those 2 fields.
    Could you please guide me what could be the reason?
    Thanks in advance.
    Regards
    Sridhar

  • How to find out whether the system user is a vendor or a purchaser

    Hi,
    I am working in SRM 5.0. I have a requirement that some fields of Bid invitation can be visible by purchaser but not to bidder.
    How to find out whether the system user (user id though which system logged in) is a vendor or a purchaser. Kindly help me to resolve this issue.
    Sushmita Singh

    check his role.
    is surrogate bidding available for that bidder.
    via surrogate bid , purchaser can submit bid on behalf of the bidder.
    masa is correct
    pposa_bbp - search via user . so he might be  a purchaser.
    maintain business partner -supply your bidder bp number -edit
    go to bidder data .Under bidder data you must flag "PERMIT PROXY BIDDING"
    regards
    Muthu
    br
    muthu

  • How to find out about the SMTP Server

    Hi,
    I have been trying to configure groupware in the portal - in particular I want to enable the sending of emails through the portal. I already have a how-to-guide that that seems to explain the steps quite well. However, it mentions that I need to know the SMTP Server of the email. Can you tell me how to find out about the SMTP Server? Where do I need to look for the name of it?
    Thank you and regards,
    Katharina

    Hi Katharina,
    you need the SMTP server of your company. This means you can't look for it in the portal, but have to ask the responsible person in your company.
    Kind regards,
    dominik

  • Where can i find out all the standared table name

    Dear Friend,
    could you please tell me where can i find out all the standard table names,
    ( for example: tstc for find all the T-codes) .

    HI Srinivas,
      DD02L has the name of all the TABLES in the SYSTEM. It has both SAP and Customer's TABLES.
      First of all exclude all Z* and Y* tables from dd02L. Still there are many tables in CUSTOMER NAMSPACE.
      So make a program, LOOP at all entries of DD02L and then check the name space of each entry using the function module:-
    <b>TRINT_OBJECT_NAMESPACE_INFO</b>.
    If the namspace is not EQUAL to 'S', then dont count that entry else add one to the counter.
      This would tell you all SAP Standard Tables in the system.
    Thanks and regards,
    RAVI :).
    NOTE: Points keep me alive on SDN .

  • What is ilife ?? is it comes with macbook pro 13in ?? how to find out in the system

    what is ilife ?? is it comes with macbook pro 13in ?? how to find out in the system?? I am using OSX 10.8.5

    These are the iLife applications:
    http://www.apple.com/ilife/
    They come with every new Mac.  If they are not in your applications folder, download them from the App store.
    Ciao.

  • How to find out structure of internal table?

    Hi
    is there any way how to find out name of structure upon which internal
    table was created?
    i got internal table passed to function module by any table
    type. There can be different types of table passed in. Inside of
    module a need to find out the structure of table.
    I've found a tricky way how to find this information using following
    command 'DESCRIBE FIELD dobj INTO td.', but its probably not a correct
    way because using this command is not recommended in application
    programs.
    Is there any function module, or something i can use for getting this information?
    Thanks

    Thanks very much
    This has solved my problem:
      DATA descr_ref TYPE ref to cl_abap_typedescr.
      DATA tabname TYPE string.
      descr_ref = cl_abap_typedescr=>describe_by_data( itab ).
      tabname = descr_ref->absolute_name.

  • How to find out important fields in table like MARA?

    How to find out important fields in a table for example like MARA?
    Details: In R/3 or ECC table for example MARA;
    1) How to find out what are the important fields?
    2)Does the table have only key figures not characteristics right?
    3) There are so many tables in FI; Can you please tell me what are the important tables?
    4) There is any easy automatic way to figure out that the particular datasource for example 2lis_02_item is pulling data from so and so table. I like to know the process not the results please.
    Thanks in advance.
    York.

    Hi York,
       Let me go by points:
    1. There is nothing like important fields ... The question could be Key fields ... the fields which identify a record uniquely ... If you go to SE11, and go inot the dispaly of MARA table ... you will see that there is tick mark under key to indicate that the field is a key field ... All the fields which are so marked would identify a record in the table uniquely. If your question is otherwise ... (Important fields) ... then it depends on the purpose you wnat to meet ... Some fields might be important for me but not for you ... so there is not hard nad fast rule for important fields.
    2. No... Tables in R/3 or ECC would contain both Key figures and characteristics.
    3. Important tables in FI would be BKPF, BSEG and BSET.
    4. The procedure for finding out which table are used by say 2lis_02_item would be different from that of other non LO/LIS extractors.
    In case of LO/LIS turn on the trace (below process) while populating the setup tables and for thoers while executing RSA3.
    1. Open one session and go to ST05, click on "Activate Trace"
    2. Open another session and execute the transaction you want to track for the tables it is going to hit.
    3. Go to the session of point 1 above and click on DEACTIVATE TRACE
    4. Click on DISPLAY Trace
    This will show you all the tables that were hit while extracting data. Point to remember here is ... it will hit some standard tables as well ... so you will have to filter out what is relevant from what is not.
    Hope this helps.
    best regards,
    Kazmi

  • How to find out all the tables in a schema with a particular column

    Hi
    Is there a way to find out all the tables in schema1 that has col1 as one of the columns?

    select table_name from dba_tab_cols where owner='schema' and column_name='col1';

  • How to find out all the tables associated with particular T-code or Program

    Hi All,
    In 4.6B we have a transaction code SE49, where we can see all the tables associated with particular Transaction code or Program.
    But in ECC 5.0 or in ECC 6.0 this transaction code is not available.So is there any alternative where i can find out all the tables associated with particular T-code or Program.
    Thanks
    Shubham

    Hi,
    you are right, Transaction SE49 as well as SE48 do not exist anymore I'm afraid, they        
    are discontinued.                                                              
    You might try to create a transaction variant:                                        
    1) Start SE93 to create a transaction variant                                         
    2) Specify a name, eg. ZSE49, and choose the first option:                            
       "program and screen (dialog transaction)                                           
    3) Here specify SAPMSEUZ as program, and 200 as screen number                         
    4) Choose a suitable development class (package) if you want it to be                 
       transportable or Local (=$TMP) if non-transportable                                
    5) press Save                                                                         
    Same applies for SE48, same program but dynpro 100.                                   
    Sorry for not being able the reasons behind the decision to discontinue            
    these transactions. I suppose at least part of the functionality was               
    integrated in SE38.           
    Best regards
    Erika

  • How to find out that the card in a given NIDAQ slot is a DSA card?

    In the description of DAQ_Op(...) function in the traditional NIDAQ function reference one reads:
    "buffer" is an integer array. "buffer" has a length equal to or greater than count.
    When DAQ_Op returns with an error number equal to zero, buffer contains the acquired data.
    For DSA devices, buffer should be an array of i32. These devices return the data
    in a 32-bit format in which the data bits are in the most significant bits.
    Question 1: How to find out programmatically that the card in a given NIDAQ slot is a DSA card?
    Question 2: How many MSB carry the information? How do I find out bit-ness of the card (programmatically)?
    The obvious solution to create and keep updated the table/fil
    e with the data for all existing DAQ cards is unacceptable. This could be maintained by NI itself, but not by 3rd party developpers, like me.

    Bryan, thanks for your answer.
    I hope that my NIDAQ-wish-list will not only reach NIDAQ developers but some of it will be implemented in the next versions of NIDAQ.
    I should say that I am quite pessimistic because I was sending similar requests via German support few YEARS ago and I am still even do not know whether they reached developers or not. Even if yes, the present NIDAQ still does not have these functions and this means that NI takes 2..4 years to react on the feedback.
    At the moment I have no choice, and I do maintain self-made info file (nidaq.ini). But beleive me, it is a pain in the @ss to scan help files and manuals of the DAQ cards which I've never seen just to include info in nidaq.ini. And when my customers of a brand new NIDAQ ca
    rd call and wonder why the card is not reacognized by my application correctly, I tell to them that this is basically fault of NI. Because NI provides no way to get card info. I am doing my best analysing error codes, but it does not help in all cases. Sorry, guys, but you left no choice to me.
    As for NIDAQmx, this is not a solution either. I am not going to rewrite my existing and working rather big application. It could be a good suggestion for those who just starts developing a new applications from the scratch, but not for those who almost finished it. Even for those who begin now, NIDAQmx may not be a good choice, because, as I saw in this forum, it does not support all cards that are supported by NIDAQ. It also looks like that instead of improoving, developing and fixing NIDAQ, NI dicided to change API completely. It is not yet clear to me whether NIDAQmx is supposed to substitute NIDAQ in the future or not. If not, I would concentrate on improoving trad. NIDAQ. If yes, it wou
    ld be a disaster for many developers. :-(
    Anyway, I hope that the interaction between NIDAQ team and application developpers will be improoved, and we will see some results of this feedback.

  • How to find out what the latest update is for something from apple's site?

    i've never been able to do this, and has been a recurring problem for many years:
    how can you, using apple's web site -- presumably the support or downloads section -- find out what the latest update for/of a certain product is?
    without going into the details, the software update app is of no use to me.
    for example, i have a airport extreme base station 54 mbps. how do i go about finding out what it's latest software is? do such products not have a web page which has the latest update linked to from it?
    why is it so hard, impossible i find, to find out what the latest software is?
    any pointers much appreciated. (i'm not particularly looking for the answer to "what't the latest update for a airport extreme base station 54 mbps?" but a general method for finding out the latest update for anything using apple's web site)
    thanks very much.

    If you use the Advance Search function:
    http://search.info.apple.com/
    you can filter results to give downloads for the search words airport extreme base station. The return will be in date order from newest to oldest. Yo ucan also designate word pairs of groups to narrow the search.

  • How to find out all the text elements in the report using Java?

    How to trace the contents of an rpt file?
    I am able to open the rpt file in my report viewer but can not trace it using the JAVA code.
    Actually, I need to find out all the text elements of rpt (Report) file and replace them with the contents of resource bundle.
    My Java code to open a report is given below:
    import com.crystaldecisions.reports.sdk.ISubreportClientDocument;
    import com.crystaldecisions.reports.sdk.ParameterFieldController;
    import com.crystaldecisions.reports.sdk.ReportClientDocument;
    import com.crystaldecisions.sdk.occa.report.data.ConnectionInfo;
    import com.crystaldecisions.sdk.occa.report.data.ConnectionInfos;
    import com.crystaldecisions.sdk.occa.report.data.Fields;
    import com.crystaldecisions.sdk.occa.report.data.IConnectionInfo;
    import com.crystaldecisions.sdk.occa.report.data.ParameterField;
    import com.crystaldecisions.sdk.occa.report.data.ParameterFieldDiscreteValue;
    import com.crystaldecisions.sdk.occa.report.data.Values;
    import com.crystaldecisions.sdk.occa.report.lib.IStrings;
    import com.crystaldecisions.sdk.occa.report.lib.PropertyBag;
    import com.crystaldecisions.sdk.occa.report.lib.PropertyBagHelper;
    import com.crystaldecisions.sdk.occa.report.lib.ReportSDKException;
    import com.crystaldecisions.sdk.occa.report.reportsource.IReportSource;
    public String viewRpt()
                   //1.) Setting Database Infos
                            IConnectionInfo iConnectionInfoObj=setDatabaseConnectionInfos();
                   //2.) Setting Report Path
                   String reportPath=u201DE:
    was60
    rptFilesLocation
    u201D;
                   reportPath=(reportPath!=null)?                                             reportPath:AppConstants.CONSTANTS.BLANK;
                   String reportName="report1.rpt";
                   String reportFullPath = reportPath +   rptName;
                 //3.) Setting Report Source
                             ReportClientDocument reportClientDoc = new ReportClientDocument();
                                              reportClientDoc.open(reportPath, 0);
                  IReportSource reportSource = reportClientDoc.getReportSource();
                  setReportSource(reportSource);
                  reportClientDoc.close();
              //4.) Setting the Fields Starts
              setFieldsCrystal(null);
              Fields fields = new Fields();
              ParameterField pfield1 = new ParameterField();
              Values vals1 = new Values();
              ParameterFieldDiscreteValue pfieldDV1 = new ParameterFieldDiscreteValue();
              pfield1.setName("@parameter1");
              pfieldDV1.setValue(u201Cvalue1u201D);
              vals1.add(pfieldDV1);
              pfield1.setCurrentValues(vals1);
              fields.add(pfield1);
              pfield1 = new ParameterField();
              vals1 = new Values();
              pfieldDV1 = new ParameterFieldDiscreteValue();
              pfield1.setName("@parameter2");
              pfieldDV1.setValue(u201Cvalue2u201D);
              vals1.add(pfieldDV1);
              pfield1.setCurrentValues(vals1);
              fields.add(pfield1);
              setFieldsCrystal(fields);
              //Setting the Fields Ends
    The sample jsp code to view the report is as follows:
    <%@taglib uri="http://www.businessobjects.com/jsf/crystalreportsviewers"
         prefix="bocrv"%>
    <bocrv:reportPageViewer viewerName="CrystalViewer"
                                                 reportSource="#{CrystalReportBeanObject.reportSource}"
                                                 displayToolbarRefreshButton="false"
                                                 allowDatabaseLogonPrompting="false"
                                                 allowParameterPrompting="false"
                                                 databaseLogonInfos="#{CrystalReportBeanObject.connectionInfosCrystal}"
                                                 parameterFields="#{CrystalReportBeanObject.fieldsCrystal}"
                                                 displayGroupTree="false" displayToolbarLogo="false"
                                                 displayToolbarToggleTreeButton="false"
                                                 enablePageToGrow="false" height="540"
                                                 zoomPercentage="100" width="750"
                                                 allowDrillDown="false"
                                                 displayToolbarPrintButton="true"
                                                 printMode="PDF"
                                                 ></bocrv:reportPageViewer>
    Edited by: JayKumarSharma on Mar 23, 2011 12:42 PM

    This is how you retrieve all the text fields in the reort:
    ReportObjects reportObjects = (ITextObject) oReportClientDocument.getReportDefController().getReportObjectController().getReportObjectsByKind(ReportObjectKind.text);
    for(int i=0; i< reportObjects.size();i++)
    ITextObject textObject = (ITextObject)reportObjects.get(i);
    // use ReportObjectController to modify the text object.
    If you want to modify the contents of the text element, you can do it as follows:
    TextObject oTextObject = new TextObject();
    Paragraphs oParagraphs = new Paragraphs();
    Paragraph oParagraph = new Paragraph();
    ParagraphElements oParagraphElements = new ParagraphElements();
    ParagraphTextElement oParagraphTextElement = new ParagraphTextElement();
    oParagraphTextElement.setText("This is the new text field");
    oParagraphTextElement.setKind(ParagraphElementKind.text);
    oReportClientDocument.getReportDefController().getReportObjectController().modify(textObject, oTextObject);
    oReportClientDocument.save();

Maybe you are looking for

  • Set text of container in DW CS3

    I'm building a site using CSS in DW CS3 (bought in May 2006) that has some photo gallery pages where a large image changes per thumbnails to its right that are clicked. The thumbnails are in their divs and the wished-for big image should appear in a

  • I am not able to delete a blank message in model C...

    When I tried to delete in box messages its being being displaying as "Error occurred, deletion not completed." and its not deleting the received messages because there is one blank message in the list. Moderator's Note: The post was edited because th

  • J2SE v 1.4.2_04 SDK on Linux (ubuntu) install problem

    I've seen this question posted on this forum a number of times but no-one seems to know the answer. I would love an answer to this as have already spent far too much time trying to sort it out. I am trying to install the j2me mobile development kit:

  • Getting files into idvd

    ok i have this dvd of a music video made at an all night party...not copyrighted but there are 2 and i want them into dvd i'm making in idvd but i don't know how to do that i know how to rip them with mac the ripper or save them from disk utilitly in

  • Capturing USERID in report

    Does anyone know how to capture the userid and use it as a parameter in a portal report?