HI Midhun,
the problem is clear you are not mapping primary key of the first screen to detail screen, so object query is getting failed.
Thanks
Rakesh,
There is list view of one of the mbo and its detail screen is given above . The detail screen is not a separate screen.
So i think there is no concept of the primary key in this.
If i go to the list view screen at first and once i am clicking the list i am getting the detail screen filled.
But the problem comes when I am trying to come to the list view screen back from the last screen.
Regards
Midhun
HI midhun,
Then on back button event u should again call the success screen and apply object query.
But usually it should work like this.
What do you mean by back button here?
Also only the first list item detail is empty. Remaining list items detail are filled.
can u share ur screen?
The following is the screen flow:Here once the operation is done it will reach the fourth screen. Once click on the ok button will show the updated list screen . the first and 5 th screens are same.
But the problem is 5th screens first item list is empty.
hi,
Try to call once again findall object query after clicking ok button
or check in policy weather it is online or something else?
I tried several times but no use. I am using online policy.
Hi Midhun,
We also faced the same problem and I don’t know the reason and we solved it by creating a custom screen.
I am new to SAP and SUP, so I am not sure this is a correct way. Since all the
data is showing in purchase order screen, you can also create a custom screen
for both purchaseOrders & purchaseOrdersDetails.
Regards,
Fibeesh C.A
How to do it with custom screen?
You can create & load a listview with the field you want to show. I will give you sample code ,which I create to show multiple attachments, here I am showing the file name in the list view and in the click event I am showing the attachment.
In your project open “custom.js” file and add the
following code in function customBeforeNavigateForward(screenKey,
destScreenKey) .
if(screenToShow==="PurchaseOrders"){
var AttachArray = getCurrentMessageValueCollection().getData("PurchaseOrders").getValue();
//alert(AttachArray.length);
var attach= "<div
id='supportViewList'><ul class='mylist' id='Support_content'
data-role='listview' data-theme='d' data-inset='true'>";
for(i=0;i<AttachArray.length;i++){
var fileName = AttachArray[i].getData("Documents_FILENAME_attribKey").getValue();
attach = attach + "<li><a id='" + i + "' name='" + i + "' onclick='return viewAttach(" + i + ");'>" + fileName +"</a></li>"
}
attach = attach + "</ul></div>"
var listview = $('div[id="supportViewList"]');
//Try to remove it first if already added
if (listview.length > 0) {
var ul = $(listview[0]).find('ul[datarole="listview"]');
if (ul.length > 0) {
attach = attach.replace("<div id='supportViewList'><ul class='mylist' id='Support_content' data-role='listview' data-theme='e' data-inset='true'>","");
ul.html(attach);
ul.listview('refresh');
}
}
else {
//load the PurchaseOrdersForm
$('#PurchaseOrdersForm').children().eq(2).hide();
$('#PurchaseOrdersForm').children().eq(3).hide();
$('#PurchaseOrdersForm').children().eq(1).after(attach);
}
Note:
PurchaseOrders is your Purchaseorders screen.
Replace Documents_FILENAME_attribKey with the attribute you want to show in the listview.
viewAttach(i) is a function , in this you can similarly create another page to show the details..
eg:
function viewAttach(ind) {
// To get the data
var AttachArray1 = getCurrentMessageValueCollection().getData( "PurchaseOrders").getValue();
var contentsMessageValue = AttachArray1[parseInt(ind)] .getData("Your attribute name ");
Similarly you can get other data that you want show and create purchase order detail screen .
}
Hi..
To get data on to list screen have you used 'findall" or "findByParameter"?. If findByParameter, then from listview screen to details screen use workflow of type Online and make parameter mapping.
If you are using FindAll. Then do one thing. At screen 4 u have OK button. So on clicking OK button you are updating the PO and again going back to Screen 1. Then u can do in the following way.
From Screen 0 u r calling function( say abc() function ) to display data on to screen 1.
call same function ( abc() ) which u have used in screen 0 to get data on to the screen 1, in screen 4.
For OK button in screen 4 you have two function calls. 1 to update data of PO and another abc(). This will for sure will solve you problem Do this in Custom.js. We have faced such problems many times.
Hi Dura,
I am using find by parameter and the workflow is online. What do you mean by parameter mapping ?
Can you please explain in detail.
Regards
MIdhun.V.P
Hi Midhun, you should check CR#690438. Here is a link for that