

Place cursor on ‘Method and click ‘Create’. This event parameter represents the Uploaded excel file that is stored as SAP office document. Next click ‘Create’ and specify parameter name as ‘UploadedDoc’ of object type MESSAGE. Place cursor on event and choose ‘Parameters’. Place cursor on event and change its release status to implemented.This event will serve as Triggering event for the Mass Invoice Approval Workflow. On the subsequent popup screen – provide event name ‘MassApprovalRequested’. Place cursor on ‘Events’ and click ‘Create’.On the subsequent popup screen – choose ‘No’, since this field does not reference any Database table. Place cursor on ‘Key Fields’ and click ‘Create’.This number uniquely identifies each upload attempt. Save and Generate object type ‘ZMASSINV’įor the purpose of demo, we can use a numerical field – Batch number as key field.Change Object Release status to ‘Implemented’.Supertype field is blank since this object type is not inherited from any standard SAP business object type Provide Object name, Description and underlying program name.Call transaction SWO1 (Business Object Builder) and create object type ‘ZMASSINV’.Swc_set_element it_swcont ‘UploadedDoc’ l_message.Ĭreate a Custom Business Object – ZMASSINV * Pass document details to the workflow as Event parameter It_swcont TYPE STANDARD TABLE OF swcont INITIAL SIZE 0. Generate new Batch number and trigger approval workflow.Create number range ZBATCHNO for Batch Number.

This action raises ‘MassApprovalRequested’ event of Business object ‘ZMASSINV’ (created in next step) Swc_call_method l_message ‘Display’ l_message_container. Swc_create_object l_message ‘MESSAGE’ l_object_key. READ TABLE documents INDEX 1 INTO document. This action retrieves the document by instantiating business object of type ‘MESSAGE’ and calling its ‘DISPLAY’ method.įoltp TYPE so_fol_tp, “Object folder: Object type from IDįolyr TYPE so_fol_yr, “Object folder: Year from IDįolno TYPE so_fol_no, “Object folder: Number from IDĭoctp TYPE so_doc_tp, “Object: Object Type From IDĭocyr TYPE so_doc_yr, “Object: Year from IDĭocno TYPE so_doc_no, “Object: Number from IDįortp TYPE so_for_tp, “Forwarder: Object type from IDįoryr TYPE so_for_yr, “Forwarder: year from the IDįorno TYPE so_for_no, “Forwarder: number from the ID The Document ID is available within ‘documents’ table. This action opens a Browse window for selecting a File stored on local hard drive and saves it as a SAP office document.

