SAP Fiori – How to remove character restriction in the Comments popup in Approve Requisitions.

Dear Experts,

One of our customers requests for an extension into the note area while confirming purchase orders/purchase requisitions where it has an 80 characters limits in a standard. As a summary, the approval process time wants to enter unlimited characters, not 80 characters, in the note part.


For this, I want to share with you how to remove the character restriction in the Comments window in the Approval Requisitions. As you know, a maximum of 80 characters is allowed in the comment popup in the standard application. In case of need, you can remove this restriction by following the steps below.

First, we copy the standard application and upload it to WEBIDE.


In the installed application you can see the “openApproveRejectDialog” section in view-> controller.js as closed.


After enabling “OpenApproveRejectDialog”, we can write the following code.


I definitely recommend cleaning the cache in the Fiori system after the process is completed and deployed. I share methods to clear cache.

  1. Transaction: /IWFND/CACHE_CLEANUP on Gateway (oData cache clearing).
  2. Transaction: /IWBEP/CACHE_CLEANUP on Backend and Gateway (oData cache clearing).
  3. Run report /UI2/INVALIDATE_GLOBAL_CACHES. This cache clearing is mandatory especially to verify the translations integrated for ex tiles,groups,catalogs in Launchpad admin

We can now enter and confirm unlimited text in Comments popup.

5 1

You can get the complete code from the link below

“”””””All of code””””””””””””””””””””””””””””””””””””””””””””””””””””””””””

   openApproveRejectDialog: function(arg) {

    var CreatedByID = this.oView.getBindingContext().getProperty(“CreatedByID”);

    var sDialogQuestion = “”;

    var sDialogTitle = “”;

    var sDecisionKey = “”;

    var that = this;

    switch (arg[0]) {

      case ‘approve’:

        sDialogQuestion = this.resourceBundle.getText(“dialog.question.approve”, [CreatedByI);

        sDialogTitle = this.resourceBundle.getText(“XTIT_APPROVAL”);

        sDecisionKey = “0001”;

        this.sTextKey = “dialog.success.approve”;

      case ‘reject’:

        sDialogQuestion = this.resourceBundle.getText(“dialog.question.reject”, [CreatedByID];

        sDialogTitle = this.resourceBundle.getText(“XTIT_REJECT”);

        sDecisionKey = “0002”;

        this.sTextKey = “dialog.success.reject”;



    new sap.m.Dialog(this.createId(“s3ApproveRejectDialog”), {

      title: sDialogTitle,

      showHeader: true,

      content: [

        new sap.ui.layout.VerticalLayout({

          width: “100%”,

          content: [

            new sap.m.Text(this.createId(“S3ConfirmRejectDialogTextField”), {

              text: sDialogQuestion


            new sap.m.TextArea(this.createId(“S3ConfirmRejectDialogTextFieldForNotes”), {

              maxLength: 0,

              width: “100%”,

              placeholder: this.resourceBundle


              editable: true





      beginButton: new sap.m.Button({

        text: this.resourceBundle.getText(“XBUT_OK”),

        press: function() {

          var sNoteText = that.byId(“S3ConfirmRejectDialogTextFieldForNotes”).getValue();

          var oResult = {

            isConfirmed: true,

            sNote: sNoteText


          that.handleApproveRejectExecute(oResult, sDecisionKey);




      endButton: new sap.m.Button({

        text: this.resourceBundle.getText(“XBUT_CANCEL”),

        press: function() {




      afterClose: function(oEvent) {






Yazar: S4C