Академический Документы
Профессиональный Документы
Культура Документы
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.
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 ).
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