Sie sind auf Seite 1von 33

CRM

Table of Contents
The Table Names For a CRM Transaction....................................................................................................2
List Of Frequently Used CRM Tables List.....................................................................................................3
Adding Web URL (like google.com, yahoo.com) in CRM UI.........................................................................5
Menambahkan button di assignment block................................................................................................7
Steps to create navigational link..................................................................................................................8
The 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 definitions: 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 of 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.
- COMM_PRODUCT Master Table for Product
- CRMM_BUAG Master table for Business Agreement 
- CRMM_BUAG_H Header Data for Business Agreement such as Tax Category, Tax
Characteristic, Form key, Business Agreement Class. Data in this table correspond to ISU 
- CRMD_OPPORT_H      OPPORTUNITY HEADER DATA
- CRMD_ORDERADM_H Contains the Header Information for a Business Transaction.
Note:
1. It doesn't store the Business Partner responsible for the transaction. To get the Partner No, link
it with 
CRM_ORDER_INDEX.
2. This table can be used for search based on the Object Id(Business Transaction No). 
- CRMD_OPPORT_H OPPORTUNITY HEADER DATA
- CRMD_CUSTOMER_H Additional Site Details at the Header Level of a Business Transaction

- CRMC_PROC_TYPE Master table Business Transaction Type 


- CRMC_PARTNER_FCT Definition of Partner Functions 
- SCPRIOT Priorities for Activities with priority text.
- CRMC_PROC_TYPE_T Text for a transaction type 
- CRMC_ACT_OBJ_T Objective Number and Text for Activities 
- TJ30T All the status code and text
- CRMC_PR_ASSIGN : Transaction Type and its Transaction Type Object.
- IBIB : Installed Base/Ibase
- IBIN : Installed Base Components                               *-- Pankaj
List Of Frequently Used CRM Tables List

The list of table is as under: You have to figure out the table according to your requirement.

None the less CRMD_ORDERADM_H, CRMD_ORDERADM_I will give you info 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 definitions: 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 of 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. 
COMM_PRODUCT : Master Table for Product 
CRMM_BUAG : Master table for Business Agreement 
CRMM_BUAG_H : Header Data for Business Agreement such as Tax Category, Tax
Characteristic, Form key, Business Agreement Class. Data in this table correspond to ISU 
CRMD_OPPORT_H : OPPORTUNITY HEADER DATA 
CRMD_ORDERADM_H : Contains the Header Information for a Business Transaction. 

Note: 
1. It doesn't store the Business Partner responsible for the transaction. To get the Partner No, link
it with CRM_ORDER_INDEX. 
2. This table can be used for search based on the Object Id(Business Transaction No). 
• CRMD_OPPORT_H OPPORTUNITY HEADER DATA 
• CRMD_CUSTOMER_H Additional Site Details at the Header Level of a Business
Transaction 
• CRMC_PROC_TYPE Master table Business Transaction Type 
• CRMC_PARTNER_FCT Definition of Partner Functions 
• SCPRIOT Priorities for Activities with priority text. 
• CRMC_PROC_TYPE_T Text for a transaction type 
• CRMC_ACT_OBJ_T Objective Number and Text for Activities 
• TJ30T All the status code and text 
• CRMC_PR_ASSIGN : Transaction Type and its Transaction Type Object. 
• IBIB : Installed Base/Ibase 
• IBIN : Installed Base Components 

Activities:
CRMD_ACTIVITY_H Activity Header table
CRMD_ACTIVITY_I Activity Reporting: Activity Line Item Extension
CRMD_TM_ACTIVITY Activity reference

Lead:
CRMD_LEAD_H Lead Header table

Opportunity:
CRMD_OPPORT_H 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 definitions: 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 of 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.
COMM_PRODUCT : Master Table for Product
CRMM_BUAG : Master table for Business Agreement 
CRMM_BUAG_H : Header Data for Business Agreement such as Tax Category, Tax
Characteristic, Form key, Business Agreement Class. Data in this table correspond to ISU
CRMD_ORDERADM_H 

Contains the Header Information for a Business Transaction.


Note:
1. It doesn’t store the Business Partner responsible for the transaction. To get the Partner No, link
it with CRM_ORDER_INDEX.
2. This table can be used for search based on the Object Id(Business Transaction No). 
CRMD_CUSTOMER_H : Additional Site Details at the Header Level of a Business Transaction
CRMC_PROC_TYPE : Master table Business Transaction Type
CRMC_PARTNER_FCT : Definition of Partner Functions
SCPRIOT : Priorities for Activities with priority text.
CRMC_PROC_TYPE_T : Text for a transaction type
CRMC_ACT_OBJ_T : Objective Number and Text for Activities 
TJ30T : All the status code and text
CRMC_PR_ASSIGN : Transaction Type and its Transaction Type Object.
IBIB : Installed Base/Ibase
IBIN : Installed Base Components

Adding Web URL (like google.com, yahoo.com) in CRM UI

By G.Vijayalakshmi, Accenture

Web URL (E.g. Google, Yahoo, etc) in CRM UI can be launched using transaction launcher 

Step1:

Step1a: Call Transaction SM30. Enter the View name: CRMV_IC_LTX_URL 

Step1b: 
URL ID: ZGOOGLE (any name starting with Z)
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_ACTIONWZ

Or

IMG path CRM -> UI Framework -> Technical Role Definition -> Configure Transaction Launcher 
 

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

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

Choose URL Transaction (B) as transaction type

URL ID: ZGOOGLE created in the URL repository.

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
IMG path CRM -> UI Framework -> Technical Role Definition -> Define Navigation Bar Profile
Select ‘Define Logical Links’ at the dialog structure on the left by double-click.
Create a new logical link:
Logical Link ID: ZGOOGLE
Type: Launch Transaction
Target ID: EXECLTX
Parameter ZGOOGLE
Parameter Class: CL_CRM_UI_LTX_NAVBAR_PARAM
Title: Google
Description: Google 
 

Save the changes. 

Step3b:
Select ‘Define Direct Link Groups’
Create a new entry
Group ID  : ZGOOGLE
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 ID : ZGOOGLE (Which has been defined in Define Logical Links)
Position  : 10
Save the changes.
 
Add the link which was created in Define Logical Links.
Step3d:
         Select ‘Define Profile’
         Select profile corresponding to web UI

         Click ‘Assign Direct Link Groups’ at the dialog structure on the left
         Create a new entry
         Group ID : ZGOOGLE
         Position : 30 (any position).
Step4:
         Execute Transaction CRMC_UI_PROFILE or go to IMG path CRM -> Business Roles -> Define
Business Role.
         Select business role ZWOOSALESPRO (the role which is assigned to user)

        

 Double-click on ‘Visible Direct Group Links’ at the dialog structure on the left.
 Click Visible Check Box corresponding to Group ID ZGOOGLE

        

Step5: In the Web UI the link appears as shown below.

Menambahkan button di assignment block


1. buka html nya tambahkan statement:

<thtmlb:areaFrameSetter displayMode = "<%= controller-


>view_group_context->is_view_in_display_mode( controller ). %>"
toolbarButtons = "<%= controller->gt_button %>"
maxButtonNumber = "3" />

2. append buttons-nya di method (redefine) DO_PREPARE_OUTPUT dari view 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 TO gt_button.

SET HANDLER on_toolbar_clicked ACTIVATION abap_true.

3. Cegat eventnya: redefine method IF_...~HANDLE_EVENT

method DO_HANDLE_EVENT.
* Eventhandler dispatching

CASE htmlb_event_ex->event_server_name.

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

WHEN OTHERS.
ENDCASE.
endmethod.

4. Create navigational link

Steps to create navigational link


1. Create an outbound plug in the component from where you want to navigate. Sometimes
standard navigational links are already there.. you just need to identify it.
2. Create a Component usage in runtime repository for target component.
3. Add this component usage to the main window view in repository.
4. Create navigation link between the transaction type and the target component view.
5. In the outbound plug, use the view manager to navigate to the target component. Ex:
ME->FIRE_OUTBOUND_PLUG( IV_OUTBOUND_PLUG = 'TO_OUTPLUG''
IV_DATA_COLLECTION = LR_COL ).
6. Pass the data through the data collection.

Creation and Configuration of Business Partners

By Krishna Prathyusha Jataprolu, Accenture


Introduction

This document is the Business Process Design of the Business Partner Master data for SAP CRM. It
describes the interpretation of the SAP CRM object Business Partner (abbreviated BP).

Objectives

The aim of this document is to acquire all information needed for the customizing object BP in SAP CRM.

Business Partner 

Defining Number Range

In this activity, you define number ranges for business partners.

The defined number ranges are assigned to groupings in the Define groupings and assign number
ranges activity. Number ranges for business partners are valid throughout a client. 

Procedure

1.       Access the activity using one of the following navigation options:

1.        

SAP CRM Role Menu Defining Number Range for Org Business Partners
Transaction code SPRO
IMG Path Cross-Application Components à SAP Business Partner à
Business Partner à Basic Settings à Number Ranges and
Groupings à Define Number Ranges

 2.       Choose Change Intervals 

 
3.       Choose Insert Interval.

4.       Enter the Interval ID and range

5.       Select Check Box Ext if External Number range is required

6. Save your Entries


Result:

The Number ranges are defined as needed for different kinds of roles of Business Partner.

Defining Groupings

Use

Assign each business partner to a grouping when you create the business partner. This grouping
determines the number range.

You cannot change this assignment at a later stage.

Procedure

1.       To carry out the activity, choose one of the following navigation options:

SAP CRM Defining Groupings


Transaction code SPRO
IMG path CRM à Cross-Application Components à SAP Business Partner à Business
Partner à Basic Settings à Number Ranges and Groupings à Define
Groupings and Assign Number Ranges

2.       Choose New Entries.

3.       Enter the grouping, short name, description, number range and select the check box
External.

4.       Save your entries.

Result:

All the Number Ranges defined are assigned to a group with a particular naming convention,
which are used in Grouping Tab in Easy Access Screen of Business Partner.
Defining Business Partner Roles

Definition: Business Partner role

Rights and responsibilities that a business partner can have in various business transactions.

In this activity, you make the settings for the properties of business partner roles.

In the business partner dialog you can select from all of the business partner roles provided. If 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

Procedure

1.       To carry out the activity, choose one of the following navigation options

SAP CRM Defining Groupings


Transaction code SPRO
IMG path CRM à Cross-Application Components à SAP Business Partner à Business
Partner à Basic Settings àBusiness Partner Roles à Properties of Business
Partner Roles

2.       Select New Entries.


3.       Select the required Business Partner Role.

4. Set the indicator Hide if the business partner role is not to appear in the selection list.
5. Define the position where the business partner role is to appear in the selection list.
6. If you want to give the selected business partner role a different title to the standard title, enter
the required Customer title under Title.
7. Save your Entries

The following roles will be used in SAP CRM:  

Role Name Category (Person/Org/Group) Remarks

Employee Person Use of Standard role Employee


Contact person Person Use of SAP standard role contact person
Sold to Parry Person/Organization Use of SAP standard role sold-to party

     
Prospect Person/Organization Use of SAP standard role prospect

 
Ship to Party Person/Organization Use of SAP standard role Ship to Party

 
Bill to Party Person/Organization Use of SAP standard role Bill to Party

 
Retailer Person/Organization This role will be used to register the retailers.

Result.
All the Business Partner roles those the client wants to appear in the Easy access Screen are defined
and all those that are unwanted are hidden.

The Business Partner Roles are named in accordance with the client’s requirement.

Creating a Business Partners

Procedure

1.       Access the activity using one of the following navigation options:

SAP CRM Role Menu Checking Business Partners


Transaction code BP
SAP Menu Master Data à Business Partner à Maintain Business
Partner

2.       Go To create Person


In 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
4.       Save the entriy.

5.       Repeat the same for different roles. 

Result.

Business Partners are created with required roles.

Add buttons to a view


Pieter Rijlaarsdam | Jan 27 | Comments (0)

Creating the new button involves the following four steps:

1. Enhance 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.

2. 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 'CREATE_TOOLBAR' or
'CREATE_BUTTONS' (Instance Method, Private).

In the Method, add the following code:

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

  DATA: ls_button     TYPE crmt_thtmlb_button.


  CLEAR 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].
  APPEND ls_button TO gt_buttons.
  CLEAR 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
TEXT    
   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_CLIENT_CLICK
   ???
ENABLED
   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',
TYPE
   This is used to add standard icons to the button. The available set can be found in
cl_thtmlb_util, in the attributes tab.

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


 
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 'Event


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
'EH_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 TO cl_crm_bol_bo_col.
  DATA: lr_nav_descr TYPE REF TO 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 OBJECT 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 TO cl_bsp_wd_window.
  lr_window = me->view_manager->get_window_controller( ).
  lr_window->call_outbound_plug( iv_outbound_plug   = 'TOBT'
                                 iv_data_collection = iv_data_collection ). 
 
---------------------------------------------------------

Enhancing a Component and a View


Pieter Rijlaarsdam | Jan 7

The Webclient UI provides a flexible user interface that can be altered according to the
companies' needs. Fields can be moved around, added and deleted from the screen easily. There
are some changes that cannot be done by customizing, and you might require an enhancement of
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 preferably done using the BSP
Workbench (Transaction BSP_WD_CMPWB)

When you want to alter coding in the BSP Workbench, you first need to enhance the component
and enhance the view. In order to be able to do this, you have to first create an enhancement set.
This is a one-time exercise where you create the 'container' for all your enhancements.

The enhancement set is created using SM34 view cluster BSPWDVC_CMP_EXT. You must
create one before you can enhance any component.

When you check the BSPWDVC_CMP_EXT, you will see that this also contains views for
enhancement definitions. You don't need to fill in anything here, as information 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
field 'Enhancement Set' (if it is not visible, click the button), you can select the enhancement set
you have created.

Now find 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 fields requested. It is recommended to
stick to a logical naming convention to make sure you can find 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 from the parent (the
standard component). Again, enter the values in the fields requested. Before you can continue
with redefining methods, you should now first go one step back and open the component again
from the previous screen so that the newly generated classes are loaded into the screen.
Field properties modification using the GET P
Pieter Rijlaarsdam | Feb 10

In the CRM webclient, the properties of a field can be changed.


The change can vary from changing the field type, for instance changing a dropdown listbox to
an ordinary input field or a checkbox or a radiobutton, to changing the tooltip text, to
implementing navigation to another screen when clicking on the field.
The changes are done in the GET_P of an attribute of 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 field 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 found here.

3. Redefine the method DO_INIT_CONTEXT.


Redefine the DO_INIT_CONTEXT Remember to always call the super class. How to redefine a
method can be found here.

[IMG OF WORKBENCH SELECTING THE CONTEXT NODE].

The GET_P is run several times when adding the field to the screen at runtime.
Examples:
Changing a field to a hyperlink:The following example changes the field to a hyperlink, which
when clicked upon, will navigate to a different 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_TO_TARGET'.
ENDCASE.

Of course, you will also need to implement the event EH_ONNAVIGATE_TO_TARGET. 


Changing a field 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 of the importing parameters of the get_p is the field IV_DISPLAY_MODE. This field can
be checked to see whether the field is in change or in display mode. You can implement different
properties to the field in change and in display mode.
Another of the importing parameters is the IV_INDEX. This can be used to determine in which
line you are in the table.

Implementing a valuehelp using the GET V for a DDLB


Pieter Rijlaarsdam | 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 GET_V of an attribute of a context node.
A GET_V for a DDLB (DropDown List Box) would particularly contain the
following code:
----------------------------------------------------------
DATA:  lt_ddlb  TYPE             bsp_wd_dropdown_table,
          lr_ddlb TYPE REF 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.
     CREATE OBJECT lr_ddlb EXPORTING iv_source_type = 'T'.
ENDIF.
lr_ddlb->set_selection_table( it_selection_table = lt_ddlb ).

rv_valuehelp_descriptor = lr_ddlb.

----------------------------------------------------------
If you want the dropdown listbox to be occupied with values from a domain, you can use the
following code:
----------------------------------------------------------

  DATA:lt_ddlb TYPE bsp_wd_dropdown_table.  


  SELECT domvalue_l ddtext INTO TABLE lt_ddlb FROM dd07t WHERE
      domname = [domain] AND ddlanguage = sy-langu.
  
  INSERT INITIAL LINE INTO lt_ddlb INDEX 1.
  SORT lt_ddlb BY value.
  IF sy-subrc = 0.
       CREATE OBJECT rv_valuehelp_descriptor TYPE cl_bsp_wd_valuehelp_pldescr
        EXPORTING
            iv_source_type = 'T'
            iv_selection_table = lt_ddlb.
 ENDIF.

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

The values from the valuehelp are determined when building the screen (do_prepare_output).
This means, that if you want the available values to vary based on the contents of another field,
you only have to trigger a roundtrip to the server (like raising a server event, which can be
implemented in the get_p) when the contents of the field which it depends on are changed.

Furthermore, you will have to implement in the get_v of the field how the available values are
filtered.

Das könnte Ihnen auch gefallen