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

ABAP Reports on Web UI

$
0
0
ABAP Reports Links on Web UI
Introduction
One of the most common requirements especially when the client is using SAP CRM is the ability to execute ABAP Reports on the Web UI screen.
The purpose of the document is to brief on the step-by-step approach to achieve the above requirement.
The Custom Reports can be made available on the Web UI screen:
  • Through a Direct Link
  • Creating a new Work center
1.0 Logical System Mapping:

This the first step in achieving our requirement.
Before using the Transaction Launcher, SAP ITS (Internet Transaction Server) has to be configured with or without local ITS. The scope of the current document is only setting up SAP ITS using Local ITS.
  1. Go to TCode: CRMS_IC_CROSS_SYS
  2. Enter Mapping & Logical System Name
    • Logical System Name - System in which the GUI transactions have to be executed on Web UI
    • Please check if the authorization to change the entries in Production is existing. Else,
      • the entries has to be made for Production System and transported
      • Configure Transaction Launcher in Quality & Production environment (not recommended)
  3. Set 'Local ITS' checkbox
pic1.jpg
Create BOR Object (SE80)
  1. Copy Standard BOR Object TSTC
pic2.jpg
   2. For the newly created BOR
    • Under Method EXECUTE: Set 'Synchronous'
              pic3.jpg
       3. Change to status of the object to 'Implemented' (EDIT)
       4. Generate the object
    pic8.jpg
    Transaction Launcher

     

         1. Start the Transaction Launcher wizard using the below path

        

    SAP IMG > Customer Relationship Management>UI Framework>Technical Role definition>Transaction Launcher>Configure Transaction Launcher

        

         2. Give a name to the Transaction Launcher ID
                   pic5.jpg
         3. Give a Description & CLASS Name
      • The new Class will be created

                   pic6.jpg

         4. Select the values

      • Transaction type : BOR
      • Logical System
      • BOR Object Type: BOR object copied from TSTC
      • Method Name: EXECUTE

     

                   pic7.jpg

     

    Direct Link on the Screen

     

    Go to Navigation Bar: 

    Create the Links for the Navigation: (TCODE: CRMC_UI_NBLINKS) 

    Define Logical Links:

     Type: Launch Transaction

     Target ID: EXECLTX 

    Parameter: Transaction Launcher ID

     Parameter Class: CL_CRM_UI_LTX_NAVBAR_PARAM

     Title: Title of the Link  Description

     

    2.0.2. Create Direct Link Group  Create new Direct Link Group 2.0.3. Assign the Logical Link to the Direct Link Group 2.0.4. Assign the new Direct Link Group to the Navigation Bar Profile                           

    2.0.5. Define Business Role:             

    Select the Business Role and double click on 'Adjust Direct Link Group' 

    Select the Direct Link Group created in the previous step and double click on 'Adjust Direct Links'

     Set the 'Visible' checkbox and Save.

    The link will be visible on the Navigation Part in the Web UI Screen.      

        2.1. New Work Center To create a new custom work center, a new Z* Component has to be created and modified.

    2.1.1. Create a new BSP Component 

    Create a new Z* Component (TCODE: BSP_WD_CMPWB) or copy from a standard component. 

    Refer Standard Components WCC_AI_CM or WCC_SLS_CYC

    2.1.2. Create an Overview Page

    2.1.3. Go to Runtime repository Editor 

    Add View under the Window 

    Select the Overview Page created in the previous step 

    Create an Inbound Plug 'DEFAULT' 

    Right click on Component Interface & Add Interface View:

     Select the MainWindow (Inbound plug created & View added in the previous step) as the Interface View

     Add Component Usage and give a name (e.g. Reports) 

    Add Interface View to the Component usage created

    Used Component: CRMCMP_GS_WC

    Interface View: IFVGroupLinks

     Right-Click on ViewSets and add View Set 

    Select the Overview Page 

    Right-click on the viewset and add the View Area

     Right-click on the View Area and select the Component Usage added in the previous step (Reports.IFVGroupLInks).

     

    2.1.4. WD_USAGE_INITIALIZE: 

    Enhance / Modify the code in the Component Controller method WD_USAGE_INITIALIZE:

    2.1.5. Configuration of the Overview Page: 

    Go to the Configuration tab of the Overview Page created: 

    Select the Component & move it to the required columns & give a appropriate name:

     

    2.1.6. Header Description: 

    To get the Header on the Web UI screen after navigating to the Work Center created: 

    Enhance the following method: 

    Populate the value into the variable 'DESCRIPTION':

    2.1.7. Work Area Component Repository 

    Go to the following path & add the new Component created 

    Go to 'New Entries' & Add the new Component and the Window Name 

    Select the new entry & click on 'Inbound Plug Definition' 

    Enter a name for Target ID & the Inbound Plug 'DEFAULT' created under the Interface view in the Component

     

    2.1.8. Go to the Navigation Bar Profile (TCODE: CRMC_UI_NBLINKS) 

    Create a new Logical Link: 

    LogLink ID: 

    Type: Work center 

    Target ID: Created in the previous steps 

    Define Work center Link Groups: 

    Select the Work Center link group & click on 'Assign Links to Work Center Link Group' 

    The Links created (using Transaction Launcher) for each Reports will be available under this Work Center Group 

    Assign the Logical Links (of type Launch Transaction) defined in the previous steps 

    Define Work Center 

    Assign the Work Center Link Groups to the Work Center:

    2.1.9. Assign the Work Center to the Navigation Bar Profile as required:

    2.1.10. Adjust the Links for the Business Role: 

    Select the Business Role * Click on 'Adjust Work Centers': 

    Ensure that the work center created is not 'Inactive': 

    Go to 'Adjust Work Center group Links' and ensure that the 'Visible' is checked: 

    If the requirement includes to provide a menu list on the Work center, check 'Menu':

     

    2.1.11. CRM Home Page 

    Go to the CRM Home Page & select the Business Role to which the links have been assigned: 

    New Work Center 'Reports' will be available with the 'Menu' option 

    Go to 'Reports' work center: 

    The links to the ABAP Reports will be available:


    An example to fix Generic stop set error status in tcode SMQ1

    $
    0
    0

    I have Q7Q/504 as ERP system and QDD/504 as CRM system.

     

    A new material named JERRY2 is newly created in ERP and successfully downloaded to CRM via request download.

     

    However, after that I made changes on material in ERP, and the change failes to be synchronized to CRM. When checking the outbound queue status via tcode SMQ1, I see the status Stop.

     

    When I tried to reactivate the Queue, 

    clipboard1.png


    I got the following message "Generic stop set":

    clipboard2.png

    I have debugged to know why this message is raised:

    clipboard3.png

    the flag sg_lock is marked as abap_true, so the message is raised:

    clipboard4.png

    The root cause is because there are some errorous entries existing in table trfcqout:

    clipboard5.png

    clipboard6.png

    clipboard7.png

    Just remove them in tcode SMQ1 and repeat the operation to trigger delta download, this time everything works.

    clipboard8.png

    There is now no status STOP in outbound queue, and the delta change on ERP has been successfully synchronized to CRM ,which could be observed in tcode SMW01.

    clipboard9.png

    Delivery Call for SAP Customer Connection - CRM User Experience WebClient UI

    $
    0
    0

    SAP recently wrapped up a Customer Connection focus topic dedicated to Usability of CRM WebClient User Interface (UI).

     

    Customers from the United States, Germany, and around the world submitted thirty-eight different ideas for improvements, of which twenty-four were recently delivered. Among some of the cool new enhancements are things like:

     

    • Automatic “save”
    • Cancel a running search
    • Ability to include colors in result lists
    • Custom logos for business roles
    • Improvements to the email editor
    • And many, many more…

    You can view and listen to the recording.

    How to enhance a web service response structure in word template integration

    $
    0
    0


    In one of my document Create Webservice enabled word document in attachment assignment blockwe have discussed how to create a web service based on a BOL model via CRM web service tool. Recently one customer asked me for help that they would like to have more fields like current user and current system date to be displayed in the word document, however those fields are not existing on BOL model. I am asked to provide them a solution to enhance the web service response structure.

     

    The original solution in document Web-services enhancement for MS Word integration in CRM 2007 is no longer valid now, since the automatically generated web service response structure is now marked by SAP as "cannot be enhanced", to avoid inconsistency caused by any manual change.

     

    clipboard1.png

    For example, if we need to create current user and current system date on the word template for Service contract.

     

     

    1. Create two new extension fields in Service contract header

     

    For detail step by step how to do this using application extension tool, you can refer to this link.

     

    You do not need to configure them in the end UI.

    clipboard2.png

    2. Create a new web service using web service tool

     

     

    Make sure you have included the two extension fields into your web service structure.

    clipboard3.png

    Then create a word template based on this web service. And then the two extension fields are available in the web service response structure. You could now use them in the word template.

    clipboard4.png

    3. create BAdI implementation based on enhancement spot CRM_WST_RT_ENHANCEMENT

    clipboard5.png

    Create a filter for your BAdI implementation whose value equals to the name of web service you created in step2.

    clipboard6.png

    Implement method as below:

     

    METHOD if_ex_crm_wst_rt_badi~outbound_processing.

      FIELD-SYMBOLS: <container> TYPE any,

                     <root>      TYPE any,

                     <header>    TYPE any,

                     <user>      TYPE any,

                     <date>      TYPE any.

      ASSIGN outbound->* TO <container>.

    * replace ZSERV_CONTRACT with your own web service name

      ASSIGN COMPONENT 'ZSERV_CONTRACT' OF STRUCTURE <container> TO <root>.

      CHECK sy-subrc = 0.

      ASSIGN COMPONENT 'ADMINISTRATIVEHEADEROFORDER' OF STRUCTURE <root> TO <header>.

      CHECK sy-subrc = 0.

      ASSIGN COMPONENT 'ZZFLD00012H' OF STRUCTURE <header> TO <user>.

      CHECK sy-subrc = 0.

      <user> = sy-uname.

      ASSIGN COMPONENT 'ZZFLD00012I' OF STRUCTURE <header> TO <user>.

      CHECK sy-subrc = 0.

      <user> = sy-datlo.

    ENDMETHOD.

     

    4. Test in UI

     

    Create a new attachment for a given Service contract based on the word template you created in step2.

    clipboard7.png

    And in the runtime, the two extension fields in the template are merged with the data we fill in our BAdI implementation.

    clipboard8.png

    Conclusion


    Using AET to enhance the web service structure and BAdI implementation to fill extension fields with values, we could fulfill customer requirement with a modification free approach. Such enhancement is transportable and could still survive after upgrade.

    Create Webservice enabled word document in attachment assignment block

    $
    0
    0


    In CRM webclient ui there is a reuse assignment block "Attachment" which are available for most of CRM application.


    clipboard1.png

    There is a button "With Template" which allows you to create word document whose content will automatically be filled by the web service created by you via web service tool in CRM. This document explains how to archive this step by step and illustrate the technical detail behind it.

     

     

    This feature is especially useful if you need to fulfill the scenario to create lots of documents for business transaction like Sales order and the document content consists of both static text and dynamic values like Order ID, Order description etc. Then you just need to create a single document template with all static text, and those dynamic values could be filled by web service in the runtime.

     

     

    In this document I will create such word document for Product as example. The logic is exactly the same if you could like to create web service enabled document for others such as Sales Order, Service order, Opportunities etc.

     

    1. Create your own web service which will be consumed by your word document.

     

    As Arjun Pawar has already written an excellent document All about Web services - Web Service Tool, I will not repeat the detailed creation steps, but just include the productive web service I created:

     

    There are some important attributes which we can write down for later usage:

     

    a. I specify BOR type BUS1178 for my web service

    b. The genil component PROD is assigned to my web service together with its root node "Product"

    c. I have only enabled "Read" operation for my web service

    d. There is one function group automatically generated: /CRMOST/JERRY_PROD_WS_FCT. We will discuss it later.

     

    clipboard2.png

    2. Download the word plugin "SAP Data Panel" from service market place. This wiki could guide you how to download and install in your computer.


    If you encounter any problems, feel free to contact me.

     

    After successful installation, create a new word document and you will see a new menu "SAP":

    clipboard3.png


    It should appear in Active Application Add-ins in your Word option.

    clipboard4.png

    3. Create a new word template.

     

    Work center "Service Operation",

    clipboard5.png


    Fill all mandatory fields like below and click "Start Designer" button:

    clipboard6.png

    click Open in new popup:

    clipboard7.png

    Then a new empty word document is opened. In the right part, the "SAP Data Panel" addin will display all fields available in root node Product of Genil component PROD as a tree, the root node is named "JerryProdWs", which is just the web service we created in step1.

     

    Now you can edit this word template by adding the static part like header, footer, field label. Just select the field in the SAP Data Panel, drag it into the left part and drop.

    clipboard8.png


    This is the final version of my word document. If you put the mouse over the dynamic fields which are dragged from SAP Data Panel, it will be marked with a grey rectangle as a hint that it is dynamic.


    clipboard9.png

    Once click, the technical name will be displayed on top of it.

    clipboard10.png

    Now since I already finish the template edit, I could directly close the word application.

     

    4. Go to Product application, click "With Template" button:

    clipboard11.png

    in popup choose the template created in previous step:

    clipboard12.png

    Then the word application is automatically launched with all dynamic data filled as expected:

    clipboard13.png

    Close the word application and then this document will be saved and appear in the attachment assignment block:

    clipboard14.png

    Automatically generated Artifacts after web service creation

     

    In step1 after web service creation we write down the function group name /CRMOST/JERRY_PROD_WS_FCT.

     

    In fact there are other artifacts automatically generated by system which are necessary for web service runtime processing:

     

    You will find the function group in package $WS_BOL_GEN ( all function group for other web service are also put here )

     

    Since I have only enabled Read Operation during web service creation step, so within this generated function group there is only one generated function module which will delegate the web service call to the method GET_OBJECTS of Genil implementation class CL_CRM_PRODIL of genil component PROD.

    clipboard15.png


    also the generated DDIC structure for web service input & output parameter:

    clipboard16.png

    Query table VEPFUNCST with VEPNAME = my web service name, I can find one generated simple transformation:

    clipboard17.png

    we can view its content via tcode STRANS:

    clipboard18.png

    How to debug the web service call

     

    In case your word document content is not correctly filled by web service, you have to configure out whether it is caused by any issue of the web service provider implementation itself ( in my example it is CL_CRM_PRODIL method GET_OBJECTS ) , or there is another possiblity that the data is correctly returned by the service provider, but lost or conrupt during web service framework processing for example output parameter mapping. You can debug to find the root cause.

     

    The entry point is the Office integration handler class CL_OI_HANDLER to handle with the http request:

    clipboard19.png


    You can set breakpoint on the generated read function module to check whether the call is successfully delegated to the service provider - Genil component implementation class' GET_OBJECTS method:

    clipboard20.png

    Then check whether the response returned by service provider is correctly processed by framework via transformation:

    clipboard21.png

    clipboard22.png

    Enhance the value assignment via BAdI Implementation


    Sometimes the standard processing of Web service framework might not work exactly as what you expect. Take product application for example,

     

    Suppose you drag the field UPNAME into word document, and through debugging you can confirm that its content is correctly returned by Genil implementation class, but discarded by framework in method clear_attributes in line 49:

     

    clipboarda1.png


    Since the Product application marks field UPNAME as HIDDEN field, so it will be cleared in the final web service output structure:

    clipboarda2.png

    However if your business scenario does need all hidden fields to be also filled, you can create a BAdI implementation based on enhancement spot CRM_WST_RT_ENHANCEMENT. Specify your web service name as Filter value for SERVICE_NAME.

    clipboarda3.png

    The BAdI implementation is called AFTER framework processing, so now you have the chance to fill any empty fields all by yourself, since all relevant context are available in changing parameter OUTBOUND.

    clipboarda4.png

    For a detailed step by step how to do this, please read this document How to enhance a web service response structure in word template integration .

    Create the attachment as PDF format


    see this document for detail.


    Further reference

    • consulting note 2023246 - Table not showing correct data in attachment created with template
    • consulting note 2047113 - How to check whether a field in word template is filled correctly by web service
    • consulting note 2047259 - Trouble shooting guide about word document merge with web service
    • consulting note 2048272 - A simulation tool to check document template merge issue

    Top 10 viewed SAP KBAs for March 2014

    $
    0
    0

    Purpose

    The purpose of this document is to provide a list of the top ten most viewed SAP Knowledge Base Articles for Customer Relationship Management in the month of March 2014.

    Overview

    Below are the top 10 most viewed SAP KBAs for CRM.
    KBA NumberKBA Title
    How to analyse problems related to session loss or logoff in CRM WebUI
    The ASSERT condition was violated
    1922976
    How to find the right CRM component
    1846041
    How to analyze why an ERMS inbound E-Mail is not found in the agent inbox
    1866138
    VM_STACK_TRACE dumps in CRM
    1877395
    Transaction launcher trouble shooting and how to identify if the problem is related to ITS or transaction launcher itself?
    1621119
    Dump DYNPRO_NOT_FOUND in SAPLBUSS in module PBO_START_SUBSCREEN when using transaction BP
    Business role assignment in CRM and trouble shooting

    How to step up an IC Agent role - technical prequequisites from customizing point of view to prevent errors

    1866327

    How to identify root cause of a session in SM04 when working with a CRM IC business role and steps for resolving in case of errors

    Please note, in order to view the contents of the SAP KBAs, you will need to be logged into Service Marketplace.

    Related Content

    FebruaryMarchApril
    Top 10 viewed KBAs for March 2014Top 10 viewed KBAs for April 2014

    Top 10 viewed SAP KBAs for April 2014

    $
    0
    0

    Purpose

    The purpose of this document is to provide a list of the top ten most viewed SAP Knowledge Base Articles for Customer Relationship Management in the month of April 2014.

    Overview

    Below are the top 10 most viewed SAP KBAs for CRM.
    KBA NumberKBA Title
    How to analyse problems related to session loss or logoff in CRM WebUI
    The ASSERT condition was violated
    1846041
    How to analyze why an ERMS inbound E-Mail is not found in the agent inbox
    1836437
    How to step up an IC Agent role - technical prequequisites from customizing point of view to prevent errors
    1866327
    How to identify root cause of a session in SM04 when working with a CRM IC business role and steps for resolving in case of errors
    1866138VM_STACK_TRACE dumps in CRM
    1778276Short Dump occurs in CF_ASIT_INTERNAL==============CP when opening the Change History assignment block in an Opportunity
    Transaction launcher trouble shooting and how to identify if the problem is related to ITS or transaction launcher itself?
    1637445CRM Web UI with Interaction Center business role hangs after logon
    1849381How to debug CRM WebUI using Conditional Breakpoints
    Please note, in order to view the contents of the SAP KBAs, you will need to be logged into Service Marketplace.

    Related Content

    MarchAprilMay
    Top 10 viewed KBAs for April 2014Top 10 viewed KBAs for May 2014

    Top 10 viewed SAP KBAs for May 2014

    $
    0
    0

    Purpose

    The purpose of this document is to provide a list of the top ten most viewed SAP Knowledge Base Articles for Customer Relationship Management in the month of May 2014.

    Overview

    Below are the top 10 most viewed SAP KBAs for CRM.
    KBA NumberKBA Title
    How to analyze problems related to session loss or logoff in CRM WebUI
    The ASSERT condition was violated
    1846041
    How to analyze why an ERMS inbound E-Mail is not found in the agent inbox
    1866138
    VM_STACK_TRACE dumps in CRM
    1621119
    Dump DYNPRO_NOT_FOUND in SAPLBUSS in module PBO_START_SUBSCREEN when using transaction BP
    1637445CRM Web UI with Interaction Center business role hangs after logon
    1778276Short Dump occurs in CF_ASIT_INTERNAL==============CP when opening the Change History assignment block in an Opportunity
    Transaction launcher trouble shooting and how to identify if the problem is related to ITS or transaction launcher itself?
    1866327How to identify root cause of a session in SM04 when working with a CRM IC business role and steps for resolving in case of errors
    1881008How to debug CRM WebUI using Conditional Breakpoints
    Please note, in order to view the contents of the SAP KBAs, you will need to be logged into Service Marketplace.

    Related Content

    AprilMayJune
    Top 10 viewed KBAs for May 2014Top 10 viewed KBAs for June 2014


    Top 10 viewed SAP KBAs for June 2014

    $
    0
    0

    Purpose

    The purpose of this document is to provide a list of the top ten most viewed SAP Knowledge Base Articles for Customer Relationship Management in the month of June 2014.

    Overview

    Below are the top 10 most viewed SAP KBAs for CRM.
    KBA NumberKBA Title
    How to analyze problems related to session loss or logoff in CRM WebUI
    How to analyze why an ERMS inbound E-Mail is not found in the agent inbox
    1866138
    VM_STACK_TRACE dumps in CRM
    1906933
    The ASSERT condition was violated
    1881008
    "The current application triggered a termination with a short dump" in CRM SMQ1
    1621119Dump DYNPRO_NOT_FOUND in SAPLBUSS in module PBO_START_SUBSCREEN when using transaction BP
    1615938BSP Exception CX_BSP_INV_ATTR_NAME because of a missing attribute
    The ASSERT condition was violated
    1877395Transaction launcher trouble shooting and how to identify if the problem is related to ITS or transaction launcher itself?
    1907175Partner Re-determination is not working
    Please note, in order to view the contents of the SAP KBAs, you will need to be logged into Service Marketplace.

    Related Content

    MayJuneJuly
    Top 10 viewed KBAs for June 2014Top 10 viewed KBAs for July 2014

    Top 10 viewed SAP KBAs for July 2014

    $
    0
    0

    Purpose

    The purpose of this document is to provide a list of the top ten most viewed SAP Knowledge Base Articles for Customer Relationship Management in the month of July 2014.

    Overview

    Below are the top 10 most viewed SAP KBAs for CRM.
    KBA NumberKBA Title
    How to analyse problems related to session loss or logoff in CRM WebUI
    VM_STACK_TRACE dumps in CRM
    The ASSERT condition was violated
    1846041
    How to analyze why an ERMS inbound E-Mail is not found in the agent inbox
    1866327
    CRM IC: How to identify the source of sessions when working with CRM IC business roles and steps for resolving in case of errors
    1840776Launch SAP GUI Transaction from WebClient UI does not work as expected
    1960627
    Inbound qRFC Error/unwanted BDoc's on Solution Manager System
    1853316The ASSERT condition was violated
    1621119
    Dump DYNPRO_NOT_FOUND in SAPLBUSS in module PBO_START_SUBSCREEN when using transaction BP
    1881008
    "The current application triggered a termination with a short dump" in CRM SMQ1
    Please note, in order to view the contents of the SAP KBAs, you will need to be logged into Service Marketplace.

    Related Content

    JuneJulyAugust   

    Top 10 viewed KBAs for June 2014

    Top 10 viewed KBAs for July 2014Top 10 viewed KBAs for August 2014

    Featured Content for CRM

    $
    0
    0

    Attention all CRM Space users/moderators!

    Our goal as CRM moderators/space editors is to provide the CRM space with the opportunity for the community to be heard and to learn.

    Here are a few added  “Rules of Engagement”  for the CRM Space:

     

    1)      All content in CRM space or wiki by SAP or others must be reviewed by a CRM team of moderators


    2)      It is proper to announce a new wiki page of valueable  formatted content but must follow a standard blog format:
         a.      Title 
         b.      Why it is important to the CRM community
         c.      The “Problem” that the content is solving
         d.      Invite community to view and rate

    3)      All new CRM moderators must be approved with other CRM space moderators and be trained

     


    4)     All moderators must allow the CRM moderators to evaluate discussions, blogs…etc.,  first.  If moderators identify issue or concerns can lock but never delete or hide and work with CRM moderators in determining “abuse”.   As an example:  All simple questions/discussions should be locked not hidden or deleted

     

    5)      CRM moderators will keep track of abuses by name


    6)      When a CRM moderator is evaluating a blog or discussion they must alert other moderators that they are working on approval via “abuse notes” – “All other moderators must respect the time and effort of the moderator working on that blog or discussion”

     

    7)      If a moderator doesn’t follow the rules of engagement in the CRM space they will be notified via email to clear-up any misunderstanding –“one-on-one”.

     

    8)      We will feature on the CRM main page the rules of engagement and any addendum which follows.

     

     

    Thank you!

     

    Sincerely,


    Anne Fish, Stephen Johannes, Leon Limson, Andrei Vishnevsky, Mayoo Yogalingam, Hasan Zubairi

    eLearning CRM Testdrive on HANA Business Processes

    $
    0
    0

    This eLearning contains a business process eLearning and teaching the business processes possible. Run this e-learning in concurrent mode allow you even to click step by step live in your trial system. For the crm on hana trial system please follow try.saphana.com/crm.

    View this Demo

    eLearning CRM Testdrive on HANA Technical Setup

    $
    0
    0

    This eLearning contains a business process eLearning and teaching the technical setup you need to perform to get your appliance instatiated and what you need to do before first login to CRM on HANA free trial. Run this e-learning in concurrent mode allow you even to click step by step live. For the crm on hana trial system please follow try.saphana.com/crm.

    View this Demo

    Create word attachment which consumes external web service

    $
    0
    0


    In these two documents below, I have demonstrated the steps how to create word or pdf document as attachments which could consume web service created via CRM web service tool.


    Create Webservice enabled Adobe PDF attachment in CRM Application

    Create Webservice enabled word document in attachment assignment block


    As we could find in document template creation UI, there is a third option which allows us to assign a WSDL URL of an external webservice to a document template. So this document will explain how to create a word template which could consume your own web service, instead of the one created via CRM web service tool.

    clipboard1.png


    Ensure you have a working web service

     

    for simplicity I just create a simple function module which do the add operation and expose it into web service with tcode SOAMANAGER.

    clipboard2.png

    In order to consume it, An ABAP proxy is needed.

     

    Test the ABAP consumer proxy in ABAP workbench and make it work, since it will be used later:

    clipboard3.png

    clipboard4.png

    You could use this document as reference about how to expose a function module into web service via SOAMANAGER and the necessary configuration to consume it in ABAP.


    Create word template and assign your webservice WSDL to it


    In document creation UI, choose radio box "Own WSDL URL", paste your web service WSDL URL to input field and press entry key, then your web service operation will appear in dropdown list automatically. Choose your operation and click button "Start Designer".

     

    If you meet with 401 unauthorization error message after enter key is pressed, refer to this document about solution:

     

    How to resolve Unauthorized error message when defining external web service for document template

    clipboard5.png

    Now a new word document is opened. You could drag the output variable EV_RESULT from SAP Data panel to your word body area.

    Its content will be filled by your web service in the runtime. Finish the template development.

    clipboard6.png

    Implement BAdI to consume the web service

     

    Create a BAdI implementation via the customizing activity below:

    clipboard7.png

    You could refer to my implementation code below:

     

     

    DATA: lo_proxy            TYPE REF TO co_zweb_add_21,

                ls_input            TYPE zweb_add_operation,

                ls_output           TYPE zweb_add_operationresponse,

                lo_payload_protocol TYPE REF TO if_wsprotocol_payload,

                lo_payload          TYPE REF TO if_ws_payload,

                lo_payload_handler  TYPE REF TO if_ws_payload_handler,

                lt_request_data     TYPE prx_t_param,

                ls_request_data     TYPE prx_s_param,

                lv_valid_from       TYPE comt_valid_from.

     

     

     

    line 17: Create an instance of ABAP consumer proxy class.

     

    line 21: The current business object instance GUID is included in importing parameter IS_OBJECT-INSTID.

    Since my word template is created based on BOR type BUS1178, so I could directly query product database table COMM_PRODUCT to

    find the corresponding product record.

     

    line 24 ~ 27: I just fetch the valid from timestamp of current product and pass the date value to the first importing parameter of web service call. The second importing parameter is assigned with 0, so in the final word document we will see the valid from date of current product.

     

    line 28: execute web service call, the result is included in parameter ls_output.

     

    line 38 and 39: pass out the web service response payload to changing parameter, which will be used by Office integration framework to merge with word template.

    clipboard8.png

    Test in UI

     

    Now you could create attachment based on your word template by clicking button "With Template". Choose the word template you have just developed from pop up window:

    clipboard9.png

    you could still set breakpoint in your BAdI implementation and the function module exposed as web service to observe how they are consumed in the runtime:

    clipboard10.png

    clipboard11.png

    Finally the web service calculation result is displayed in the word document.

    clipboard12.png

    Further reading


    If you would like to know how a word template is merged with data from xml file, you can find technical detail in this document Understand how the word template is merged with xml data stream .

    Understand how the word template is merged with xml data stream - part 2 - table structure

    $
    0
    0

    In this example, it is described how the data in xml stream with table structure is merged into word template:

    clipboard1.png

    The word looks like below after merge:

    clipboard2.png

    You should have gone through Understand how the word template is merged with xml data stream - part 1 - Simple structurebefore you start with table merge.


    You could find the template and xml data file used in this example from attachment.


    Merge step1 cl_crm_oi_docx_helper=>replace_vars_uuid_with_path

     

    The same as the step in simple structure merge.

     

    Merge step2 add necessary namespace to every node in xml

     

    The same as the step in simple structure merge.

     

    Merge step3 cl_crm_oi_docx_transform_rt=>transform

     

    the formatted template source( uuid replaced with complete path ) and formatted xml data source( n0 namespace added ) are passed into this method.

     

    step3.1 cl_crm_oi_docx_transform_rt=>indicate_tree

     

    The xml node is further enriched with attribute Loopcount and Path, which are especially used for render data with table structure.

     

    See how the xml source looks like after method call:

     

    clipboard3.png

    • New attribute Path is added for each node.
    • Loopcount: total number of nodes which have the same name as current node
    • Loopid: index of current node

     

    step3.2 cl_crm_oi_docx_transform_rt=>update_payload_from_addinsch

     

    This method will create a new attribute sapvartype with value "T" for those node in xml source with table structure:

    clipboard4.png

    step3.3 recursively call cl_crm_oi_docx_transform_rt=>process_node_cc


    clipboard5.png

    We identify the current node ( n0:Z_JENS_GET_MORE_COMPLEXResponse/n0:ET_ORDER/ ) is a table node by querying attribute sapvartype with value "T":

    clipboard6.png

    And we know from the attribute Loopcount added in step3.1 that currently there are two Item nodes in xml, which means we need to dynamically generate two new rows in the word template to display the table data contained in xml. We can achieve this by cloning the existing row in the word template which contains the mapping information.

    clipboard7.png

    the cloning is done in this method:

    clipboard8.png

    clipboard9.png

    Have a look at the word template source code after method call:

    clipboard10.png

    w:sdt node for table header display:

    clipboard11.png

    w:tr ( the first cloned node ):

    clipboard12.png

    w:tr ( the second cloned node ):

    clipboard13.png

    Now the placeholder for table data display is available in word template source. A recursive call is made with iv_node_intable = X to fill cloned table row in word template with table data in xml data file.

    clipboard14.png

    The left stuff is the same as the step for simple structure:

     

    1. get the dom element node which is to be filled by each table structure field in xml data file:

    clipboard15.png

    2. call set_content_control_value to set the value 0005012366 of node OBJECT_ID in xml data file to the dom element node from the first cloned table row ( lv_loopid_tr = @1 ).

    clipboard16.png

    Open the final merged word document:

    clipboard17.png

    You should find from document source code that all table row fields whose data are filled from xml data file have a new attribute saprtvalue with value X.

    clipboard18.png


    Understand how the word template is merged with xml data stream - part 1 - simple structure

    $
    0
    0


    This document is used for consultant or developers at customer side who would like to know technical detail about how a word template is merged with xml data stream. Before you touch the related ABAP code about document merging, it is good to get some basic understandong about how ABAP manipulates word document in this document Manipulate Docx document with ABAP .


    In the document Create Webservice enabled word document in attachment assignment block, it is described how to create a word template and feed its content with web service generated via web service tool in CRM Webclient UI. Besides that you could also use your own web service, for example you can expose your function module in ABAP backend via SOAMANAGER. The detailed step could be found in this document.


    In consulting note 2048272, an ABAP report is provided to allow you to merge the word template with given xml data without Webclient UI:

    clipboard1.png

    If you meet with issue that the merged word document does not work as you expected, for example some fields are empty however the corresponding node in xml do have data filled, then you can use this ABAP report to do trouble shooting. You could get the word template and  xml data file for web service response by following consulting note 2047259.

     

    In this document, I will show you how the element "Partner" in word template is merged with the value from xml node SOLD_TO.PARTNER in the runtime. You could find the template "zpartner.docx" and xml data file "response.xml" used in this example from document attachment.

    clipboard2.png

    Explore the word template to identify binding information

     

    From the above screenshot, we click on Partner field and the tooltip shows this element is bound to field PARTNER. How is this mapping relationship maintained within word template?

     

    Rename zparetner.docx to zpartner.zip, double click on the zip file, double click subfolder "word", then double click on "document.xml":

     

    You should find a w:t node with PARTNER, and a w:tag node with attribute "w:val", whose value is 0050569457471ED488F2038D1D8360BE.

     

    The w:t node contains the text which end user sees in the word template, and w:val maintains the mapping relationship to xml schema.

    clipboard3.png

    Now go back to zpartner.zip, click on customXml folder and double click "item1.xml". Search xml file by value "0050569457471ED488F2038D1D8360BE". One result found, and we could know the complete binding path is Z_JENS_GET_MORE_COMPLEXResponse.ES_C5064266.SOLD_TO.PARTNER.

    clipboard4.png

    Merge step1 cl_crm_oi_docx_helper=>replace_vars_uuid_with_path

     

    In this step, the original uuid in document.xml is replaced by the complete path of bound xml node:

    clipboard5.png

    Merge step2 add necessary namespace to every node in xml

     

    It is done via transformation call:

     

    CALL TRANSFORMATION crm_office_int_rt_add_ns

            SOURCE XML lv_response

            RESULT XML lv_response_ns.

     

    Notice the no namespace added for each node after transformation call:

    clipboard6.png

    Merge step3 cl_crm_oi_docx_transform_rt=>transform

     

    the formatted template source( uuid replaced with complete path ) and formatted xml data source( n0 namespace added ) are passed into this method.

     

    step3.1 cl_crm_oi_docx_transform_rt=>indicate_tree

     

    The xml node is further enriched with attribute Loopcount and Path, which are especially used for render data with table structure. ( template merged with table data will be discussed in another document )

    clipboard7.png

    step3.2 cl_crm_oi_docx_transform_rt=>update_payload_from_addinsch

     

    This method will create a new attribute sapvartype with value "T" for those node in xml source with table structure, not relevant for current example.

    clipboard8.png

    step3.3 recursively call cl_crm_oi_docx_transform_rt=>process_node_cc

     

    node: dom element of root node "Z_JENS_GET_MORE_COMPLEXResponse" in xml.

    clipboard9.png

    clipboard10.png

    Now we have reached the first leaf node in xml, "CLIENT". Pay attention to the recursive callstack.

    clipboard11.png

    since we don't bind CLIENT node in xml to our template, after method get_contentcontrol_node_bypath, lt_node_ref_word will remain empty so we quit from the current traverse and try with next node.

    clipboard12.png

    Soon we reach the method get_contentcontrol_node_bypath again, and since our template consumes the node PARTNER, it is ready to feed the template with the value contained in this xml node.

    clipboard13.png

    The sold to partner id "0000419333" will be set to the corresponding dom element node "lr_node_word" by the method below.

    clipboard14.png

    in the beginning of this document we know it is the content of w:t node which will be displayed to end user so first we have to locate those w:t nodes via filtering ( w:t node found and stored in variable node_text ) and finally fill value to them by method fill_text_node, and that's all.

    clipboard15.png

    final merged document:

    clipboard16.png

    And you could find the w:t node contains the correct value from document source code:

    clipboard17.png

    Next reading


    Understand how the word template is merged with xml data stream - part 2 - table structure

    Example of Customizing Sales Organization in SAP Sales Manager 2.5

    $
    0
    0

    SAP Sales Manager connects mobile employees with the data stored in an SAP system so they can better manage the various pieces of the sales processes. SAP Sales Manager extends the SAP CRM functionality to sales professionals in the field, using mobile technology to eliminate paperwork. This document is a sample reference to change the out-of-the-box behavior of the Responsible Organization unit assignment for transactions created/updated from the mobile device.

    View this SAP How-to Guide

    Attachment multiple upload

    $
    0
    0

    Recently several customers have asked for multiple attachment upload functionality in CRM. As current UI component GS_CM does not support this, I have built a simple prototype to achieve it. Although the UI does not look so good, it could fundamentally support multiple attachment upload at the same time.

     

    How does this prototype looks like

     

    I have created a new button in UI component GS_CM:

    clipboard1.png

    Once clicked, there will be a new popup:

    clipboard2.png

    Click button "Choose Files", and you can select multiple files from your local disk using Ctrl key:

    clipboard3.png

    once done, it will shows 4 files are selected with each file name:

    clipboard4.png

    Click "Upload" button and wait for a while, the successful upload information is displayed:

    clipboard5.png

    And the four files just uploaded are now displayed in Attachment assignment block.

    clipboard6.png

    How does the prototype work

     

    The major steps to finish this prototype are listed below.

     

    1. Enhance UI component view GS_CM/DocList

     

    Create a new event handler EH_ON_MULTIPLEUPLOAD.

    clipboard7.png

    METHOD eh_on_multipleupload.    DATA: lr_popup    TYPE REF TO if_bsp_wd_popup.    DATA: lv_product_guid TYPE string.    lv_product_guid = me->typed_context->cmbusobj->collection_wrapper->get_current( )->get_property_as_string( 'INSTID' ).    cl_zupload_main_impl=>product_guid = lv_product_guid.    lr_popup = me->comp_controller->window_manager->create_popup(  iv_interface_view_name = 'ZUPLOAD/MainWindow'                                                                   iv_usage_name          = 'ZUPLOAD'                                                                   iv_title               = 'Multiple Upload' ).    lr_popup->set_display_mode( if_bsp_wd_popup=>c_display_mode_plain ).    lr_popup->set_window_width( 700 ).    lr_popup->set_window_height( 700 ).    lr_popup->open( ).  ENDMETHOD.

    1. in Event handler implementation, it is necessary to pass the guid of current product to the multiple file upload popup view. The offical way to pass this argument is via contenxt node binding. Since this is a prototype, I just achieve this by storing the product guid to a static attribute ( cl_zupload_main_impl=>product_guid ) of popup view controller.

     

    2. UI component view ZUPLOAD/MainWindow contains the major logic to support multiple upload, which we will create later.

     

    Create a new button in GS_CM/DocList

     

    Append the following code to method CL_GS_CM_DOCLIST_IMPL~FILL_BUTTONS:

     

    * MULTIPLE UPLOAD ENHANCEMENT - BEGIN

     

    * Separator

      CLEAR ls_button.

      ls_button-type     = cl_thtmlb_util=>gc_separator.

      APPEND ls_button TO gt_button.

      CLEAR ls_button.

      ls_button-id       = 'newMultiple'.                   "#EC NOTEXT

      ls_button-type     = cl_thtmlb_util=>gc_icon_new.

      ls_button-text     = 'Multiple upload'.

      ls_button-on_click = 'multipleUpload'.                   "#EC NOTEXT

      ls_button-enabled  = lv_enabled.

      APPEND ls_button TO gt_button.

    * MULTIPLE UPLOAD ENHANCEMENT - End

     

    Add component usage to ZUPLOAD.

     

    Since now component ZUPLOAD does not exist, you can do this step later when you have finished the component creation.

    clipboard8.png

    2. Create new UI component ZUPLOAD.

     

    Create a new UI component ZUPLOAD and a new view, paste the source code from document attachment "ZUPLOAD_main.html" to the view.

    clipboard9.png

    Brief explanation on the design of ZUPLOAD/main.htm

     

    2.1 a control to support multiple file selection

     

     

    We enable multiple file selection by using control input with attribute "multiple" equals to true. For more detail about this, please google with keyword "html5 fileupload multiple". For sure if you need to use this multiple upload functionality, you must use a browser which supports this html5 tag attribute, like Chrome.

     

    clipboard10.png

    line 106: onchange="printFiles(this.files)": once files are selected, this function is called to display the name of chosen files.

    line 108: onclick="my_upload(<%= lv_uuid %>);": once clicked, this function will submit the file upload request to ABAP server

     

    2.2 populate the url to be sent to ABAP server

    clipboard11.png

    currently I hard code the url in Javascript code in line 34. the path "/sap/crm/file_upload" actually represents an ICF node, which we will create in next step. The product uuid passed from Product overview page is appended to the url.

     

    2.3 submit file upload request via HTTP Post

    clipboard12.png

    The request is submitted via Javascript built-in object XMLHttpRequest.

     

    3. Create and implement SICF node

     

    After the HTTP post is sent to ABAP server, the SICF node will actually pick up this request and create attachment accordingly.

     

    Create a new ICF node under path /default_host/sap/crm:

    clipboard13.png


    Currently I just hard code the BOR type BUS1178 for product in the implementation, feel free to change it to other BOR type if necessary.

    clipboard14.png

    Activate SICF node and now this prototype is ready to use.

     

    Useful tools during my development of this prototype

     

    1. Chrome F12 development tool

     

    I use the tab Network to monitor whether the multipart/form-data request assembled in my Javascript is correct.

    clipboard15.png

    2. Winhex

     

    I need to ensure the binary content of my local file and the content sent via Javascript and received in ABAP server are exactly the same. For non-text files I could not directly view their binary content in Chrome development tools, so I use Winhex.

    clipboard16.png

    clipboard17.png

    Limitations of this prototype

     

    1. currently the HTTP post url for file upload is hard coded in Javascript code. This could be changed that the url containing host name and port number is populated in ABAP instead.

     

    2. currently after the multiple upload popup is closed, the attachment assignment block is not automatically refreshed. We need to navigate to other UIs and back in order to see the latest uploaded files through this prototype.

     

    3. existing feature like Authorization Scope is not integrated in this prototype. ( this is technically feasible and not difficult ).

     

    4. the UI look-and-feel is not so consistent with SAP CRM UI.

     

    I will continually improve on this prototype if allows.

    Top 10 viewed SAP KBAs for August 2014

    $
    0
    0

    Purpose

    The purpose of this document is to provide a list of the top ten most viewed SAP Knowledge Base Articles for Customer Relationship Management in the month of August 2014.

    Overview

    Below are the top 10 most viewed SAP KBAs for CRM.
    KBA NumberKBA Title
    How to analyse problems related to session loss or logoff in CRM WebUI
    How to analyze why an ERMS inbound E-Mail is not found in the agent inbox
    The ASSERT condition was violated
    1866138
    VM_STACK_TRACE dumps in CRM
    1981438
    Function ITL_NF_NUMBER_CONDENSE (COM_BRAZIL_NF_UTILITY 01) does not fit into the existing function group ((NF_UTILITY 03))
    1954574Problems with CRM IC Functionalities related to Communication Session (alerts, greyed out ready/not ready buttons, agent dashboard) in complex system landscapes
    1840776
    Launch SAP GUI Transaction from WebClient UI does not work as expected
    1877395Transaction launcher trouble shooting and how to identify if the problem is related to ITS or transaction launcher itself?
    1801284SOLMAN_WORKCENTER abends
    1866327
    CRM IC: How to identify the source of sessions when working with CRM IC business roles and steps for resolving in case of errors
    Please note, in order to view the contents of the SAP KBAs, you will need to be logged into Service Marketplace.

    Related Content

    JulyAugustSeptember   

    Top 10 viewed KBAs for July 2014

    Top 10 viewed KBAs for August 2014Top 10 viewed KBAs for September 2014

    Step by step to archive IBASE with archive object CRM_IBASE

    $
    0
    0


    There is one IBASE 112467 which contains one object component. This IBASE is intended for archive.clipboard1.png

    There are two approaches to archive it.

     

    1. You could use tcode SARA and type "CRM_IBASE" as archive object, and press the buttons "Preproc", "Write" and "Delete" one by one to go through the archive process.

    clipboard2.png

    2. You could also manually run report for each of the three process one by one. You could find the report name for each step via tcode AOBJ:

    clipboard3.png

    The overview introduction about IBASE archive could be found in sap help.

    Step1: pre-process step

     

    run report RIBARCHV and specify IBASE ID = 112467, and got the error message saying nothing could be archivable.

    clipboard4.png

    The reason is because you run pre-processing report, the IBASE must be marked with a deletion flag. You could set the flag via tcode IB52, Installation->Functions->Deletion flag->Set:

        clipboard5.png

    Once done, a new status key DLFL is set.

    clipboard6.png

    Re-run pre-processing report, and get the successful message like below, saying one record could be archived,

    clipboard7.png

    And the pre-processing report set additional status value to the IBASE as displayed below:

    clipboard8.png

    After pre-processing is done, the IBASE is not allowed for further change any more:

    clipboard9.png

    Step2: write step

     

    In this step, the transaction data belonging to current IBASE are written to archive file via function modules below:

     

    • ARCHIVE_NEW_OBJECT
    • IBASE_ARCHIVE_OBJECT
    • ARCHIVE_SAVE_OBJECT

     

    After executing report RIBARCHA with productive mode, it will display how many entries in each transparent table are archived.

    clipboard10.png

    Till now we have not executed the delete report yet, so those entries are stilled not removed from transparent table.

     

    You could click button "Management" in tcode SARA to review the current progress so far.

     

    We get a yellow light, since the whole archive process is not finished yet.

    clipboard11.png

    Double click on the yellow light and we could get the physical file path where the archive file is stored in OS:

    clipboard12.png

    Step3: delete step

     

    In this step, the related table entries would be removed from transparent tables.

     

    Execute the delete report and you could observe the deletion operation on IBASE data with tcode ST05:

    clipboard13.png

    Once done, go back to check in tcode SARA, now the whole archive process is done, we get green light now.


    clipboard14.png   

    The archived IBASE could not be found in system any more:

    clipboard15.png   

    The object ZJERRY_TEST contained in the object component still exists in the system.

    Viewing all 252 articles
    Browse latest View live


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