BDOC query

Hi all,
i've just made me first bDoc(!!!).
Class: mobile application Modificable read
Type: query.
I've the following doubts related to performance
for the join table I'haven't used Key fields.
The where clauses are many and not based on key fields.
The fields I use are many.
Can this lead to performance problems? If yes, when? in COnntrans or when using the mobile application? Should it be better to make the filters in the MAS?
Any suggestions?
thanks a lot
Carmine.

Hi,,
     Can you clearly tell about your scenarios and your need.... about Bdoc..
thanks in advance
sk

Similar Messages

  • BDOC query parameter

    Hi all,
    I have a Bdoc parameter syntax related question.
    I want to set a query bdoc parameter as below where TERRID is a parameter and
    i want to pass sql like ...
    ****SQL****
    WHERE TABLE1.NTERRID LIKE 'TERRID%'
    ***BDOC QUERY***
    WHERE TABLE1.NTERRID LIKE :TERRID
    Now when this BDOC query is actually executes it puts % in front as well sql looks like below
    WHERE TABLE1.NTERRID LIKE '%TERRID%'
    how do i change my boc query parameter syntax to have % only at the end of the parameter and not in front.
    Thanks in advance
    Hetal

    Hi,
    no, I guess in your example you would need MatchAtBegin rather than MatchAtEnd. But normally MatchAdvanced is used. You need to try anyway...
    MatchEmpty looks like the possibility to search for empty content explicitely, but I never have seen this somewhere...
    Regards,
    Wolfhard

  • Passing multiple values to the QUERY BDOC parameter?

    hi All,
    Below is my Query BDOC Anchor Before Query Execute even handler... I'm trying to pass multiple values to the         bq.Z_PartnerFunction query parameter... i.e. 
    PARTNER_FCT in( '00000012','ZDIVMGR','ZAREADR')
    is it possible without creating new Query Bdoc ?
    ====================================
    Private Sub aempchoicewinTCWSearchTAnchor_beforeQueryExecute(ByRef bq As BusinessQuery, ByRef cancel As Boolean)
    If Not bq Is Nothing Then
            If sWcDummy = "Yes" Then
                    bq.WcDummy = sWcDummy
            End If
            bq.Z_PartnerFunction = "00000012"
            If ctrlZ_Territory.Value <> "" Then
                 bq.PRNB_TerrID = "*" & ctrlZ_Territory.Value
            End If
    End If
    End Sub
    ================================
    Thanks in advance
    Hetal

    Hi,
    it looks that you already enhanced the query BDoc because you have a new query parameter bq.Z_PartnerFunction, right?
    To which BDoc parameter is this BQ parameter mapped? And how looks the related where clause?
    For a single filter normally a "=" operator is used. Therefore your example with "in" won't work.
    If these three partner functions are fixed then you might hardcoded them directly in the where clause (supposed the BDoc is not used somewhere else where you don't want to have this filter).
    Or you might add 3 new BDoc parameters, add 3 new where clauses using a disjunction for them (and using an embracing bracket). In this case always all these 3 BQ parameters need to be filled (or all stay empty) to avoid a SQL syntax error.
    Regards,
    Wolfhard

  • Change the status of a Query BDoc

    I have accidentally released a custom Query BDoc.
    The BDoc status now states 'Partially Released' and it wont let me change any segment fields.
    This is a custom BDoc and we are on CRM 3.0.
    Does anyone know how to unrelease BDoc so that we can make changes to its segment fields?
    Any help is greatly appreciated.

    Hi,
      Isn't there a toggle button to make it inactive back?
      Else you may need to directly change in the repository which is SMOG_TRANS for the header information.
    Regards TVS

  • How to Execute Query Bdoc

    Hi all
    I have created one Query Bdoc. I want to execute that Bdoc. How can i execuate. I want to know what are the parameters are passed and get result.?
    My problem I have created one combo engine. while executing mobile sales, it can't load the datas from Bdoc.? where i have to check?
    anyone help me

    Hi,
    if you want to start it in the code you can use create a business query on using the query bdoc.
    if you have a business query you can write the following code:
    IN BO:
    Dim bq as Businessquery
    Dim bcol as BusinessCollection
    dim bo as Businessobject
    bq = gFactory.newBusinessQuery("your businessquery")
    bq.setattribute (Attributename, Value)
    bcol = bq.query
    for each bo in bcol
      'this is a loop over all results
    Next
    Or you can use directly the qBdoc using the object ListEngine. Search for this in the Code of you MSA using Mobile Application Studio!
    rg,
    markus
    You can check the bcol in the debuger

  • Bdoc received but data not updated

    Hello,
    I am using CRM4.0
    I changed the customizing in table CRMC_ACT_DECOM to change values of field KV_DEKO.
    Then, I transported the modification usign R3AS4 to CDB.
    I can see that the table CDBC_ACT_JOURN is updated correctly with the new values.
    My problem is that I don't see the modification on MSA. When I try a select on this table, i just see the old values.
    It tried to do an extract on replication object CRM_DNL_ADOCCH for my site, the bdoc is well sent and I can see the new data in it, but even after synchronisation, the data in MSA is not updated...
    What am I missing ?
    (the strange thing is that I didn't have this issue in dev environnement)
    Thanks in advance,
    EDIT : ok when I launch this query in query analyser :
    SELECT *
    FROM dbo.CDBC_ACT_JOURN
    WHERE FIELDNAME = 'KV_DEKO'
    I get all the data.
    But when I am using the query in SQL Server entrerprise management, I don't see them !!
    Edited by: Louis-Arnaud Bouquin on Nov 10, 2009 10:26 AM

    >
    sujith golla wrote:
    > Status of the IDOC is "53", so successfully posted
    > records that have the status can NOT be reprocessed using BD87
    There are some tricks: you can either create a copy of the IDoc in WE19 and then process it or use report RC1_IDOC_SET_STATUS (be careful though) to update the IDoc status.
    However, you might want to do some more research and use suggestions above before resorting to these measures.

  • Error while sending Bdoc data frm CRM to R3

    Hi All,
    We have created a BDoc containing a Ztable which is send from CRM to R/3 where it will update another Z table create for this in R3.
    We have tried here the follwoing steps:-
    a. Created the Z table in both systems.
    b. Created a new messaging BDoc in CRM and linked it to the R/3 Site Type.
    c. Created a new mapping function module in CRM that takes the data from the BDoc and maps it to the BAPI structure.
    d. Created a new Adapter Object that links to my BDoc, contains the Z table as the source table in CRM and contains the mapping function module mentioned above.
    e. Created a new Replication Object based on my new BDoc.
    f. Created a new Publication and assigned it to the Replication Object.
    g. Created a new Subscription and assigned to the Publication and Replication Object. Also assigned it to my R/3 site.
    h. Created a mapping function module in R/3 to map the data from the BAPI structure into the equivalent R/3 table.
    i. Created entry in table CRMSUBTAB.
    Error:
    When try to insert an entry in the customer table in CRM a BDoc is being created but fails to transfer with error message "Error in outbound processing".
    Trace: "Query error for site type SMOF_ERPSITE".
    please advice.
    Thanks & Regards
    Deb

    Hi Deb,
    Any reason why you have extended the Z fields both in R/3 and CRM manually.? This should have been a lot of effort. Did you try to do this via EEWB. ?
    In case you would use EEW to extend rather than the manual extension, the following memo will be helpful:
    EEWB doesn't support changes in the connected ERP system. For example it is unclear which object is of interest in ERP, the SD customer master or the BP. However, we provide note 864222 that explains some features regarding data exchange of extensions.
    Also note 831536 explains how to exchange table like extensions. For the data exchange of 1:1 extensions at the CI inlude for the main table BUT000 you could check note 725671, should be available in your system already, so just for information. First please create two CI_INCLUDEs CI_CUST as described in note 736595. Then your data are transferred and processed via module COM_BUPA_MAIN_BP_INBOUND. For debugging purposes please have a look at note 398925.
    Since it is possible to have independenT extensions on CRM and ERP side we mustn't map the two CI-includes directly but only via this additional CI_CUST feature.
    Best Regards, Adil
    (Note : The above notes/memo may help in troubleshooting the manual extensions)

  • Search criteria for insert/update bdoc

    Hi All,
    In our set up we have ecc to crm replication of BP. If one goes and checks the extension data of a stuck bdoc it has an Object Task- Insert or Update.
    Can someone help me with search criteria so that i can pull out bdocs which have an Insert as the Object task ??
    We have search criteria for errored/intermediate state bdocs; for inbound vs outbound; bdoc type etc etc..
    Need one based on Insert/Update Task so that any new data replication if stuck with its very first bdoc( Insert type) can be immediately queried.
    Regards
    Abhinav

    Hello Abhinav,
    I do not think that we have such a search criteria to search for BDocs based on the Task Type, which comes under the
    data part of the BDoc.
    One alternative way is to find out in which table these data gets stored and write a program to fetch the revelent Bdocs.
    Hope thisl helps!
    Best Regards,
    Shanthala Kudva

  • Error in layouts for custom bdoc's

    Hi All,
      we are using some custom bdoc's to generate the layouts ( document generate) for the MSA.
    for the custom bdoc the getrecordset() method is throwing error in the following code of layoutSQLStatement business object. Kindly let us know for a custom bdoc do we have to create a query and associate it here in this method. As I dont know VB Im unable to code the application
    TransactionID and segment fields are returning the correct result and the error is occuring at
    StartObjectTransaction = MyLE.GetRecordset , After executing this statement
    Start ObjectTransaction is not giving any result.
    Public Function StartObjectTransaction() As Object
      Dim ImpObj As Object
      Dim ValueArr() As Object
      Dim KeyArr() As Object
       Dim MyLE As ListEngine
           Dim i As Short
            Dim fl As Field
    Method  : StartObjectTransaction
    '  Date    : 08.03.1999
    '  Purpose :  !!!!! Please insert !!!!!
    On Error GoTo ErrorHandler
    If ((_unwind(ImportListCol.Count) > 0)) Then
    ReDim ValueArr((_unwind(ImportListCol.Count) - 1))
      ReDim KeyArr((_unwind(ImportListCol.Count) - 1))
    End If
    MyLE = BusinessRootObject.BusinessFactory.CreateListEngine()
    MyLE.TransactionName = TransactionId
    MyLE.SegmentName = SegmentName
      ImportListCol.Count()
    i = 0
    For Each ImpObj In ImportListCol
    ValueArr(i) = _unwind(ImpObj.GetValue())
    ' >> #1 (OldCode/NewCode)
    ' KeyArr(i) = ImpObj.GetKey()
    KeyArr(i) = _unwind(ImpObj.GetReal())
    ' << #1
       i = (i + 1)
    Next
      If ((_unwind(ImportListCol.Count) > 0))
    Then
       MyLE.SetFilterParameters(KeyArr, ValueArr)
    End If
    StartObjectTransaction = MyLE.GetRecordset
      For Each fl In StartObjectTransaction.Fields
    ' >> #2 (OldCode/NewCode)
    ' if fl.type = 128 or fl.type = 130 then ' memo fields
    Set StartObjectTransaction = BusinessRootObject.BusinessFactory.CreateBusinessQuery("BSEXPSELMAIN").ExpertQuery(StartObjectTransaction.Source)
                ' end if
      If (_unwind(fl.DefinedSize) < 0) Then
            StartObjectTransaction = BusinessRootObject.BusinessFactory.CreateBusinessQuery("BSEXPSELMAIN").ExpertQuery(StartObjectTransaction.Source)
         Exit Function
      End If
           Next
    'Dim MessageParam(1)
      'MessageParam(0) = ""
    'BusinessRootObject.RaiseErrorEx 14805, "TEXTGEN", False, MessageParam, MessageParam
            Exit Function
    ErrorHandler:
            'MsgBox("Error in StartObjectTransaction. Error : " & Err.Description)
            BusinessRootObject.RaiseError(4, "LAY", BlErrorTypeEnum.ES_ERROR)

    Hi Wolfhard,
           Thanks for the immediate response, I have checked the SQL Profiler and here are the results of my findings.
    I have copied a standard bdoc to a zbdoc (didnot add any code/business query in the MAS), Synchronized the bdoc and in this method the zbdoc is again failing its not executing any where clauses in the bdoc.
    Added some additional fields in the standard bdoc, again the bdoc failed and the new fields are not reflected in the query analyzer.
    Kindly suggest if Im missing something, we are on 5.0SP11

  • CRMXIF_ORDER_SAVE IDOC not getting generated for BUS_TRANS_MSG BDOC

    Hello Experts,
    In our project, we have a requirement to send custom fields in the BUS_TRANS_MSG to external system through XIF. The model of BDOC BUS_TRANS_MSG triggering IDOC CRMXIF_ORDER_SAVE_M02 perfectly worked in the development system. We wanted to try the custom field extension in the Sandbox. So as per OSS note 916093, we have extended E101_CRMXIF_CUSTOMER_H segments with custom fields and tried generating the interfaces in BDFG transaction. While generation with IDOC CRMXIF_ORDER_SAVE_M we got an error message "Incompatible change to complex data type
    type E101CRMXIF_ISU_PRA1_X". So went about creating a custom IDOC ZZ_CRMXIF_ORDER_SAVE_M02 for message CRMXIF_ORDER_SAVE. Even for this config, the IDOC is not getting generated for the BDOCs. Lastly, configured the IDOC ZZ_CRMXIF_ORDER_SAVE_M02 to a custom function module ZZ_BDFG_IDOC_TEST_FM. The FM got generated and activated, even then the IDOC is not generated for the BDOC.
    SMOEAC config in Sandbox looks the same as the Development system. We do not the reason why IDOC is not getting generated and also the reason for error in BDFG while generating the interfaces after adding custom fields to CUSTOMER_H segment.
    Any help would be appreciated.
    Thanks,
    Partha

    Hi Partha,
    Kindly check the following thread.
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/406efa7e-388a-2910-f9b8-81913b0ca57f?QuickLink=index&overridelayout=true
    XIF adapter
    Hope it answers your Query
    Regards,
    Srikanth.Naga

  • BDoc changes are not reflected in mobile sales application

    Hi guys
    I am trying hard but I do not get it to work with MSA 6.0 SP2 / 5.0 SP11:
    - I have changed Query BDocs in CRM Online
    - I am synching the BDocs using the BDoc Synch against the correct system / client
    - I am synchronizing metadata with the client console
    -> The tpsfile directory content is up to date
    - I am doing a full generation and a complete build
    -> my dll's are completely regenerated
    - I am calling the correct application (BOL and UI changes are reflected).
    But none of my BDoc changes arrive on the client?Acutally, one week ago somehow some changes were reflected, but I do not know why and now nothing is synchronized at all.  Seems to be very strange ... anyone an idea?
    Regards
    Kai

    Hi,
    since 5.0 the query BDoc definitions are not saved along with the TPS.NET file but with the ARSREP.DAT.
    The TPS.NET file contains only the data for sBDocs.
    The steps after modifying qBDocs are:
    - synchronizing the BDoc/s within Dev Studio
    - generating the BOL
    But it seems you did all these steps already...
    I remember there are some tools like metadataviewer? Did you already check with these tools whether the generation succeded?
    Regards,
    Wolfhard

  • XIF or BDoc Trigger even with errors in Business Document

    Hello Experts,
    I am stuck in an issue regarding BDoc trigger. My query is as per my understanding, if a business document like Sales order or Opportunity is in error but is saved, there is no BDoc triggered. Please correct if I am wrong.
    My actual Requirement is to trigger BDoc and thus XIF IDOC if Opporutnity is saved even with error.
    Do we have a method for this apporach.
    Please assist.
    Thx,
    Ravi

    Hey Luis,
    Thanks for your assistance.
    I assumed this functionality will haunt me. Can you suggest any workaround. The XIF IDOC will not get send also because internally they are connected to BDoc adapter itself.
    Do we have any method to trigger XIF IDOC by some logic etc.
    Thx,
    Ravi

  • Idoc and Bdoc

    Hi Gurus,
    1) I would like to know about Idoc and Bdoc,
        what I feel is  Idoc triggers in ECC and Bdoc triggers in CRM
    2) How difference does displaying a customer in CRM (txn : BP) and ECC (txn: XD03) makes?
    Thanks and regards,
    Manu

    Hi,
    Please check these links:
    IDOC
    Bboc: Business Documents (BDocs). You use this to define and maintain Bdocs.BDocs enable communication between the SAP CRM components and the CRM Server. Data is encapsulated in a BDoc and transferred to the server. Features BDoc Modeler offers the following features:
    u2022     Model a new class of BDoc called Messaging BDocs.
    u2022     Assign Synchronization BDocs (formerly write BDocs) to a Messaging BDoc.
    u2022     Assign site types to Messaging and Synchronization BDocs.
    u2022     Documentation facility for every BDoc.
    u2022     Removal of SFADDIC and full-integration with DDIC.
    u2022     Generate R/3 structure name for a segment automatically.
    u2022     Check a BDoc for data consistency.
    u2022     Filter BDocs based on criteria.
    u2022     Generate R/3 services for a BDoc.
    u2022     Release BDocs for correct upgrades.
    u2022     The BDoc is locked when it is being used in edit mode by a particular user. Hence, not more than one user can model a BDoc at any given point of time.
    u2022     Traffic Lights display mechanism for error tracking.
    u2022     Track the occurrence of an object using Where-Used list.
    u2022     Specify access rights for users using the authorization concept.
    u2022     
    BDocs used in the CRM scenario can be categorized as follows: -
    u2022     Synchronization BDocs (sBDocs):- These BDocs are processed in the CRM Server as well as in the Mobile Client, and contain mappings to tables. They were previously called as Write BDocs in the Client-based BDoc Modeler. Synchronization BDocs are used to exchange data between the CRM server and the Mobile Clients.
    u2022     Mobile Application BDocs:- These BDocs are used by CRM Mobile Applications and are processed outside the CRM Server. They contain mappings to tables. They were formerly called Read BDocs or Query BDocs.
    u2022     Messaging BDocs (mBDocs): - Messaging BDocs are used by CRM Server applications. These BDocs are processed in the CRM Server and do not contain table mappings. Hence these BDocs will not have parameter information. Nor will they have joins and where clauses.
    Could you please be more specific on your second question?
    Thanks,
    Karuna.

  • Bdoc Fail Alert in Microsoft Outlook

    Dear All,
    We have one query regarding CRM and Outlook integration.
    If Bdoc fails to transfer data from ECC to CRM then system should send a e-mail to respective person.
    Please let me know what configuration need to be done for the same...
    Regards,
    RAJ

    Hi Raj,
    Please state whether some event is triggered when the Bdoc fails to transfer data from ECC to CRM ?
    If you are able to capture an event in the system then you can associate it to a workflow or Action and send mail to the user.
    In the workflow you can add a send mail step to send mail to Outlook ID.
    Else, using Action you can directly send a mail using an FM.
    Please check if SMTP settings are properly defined in the system to allow flow of mails.
    Hope this helps!
    Regards,
    Saumya

  • New business query

    Hi,
    I have created a copy of Activity_Query BDoc and added one parameter and amended the where clause. Then I ran gnrwb / xml dump, BDox sych in MAS and created a new Business Query based on the new BDoc above. After that I generated the object and used it in the coding for a query. Unfortunately it does not work. When I call the method newbusinessquery("Z_ACTQuery") the query object remains on nothing.
    When I test the Query in MAS I don't see a SLQ statement and I get the response "Query is empty".
    Has anybody an advise?
    Regards
    Whityii

    Hi Harish,
    See this code sample, may be it will help you.
    protected abstract Type BusinessObjectType { get; } 
    /// <summary>
    /// Test that the business object can be saved.
    /// </summary>
    [Test]
    public virtual void CanBeSaved() {
       Save(BusinessObjectType);
    /// <summary>
    /// Test if the BusinessObject can be deleted.
    /// </summary>
    [Test]
    public virtual void CanBeDeleted() {
       BusinessObject bizObject = Save(BusinessObjectType);
       Assert.IsTrue(bizObject .Delete(), "The object could not be deleted.");
    /// <summary>
    /// Helper method for saving and business object.
    /// </summary>
    /// <param name="bizObjectType">The type of business object to save.</param>
    protected BusinessObject Save(Type bizObjectType) {
       BusinessObject bizObject = (BusinessObject) Activator.CreateInstance(BusinessObjectType);
       LoadProperties(bizObject);
       SaveAsIs(bizObject);
        return bizObject;
    /// <summary>
    /// Helper method for saving and business object in its current state.
    /// </summary>
    /// <param name="bizObject">The <c>BusinessObject</c> to save.</param>
    private BusinessObject SaveAsIs(BusinessObject bizObject) {
       Assert.IsTrue(bizObject.Save(), "The " + bizObject.GetType().Name + " could not be saved.");
        return bizObject;
    look at this link:
    http://steve.emxsoftware.com/archive/2004/6/   for such samples
    Hope this helps to give you an idea
    Divya

Maybe you are looking for