SAP ABAP IMG Activity W_WB2B_BADI_TEW3 (BAdI: Data from Add-On Documents)
Hierarchy
EA-GLTRADE (Software Component) SAP Enterprise Extension Global Trade
   LO-GT-TEW (Application Component) Trading Execution Workbench
     WB2B_TEW (Package) Trading Execution Workbench
IMG Activity
ID W_WB2B_BADI_TEW3 BAdI: Data from Add-On Documents  
Transaction Code S_PLN_62000028   (empty) 
Created on 20040130    
Customizing Attributes W_WB2B_BADI   BAdI Global Trade Management 
Customizing Activity W_WB2B_BADI_TEW3   BAdI: Data from Add-On Documents 
Document
Document Class SIMG   Hypertext: Object Class - Class to which a document belongs.
Document Name WB2_ADDON_DATA    

Use

Use this Business Add-In (BAdI) to provide data for Add-On documents. The following document data types can be used: "Z1", "Z2" and "Z3".

Example

Requirements

Standard settings

This BAdI is not active.

Recommendation

Activities

After calling up the IMG activity, a dialog box appears, in which you can enter a name for the implementation.

If you have already made other implementations for this BAdI, another dialog box appears, in which the existing implementations are displayed. In this case, choose Create, and proceed as follows:

  1. In the dialog box, enter a name for the BAdI implementation in the Implementation field, and choose Create.

    The screen for creating BAdI implementations is now displayed.

  2. Enter a short text for the implementation in the Short text for implementation field.
  3. From the tab index, choose Interface.

    The Name of implemented class field is already filled on the tab page, as a class name was automatically assigned to the implementation when you named it.

  4. Save your entries, and assign the implementation to a development class.
  5. Place the cursor on the method, and double-click to enter method processing.
  6. Enter the code for the implementation between the statements method <Interface name> ~ <Name of method> and endmethod.
  7. Save and implement your code. Return to the Edit Implementation screen.
  8. Save the entries on the Edit Implementation screen.

    Note: You can also create an implementation, and then activate it at a later time. In such a case, end the processing stage at this point.

  9. Choose Activate

    The code you stored in the method will be run when the application program is executed.

Further notes

Before Add-On documents can be added to the Trading Execution Workbench (TEW), you must first implement the following BAdIs: WB2_ADDON_FLOW, WB2_ADDON and WB2_ADDON_DATA. Adding your own documents is a complex operation that extends far beyond standard practices. The views that you are required to maintain are not, therefore, contained in Customizing:

  • BAdI "WB2_ADDON_FLOW" is used to insert Add-On documents to the document flow in ERO. You must implement this BAdI if the Add-On documents are the successors of existing R/3 documents.
  • BAdI "WB2_ADDON" contains methods that are required for displaying data in the document flow tree and for switching to the display transaction for Add-On documents. It is also possible to define a hierarchy within the Add-On documents.
  • BAdI "WB2_ADDON_DATA" is used solely for data procurement.

Document type "Z1" to "ZZ" have been reserved solely for inserting Add-On documents to the TEW. A maximum of three document data types ("Z1" ... "Z3") can be used. A differentiation is made between document type and document data type because many documents with different data types are stored in the same database table.

Examples are sales orders and contracts stored in tables "VBAK" and "VBAP". Both documents belong to different document types yet they are of the same document data type, "sales data".

Customizing view "V_TEWDOC2DATATYP" is used to map document types to document data types. To maintain this view, use transaction sm30. The mapping of the standard document types cannot be changed. This table is used to specify how document types are mapped to document data types. If, for example, all your Add-On documents have the same data structure but have to be mapped to different document types for different business reasons, maintain the mapping of "Z1" and "Z2" using document data type "Z1".

Take the following into consideration if you want to add new data structures to the TEW:

  1. Structures "WB2_ADDONHZ1".."WB2_ADDONHZ3" for document headers and "WB2_ADDONIZ1".."WB2_ADDONIZ3" for document items have been created for inserting Add-On document data.
    1. The fields for document and item numbers have already been included. When defining key fields for your Add-On documents, you should use the data categories for these numbers.
    2. The fields for the Add-On documents must be inserted as append structures. These fields are filled with data using the "select" methods for BADIs "WB2_ADDON_DATA".
  2. To make new fields available in the selection tool, they must first be added to table "IMA_SELOPT". This table is maintained using transaction SM30.
    1. Screen numbers must begin with "9".
    2. The application keys are "LO-AB-TC-TEW-Z1".. "LO-AB-TC-TEW-Z3". The tables are "WB2_Z1H_Z1I" .. "WB2_Z3H_Z3I".
    3. Before finishing, generation report "RAIAWEBTOOL_CREATE_INCLUDE_NEW" must be triggered. This report generates different new function groups. The report may require a long runtime for any data can be displayed on the screen. Schedule the report with sufficient runtime and do not cancel the report if you think that it has not functioned correctly.

      Note:

    4. The generation report is normally activate with "exit" for security reasons. Remove this "exit" before you start.
    5. Before you can transport the changes to subsequent systems, you must manually enter the function groups "WB2_Z1_SEL","WB2_Z2_SEL" and "WB2_Z3_SEL" in a transport order.
    6. In "Selection Tools" in Customizing for the TEW, you must enter the list box worklist and maybe even default data. The views required for creating the selection tool are not contained in the IMG. The list box worklists are created using the views vv_taif10_z1,vv_taif10_z2 and vv_taif10_z3. "Default list box contents" are created using the views vv_taif11_z1,vv_taif11_z2 and vv_taif11_z3. To do this, use transaction SM30.

For more information, see the documentation for the following BAdI methods:

Business Attributes
ASAP Roadmap ID 257   Create User Exits 
Mandatory / Optional 2   Optional activity 
Critical / Non-Critical 2   Non-critical 
Country-Dependency A   Valid for all countries 
Maintenance Objects
Maintenance object type E   Business Add-In - Definition 
History
Last changed by/on SAP  20040130 
SAP Release Created in 500