4

I use SAP standard library: Inbox.

in library class S3.controller by tap on attachments icon is onTabSelect event executed, witch makes

this.fnDelegateAttachmentsCreation();
this.fnFetchDataOnTabSelect("Attachments");
this.fnHandleAttachmentsCountText("Attachments");
this.fnHandleNoTextCreation("Attachments");
break;

fnFetchDataOnTabSelect makes an asynchronous call. During this call is fnHandleAttachmentsCountText already executed, so the update of attachments count occurs before the request for attachments is ready. As far the request for attachments is ready, there is no update for title executed.

On screenshot is AttachmentCountText „Attachnents (1/1)“, that comes from previously selected item. It should be „Attachements (2/2)".

enter image description here

Also if response comes too quick, then view changes to loading view after it received the answer from request. If list of attachments was updated from request callback, then it should not be updated second time.

Here it seems, that there is something on loading, but request is already finished.

enter image description here

How could be Inbox extended, to update the attachment header and content after request is ready?

used SAPUI5-Version: 1.71.4

anatoli
  • 1,385
  • 1
  • 13
  • 35
  • I cannot make changes on `S3.controller` – anatoli Nov 11 '20 at 13:14
  • 1
    To clarify: you didn't extend the MyInbox and you are accessing it in your Launchpad via the semantic object *WorkflowTask* and the action *display*? – MrNajzs Nov 11 '20 at 14:30
  • @MrNajzs, no. I extend MyInbox. I have `S3Custom.controller.js` and some other extensions in `webapp/view` folder – anatoli Nov 11 '20 at 14:45
  • For clarity: you are extending ["My inbox" (version SAP S/4HANA 1909 FPS02)](https://fioriappslibrary.hana.ondemand.com/sap/fix/externalViewer/#/detail/Apps('F0862')/S17OP), correct? – Greg Malewski Nov 14 '20 at 11:56
  • `MyInbox` - yes, but what version - i don´t know at the moment, but i think it should be latest version. – anatoli Nov 16 '20 at 10:35

2 Answers2

4
  • You are using the standard bsp-application ca_fiori_inbox?
  • You didn't create an extension project of the application ca_fiori_inbox with custom coding?

If that's the case, it's a bug in an standard application delivered by the SAP. SAP releases so called notes to fix bugs in their standard applications.

You can import notes in your system via the transaction SNOTE. May ask a SAP Basis Administrator from your company for help.

The following notes exactly describe your problem


If you already extended the SAP standard application(MyInbox) without using ExtensionPoints codechanges in the standard application will not affect your custom extension.

When overriding a controller method, any functionality that was previously provided by it is no longer available. Likewise, any future changes made to the original controller method implementation will not be reflected in the custom controller.

In this case you could still implement the note and check the changes in the standard controller vs. your custom controller on your system and change the respective lines in your custom coding.

Don't fix SAP coding. Report it and get a fix.


The Note 2873960 corrects coding in an abap class, not in the bsp-application(ca_fiori_inbox). So definitly import the note and check if it's fixing your problem.

MrNajzs
  • 525
  • 4
  • 10
  • thanks for comment. unfortunately 2873960 is already imported, but the problem exacly described in 2901520 is not solved, and 2901520 is not for import – anatoli Nov 13 '20 at 12:41
-1

I actually do not know, how the app works, but I want to give it a try.

Since it is an asynchronous function, you can always also wait for the function until it is done. So in your case, you could try to set an await keyword in front of the function.

await fnFetchDataOnTabSelect("Attachments");

This will now wait on this position until it has finished the function call before it will call the next functions. In addition to that you also need to set the upper function onTabSelect to async. So in the end it should look something like this.

onTabSelect: async function() {
    // ...
    this.fnDelegateAttachmentsCreation();
    await this.fnFetchDataOnTabSelect("Attachments"); 
    this.fnHandleAttachmentsCountText("Attachments");
    this.fnHandleNoTextCreation("Attachments");
    // ...
}

Although the Web IDE maybe shows you errors, it does work, since it is an official JavaScript API.

Julian Schmuckli
  • 3,032
  • 9
  • 29
  • 56