Duplicating a record?

In a form, I'd like to create a Duplicate Record button to copy the current record as a new one, blanking out a few key fields for the user to re-enter. This will save the user from re-entering the bulk of the info again.
Any suggestions on how to do this?

Thanks,
- insert the selected values into the table
This is not in the procedure itself, correct? Because the user will first need to enter the few fields that are different, such as invoice number, some of which are mandatory.
- create a redirect on the new row or id
Please explain what you men and how to do this.
If you can post the procedure you use, it would be very helpful.
Thanks again.
Gary

Similar Messages

  • Duplicating a record and writable once setting

    Hi,
    In my vendor repository we have a field that is set to writable once which should mean that once you have saved the record the first time you can not edit this field anymore. When I duplicate a record, to make a new vendor and need to change this field as well I get an error message 'a new value was supplied for a non-empty field configured as 'Writable once', version 7.1. [7.1.03.53]'
    I wonder how this can be? Does MDM automatically save the record once you duplicate? This should not be this way, since you duplicate you want to make changes to the record afterwards.
    Is there some solution or workaround for this?
    Henning

    Hi,
    This is not through the portal or anything but directly in MDM. I just right click - select duplicate, correct the data (at this time I have not saved the record) - and then try and save the record and it gives this error.
    I know writable once you are only supposed to write the data once and it is not editable once you have saved the first time, but when duplicating and correcting the data before saving should allow this.
    I will take a look at the change log for SP05 to see whether this has been fixed then.
    Are there no others that have experienced this with SP03?
    Henning

  • Address Book - duplicating a record

    One of the most basic functions of any database ever created is "Duplicate Record." The verb duplicate, not the noun. If I want to send USPS mail to ten colleagues at this address:
    John Doe
    President
    Acme, Beta and Crumhorn Widgets
    10234 Long Winding Road
    San Juan Capistrano, California 9xxxx-xxxx
    I would have to type this address ten times. I can't simple duplicate the record and change the name of the person.
    Unless I'm missing something.
    I find the whole data entry interface klunky. Also, in Touchbase, years ago, I could create a log in "Notes" of every conversation and could enter the time and date of the conversation with one click.
    I don't need 85,000 iPhone apps. I need the most basic apps to work as well as they did in 1997.
    Any enlightenment would be greatly appreciated.

    This copy/paste process does not work as there is no place to paste the file to. I've tried unsuccessfully to do this as I am interested in just an efficient way to use Address Book. I have a contact who is changing jobs - leaving a public sector job for a private sector one - but I want to keep the old information for whoever will fill the public sector post plus modify my contact's information for his new position. Otherwise the process is rather tedious and inefficient, not what I would call hallmarks of Apple products in my 20+ years experience. I've been rather impressed with the way Address Book interfaces with iWork so the idea that this application is not designed for business is ludicrous.

  • Duplicating a Record with a Webserver Application

    Hello,
    We have a Designer generated webserver application. The users want me to add a button that will duplicate the existing record, except for a few fields. They then want to change a few fields, and save it as a new record.
    I know how to add the button using User/Help Text, but I do not think I can go to forminsert, actioninsert, actionview, or anywhere else with the data. If anyone has conquered a similar problem, please share the solution with me.
    Thank you,

    Kevin, are you actually trying to insert the record and then show it to them so they can make changes? In that case, you could
    -- build your button, with a hidden value for the current record's primary key
    -- have it call a procedure you build which would
    -- get a primary key for the new record
    -- insert that record
    -- commit
    -- call queryviewbykey with the record identifier
    so they get an update page
    If you don't want to insert the record before they see the page, then it's a little more complicated. Here's how I'd do it.
    -- have your procedure (as above) set a package-level variable to the key of the original record
    -- put an onLoad into your Insert page which calls a Javascript function
    -- dynamically build the Javascript for that function in a packaged utility function called from your bottom of page text. If the package-level variable is not null, you take the values from the record it points to and build Javascript which will set the Form values. You'll need to look at the HTML and Javascript source for the Insert page to get the variable names, etc. If the package-level variable is null, as it will be for the normal "New" button, then you just create a function that doesn't do anything.
    -- then call ActionView with the right action for an insert
    -- jim

  • Duplicating returned record

    hello,
    I am looking for a way to write a SQL query that will return some rows more than once according to a predefined logic.
    example logic is:
    44 201 1400 = 44 201 0000 = 44 000 0000 = 00 000 0000
    my table is
    44 201 1400
    44 201 0000
    44 000 0000
    00 000 0000
    44 201 2200
    since 44 201 2200 is also equal to 44 201 0000 = 44 000 0000 = 00 000 0000
    I need to following output
    44 201 1400
    44 201 0000
    44 000 0000
    00 000 0000
    44 201 2200
    44 201 0000 <-- duplicated
    44 000 0000 <-- duplicated
    00 000 0000 <-- duplicated
    any suggestion will be appreciated.
    Thank you
    Lior

    Thanks,
    - insert the selected values into the table
    This is not in the procedure itself, correct? Because the user will first need to enter the few fields that are different, such as invoice number, some of which are mandatory.
    - create a redirect on the new row or id
    Please explain what you men and how to do this.
    If you can post the procedure you use, it would be very helpful.
    Thanks again.
    Gary

  • Automatically eliminating a record at the begining of a new month

    Hello;
    I have a little app I am building that makes a list of records organized by the month the record falls in. this is how it looks:
    JUNE
    Record title goes here as a link
    record date
    the location of the event
    <!--- all the records for JUNE fall in here, the link goes to a page with all the details --->
    JULY
    same thing as June
    and so on....Now as it is the code works fine, BUT when lets say it goes to JULY, the JUNE records are still visible, I want them to go away after the month passes. Is that possibly an easy task using the code I wrote for this? The don't have to be deleted from the DB, but they need to "disappear" in the web site when the month passes.
    This is the code:
    <cfquery name="gTempx1" datasource="#APPLICATION.dataSource#" blockfactor="5">
    SELECT DISTINCT(YEAR(eventDate)) AS gTempx2, display
    FROM events
    WHERE display = 0 AND YEAR(eventDate) >= #dateFormat(now(), 'yyyy')# ORDER BY YEAR(eventDate) ASC
    </cfquery>
    <cfset distintYearEventDate = DateFormat(now(), "yyyy")>
    <cfset tempdx = DateFormat(now(), "mm/dd/yy")>
                    <cfif DateFormat(now(), "mm/dd/yy") GTE "#tempdx#">
                      <cfoutput query="gTempx1">
                        <cfset gTempx5 = "#gTempx1.gTempx2#">
                        <cfif DateFormat(now(), "mm/dd/yy") GTE "#tempdx#">
                          <cfset gTempx6 = DateFormat(now(), "yyyy")>
                          <cfset gTempx7 = DateFormat(now(), "mmmm")>
                          <cfset distintYear = DateFormat(now(), "yyyy")>
                        </cfif>
                        <cfquery name="gTempx3" datasource="#APPLICATION.dataSource#" blockfactor="5">
                          SELECT DISTINCT(MONTH(eventDate)) AS gTempx4, display
           FROM events
           WHERE display = 0 AND YEAR(eventDate) = #gTempx5#
                          ORDER BY MONTH(eventDate) ASC
                        </cfquery>
                        <cfset dateAdd = DateFormat(now(), "mmmm")>
                        <cfset thirtyTempx1 = "#dateFormat(dateAdd('d',-30,Now()),'mm/dd/yyyy')#">
                        <cfloop query="gTempx3">
                          <cfset gTempx6 = "#gTempx4#/01/#gTempx5#">
    <b><u>#ucase("#DateFormat(gTempx6,'mmmm YYYY')#")#</u></b>
    <cfquery name="GetRecordevent" datasource="#APPLICATION.dataSource#">
          SELECT events.title AS ViewField2, events.eventDate AS ViewField3, events.location AS ViewField5, events.ID AS ID
          FROM events
          WHERE display = 0 AND YEAR(eventDate) = #gTempx5# AND MONTH(eventDate) = #gTempx3.gTempx4#
          ORDER BY DAY(eventDate) ASC
                          </cfquery>
                          <cfloop query="GetRecordevent">
    <a href="detail.cfm?ID=#ID#" class="subNav">
    #ViewField2#
    #dateformat(ViewField3, "mmm-dd-yyyy")#<br>
    Location: #ViewField5#
    </cfloop>
    </cfloop>
    </cfoutput>
    </cfif>
    can anyone help me out? Don't know what to tweekout on this to make it rotate through the months like a normal calendar.
    thank you
    CFmonger

    I am getting someplace now.
    I have been messing with the where statement. I have it so it will eliminate the previous months records, but it is duplicating the records now and makeing them for lets say I have a record is set for July 2009 that same record will appear as July 2010 as well.
    This is what I changed my 2 querys to:
    q1
    <cfquery name="gTempx1" datasource="#APPLICATION.dataSource#" blockfactor="5">
                    SELECT DISTINCT(YEAR(eventDate)) AS gTempx2, display
                    FROM events
                    WHERE YEAR(eventDate) >= #dateFormat(now(), 'yyyy')#
        ORDER BY YEAR(eventDate) ASC
                   </cfquery>
    q2.
    <cfquery name="gTempx3" datasource="#APPLICATION.dataSource#" blockfactor="5">
                          SELECT DISTINCT(MONTH(eventDate)) AS gTempx4, display
           FROM events
           WHERE eventDate > #NOW()#
                          ORDER BY MONTH(eventDate) ASC
                        </cfquery>
    q3.
    <cfquery name="GetRecordevent" datasource="#APPLICATION.dataSource#">
                            SELECT events.title AS ViewField2, events.eventDate AS ViewField3, events.eventTime
                            AS ViewField4, events.location AS ViewField5, events.ID AS ID
          FROM events
          WHERE eventDate > #NOW()# = #gTempx5# AND MONTH(eventDate) = #gTempx3.gTempx4#
          ORDER BY DAY(eventDate) ASC
                          </cfquery>
    can anyone help me fix this so it works properly. for some reason it is making the same records appear every year.

  • Duplicate record identifier and update

    My records look like 
    Name City Duplicateindicator 
    SAM   NYC   0
    SAM   NYC1 0
    SAM    ORD  0
    TAM   NYC  0
    TAM   NYC1  0 
    DAM   NYC  0  
    for some reason numeric character are inserted into city which duplicated my records , 
    I need to 
    Check for the duplicate records by name ( If name is repeating ) check for city if they  having same city (NYC and NYC1) are consider same city here. I am ok to do this for one city at a time.
    SAM has a duplicate record as NYC and NYC01 , the record which is having  SAM   NYC1 0 must be updated to SAM   NYC1 1 

    Good day tatva
    Since the Cities names is not exactly the same, you will need to parse the text somehow in order to clean the numbers from the name, this is best to do with SQLCLR using regular expression (If this fit your need, then I can post the CLR code for you).
    In this case you use simple regular expression replace function.
    On the result of the function you use simple query with the function ROW_NUMBER over (partition by RegularExpressionReplace(ColumnName, '[0-9]') order by
    ColumnName)
    on the result of the ROW_NUMBER  every row with ROW_NUMBER  more then 1 is duplicate
    I hope this useful :-)
      Ronen Ariely
     [Personal Site]    [Blog]    [Facebook]

  • Distinct records with conditional select formula

    Post Author: nelsonchris
    CA Forum: Data Connectivity and SQL
    Hello,
    I have a simple report pulling data from two tables. I want
    only distinct records. I am selecting records based on
    parameters; here is the select formula:
    ({?Service Name} = "*" or {selsvc.ServiceName} like
    {?Service Name})and
    ({?Program Name} = "*" or {selsvc.Selected Service Entry 
    Program Name} like {?Program Name}) and
    ({?Agency Name}  = "*" or {selsvc.Selected Service Entry 
    Agency Name} like {?Agency Name})
    The problem comes from the fact that Crystal will add the
    selsvc fields to the reports SQL select code, which has the
    effect of duplicating some records that do not have the same
    values for the selsvc fields. The select formula above is
    the only place in the report where values from the selsvc
    field are used, and as you can see they are only used when
    the user has submitted a matching parameter for them. I can
    not figure out how to get rid of the duplicates, please
    help!
    Thanks for your time,
    Chris

    Post Author: yangster
    CA Forum: Data Connectivity and SQL
    I don't follow why you are getting duplicates with your selectionare you getting duplicates without the selection criteria?if you are then they really are not duplicates and there could be issues with your joins between the 2 tables

  • Email remarked new and duplicated

    Hello,
    My email records have been all marked as new (creating a huge inbox) and email messages have been duplicated so that I have 3 or 4 copies of them. I went into the first back-up of my email where this had not occurred and hit "Restore". It did not restore the old back-up. Curiously, the remarking and duplicating of records occurred over a period of hours according to my back-ups - not all at once.
    Any ideas on how to fix/restore my email to the way it was?
    Thanks

    Hi all
    I spent about an hour on the phone with Apple Care last night on this issue. It has been escalated up to the engineers there. I have also filed a bug report. Short story is, they are compiling a list of users having this issue (small number right now), but gaining more attention. They are stumped as to what is causing it, but working towards a fix.
    One of the things recommended by support - and what I have done TEMPORARILY is to have all new mail coming in removed from the server immediately.
    In Mail > Preferences > Accounts > Advanced, you can set how long you want mail to stay on the server. If you select Immediately, then it will be unable to duplicate messages because they don't exist on the server after being downloaded. The downside is that if you use a browser often to access your email, then you will have a very short list of email (or nothing at all) to look at.
    The mail expert admitted this was not an ideal temp. fix, but in my case it's ok since I primarily use the Mail.app.
    Hope this helps some of you!

  • Design problem with the cube.

    hi,
         i need to maintain two fields in the cube, first field hold data month wise(like M1,M2,M3) and the second field hold the data in the year to month wise.
    eg.
                          M1          M2           M3
           FIELD1    10          20            30
           FIELD2    10          30            70
    PLEASE SUGGEST

    Hi LAX,
    I can think of following design:
    You have a source feeding the information as 10, 20, 30 etc for different months.
    Now continue loading data from source to cube for the first field (FIELD1).
    Now introduce an ODS between Cube and Source. Keep everything you have in cube as Key field in the ODS except Key Figure. keep the key Figure in the additive mode.
    Now in the start routine of ODS, for each of the record, you will have value of calmonth and a value to the KF.
    Say calmonth value is 01/2009 and KF value is 10. The thing you are doing is, you want to add this value to all the months along with the value of that month. Meaning this 10 should be included in all the months till december. Correct me if I am wrong.
    So for each of the record, duplicate the record from the calmonth to 12. In the case of example, it would be from 02 to 12 times.
    While duplicating the record, update the calmonth value of the duplicated data_package record as 02/2009, 03/2009 etc. etc.
    By doing this, you will have value for 10 for all the months in that year.
    After loading this information to ODS, you can pass that to Cube which will have your required numbers for FIELD2.
    - Danny

  • ICal and subscribed calendars with MobileMe using AppleScript

    I am having the same problem as many of you; I have a MobileMe account which does not sync the calendars I have in iCal that are subscriptions. I found this great script online which I'll post below. I don't know anything about AppleScript so I'm just copy-pasting. I want it to work, but I'm getting the error "The variable theOldEvent is not defined." right around the line "if similar_found is true then set theOldSummary to the summary of theOldEvent" kinda near the middle. Like I said, I don't know anything about AppleScript. So my question is; how can I fix this error and/or is there some better way of using AppleScript/Automator to do this same thing? Thanks!
    Script to duplicate Calendar orgCalendar into target dupCalendar
    E.H. 12.9.2008
    property myCopies : 0
    property myUpdates : 0
    property myObsoletes : 0
    property orgCalendar : "Sekretariat"
    property dupCalendar : "Sekretariat copy"
    property dupEvents : {}
    property myDeletes : {}
    set myCopies to 0
    set myUpdates to 0
    set myObsoletes to 0
    set dupEvents to {}
    tell application "iCal"
    -- set theCalendars to every calendar
    set theCalendarNames to title of every calendar
    set theOrgCalendar to a reference to calendar orgCalendar
    if theCalendarNames contains dupCalendar then
    set theCalendar to a reference to calendar dupCalendar
    else
    set theCalendar to make new calendar with properties {title:dupCalendar}
    --set theCalendar to make new calendar with properties {title:dupCalendar, color:"{65535, 0, 0}"}
    end if
    set the eventList to uid of every event of theOrgCalendar as list
    set the eventCount to the count of the eventList
    repeat with theUId in eventList
    tell theOrgCalendar
    set theEvent to (the first event whose uid is theUId)
    -- set theProperties to the properties of theEvent as record
    set theDate to the start date of theEvent
    set theSummary to the summary of theEvent
    set theStampDate to the stamp date of theEvent
    end tell
    tell theCalendar
    try
    set theOldEvent to (the first event of theCalendar whose (start date) is theDate as date)
    set similar_found to true
    on error
    set similar_found to false
    set theEndDate to the end date of theEvent
    set theAllDay to the allday event of theEvent
    set theLocation to the location of theEvent
    -- Funny construction to work araund the fact that location may be missing a value
    try
    if theLocation is equal to "" then
    end if
    on error
    set theLocation to ""
    end try
    set theDescription to the description of theEvent
    try
    if theDescription is equal to "" then
    end if
    on error
    set theDescription to ""
    end try
    if theAllDay is true then -- work around a funny bug with all day events
    set theDate to (theDate as date) + 2 * hours
    set theEndDate to (theEndDate as date) + 2 * hours
    end if
    set newEvent to make new event at end with properties {summary:theSummary, location:theLocation, start date:theDate, end date:theEndDate, allday event:theAllDay, description:theDescription}
    -- make new event at end with properties theProperties
    set the end of dupEvents to (the uid of newEvent)
    set myCopies to (myCopies + 1)
    end try
    end tell
    set second_necessary to false
    if similar_found is true then
    set theOldSummary to the summary of theOldEvent
    if theSummary is not equal to theOldSummary then
    --is there a different one?
    try
    set theOldEvent1 to (the second event of theCalendar whose (start date) is theDate as date)
    set theOldSummary to the summary of theOldEvent1
    if theSummary is equal to theOldSummary then
    set theOldEvent to theOldEvent1
    set the end of dupEvents to (the uid of theOldEvent)
    else
    -- cycle repeat ?
    end if
    on error
    -- beep
    try
    set theEvent1 to (the second event of theOrgCalendar whose (start date) is theDate as date)
    set second_necessary to true
    on error
    set the end of dupEvents to (the uid of theOldEvent)
    end try
    end try
    else
    set the end of dupEvents to (the uid of theOldEvent)
    end if
    if second_necessary is true then
    set theEndDate to the end date of theEvent
    tell theCalendar
    set theOldEvent to make new event at end with properties {summary:theSummary, start date:theDate, end date:theEndDate}
    end tell
    set the end of dupEvents to (the uid of theOldEvent)
    end if
    set theOldStampDate to the stamp date of theOldEvent
    if theStampDate is greater than theOldStampDate then
    -- update the event
    set summary of theOldEvent to theSummary -- capitalization may have changed
    set theAllDay to the allday event of theEvent
    set allday event of theOldEvent to theAllDay
    set theEndDate to the end date of theEvent
    if theAllDay is true then -- work around a funny bug with all day events
    set theEndDate to (theEndDate as date) + 2 * hours
    end if
    set end date of theOldEvent to theEndDate
    set theDescription to the description of theEvent
    try
    if theDescription is equal to "" then
    end if
    on error
    set theDescription to ""
    end try
    set description of theOldEvent to theDescription
    set myUpdates to myUpdates + 1
    end if
    end if
    end repeat
    end tell
    -- Delete obsolete events
    set myObsoletes to 0
    set myDeletes to {}
    tell application "iCal"
    set myUIDs to uid of events of theCalendar
    end tell
    repeat with myUID in myUIDs
    if dupEvents does not contain myUID then
    set the end of myDeletes to myUID
    set myObsoletes to (myObsoletes + 1)
    end if
    end repeat
    tell application "iCal"
    repeat with myDel in myDeletes
    delete (every event of theCalendar whose uid is myDel)
    end repeat
    end tell
    -- delete duplicates
    set myDeletes to {}
    tell application "iCal"
    set myStarts to start date of events of theCalendar
    set mySummaries to summary of events of theCalendar
    set myUIDs to uid of events of theCalendar
    set myLength to length of myUIDs
    end tell
    repeat with i from 1 to (myLength - 1)
    set thisStart to (item i of myStarts)
    set thisSumm to (item i of mySummaries)
    repeat with j from (i + 1) to myLength
    set thatStart to (item j of myStarts)
    set thatSumm to (item j of mySummaries)
    if thisSumm is equal to thatSumm and thisStart is equal to thatStart then
    set the end of myDeletes to (item j of myUIDs)
    exit repeat
    end if
    end repeat
    end repeat
    set n to count of myDeletes
    tell application "iCal"
    repeat with myDel in myDeletes
    delete (every event of theCalendar whose uid is myDel)
    end repeat
    -- set the visible of calendar theCalendar to false
    end tell
    display dialog (myCopies & " records duplicated, " & myUpdates & " records updated and " & myObsoletes & " obsolete ones deleted") as text

    No longer an issue.

  • Error Info... 00 671: ABAP/4 processor: SAPSQL_ARRAY_INSERT_DUPREC

    Dear experts,
         I got an error while creating a process order.System allowing to create a process order after saving througing an error
       " Express document "Update was terminated" received from author "GLP Developer"
    *'Error Info...   00 671: ABAP/4 processor: SAPSQL_ARRAY_INSERT_DUPREC".*
        I did changed the number ranges for a particular order type.Created one order and prcessed.But again getting the same error while processing second order.
    Thanks in advance,
    Rambabu.K.
    Edited by: RamPPQMPM on Nov 24, 2010 6:49 PM

    The system is telling you that you have a duplicated key (record) in a table. You have to take a look into the userexits or enhancements applyied to your transactios in ordert to find a bad modifying of an stardard structure.

  • G/L Account Numbers missing in the Query Designer

    Hi Experts
                   New G/L Account numbers are been added to some items like Rebates & Discounts. These G/L Account Numbers are been seen in the RSA1 and are not present in the Query Designer. So i want to know the procedure to update these G/L Account numbers in the Query Designer, Can you please help me.
    G/L Account Numbers in RSA1 = 718 and in Query Designer it is 661 so please guide me to update the rest of the G/L Account nos in the query designer.
    Thanking you
    Regards
    Mrudul.
    Edited by: Mrudul Naidu Cherukupalli on Feb 1, 2008 5:23 PM

    Yes, the problem is with the extractor
    It is not been enhanced because i am working on SAP BW 3.1C and its been implemented in 2004 and since then it is not been used properly.
    The Datasource is 0EC_PCA_3 (Enterprice Controlling line items).
    Yes i maximized to 1000 records per call and searched for the G/L Account E16411 which i cannot find in the cube.
    When i checked the results with R/3 i found the totals are doubled and when divided the Key figure Net of Credit and Debit by 2 i got the some results correctly(Sales Revenue, Sales Revenue of Exports and Sales Revenue of Domestic)
    I Checked the Service Marketplace and found the note which should be implemented to rectify the error of duplicating the records,
    Can you please help me to update the  G/L Accounts in the datasource.
    My Development System contains more then 2000 G/L accounts in the cube (query designer).
    Thanking you,
    Regards
    Mrudul.

  • Inner Join.

    I am using a Inner join statement. I dont see any problem in DEV but i see some problems in PMT. IT duplicating the records in the output. I see the same order twice.
    The statement is,
        SELECT plaf~plnum
               maranormt  plafmatnr
               makt~maktx                                      
               plafpwwrk  plafpaart  plaf~verid
               plafauffx  plafpsttr  plafgsmng plafplscn
          INTO TABLE t_plaf
          FROM plaf
         INNER JOIN mara
            ON plafmatnr EQ maramatnr
         INNER JOIN makt                                       
            ON maramatnr EQ maktmatnr                        
           FOR ALL entries IN t_mara
         WHERE plaf~matnr = t_mara-matnr.
    However i looked into the MAKT table. I see 2 descriptions for the same material no.
    I am assuming thats the problem.
    ANy suggestions.
    Ster.

    > Hello,
    >
    >  Check this code . I tried it now and it's working
    >
    >
    > Tables: plaf,mara,makt.
    >
    > Data: it_plaf type standard table of plaf.
    > data: it_mara type standard table of mara,
    >       it_makt type standard table of makt.
    > ct-options: s_plnum for plaf-plnum,
    >                 s_matnr for mara-matnr.
    > plaf into table it_plaf
    >          where plnum in s_plnum
    > and matnr in s_matnr.
    >
    > if it_plaf[] is not initial.
    >
    >    select * from mara into table it_mara
    >        for all entries in it_plaf
    >    where matnr = it_plaf-matnr.
    >  Select * from makt into table it_makt
    >          for all entries in it_plaf
    >  where matnr = it_plaf-matnr.
    >
    > endif.
    >
    > Loop at it_mara into wa_mara.
    > read table it_plaf into wa_plaf with key matnr =
    > wa_mara-matnr.
    > if sy-subrc = 0.
    > move-corresponding to wa_final.
    > endif.
    > read table it_makt into wa_makt witk key matnr =
    > wa_mara-matnr.
    > if sy-subrc = 0.
    > Move-corresponding to wa_final.
    > endif.
    > append wa_final to it_final.
    > clear: wa_mara,wa_plaf,wa_final.
    > endloop.
    >
    >
    > Regards,
    > Deepu.K
    It would be better for performance to use Field-Symbols -;)
    FIELD-SYMBOLS: <MARA> LIKE LINE OF IT_MARA.
    Loop at it_mara into <MARA>.
    *Process data....
    endloop.
    Greetings,
    Blag.

  • Crystal report design query

    Hello,
    I am using Crystal reports 10 to design a report using an SQL database source.
    There are 2 tables causing problems in that once fields from both of them are added to the detail section, the data is duplicated.  The reason for this is table2 has a field (rulename) which can have multiple outcomes such as the basic example below:
    table1.id,table2.rulename,table2.decision
    1,postcodecheck,accept
    1,secuitycheck,notchecked
    1,creditcheck,notchecked
    2,postcodecheck,accept
    2,secuitycheck,accept
    3,creditcheck,accept
    3,postcodecheck,accept
    3,secuitycheck,decline
    3,creditcheck,notchecked
    If I group the report by table1.ID it removes the duplicated records but only displays one of the 'rulename', usually accepts.   A record sort of this field either retain the same result or replaces it with any table2.decision outcome of 'notchecked'.  A more lengthy task would be to create formula fields for each rulename but having quite a few of this means its a very manual job.
    Is there a better way to do this?  I have not used the select expert because I want to display all decisions (table2.decisions).
    Also if I create a crosstab report, each record is counted by the number of rulenames per ID, again duplicating each record (table1.id)
    Thanks,WA

    Hi Wasim,
    Just try to check whether u have used proper link or not.
    Database Expert->Link.
    Regards,
    Misra P.

Maybe you are looking for