BAPIs or Function Modules for Links between different Business Objects

Hi experts,
I am accessing an SAP CRM 5.0 system from outside via remote function calls.
I have the GUID of a business partner and would like to find other business objects
that are related to this business partner.
For example:
- Which activities are relevant for this business partner?
- Which orders were placed by this business partner?
- Which leads or opportunities are linked to this business partner?
- Which products did this business partner order?
Is it possible to get this information by calling BAPIs or other RFC function modules?
Regards,
Karsten

After studying lots of documentation and trying to understand the BOL and GenIL concepts,
I finally found a function module which meets my demands. With function module
CRM_GENIL_GET_QUERY_RESULT you can execute a Search Object of the GenIL,
and it is remote-enabled.
By checking transaction GENIL_MODEL_BROWSER and choosing component set "ALL"
you get a list of all defined Search Objects. The Search Object that finds all orders of a
business partner is "BTQuery1O".
DATA gt_parameter_list TYPE crmt_name_value_pair_tab.
DATA gs_parameter_list TYPE crmt_name_value_pair.
DATA gt_data_hdr       TYPE TABLE OF crmt_genil_rfc_data_hdr.
DATA gt_data_attr      TYPE TABLE OF crmt_genil_rfc_data_attr.
DATA gt_data_rels      TYPE TABLE OF crmt_genil_rfc_data_rel.
DATA gt_data_rel_obj   TYPE TABLE OF crmt_genil_rfc_data_rel_obj.
gs_parameter_list-name  = 'BP_NUMBER'.
gs_parameter_list-value = '4000000011'.
APPEND gs_parameter_list TO gt_parameter_list.
CALL FUNCTION 'CRM_GENIL_GET_QUERY_RESULT'
  EXPORTING
    iv_query_name                = 'BTQuery1O'
    it_parameter_list            = gt_parameter_list
  TABLES
    et_data_hdr                  = gt_data_hdr
    et_data_attr                 = gt_data_attr
    et_data_rels                 = gt_data_rels
    et_data_rel_obj              = gt_data_rel_obj
  EXCEPTIONS
    error_occured                = 1
    OTHERS                       = 2.
Before you can use the function module, you have to call function module CRM_GENIL_INIT
to initialize the GenIL.
Regards,
Karsten

Similar Messages

  • Is there a BAPI or function module for price condition?

    Hi experts,
      I just want to create price condition info record to purchase order.
      we create price condition through tcode MEK1/MEK2/MEK3.
      it is more different from tcode ME11. it doesn't need to input purchase group, tax code etc.
      but I can't find the BAPI or function module for this tcode.
      does anyone know it?
      thanks in advance.
      looking for your reply.
    jack

    Please check this answered link:
    Re: Bapi_prices_conditions does not delete old condition properly
    Re: bapi for condition recaords
    Edited by: Afshad Irani on Jun 13, 2010 3:38 PM

  • Standard BAPI or Function Module for FB01posting

    Hi Experts,
    My requirement is as follows.
    Invoice details would be sent across from Middleware to SAP and for which I have developed a Custom Remote Enabled Function Module. The Function Module needs to post the data using FB01 Transaction.
    I had planned for recording a BDC for FB01 and post the data, however, we are on the verge of getting upgraded from 4.7 to ECC 6.0. To avoid problems that we might face for change of screens in ECC 6.0, I would prefer using a BAPI or Function Module for FB01 posting, if available, instead of BDC.
    Data coming from Middleware are as follows.
    HEADER:
    BKPF-BLDAT :  Document Date
    BKPF-BUDAT : Posting Date
    BKPF-XBLNR: Reference (Invoice#)
    BKPF-BLART : Document Type
    BKPF-BUKRS : Company Code
    BKPF-BKTXT : DocHeader Text
    BKPF-WAERS : Currency
    LINE ITEM:
    BSEG-LIFNR : Vendor no
    BSEG-WRBTR - Total amt -Debit/Credit -Vendor
    BSEG-ZUONR : Assignment field
    BSEG-EMPFB : Alternative Payee
    BSEG-UZAWE : Payment Method Supplement
    BSEG-ZTERM : Pmt terms
    BSEG-KOSTL : Costcenter
    BSEG-HKONT : GL AccountNumber
    BSEG-WRBTR : Amount for GL
    BSEG-SGTXT : Line item text
    The Vendor Line Item would be one where as GL line items could me more than one.
    Can any of you suggest me a standard BAPI or Func Mod?
    Points will be awarded for valuable inputs.
    Thanks to all!!!!

    You can use RFBIBL00 program for FB01 postings. Go through the program help on how to use this program.
    This program requires a file to be on application server in a certain format.
    You may also refer the program RFBIBLT0 on how the file format should be.
    Hope this helps.
    Thanks,
    SKJ

  • Are there BAPI or function modules for creating posting address ?

    Are there BAPI or function modules for creating posting address and budget address? We are currently use BDC program and T code FMBSPO_MULT (Posting address) and T code FMBSBO_MULT(budget address), but it is a very slow processing because we have thousands of funds centers.
    Your input will be appreciated!
    Regards,
    Fisher Li

    Li,
    You will have, may be more answers in the technical forum :
    https://www.sdn.sap.com/irj/sdn/collaboration
    Regards
    Valérie

  • Any Bapi or Function module for transaction CA22

    Hi experts,
    Is there any Bapi or Function module for transaction CA22(Change Rate Routing).
    Thanks,
    Yogesh

    Hi,
    The following r the Enhancement's and BADI'S fro CA22
    Enhancement
    CMDI001                                 Determine explosion control for BOM
    CPAU0001                                Enhancement for Authorization Check in Task Lists
    CPDO0001                                Test units of measure for reference operation set
    CPRE0001                                Enhancement for Reorgnization Checks in Task Lists
    XCZD0004                                Extend authority check for the material-recipe allocation
    Business Add-in
    CEWB_OPR_MENU_EXTERN                    Menu Extensions in the Engineering Workbench
    CEWB_OPR_MENU_INTERN                    Menu Extensions in the EWB (SAP Internal)
    CEWB_SEQ_MENU_INTERN                    Menu Extensions in the EWB (SAP Internal)
    CEWB_TSK_MENU_EXTERN                    Menu Extensions in the Engineering Workbench
    CEWB_TSK_MENU_INTERN                    Menu Extensions in the EWB (SAP Internal)
    CEWB_TSK_SCREENS                        Screen Extensions for Task Lists in the EWB
    CEWB_TSK_UPDATE                         Task List Maintenance and Checks in the EWB
    CP_DIG_SIGNATURE                        Digital Signature for Routings
    EWB_SELECTION                           Selection Within the Engineering Workbench
    ROUTING_EXIT                            User Exits for Routings
    CEWB_MTK_MENU_INTERN                    Menu Extensions in the EWB (SAP Internal)
    CEWB_MST_MENU_INTERN                    Menu Extensions in the EWB (SAP Internal)
    CEWB_MST_MENU_EXTERN                    Menu Extensions in the Engineering Workbench
    CEWB_ITM_MENU_INTERN                    Menu Extensions in the EWB (SAP Internal)
    CEWB_ITM_MENU_EXTERN                    Menu Extensions in the Engineering Workbench
    CEWB_GEN_MENU_INTERN                    Menu Extensions in the EWB (SAP Internal)
    CEWB_GEN_MENU_EXTERN                    Menu Extensions in the Engineering Workbench
    CEWB_COM_MENU_INTERN                    Menu Extensions in the EWB (SAP Internal)
    CEWB_COM_MENU_EXTERN                    Menu Extensions in the EWB (SAP Internal)
    CEWB_CHA_MENU_INTERN                    Menu Extensions in the EWB (SAP Internal)
    CEWB_CHA_MENU_EXTERN                    Menu Extensions in the Engineering Workbench

  • Mapping in interconnect between different Business Objects

    I want to know how to do transformation and mapping between different business objects in interconnects.
    Always,We have a very complex SQL,when We do intergration
    with Oracle interconnect ,We use DB Adapter or Jdbc Adapter,but the complex SQL have to be excuted in the resource DB or the destination DB which may be a big pressure to them ,I think can We use different Business Objects, and do the Mappings in interconnect,so the big pressure will be on the interconnect server just like the ETL tools, But I just find that Interconnect can do tranformation and mapping in one Business Object ,how can I do? Is anyone meet this problem like me ?thanks for discussion.

    For me, Business Objects are logical groupings of business processes. For example, we have a Business Object called "Maintain_Employees". Under this we have 1 Procedure (Create_Employee) and 2 Events (Update_Employee and Delete_Employee).
    We have 1 Oracle system interfacing with 23 other legacy systems. Some of these legacy systems will be using this "Maintain_Employees" Business Object (Common View), and our main transformations will be between the Common View and the legacy Application Views.
    We are using a number of techniques to assist in "validating" data in the InterConnect. The main ones are using 'Cross Reference Tables (XREF)' and 'DatabaseOperation' transformations. By using 'Content Based Routing' we are able to send the right message to the right legacy system, and therefore do the right transformation/validation on the message payload. However, this is only a small part of a complex puzzle.
    I also have the "problem" of having "very complex SQL" on our Oracle system too. This is not unusual when using the InterConnect.
    To my mind, the InterConnect does 2 main operations. Firstly, it performs some message transformation (mapping), and secondly, it acts as a transportation engine (routing) using the adapters.
    The remainder of the effort required to create or consume the message resides with the Applications themselves. Whether it is parsing an XML CLOB payload, inserting data into staging tables, writing to log files, pre-processing data, calling API's or something else, your Application side programming and processing overhead can get large.
    The trade off it to ask the question, do I want to be able to track and manage messages from start to finish in high detail? Or can I trust that all message payload data will be consumed with no additional processing on the Application side?
    My experience has shown that the bottleneck is always at the Application side, and almost never in the InterConnect.
    The short answer to your first question is "You are right. Mappings can take place only between Application Views and Common Views only - not between Business Objects.".
    To answer your second question "Probably everyone reading this forum has this problem. The intelligence that is able to really interpret message data, validate it and process it is only found in the Application, not the InterConnect. You could, however, use the Workflow engine within OAI in order to provide additional pre-validation, human interaction and logic, but this too could be complex."
    At my current client, we are architecting an Application OAI Message handling schema. This will contain staging tables, pre-processing tables, "OAI" wrapper PL/SQL scripts, "APPS" wrapper PL/SQL scripts and Message Logging and Exception tables. Ours will be a complex set of PL/SQL processes too.
    I hope this helps, just in letting you know that you are not alone with this problem.
    I wonder if anyone else would like to share how they have architected their InterConnect and Application side mapping and transformation solutions.

  • BAPI or Function Module for F-22

    Hi I am working on one scenario. I am clearing the document using F-30 transaction in one company code and Posting the same document in other company code using F-22. I need to know whether it posts successfully or not using F-22 before I clear the document so that I can stop this from clearing. I can not do this simply using  the BDC. Here I need a BAPI or function module to have a check whether it will post successfully or not using F-22 before I clear the document using F-30.
    Please help me to find the right BAPI or Function Module here.
    Thanks,
    Ravi.

    Hi Eswar,
    BAPI_ACC_DOCUMENT_POST  works only for 2 line postings. But we can make it work for one line by implementing BTERWBAPI01.
    Here you will be passing ACCHD-GLVOR = RFST
    ACCIT-BSTAT = S
    ACCIT-BSCHL = 39
    ACCIT-UMSKZ = F
    ACCIT-ZUMSK = Z
    could you please share the code that you have implemented in BTE?
    please share the sample code that you have done for BAPI.Because I also have the same requirement for f-47.
    Regards,
    xavier.P

  • Bapi Or Function Module for Updating a table

    Can u Plz let me know , is there any bapi or function module to update few fields of a standard table using an internable.

    Hi Shiva Kumar Tirumalasetty ,
         There is no FM / BAPI to update directly to any SAP tables . SAP won't suggests to develop a FM/BAPI like that , as it will cause some data inconsistency problem .
    We have to search and find BAPI's/ FM's for requirement specific if not exists then need to think about the alternate options (LSMW/ BDC etc..)
    Hope this answers your question.
    Thanks,
    Greetson

  • BAPI or functiona module for KEPM tcode

    Hi Guys,
                  I am looking to maintain Sales budget and forecast values.
    is there any BAPI or function module I can use ?
    the only other option will be BDC program.
    Thanks
    Sam

    Hi Eduardo,
                        Thanks for that.
    I am already trying to post with these function modules.
    But it looks like I can only update the existing records. not sure I can post new records.
    do you know any way to post new entries ?
    I try BDC but its not good enough..
    Cheers
    Sam

  • BAPI or Function Module for F-53 and FBZ1

    Hi Gurus,
    I am currently executing two transactions F-53 and FBZ1. I would like to know if there are any read BAPIs or function modules that take BELNR_D(Document Number) and Company code and Fiscal Year as input and give the rest of the details I enter in these transactions like, partial payment, residual payment.
    Kindly help.
    Many Regards,
    Sagar

    Hi, Sagar:
    Nice to see your thread here
    No matter what kind of transactions you are using, finally, there will be a document posted in General Ledger Accounting, which is what you want. So to read the result, you can always try function module, like FI_DOCUMENT_READ.
    Hope it will help.
    Best Regards, Lawrence

  • Bapi or function module for Tcode F-54

    Hi,
    I need Bapi or Function moudle for tcode F-54. I am developing interfaces. I have to clear the the advance amount against an invoice.
    Regards,
    Dhanunjaya Reddy.

    Hi,
    Check the below userexits
    F050S001            FIDCMT, FIDCC1, FIDCC2: Edit user-defined IDoc segment
    F050S002            FIDCC1: Change IDoc/do not send
    F050S003            FIDCC2: Change IDoc/do not send
    F050S004            FIDCMT, FIDCC1, FIDCC2: Change outbound IDoc/do not send
    F050S005            FIDCMT, FIDCC1, FIDCC2 Inbound IDoc: Change FI document
    F050S006            FI Outgoing IDoc: Reset Clearing in FI Document
    F050S007            FIDCCH Outbound: Influence on IDoc for Document Change
    F180A001            Balance Sheet Adjustment
    FARC0002            Additional Checks for Archiving MM Vendor Master Data
    FEDI0001            Function Exits for EDI in FI
    RFAVIS01            Customer Exit for Changing Payment Advice Segment Text
    RFEPOS00            Line item display: Checking of selection conditions
    RFKORIEX            Automatic correspondence
    SAPLF051            Workflow for FI (pre-capture, release for payment)

  • BAPI or Function module for WAHD2

    Hi all,
    Is there any BAPI or function module to update consumption values in the t-code WAHD2 ?
    I found one WAHD_DISPLAY_CHANGE but when I executed this, it is opening another page where we can edit the values like in the t-code.  So I am not sure how to use this inside my program.
    Please share your valuable thoughts on this.
    Thanks.

    The FM is WAHDA_WRITE_WAHD_SINGLE

  • Bapi or Function Module for Change request Management status update

    Hi,
    Do we have any Bapi or function module to change the status of Change request Management.
    Ex: If the status is in To Be Processed i have to change that status to Authorized using any Bapi or FM.
    I have tried with the BAPI crm_icss_change_request but its not updating the status.
    Do you have any idea on this???
    Regards
    Pavan

    hello,
    the function module is 'SOCM_STATUS_VALUES'
    you can find an example of usage of it in the program CRM_SOCM_SERVICE_REPORT
        CALL FUNCTION 'SOCM_STATUS_VALUES'
          EXPORTING
            im_process_type       = report_list-process_type
      IM_LANGU              = SY-LANGU
          TABLES
            status_values         = lt_vsocm_stat_propt.
    I hope it helps
    best regards

  • BAPI or Function Module for getting Pending Purchase Orders Information

    Dear Sir,
    We have input information comprising of  :
    List of Item Codes
    Plant
    WBS Element
    For this input data set , We want to know the list of Pending Purchase Orders information . To get the desired information , we are looking for the suitable  BAPI / Function Module which can provide the desired information .
    I understand that there is ME2L tcode availavle which can give the desired information .
    But as we need to use the information in one of our Z program , so we need the  BAPI / Function Module  .
    Kindly help us to know the suitable  BAPI / Function Module  available for getting the desired information .
    With Thanks and Rgds
    Sonia Agarwal

    Hi
    Check if this is helpfull:
    BAPI_PO_GETDETAIL
    BAPI_PO_GETDETAIL1
    regards,

  • Bapi or Functional Module for shipment!!

    Friends,
    I need a Bapi or a FM to attach a delivery on a shipment . Please let me know if there is any. I am on 4.6 C
    Thanks

    Hi Andrew,
    BAPI_SHIPMENT_CHANGE does exist.
    But it is not yet released.
    CAUTION                                                              *
    This function module is not released officially.                     *
    It is not implemented in normal applications                         *
    and is not well tested.                                              *
    (This function module is only implemented to store the knowledge     *
    for later use)                                                       *

Maybe you are looking for

  • Home Sharing turns off as soon as my computer enters sleep mode.  How can I work around this issue?

    Home Sharing turns off as soon as my computer enters sleep mode.  How can I work around this issue?

  • SERVICE SCENARIO

    Hi Gurus, I am mapping service scenario with reference to sales Order for my client. In that only activity charges will be captured against production order & settlement is to be done. When I convert plan order into production Order by CO08, I get an

  • Keytool seems to generate private key outside of HSM

    I am investigating integration with LunaSA (Safenet HSM) and JDK. LunaSA rejects key generation through JDK PKCS#11 wrapper. When I execute "keytool" command, then, PKCS#11 wrapper seems to generate private key outside of the HSM. Actually, the PKCS#

  • Need Help From a Formula Expert

    If you are a brave formula expert looking for a challenge, then please read on! I'm stumped! I use Numbers to keep track of my reading. I have a sheet for books, where one row is used for one book. I have one column to record the author, one for the

  • Connecting USB and Charger at the same time

    Hello guys, Is there any problem connecting usb and charger at the same time? after that, the Nokia Battery Monitor 2.0 shows 93% after full charge. Any ideia?