设为首页 收藏本站
查看: 996|回复: 0

[经验分享] (转载)List of Important transactions,Tables & API in SAP CRM(Very helpful)

[复制链接]

尚未签到

发表于 2015-9-22 10:37:11 | 显示全部楼层 |阅读模式
  http://scn.sap.com/docs/DOC-43532#comment-484973
CRM Tables and FM's for Business Partner :  Commonly used Tables and Function modules for Business partner

  • Business Partner Roles: BUT100
  • Business Partner Relationship: BUT050
  • Business Partner Contact Person: BUT051
  • Business partner identification data: BUT0ID
  • Business partner Tax classification data: BUT_FRG0011
  • Business partner Bank Details: BUT0BK and BUT0BANK
  • Business partner Industry data: BUT0IS
  • Business partner Payment card data: BUT0CC
  • These tables and many more stores the business partner data as entered in the respective tabs. But the above mentioned are more commonly used.
  Business Partner Hierarchy

  • In table BUT_HIER_TYPE the tree type guid can be found. For each tree type there can be multiple hierarchy trees.
  • With the tree type guid we can go to table BUT_HIER_TREE and find the tree guid and tree description from table BUT_HIER_TREE_D
  • The Node guids are maintained in table BUT_HIER_NODE and BUT_HIER_NODE_D.
  • With this tree guid and the node guid we can go to table BUT_HIER_STRUCT and find the business partner hierarchy. For a child node we can get the parent node.
  Business Partner Sales area data

  • The maintained sales area for a business partner can be found by executing the function module CRM_BUPA_SELECT_SALES_AREA. The function module is called from the BP transaction which can either called in with dialog or without dialog mode.
  • CRMM_BUT_FRG0100: Table containing Business Partner & sales area
  • Business partner sales area data displayed in the sales tab can be found from table CRMM_BUT_LNK0011. With the SET_GUID the details can be found in table CRMM_BUT_SET0010.
  • Same rule exists for business partner billing data ( CRMM_BUT_LNK0031 and CRMM_BUT_SET0030 ), shipping data ( CRMM_BUT_LNK0021 and CRMM_BUT_SET0020), etc.
  • The business partner sales area specific partner function can be found in table CRMM_BUT_FRG0081 and CRMM_BUT_FRG0080.
Marketing Table Relationships

  • CABN Attribute Details - The attribute, like Hobby etc..
  • CAWN Attribute's values, like under Hobby - Cricket, Football etc...
  • KLAH Class ID or the Attribute Set ID. Like Hobby could be under Personal Interest Attribute set
  • SWOR Key word for Attribute Set
  • KSSK Attribute set ID vs Object ID (linking to BP) - Which partners has been assigned an attribute set.
  • INOB Object ID vs BP ID - Object ID linked to the BP ID
  • AUSP Gives BP GUID for an Attribute ID, Value and Object ID
  
  Function Modules for Business Partner

  • BAPI_BUPA_CREATE_FROM_DATA : To create BP in CRM
  • BAPI_BUPA_FRG0020_GETDETAIL: To obtain shipping data
  • BAPI_BUPA_FRG0020_ADD : To insert shipping data in a BP
  • BAPI_BUPA_FRG0030_GETDETAIL : To obtain pricing data
  • BAPI_BUPA_FRG0030_ADD : To add the pricing details in a BP
  • BAPI_BUPA_ROLE_ADD : To add role to a Business Partner
  • BAPI_BUPA_FRG0010_ADD :To add Sales data to Business partner
  • BAPI_BUPA_FRG0010_GETDETAIL : To get sales data for BP
  • BAPI_BUPA_TAX_ADD : To add tax details to BP
  • BAPI_INDUSTRYSECTOR_ADD : To add industry code in BP
  • CRM_BUPA_SELECT_SALES_AREA.: To get the maintained Sales area data for business partner
  • BUPA_DESCRIPTION_GET : To Get then Business Partner Description
  
  
  Product Master related : Commonly used Tables and Function modules for Product Tables for Product

  • In the table COMM_PRODUCT and COMM_PRSHTEXT the product guid, product ID, product type and product description can be found.
  • COMV_PR_SALES_OT :Table containing product id against Sales Area
  • COMM_PRPRDCATR: Table containing product category against product
  • COM_PRODUCT_ID_GET - FM to get product ID from Product Guid
  • The product base unit and alternative unit of measures can be found in table COMM_PR_UNIT ( this table is same as MARM table in R/3 ).
  • The GTIN ( Global Trade Item Number ) for a particular product is stored in table COMM_PR_GTIN.
  Table for Product Hierarchy and Categories

  • Different hierarchy ID is stored in COMM_HIERARCHY. Product and category ID assignment is stored in table COMM_PRPRDCATR. The category ID details is stored in table COMM_CATEGORY
  Product Set types

  • All the relevant data for products is stored as set types.

  • For each attribute of set type is generated Data Element with the same name

  • When a set type is created it generates a table, programs and function modules. The table name created for a set type is same as the set type name.
  • The fields of these generated tables are named as "ZZ" and running number, and their type is Data Element generated for the attribute.
  • All set types must have the field FRG_GUID ( set guid ) along with other fields depending upon the attributes assigned to these set types.
  • COMM_PR_FRG_REL & COMM_PR_FRG_ROD  
  
  Function Module for Product

  • COM_PRSHTEXT_READ_SINGLE : To Get the product description
  • CRM_PRP_READ - To get the Sub item details of a PPR ID
  • Class CL_CRM_COMPONENT_SETTYPE Method READ_SETTYPE_DATTA_FROM_PRODUCT may be used for this requirement, passing the parameters: Product Guid of Service Plan product, Set type 'ZPPR' and the Organization data of the Service Order
  • CRM_PRODUCT_GETDETAIL_API - To get the details of the product.This is also used for pulling data for a product from set type.ES_PRODUCT_DATA : CATEGORIES - contains category data (contains HIERARCHY_GUID & CATEGORY_ID)
  • COM_PRODUCT_READ_SINGLE : To get the details of the product
  
  
  Function modules for Organization
  Organization Attribute

  • The Attributes assigned to a org unit can be found by using the function module RH_OM_ATTRIBUTES_READ.
  • In this function module we need pass the plan version ( which is always 01 i.e. current plan ) , object type ( which can O ( org unit ), US ( user ) and all the valid object types present in table T778O ), SCENARIO ( can be SALE, SERVICE or MARKETING ) and SELDATE ( generally the current system date in order to get the most recent object values.
  • This function module is useful in order to the distribution channel, division, currency, country, etc for an org unit.
  
  Organization Hierarchy

  • In order to get the organization hierarchy we can use function module RH_STRUC_GET.
  • In this function module the meaning of the parameter plan versions, object type and object ID remains the same.
  • The parameter ACT_WEGID is used to give the evaluation path. Depending upon this evaluation path the result vary. For example if we use the O-O_DOWN for an org unit we will get all the child for that org unit sorted down.
  • All the valid evaluation path is maintained in table T778A.
  
  
  Organization validation

  • A org unit is valid or not can be found from the table HRP1001 or by using the function module RH_MACO.
  • The function module RH_MACO in addition can provide the search help for an org model.
  • Sales org validation can also be done using function module CRM_ORGMAN_SALES_ORG_CHECK.
  • Distribution channel validation can be done from CRMC_DISTCHAN
  • Division validation can be done from CRMC_DIVISION.
  • The search help to display only sales org is CRM_ORGMAN_SALES_ORG
  • The search help for distribution channel is CRM_ORGMAN_DIS_CHANNEL
  • For a R/3 Sales org the corresponding CRM sales org can be found by using function module CRM_BUPA_SALES_AREA_TO_CRM and the vice versa by function module CRM_BUPA_SALES_AREA_TO_R3
  
  
  Transactional data
  Enhancements in transaction type

  • CRM_ORDERADM_H_BADI: Gets triggered when transaction header data is changed. When a transaction is created this BADI is triggered only first time.
  • CRM_ORDERADM_I_BADI: This BADI is triggered per line item. When a new line item is added or deleted this BADI is triggered.
  • CRM_OPPORT_H_BADI: This BADI is used when opportunity header data is changed. This is not common for all the transaction type.
  • CRM_LEAD_H_BADI: This BADI is used when the lead header data is changed. This is also not common for all the transaction type.
  • CRM_ACTIVITY_H_BADI: This BADI is used when the activity header data is changed. This is specific to the transaction type with leading transaction category as activity.
   More BADIs

  • There are many more BADIs which help in certain modification of the business transaction during the process of its creation.
  • Apart from the list mentioned above the other important BADIs are CRM_SALES_BADI, CRM_ORGMAN_BADI, CRM_SCHEDLIN_BADI, CRM_PRODUCT_I_BADI etc.
  • All these BADI have got two methods in common. One method is used for checking and the other one is used for changing data.
  • In the method for data changing one of the importing parameters comes with a old value , one with the changed value and other with the names of the fields changed. There is one changing parameter for this method which is may be used according to the business requirement.
  • ORDER_SAVE: This badi is used during the saving of any business transaction
  
  Important function modules to read business transaction

  • CRM_ORDER_READ is the function module used to read the data for any business transaction.
  • There is a program CRM_ORDER_READ which can be used to find out that in which important parameter the relevant data is present.
  • In the function module importing parameter there is a IT_REQUESTED_OBJECTS which can be used for performance tuning. That is only passing the object names which are required.
  
  
  Function module to create or change business transaction

  • BAPI_ACTIVITYCRM_CREATEMULTI can be used to create activity or sales order in CRM.
  • In the BAPI for each type of data like header or item there is parameter where we need to populate with X in order indicate which data is required to be populated.
  • The function module CRM_ORDER_MAINTAIN can be used to change business transaction data. The parameter CT_INPUT_FIELDS is used to specify the object names and the field names which has been changed
  
  SAP CRM Interaction Center Web Client
  Objective

  • For users utilizing the Interaction Center (IC) functionality of SAP CRM, IC Web-client provides a Web interface with an aesthetic layout and user-friendly controls. To design the IC web layout, an in-depth understanding of its architecture is a must. The aim behind this program is make the participants well conversant with the same.
  • In other words this program would help participants to understand SAP-CRM version 5.0 IC Web architecture and thus facilitate design and implementation of solutions based on the same.


  • The SAP Application Server Release 4.6 D is fully based on the ABAP runtime environment.
  • User Interfaces (UIs) are based on Dynpro technology. Dynpros are normally displayed on a clients PC via SAP GUI technology.
  • Instead of a SAP GUI it is also possible to access the Application Server via a Web Browser. In this case the Internet Transaction Server (ITS) is required as a Web Middleware. ITS is translating the ABAP based Dynpros into HTML pages dynamically at runtime.
  • To connect the Application Server to external software components you can use the SAP proprietary Remote Function Call (RFC) protocol.
  
   Basic Terminologies

  • SAP Web Application Server (SAP WAS)

    • SAP WAS is a platform for efficient development and allows the implementation of web applications. It supports the complete development and lifecycle of enterprise applications, and allows a user to develop new kind of enterprise web applications known as BSP applications.



  • Business Server Pages (BSPs)

    • BSP contains code and HTML(B), all of which is compiled by the server upon request. The user interface (UI) in IC Web client application is based on the BSP technology.



  • HyperText Markup Language Business (HTMLB)

    • BSP extensions provide HTMLB tags that provide excellent look and feel to the Interaction Center layout. HTMLB tags are more powerful than the HTML tags and thus provide better aesthetic options.



  • WAS : From the SAP point of view the (WAS or Web AS) is the foundation on which most of their product range runs.
  • Its basic function is to allow web development based on SAP standard solutions (usually developed under the ABAP programming language, but in the newer versions also in Java programming language).
  • With Web AS, it is possible - for example - to publish queries, programs and ABAP applications in a web environment but linked to and based in a SAP solution infrastructure. The newer versions of the (WAS or WEB AS) also support open standards like Java programming language.
  • From the versions 6.20 and higher it is possible to create ABAP only, Java Platform, Standard Edition only or mixed environments.


  • The Internet Communication Manager (ICM)

    • For communications between the Web Application Server and external supporters over intranets or the Internet using standard protocols like HTTP, HTTPS, and Simple Mail Transfer Protocol (SMTP).

  
  Views:

  • BSP : The SAP Web Application Server provides a page-based programming model with server-side scripting as well as server page technology for developing, designing and implementing Web applications: (BSP). Server-side scripting enables direct access to all elements in the application server (such as function modules, database tables, ABAP Objects, and so on. ).


  • HTMLB :It is extension of HTML. More powerful than HTML and user to design UI. We'll see few basic tags of HTMLB during this course.
  

  • IC WebClient : It is the web based framework which is build on WAS and used for SAP applications.


  • BSP : The SAP Web Application Server provides a page-based programming model with server-side scripting as well as server page technology for developing, designing and implementing Web applications: (BSP). Server-side scripting enables direct access to all elements in the application server (such as function modules, database tables, ABAP Objects, and so on. ).


  • HTMLB :It is extension of HTML. More powerful than HTML and user to design UI. We'll see few basic tags of HTMLB during this course.
  

  • IC WebClient : It is the web based framework which is build on WAS and used for SAP applications.
  
  Navigation Bar
  IndexLeadInteraction Hist.OpportunityOpportunityUpdate navigation Bar LeadInteraction Hist.
  
  
  SAP Web AS 6.20
  User AccessUser Interface ProgrammingProgramming LanguageConnectivity* SAP GUI

  • Web Browser, Mobile Devices* DynPro
  • BSP
  • JSP* ABAP
  • JAVA* RFC
  • Access to 3rd Party (connectors)
  • HTTP(s), SMTP, SOAP/XML*J2EE*ABAP*SAP Web AS 6.20*Internet Communication ServiceClient
  • The Internet Communication Manager (ICM)
  • For communications between the Web Application Server and external supporters over intranets or the Internet using standard protocols like HTTP, HTTPS, and Simple Mail Transfer Protocol (SMTP).
  
  IC Web Client on SAP Web AS 6.20
  Business Server Pages( ABAP + HTMLB)ABAPJ2EE*Communication Services*
  Scripting
  …External Communication SoftwareSAP Web AS 6.20*ABAP Based BSPs*controlling layout and navigation
  *JAVA Based services*controlling communication integration and scripting
  IC Web Client

  • The IC WebClient is based on BSP technology mainly.
  • An agent logs on to the IC WebClient application (BSP application CRM_IC) through an URL, portal.
  • In parallel to the BSP session there is a second session running on the Java side controlling the integration with third party communication software as well as some other services (alerts and interactive scripting, knowledge search).
  
  Layers in IC Web Client Application
  TablesGeneric Interaction Layer Business Object Layer(BOL)Business Server Pages (BSPs)(GENIL) Application Programmer Interfaces*Business LayerPresentation LayerDatabase *IC Web Client

  • The Business Server Pages (BSPs) are the presentation layer of the IC WebClient. They are used to generate the HTML page of the WebClient running in the agents Browser. The business logic of CRM business objects and processes is not controlled by the BSPs: presentation and data model are handled separately.
  • Business objects like business partners, product, transactions, etc. are kept in the Business Object Layer (BOL).
  • The Generic Interaction Layer (GENIL) handles the data transfer between database tables and the BOL.
  • As we want to focus on WebClient UI customization we will focus on the BSPs rather than the data model of the CRM objects.
  
  Layers in IC Web

  • Presentation Layer:

    • Forms the user interface created out of Business Server Pages (BSP). BSP contains code and HTML(B), all of which is compiled by the server upon request.

  • Business Layer:

    • Containing the Business Object (BO) layer and the Generic Interface Layer (GENIL).
    • BO layer contains the runtime data of an IC Web client session. It stores the BO data such as Business Partners, Orders, etc.
    • GENIL is the Generic Interaction Layer that provides an interface between the BO Layer and the underlying Business logic. The segregation of BO Layer and GENIL.

  • Business Engine:

    • Containing the Application Peripheral Interfaces (API) and the Database tables.

  • The above structure ensures a definite segregation between the layers which facilitates the connection of different Business Applications via the Business Layer (BOL and GENIL) to the Presentation (IC Web UI).
  
  Business Layer: Overview
  RequestResponseuser
  inputdata
  outputControllerViewModelPresentation Layer (BSP)Business
  LayerDatabase and Applicationdatabase tables storing the business objects of independent structure BOL: Business Object Layerdata structures of the BOL holding business objects for the IC WebClient sessionGENIL: Generic Interaction Layerconnecting BOL to the CRM database table through APIsAPIAPIAPI

  • The business layer of the IC WebClient handles the data of the business objects of an IC WebClient session. It consists mainly of two elements:
  • The BOL Business Object Layer is a set of structures that hold the data.
  • The GENIL Generic Interaction Layer connects the BOL to the CRM database through APIs (Application Programming Interfaces). The APIs are mainly ABAP classes and function modules reading and writing data to and from the CRM standard business logic and database.
  
  IC Workbench: Accessing the BOL Model
  BOL Object: CRM Business TransactionData Dictionary Structure (double click)Fields of the structureTransaction:
  BSP_WD_WOKBENCH
  

  • This function was available in CRM 4.0 in transaction GENIL_MODEL_BROWSER
  Tools for BOL and GENIL  ControllerModelPresentation LayerBusiness LayerBOLGENILViewBSPDisplay BOL Model Transaction: BSP_WD_WORKBENCH or GENIL_MODEL_BROWSERGENIL APIs IMG: Generic Interaction Layer/Object Layertest data retrieval from database to BOL through the GENIL  Transaction: GENIL_BOL_BROWSERDatabase and Application
GENIL
Transaction: GENIL_MODEL_BROSWER Structure Displayed would be same as in case of BOL

  • The Generic Interaction Layer (GENIL) handles the data transfer between database tables and the BOL.
  • Connects to the APIs and CRM Tables for Data retrieval


  • SPRO->Customer Relationship Management->CRM Cross Application Components->Generic Interaction Layer/Object Layer->Component Specific Settings->Check Entire Model for Transactions would depict the entire GENIL model based on the relationships.
  Generic Interaction Layer  IMG: Generic Interaction Layer/Object Layer à Basic Settings

  • You may use this transaction to find out which GENIL classes are responsible for reading and writing data from and to the CRM database.
  • For example the Business Partner is accessed via the implementation class CL_CRM_BUIL and its methods.
  
  
  Genil BOL Browser
  Transaction GENIL_BOL_BROWSER or
  BSP_WD_WORKBENCH à Environment à BOL Browser
  Transaction GENIL_BOL_BROWSER or
  *BSP_WD_WORKBENCH à Environement à BOL Browser*

  • Here you can test the data retrieval from the CRM database to the BOL (advantage: you do not need the Web Client as a UI to test GENIL and BOL).
  Presentation Layer

  • BSP is the basis of Presentation layer
  • BSP in IC web is based on Model View Controller (MVC) architecture.

    • View:

      • The view provides the layout for display of fields/buttons/dropdowns etc. on the screen and does forms a user interface.

    • Model:

      • Responsible for linking the fields on the view with the underlying BOL.

    • Controller:

      • Would respond according to the user commands.


  
  
  Business Server Page Technology

  • Layout Rendering and event handling is done by pages
  • Business Logic is included via Application class
  • Flow between pages is defined by event handler
  
  ResponseBusiness Object Layer (BOL) IC Web Client*Business Layer Presentation Layer *Application Class
  Attributes + Methods Request
  
   Common features of BSP Applications:

  • Direct request to the server, the server takes the request process to the BSP page.
  • BSPs are called via URL.
  • BSPs are fully integrated.
  • BSPs can read data from the database via the business layer.
  • BSPs can call a function module.
  • BSPs can be transported.
  
  
  Model View Controller in BSP

  • Extend the BSP Programming model with MVC paradigm
  • Enable programming model similar to Java World
  • Simplify BSP pages in order to support further customizing options
  • BSP using MVC (Model View Controler) concept:
  • BSP Views:
  • Views
  • View sets
  • BSP Controllers:
  • View controllers
  • Custom controllers
  • Model:
  • Contexts
  • Context nodes
  • Every view has a controller. Benefit is that a controller from one application can call another application without modification.
  • For every business object or model there is a custom controller. The custom controller keeps all data we have for the business object or model to show data in different views.
  • Custom controller lives whole time in the IC session. When you end contact you can clean up all custom controllers (this is programmable).
  • Context is where the data is stored in IC session working data container built like a hierarchy and node, each node has some data parts.
  • Context exists for the session.
  
  
  Controller View Structure

  • Complex call sequence during one HTTP request
  • Page fragment aggregated during runtime
  

  • Within a view set we can call other views.
  Object Navigator

  • The Standard BSP Application CRM_IC is opened in the Object Navigator SE80. The screen shot shows the presence of Controller, View, Pages and Flow Logic, Page Fragments and MIMEs as a part of the same.


  • A page can have the following versions:
  • Page with flow logic: These are simple pages with event handlers, but without much application logic or visualization elements. It is possible to build a BSP application exclusively out of pages with flow logic and event handlers.
  • View: Views are used to visualize data. Page fragment
  • Page Fragments: These are created in the same way as normal BSPs, but are then marked as page fragments. Other BSPs can also include these fragments using the include directive


  • Controller and Views would be explained under Model View Controller, the next section.
  Model View Controller

  • The Model View Controller which is the basis of SAP CRM – IC WebClient BSP.
  • The "Controller" would receive the user request and based on the same the output would be displayed on the screen (View).
  • If further processing (retrieval of data/setting the data) of the request is intended, the same would be passed on to the "Model".
  • The Model would thus retrieve the data from the underlying Business Layer. This concept where the fields on the view are thus linked with the BOL is known as Binding.
  
  View Controller
  

  • The "View Controller" is implemented as a class which is assigned to the view. The methods present in the controller would determine the actions to be taken based on the user commands.
  Custom ControllerPresentation Layer (BSP)ControllerView 1ModelContext NodeModelContext NodeControllerView 2Custom ControllerModelContext NodeLifespanBusiness Layer (BOL, GenIL)DatabaseLifespanLifespan

  • Since the data held by the View, View controllers and the Contexts are deleted from the memory when the user navigates away from the view, there may lie a need to safeguard this at times.
  • Custom controllers would allow this as they have unrestricted lifespan.
  • Data can be passed to the custom controller while navigating from one view to the other.
  
  
  
  This document was generated from the following discussion: List Of FM to get data from Product master
  More Reference blogs/discussion -
  CRM Tables - CRM - SCN Wiki

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-117121-1-1.html 上篇帖子: sap--TCODE 之 SE93 将事务代码分配给程序 下篇帖子: SAP SD Pricing Procedure Flow Map
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表