Skip to Content
Can one have decision buttons within an interactive form that is used within a Guided Procedure step? Well recently I came across such a requirement and with a simple workaround things worked very smoothly. To get an understanding of the requirement, let’s take the example of the well known leave request process. Let’s assume that once manager gets the interactive form in his mailbox, with the details of the leave request, he wants to have the buttons “approve” and “reject” in the interactive form itself. Is this possible to achieve? We know that there are no result states to the interactive form callable object. I am going to describe a simple two step process to meet this requirement. I have taken the offline form as an example, but it is also applicable for online submissions. Though technically possible, the online submission may not make sense from a requirement perspective, since if the approver is online we might as well give him access to an online UI instead of a form.

Step1. Create your interactive form: Open your interactive form using the form designer and add the two buttons “Approve” and “Reject”. image Make sure that both the buttons are “submit” buttons and meant for offline submission with the URL being .(you could also do online submission). image image But now both the buttons are exactly the same how do we differentiate? Well, I added a new check box in the form, named it “Approved” and made it invisible. image image image Now click on the buttons we added earlier and in the “enter” event add the following formcalc code. In the “Approve” button – check box Approved is set to 1 and for the “Reject” button set Approved to 0. By doing so when the appropriate button is clicked the checkbox will be either set or not while submission. image With this, we are done with the form design.

Step 2: Designing and branching within Guided Procedure process. In your Guided Procedure process immediately after your offline form action step, add a new step which will help to resolve the result states. I have used a business logic callable object for doing so. Here are the steps to create such a callable object. Create a Business Logic type Callable object. image Add a Boolean type input parameter “Approved”. image Add two result states that will have the logic as shown. This will make this callable object resolve to either of the result states based on the value of the parameter “Approved”. image Now we can add it to the process and this how it will look like. image So immediately after the “Offline Leave Approval” step you should have the “Decision” step which will help resolve the result states. You will have to do parameter consolidation of the #147;Approved” output parameter (of the “Offline Leave Approval” step) with the “Approved” input parameter (of the “Decision” step). Based on the result states of the “Decision” step you can navigate as shown to send an approval or a rejection mail notification. After understanding the two steps described here you would have got an idea how to implement an approval or any decision capability into an interactive form which is used within a guided procedure step. Applies to: Netweaver 04s SP08 Related Content See the section CAF Functions in detail-> UI Layer ->Interactive forms in SAP CAF Tutorial Center Especially the how to guide on creating a form based process in Guided Procedures: Creating a Form-Based Process Using Adobe (GP)

To report this post you need to login first.


You must be Logged on to comment or reply to a post.

    1. Former Member Post author
      Hi Sravya,

      Good to know that … Well there is one thing which I did not test implementing… a loop back.

      Example… if we have to provide a “Rework” option for the manager where the workitem goes back to the requestor.
      I am not sure if the resubmission of the same interactive form works

      Does your scenario have such a requirement? If so please comment.


  1. Ginger Gatling
    I enjoyed reading your blog – a creative and simple way to get approval steps on forms and return to the approval to the GP context.  Thanks for writing the blog!


  2. Former Member

    Very nice blog, quick question, for the 2 action send Approved/Rejection Email, what kind of callable object did you create?
    Also, is it possible to have a hidden Submit button on the page to invoke a BAPI upon the approver clicking Approved? I’m asking this because when we change the button property to Submit, the click event is removed.

    Thanks for a great blog!!

  3. Former Member
    2 very quick questions…

    what kind of callable objects do the 2 action send approved/rejection email have?

    Is it possible to invoke a BAPI as well as approve the form upon clicking approve?

    Great blog, please keep more coming!

    1. Former Member Post author
      Hi Kunal,

      I apologize that I did not notice your queries earlier. Well, probably you would have figured out how to create a callable object taht can send emails. Well just for the record – I used the callable object type : “Send a notification”(it is under the category miscellaneous”.

      For your next question on calling a BAPI- well you could do anything once you branch into a approval logic where you could have a callable object to call your BAPI. I am not sure why you want to call a BAPI , if it is for validation then you could define this in the validation part of the IAF callable object itself. I hope this helps.


  4. Former Member

    Can anyone post a sample code on how to call BAPI from Adobe Interactive Form using formcalc.

    The reason why I am asking is, I have created a form for Purchase Requisition. After filling all the details for a PR, I have a button ‘Create PR’.

    On clicking the button, it should pass all the details to the BAPI and it should create Purchase Requsition in R/3.

    Links / Documents / Tutorials regarding Online Interactive Forms will be very usefull as I am new to Interactive Forms.



Leave a Reply