Skip to main content
Image Hamburg Landungsbrücken

The ADventas Consulting Blog

A collection of our knowledge, experience and tips on SAP GTM as well as S/4HANA

4 minutes reading time (856 words)

Extending the TEW Selection Tool in SAP GTM

906658D3-1472-4F8C-A378-63FA1B0EE95B

Hello and welcome back to our "Tips & Tricks" area here at the ADventas Blog!

Today we want to share with you how to extend the TEW Selection Tool in SAP GTM.


So let's get started!


Introduction

In the Trading Execution Workbench (Transaction WTEW) the selection intervals for the documents to be selected can be adapted. Also, customer individual fields can be integrated.

In Figure 1 the intervals 9000 and 9001 are such customer individual fields.


Fig. 1: The TEW Selection Tool.


Extending the Selection Views

In our example we want to extend the selection intervals with two customer individual fields which were integrated in the trading contract item (table WBHI).

The customizing for the selection view can be found here: Global Trade Management > Trading Execution Workbench (TEW) > Selection Tool.

For our example two customizing tables are relevant:

  • Trading Contract: Setbox List of Sets
  • Trading Contract: Default Listbox Content

Fig. 2: The customizing of the Selection Tool.


1) Trading Contract: Listbox

In the customizing table Trading Contract: Listbox Set of Lists (see Fig. 3) you set up which selection criteria are to be available to users when selecting documents of this type. You do this by choosing the number for the selection criteria from a list of all possible criteria (fields). 


Fig. 3: Trading Contract: ListBox Set of Lists.


Fig. 4: Extending the Selection View.


In Fig. 4 you can already see the customer individual fields. The field number actually refers to a dynpro used in the selection tool to display the field name and enter the selection criteria itself.

The field ZZTOURID is already in the table WBHI and needs to be integrated in to the database view WB2_V_WBHK_WBHI. To do so you go to transaction SE11, enter the view name and display the view. In the menu choose Goto > Append View and create the append and add the customer individual fields. Repeat this for the view WB2_V_WBHK_WBHIB.

Other GTM views are:

View Name Description
WB2_V_EKKO_EKPO Data Selection from PO
WB2_V_EKKO_EKPO2Data Selection from PO (without WBGT)
WB2_V_LIKP_LIPSData Selection from Deliveries
WB2_V_LIKP_LIPS2Data Selection from Deliveries (without WBGT)
WB2_V_MKPF_MSEGData Selection from Material Documents
WB2_V_MKPF_MSEG2Data Selection from material Documents (without WBGT)
WB2_V_VBAK_VBAPData Selection from SO
WB2_V_VBAK_VBAP2Data Selection from SO (without WBGT)
WB2_V_VBRK_VBRPData Selection from Customer Billing 
WB2_V_VBRK_VBRP2Data Selection from Customer Billing (without WBGT)
WB2_V_WBHK_WBHIData Selection from TC
WB2_V_WBHK_WBHIB(New, business data head)
WB2_V_WBHK_WBHI2Data Selection from TC (without WBGT, business data item)
WB2_V_WBHKWBHI2BData Selection from TC (without WBGT, business data head)
WB2_V_WBRK_WBRPData Selection from Agency Documents
WB2_V_WBRK_WBRP2Data Selection from Agency Documents (without WBGT)


2) Customizing Table IMA_SELOPT

The new fields must be added to table IMA_SELOPT. Use transaction SM30 to add the new entries. Screen number is the number of the new screen that is displaying the new field. Valid customer entries are 9000-9999.


Fig. 5: Customizing Table IMA_SELOPT.


The application key depends on the document type of the new field:

  • LO-AB-TC-TEW-TC Trading Contract
  • LO-AB-TC-TEW-PO Purchase Order
  • LO-AB-TC-TEW-AB Vendor Billing Document
  • LO-AB-TC-TEW-SO Sales Order
  • LO-AB-TC-TEW-OD Delivery
  • LO-AB-TC-TEW-MD Material Document
  • LO-AB-TC-TEW-SI Sales Invoices

3) Generate the new Dynpros in SAP Function Group

Run report RAIAWEBTOOL_CREATE_INCLUDE_NEW with transaction SE38 to generate the function group WB2_TC_SEL. The function group to be updated is retrieved by the report from table TAPPLIC based on the application key.


Fig. 6: Report to Generate Dynpros.

The report is secured with an EXIT command in line 58. To execute the report set a break point in this line and use the debugger to jump over this command.


4) Trading Contract: Default Listbox Content

Fig. 7: Trading Contract: Default Listbox Content.


If needed, you can set the default selection intervals in customizing table Global Trade Management > Trading Execution Workbench (TEW) > Selection Tool > Trading Contract: Default Listbox Content.


5) Reset User Defaults

Lastly, the new field will only be available for the user if the user defaults are reset. This can be done by running the report RAIAWEBTOOL_DELETE_STORAGEDATA.


So that's it from our side!

We hope this blog post was helpful for you. 

If so and also if you have any questions, please let us know by leaving us a message in the comments!

×
Stay Informed

When you subscribe to the blog, we will send you an e-mail when there are new updates on the site so you wouldn't miss them.

ABAP Quickfix for S4 Conversions: An Eclipse ADT ...
With these Shortcuts Navigating Through Trading Co...
 

Comments

No comments made yet. Be the first to submit a comment
Already Registered? Login Here
Thursday, 12 December 2024

    kununu TopCompanyBadge 2025 CMYK 

      kununu widget

ADventas Consulting GmbH
Peter Langner
Kattjahren 8
22359 Hamburg
Germany

Tel.  +49 (40) 6055 9401
Fax  +49 (40) 6055 9400
Mob +49 (151) 1221 4867
Mail  info@adventas.de