Type of Object – Enhancement
Description – Displays the new selection area “Print Form As” in Transaction MI21 to call PDF Form
Process – MM
Transaction MI21 does not displays the new selection area “Print Form As”, which enables you to switch from SAP Script to PDF format. This function is not controlled by a business function; rather, it is controlled by a soft switch. This must be set in the control table VERPSOFTSWITCHES. As a result, you cannot activate or deactivate it.
The activation is carried out in the maintenance view VERPSOFTSWITCHES
· Group: ALPDF
· Subgroup: OPS_MM_IM
The “Active” column must be set to “Yes”.
Go to SE24
There is two implicit spot. One at the top and one at the bottom.
Create a spot at the top with the name ZRM07IDRU and write a code as below:
TYPES: BEGIN OF gty_terpsoftswitches, “Structure of terpsoftswitches
group_id TYPE erp_ehp_swf_groupid, “Identifier for a Group of Objects
subgroup_id TYPE erp_ehp_swf_subgroupid, “Identifier for a Subgroup of Objects
is_active TYPE erp_ehp_swf_is_active, “Flag: object group is active
END OF gty_terpsoftswitches.
DATA: gs_terpsoftswitches TYPE gty_terpsoftswitches.
CONSTANTS: gc_alpdf TYPE erp_ehp_swf_groupid VALUE ‘ALPDF’,
gc_ops_mm_im TYPE erp_ehp_swf_subgroupid VALUE ‘OPS_MM_IM’,
gc_y TYPE erp_ehp_swf_is_active VALUE ‘Y’.
*– Fetch the group id, sub group id and active from the table*– terpsoftswitches comparing group id as ‘ALPDF’ and *– sub group id as ‘OPS_MM_IM’SELECT SINGLE group_id
is_activeFROM terpsoftswitchesINTO gs_terpsoftswitchesWHERE group_id = gc_alpdf
AND subgroup_id = gc_ops_mm_im.
IF sy-subrc EQ 0.
*– Check if the Active is “Yes” for the group ‘ALPDF’ and subgroup ‘OPS_MM_IM’
IF gs_terpsoftswitches-is_active EQ gc_y.
*– Set the “Print Form As” as true
r_is_active = abap_true.