Workflow Approval on Material Document

Hallo,
My client requires approval workflow on good receipts.
I would like to share my vision and check with you feasibility or alternatives.
I was thinking to exploit the 'Hold' status, as follow:
1) go to MIGO, input data, put the document on hold
2) start an approval workflow.
3) when workflow ends, create the material document.
Issue is on the business Object, as cannot use MKPF, as the Document on hold status does not get a document number yet.
I have found that 'Held' document are stored in table MMIM_PREDOC_ORG,
I was thinking to create an ZBusiness Object based on the key of table MMIM_PREDOC_ORG, and there create all the relevant methods.
Still I have not figured out how can the approval can be performed technically. (no approve or release button on MIGO)
Would you say this is a viable solution?
Please let me have your feedback.
Best Regards,
Marco

Either you create a module pool that looks like the MIGO Tcode with some button or you use a decisiontask with some options.
Thanks
Arghadip

Similar Messages

  • How to call workflow approve service in loop for multiple documents.

    i have created a serviceHandler for approving the document and i post the comma separated dIDs as a string from workflow approval template(custom template). And in serviceHandler program i pass the did for approving and only first document is approved and for other document its throwing error, Its showing error document revision is not a latest revision but document is having only one revision.
    my code is: can anyone help me.
    public void SendAllDocuments()
            throws DataException, ServiceException{
        try{
        String [] ContentDids;
        System.out.println("+++++++here we are the all SendAllDocuments++++++++++++++");
        String workflowIds = m_binder.getLocal("workflowIds");
        if(!workflowIds.isEmpty()){
             ContentDids = workflowIds.split("\\,");
        }else{
            throw new ServiceException("document are not selected from users, workflowIds"+workflowIds);
        int arrayLength = ContentDids.length;
        for(int iterator=0;iterator<=arrayLength-1;iterator++){
            SendDocumentToUserQueue(ContentDids[iterator]);
        }}catch(Exception e){ e.printStackTrace();}
        m_workspace.releaseConnection();
    //DocMeta table varible which are coming from Internal assignment page
    //xWF_SentFrom",xWorkflowStepAlias",xWF_SendTo",xPurposeForSubmission",xPurposeForRejection",xDocApproval",xWorkflowComments"
    //xInternalAssignment",togroup",xWF_SendToSend",xWF_SendToSend12",xPurposeForSubmissionSend",xWF_SendToApprove",wfSendApproveComments"
    //Revision table variable which can get from getRevisionsTableValueFromDid
    // dDocName", dDocType",dRevLabel",dSecurityGroup",dDocAccount"
    public void SendDocumentToUserQueue(String approvalId) throws DataException, ServiceException{
        try{
            DataResultSet resultset =getRevisionsTableValueFromDid(approvalId);
            String sendToName = m_binder.getLocal("sendToName");
            String sender="takuma";
        //String workflowComments = m_binder.getLocal("workflowComments");
        String workflowReason = m_binder.getLocal("workflowReason");
        m_binder.putLocal("IdcService", "WORKFLOW_Approve");
        m_binder.putLocal("idcToken", m_binder.getLocal("idcToken"));
        m_binder.putLocal("dID", approvalId);
        m_binder.putLocal("xWF_SendTo", sendToName);
        m_binder.putLocal("xPurposeForSubmission","108");
        m_binder.putLocal("xWF_SentFrom", sender);
        m_binder.putLocal("xWorkflowStepAlias", "");
        m_binder.putLocal("xPurposeForRejection", "");
        m_binder.putLocal("xDocApproval", "");
        m_binder.putLocal("xWorkflowComments", "");
        m_binder.putLocal("xInternalAssignment", "");
        m_binder.putLocal("xWF_SendToSend", "");
        m_binder.putLocal("dDocName", getData(resultset,"dDocName"));
        m_binder.putLocal("dDocType", getData(resultset,"dDocType"));
        m_binder.putLocal("dRevLabel", getData(resultset,"dRevLabel"));
        m_binder.putLocal("dSecurityGroup", getData(resultset,"dSecurityGroup"));
        m_binder.putLocal("dDocAccount", getData(resultset,"dDocAccount"));
        executeService(m_binder, sender);
    }catch(Exception e){ e.printStackTrace();}
    public DataResultSet getRevisionsTableValueFromDid(String documentId) throws DataException, ServiceException{
        DataResultSet drs = new DataResultSet();
        try{
            /*String sqlDocType="select dDocType from revisions where dId ='"+documentId+"'";
        ResultSet documentRset = getSystemWorkspace().createResultSetSQL(sqlDocType);
        //handle null pointer exception for DocumentValue
        String DocumentValue = ResultSetUtils.getValue(documentRset, "dDocType");*/
        String sql="select dDocName,dDocType,dRevLabel,dSecurityGroup,dDocAccount from Revisions where dId ='"+documentId+"'";
        ResultSet rset = getSystemWorkspace().createResultSetSQL(sql);
        if (rset == null || rset.isEmpty()) {
            SystemUtils
                    .info("Resultset is null please check database query and Did ="+documentId);
        drs.copy(rset);
        catch(Exception e){
            System.out.println("in catch of getRevisionId Method");
            e.printStackTrace();}
        //handle null pointer exception for DocumentValue       
        return drs;       
    public String getData(DataResultSet dataSet, String value) {
        String fieldValue = "";
        fieldValue = ResultSetUtils.getValue(dataSet, value);
        System.out.println(fieldValue+"value is null in getData Method=======");
        return fieldValue;
    public UserData getFullUserData(String userName, ExecutionContext cxt,
            Workspace ws) throws DataException, ServiceException {
        if (ws == null)
            ws = getSystemWorkspace();
        UserData userData = UserStorage.retrieveUserDatabaseProfileDataFull(
                userName, ws, null, cxt, true, true);
        //ws.releaseConnection();
        return userData;
    public Workspace getSystemWorkspace() {
        Workspace workspace = null;
        Provider wsProvider = Providers.getProvider("SystemDatabase");
        if (wsProvider != null)
            workspace = (Workspace) wsProvider.getProvider();
        return workspace;
    public void executeService(DataBinder binder, String userName)
            throws DataException, ServiceException {
        // obtain a connection to the database
        Workspace workspace = getSystemWorkspace();
        // check for an IdcService value
        String cmd = binder.getLocal("IdcService");
        if (cmd == null)
            throw new DataException("!csIdcServiceMissing");
        // obtain the service definition
        ServiceData serviceData = ServiceManager.getFullService(cmd);
        if (serviceData == null)
            throw new DataException(LocaleUtils.encodeMessage(
                    "!csNoServiceDefined", null, cmd));
        // create the service object for this service
        Service service = ServiceManager.createService(serviceData.m_classID,
                workspace, null, binder, serviceData);
        // obtain the full user data for this user
        UserData fullUserData = getFullUserData(userName, service, workspace);
        service.setUserData(fullUserData);
        // binder.m_environment.put("REMOTE_USER", userName);
        ServiceException error = null;
        try {
            // init the service to not send HTML back
            service.setSendFlags(true, true);
            // create all the ServiceHandlers and implementors
            service.initDelegatedObjects();
            // do a security check
            service.globalSecurityCheck();
            // prepare for the service
            service.preActions();
            // execute the service
            service.doActions();
            // doany cleanup
            service.postActions();
            // store any new personalization data
            service.updateSubjectInformation(true);
            service.updateTopicInformation(binder);
        } catch (ServiceException e) {
            varTrueFalse = false;
            error = e;
            SystemUtils.info("exception in second location=" + e);
            e.printStackTrace();
        } finally {
            // Remove all the temp files.       
            service.cleanUp(true);       
        // handle any error
        if (error != null) {
            error.printStackTrace();
            if (binder.getLocal("StatusCode") == null) {
                binder.putLocal("StatusCode", String.valueOf(error.m_errorCode));
                binder.putLocal("StatusMessage", error.getMessage());
            } else {
                throw new ServiceException(error.m_errorCode,
                        error.getMessage());

    I guess it is caused by the fact that some of variables in the binder refer to the first workflow item. My bet would be dDocName.
    Try to find out what's in the binder if you approve the second item from GUI and what's there when you do it from your program. That should give you enough info what you need to change.

  • Workflow approval of a bunch of documents at folder level : help needed

    Hi
    As part of the PoC work , I require to create a workflow around some 300+ documents (which are in a single folder and checked in to the ocntent server )
    and once a single document is reviewd and Approved , I need to approve all the Documents in that folder automatically / using criteria workflow
    Any suggestions would be of great help
    thnks
    plaxman

    The most obvious problem is your use of:
    set itemPath to file path of addedItems
    By definition, addedItems is a list of items dropped into the folder. Sure, the user might have only dropped one item, but all that means is you have a list containing one item.
    As a result, you can't get 'file path' of a list (not that 'file path' is a valid property, anyway, but the same applies.
    Instead you should look for something more along the lines of (untested):
    on adding folder items to thisFolder after receiving addedItems
      -- iterate through the added items
      repeat with eachItem in addedItems
        set filePath to eachItem as text -- this coerces the file to a text string of its path
        set {oldDelims, my text item delimiters} to {my text item delimiters, ":"}
        -- now build the new path:
        set newPath to ("Other Disk" & text items 2 through -1 of (text items of filePath)) as text
        tell application "Finder"
          duplicate eachItem to (newPath as alias)
        end tell
        set my text item delimiters to oldDelims
      end repeat
    end adding folder items to
    You may have problems, though, if the target disk doesn't have the same directory structure, so some error checking is probably in order.

  • Document Parking Workflow approval process in LIV

    Hi all,
    Can please someone let me know what is the role of a functional consultant in getting the workflow approval process setup  for the Document parking in LIV process
    Also, can please send any links are documentation...
    Would be really thankful for any sort of help
    Thanks

    Hi,
    According to your description, it seems that your main issue is about customID paramerter in workflow approval prcess.
    About this, please refer to the two samples:
    http://blog.petegoo.com/2010/08/22/workflow-4-email-approval-sample/
    http://cgeers.com/2010/04/10/windows-workflow-in-asp-net/
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Leveraging Workflow Approval status in Word document

    I am using SharePoint 2013 and have created an Approval workflow that works as expected.
    I would like to leverage the Approval Status within the document so that if someone views or prints the document, it will show "Pending" or "Approved" depending on where in the approval process the document is.
    Once final approval has been made, I would also like to display within the document (e.g. cover page) the name of the approver, the date the approval occurred.
    Would I have to use a Lookup column and point that to something?

    Hi,
    According to you description, my understanding is that you want to create an approval workflow which is able to set the status and approved time and the approver in the document.
    Per my knowledge, there is no OOTB way to achieve your request. As a workaround, you can set this in document library. If someone views the document library, it will show the status and approved time and the approver in the document.
    You could create a workflow using SharePoint 2010 platform in SharePoint  2013 Designer:
    Create a date column named “Date” and a person column named “Approver” and a Single line of text column named “MyStatus” default value is “Pending” in library.
    In SharePoint Designer 2013 using SharePoint 2010 platform ,select “Start Approval Process” action, set the user.
    Add action “set [Date field] to [Today]”, in Approval -> Change the behavior of the overall task process in Customization field -> in When the Task Process Completes field, shown as figure below.
    Add action “set [Approver] to [Current Task:Assigned To]”, “set [MyStatus] to [Approved]”in Approval -> Change the behavior of a single task in Customization field -> in When a Task Completes field. The steps are similar as above.
    Then you can show the library content type column value in document template via “Quick Parts”,  access library settings -> Advanced settings -> click Edit Template, in Insert tag -> Document Property -> insert column you want, shown as
    figure below.
    Thanks,
    Dean Wang

  • How can we find the Idoc number which posts the material document in SAP

    Hi All,
    How can we find the Idoc number which posts the material document in SAP. We could not able to find the IDOC number from the material document which was posted by Idoc.
    Thanks
    Chandru

    Hi,
    In MIGO you can go to service of object(Just above show overview) and check 5th option workflow you will find the idoc number.
    regards
    suresh

  • Regarding Workflow trigerring using change document

    Hi all,
    I am trying to trigger a workflow using change document object.
    I want that to trigger the workflow on the material master change through MM02.
    I have created  a business object ZBUS1001 and wanted that on change of material master
    the custom change document object should call the workflow
    I went through all the material avaialable over SDN ,but can not find a change object for change in material master through MM02  for std business object  BUS1001.
    Please tell me how to find one.
    Please reply if any one of you have some solution.

    Hi,
    Thanks for your reply.
    I am using an existing change object - MATERIAL_N of Business Object - BUS1001 and the event
    BASICMATERIALCHANGED.
    I have mentioned  the details in the tcode SWEC.
    And even in the workflow i have given the start of event  as the BUS1001 and event BASICMATERIALCHANGED.
    But workflow not called .
    Do we need to maintain an entry in SWED?
    If yes then in function module column what we need to mention.

  • Insering Material document number which is created while posting MBGMCR02

    Hello Friends ,
    i have a requiremnt to insert the material document(mblnr) which is created while by  posting  the MBGMCR02 inbound idoc for
    post goods issue .the requirement is to insert the MBLNR at weo5/we02 at status records.
    message type MBGMCR .
    For example the system will show the status message as 53 if idoc is created successfully and below that the 'message : BAPI EXECUTED SUCCESSFULLY its showing , instead of this message i wanted to show the new MBLNR number there .'
    please help me by giving good suggestions.
    thanks Advance
    Anant

    Is there any standard Function Module to find out FI Document number using Material Document number?
    let me know is there any Function module available to identify these Material Document number or FI Document number?
    Is there any standard Function Module to find out all the details ( such as Invoice date, vendor, amout, tax amount , payment due date, payment terms , approver)  using invoice document number.

  • SPD List serial WorkFlow attach Dynamic approvers, Document Sets attached to List

    SPD Workflow:
    System : SharePoint 2013
     1. Approver's should be fetched from a people picker item of another List based on condition (Filter with department)
     2. Workflow should be serial & approvers should be dynamic from above list item people picker based on department condition
     3. As it is a List workflow i.e., Custom List is associated to Workflow but I need to upload a document set as a List item
     4. When ever user creates a New List Item, Initiation page should allow him to attach multiple documents, while uploading first document into list from Intiation page, it should create a unique document set with a sequence number and other documents
    should be added in the same document set & that document set should be attached to list item.
    5. Action from Email should reflect the workflow approval.
    /*below point is not Important to achieve in SPD*/
    6. I would like to create a separate List or New List after 1000 document sets are uploaded to workflow list & workflow should be associated automatically when a New List is created
    *I know how to achieve It from server or client side coding..
    suggest optimized way to achieve above points in SPD 2013 & OOB only?
    V

    Hi,
    I had tested again with multi workflows which are assigned to three users, they all worked well.
    At first, the workflow would send an email to the first approver, when the first approver approved; then send an email to the second approver, when the second approver approved; then send an email to the third approver.
    When the third approver approved, the workflow would completed, then the assigner who started the workflow would receive an email that the workflow has been completed.
    You can create a simple workflow to check whether it works.
    Such as you can just only use the “Start Approval Process” one action to check whether it works.
    Did the issue occur in other lists or libraries?
    You can create a new list or library, then create an approval workflow to check whether it works.
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • Workflow for parking FI document

    Dear all
    i have configured all the workflow configuration in IMG.
    i park the document from user1
    but when i want to post the document with user2
    the workflow tab is avaiable in document but release check and post button are disable.
    i am stuck here. please guide me what i am missing.

    Dear mauri
    Thanks for you reply.
    but i could not find from where i realse the document..
    i have the documentation which shows the document will post in sbwp for approval. but i could not find the document any of the user...
    I have done the following configuration in SPRO
    1) Create Workflow Variant for Parking Document
    2) Define Entry Screens for Parking Document
    3) Assign Compaany Code to a Workflow variant for Parking Documents
    4) Define Release Approval Groups for Parking Documents
    5) Define Release Approval Path for Parking Doc
    6) Assign Release Approval Path for Parking Documents
    7) Assign Release Approval Procedure for Parking Doc
    8) Define Users with Release Authorization for Parking Document. ( I have assigned the Position of AP-Officer and assign user to this position.)
    This is the issue
    please guide me.
    Edited by: Farhan Rashad on May 21, 2011 1:49 PM

  • Approval for Material Master Creation !

    Dear All ,
    My requirement is to have approval process for Material master. is it possible.?
    My Client is expecting approval process same like PO ( release strategy )
    Is there any standard approval  process for every masters which are  created as part of MM transactions.
    Can it  be achieved by means of any workflow.?
    Thanks
    Jinoy

    Hi,
    Yes it can be achieved by Work flow & also through the Enterprise Portal development.
    If you have Workflow consultant you can take a help in setting up the approval for Material master creation.
    If you want high fund & centralization of Material master you can go for EP development but Cost & effort will be on higher side.
    Discuss with your Workflow consultant he will help you.
    rgds
    gsc

  • Modify object fo material document

    Hi all,
           I'm looking for a modify object for a material document in order to start a workflow based on BUS2017. Someone knows which is the standard modify object?
    Thank you.
                            Gino Bonfiglioli

    The standard object doesn't exist!.
    Bye

  • Workflow write-off of documents

    Hi Gurus,
    I have a requirement where in i will have to develop a custom program and it will fetch all the docs to be written-off and then it will trigger a workflow and workflow should validate (it will see if the doc can be written off by the user who kicks of the workflow)the docs selected by the program , if yes then we have to get all the cost centre details , GL account , amount etc in one of the steps in workflow and then the document is written-off using F-30(whatever process is followed in f-30 to write offshould be done as a background method) , if the user is not authorized then a work item goes to his manager for approval and he should see the item through FB03 link , if he approves it should happen through F-30((whatever process is followed in f-30 to write offshould be done as a background method) or else a mail is sent to the initiator.
    please can some one suggest if there are any BAPIs or BTEs that can suffice my need.
    thanks
    C S Anand.

    Hello Mahendra,
    please have a look at the following link: <a href="http://help.sap.com/saphelp_media472/helpdata/en/69/1b8c82950111d2ac740000e829fbfe/frameset.htm">Liability Account Transfer</a>
    I think this describes it pretty well.
    Tim

  • Workflow approver

    Hi,
    In case of document parking and posting,where can I find the workflow approver.Which tables should I refer to?.Please guide.
    Thanks
    Aravind

    There should be some Org structure maintained in SAP system which u can check by PPOSE....
    And If org struct is maintained then you can check the Approver for the document, from document creators Workplace by
    Setting>Wokflow setting>org assignment... which will show you org assignmet of that person.
    Else there should be some functional configuration which holds the approver information.....
    Regards Dev..

  • Submitted form immediately redirects in workflow approval

    I've created a form submission process following this description https://blogs.oracle.com/kyle/entry/adding_ucm_web_forms_to_site_s and associated the submission with a workflow
    It works, the form gets into ucm and workflow is triggered. However, the confirmation page, what the "form" redirects to after submission shows right away after clicking on the link in the email approval message.
    The service used is SUBMIT_HTML_FORM and the redirect is defined as
                   var currentElement7 = document.createElement("input");
                   currentElement7.setAttribute("type", "hidden");
                   currentElement7.setAttribute("name", "RedirectUrl");
                   currentElement7.setAttribute("value", "<!--$ssNodeLink(ConfirmationPage)--><!--$AdditionalConfirmParameters-->");
                   aForm.appendChild(currentElement7);
    Any ideas on how to prevent the redirect when the form shows for workflow approval ?
    Thanks ...

    Hello Laxman !
    You have stated as follows :
    When i assign method in task there is one tick mark to run in back ground that is in display mode
    so not able to put in background.
    The method you have created in SWO1 could be dialog one.That's why you aren't able to set as back ground in task.So, uncheck the "Dialog" check box under "General" tab.
    Since you are unable to open the Adobe form , the problem could be with binding.Also make sure you pass all the required parameters.
    Please go through the below URL which gives additional details about how to attach Adobe forms as an attachment to work item : http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/60ff6ad3-729b-2b10-6582-fedc82680a29
    Regards,
    S.Suresh

Maybe you are looking for