on 05-05-2014 10:03 AM
Hello gurus
i'm now working on a project that allow the user to provide a parameter to the BAPI and the BAPI returns only one row of data and when i started to create the HWC i wasn't able to bind the returned value directly to the screen i had to create a listview control and bind the cells to the MBO and in the details page i can view the data in the controls
is there is a way that i can skip the list view page and start the MBO from a menu or a button and bind the result to the controls manually
Thanks in advance
Hi Karim,
Please correct me if i am wrong.
You want to see "Detailed screen" (not LISTVIEW) as soon as you click on SUBMIT button/some menuitem. Right?
Where: Start : screen key where you have added a custom action
GetDetailsCustomAction: custom action name
This custom Action acts a menu item only but the difference is it wont crate any visible menuitems/buttons on the screen.
5. Look for customAfterNavigationForward menu in custom.js file
Add this code
hwc.customAfterNavigateForward = function(screenKey, destScreenKey) {
if (destScreenKey === "Start") {
menuItemCallbackStartGetDetailsCustomAction ();
return true;
} };
Rgrds,
Jitendra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you jitendra kansal for your reply
but i found this method menuItemCallBackStartGetDetailsCustomAction(); in the workflow.js not in the custom.js is it ok or there must be this function in custom.js by the way i'm using version 2.2
and i had to place the custom action not in the start page because while it is in the start page it jumps straight to the details page i had to place it in the master page that contains the listview
but now another problem appeared in the details page i didnt get any data in this page i dont know is what i did wrong
thanks in advance
could be workflow.js (not sure, have to look once again )
I mentioned this example for understanding purpose. Depending on your requirement, you can set accordingly.
If you are not getting any data, make sure all the settings/mappings done properly, Please share what all you have done.maybe screenshots.
Ok
i created MBO based on BAPI that accepts the username and password then authenticate the user and returns the PERNR from HCM i created attributes manually and propagate them
then i created the HWC and added a button that will perform that action and navigate the user to the second page
and that is the complete workflow
and that is the details page
and below the two pieces of code.
thanks in advance
(You can see that warning says "Argument data length is larger than that of attribute" )
2. From 1st screen where you are passing credentials, after pressing button, it should go to UserLoginDetails screen correct? If yes, then why are you keeping custom action at UserLoginMBO screen? Since Event has to call from 1st screen only.
(You would have dragged and dropped MBO to create these 2 defaults screen. Right?) I don't see "customAction" settings specially "General". Please share.
Thank you very much jitendra kansal for your time and effort but i managed to solve it by this code
function customConditionalNavigation(currentScreenKey,actionName, defaultNextScreen, conditionName, workflowMessage) {
if ((currentScreenKey === 'Start') && (actionName ==='btn_Login')) {
if (conditionName === 'One_Row') {
var values = workflowMessage.getValues();
var m = workflowMessage.serializeToString();
var expenseTracking = values.getData("User_Login_MBO");
var etList = expenseTracking.getValue();
var count = etList.length;
if (count == 1) {
var etRow1 = etList[0];
workflowMessage.updateValues(etRow1);
return true;
}
}
else if (conditionName === 'Two_Rows') {
return false; // ie do the normal navigation which is to go to the
// listview screen
}
}
}
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.