Vous êtes sur la page 1sur 33

CRN

Table of Contents
1he 1able names lor a C8M 1ransacLlon 2
LlsL Cf lrequenLly used C8M 1ables LlsL 3
Addlng Web u8L (llke googlecom yahoocom) ln C8M ul 3
Menambahkan buLLon dl asslgnmenL block 17
SLeps Lo creaLe navlgaLlonal llnk 18



Tbe Table Names For a CRM Transaction
These are some important tables in CRM :
- BUT000 : BP: General data - Contains Business Partner Number, Partner Category, Partner
Type, First Name, Last Name etc.
- BUT020 BP: Addresses
- BUT050 BP relationships/role deIinitions: General data - Contains Relationship, Partner
Number (PARTNER1), Relationship Category
- BUT051 BP Relationship: Contact Person Relationship Similar to
- BUT050 additionally contains Contact Person's Address data
- BUT0BK Business Partner: Bank Data & Details BP Number, Bank Key, Bank Country Key,
Bank Account Number
- BNKA Bank Master Data
- BUT100 BP: Roles
- ADR2 Telephone Numbers (Business Address Services)
- ADR6 SMTP Numbers (Business Address Services) - Contains Email Id oI the BP.
- ADRC Addresses (Business Address Services) - BP's Complete Address Details- City,
Country, Post Code, District,
Street, Title No Etc
- TSAD3T Table containing the Title text against a Title No.
- COMMPRODUCT Master Table Ior Product
- CRMMBUAG Master table Ior Business Agreement
- CRMMBUAGH Header Data Ior Business Agreement such as Tax Category, Tax
Characteristic, Form key, Business Agreement Class. Data in this table correspond to ISU
- CRMDOPPORTH OPPORTUNITY HEADER DATA
- CRMDORDERADMH Contains the Header InIormation Ior a Business Transaction.
Note:
1. It doesn't store the Business Partner responsible Ior the transaction. To get the Partner No, link
it with
CRMORDERINDEX.
2. This table can be used Ior search based on the Object Id(Business Transaction No).
- CRMDOPPORTH OPPORTUNITY HEADER DATA
- CRMDCUSTOMERH Additional Site Details at the Header Level oI a Business Transaction
- CRMCPROCTYPE Master table Business Transaction Type
- CRMCPARTNERFCT DeIinition oI Partner Functions
- SCPRIOT Priorities Ior Activities with priority text.
- CRMCPROCTYPET Text Ior a transaction type
- CRMCACTOBJT Objective Number and Text Ior Activities
- TJ30T All the status code and text
- CRMCPRASSIGN : Transaction Type and its Transaction Type Object.
- IBIB : Installed Base/Ibase
- IBIN : Installed Base Components `-- Pankaj

List Uf Frequently Used CRM Tables List

The list oI table is as under: You have to Iigure out the table according to your requirement.
None the less CRMDORDERADMH, CRMDORDERADMI will give you inIo about all
the transactions.
BUT000 : BP: General data - Contains Business Partner Number, Partner Category, Partner
Type, First Name, Last Name etc.
BUT020 : BP: Addresses
BUT050 : BP relationships/role deIinitions: General data - Contains Relationship, Partner
Number (PARTNER1), Relationship Category
BUT051 : BP Relationship: Contact Person Relationship Similar to
BUT050 : Additionally contains Contact Person's Address data
BUT0BK : Business Partner: Bank Data & Details BP Number, Bank Key, Bank Country Key,
Bank Account Number
BNKA : Bank Master Data
BUT100 : BP: Roles
ADR2 : Telephone Numbers (Business Address Services)
ADR6 : SMTP Numbers (Business Address Services) - Contains Email Id oI the BP.
ADRC : Addresses (Business Address Services) - BP's Complete Address Details- City,
Country, Post Code, District, Street, Title No Etc
TSAD3T : Table containing the Title text against a Title No.
COMMPRODUCT : Master Table Ior Product
CRMMBUAG : Master table Ior Business Agreement
CRMMBUAGH : Header Data Ior Business Agreement such as Tax Category, Tax
Characteristic, Form key, Business Agreement Class. Data in this table correspond to ISU
CRMDOPPORTH : OPPORTUNITY HEADER DATA
CRMDORDERADMH : Contains the Header InIormation Ior a Business Transaction.
Note:
1. It doesn't store the Business Partner responsible Ior the transaction. To get the Partner No, link
it with CRMORDERINDEX.
2. This table can be used Ior search based on the Object Id(Business Transaction No).
CRMDOPPORTH OPPORTUNITY HEADER DATA
CRMDCUSTOMERH Additional Site Details at the Header Level oI a Business
Transaction
CRMCPROCTYPE Master table Business Transaction Type
CRMCPARTNERFCT DeIinition oI Partner Functions
SCPRIOT Priorities Ior Activities with priority text.
CRMCPROCTYPET Text Ior a transaction type
CRMCACTOBJT Objective Number and Text Ior Activities
TJ30T All the status code and text
CRMCPRASSIGN : Transaction Type and its Transaction Type Object.
IBIB : Installed Base/Ibase
IBIN : Installed Base Components
Activities:
CRMDACTIVITYH Activity Header table
CRMDACTIVITYI Activity Reporting: Activity Line Item Extension
CRMDTMACTIVITY Activity reIerence
Lead:
CRMDLEADH Lead Header table
Opportunity:
CRMDOPPORTH Opportunity Header table
BUT000 : BP: General data
Contains Business Partner Number, Partner Category, Partner Type, First Name, Last Name etc.
BUT020 : BP: Addresses
BUT050 : BP relationships/role deIinitions: General data Contains Relationship, Partner Number
(PARTNER1), Relationship Category
BUT051 : BP Relationship: Contact Person Relationship Similar to BUT050, additionally
contains Contact Persons Address data
BUT0BK : Business Partner: Bank Data & Details BP Number, Bank Key, Bank Country Key,
Bank Account Number
BNKA : Bank Master Data
BUT100 : BP: Roles
ADR2 : Telephone Numbers (Business Address Services)
ADR6 : SMTP Numbers (Business Address Services) Contains Email Id oI the BP.
ADRC : Addresses (Business Address Services) : BPs Complete Address Details- City, Country,
Post Code, District, Street, Title No Etc
TSAD3T : Table containing the Title text against a Title No.
COMMPRODUCT : Master Table Ior Product
CRMMBUAG : Master table Ior Business Agreement
CRMMBUAGH : Header Data Ior Business Agreement such as Tax Category, Tax
Characteristic, Form key, Business Agreement Class. Data in this table correspond to ISU
CRMDORDERADMH
Contains the Header InIormation Ior a Business Transaction.
Note:
1. It doesn`t store the Business Partner responsible Ior the transaction. To get the Partner No, link
it with CRMORDERINDEX.
2. This table can be used Ior search based on the Object Id(Business Transaction No).
CRMDCUSTOMERH : Additional Site Details at the Header Level oI a Business Transaction
CRMCPROCTYPE : Master table Business Transaction Type
CRMCPARTNERFCT : DeIinition oI Partner Functions
SCPRIOT : Priorities Ior Activities with priority text.
CRMCPROCTYPET : Text Ior a transaction type
CRMCACTOBJT : Objective Number and Text Ior Activities
TJ30T : All the status code and text
CRMCPRASSIGN : Transaction Type and its Transaction Type Object.
IBIB : Installed Base/Ibase
IBIN : Installed Base Components

dding Web URL {like google.com, yaboo.com] in CRM UI
By G.Vijayalakshmi, Accenture
Web URL (E.g. Google, Yahoo, etc) in CRM U can be launched using transaction launcher
Step1:
Step1a: Call Transaction SM30. Enter the View name: CRMV_IC_LTX_URL

Step1b:
URL D: ZGOOGLE (any name starting with )
Description: Google
Request Method: Get
Click radio-button for Non-BSP URL
URL: http://www.google.com

Save the entry.
Step2:
Step2a:
Call transaction CRMC_UI_ACTIONW
Or
MG path CRM -> U Framework -> Technical Role Definition -> Configure Transaction Launcher



Step2b:
Launch Trans. D : Zlaunch_google.(Any name starting with )
Component Set : ALL
Click on Continue.

Step2c:
O Description : launch google
O Class name : ZCL_CRM_LAUNCH_GOOGLE (Any class name starting with ).
O Activate checkbox for 'StatefuI' to show the URL in a new window.
O Be sure that the checkbox 'Raise Veto' is deactivated.
O Click on Continue



Step2d:
Choose URL Transaction (B) as transaction type
URL D: ZGOOGLE .7eated in the URL 7eposito7.
Continue

Step2e:
Skip screen for transaction parameters and activity clipboard by pressing 'Continue'.
End the wizard and press 'Complete'.
Step3:
Step3a:
Execute Transaction CRMC_UI_NBLINKS
Or
MG path CRM -> UI Framework -> Technical Role Definition -> Define Navigation Bar Profile

Select 'efine Logi.aI Links' at the dialog structure on the left by double-click.
Create a new logical link:
Logical Link D: ZGOOGLE
Type: Launch Transaction
Target D: EXECLTX
Parameter ZGOOGLE
Parameter Class: CL_CRM_U_LTX_NAVBAR_PARAM
Title: Google
Description: Google

Save the changes.
Step3b:
Select 'efine i7e.t Link G7oups'
Create a new entry
Group D : GOOGLE
Group Type : No Classification
Title : Google
Description : Google.

Step3c:
Select 'Assign Links' at the dialog structure on the left by double-click.
Create a new entry
Logical link D : ZGOOGLE (Which has been defined in efine Logi.aI Links)
Position : 10
Save the changes.

Add the link which was created in Define Logical Links.


Step3d:
O Select 'efine P7ofiIe'
O Select profile corresponding to web U

O Click 'Assign i7e.t Link G7oups' at the dialog structure on the left
O Create a new entry
O Group D : ZGOOGLE
O Position : 30 (any position).

Step4:
O Execute Transaction CRMC_U_PROFLE or go to MG path CRM -> Business Roles -> Define
Business Role.


O Select business role ZWOOSALESPRO (the role which is assigned to user)

O oublecllck on 'vlslble lrecL Croup Llnks' aL Lhe dlalog sLrucLure on Lhe lefL
O Cllck vlslble Check 8ox correspondlng Lo Croup l ZCCCCLL
O

Step5: n the Web U the link appears as shown below.


Menambabkan button di assignment block
1 buka hLml nya Lambahkan sLaLemenL
<thtmlb:areaFrameSetter displayMode = "<%= controller-
view_group_context-is_view_in_display_mode( controller ). %"
toolbarButtons = "<%= controller-gt_button
%"
maxButtonNumber = "3" /

2 append buLLonsnya dl meLhod (redeflne) C_8LA8L_Cu1u1 darl vlew ybs
ls_button-type = cl_thtmlb_util=gc_icon_new.
ls_button-on_click = 'create'.
ls_button-enabled = abap_true.
ls_button-text = cl_wd_utilities=get_otr_text_by_alias(
'CRM_UIU_BP/BP_NEW' ). "#EC NOTEXT
* ls_button-tooltip = cl_wd_utilities=>get_otr_text_by_alias(
'CRM_UIU_BP/BP_NEW' )."#EC NOTEXT
APPEND ls_button TJ gt_button.

SET HANDLER on_toolbar_clicked ACTIVATIJN abap_true.

3 CegaL evenLnya redeflne meLhod ll_PAnLL_LvLn1
method DJ_HANDLE_EVENT.
* Eventhandler dispatching

CASE htmlb_event_ex-event_server_name.

* Added by wizard
WHEN 'edit'. "#EC NOTEXT
EH_JNEDIT( htmlb_event = htmlb_event
htmlb_event_ex = htmlb_event_ex ).

WHEN JTHERS.
ENDCASE.
endmethod.

CreaLe navlgaLlonal llnk

teps to create navigational link
1 CreaLe an ouLbound plug ln Lhe componenL from where you wanL Lo navlgaLe SomeLlmes
sLandard navlgaLlonal llnks are already Lhere you [usL need Lo ldenLlfy lL
2 CreaLe a ComponenL usage ln runLlme reposlLory for LargeL componenL
3 Add Lhls componenL usage Lo Lhe maln wlndow vlew ln reposlLory
CreaLe navlgaLlon llnk beLween Lhe LransacLlon Lype and Lhe LargeL componenL vlew
. ln Lhe ouLbound plug use Lhe vlew manager Lo navlgaLe Lo Lhe LargeL componenL Lx
ME->FIRE_OUTBOUND_PLUG( IV_OUTBOUND_PLUG = 'TO_OUTPLUG''
IV_DATA_COLLECTION = LR_COL ).
ass Lhe daLa Lhrough Lhe daLa collecLlon

Creation and Configuration of Business Partners
By Krishna Prathyusha Jataprolu, Accenture
Introduction
1hls documenL ls Lhe 8uslness rocess eslgn of Lhe 8uslness arLner MasLer daLa for SA C8M lL
descrlbes Lhe lnLerpreLaLlon of Lhe SA C8M ob[ecL 8uslness arLner (abbrevlaLed 8)
Ub|ectives
1he alm of Lhls documenL ls Lo acqulre all lnformaLlon needed for Lhe cusLomlzlng ob[ecL 8 ln SA C8M
Business Partner
Def|n|ng Number kange
n this activity, you define numbe7 7anges for business partners.
The defined number ranges are assigned to groupings in the efine g7oupings and assign numbe7
7anges activity. Number ranges Ior business partners are valid throughout a client.
9rocedure
1. Access the activity using one oI the Iollowing navigation options:
1
9 CkM ko|e Menu uefloloq Nombet kooqe fot Otq 8osloess lottoets
@ransact|on code
SPRO
MG 9ath
Cross-Application Components SAP Business Partner
Business Partner Basic Settings Number Ranges and
Groupings Define Number Ranges
2 Choose ooqe lotetvols

3. Choose Insert Interval.

LnLer Lhe lnLerval l and range
3 SelecL Check 8ox LxL lf LxLernal number range ls requlred

Save your LnLrles
kesu|t
@he Number ranges are def|ned as needed for d|fferent k|nds of ro|es of 8us|ness 9artner
WXZZY uioupZY_
Use
Assign each business partner to a grouping when you create the business partner. This grouping
determines the numbe7 7ange.
You cannot change this assignment at a later stage.
^[UWVa^W
1. To carry out the activity, choose one oI the Iollowing navigation options:
SAP CRM uefloloq Ctooploqs
Transaction code SPRO
IMG path kM tossAppllcotloo ompooeots Al 8osloess lottoet 8osloess
lottoet 8oslc ettloqs Nombet kooqes ooJ Ctooploqs uefloe
Ctooploqs ooJ Asslqo Nombet kooqes

2. Choose New Entries.
3. Enter the grouping, short name, description, number range and select the check box
External.
4. Save your entries.
#08:9
All the Number Ranges deIined are assigned to a group with a particular naming convention,
which are used in Grouping Tab in Easy Access Screen oI Business Partner.
01nng B:8n088 Par9n0r #408
Definition: Business Partner role
Rights and responsibilities that a business partner can have in various business transactions.
n this activity, you make the settings for the properties of business pa7tne7 7oIes.
n the business partner dialog you can select from all of the business partner roles provided. f you only
want to display certain business partner roles in the selection list, you can hide the other business partner
roles.
You can replace the standard title of business partner roles with customer-defined names
P7o.edu7e
To carry out the activity, choose one oI the Iollowing navigation options
SAP CRM uefloloq Ctooploqs
Transaction code SPRO
IMG path kM tossAppllcotloo ompooeots Al 8osloess lottoet 8osloess
lottoet 8oslc ettloqs 8uslness arLner 8oles roperLles of 8uslness
arLner 8oles
2. Select New Entries.

3. Select the required Business Partner Role.

SeL Lhe lndlcaLor lJe lf Lhe buslness parLner role ls noL Lo appear ln Lhe selecLlon llsL
3 eflne Lhe posltloo where Lhe buslness parLner role ls Lo appear ln Lhe selecLlon llsL
lf you wanL Lo glve Lhe selecLed buslness parLner role a dlfferenL LlLle Lo Lhe sLandard LlLle enLer
Lhe requlred ostomet tltle under 1lLle
7 Save your Entries
1he followlng roles wlll be used ln SA C8M
ko|e Name Category (9erson]Crg]Group) kemarks
Lmployee erson use of SLandard role Lmployee
ConLacL person erson use of SA sLandard role conLacL person
Sold Lo arry

erson/CrganlzaLlon

use of SA sLandard role soldLo parLy

rospecL erson/CrganlzaLlon

use of SA sLandard role prospecL
Shlp Lo arLy erson/CrganlzaLlon use of SA sLandard role Shlp Lo arLy

8lll Lo arLy erson/CrganlzaLlon use of SA sLandard role 8lll Lo arLy

8eLaller erson/CrganlzaLlon 1hls role wlll be used Lo reglsLer Lhe reLallers

kesu|t
All Lhe 8uslness arLner roles Lhose Lhe cllenL wanLs Lo appear ln Lhe Lasy access Screen are deflned
and all Lhose LhaL are unwanLed are hldden
1he 8uslness arLner 8oles are named ln accordance wlLh Lhe cllenL's requlremenL
Creat|ng a 8us|ness 9artners
9rocedure
1. Access the activity using one oI the Iollowing navigation options:
SAP CRM Role Menu eckloq 8osloess lottoets
@ransact|on code 8
9 Menu Master Data Business Partner Maintain Business
Partner
2 Co 1o creaLe erson

n the field display Role Choose sold to party and in Grouping Choose Customers Grouping

3. Enter all the required data, like Title, Name, Address and also the data as required the other
tabs

Save Lhe enLrly
3 8epeaL Lhe same for dlfferenL roles
kesu|t
8uslness arLners are creaLed wlLh requlred roles

dd buttons to a view
leLer 8l[laarsdam | !an 27 | CommenLs (0)
Creating the new button involves the following four steps:
1. nhance the component and view
2. Create a method to create the button
3. Call the new method from the do_prepare_output
4. Implement the event to be triggered when the button is clicked

1. Enhancing the component and view
First enhance the component and enhance the view. How to enhance a component
and a view can be found here.

. Creating the method to create the button
In the workbench, navigate to the implementation class of the view. The
implementation class is located directly under the view controller. The
implementation class typically ends with '_IMPL'.

Double click on this Z-class. If the class does not start with a Z, you have either not
enhanced the view yet, or you should go one screen back and re-open the
component in the workbench.
In the attributes tab, create a new attribute called GT_BUTTONS (Instance
Attribute, Public) of type CRMT_THTMLB_BUTTON_T


In the Methods tab, create a new method called 'CRAT_TOOLBAR' or
'CRAT_BUTTONS' (Instance Method, Private).

In the Method, add the following code:

---------------------------------------------------------
DATA: ls_button TYP crmt_thtmlb_button.
CLAR gt_button.
ls_button-type = cl_thtmlb_util=>gc_icon_add
ls_button-text = text-001.
ls_button-on_click = [name of the event].
ls_button-enabled = [abap_true|abap_false].
ls_button-id = [ID].
APPND ls_button TO gt_buttons.
CLAR ls_button.
---------------------------------------------------------
One of the variables is the name of the event. You can name this event anything
you like. For instance 'create_line' or 'edit_line'. The implementation of the event
will be done in step four.

The following attributes are available to buttons, and can be set:

ID
Identifies the button at runtime
TT
This is the text as displayed on the button -Keep it short!-
TOOLTIP
This is the text that shows when the mouse hovers over the button
ON_CLICK
This is the event that is raised when clicking the button
ON_CLINT_CLICK
???
NABLD
If this is set to false, the button is greyed out, and cannot be clicked.
ICON_SRC
This can be used to refer to an externally located gif image, i.e.
'/sap/bc/bsp/...../w_pdf__s.gif',
TYP
This is used to add standard icons to the button. The available set can be found in
cl_thtmlb_util, in the attributes tab.

. Redefine the do_prepare_output to call the method as defined in step .

In the view, navigate to the Request Processing, and redefine the method
do_prepare_output.
How to redefine a method can be found here.
In this method, call the newly created method to create the toolbar buttons.
This would be a statement like create_toolbar( ) or create_buttons( ).


4. Create the event to be raised when clicking the button

In the view, navigate to the node 'vent
Handler'. Right click on it, and click on 'create'. Create an event with the exact
name as coded in step 2.

The system will now create a method within the event handler called
'H_ON[event_name]'. Double click this event to enter the logic to be performed
when clicking the button.

Examples:
Having the button switch between edit and change mode.
me->view_group_context->set_view_editable( me ).

Call a transaction launcher transaction.
In order to navigate to a screen or launch transaction in the coding, you should
customize a 'Generic OP Mapping' in the nav bar profile.

IMG:
SAP IMG --> Customer Relationship Management --> UI Framework --> Technical
Role Definition --> Define Navigation Bar Profile.

Within the nav bar customizing transaction, Select the correct profile, and double
click on 'Define Generic OP Mapping' on the left side of the screen.

Add a line to the table where you map the new object name to an existing logical
link. You can use this object name in the coding to call the logical link. The action
should be the same as the action as customized in the OP Mapping.


---------------------------------------------------------
DATA: lr_col TYPE REF TJ cl_crm_bol_bo_col.
DATA: lr_nav_descr TYPE REF TJ if_bol_bo_property_access.

lr_nav_descr = cl_crm_ui_descriptor_obj_srv=create_ui_object_based(
iv_ui_object_type = name of the object type,
iv_ui_object_action = 'D' ).

CREATE JBJECT lr_col.
lr_col-if_bol_bo_col~insert( iv_bo = lr_nav_descr
iv_index = 1 ).

op_tobt( iv_data_collection = lr_col ).

---------------------------------------------------------

If you do this, you should also implement the outbound plug op_tobt.
This outbound plug contains the following coding:

---------------------------------------------------------
DATA:
lr_window TYPE REF TJ cl_bsp_wd_window.

lr_window = me-view_manager-get_window_controller( ).
lr_window-call_outbound_plug( iv_outbound_plug = 'TJBT'
iv_data_collection = iv_data_collection ).

---------------------------------------------------------
nbancing a Component and a View
leLer 8l[laarsdam | !an 7
The Webclient UI provides a Ilexible user interIace that can be altered according to the
companies' needs. Fields can be moved around, added and deleted Irom the screen easily. There
are some changes that cannot be done by customizing, and you might require an enhancement oI
a certain component.
Enhancing a component enables you to overrule the standard SAP coding and replacing it with
your own. Enhancements can be done using SE80, but are preIerably done using the BSP
Workbench (Transaction BSPWDCMPWB)
When you want to alter coding in the BSP Workbench, you Iirst need to enhance the component
and enhance the view. In order to be able to do this, you have to Iirst create an enhancement set.
This is a one-time exercise where you create the 'container' Ior all your enhancements.
The enhancement set is created using SM34 view cluster BSPWDVCCMPEXT. You must
create one beIore you can enhance any component.
When you check the BSPWDVCCMPEXT, you will see that this also contains views Ior
enhancement deIinitions. You don't need to Iill in anything here, as inIormation will be added
here once components are actually enhanced in the workbench.
When you have created the enhancement set, go to the BSP Workbench and check that in the
Iield 'Enhancement Set' (iI it is not visible, click the button), you can select the enhancement set
you have created.
Now Iind the component you want to change and click on the display button. In order to enhance
the component, click the button. Enter the values in the Iields requested. It is recommended to
stick to a logical naming convention to make sure you can Iind the enhanced methods easily later
on. The system will now add this component to the enhancement set.
From now on, when you enter the component in the workbench, all views will be grey. A grey
view means that it has not been enhanced, but that all logic is inherited Irom the parent (the
standard component). Again, enter the values in the Iields requested. BeIore you can continue
with redeIining methods, you should now Iirst go one step back and open the component again
Irom the previous screen so that the newly generated classes are loaded into the screen.

Field properties modification using tbe CT P
leLer 8l[laarsdam | leb 10
In the CRM webclient, the properties oI a Iield can be changed.
The change can vary Irom changing the Iield type, Ior instance changing a dropdown listbox to
an ordinary input Iield or a checkbox or a radiobutton, to changing the tooltip text, to
implementing navigation to another screen when clicking on the Iield.
The changes are done in the GETP oI an attribute oI the context node.

1. Determine the component and view to be changed.
In the CRM webclient navigate to the search screen to be adjusted, click in a Iield and press .
Note the component and the viewname.

2. Enhance the component and view
First enhance the component and enhance the view. How to enhance a component and a view
can be Iound here.

3. RedeIine the method DOINITCONTEXT.
RedeIine the DOINITCONTEXT Remember to always call the super class. How to redeIine a
method can be Iound here.

|IMG OF WORKBENCH SELECTING THE CONTEXT NODE|.

The GETP is run several times when adding the Iield to the screen at runtime.
Examples:
Changing a Iield to a hyperlink:The Iollowing example changes the Iield to a hyperlink, which
when clicked upon, will navigate to a diIIerent screen

CASE iv_property.
WHEN if_bsp_wd_model_setter_getter=fp_fieldtype.
rv_value = cl_bsp_dlc_view_descriptor=field_type_event_link.
WHEN if_bsp_wd_model_setter_getter=fp_onclick.
rv_value = 'NAVIGATE_TJ_TARGET'.
ENDCASE.

OI course, you will also need to implement the event EHONNAVIGATETOTARGET.
Changing a Iield to a checkbox and adding a tooltip.

CASE iv_property.
WHEN if_bsp_wd_model_setter_getter=fp_fieldtype.
rv_value = cl_bsp_dlc_view_descriptor=field_type_checkbox.
WHEN if_bsp_wd_model_setter_getter=fp_tooltip.
rv_value = text-001.
ENDCASE.

Additional comments.
One oI the importing parameters oI the getp is the Iield IVDISPLAYMODE. This Iield can
be checked to see whether the Iield is in change or in display mode. You can implement diIIerent
properties to the Iield in change and in display mode.
Another oI the importing parameters is the IVINDEX. This can be used to determine in which
line you are in the table.


Implementing a valuebelp using tbe CT V for a DDLB
leLer 8l[laarsdam | 20 hours ago |
In the CRM webclient you implement or redefine the valuehelp logic.
Sometimes a valuehelp is not implemented in the standard, or you might
want to implement a more company-specific valuehelp. This can be done by
redefining the GT_V of an attribute of a context node.
A GT_V for a DDLB (DropDown List Box) would particularly contain the
following code:
----------------------------------------------------------
DATA: lt_ddlb TYP bsp_wd_dropdown_table,
lr_ddlb TYP RF TO cl_crm_uiu_ddlb.
lt_ddlb = cl_crm_uiu_bt_tools=>get_strcmp_ddlb(
iv_structure = [name of the structure the field is part of]
iv_component = [Fieldname])
.
IF NOT lr_ddlb IS BOUND.
CRAT OBJCT lr_ddlb PORTING iv_source_type = 'T'.
NDIF.
lr_ddlb->set_selection_table( it_selection_table = lt_ddlb ).
rvvaluehelpdescriptor lrddlb.

----------------------------------------------------------
II you want the dropdown listbox to be occupied with values Irom a domain, you can use the
Iollowing code:
----------------------------------------------------------

DATA:lt_ddlb TYP bsp_wd_dropdown_table.
SLCT domvalue_l ddtext INTO TABL lt_ddlb FROM dd07t WHR
domname = [domain] AND ddlanguage = sy-langu.

INSRT INITIAL LIN INTO lt_ddlb IND 1.
SORT lt_ddlb BY value.
IF sy-subrc = 0.
CRAT OBJCT rv_valuehelp_descriptor TYP cl_bsp_wd_valuehelp_pldescr
PORTING
iv_source_type = 'T'
iv_selection_table = lt_ddlb.
NDIF.

----------------------------------------------------------

The values Irom the valuehelp are determined when building the screen (doprepareoutput).
This means, that iI you want the available values to vary based on the contents oI another Iield,
you only have to trigger a roundtrip to the server (like raising a server event, which can be
implemented in the getp) when the contents oI the Iield which it depends on are changed.

Furthermore, you will have to implement in the getv oI the Iield how the available values are
Iiltered.

Vous aimerez peut-être aussi