Ansicht
Dokumentation

CRM_DAM_CONTAINER - BAdI: Activate Container

CRM_DAM_CONTAINER - BAdI: Activate Container

SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up   TXBHW - Original Tax Base Amount in Local Currency  
This documentation is copyright by SAP AG.
SAP E-Book

If you implement the BAdI with the example code, you, as a user, can order digital assets in CD- or DVD form.

Roles in the System

In the CRM system, you have

  • A user
  • An assignment to the SAP_PCC_MARKETING_ASSISTANT role so that you can navigate in the portal
  • Development authorization (authorization object S_DEVELOP).
  • A development key

Check your settings in User Maintenance.

To access the portal, you require a portal user

Authorizations

To make full use of the implemented BAdI with the example code, the user still requires authorizations, which you maintain in Role Maintenance.

Authorization Object DAM_ASSET

You are authorized to see and download existing digital assets. For further information, see Role Maintenance.

Authorization Object DAM_ASSACC

You are additionally authorized to write CD/DVDs:

DAM_ACCWAY = ZCDBURN; ZDVDBURN

Authorization Object B_USERSTAT

If you have implemented the BAdI Container, you require a second authorization for the authorization object B_USERSTAT:

Assign the following values to the following fields:

  • Activity (ACTVT) = 01 (= Create and generate)
  • BERSL = '' (= Authorization key; can stay blank)
  • OBTYP = COH (= Object type, is used in the default system and we recommend that you use it)
  • STSMA = CRMORDER (= Status profile, is determined by the transaction type OCD, which you create for the example process Order CD/DVD. For more information, see Define Transaction Types. You can, however, also use a different status profile.)

Authorization Object B_BUPA_RLT

This lets you read the example address of the business partner assigned to the logged-on user. In the ordering process for CDs and DVDs, the address of the business partner is determined and is used as an example ship-to address. This address proposal appears to the portal user in a form, and he or she can make changes to it. To be able to read the example address for the business partner, for example, to order CDs and DVDs, the user requires the following authorizations:

  • ACTVT = 03 (Display)
  • RLTYP (BDT: Object part) = ''

Authorization Object CRM_ORD_LP

This checks which organizational levels are relevant for execution by the user, with reference to the business transactions that have been created in the system:

The user requires the following authorizations:

  • ACTVT = 01
  • CHECK_LEV = '' (Choose your own value)
  • PR_TYPE = OCD

Authorization Object CRM_ORD_OE

This checks which distribution levels the user can execute business transactions with. The user requires the following authorizations:

  • ACTVT = 01
  • DIS_CHANNE = ''
  • SALES_GROU = ''
  • SALES_OFFI = ''
  • SALES_ORG = ''
  • SERVICE_OR = ''

Authorization Object CRM_ORD_PR

This defines executable business transaction categories. The user requires the following authorizations:

  • ACTVT = 01
  • PR_TYPE = OCD

Authorization Object CRM_SAO

To check whether the user can create business transactions, he or she requires the following authorizations:

  • ACTVT = 45

Finally, check your settings by using Display Authorization Data.

Customizing

You have made the following settings in Customizing:

  • Write CD (C)

  • Write DVD (D)

  • Additionally, set the flag so that an order is created.

  • In the Shipping Condition column, enter the corresponding shipping condition.

  • Write CD (ZCDBURN)

  • Write DVD (ZDVDBURN)

Under Define Partner Determination Procedure, you have copied a partner determination procedure and have made the following changes:

  • Copy partner determination procedure 00000027 "Interaction Center Sales" into procedure ZDAMCD and description "CRMDAM: Write CD/DVD". You can also use another name.

  • Copy all entries:

Procedure: ZDAMCD
Description: CRMDAM: Write CD/DVD
Determination procedure log:
Permitted functions: Default (all defined partner functions)
Note:
While an order is being created in the BAdI write process, a DAM-specific partner determination procedure is used, which is adjusted in new transaction type ZOCD.
  • Adjust only the Minimum column with the following values:

Function > Minimum
00000001Sold-to-Party (CRM) > 0
00000002Ship-to-Party (CRM) > 1
00000003Bill-To-Party (CRM) > 0
00000004Payer (CRM) > 0
000000 14 Employee Responsible (CRM) > 0
00000015 Contact Person (CRM) > 0
ICAAGENT Interaction Center Agent (CRM) > 1
ICENTER Ex. Interaction Center (CRM) > 0
To do this, copy the transaction type TSA (Telesales) into the new transaction type ZOCD and use ZDAMCD as the partner determination procedure.
  • Parameter CONT_EMAIL_CHANNEL: The name of the e-mail channel configured in the portal.

You require the e-mail channel to send the e-mail notification. In this e-mail channel, you specify the connected e-mail server.
Also enter this value in the portal under System Administration > System Configuration > Knowledge Management > Content Management > Utilities > Channels. If the system does not find a valid channel, it uses the default channel INTERNET. If this is also unavailable, the system uses the default channel EMAIL.
  • Parameter CONT_EMAIL_SENDER: The address of the sender for e-mail notification

Typically, a "NoReply" address is assigned here.
  • Parameter CONT_EMAIL_STYLE: Optional XSL format template for e-mail notifications.

If you want to use another format template, you can specify the storage location for the format template here. The storage location must be an address within KM, for example, /documents.
  • Parameter CONT_MAX_FNAME_LEN: The maximum length of the file name if a file is renamed.

You can use this function to assign a deviating file name for the digital asset. If the generated file name is longer than the value specified here, the system issues a warning. You can nevertheless generate longer file names.
Parameter value, for example, 20
  • Parameter CONT_MAX_NO_ASSETS: The maximum number of digital assets in the container

To optimize performance when displaying the container, you can specify the maximum permissible number of digital assets in the container here.
Parameter value, for example, 50
  • Parameter CONT_REPOS_CONTAINER: Repository for saving the container

The system saves all containers in this repository that had not been downloaded when logging off from the system or after a session time-out. In the standard system, the 'damcontainer' repository is delivered. If you use another repository, you can enter its name here.
If you set a different value to the damcontainer value delivered, you must also create this value in the portal DAM Repository Manager.
Default value: damcontainer
  • Parameter CONT_REPOS_CONTAINER: Repository for saving synchronous downloads

All synchronous downloads are kept in readiness in this repository for a certain time. In the standard system, the 'damdownload' repository is delivered. If you use another repository, you can enter its name here. The maximum storage time is specified in the portal in the Scheduler task "DAM Reorganization of Download Repository". The default storage time is 2 days.
If you set a different value to the damdownload value delivered, you must also create this value in the portal DAM Repository Manager.
Default value: damdownload
  • Parameter CONT_TOC_STYLE: The optional XSL format template for the table of contents

Each zipped file in the container contains an HTML file with a table of contents. If you want to use a different representation of this table of contents, you can specify the storage location for the format template here. The storage location must be an address within KM, for example, /documents.
  • Parameter CONT_REPOS_DVD: Repository for saving CD/DVD downloads

All download ZIP files for CD/DVD production are saved in this repository. As a default, the damdownload repository is delivered and created. If you use a different repository, you can enter the repository name here.
  • Parameter CONT_MAX_CD_COPIES: The maximum number of CD copies

You can use this value to set the maximum number of CDs that can be ordered. Any greater values are rejected in the container.
Default value: 5
  • Parameter CONT_MAX_DVD_COPIES: The maximum number of DVD copies

You can use this value to set the maximum number of DVDs that can be ordered. Any greater values are rejected in the container.
Default value: 5
  • Parameter CONT_DISCLABEL_STYLE: Optional XSL style sheet for the DiscLabel XML file

Each container CD/DVD download file contains an XML file with the DiscLabel. If you want to use a different format for this XML file from the format template delivered, you can specify the storage location of the format template here. The storage location must be an address within KM, for example, /documents.
  • CD-/DVD Writer
In Table View Maintenance, you can specify the available CD-/DVD writers for CD/DVD production in table CRMC_DAMBADIEXT. You can then select these in the container.

Create Business Partner

To be able to order CDs and DVDs, you must assign the business partner addresses to your CRM user. Pay attention to the following points:

  • Maintain the ship-to party address.

Maintain the business partner addresses from two viewpoints:

  • As a single person: Here the business partner is a single person and the address is person-specific.
  • Business partner type Person

  • Name field: Person-specific

  • Mandatory field names: Family Name, First Name: Mandatory for personalized users

  • Address fields: Person-specific, originates from business partner of type Person

  • Mandatory address fields: Country and Time Zone

  • Organization-specific fields: Absent

  • Relationships: None

  • Ship-to party address: Ship-to party address selected as the default address in the address overview page used in orders. However, the user can change this so that the CD/DVD is delivered to another address.

  • As a contact person: Here, the business partner is a person with the relationship Is Contact Person For for an organization. Some personal data is used, such as first name and family name. Other data, such as address data, is drawn from the assigned organization.
So, if you use the example process to create an order, the system uses the business partner with organization type for the partner with the function ship-to party. The business partner with type Person is assigned to the order as a second partner with the function contact person.
  • Business partner: Type Person and type Organization

  • Name field:,,Person-specific

  • Mandatory field names: Family Name, First Name: Mandatory for personalized users

  • Address fields:,, Organization-specific, originates from business partner of type Organization

  • Mandatory address fields: Country and Time Zone

  • Organization-specific fields: Present - Company name

Relationships: Is contact person in business partner of type Person

  • Ship-to party address: Only the address of the business partner of type Organization matching the ship-to party address. However, the user can change this so that the CD/DVD is delivered to another address.

Anonymous User

If you want to enable anonymous users to order CDs and DVDs, pay attention to the following steps:

  1. Create a dummy CRM user and a dummy business partner
  2. Assign both to the Internet User business partner role
  3. Maintain only the Country and Time Zone fields

You can leave all other fields blank. However, if, for example, a large number of customers come from Paris, you can preassign Paris to the City address field.

Index Service User

For the CD/DVD order process there is the transaction type 'CD/DVD Order'. Use partner determination to assign the employee responsible to this transaction type. For DAM, this is the user INDEX_SERVIC.

In the standard system, the name of the Index Service user is INDEX_SERVIC default and is specified in Customizing. For more information, see the Implementation Guide at Customer Relationship Management -> Marketing -> Digital Asset Management -> Maintain General Settings in DAM.

After you have called the IMG activity, proceed as follows:

  1. In the following dialog box, enter in the field "Implementation" a name for the BAdI implementation and choose Copy.
If implementations have already been created for the BAdI, a dialog box with the existing implementations will be displayed. In this dialog box, choose Create.
  1. In the corresponding field, enter a short text for implementation .
  2. In the tab Propertiesenter filter properties - if this is a filter-dependent BAdI.
  3. Choose the tab Interface.
The name of the implementing class is generated by the system based on the name of your impmlementation. You can change the name.
If the BAdI is a menu exit, the tab FCodes also appears.Enter a function here and, if necessary, additional data.
  1. Save your entries and assign a package.
  2. Position the cursor on a method. Call up the Class Builder by double-clicking it.
  3. Between the statements method <Interface-Name>~<Name of Method>. and endmethod, enter the coding you request for the implementation.
  4. Save and activate your coding, and navigate back to the screen Change Implementation.
  5. Save on the screen Change Implementation.
Note: You can first create an implementation for the BAdI and then activate this later on. In this case, close the processing function at this time.
  1. Choose Activate.
When the application program is executed, the coding you have created will be run.

Pay attention to the following points:

In method IF_EX_CRM_DAM_CONTAINER_BADI~CONTAINER_BADI_FIRST_CALL, check in the Interface tab page whether the following coding lines are between method and endmethod:

* Digital Asset Management Container BADI, first call

* Example for usage of this BADI: ...

Check methods CONTAINER_BADI_SECOND_CALL and CONTAINER_BADI_THIRD_CALL in the same way. In coding, the text then changes from ..., first call to ... , second call or ... , third call.

BAdI Testing

After implementation of the BAdI, test whether all additional functionalities are available to you and perform the following steps:

  1. Search for digital assets and add a selection of them to your container
  2. Navigate to the container and check whether all the required digital assets have been displayed.
  3. Choose Order CD/DVD and choose a CD/DVD writer in the follow-on screen
  4. Assign a title to the CD, and choose the disk type and CD-/DVD writer
  5. In the screen that follows, you see your address data and can change it if necessary
  6. When you have finished making your changes, all your input is displayed again You can also change your data here
  7. Then a ZIP file is generated in the system and the write process is triggered.
  8. In the backend system, call the Business Transaction Search and select the Ship-To Party partner function to find the business partner by their CRM user.
  9. Here you should see the order you just created
  10. Open the order and check the following data
  • The order status is Open

  • The Created By field contains the Index Service user.

  • Your ship-to address and your business partner have been added to the Ship-To Party partner function. The Index Service user has been added to the Employee Responsible partner function

  • Under documents, you find:

- A ZIP file with the ordered digital assets
- Links to each digital asset
  • Under Shipping, you see the shipping conditions you specified in the write process: C = CD-R or D = DVD-R.






rdisp/max_wprun_time - Maximum work process run time   SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up  
This documentation is copyright by SAP AG.

Length: 23702 Date: 20240606 Time: 153941     sap01-206 ( 245 ms )