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 Ivoice Cockpit display is based on ALV and this ALV is build 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 don’t 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 obnly populated with data for CURR_PROC_TYPE EQ ‘801’ does mean it filled only for ‘Invalid Vendor’ status’ invoices.
DATA: ls_vim_1head TYPE /opt/vim_1head.
" fill Customer Field
IF NOT es_workitem-docid IS INITIAL.
SELECT SINGLE *
WHERE docid = es_workitem-docid.
IF sy-subrc = 0.
IF ls_vim_1head-curr_proc_type EQ '801' . " @Your Custom Field
es_workitem-zzfield = 'Put your custom data ...'.
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
If you still have some question, feel free to contact me with the contact form.?