Quantcast
Channel: SCN : Document List - Customer Relationship Management (SAP CRM)
Viewing all 252 articles
Browse latest View live

Authorization check when searching CRM business transactions

$
0
0

The process flow of the authorization check in business transactions is also followed when searching. The authorization check is executed among each object as structured.

  CRM_ORD_OP

     >CRM_ORD_LP

        >CRM_ORD_OE

           >...

Only if the user is not authorized for the upper level object, the next authorization object is checked.

Detailed information can be found in Process Flow of the Authorization Check in Business Transactions.

 

During search, the authorization check can be switched off for a better performance. There are 2 ways to switch it off:

  1. Implement BADI CRM_ORDER_AUTH_CHECK method CRM_RFW_MODIFY_QUERY, then set the parameter EV_EXECUTE_STANDARD to blank in the implementation will skip the standard process flow of authorization check. It is also possible to add customer's own authorization check logic here.
  2. It can be controled by some parameter settings, too. To switch off the authorization check for single user, use user pamameter CRM_RF_PERFORMANCE with value A in SU3; to switch off the entire authorization check for all user groups, use parameter SETTINGS_REPORTING_FRAMEWORK in table SMOFPARSFA with value A. (SAP Note 615670 has more detailed explaination about the parameters)

 

Sometimes the authorization check during search does not work as expected. Some hints for trouble shooting:

  1. Check the authorization check settings in the user's PFCG profile. Are they configured correctly?
  2. Is the authorization check switched off by BADI implementation or the parameters?
  3. Debug the search process, a good starting point would be break point in FM CRM_BSP_OIC_1O_SEARCH_FROM_RF.

 

Detailed technical information which might be helpful for debugging.

- The parameters are checked in class CL_CRM_REPORT_QUESTION method CONSTRUCTOR line 98, the parameter value is passed to gv_acc_settings.

   ... ...

    IF gv_acc_settings <> gc_report_mode-old AND
     gv_acc_settings <> gc_report_mode-single AND
     gv_acc_settings <> gc_report_mode-dynamic_without_auth.

   ... ...

- BADI CRM_ORDER_AUTH_CHECK implementation is checked in FM CRM_REPORT_RF_CHECK_AUTHORITY line 286:

  ... ...

    IF gv_auth_badi IS BOUND.
      CALL METHOD gv_auth_badi->crm_rfw_modify_query
        EXPORTING
          iv_user                     = iv_user
          iv_type                     = iv_type
          iv_only_check_partner_2nd   = iv_only_check_partner_2nd
        IMPORTING
          ev_can_not_used_partner_2nd = ov_can_not_used_partner_2nd
          ev_execute_standard         = lv_execute_standard
        CHANGING
          lt_query                    = lt_query
        EXCEPTIONS
          OTHERS                      = 0.
*   in case no standard modification should be done => exit
      IF lv_execute_standard IS INITIAL.
        RETURN.
      ENDIF.
    ENDIF.
  ENDIF.

  ... ...

- Authorization settings for each authorization object in the user's PFCG role is built up as search criterias in FM CRM_REPORT_RF_CHECK_AUTHORITY.  The actural search is performed in class CL_CRM_REPORT_ACC_DYNAMIC method DATABASE_ACCESS. The parameter IT_WHERE contains all the seach criterias, are the search criterias for authorization check correctly set?

 

- Call Stacks:

   Event Type    Event                                                                 Program

   FUNCTION    CRM_REPORT_RF_CHECK_AUTHORITY    SAPLCRM_REPORT_CHECK_AUTHORITY

   METHOD       CONSTRUCTOR                                              CL_CRM_REPORT_QUESTION========CP

   FUNCTION    CRM_BSP_OIC_1O_SEARCH_FROM_RF     SAPLCRM_BSP_OIC_1O_SEARCH

 


Using Archive Link functionality to store attachments

$
0
0

Using Archive Link functionality to store attachments in 3rd Party Document Management Systems

 

 

Documents can be attached in CRM Web UI, using the Attachments assignment block. These attachments are usually stored in SAP server unless they are designated to be stored in a 3rd party content repository.

 

Document Storage in SAP server

Test.png

 

 

 

In order for the documents be stored in 3rd Party content repository , the Archive Link document folder , corresponding to the file type that we wish to store should be selected and the document needs to be attached.

 

 

Document storage using Archive Link

Test.png

 

 

Steps to setup 3rd Party DMS related Configuration

  1. Define Content Repository

    SPRO: SAP NetWeaver->Application Server ->Basis Services ->Archive Link ->Define Content Repositories

 

Test.png

 

  2. Maintain Document Type

 

SPRO: SAP NetWeaver->Application Server ->Basis Services ->Archive Link->Edit Document Type

 

Test.png

 

 

3. Edit Links

 

Test.png

All about Web services - Web Service Tool

$
0
0

This document explains about the web service tool which is provided by SAP CRM and how it can be used to publish web services.

 

What is web service ?

 

A Web service is a method of communication between two electronic devices over the World Wide Web. A Web service is a software function provided at a network address over the web or the cloud, it is a service that is "always on" as in the concept of utility computing.

The term Web services describes a standardized way of integrating Web-based applications using the XML, SOAP, WSDL and UDDI open standards over an Internet protocol backbone. XML is used to tag the data, SOAP is used to transfer the data, WSDL is used for describing the services available and UDDI is used for listing what services are available. Used primarily as a means for businesses to communicate with each other and with clients, Web services allow organizations to communicate data without intimate knowledge of each other's IT systems behind the firewall.

 

Why you need web service ?

 

Web services allow different applications from different sources to communicate with each other without time-consuming custom coding, and because all communication is in XML, Web services are not tied to any one operating system or programming language. For example, Java can talk with Perl, Windows applications can talk with UNIX applications.

 

Web services represent an industry-wide standard, and enable you to link loosely coupled systems with a technology that does not entail a particular programming language or platform. Web services offer you the flexibility to extend an application's capabilities to support specific business processes without extensive coding or complex integration.

 

 

Key benefits of Web Service

 

Exposing the existing function on to network

Connecting Different Applications ie Interoperability

Standardized Protocol

Low Cost of communication

 

 

How does web service help SAP CRM implementation ?

 

  

In today's business environment SAP CRM not only interacts with systems which are SAP based ( ECC , BI etc) but also various other systems like custom user interface ( Adobe Flex based applications ), Adobe interactive forms , applications which offer validation services  , existing client applications like contact management where their current day customer data is housed or external systems which interact with SAP CRM  on regualr basis. In this kind of environment web services offer reliable , secure and cost effective option.

 

For example, you can use Web services to allow your customers to access your product and price information from their procurement systems and create sales orders in your SAP CRM system by linking the procurement software to your order management application.

 

 

Interaction Landscape

 

1-23-2013 2-18-06 PM.png

 

What does SAP CRM offer out of the box ?

 

SAP CRM offers "Web Service Tool" an application using which web services can be created (using New or create using existing web service as tenplate options) . These web services once created can be checked for consistency , activated and made productive so that they can be consumed . But there are few web services/ objects delivered by SAP for which enterprise service which is required for consumption are not created , I will discuss in detail as to how an enterprise service can be created if only function module is available.

 

Web Service Tool Technical Details

 

Web UI Component  : WS_DESIGN_TOOL

Logical Link               : CT-WS-SR  ( Available under work center CT-ADMIN , Group: CT-ADM-SR )

 

 

How to use the tool ?

 

View an Existing Service

 

1. Web Service Tool

 

1-23-2013 2-18-06 PM.png

 

2. Search for available objects

 

1-23-2013 2-18-06 PM.png

 

3. Detail View of the object

1-23-2013 2-18-06 PM.png

 

1-23-2013 2-18-06 PM.png

 

1-23-2013 2-18-06 PM.png1-23-2013 2-18-06 PM.png1-23-2013 2-18-06 PM.png

Expert Mode : You can see the technical details and more information of the object in this mode

 

1-23-2013 2-18-06 PM.png

 

Creating a new web service

 

a. Click on the new button to create

 

1-23-2013 2-18-06 PM.png

1-23-2013 2-18-06 PM.png

1-23-2013 2-18-06 PM.png1-23-2013 2-18-06 PM.png

1-23-2013 2-18-06 PM.png

 

Check , Activate and make it productive

 

1-23-2013 2-18-06 PM.png

 

Create Web service from existing template

 

a. Select an existing object and click on the copy button , to create using the object's template

 

 

 

1-23-2013 2-18-06 PM.png

 

How to expose the service , so that it can be consumed by external systems

 

1. Go to transaction : SOAMANAGER , select tab " Application and Scenario Communication " , then link "Single Service Administration".

 

1-23-2013 2-18-06 PM.png

 

2. Create Service with Endpoint

 

1-23-2013 2-18-06 PM.png

 

3. Import the generated WSDL in SOAP UI for verification

 

1-23-2013 2-18-06 PM.png

 

 

How to create web service for SAP delivered function modules/custom function Modules

 

 

Test.png

 

 

Test.png

 

 

Test.png

 

 

Test.png

 

Test.png

 

Test.png

 

Test.png

 

 

Test.png

 

Consuming a Web service / WSDL

 

Test.png

Test.png

 

 

Test.png

 

 

Test.png

 

Test.png

 

 

Test.png

 

 

Test.png

 

Test.png

 

 

 

Summary :

 

The document covers the below topics

 

1. Web Service Tool provided by SAP CRM.

2. How to search and view details of a web service provided by SAP.

3. How to create a custom web service using the Web Service Tool.

4. How to expose a functionality as a web service to external systems.

5. How to consumer a web service provided by external systems.

 

 

Note : The functionality in the document is from SAP CRM 7.0 .

Customer Relationship Management (SAP CRM) eLearning Content (Popular and Relevant)

$
0
0

Here's a list of recent and popular eLearning content related to Customer Relationship Management (SAP CRM), including demos, tutorials, podcasts and video (SCN-TV).

 

This list was compiled based on view statistics and includes all recent additions.  This is list is sorted alphabetically and will be updated quarterly.

 

Additional eLearning content can be found using the eLearning filter on the Custom Google Search for the New SCN.

 

eLearning
Type
Consuming CRM Enterprise Service in SAP Visual Composer
This video demonstrates consuming a CRM Enterprise Service in SAP Visual Composer to create a simple composite application.
Demo
CRM Student Recruitment and Integration with Student Lifecycle Management - Part 1
This video describes how existing CRM Marketing features of CRM 2007 can be utilized by universities in the area of Student Recruitment. As this first introduction to the topic shows, CRM Marketing functionalities and ERP Student Lifecycle Management can be coupled without modifications. Part 1 of 7.
Related article (PDF 408 KB)
Demo
ERP Lounge Podcast: SAP CRM Skills Trends - with SAP Mentors Stephen Johannes and Vijay Vijayasankar
Join Jon Reed and special guests Johannes and Vijayasankar for this 65 minute sixth edition of the ERP Lounge as they tackle reader questions on the CRM-Solution Manager connection, and whether SD or CRM is a better career path. Then the guys head into a market discussion on the state of CRM in an on demand world, how SAP can improve its CRM strategy, and most importantly, the keys to success as an SAP CRM professional.
Podcast
Gain Serendipitous Insight Into Your Enterprise Data with SAP Business Objects Explorer
This video outlines the high level functionality of SAP Business Objects Explorer and it's use in gaining hidden insight from your enterprise data.
Demo
How to Best Leverage Social Media and Web 2.0 in Marketing (Webinar Replay) (Tutorial)
This Thought Leadership Webcast sheds some light on the potentials of Social Media and Web 2.0 in Marketing by covering Trends in Marketing around Social Media and Web 2.0.
Tutorial
Incentives, Rebates, & Billback/Chargeback Claims
This webinar will demonstrate the value of using integrated application systems to automate and manage all aspects of a company's incentives, rebates, and billback/chargeback claims processing operations, from the creation and maintenance of complex incentive and rebate agreements, to evaluating all possible “buy side” and “sell side” transactions to identify incentive and rebate opportunities, accurately calculating the amount of incentive to claim or grant, generating/submitting the claims request to the supplier and/or receiving/validating the claims request received from the distributor/retailer, and tracking/verifying timely and accurate settlement of the incentive/rebate claim.
Demo
Maintain Marketing Permissions in the SAP CRM Interaction Center
This video demonstrates how to maintain marketing permissions in the Interaction Center.
Demo
Marketing Permissions in Call List Management
This video demontrates how marketing permissions can impact call list execution.
Demo
Mobility for SAP CRM, ERP and Workflow
Live Demo of Mobility for SAP showing mobile access from Blackberry to SAP CRM and ERP and workflow. Access via iPhone and Android is also possible.
Demo
Retail Execution: A Solution Walkthrough
This recording helps to understand the functionalities of Retail Execution application.
Tutorial
Retail Execution: Configuration Walkthrough
This recording provides detailed configuration steps for Retail Execution application
Tutorial
SAP CRM - Merging Accounts
See how you can easily merge redundant Account Records in CRM Web UI.
Demo
SAP CRM 2007 - Campaign Approval Workflow
Accelerating Marketing Productivity with CRM 2007 Campaign Approval Workflow!
Demo
SAP CRM 2007 - Campaign Automation
This video gives you a short example of Campaign Automation.  Campaign Automation is a very intuitive and easy to use tool embedded into the campaigns' application that helps to automate marketing processes.
Demo
SAP CRM 2007 - Collaborative Lead Processing with Channel Partners via Adobe Interactive Forms
This demo shows how you can distribute leads and manage feedback from Partners via Adobe Interactive Forms in SAP CRM.
Demo
SAP CRM 2007 - Creating an eMail Campaign
This video shows how easy it is to create eMail campaigns using SAP CRM 2007.
Demo
SAP CRM 2007 - End-to-End Coupon Campaigns
In this demo we show how SAP CRM Marketing can support the end-to-end coupon process from Campaign creation to coupon planning and redemption prediction, and coupon campaign execution in collaboration with a partner such as a clearinghouse.
Demo
SAP CRM 2007 - Improving Consistency and Visibility of your Marketing Budgets
Improve consistency and visibility of your Marketing Planning by maintaining all plan data in one system. Make use of consistency checks and top-down planning. In this video I will show you how easy this can be done in SAP CRM 2007.
Demo
SAP CRM 2007 - Interactive Dashboard
Video on how to create an Xcelsius dashboard based on CRM Interactive reporting.
Demo
SAP CRM 2007 - Multi-Wave Campaigns
This video clip shows an example of a multi-wave Campaign set up in SAP CRM Marketing.
Demo
SAP CRM 2007 - Personalized Content Management for eMail Marketing
In this video we will show you how personalized content for E-Mail Marketing can be created with SAP CRM.
Demo
SAP CRM 2007 Marketing: Integrating Marketing & Sales Efforts
This video will give you an overview of how SAP CRM Marketing can help better coordinate lead pre-qualification and lead distribution to the chosen follow-up channels, and thereby bridge the gap with sales.
Demo
SAP CRM 2007 User Interface - Account Buying Center
SAP CRM 2007 now lets users create, modify, and save Buying Centres directly to an Account (can also be copied to and Account from an existing Buying Centre in an Opportunity). The Buying Centre can then be uploaded directly to an Opportunity to save time and ensure that Buying Centre nuances are considered in the sales cycle.
Demo
SAP CRM and Web 2.0 Prototypes - Facebook for Marketing
How the power of social networks harnessed via a Facebook Application that, backed by SAP CRM Loyalty Management, enables an airline company to reach out to the social network of its customers, spread via 'word of mouth' marketing and enrich customer experience.
Demo
SAP CRM and Web 2.0 Prototypes - Twitter for Customer Service and Marketing
This video showcases how you can enrich your customers' experience by using SAP CRM to engage them on real-time social media channels such as Twitter (www.twitter.com),  providing proactive customer service as well as leveraging it as a marketing channel.
Demo
SAP CRM Groupware Integration (Calendar) with IBM Lotus Notes
This is the second part of the live system demonstration showing the integration of SAP CRM and IBM Lotus Notes. while the first part shows inbound and outbound E-mail handling, this video shows the calendar integration between both systems.
Demo
SAP CRM Groupware Integration with IBM Lotus Notes
This live system demonstration shows the integration of SAP CRM and IBM Lotus Notes. the first part covers inbound and outbound E-Mail handling in the role of a sales rep.
Demo
SAP CRM Interaction Center with BCM: SAPPHIRE Demo Highlight  Video
The SAP CRM Interaction Center demo pod was very busy presenting to current as well as potential customers at the Sapphire NOW 2010 Conference in Orlando, FL. Here is a short video demo of the Customer Service pod showcasing both the Interaction Center functionality along with its natural complement, SAP Business Communications Management (BCM) functionality.
Demo
SAP CRM Marketing - Multi-Channel Campaign Optimization
This demo gives an example of how to run an end-to-end sales campaign through various channels, where campaign optimization is used to determine the optimal contact channel for every customer to be contacted.
Demo
Streamline Marketing Collaboration with SAP StreamWork
This video gives a brief overview of how marketers can leverage SAP StreamWork today to streamline collaboration with multiple stakeholders, both inside and outside their organization, to increase marketing effectiveness and build corporate memory. The integration of StreamWork, a social and collaborative decision-making tool, with SAP CRM Marketing is possible through consulting services.
Demo
The Future is Here with SAP CRM Featuring the Coca-Cola Company - Webcast Replay
Webcast replay of the Future is here, SAP CRM featuring the Coca-Cola Company
Demo

How to load PDF from CRM Web UI or Interaction Center

$
0
0

Loading PDF document from CRM Web UI or Interaction center(IC) is a common use-case across different services. Here in this document we will go through all the steps involved in creating a PDF display from CRM UI/ IC.

 

There are two ways in which we can load the PDF:

 

  •      PDF URL
  •      PDF content using BSP page.

 

Loading PDF URL

The first option is the simplest, where you have URL for the PDF file and you would like to load it from Web UI. If the URL is static we can use a URL based transaction launcher and load in the UI. There are many articles available in SDN which talks about this topic so I will not elaborate on this. Alternatively, you can also load the URL’s using the get_p_<attr> method of the context node attribute. This approach will be useful in cases where the URL is dynamic. Again I am not going into the details as there are multiple documents published in SDN on this.

 

 

 

Loading PDF content

The second approach, loading the PDF content from web UI / IC is a common scenario in migration project. Let us take an example where the customer legacy system uses a third party archive tool for storing all the historical bills of customers. More often than not after migration, customers would like to retain the third party tool and just have a display view for those bills in CRM. Let us assume in this case the bills are stored in PDF form and the third party can send us the PDF content in the XSTRING format.

 

Below are the steps to load PDF on click of a hyperlink from the view.

 

 

Create a new controller Billdoc.pdf under your BSP component.

 

 

 

Pdf1.jpg

 

 

 

 

Now create a handler class and set it to the controller.

 

 

PDF2.jpg

 

 

 

 

 

For the above created controller redefine do_request( ) method and set the response data. Let us assume in our case we are going to get PDF content through an RFC and below is the sample code for setting the response.

 

 

DATA: ebc_t_raw_data     TYPE  TABLE OF tbl1024,

      xdata              TYPE  xstring.

 

*Get PDF content

    CALL FUNCTION 'ZGET_PDF_DOCUMENT'
      DESTINATION rfc_dest
     
EXPORTING
        im_opbel             
= lv_opbel
     
TABLES
        t_pdf_data           
= ebc_t_raw_data
        t_return             
= return
     
EXCEPTIONS
        communication_failure
=
        system_failure       
=
        general_fault        
= 3
       
OTHERS                = 4.

 

 

 

*   Build xstring from itab format (dependent on itab type)
   
IF ebc_t_raw_data IS NOT INITIAL.
     
LOOP AT ebc_t_raw_data INTO ebc_line.
       
CONCATENATE xdata ebc_line-line INTO xdata IN BYTE MODE.
     
ENDLOOP.
   
ENDIF.

 

 

 

 

 

*   Determine data length
   
size = xstrlen( xdata ).

 

 

 

*   Export response data
   
CALL METHOD response->if_http_entity~append_data
     
EXPORTING
       
data   = xdata
        length
= size.

 

 

*   Set response content-type as PDF
   
CALL METHOD response->if_http_entity~set_header_field
     
EXPORTING
        name 
= 'content-type'                              "#EC NOTEXT
       
value = 'application/pdf'.                          "#EC NOTEXT

 

 

 

There are two key things to note in the above code:

 

  • Set the xstring content to response.
  • Set the header field content-type as PDF.

 

Also note that we can play around with the content type to load different types of files.

 

And the last step is to load this BSP page on click of a hyperlink in the UI view.

 

 

 

 

PDF4.jpg

 

 

Redefine get_p method and load the BSP page. Below is the sample code.

 

 

      CALL METHOD cl_bsp_runtime=>get_runtime_instance
        RECEIVING
          runtime
= lr_runtime.

 

*     create url using runtime
     
CALL METHOD lr_runtime->construct_bsp_url
       
EXPORTING
          in_application
= 'ZIUICINVOICE'       "BSP component name
          in_page       
= 'Billdocument.pdf'      "bsp controller created above
          in_parameters 
= lt_params
       
IMPORTING
          out_local_url 
= rv_value.

 

 

 

Thus we are all set to load the PDF, click on the hyperlink and a new browser window containing PDF will be loaded. Below is the sample screen shot.

 

 

Pdf3.jpg

 

 

How to integrate attachments to Interaction Records

$
0
0

Table of Contents

 

  1. Pre-requisites
  2. Introduction
  3. Technical Implementation

 

 

  1. Pre-requisites

  This is a technical document aimed at developers having expertise in CRM ISU developments. The target audience for this document is expected to have good knowledge in SAP CRM Web UI programming.  

 

  1. Introduction

It is often a requirement for the clients to add the attachments to the Interaction Record in Web IC environment. As a standard solution form SAP for Utility clients, the business roles UTIL_IC/UTIL_SALES/UTIL_IC_REG/UTIL_IC_LEAN, does not provide this option. Here with this document we can learn how to integrate attachment section into Interaction Records with a very minimal development need.

 

  1. Technical Implementation:

SAP delivers a Generic UI component called “GS_CM” for handling the attachments in Web UI. We are going to leverage this component and integrate the same in Interaction Record. Refer to attachment GS_CM.JPG for the snapshot.

                          

     Following are the list of steps involved for integration:

  1. Create a new UI component ZICCMP_ATTACH.
  2. Add two component usages CUGSCM and CUGSCM_DET both referring to the component “GS_CM” and then add the interface view “Mainwindow”.
  3. Create an overview page ZICCMP_ATTACH/INRAttachOV and then assign View CUGSCM.MainWindow.
  4. Assign the above created overview page to the Mainwindow and then expose the same for use by other components.
  5. Add the following context nodes to the component controller of ZICCMP_ATTACH.
  Context Node

Base Entity

BTADMINH

BTAdminH

BTORDER

BTOrder

CMBO

CMBO

 

  1. For the context node CMBO we need to implement the ON_NEW_FOCUS method. Here we refresh the attachments whenever the Interaction Record is changed. Copy the following code.

method ON_NEW_FOCUS.
 
data:
    lr_qs                
typerefto cl_crm_bol_query_service,
    ls_cmbo_prop         
type crmt_cmic_rfolder_attr,
    lr_entity_col        
typerefto if_bol_entity_col,
    ls_admin_h           
type crmst_adminh_btil.

 
check focus_bo isbound.

  lr_qs = cl_crm_bol_query_service=>get_instance( cl_crm_cm_genil_comp=>gc_query_bo_link ).

  focus_bo->get_properties(
importing es_attributes = ls_admin_h ).
  ls_cmbo_prop-instid = ls_admin_h-guid.
  ls_cmbo_prop-typeid = ls_admin_h-object_type.
  ls_cmbo_prop-catid =
'BO'.                                "#EC NOTEXT* fill and fire query
  lr_qs->set_properties( ls_cmbo_prop ).
  lr_entity_col = lr_qs->get_query_result( ).
* set context node
  collection_wrapper->clear_collection( ).
  collection_wrapper->set_collection( lr_entity_col ).
endmethod.

 

  1. Create value node ‘Attributes’ in the component controller with the following attribute structure.

             DISPLAY

TYPE BOOLE_D,
           NEXT_RUN_REREAD

TYPE BOOLE_D,
           SINGLE_DOC_MODE

TYPE BOOLE_D,
           DOC_TEMPLATE_PROFILE

TYPE CRMT_TEMPL_PROFILE,
           FOLDER_TEMPLATE_NAME

TYPE CRMT_TEMPLATE_NAME.

  

  1. Now we have to bind the context nodes with component usage CUGSCM and CUGSCM_DET. Redefine WD_USAGE_INITIALIZE method and copy the following code.

method WD_USAGE_INITIALIZE.

 
DATA: lr_value_node TYPEREFTO cl_bsp_wd_value_node,
        ls_attr      
TYPE crmt_cm_comp_st,
        lr_attr      
TYPEREFTO crmt_cm_comp_st.


 
CASE iv_usage->usage_name.
   
WHEN'CUGSCM'or'CUGSCM_DET'.
     
CALLMETHOD iv_usage->bind_context_node
       
EXPORTING
          iv_controller_type  = cl_bsp_wd_controller=>co_type_component
          iv_target_node_name =
'BTORDER'                   "#EC NOTEXT
          iv_node_2_bind      =
'PARENTNODE'.               "#EC NOTEXT


     
CALLMETHOD iv_usage->bind_context_node
       
EXPORTING
          iv_controller_type  = cl_bsp_wd_controller=>co_type_component
          iv_target_node_name =
'CMBO'                "#EC NOTEXT
          iv_node_2_bind      =
'CMBUSOBJ'.               "#EC NOTEXT


      ls_attr-next_run_reread = abap_true.
     
GETREFERENCEOF ls_attr INTO lr_attr.
     
CREATE OBJECT lr_value_node
       
EXPORTING
          iv_data_ref = lr_attr.
      lr_value_node->if_bol_bo_property_access~set_properties( ls_attr ).
      me->typed_context->attributes->collection_wrapper->clear( ).
      me->typed_context->attributes->collection_wrapper->add( lr_value_node ).

     
CALLMETHOD iv_usage->bind_context_node
       
EXPORTING
          iv_controller_type  = cl_bsp_wd_controller=>co_type_component
          iv_target_node_name =
'ATTRIBUTES'                "#EC NOTEXT
          iv_node_2_bind      =
'ATTRIBUTES'.               "#EC NOTEXT

 
endcase.endmethod.

 

  1. Add the Navigation link as shown in the attachment NavLink.JPG.   

 

Until the above step a re-usable component for attachment is created and now we need to integrate the same into Interaction record. The following steps will help us in doing the same.

 

  1. Enhance the standard component ICCMP_BT_INR with the enhancement set.

 

  1. Create component usage CUATTACH referring to component ZICCMP_ATTACH and then add the interface view ZICCMP_ATTACH/MainWindow.

 

  

  1. Now in the component controller we need to bind the context node. Redefine method WD_USAGE_INITIALIZE and copy paste the below code.

 

METHOD wd_usage_initialize.
 
CALLMETHOD super->wd_usage_initialize
   
EXPORTING
      iv_usage = iv_usage.

 
CASE iv_usage->usage_name.

   
WHEN'CUATTACH' .
     
CALLMETHOD iv_usage->bind_context_node
       
EXPORTING
          iv_controller_type  = cl_bsp_wd_controller=>co_type_component
          iv_target_node_name =
'BTORDER'                   "#EC NOTEXT
          iv_node_2_bind      =
'BTORDER'.                  "#EC NOTEXT
 
ENDCASE.ENDMETHOD.

 

 

  1. Enhance ViewSet ICCMP_BT_INR/InrViewSet and add a new view area called Attachment

 

  

  1. Now assign view CUATTACH.ZICCMP_ATTACH/MainWindow to the above created view set.

 

  1. Save and activate the changes.

 

 

 

Now to test the output we need to login to CRM Web UI with any of the Utility web center role. After log in, confirm the business agreement and click on the Interaction Record work center. The output will be similar as shown in the attchement file InteractionRec.JPG.

The attachment block refreshes its content whenever a different interaction record is selected in the Last Interaction record table view

Pricing Configuration Guide with Used Cases

$
0
0

Overview of Pricing:

 

The Pricing function is a method of determining prices using the condition technique. For example, when a shopping cart or purchase order is created. The system automatically determines the gross price and any surcharges and discounts that apply to a specific vendor according to defined conditions. The system uses the gross price and these surcharges or discounts to determine the net price.

How Pricing Works in SAP CRM:

Condition Types:

 

SAP CRM differentiates different price components like the ones shown in the receipt by using “Condition Types”

Separate “condition Types” can be defined for

 

Ø  Price

Ø  Discounts

Ø  Surcharges like Shipping

Ø  Tax etc.

 

SAP CRM comes with many predefined exhaustive list of condition types that can be used. But new ones can be defined also. Definition of a condition types involves, among many things, how the condition type is expected to behave.  Is the calculation based on Quantity, weight or volume? Is it a ‘amount’ type or a ‘percentage’ type, is it just ’flat amount’ or does this vary with  ’scale’  and others.

The final pricing is determined by using scheme in which different condition types are evaluated by the system in defined sequence of steps. This scheme is called “Pricing Procedure”.

 

What if the Price or discount to be determined is not very straightforward ? For example, what if the price to be determined depends on the specific customer or customer group. What if the discount only applies to certain product types but not others and only applies to some specific regions where customer is located. What if the Tax is exempt for certain customers? or specific customer-product combinations. What if,  for a short period, company decides to offer free shipping? In these and many more complexities of pricing scenarios that businesses engage in, how the system determines appropriate applicable prices?

These complexities can be accommodated in Pricing Procedure usingAccess Sequence.

 

Access Sequence:

Access sequences are search strategies  defined for the system.

The strategy lays out searching sequence for best data that fits the situation through iteration.  Suppose the special prices have been set up in system for a Customer Group and a product combination , then system searches for this first. If it does not find it, then searches just the generic product price applicable for any customer.

 

Pricing Procedure:

 

Pricing Procedure defines the sequence of how systems starts evaluating different Condition Types. Pricing Procedures can be defined with several conditions. For example one could add three discount conditions or several Tax conditions, for example City taxes and county taxes.

The system evaluates each step in the pricing procedure to determine values that are applicable for the data during sales order processing.

Pricing procedures are assigned to transaction document types in a configuration step.  This way when users start creating a transaction document in the system, the pricing procedure is invoked.

 

Condition Records:

Pricing Procedure evaluates condition at different steps. Condition types are connected to ‘Access Sequences’ which are a collection of Condition Table Structures. These condition Table Structures are created out of fields from a Field catalog.  These structure help define the Condition Records which indicate the price set by a company for a combination of Data parameters.

 

Use Cases:

 

Base Price:

 

For a particular material, to determine the base price following Accesses are maintained are maintained:

1)      Sales Org / Division / Product Group / Material -                             50 USD

2)      Sales Org / Distribution Channel / Sold-to-party / Product -             55 USD

3)      Sales Org / Distribution Channel / Division / Sold-to-party               60 USD

 

Product:  Copymachine01

 

Customer: PCS System PVT Ltd

 

Roles defined for customer: Sold-to-party, ship-to-party, payer, Bill-to-party

 

Steps for Base Price Determination:

 

a)   Create Access Sequence ZPR8 a copy of access sequence 0PR0. Maintain the access with condition table SAP005, SAP007 and CUS506

Access defined here are:

1) Sales Org / Division / Product Group / Material -                                    

2) Sales Org / Distribution Channel / Sold-to-party / Product -                    

3) Sales Org / Distribution Channel / Division / Sold-to-party

 

Path: SPRO> CRM> Basic functions> Pricing> Define settings for Pricing> Create Access sequence        

3.jpg.png

4.jpg.png

5.jpg.png

a)      b) Create Condition type ZPR8, it’s a copy of standard condition type PR00 for price

        Path: SPRO> CRM> Basic functions> Pricing> Define settings for Pricing> Create Condition Type

6.jpg.png

a)   c)   Assign Access sequence ZPR8 to Condition type ZPR87.jpg.png

a)      d) In Condition maintenance group assign condition type ZPR8  to Condition maintenance group ‘BUPAPRICE’

 

Path:  SPRO> Master Data> Conditions and Condition Techniques> Condition Techniques basics> Create Maintenance Group

 

8.jpg.png

a)   e)   In condition type ZPR8 maintain the condition records

 

9.jpg.png

Path:  Main Menu > Master Data > Prices and Condition > Maintain Conditions

 

1)      Sales Org / Division / Product Group / Material -                                   50 USD

2)      Sales Org / Distribution Channel / Sold-to-party / Product -                   55 USD

3)      Sales Org / Distribution Channel / Division / Sold-to-party                     60 USD

 

 

11.jpg.png

a)      f) Create a pricing procedure ZCRM11, a copy of standard CRM01 pricing procedure

 

12.jpg.png

Path: SPRO> CRM> Basic functions> Pricing> Define settings for Pricing> Create Pricing procedure

 

 

 

In control data replace the condition type 0PRO for price with our condition type ‘ZPR8’

13.jpg.png

a)      g) Pricing Determination procedure:: Here you have to maintain the sales organization, customer and document pricing procedure Customer Pricing Procedure- 1 (Standard) / Document Pricing Procedure- A (standard) / Division -1

14.jpg.png

Path: SPRO> CRM> Basic functions> Pricing> Pricing in Business transaction> Determine Pricing procedure

a)      h) Create Standard Order, Below is the pricing condition at Item level

T-Code: commpr01

15.jpg.png

Here depending upon the condition record maintained base price of 60 USD has been determined.

 

Scenario 1: Discount / Scale Based

 

Provide Item level discount and maintain quantity scales and see how change in quantity picks will alter the percentage discount

Conditions:

Discount based on Price Group:

Bulk Buyer– 5 % min discount / Scale base discount

For, 0-5 Units – 5% of Discount

For, 5-10 units – 6 % of Discount

For Above 10 units – 7 % of Discount

Occasional Buyer– 2 % Flat discount irrespective of quantity ordered

Steps

a)      Create a condition type: ZSKV, it’s a copy of standard condition type for Discount/Surcharge

T-code: PRC_CONDTYPE_CRM

1.jpg.png

a)      Assign access sequence 0K20 (Price Group Access Sequence) to Condition type ZSKV

T-Code: ACCESS_SEQ_CRM_PR

2.jpg.png

a)      In condition maintenance group assign condition type ZSKV to condition maintenance group ‘BUPADISCOUNT  ‘

T-code: SPRO>Master Data>Conditions and Condition Techniques>Condition Techniques basics>Create Maintenance Group

3.jpg.png

a)      Create a pricing procedure ZCRM11, a copy of standard CRM01 pricing procedure. In control data replace the condition type 0KF0 with our condition type for freight ‘ZSKV’

T-Code: PRC_PRICPROC_CRM

4.jpg.png

a)      In condition type ZSKV maintain the condition records.

Discount will vary depending upon the price group

Discount based on Price Group:

Bulk Buyer– 5 % min discount / Scale base discount

Scale based Discount:

For, 0-5 Units – 5% of Discount

For, 5-10 units – 6 % of Discount

For Above 10 units – 7 % of Discount

Occasional Buyer– 2 % Flat discount irrespective of quantity ordered

5.jpg.png

6.jpg.png

a)      Determine Pricing Procedure: Here you have to maintain the sales organization, customer and document pricing procedure

Customer Pricing Procedure- 1 (Standard) / Document Pricing Procedure- A (standard) / Division -1

7.jpg.png

a)      Create Standard Order, Below is the pricing condition at Item level

T-Code: commpr01

8.jpg.png

As the customer is an occasional buyer discount of 2% is been selected

 

Scenario 2: Freight Charges

 

For a particular material, there is a freight charge. Here we will take freight value depending upon the quantity. The freight value of 2 USD is charged per unit of product

Product:

Copymachine01

Customer:

PCS System Pvt Ltd, Roles defined for customer: Sold-to-party, ship-to-party, payer, Bill-to-party

Steps:

a)      Create a condition type: ZFR8, it’s a copy of standard condition type for freight

T-code: PRC_CONDTYPE_CRM

1.jpg.png

a)      Create Access Sequence ZFR8 a copy of access sequence for standard freight. Maintain the access with condition table SAP034 and SAP033

Access defined here are:

1)      Sales Org / Division / Distribution channel / lncoterms 1 / Incoterms 2 

2)      Sales Org / Division / Distribution channel / lncoterms 1 / Incoterms 2                        

T-Code: ACCESS_SEQ_CRM_PR

2.jpg.png

c)      In condition maintenance group assign condition type ZFR8 to condition maintenance group ‘ FREIGHTCRM ‘

T-code: SPRO>Master Data>Conditions and Condition Techniques>Condition Techniques basics>Create Maintenance Group

3.jpg.png

4.jpg.png

a)      Create a pricing procedure ZCRM11, a copy of standard CRM01 pricing procedure. In control data replace the condition type 0KF0 with our condition type for freight ‘ZFR8’

T-Code: PRC_PRICPROC_CRM

5.jpg.png

a)      In condition type ZFR8 maintain the condition records.

Here freight value for 2 USD for each quantity of product is maintained

T-Code: Master Data>Prices and Conditions>Maintenance group – Freightcrm

 

7.jpg.png

a)      Create a Standard Sales Order. Below is the pricing condition at Item level.

8.jpg.png

Here as order is prepared for 10 units freight charges is picked up as 20 USD, 2 USD per unit

Scenario 3: Free Goods (Inclusive/Exclusive)

 

We will be using both,

Inclusive Bonus Quantity: The customer only pays for part of the goods he or she has ordered. The rest of the products are provided at no extra cost. For example, a customer orders ten notebooks but only has to pay for nine.

Exclusive Bonus quantity: The customer pays for the goods he has ordered, and also receives additional products for free. The materials delivered as free goods do not have to be the same as the goods ordered. For example, a customer orders ten notebooks, and additionally receives a handheld free of charge.

Products:

Copymachine01

Copymachine02

Customer:

PCS System Pvt Ltd

Steps:

a)      Create Access Sequence ZNA0 a copy of access sequence 0NA0 for free goods. Maintain the access with condition table SAP010

Access defined here is: Sales Org / Distribution channel / Sold-to-party / Product

Path: Spro> CRM> Basic function> free goods> set up free goods> create access sequence

1.jpg.png

2.jpg.png

3.jpg.png

a)      Create Condition type ZNA0, it’s a copy of standard condition type 0NA0 for free goods

 

Path: Spro> CRM> Basic function> free goods> set up free goods>create Condition types

 

4.jpg.png

a)      Assign Access sequence ZNA0 to Condition type ZNA0

5.jpg.png

a)      In Condition maintenance group assign condition type ZNAO  to Condition maintenance group ‘ZFREEGOODS’

 

Path:  SPRO> Master Data> Conditions and Condition Techniques> Condition Techniques basics> Create Maintenance Group

6.jpg.png

a)      In condition type ZNA0 maintain the condition records

7.jpg.png

Path:  Main Menu > Master Data > Prices and Condition > Maintain Conditions

 

For Inclusive:

8.jpg.png

Type: 1 need to be maintained for inclusive free goods. Here there is no need to maintain free product

 

For Exclusive:

9.jpg.png

Type 2 should be maintained. Here you should maintain the free product details, it can be the same product or the diffirent product

 

a)      Create a free good procedure ZNA001, a copy of standard 0NA001 procedure

10.jpg.png

Path: SPRO> CRM> Basic functions> free goods> Set up free goods> Create free good determination procedure

 

In control data replace the condition type 0NA0 for price with our condition type ‘ZNA0’

11.jpg.png

a)      Assign free good determination procedure: Here you have to maintain the sales organization, customer and document pricing procedure Customer Pricing Procedure- 1 (Standard) / Document Pricing Procedure- A (standard) / Division -1

 

12.jpg.png

Path: SPRO> CRM> Basic functions> free goods > set up free goods > Assign free goods Determine procedure

 

a)      Create Standard Order, Below is the pricing condition at Item level

T-Code: commpr01

 

For Inclusive free goods:

13.jpg.png

The customer only pays for part of the goods he or she has ordered, In this case he will be charged for only 9 nos of product and 1 nos will be provided at no extra cost

For Exclusive free goods:

14.jpg.png

The customer pays for the goods he has ordered in this case 10 nos and also receives additional products for free, 1 nos of ‘Copymachine02’

 

Scenario 4: Campaign Based Pricing

 

Maintain a campaign specific pricing. Creating a campaign and assign product and discount records for it.

Steps

a)      Create a campaign determination procedure (ZPCS01)

Path: Spro> Crm > basic function> campaign determination> define determination procedure

1.jpg.png

a)      Add Elements of determination (Condition type)namely – 1200, 1201 and ZCAM to the determination procedure

2.jpg.png

a)      Determination of procedure for campaign determination

Path: Spro> Crm > basic function> campaign determination> assign determination procedure

3.jpg.png

a)      Create a campaign: Campaign can be created using ‘Marketing Pro Role’

T-Code: crm_ui

4.jpg.png

5.jpg.png

a)      Maintain the product for which campaign is applicable

6.jpg.png

a)      Enter the condition records (Discounts) applicable for the campign

7.jpg.png

a)      Create a condition maintenance group for campaign

8.jpg.png

a)      Add condition types ZCAM, 1200,1201 to maintenance group ‘1200’ for ‘Campaign’

9.jpg.png

     Create condition exclusion group ZDIS & ZPCS. If several condition records are valid for pricing in the document item, you can define rules that determine which condition records are selected and which are not taken into consideration. To do this, we use condition exclusion.

Excluding condition records is controlled using exclusion groups. An exclusion group is a list of condition types that are compared to each other in pricing and can be used to exclude a whole group or individual condition types in a group.

You can set the pricing result so that it is influenced by specific criteria (for example, the cheapest price) and that some condition types are excluded whereas others are taken into account.

10.jpg.png

a)      Maintain condition types in exclusion group

11.jpg.png

12.jpg.png

a)      Conditions exclusion: procedure assignment

13.jpg.png

Maintain the exclusion group and condition exclusion procedure as best of two exclusion types

 

14.jpg.png

a)      Assign campaign to the sales order

15.jpg.png

 

a)      Create standard order. The best possible discount gets determined for the sold to party. Condition type ‘1201’ with 8% discount gets determined not the 2% general discount applicable for occasional buyer (shown in the below screen shot.

 

16.jpg.png

17.jpg.png

CRM Student Recruitment and Integration with Student Lifecycle Management - Part 1 - Demo

$
0
0

This video describes how existing CRM Marketing features of CRM 2007 can be utilized by universities in the area of Student Recruitment. As this first introduction to the topic shows, CRM Marketing functionalities and ERP Student Lifecycle Management can be coupled without modifications. Part 1 of 7.

Related article (PDF 408 KB)

View this Demo

Duration: 00:03:48

 


CRM Student Recruitment and Integration with Student Lifecycle Management - Part 2 - Demo

$
0
0

This video is the second part of the Best Practices series "CRM for Student Recruitment" and describes how more existing CRM Marketing features (CRM objects such as CRM User Status, CRM Lead) can be utilized by universities in the area of Student Recruitment. Part 2 of 7.

Related article (PDF 332 KB)

View this Demo

Duration: 23:05:09

 

CRM Student Recruitment and Integration with Student Lifecycle Management - Part 3 - Demo

$
0
0

This demo movie is the third part of the Best Practices series "CRM for Student Recruitment" and introduces business scenarios where customers can make use of CRM Marketing features and Student Lifecycle Management in the area of Student Recruitment. Part 3 of 7.

Related article (PDF 292 KB)

View this Demo

Duration: 23:08:27

 

IS-PS to SAP CRM 7.0 data exchange

$
0
0

 

Introduction

  
This document lists the various business objects that are required to be downloaded from IS-PS to SAP CRM, explains the various configuration steps associated with each object and the ways of downloading data using SAP CRM Middleware.
    
The various business objects that are  downloaded are
    
  1. Business Partners
  2. Contract Account
  3. Contract Object
  
The below the flow of business data from IS-PS to CRM

  1-14-2013 5-25-25 PM.png
  Pre-activities
The below Pre-activities are required to be complete before starting the configuration of CRM Middleware:
 
  1. Generation of business objects required for Middleware – Refer to building block B01: CRM Generation for further details
  2. Connectivity related setting need to be complete in ECC – Refer to building block C71: CRM Connectivity for further details
    1. Define logical system of SAP CRM
    2. Maintain entries in CRMCONSUM
    3. Maintain entries in CRMRFCPAR
    4. Maintain entries in CRMPAROLTP
               

Business Partners

   

1.      Define Groupings and Number Ranges

IMG Path: SAP Customizing Implementation Guide >Cross-Application Components > SAP Business Partner > Business Partner
> Basic Settings > Basic Settings > Number Ranges and Groupings1-14-2013 5-25-25 PM.png

2.      Define BP Roles

SAP Customizing Implementation Guide > Cross-ApplicationComponents > SAP Business Partner > Business Partner > Basic Settings
> Basic Settings > Business Partner Roles
1-14-2013 5-25-25 PM.png

3.      Define relationship types

Transaction – BUBA – Relationship
1-14-2013 5-25-25 PM.png

4.      Determine functions for Replication ECC to CRM

   
CRM – Transaction: CRMC_BUT_CALL_FU
1-14-2013 5-25-25 PM.png
  
ECC – Transaction: COM_BUPA_CALL_FU
1-14-2013 5-25-25 PM.png
  

Business Agreement

1.      Determine template for replication (ECC)

SAP Customizing Implementation Guide > Financial Accounting (New) > Integration >Customer Relationship Management > Business Agreement
1-14-2013 5-25-25 PM.png

2.      Define Business Agreement Class

SPRO > Customer Relationship Management > Master Data > Business Partner > Business Agreement
1-14-2013 5-25-25 PM.png

3.      Allocate Business Agreement class

SAP Customizing Implementation Guide > Customer Relationship Management > Master Data > Business Partner > Business Agreement > Creation of Business Agreement
Test.png

Contract Objects

1.      Define Product Hierarchy & Define Product types

Transaction Code: COMM_HIERARCHY
Test.png

2.      Define Object Families

SAP Customizing Implementation Guide > Cross-Application Components > SAP Product >Objects
Test.png

3.      Define Contract object to Object Family

   
SAP Customizing Implementation Guide > Customer Relationship Management >Industry-Specific Solutions > Public Sector > Contract Object
Test.png

4.      Activate applications for public sector

SAP Customizing Implementation Guide > Customer Relationship Management >Industry-Specific Solutions > Public Sector > Contract Object >
Activate Application Contract Object
Test.png

5.      Define Output format & Storage format for product IDs

SAP Customizing Implementation Guide > Cross-Application Components > SAP Product >Basic Settings
Test.png

6.      Control parameters for Up/Download

SAP Customizing Implementation Guide > Financial Accounting (New) > Contract Accounts Receivable and Payable > Integration > Customer Relationship Management >Contract Object
Test.png

7.      Control Parameters for each contract object for Up/Download

 
SAP Customizing Implementation Guide > Financial Accounting (New) > Contract Accounts Receivable and Payable > Integration > Customer Relationship Management >Contract Object
Test.png

Downloading data

There are two ways of loading data initially into CRM from IS-PS

2. Initial Download

Transactions Used: R3AS, R3AM1
    
R3AS – Start Initial Download
Test.png
 
R3AM1 – Monitor Load objects
Test.png

2. Request Download

   
R3AR2 – Define request (Header & Detail)
Test.png
Test.png
R3AR4- CRM Request Start
Test.png
R3AR3 – Monitor Requests
Test.png
 
Note: Request download will enable loading of data parallel, which is not possible using initial download.
Data exchange can also be monitored by monitoring the BDOCs (Business documents) that are generated.
   
SMW01 – Display BDOC Messages
Test.png

Download objects

The download objects can be seen in the transaction R3AC1- Adapter Object Overview
Test.png
 
BUPA_MAIN – Business Partners
BUPA_REL – Business Partner Relationships
BUAG_MAIN – Business Agreement
PSOB_MAIN – Contract Object 
PSOB_REL – Contract Object Relationships
Note: Only one Contract object family can be downloaded at any point of time (Field DPSOB- PSOBTYP), so thefilters should be set accordingly in R3AC1 for Initial download. In case of request download filter can also be set in R3AR2.

Using STATE_STORE and STATE_RESTORE methods

$
0
0

Assume that we have already created Search View and Result View and these views are included in ViewSet. The Search View is for advance searching and result view the table that displays the result of search.

 

Now follow the steps:

 

Step 1: Implement WD_DESTORY method.

            Redefine the method WD_DESTORY method of Search View and write the following code:

              RAISE EVENT history_trigger.

       CALL METHOD SUPER->WD_DESTROY.

          Here history_trigger event is raised which calls the State_Store method.

 

Step 2: Implement the method STATE_STORE

            Redefine the method STATE_STORE in the Search View and write the following code:

               DATA:
        lr_ent
TYPE REF TO cl_crm_bol_dquery_service.
        lr_ent ?= me
->search->collection_wrapper->get_first( ).
       
IF lr_ent IS BOUND.
           state_container
->add_item( im_name  = 'SearchView'
                                     im_value
lr_ent ).

        ENDIF.

In add_item method SearchView is the name for identifying the state. In me->search->collection_wrapper, search is the context node that was created using BOL Entity BTQ1Order.


 

Step 3: Implement the method STATE_RESTORE

            Redefine the method STATE_RESTORE in the Search View and write the following code:

               DATA:

           l_ref_ent TYPE REF TO cl_crm_bol_dquery_service.

           state_container
->get_item( EXPORTING im_name  = 'SearchView'
                                   
IMPORTING ex_value = l_ref_ent
          
EXCEPTIONS OTHERS = 0 ).
          
IF l_ref_ent IS BOUND.
                me
->search->collection_wrapper->add( iv_entity = l_ref_ent
                                                 iv_set_focus
= abap_true ).
          
ENDIF.

Enhancing a UI Component in CRM Web UI.

$
0
0

The enhancement set concept can be used to redefine and enhance existing UI components. Enhancing a component enables you to overrule the standard SAP coding and replacing it with your own .

Easy 8 Steps Procedure :

Step 1.

Open BSP_WD_CMPWB Txn, Click on the new button to create Enhancement Set.

1.png

Or,

Open  SM34 Txn and enter View Cluster 'BSPWDVC_CMP_EXT'

2.png

 

Step 2.

To create new Enhancement Set enter the name of Enhancement Set and Description.

2.png
Step 3.

Open SM30 Txn and enter  the view BSPWDV_EHSET_ASG

2.png


Enter the Enhancement Set


2.png

Step 4.

Open the  UI Component to be Enhanced in Component Workbench and click on the "Enhance Component".

Enter the name of Enhancement Set.

2.png

Step 5.

Enter  the Application Name.  It should start by Z.

2.png

Step 6.

Provide the Repository Information.

2.png

Create new BSP App by clicking on Yes in next Pop-Up.


Step 7.

UI Component is now Enhanced. To Enhance a View right click on the view and select Enhance.


2.png

Step 8.

If the  Z class for IMPL is created it means View is Enhanced.


2.png

Now a custom logic can be put here.

 


Subsequent issues if saving CRM business transaction is suppressed with ORDER_SAVE BADI.

$
0
0

As you know, it is possible to prevent saving a CRM business transaction by issuing do_not_save exception in BADI ORDER_SAVE implementation.

 

However, there might be subsequent issues like:

 

  1. BSP error CX_BOL_ENTITY raised at class CL_CRM_BOL_ENTITY method GET_ROOT. It happens when the mandatory field check is activated. If you try to save a business transaction with empty mandatory fields, the BSP error may occur.
  2. You make some changes in an existing business transaction, after pressing save button, message issued indicates the document cannot be saved (due to the BADI implementation). However, the changed value is still shown in WEBUI. That is confusing because end user may think the changes they made are saved successfully.

 

If you meet symptoms like above, please check your BADI implementations. To prevent saving the CRM order, you should use the method CHECK_BEFORE_SAVE in BADI ORDER_SAVE, and raise exception do_not_save in the implemented method to prevent the saving. If you use other methods, for example PREPARE, there would be the wrong system behavior.

 

See also:

Note 1519171 - How to prevent saving the document in CRM?

KBA 1616964 - Message 'Details The document could not be saved' in CRM WEBUI application log

How to enhance Business Agreement Class in CRM Web IC

$
0
0

Topics convered in this document:

 

  1. Introduction
  2. Business requirement
  3. Steps to enhance the standard Business Agreement class
  4. Configuration Steps for Business Agreement class enhancement
  5. Conclusion
  6. References

 

 

 

    1. Introduction

This document provides a detailed explanation of Business Agreement class (BUAG class), its usage in CRM Front Office process and how to enhance it for a particular customer requirement.

 

Business Agreement is slimmer version of its counterpart Contract Account in ECC. It does not have as much accounting information as with the Contract Account. It groups together all of a business partner’s contracts to which the same payment and dunning data applies. A Business Partner can have one or more Contract Accounts, for example if the Business Partner owns multiple properties, each will have their own Contract Account. When this is replicated to ECC it creates a Contract Account as shown in below diagram:

 

diagram1.png

Figure 1 Business Agreement Vs Contract Account

 

 

 

    2. Business requirement

Currently in the SAP standard Web IC the Business Agreement class is defaulted and the agent doesn’t have the option of changing it. Ideally we should be able to give an option to the agent for choosing the Business Agreement class at the time of creation of the Business Agreement.

The agents are required to create Business Agreements with different Business Agreement classes in order to complete the Contract creation from the Contract Management process and in the standard system we don’t have the capability of providing the free selection of the Business Agreement classes in the Web IC.

Creation of Business Agreement is an important process for completing the Contract Management process and agents perform move-in for customers in huge volumes. So enhancing the Business Agreement (BUAG) class is very critical.

Agents need to choose the Business Agreement class for creating different types of Business Agreements. Based on the BUAG class the category of the customers would be determined.

 

 

   Current process (SAP standard)

 

In Web IC the agent has an option of creating the Business Agreement (as shown below) and the Business Agreement class is determined and defaulted in BUAG create screen.

 

diagram1.png

Figure 2 SAP standard screen for BUAG creation

 

diagram1.png

 

 

Process after the enhancement

 

 

Agent has already identified the BP/Premise and now he/she wants to create a new Business Agreement. Agent clicks on ‘More’ button to create a new Business Agreement (as shown below). We need to list down all Business Agreement classes (maintained in SAP standard configuration table) in a dropdown box. Agent can select one BUAG class at a time and system will navigate to create BUAG screen.

dia.png

In create BUAG screen the value of the Business Agreement class should be defaulted with the BUAG class value chosen in dropdown:

diagram1.png

         Below flow diagram explains the steps to be followed for BUAG creation after the enhancement done:

 

diagram1.png

 

 

 

     3. Steps to enhance the standard Business Agreement class

 

This section provides the detailed description of all the steps required to enhance the BUAG class in Web IC (Front Office process). Standard UI component IUICMD will be enhanced to accommodate this requirement. ZABC_ENH_SET is the enhancement set to be used; all the view/component enhancements will be done under this enhancement set.

 

  • Implementation Class CL_IUICMD_DETAILACCOUNT_IMPL
    • EH_ONCREATEBUAGCONSUMP Method to handle the create BUAG event for ABC01 buag class.
    • EH_ONCREATEBUAGDAMAGE Method to handle the create BUAG event for ABC02 buag class.
    • EH_ONCREATEBUAGNONCONSUMP Method to handle the create BUAG event for ABC03 buag class.
    • GET_LAYOUT_BUTTONS Method to prepare the buttons in toolbar (for custom buttons).
    • DO_HANDLE_EVENT Method to handle and trigger the events (standard/custom).

 

 

Below table shows the Custom controller class and its method. It will be redefined to handle the CREATE BUAG requirement with different BUAG classes.

 

 

  • Implementation Class CL_IUICMD_CUCOMD_IMPL
    • CREATE_BUAG Method to create Business Agreement

 

 

Preparing dropdown BUAG create buttons

 

Redefine below mentioned method to add code to prepare the toolbar (More option) with custom buttons:

diagram1.png

 

Write below logic in the above redefined method to add the 3 custom buttons in ‘More’ option. Add ‘Create Consumption Business Agreement’, Create Non-Consumption Business Agreement’ and ‘Create Damage Claim Business Agreement’ buttons.

diagram1.png

 

 

 

 

Capturing events raised and trigger the handler methods

 

DO_HANLE_EVENT method of implementation class need to be redefined and below code should be added to capture the events raised (by custom buttons) and trigger the corresponding handler methods:

 

diagram1.png

 

Add the event handler for CreateBuAgNonConsump event as well in the same method. This will capture the event raised by these BuAg create buttons.

 

 

 

 

Handling Create BuAg event in DetailAccount view for custom buttons

 

As mentioned in above section we have added 3 new custom buttons to create BuAg with different classes i.e. Consumption – ABC01, Damage Claim – ABC04, Non-Consumption – ABC03. View IUICMD/DetailAccount of BSP component IUICMD will be enhanced and 3 new event handler methods will be created to capture the event raised by above custom buttons. Create EH_ONCREATEBUAGCONSUMP, EH_ONCREATEBUAGDAMAGE and EH_ONCREATEBUAGNONCONSUMP methods in implementation Class ZCL_IUICMD_DETAILACCOUNT_IMPL. Below screen shot represents the view; it’s implementation class and event handler method to be redefined:

 

diagram1.png

 

 

Write below logic in above highlighted methods; set different BuAg class value in each method (in 2nd step):

 

1.

         1. Determine the current account by calling the below piece of code:

 

 

    lref_account?=me->typed_context->detail->collection_wrapper->get_current().

 

           CHECK lref_account ISBOUND.

     
CALLMETHOD lref_account->if_bol_bo_property_access~get_property_as_value
     
EXPORTING
        iv_attr_name = lc_bp_number
     
IMPORTING
        ev_result    = lv_account.

 

 

 

2. Get the enhanced CuCo instance and set the value node with the BUAG CLASS value in case of Create Consumption     Business    Agreement option fill ABC01 and in case of Create Damage Claim Business Create option fill ABC04 and if it is Non-Consumption type of Buag then fill ABC03.

 

 

* Get the enhanced CuCo instance.
  lref_cucomd ?= me->get_custom_controller( lc_cuco_cust ).

 

 

* Get the Buag Class entity - value node.
  lref_entity ?= lref_cucomd->ztyped_context->zcnbuagclass->collection_wrapper->get_current( ).

* Set the Buag Class entity with buag calss value - Consumption - ABC01.
 
CALLMETHOD lref_entity->if_bol_bo_property_access~set_property
   
EXPORTING
      iv_attr_name = lc_class_attrib_name
      iv_value     = lc_consump_class.

 

    

   3. Call method IREF_CUCOMD->CREATE_BUAG( ) with the above fetched BP ID (in step 5) and get the entity back. This will create the business agreement new entity instance by calling the CREATE_BUAG method from the custom controller of the component by passing the partner number and give the same back in a reference variable.

 

 

4. Search if the Current Business Partner has had any Business Agreements in the past or if this is the first one. If the Recently created Business Agreement is the First then mark the attribute ‘BUAG_DEFAULT’ as ‘X’.

 

5. Get the collection wrapper of the context node BUAG by using below syntax:


    LR_CW = TYPED_CONTEXT->BUAG->GET_COLLECTION_WRAPPER ( ).

    LR_COL? = LR_CW->GET_COPY ( ).
   

Call method GET_CURRENT_INDEX( ) and get the GV_INDEX for further use.

 

6. 

          6. If there is no collection wrapper then create a new collection wrapper by using below syntax:

    CREATE OBJECT LR_COL
      TYPE
      CL_CRM_BOL_ENTITY_COL.

 

     7. Call method CREATE_DESCR_OBJ( ) of class CL_CRM_BUAG_TOOLS with data collection variable. This will help in navigation to the Business Agreement view:

 

CALL METHOD CL_CRM_BUAG_TOOLS=>CREATE_DESCR_OBJ
    EXPORTING
      IV_UI_OBJECT_TYPE   = 'BUAG'                         
      IV_UI_OBJECT_ACTION = 'C'                               

    RECEIVING
      RR_RESULT           = LR_DATA_COLLECTION.

 

Add the newly created BUAG entity (in step 7) to the collection wrapper:


  LR_DATA_COLLECTION->ADD( LR_BUAG_ENTITY ).

  LR_NAV_SRV = CL_CRM_UI_NAVIGATION_SERVICE=>GET_INSTANCE( ME ).

 

 

      8. Call NAVIGATE_DYNAMICALLY( ) method with LR_DATA_COLLECTION (collection wrapper) filled in above step. This will start the navigation from the popup view to standard BUAG creation view.

 

 

        9. Get the window controller instance from the view manager instance and call method CALL_OUTBOUND_PLUG( ) with ‘LEAVE’ outbound plug name. This will close the current popup.

 

 

 

 

 

Enhancing CREATE_BUAG method of custom controller

 

As mentioned in the below screen shot we need to create one value node named ZCNBUAGCLASS with one attribute BUAG_CLASS in it. The value for the value node attribute will be set from event handler methods of all the above mentioned 3 buttons (BuAg creation buttons) and it will be used in CREATE_BUAG method of custom controller.

 

 

 

diagram1.png

 

 

Below screen shot represents the custom controller implementation class in IUICMD component. The implementation class (marked below) contains the main method to create Business Agreement (i.e. CREATE_BUAG).

 

diagram1.png

 

 

Redefine and write below logic in CREATE_BUAG method:

 

1. 

       1. Comment the call to CREATE_BUAG( ) method of super class.

 

       2. Copy the logic from CREATE_BUAG method of super class method and paste it in redefined CREATE_BUAG( ) method.

 

       3. Referring to super class BUAG_CREATE( ) method logic : In the row number 44 there is a method call to fetch RISK_CLASS after this  code and a method call GET_PROPERTY_AS_VALUE( ) with ‘BUAG_CLASS’ as attribute name and get the buag class value (we have set this value in event handler methods in above steps).

 

       4. In line number 58 CHANNEL is filled to the local structure variable to create BUAG entity. After this we can add our code to fill the BUAG_CLASS field of local structure ls_buag_create from the above fetched BUAG class value in step 3.

 

 

       5. Other steps will be as it is copied from super class BUAG_CREATE( ) method which will handle the creation of buag entity.

 

 

 

 

 

 

 

      4. Configuration Steps for Business Agreement class enhancement

  

    This section provides the details of all the necessary configuration steps required to complete the BUAG class enhancement.

   

    

Configuration 1: CRMC_BUAG_CLAS_T is a SAP standard configuration table which is used to store the BUAG class and its attributes (e.g., Description etc); Dropdown field in Web IC screen (under More option) should contain all the BUAG class values maintained in this table.

 

 

diagram1.png

 

  

 

   Configuration 2: Maintain all necessary configurations for the Business Agreement class in the below mentioned SPRO path:

 

diagram1.png

 

 

    Configuration 2(a): Allocate Business Agreement class

 

diagram1.png

 

We will need to maintain an entry for each BUAG class (i.e. ABC01/ABC02/ABC03) with unique Risk class value as shown in below screen shot.

 

Note: In this configuration the combination of channel, usage and risk class is the candidate key to determine the BUAG Agreement class. 

diagram1.png

 

 

 

   Configuration 2(b): Allocate Payment-relevant parameters

 

   Below configuration is related to allocation of ‘payment-relevant parameters’ to new Business Agreement.

 

diagram1.png

 

   For each risk class we will need to maintain the payment relevant parameter as shown in below screen shot:

  diagram1.png

 

 

 

    5. Conclusion

 

This document will be very much useful in any CRM Utility project because enhancing SAP standard BUAG is a very common requirement across all the Utility projects. CRM Web IC developer can quickly do the required enhancements by following the above mentioned development/configuration steps.


CRM Student Recruitment and Integration with Student Lifecycle Management - Part 1 - Demo

$
0
0

This video describes how existing CRM Marketing features of CRM 2007 can be utilized by universities in the area of Student Recruitment. As this first introduction to the topic shows, CRM Marketing functionalities and ERP Student Lifecycle Management can be coupled without modifications. Part 1 of 7.

Related article (PDF 408 KB)

View this Demo

Duration: 00:03:48

 

CRM Student Recruitment and Integration with Student Lifecycle Management - Part 2 - Demo

$
0
0

This video is the second part of the Best Practices series "CRM for Student Recruitment" and describes how more existing CRM Marketing features (CRM objects such as CRM User Status, CRM Lead) can be utilized by universities in the area of Student Recruitment. Part 2 of 7.

Related article (PDF 332 KB)

View this Demo

Duration: 23:05:09

 

CRM Student Recruitment and Integration with Student Lifecycle Management - Part 3 - Demo

$
0
0

This demo movie is the third part of the Best Practices series "CRM for Student Recruitment" and introduces business scenarios where customers can make use of CRM Marketing features and Student Lifecycle Management in the area of Student Recruitment. Part 3 of 7.

Related article (PDF 292 KB)

View this Demo

Duration: 23:08:27

 

Pricing in CRM using IPC

$
0
0

Pricing in Business Transactions

Pricing is used to describe the calculation of prices and costs in a business transaction. Pricing enables to determine relevant price information in all types of business transactions such as sales or service orders, contracts, quotations or campaigns.
Different kinds of condition groups – for example, prices, discounts, surcharges, freight or taxes – can be determined. The system uses the condition technique for pricing, to determine relevant pricing information from condition records for a business transaction. Using condition technique the system answers the search queries of different applications by searching in existing condition records for valid results using certain search criteria.

SAP Pricing Fundamentals

            ConditionTechnique in Pricing

                        The condition technique refers to the method by which the system determines prices from information stored in
                    condition records. The various elements used in the condition technique are set up and controlled in                     customizing.  During  the processing of a business transaction, the system uses the condition technique to determine                     a variety of  important  pricing information.

For example, the system automatically determines which gross price the customer should be charged and
which discounts and surcharges are relevant given the conditions that apply.

 

            Elements in the condition technique

      • Condition Types: Define condition types different components that make up a price of a   product (base price, discounts, and surcharges)
      • Condition Tables: To store and retrieve condition records for each of the different condition types
      • Access sequences: Strategy to enable the system to find valid condition records
      • Pricing Procedure: Grouping of condition types in a particular sequence

 

            Process Flow for condition determination

      • The determination of pricing procedure is determined based on the data in the application.
      • The pricing procedure has several condition types in sequence; the system reads the first condition type of the search procedure and determines the access sequence.
      • The access sequence is read with the condition tables which are also read in a sequence. The condition tables determine the condition records. The condition tables have key field combinations based on which the system determines the condition records.
      • As soon as the system has found a valid condition record for a condition table, it makes the result value for a results field available to the application.
      • When the determination procedure condition more than one condition type, the system repeats the search for condition records for each condition type.

                    1.png

            Condition Types

 

                In order to translate the receipt below in CRM, the system uses “condition types” to differentiate between                               different   price  components. Condition types may be defined for base price, freight charges, taxes, discounts, net                price,  etc.  The  calculation can be based on the amount or weight or volume of the product. It can be based on                a number or  can be  “%” based or can vary depending on a scale.
                    2.png

            Access sequences

Pricing depends on a host of factors. For example, a discount may be applied only may only on a particular
customer or the customer group. It may depend on the region or the product being or it may be applicable for only certain duration. There are many such complex scenarios in real world and in order to determine the prices according
to these conditions, the system makes use of access sequences.

Access sequence is a search strategy used in pricing to determine the best value that meets the required conditions in an iterative manner. For example, if a certain tax % should be waived off particular customer group for a sales office, then the system searches for this combination via access sequence. The access sequence contains
a list of condition tables having condition records which are accessed in aniterative fashion to get the best possible match.

                    3.png

            Condition Tables & Condition Records

 

          A condition table defines the combination of fields that identifies a unique condition record. Specific data           about   the  conditions is stored in the condition tables as condition records. For example, condition records           can   be   used  to   maintain a product price or special discount for privileged customer or a special price is           applicable for a  certain period.
          Values in condition records can also be scale based.
5.gif4.gif
Note : The fundamental pricing concepts explained above are
applicable equally for SAP CRM as SAP SD.

Pricing in CRM

Pricing in CRM is also governed by condition types which in turn forms a sequence in pricing procedure. The
pricing procedure in CRM is determined based on the following factors:
      • Sales Organization
      • Distribution Channel
      • Document Pricing Procedure (can be assigned to a
        sales transaction, on the third level)
      • Customer Pricing Procedure (assignment in business
        partner master)
1.png

            Path in customizing
SAP Customizing Implementation Guide->Customer Relationship Management->Basic Functions->Pricing->Pricing in the Business Transaction->Determine Pricing Procedures
1.png
The customizing data for the condition technique and pricing is first downloaded from R/3 into the CRM
system. This is done via initial load in CRM via transaction R3AS.
In the standard system there are the following objects for transferring:
      • DNL_CUST_CNDALL (all data for condition
        technique and pricing)
      • DNL_CUST_CND (condition technique data without
        the cross-client data)
      • DNL_CUST_PRC (Pricing data)

Internet Pricing and Configurator (IPC)

The Internet Pricing and Configurator is the pricing and configuration tool for CRM Online and CRM Internet Sales. SAP
CRM uses IPC (Internet Pricing and Configurator) to determine pricing information when creating a business transaction, such as a quotation, sales order, service process or a contract in a web based environment. It allows to configure price and products in a web environment, using master data that is downloaded from SAP R/3 system. It combines the functions of the Sales Configuration Engine (SCE) and the Sales Pricing Engine (SPE) with a standardized Web interface.
IPC is the core part of pricing in CRM. The IPC ensures integrated price calculation, regardless of whether prices are calculated for a business transaction in CRM Enterprise, in Telesales, or in SAP E-Commerce. It is a Java-based client-server package. It provides R/3 pricing and R/3 product configuration outside of an R/3 system. It can access both the customizing data as well as the condition records. It does not need an online R/3 system whilst still maintaining pricing and configuration data in one place.
Pricing Routines
Routines for pricing are maintained in R/3 system using  transaction VOFM. These are then entered in the pricing procedure or the condition type. The standard routines in R/3 are mapped to IPC user exits in CRM.  The pricing routines or user-exits in IPC are developed in Java. 
In an SAP R/3-CRM set-up, where the pricing related customization can be downloaded from the source, R/3 to CRM, the standard pricing runs fine on CRM. However, in cases where we have custom pricing routines developed in R/3, they will not get downloaded to CRM as the translation between ABAP and Java is not automatically performed.  Hence, in order to maintain consistency between the custom routines in R/3 and CRM, they should be coded in IPC. In case of a vice versa arrangement where the source of the pricing routine is CRM, the same routine needs to be implemented in ABAP in R/3. In the next sections we will see how these user exits are developed.

            Pricing Communication Structure in CRM

          The CRM applications communicate with IPC using pricing communication structure for data transfer. This           communication structure is called the pricing communication structure or the field catalog. All the fields in the access sequence will be maintained in the field catalog.
Path in customizing
SAP Customizing Implementation Guide->Customer Relationship Management->Basic Functions->Pricing->
Define Settings for Pricing->Define Settings for Pricing

1.png

More often than not, we have a requirement to customize the pricing, for example, to determine pricing based on some custom fields on the business transaction. In order to do so, we need to add these custom fields during pricing process. For example, we need to determine price according to product hierarchy which is not contained in the standard communication structure. In this case, we need to do some enhancement to pass custom field to the communication structure.

            Pricing Business Add-in (BADI)

          Any custom fields that need to be accessed to determine pricing should be present in this pricing communication structure. The structure will hold the value in run time via a pricing related BADI. In order to process the custom fields in pricing communication structure and to pass it back to the communication structure, SAP provides a BADI
CRM_COND_COM_BADI.


1.png


     If any field is added at header level of the field catalog, that will available in the changing parameter of the method
     HEADER_COMMUNICATION_STRUCTURE.
     If any field is added at header level of the field catalog, that will available in the changing parameter of the
     method ITEM_COMMUNICATION_STRUCTURE.

            Development Environment

 

         The pricing user-exits will be compiled with the J2SE 1.4.x or a compatible java compiler of version 1.4.x. Also                     the   used libraries must be compatible with J2SE 1.4.x.  An IDE like Eclipse, 3.1 and above is recommended for
          development of the routines.
Note:      It is important that the compiled class files are compatible to a JDK 1.4 version as well as the standard library used isonly JDK 1.4. The VMC java environment of SAP BASIS 7.00 does only support 1.4 class files and libraries.

         

 

 

             Important related SAP notes

 

               1.png

Development Steps of Pricing Routine

 

In order to implement a routine in IPC, we first import an existing project into workspace. We take this existing
project from a zip file attached in an SAP provided note, 809820, for this purpose. This helps is accelerating the development.
Here are the steps.
      1. Download and unzip the ZIP file attached in SAP Note 809820 into a directory, say C:\DEV. This folder is the workspace folder for eclipse.
      2. Enter into transaction /n/SAPCND/UE_DEV. API JAR files and some source JARs from the system will be downloaded in a subfolder in the above directory upon executing the transaction as shown in screenshot below.

1.png

                    The development of the pricing routine will be done in an IDE, say eclipse. Hereprepare an eclipse project using                     the folder in step 1 which will act as a workspace in eclipse.

1.png
                   Customer implementations will be created in the src directory. After implementing the customer exits, the user exit
                    classes need to be uploaded back into the system. For this, the java sources and the compiled classes must be                     error                     free. Then prepare a JAR file from the SAP delivered configuration file                ‘create_PRC_UE_CUSTOMER_jar.jardesc’ in                     the SAP note.
                    We will see shortly how the user exit accesses the application data and determine the pricing.
        1. The developed user exit will then be uploaded into the system using the same transaction /n/SAPCND/UE_DEV. For one ABAP package, only one JAR file can be used. Uploading will over-write an existing JAR file if present, however the new coding is not taken automatically. We need to reset the VMC in transaction SM52.


1.png


            Uploaded user exits

 

                   The uploaded user exits can be seen in transaction SM53.
          The transaction SM53 contains also a browser to see the installed and uploaded java modules along with           the  user   exit files.
        1. Select in the Navigation tree the element Application.
        2. Browse the Installation tree down to the shown level 0/SAP/IPC -> Modules.
        3. All modules ending with _SAPCND_UE are customer uploaded modules equals jar files.
        4. Select the folder for /0CUST/ZSD_DEV_SAPCND_UE and we can see the uploaded jar files.


1.png


            Configuration of uploaded user-exits

                      Theuploaded java routine is configured in transaction  /n/SAPCND/UEASS.
                  
                         Give application as CRM.
                         Enter usage as Pricing, PR, and execute.
1.png
                     The next screen the various types of standard user exits.


2.png


            Register a user-exit

 

              In order to create a custom implementation, it first needs to be registered under the appropriate user exit type.
          Registering a user-exit is a cross client customizing and can be done by creating a new entry. Provide a user-exit           name which is a symbolic or short description of the functionality. The customer namespace starts with Y or Z.
          As an example below, user exit type “VAL” has two custom implementations registered under it. Select
          the “Implementations” folder in the left pane of the transaction as shown in the screenshot below after having           selected the appropriate user exit type in the above screenshot.



1.png

                    Double-click on the implementation name and then enter the name of the implementation class compiled for this                     routine. There is no restriction on the name but it should be different from com.sap*. Give a description to the exit.
1.png

Attributes in exits

          If the user exit needs access to some attributes on the application data, then these attributes should be defined in the
          “Attributes” section of the user exit. This attribute is only a symbolic name which will be mapped later to a field from           the pricing communication structure. This name of the attribute will be referenced in the user exit implementation.
          As shown in example below, the user-exit Z1156 has three attributes maintained against it.
        • ZDENOMINATOR
        • ZNUMERATOR
        • ZSOLDCAPACITY


1.png

             Formula number assignment

           The next step is to assign a formula number to the implementation. This formula number will be assigned to the 
          relevant condition type in pricing.
Number range of formulas
          Allowed number range for different types of user exits can be seen in transaction /n/SAPCND/UERNG.
          For exit of type VAL, the customer number range is within 600-999.



1.png1

Double–click on the “Formulas” folder in the left panel of the transaction and create a new formula number, say, 900, configured for Z1156, our custom user-exit.


1.png


Select “Attributes” double click on it


1.png


               Now, these characteristics that appear in the column “Field Name” of this screenshot are required to be                maintained in the pricing communication structure.


1.png


                         These fields in the pricing communication structure will be populated via the pricing BADI, by implementing either                     of the header or the item methods, depending on which level this pricing is maintained and required for.
                    The custom fields may be present on the application data or may be derived via some other attributes on the                     application data. In our case, these attributes are linked to configuration characteristics at item level for a product on                     a business transaction.
                    The last step within CRM after registration and assignment of the user-exit formula must be to upload before it can be                     assigned to any pricing.procedure or other configuration. As the configuration is buffered for one day (default setting)                     the changes will only become immediately active with a restart of the VMC or the application server.
Note: While testing different configuration in a test or development system also the function module, IPC_DET_CLEAR_CUST_BUFFER can be executed.

         

               Virtual Machine Container

 

                      The VirtualMachine Container (in short VM Container or VMC) is a component integrated into  the  SAP Web AS                ABAP that enables Java functions that comply with the Java Standard J2SE 1.4 to be executed in AS ABAP. The VMC                is optimized for applications that use functions implemented in ABAP as well as in Java, and that have to communicate                quickly and reliably with one another.

               Logs in Virtual Machine Container

 

          In the transaction SM53, on the left side we can see Log Administration, in that we also see the Log Configuration.           We can specify the various severity levels like at the package or class level.
        1. Info
        2. Warning
        3. Error
        4. Fatal
        5. Debug
          Logs can now be viewed in SM53 itself. Theycan also be filtered by different criteria such as severity, log name,or user.

1.png
          The creation of the logs will be required to be done in the user exit itself. The class com.sap.spe.base.logging.UserexitLogger implements two methods for logging debug messages or error messages.
An example coding is shown below from a sample user exit in the note.



1.png

Classes to be inherited for different types of user exits


               1.png

 

 

Related Content

 

 

  1. www.help.sap.com
  2. www.sdn.com
  3. www.servicemarketplace.com
    ( For reference to SAP notes)

 

 

 

 







Creating F4 help from an Internal Table

$
0
0

Sometimes there is a requirement for generating dynamic F4 help without using any SE11 Search Help. Through this document we can create F4 help as a popup window by specifying any table at run time.

 

In this Tutorial we consider a scenario, there is one view having a context node with a single attribute named city (Shown below). Now we need to assign F4 help for that city attribute.


Image1.jpg

Consider an Internal Table ZCITY as below,

Image1.jpg

 

Now go to the IMPL class of view where you have the attribute for which F4 help is required, and Declare following Attribute

gt_city as global table of type zcity

g_ref_decision_popup type ref to IF_BSP_WD_POPUP.

Image3.jpg

Get the data to be displayed in F4 help popup in to the global table (gt_city) defined in IMPL class of View.Now values needs to be fetched from Database Table to Glodal Table. It is better to write code in the Constructor of IMPL class as it is called once at the time of view object creation.

 

METHOD constructor.
CALL METHOD super->constructor.

* Get all rows from desired tables
SELECT *
FROM zcity
INTO TABLE gt_city.

IF sy-subrc <> 0.
* Error Message
ENDIF.
ENDMETHOD.

 

 

Go to the GET_V method of the field (CITY). Write the following code:

Below code will make your city field look and function as F4 help field. Here we need to specify on clicking of F4 key which outbound will be called.


create object rv_valuehelp_descriptor
               
type cl_bsp_wd_valuehelp_navdescr
               
exporting iv_outbound_plug = 'VALUEHELP'.

 

Create an Outbound plug namely ‘VALUEHELP’ and write the following code. This outbound plug will be called by clicking of F4 function key or clicking on that F4 help icon which is displayed at the right end of the text box.Here we are creating a decision popup by passing a global table and the number of rows to be displayed in the popup.

 

METHOD op_valuehelp.
 
FREE g_ref_decision_popup.
* Create decision popup
g_ref_decision_popup
=

        comp_controller->window_manager->create_decision_popup(
                                                        iv_title
= 'City Selection'
                                                        iv_visible_row_count
= 10
                                                        iv_display_table
= gt_city ).
* Assign close event CONFIRM_POPUP_CLOSED
g_ref_decision_popup
->set_on_close_event(

                            iv_event_name = 'CONFIRM_POPUP_CLOSED'
                            iv_view
= me ).      
* Open popup
g_ref_decision_popup
->open( ).

ENDMETHOD.



Create an event named CONFIRM_POPUP_CLOSED. Write the following code.

On closing of the popup window this event will be called as we have specified in the previous step.

OUTPUTNODE” is the standard context node through which we can access the selected row index and the event generated in Decision Popup Window.

 

 

METHOD eh_onconfirm_popup_closed.
DATA:
ls_city          
TYPE                    zcity,

l_ref_outputnode  TYPE REF TO     cl_bspwdcmp_bspwdcomponen_cn01,
l_ref_entity     
TYPE REF TO     if_bol_bo_property_access,
lv_row_index     
TYPE                    i,
lv_event_name    
TYPE                    string.

* Get context node from popup window
l_ref_outputnode ?=
g_ref_decision_popup->get_context_node( 'OUTPUTNODE' ).


* Get selected row index and event
lv_row_index
= l_ref_outputnode->get_selectedrowindex( ).
lv_event_name
= l_ref_outputnode->get_event_name( ).

* Close popup
g_ref_decision_popup
->close( ).

* Check if any row is selected

IF lv_event_name = 'OK'.
* Get selected row from global table
READ TABLE gt_city INTO ls_city INDEX lv_row_index.
l_ref_entity ?=

          me->typed_context->city->collection_wrapper->get_current( ).
lv_event_name
= ls_city-cityname.

* Assign F4 help value
l_ref_entity
->set_property_as_string(

                     iv_attr_name = 'city'

                                       iv_value = lv_event_name ).

ENDIF.
ENDMETHOD.

 

and you are finally done. This will create a popup with all contents of the table, and on selection of the value it will be filled to the Text Field.

Thanks and Regards,

Pratheek


Viewing all 252 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>