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.
We can now enter and confirm unlimited text in Comments popup.
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”;
default:
}
new sap.m.Dialog(this.createId(“s3ApproveRejectDialog”), {
title: sDialogTitle,
showHeader: true,
content: [
new sap.ui.layout.VerticalLayout({
width: “100%”,
new sap.m.Text(this.createId(“S3ConfirmRejectDialogTextField”), {
text: sDialogQuestion
}).addStyleClass(“sapUiSmallMarginBottom”),
new sap.m.TextArea(this.createId(“S3ConfirmRejectDialogTextFieldForNotes”), {
maxLength: 0,
placeholder: this.resourceBundle
.getText(“dialog.ApproveRejectForward.NotePlaceHolder”),
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);
that.byId(“s3ApproveRejectDialog”).close();
}),
endButton: new sap.m.Button({
text: this.resourceBundle.getText(“XBUT_CANCEL”),
afterClose: function(oEvent) {
this.destroy();
}).addStyleClass(“sapUiPopupWithPadding”).open();
“””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””
Yazar: Anar Allahverdiyev
Yazar: S4C
In 24 hours, a complete overhaul might not be possible, but you can definitely make some improvements to your SAP ABAP code. Here’s a...
Dear Experts, I would like to share the branding function’s “how to guide” which is served in SAP SNC. Branding Functions is came out with 7.01...
Dear Experts, One of our customers request for development to send a mail behind the Forward button in purchase orders/purchase requisitions. As you...