Вы находитесь на странице: 1из 5

SAP VIM Integrated Invoice Cockpit:

Extend Cockpit with Custom specific Fields in /OPT/VIM_IIC. Step by Step SAP Tutorial how to
add new custom fields and fill specific data for these fields.
The tcode/transaction /OPT/VIM_IIC is used to launch the SAP VIM Integrated Invoice Cockpit.

Defining Customer Specific Fields


First, we need to add the customer Specific fields to Output Structure for IIC.

Display ICC Output Structure


The Structure /OPT/VIIC_OUT_WILIST_ST is the Extended ICC: Output Structure for WI
(Work Item) List.
The SAP VIM Integrated Invoice Cockpit display is based on ALV and this ALV is built from this
structure.
1. Execute the SE11 transaction
2. Display structure /OPT/VIIC_OUT_WILIST_ST.

Create Extension for


/OPT/VIIC_OUT_WILIST_ST
3. Click Goto > Append Structure in the menu bar in order to create and maintain an append structure
For the name of the extension, I suggest ZAOPTVIIC_OUT_WILIST_ST.

4. Add all customer specific fields to the structure.


Note: The data element of the customer specific fields gives the field label.

Save and activate


5. Save the append structure and add it to a transport request.

Updating Values of Customer Specific


Fields
Once the Structure is extended, we have to fill data to the custom specific fields.
Following are the steps to be followed in order to have data in these fields

Copy /OPT/VIM_UPDATE_CUSTFIELDS function

In order to fill these fields, we will copy a standard the standard function
module /OPT/VIM_UPDATE_CUSTFIELDS.
This function module is provided in SAP VIM as a template for fill data into extended fields in IIC.

Make sure that you dont change the function interface, else a dumb will occur.
Add Data filling logic
Delete all content of the copied function for /OPT/VIM_UPDATE_CUSTFIELDS and add you
custom logic to retrieve and fill data into the custom fields. The ES_WORKITEM contains some
relevant data ( all the data displayed in the Standard IIC ).

SAP VIM Integrated Invoice Cockpit ABAP Program


Here a sample code for ABAP implementation for a /OPT/VIM_UPDATE_CUSTFIELDS.
In this case, we added only one field. This field in only populated with data for CURR_PROC_TYPE
EQ 801 does mean it filled only for Invalid Vendor status invoices.

1 FUNCTION zvim_iic_update_custfields.
2 DATA: ls_vim_1head TYPE /opt/vim_1head.
3
4 " fill Customer Field
5 IF NOT es_workitem-docid IS INITIAL.
6
SELECT SINGLE *
7
INTO ls_vim_1head
8
FROM /opt/vim_1head
9
WHERE docid = es_workitem-docid.
1
IF sy-subrc = 0.
0
IF ls_vim_1head-curr_proc_type EQ '801' . " @Your Custom Field

1
1
1
2
1
es_workitem-zzfield = 'Put your custom data ...'.
3
ENDIF.
1
ENDIF.
4 ENDIF.
1
5 ENDFUNCTION.
1
6
1
7

Maintain Function Module to Update Customer


Specific Fields
Some customizing has to be done in order to tell SAP VIM to use the custom function for the custom
fields.
Launch /N/OPT/SPRO ( for LiveLink VIM Configuration ).
Follow the path LiveLink VIM -Configuration > Central Reporting >
Integrated Invoice Cockpit > Extensions for Customer Specific Fields >
Maintain Function Module to Update Customer Specific Fields.

In the Constant Value, put your copy of /OPT/VIM_UPDATE_CUSTFIELDS function

Вам также может понравиться