Merging records through C# code
Below is the offending code.
Merge.MergeRecordsWS_MergeRecords_Input mergei = new Merge.MergeRecordsWS_MergeRecords_Input();
Merge.MergeRecordsWS_MergeRecords_Output mergeo;
mergei.PrimaryId = LeadID;
mergei.DuplicateId = ELead.LeadId;
mergei.RecordType = "Lead";
mergei.MergeWhenPrimaryBlank = "True";
mergeo = Merger.CallMergeRecords(mergei);
Merger is declared and initialized as a MergeRecords object with the correct URL and session ID.
When this code is executed, sometimes, it returns an error of There already exists a record with those values.
This doesn't happen all the time, but I am not able to pin down a scenario where it fails consistently. This is part of a larger bit of automated code that runs when a new Lead is created. It is designed to detect duplicates and remove them by merging the records. Why would I get a "record exists with those values" error? Of course one exists, thats why we're trying to merge them. I have checked the ones that have failed recently, and there are only 2 leads that exist with the same information, and both of them are being referenced by the ID's above.
Use the below link:
https://msdn.microsoft.com/en-us/library/cc264319(v=office.12).aspx
To back up a site collection, call the Backup method. As parameters pass
the following:
The full URL of the site collection; that is, the full URL of its Top Level Web site.
The full path and file name of the file that will hold the compressed content of the site collection.
True, if the operation should overwrite an existing backup file of the same name; false, if it should not.
C#
mySiteCols.Backup(@"http://Server/sites/MySiteCollection", @"\\OtherServer\WSSBackups\SiteCollections\BackupOfMySiteCollection", true);
To restore a site collection, call the Restore method. It takes the same
parameters as the Backup method. The Boolean parameter
indicates whether the site collection should be overwritten if it already exists at the specified URL.
C#
mySiteCols.Restore(@"http://Server/sites/MySiteCollection", @"\\OtherServer\WSSBackups\SiteCollections\BackupOfMySiteCollection", true);
Example
Similar Messages
-
I would like to know if there is a way to report on records that have been merged through Portal? It would be nice to be able to report which records have been merged over a time period (like within the last month), but if that is not possible, I am just looking for a way to report on merged records through other criteria. I heard that an iView is being developed to do this, but I can't find one for this functionality right now. I can display the Key Mapping info without a problem. But there is no way to search against this information.
Thanks,
Justin
Edited by: Justin Fountain on Apr 22, 2009 9:24 PMI found the answer:
If you see the REP table, there is a column called REP_MAX_REP_SIZE which contains the maximum report size for each report. This value has a default value of 5000 for most of the reports. You can change this value to have a higher number so that the report returns the data. But increasing the number can reduce the response time since the number of records will be large. -
Different options to merge records automatically?
Hi All,
Can any one please do let me know what are the different options/ways we can automatically merge a record?
Regards,
RajeevHi Rajeev,
In addition to what I already mentioned,let me jot down my 2 cents here:
If in any case you are going for automatic merging of records,then you have to assumption/decions to make.
I mean you will either have to assume that your repository data is in very good shape and final merged record will take all the field data in MDM OR the source is in better shape and final field value should be picked from incoming record.
Now if you assume the former,that implies data is in good shape,then question comes how come duplicates are still there?
In case you use later assumption,you would have to ensure that data is in best shape through Validations/Assignments/Approvals and also take a call that MDM is storing data only for reporting purpose or hormonization also.
The following blog can give a fair idea regarding the code :
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b080b97d-8194-2c10-fa97-dd5940195384?quicklink=index&overridelayout=true
In all its a risky venture when you are going ahead with assumption with critical master data as it can cost big to business.
Thanks,
Ravi -
Some fields are missing while recording through shdb
Dear Abapers,
I am doing bdc for F-27 t.code.Some fields,cobl-gsber(business area),cobl-kostl(Cost center) are missing while recording through SHDB.But when do it manualy the fields are displaying.Also i have ddded those fields manualy in the program,stll the fields are not getting captured.May anyone pls help me,why this problem is happening?What is the solution for this.
Thanks in Advance.hi
i can tell u that few transactions wont suffice us with BDC,so for such transactions we do bdc with similar kind of transactions.
ie., The transactions FB60 and f-63 both are meant for Parking.
But we cant do bdc for FB60 Parking. So we do bdc for f-63.
similarly when we do bdc for vendor few fields wont appear...in that case, we use bapi for it....
So try to find an appropriate bapi or similar tcode which will suffice ur need
hope its clear.
Regards
Sajid -
Change default value for no of records in T code KSB1
Hi,
I am trying change the default value (no of records) in T code KSB1.
Is it defaulted progarmatically or through some configuration?
Any help is appreciated.
Thanks
GovindThank you all for immediate reply.
I know that I can create a variant or change the value by hitting more settings.
I have also seen in the program and its hard coded there as 5000.
We need that value to be defulted as 10000.So my question is that can we change via configuration or it can be done only progamatically?
Thanks
Govind -
Record the NOC codes at Job level for a particular country
Hi,
How do we record the NOC codes at job level for a particular country say for example canada?Which infotype the NOC codes exist and can be added to employee record?Is it through statistics infotype?
I could find that table T5K13 can hold these codes at job level, but unable to find a way to create a relationship between a job and the NOC codes.Please help if there is a way in our current SAP environment to record those codes on the job and if so how?
Also, if the initial configuration has not been done to add these codes at the job level what would be required to allow to maintain this.
Please help!!!
Thanks in advance.
Rakeshhi
in the view V_T5K13 , double click on the job code , there will be feild to add the noc code
Regards
sameer. -
Updating HRP table through abap codes - is it correct
Hi all,
In my hrp1001 table,I want that All Qualifications (Q) and Tasks (T) assigned to all the functional roles (ZF) existing in the system should be transferred to the positions(S) tagged to those respective functional roles.
For that I am supposed to write a code which copies the entries from Qualifications (Q) and Tasks (T) and tag the same to the positions (S).
Below is the sample code which is adding just one record to HRP1001 through abap statment. What I am curious to know is wheather it is logically correct to update HRP table through abap statments or no. If not, Please let me know what should we do as a solution - should we update all records through LSMW of PP01 or any thing else we can do???
REPORT ZHRPAR0005 .
TABLES: HRP1000, HRP1001.
DATA IT_1001 LIKE HRP1001 OCCURS 5 WITH HEADER LINE..
SELECT SINGLE * FROM HRP1001 INTO IT_1001 WHERE OTYPE = 'CP' AND PLVAR = '01' AND SCLAS NE 'S'.
IT_1001-OTYPE = 'S'.
APPEND IT_1001.
INSERT INTO HRP1001 VALUES IT_1001.
Thanks
RibhuHi Ribhu..
there are various FMs available for this purpose..
use those... becasue if u directly insert, update or modify record in HRP1000 or HRP1001...
then some related table might not be updated..
So use FMs..
RH_COPY_INFTY
RH_CUT_INFTY
RH_DELETE_INFTY
RH_INSERT_INFTY
RH_INVERT_RELA_INFTY
RH_UPDATE_INFTY
<b>For IT 1001 </b>
RH_CUT_INFTY_1001_EXT
RH_CUT_INFTY_1001_EXT_GENERIC
RH_DELETE_INFTY_1001_EXT
RH_DEL_INFTY_1001_EXT_GENERIC
RH_INSERT_INFTY_1001_EXT
RH_UPDATE_INFTY_1001_EXT
RH_BASE_READ_INFTY_1001
RH_READ_INFTY_1001
RH_READ_INFTY_1001_EXT
RH_READ_INFTY_1001_EXT_ONLY
Reward if useful
Regards
Prax -
Updating HRP tables through abap code- is it correct?
Hi all,
In my hrp1001 table,I want that All Qualifications (Q) and Tasks (T) assigned to all the functional roles (ZF) existing in the system should be transferred to the positions(S) tagged to those respective functional roles.
For that I am supposed to write a code which copies the entries from Qualifications (Q) and Tasks (T) and tag the same to the positions (S).
Below is the sample code which is adding just one record to HRP1001 through abap statment. What I am curious to know is wheather it is logically correct to update HRP table through abap statments or no. If not, Please let me know what should we do as a solution - should we update all records through LSMW of PP01 or any thing else we can do???
REPORT ZHRPAR0005 .
TABLES: HRP1000, HRP1001.
DATA IT_1001 LIKE HRP1001 OCCURS 5 WITH HEADER LINE..
SELECT SINGLE * FROM HRP1001 INTO IT_1001 WHERE OTYPE = 'CP' AND PLVAR = '01' AND SCLAS NE 'S'.
IT_1001-OTYPE = 'S'.
APPEND IT_1001.
INSERT INTO HRP1001 VALUES IT_1001.
Thanks
RibhuHi Ribhu..
there are various FMs available for this purpose..
use those... becasue if u directly insert, update or modify record in HRP1000 or HRP1001...
then some related table might not be updated..
So use FMs..
RH_COPY_INFTY
RH_CUT_INFTY
RH_DELETE_INFTY
RH_INSERT_INFTY
RH_INVERT_RELA_INFTY
RH_UPDATE_INFTY
For IT 1001
RH_CUT_INFTY_1001_EXT
RH_CUT_INFTY_1001_EXT_GENERIC
RH_DELETE_INFTY_1001_EXT
RH_DEL_INFTY_1001_EXT_GENERIC
RH_INSERT_INFTY_1001_EXT
RH_UPDATE_INFTY_1001_EXT
RH_BASE_READ_INFTY_1001
RH_READ_INFTY_1001
RH_READ_INFTY_1001_EXT
RH_READ_INFTY_1001_EXT_ONLY
Reward if useful
Regards
Prax -
Hi All,
My problem statement is as follows -
I have Customer Master data coming from a single client having some duplicates (internal). I have imported the data and merged the duplicates in the Data Manager client. Now while merging the records I am ending up with only a single record corresponding to say two merged records.
I have to send this data to BW where report has to be generated based upon the consolidated Master data.
Now my problem is that when I am syndicating the data I am able to send only a single merged record to BW however in BW the transactios are running on both the records (i.e both duplicate records).
Is there any way through which I can let both records be passed to BW (even after a merge operation in MDM)?
P.S. I have to retain the different Customer IDs after de-duplication (consolidation) as transactions have taken place over them.
Regards,
PoojaHi
I had same problem. Here to solve this you need to have right XSD defined with Root Element for syndication. Usually while extracting of xml you dont get the source id and key by default. You have to map the Roots for this then only the Source id and key will be exported. Also while syndicating the XML is generated for all the sources that you contiain in your repository but only the orginal source pointing to the record will contain the referece to that respective system. so in XI you need to export only the recrod entry from XML which contains the Source system id and key into BI.
Hope this answers you.
Regards
Veera -
How to save Custom control records through module pool program ?
Hi guru ,
1. How to save Custom control records through module pool program ?
I wrote multiple lines of record in custom control
Who to save that records ?
thanking you.
Regards,
Subash.Hi,
can refer following code -
IN PAI , CODE is as follows-
*& Form editor_output
FORM editor_output .
NARRATION1 is name of custom controller
IF v_editor IS INITIAL.
Create obejct for custom container
CREATE OBJECT v_custom_container
EXPORTING
container_name = 'NARRATION1'
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5
OTHERS = 6.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE 'I' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Create obejct for the TextEditor control
CREATE OBJECT v_editor
EXPORTING
wordwrap_mode = cl_gui_textedit=>wordwrap_at_fixed_position
wordwrap_position = line_length
wordwrap_to_linebreak_mode = cl_gui_textedit=>true
parent = v_custom_container
EXCEPTIONS
error_cntl_create = 1
error_cntl_init = 2
error_cntl_link = 3
error_dp_create = 4
gui_type_not_supported = 5
OTHERS = 6.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE 'I' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDIF.
ENDFORM. " editor_output
getting textdata in internal table as follows
*& Form create_text
FORM create_text .
REFRESH : it_texttable,
it_text.
IF v_doc_number IS NOT INITIAL.
IF v_editor IS NOT INITIAL.
CALL METHOD v_editor->get_text_as_r3table
IMPORTING
table = it_texttable
EXCEPTIONS
error_dp = 1
error_cntl_call_method = 2
error_dp_create = 3
potential_data_loss = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Now, our final text data is in internal table it_texttable.
pls, Reward if found helpful. -
Raising Quotation through t-code dp81.
Hi Guys,
I am trying to create a Quotation through t-code DP81with reference to an Inquiry. I have configured the dip profile, given the wbs element in the Account assignment tab and given the DIP profile in the sales B tab of item and in the project profile.
My problem is: when I create the quotation with reference of the Inquiry it is taking the first material given in the Materiel determination of the DIP profile. It is not taking the material given in the Inquiry. I have even given the material in the Inquiry as a line item in the Materiel determination of DIP but I'm facing the same problem.
Please help me.
Thanks & Regards
SagarHi Srinivas,
The characteristics in the DIP Profile are:
Accounting Indicator - Character Relevant
Activity type - Character Relevant
Cost Element - Character Relevant and Material Determination
Material - Character Relevant
Object Number - Character Relevant.
Transaction Currency - Character Relevant
Unit Of Measure - Character Relevant.
Each Material has only cost element set and I have given different sets for each material.
The source is "Planned costs - Total Records.
I have given 2 materials A & B in the material determination. I have raised separate Inquiries for both the materials and assigned each inquiry to different WBS elements.
When I try to crate quotation with the inquiry of material A I have no problem. When I try to create quotation with the inquiry of material B, the quotation is taking the material as A in the quotation.
Please Help
Thanks & regards
Sagar -
IBAN Activation & Recording through SHDB-IBAN field is disabled
Dear all,
A)I have activated IBAN field in IT0009.IT0009 - table T77S0, ADMIN IBAN 'S'.
Is this correct?
B)When we enter manually we are able to to Enter IBAN 34 digit code(Here we are taken to a new screen, we are using ECC.5)
we want to create NEW BDC for Infotype 0009.
C)when we tried to create Recording through SHDB the "IBAN field is Disabled
How to record. whether any ABAP Coding is required/ how we can record.
when i check in table PA0009 IBAN field is not there . but IBAN details are there in TIBAN .Please help.
Regards,
R.MythiliHi,
I have activated IBAN field in IT0009.IT0009 - table T77S0, ADMIN IBAN 'S'. This is correct
I can suggest you to control from se11 whether PA0009 has IBAN field. Also you can check from se80 tha program MP000900 to see whether Iban field is valid. For example from T588M you may change the screen number to see IBAN field.
also there are some oss notes about this. For example in turkey IBAN is not generated according to one common rule. Every bank has special rule for generating IBAN and this sometimes can cause problems and customer than create a field with the help of customer include. And for this some Abap knowledge is required.
Hope it helps. -
I have a need to merge records received from two different services in BPEL. Here's the requirement - A BPEL process invokes two different services. One of the services places a fixed-length flat file in the file system. The other service responds with a set of XML records. The XML records need to transformed and merged with those in the flat file and eliminate duplicate records (in terms of an ID field) while doing so. What could be an efficient way to do this? The XML file is at least 80MB in size. Will XSLT be memory intensive?
Not ideal use case for SOA Suite but achieveable.
If they are licensed for SOA Suite they can use OSB, this may be a better tool for this use case.
your xquery can look something like this:
let $Runners := $runners
let $Odds := $odds
return
<Runners>
for $Runner in $Runners/ns1:Runner
for $Odd in $Odds/ns0:RunnerOdds/ns0:RunnerOdd
where $Odd/ns0:Runner_Num = $Runner/ns1:Runner_Num
return
<Runner>
<WIN_Odd>{ data($Odd/ns0:WIN_Odd) }</WIN_Odd>
<Runner_Num>{ data($Runner/ns1:Runner_Num) }</Runner_Num>
<PLC_Odd>{ data($Odd/ns0:PLC_Odd) }</PLC_Odd>
<Runner_Name>{ data($Runner/ns1:Runner_Name) }</Runner_Name>
<Jockey_Name>{ data($Runner/ns1:Jockey_Name) }</Jockey_Name>
<Runner_Status>{ data($Runner/ns1:Runner_Status) }</Runner_Status>
</Runner>
</Runners>
} what this code does is merges 2 payloads, 1 payload has the name of horses, the other payload has the odds of the horse. You can merge using the where clause and linking via the key of Runner_num
cheers
James -
Merge records of one column in ALV?
Hi friends,
i am creating alv grid report(with out oops). i am calculating value for one field that value is common for all the records . so i want to display that as common value instead of displaying number of lines .
is there any possibility to merge records of one column. using it_sort i tried . but it is not coming. since it is a currency field and i need to do display in the subtotal field.
please let me know if u have the solution.
regards,
kani.
Edited by: Julius Bussche on Sep 8, 2008 7:31 AMkani,
refwer sample code.
DATA: gt_sort TYPE slis_t_sortinfo_alv,
gs_sort TYPE slis_sortinfo_alv.
CLEAR gs_sort.
gs_sort-fieldname = 'LDDAT'.
gs_sort-spos = 1.
gs_sort-up = 'X'.
gs_sort-subtot = 'X'.
APPEND gs_sort TO gt_sort.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = v_repid
i_callback_user_command = 'PROCESS_USER_COMMANDS'
is_layout = w_layout
it_fieldcat = i_fieldcat[]
it_sort = gt_sort[]
i_default = 'X'
i_save = 'A'
it_events = v_events
is_print = w_print
TABLES
t_outtab = i_final1 -
How to assign a class to the material through ABAP code
Hi,
I am working on a transaction in ABAP which takes material name, material description and a class from the user. Now, after this much input I create the material, its configuration profile through the ABAP code. For this I know I have to make relevant entries in tables MARA, MAKT, CUCO.. and also check for the existence of the class in the table KLAH.
Now the point where I am stuck is that I am not able to get how to assign the class to the material through the code. I am able to get the internal class id from the table KLAH but I am not able to figure how the internal material number is being generated in the table INOB and i need this number as well as the internal class id number to insert a record in the table KSSK to show proper assignment.
Can anyone please suggest me some solutions?
Thanks....Hi,
I tried using BAPI_OBJCL_CREATE. In order to understand it functioning better I created a material and class (of type 300) through transactions MM01 and cl01 respectively. Then i created a report and called the FM BAPI_OBJCL_CREATE, gave the material name as the material above, table as MARA, class as the one i created above and class type 300. I even analysed the message of the table return (return-message) after executing the report. The messahe said assignment done. But when I checked mnaually in cl20n there was no assignment done to the required material. There was also no entry for the required material in the table INOB which I need.
Can anyoene tell me that where am i going wrong? Please do help.
Maybe you are looking for
-
Can you cluster Coherence over data centers?
We're currently running two separate Coherence clusters in different data centers. One is prod, the other DR. Would it be possible to cluster the nodes from each of these to create one cluster spanning both data centers? Then in a failover scenario t
-
Issue with launching Java Program - Java Library Problem?
I hope this is the right forum, I apologize if it isn't. I am having issues launching a program for a video game that uses java. One of the devs told me to post my issue here, as he doesn't know how much more help he can give with this issue. Using t
-
A problem wtih my loop!! please have a look !!
this is the first node for the program master mind Actually i need to enter a string, then i need to check whether its of 4 characters and if all letters are in the liste( a,b,c,d,e,f) until these 2 conditions are nt satisfied , i need to continue to
-
Blog post: Embedded Software: Disruptions Ahead - Why Java makes sense
All, You may be interested in this blog post I did two days ago, which talks about the challenges in embedded software design and why Java makes sense for embedded software engineering: https://terrencebarr.wordpress.com/2013/08/05/embedded-software-
-
I am trying to get RemoteFX working. The Hyper-V host server is an HP DL380 G6 server with Intel E5540 cpu's. I have already verified that Intel VT-x with EPT is supported on the CPU. http://ark.intel.com/products/37104/Intel-Xeon-Processor-E5540-%28