Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
vishesh_malik
Participant

Being my first blog, it might not look very good but I hope atleast few of my friends on SCN will find it useful for them. Sole purpose is to share knowledge :smile:

Why I wrote it ? :

Few days back I was looking for some answer, in pursuit of which, I found this question if it is possible to copy steps from one workflow to another workflow. Someone had replied NO :shock: to that post that NO prompted me :twisted: to correct. The discussion was very old so one of my friend asked me to write a blog on it so that for others it can be easier to search for such a basic question which many beginners(like me :wink: ) wonder. Although it seems to be silly to ask such a question but (being self-learner) I had been through this phase so I can understand sometimes learning even very basic point looks as if you have won a Big battle .

Target Audience :  SAP Workflow Developers (Beginners)

Terminology Used:

  1. Target Template: Workflow template(WS99900327) in which block needs to be copied
  2. Source Template: Workflow Template(WS9990086) in which block needs to be copied.

Steps :

Go to Transaction PFTC

  

Open the Target template.

We can access the Source template directly as well to skip few of the mentioned steps. I would suggest to try once you are done with blog

   

Target Template is open and in Active and Saved state.

   

Now in Information Area, enter the Source template number and Click ‘ENTER’.

    

Below screen shot has Source template which is opened in same session. The structure of this workflow is very complex but divided into 3 parts. We can           copy everything in target template without using Copy-Paste but that could consume a day or two in copying all steps depending upon availability of time and     familiarization with SAP Workflow development. Anyways, never go for manually copying every step if you can copy entire block within minutes with just few       clicks.

Here, I will copy 2nd block of workflow to Target Template.

   

  

Navigate to the block and at the beginning step of block, do right click and copy/cut the template. Alternatively you can click on step and use copy/cut button marked in below screenshot to copy/cut entire block.

ℹ Use ‘CUT BLOCK’ only if that block is supposed to be removed from Source template.

  

Once block is copied a message will appear at Left-bottom of screen ‘Selected entries were copied to clipboard’.

       

Now in Information Area, enter target template number and Click ‘ENTER’.

      


In Target Template, Right click at the place where block is to be copied and click on ‘Paste block’.

     

In the below screenshot, copied block appears in the Target template. The state of workflow template will change to ‘Revised , Not saved’.

       

The entire block is copied but newly added steps also brought new bindings to target Template. To be sure we have all the required workflow container elements used in new bindings in Workflow, perform Syntax check

       

Here, we have 113 errors in Target template which all appeared due to bindings in new steps. I picked just one step(Step 417) to explain how to quickly identify missing container elements. Check ‘Result of Syntax Check’ section at the bottom and scroll down to any error and check the missing container elements.

        

Check data type of missing container elements from Source template and declare all missing workflow container elements. I have declared only 1 element ‘ZNAME1’ just to show the change in results of Syntax check.

       

After declaring container elements again perform syntax check to check if all errors are resolved or not. Since here I declared only 1 workflow container element so error count changes from 113 to 110. Reason is ZNAME1 was used at 3 different steps/bindings so only those 3 got corrected rest still needs to be corrected.

   

Now try to experiment few things on your own. If you have any question, feel free to put in comments I will try to respond ASAP with best of my knowledge. :smile: Suggestions & Comments are welcome.

Good Luck!

14 Comments
Labels in this area