Passing parameters to a screen.

I am using the following code:
myapp.Dataset1.SomeItem_ItemTap_execute = function (screen) {
myapp.showSomeScreen({
beforeShown: function (objScreen) {
objScreen.CurrentTask = screen.Task.selectedItem;
objScreen.TaskFiles = screen.Task.selectedItem.TaskFiles;
When I clicked on an item to open the screen.  I was not getting the files. The reason was the TaskFiles were not loaded. Then I went to the query definition of the Tasks and under ManageIncludedData, I made the TaskFiles (Included). At that point it
started to work. But since I can have many "Task" items in that page. I do not want to load all the files for every single item.
Looking to solve the problem I used promises like this:
myapp.Dataset1.SomeItem_ItemTap_execute = function (screen) {
myapp.showSomeScreen({
beforeShown: function (objScreen) {
screen.Task.selectedItem.TaskFiles.getTaskDefinitionFiles().then(function () {
objScreen.CurrentTask = screen.Task.selectedItem;
objScreen.TaskFiles = screen.Task.selectedItem.TaskFiles;
Then I went to the query definition of the Tasks and under ManageIncludedData, I made the TaskFiles (Excluded) again. It did not work!
I kind of know why did not work... but I do not know what is the right way to do it in this case. I need to wait for the result of the promise call before showing the screen and I am not sure how to do that.
Any help would be greatly appreciated.

I kind of know why did not work... but I do not know what is the right way to do it in this case.
I need to wait for the result of the promise call before showing the screen
and I am not sure how to do that.
I think you're getting very close.  You have waited for the the result of the promise by placing the code in the
.then() function, but you also need to pass the promise result as an object to the .then() function.  Usually the promise returns with an object having a property
results containing an array of your data.  It ought to look something like this:
myapp.Dataset1.SomeItem_ItemTap_execute = function (screen) {
myapp.showSomeScreen({
beforeShown: function (objScreen) {
screen.Task.selectedItem.TaskFiles.getTaskDefinitionFiles().then(function (taskFiles) {
console.log(taskFiles); objScreen.CurrentTask = screen.Task.selectedItem;
objScreen.TaskFiles = taskFiles.results;
It can help to log taskFiles to console to inspect its properties to see if it's correct.

Similar Messages

  • Passing Parameters from One Screen to Another Screen

    Hi All,
    I need to Pass Parameters from one Module Pool Screen to Another Screen.
    I have two Parameters in First screen. I don't want to use <b>Export and Import</b>
    The first screen record should sit in the Second Screen as it is.
    Please suggest me.
    Thanks and Regards,
    Prabhakar Dharmala

    An Idea,
    Create a function group, in that define global variables. Then create two function module. Pass variable from one function module and get in the another one.
    Hope this will help you to solve. If you need further help I will create and sent you a test code.
    Darshan.
    <i><b>Pl. Reward points to the helpful answer, it motivates us to answer more </b></i>

  • How to pass parameters for second screen to SAP webgui URL

    Hi
    I want to call SAP webgui from an application and want to pass some data which need to be prefilled in the screen.
    Have gone through many threads
    /people/durairaj.athavanraja/blog/2004/09/23/pass-parameter-to-its-url-upadated-21st-june-2008
    https://www.sdn.sap.com/irj/scn/wiki?path=/pages/viewpage.action&pageid=22375
    webbgui  - calling a transaction and specify variant or parameter in url
    Things work fine if I pass values to fields which are on first screen, but I am unable to pass data to fields on next screens.
    Taking an example :
    tCode for vendor creation is XK01 and it has many screens, now when I call url
    http://HOST_NAME:8000/sap/bc/gui/sap/its/webgui/!?sap-client=CLIENT_ID&sap-user=SAP_USER&sap-password=SAP_PASSWORD&language=EN&~transaction=*XK01 RF02K-LIFNR=Ven1001;
    I am able to view Ven1001 in vendor code in first screen
    But when I call
    http://phxng4709:8000/sap/bc/gui/sap/its/webgui/!?sap-client=100&sap-user=testuser1&sap-password=SAP12345&language=EN&~transaction=*XK01 RF02K-LIFNR=Ven1111;RF02K-BUKRS=COCO;RF02K-EKORG=NG01;RF02K-KTOKK=0001;ADDR1_DATA-NAME1=VEN_NAME
    All the fields on first screen get populated but I don't get VEN_NAME in Name1 field on GUI
    Tried this
    http://phxng4709:8000/sap/bc/gui/sap/its/webgui/!?sap-client=100&sap-user=testuser1&sap-password=SAP12345&language=EN&~transaction=*XK01 RF02K-LIFNR=Ven1111;RF02K-BUKRS=COCO;RF02K-EKORG=NG01;RF02K-KTOKK=0001;Ok_Code=ENTR;ADDR1_DATA-NAME1=VEN_NAME
    as well, but no success
    Can anybody help. Thanks in advance
    Ruhi

    you can only pass values to first screen fields

  • How to pass parameters for second screen to SAP webgui URL (ITS)

    Hi
    I want to call SAP webgui from an application and want to pass some data which need to be prefilled in the screen.
    Have gone through many threads
    /people/durairaj.athavanraja/blog/2004/09/23/pass-parameter-to-its-url-upadated-21st-june-2008
    https://www.sdn.sap.com/irj/scn/wiki?path=/pages/viewpage.action&pageid=22375
    webbgui  - calling a transaction and specify variant or parameter in url
    Things work fine if I pass values to fields which are on first screen, but I am unable to pass data to fields on next screens.
    Taking an example :
    tCode for vendor creation is XK01 and it has many screens, now when I call url
    http://HOST_NAME:8000/sap/bc/gui/sap/its/webgui/!?sap-client=CLIENT_ID&sap-user=SAP_USER&sap-password=SAP_PASSWORD&language=EN&~transaction=*XK01 RF02K-LIFNR=Ven1001;
    I am able to view Ven1001 in vendor code in first screen
    But when I call
    http://phxng4709:8000/sap/bc/gui/sap/its/webgui/!?sap-client=100&sap-user=testuser1&sap-password=SAP12345&language=EN&~transaction=*XK01 RF02K-LIFNR=Ven1111;RF02K-BUKRS=COCO;RF02K-EKORG=NG01;RF02K-KTOKK=0001;ADDR1_DATA-NAME1=VEN_NAME
    All the fields on first screen get populated but I don't get VEN_NAME in Name1 field on GUI
    Tried this
    http://phxng4709:8000/sap/bc/gui/sap/its/webgui/!?sap-client=100&sap-user=testuser1&sap-password=SAP12345&language=EN&~transaction=*XK01 RF02K-LIFNR=Ven1111;RF02K-BUKRS=COCO;RF02K-EKORG=NG01;RF02K-KTOKK=0001;Ok_Code=ENTR;ADDR1_DATA-NAME1=VEN_NAME
    as well, but no success
    Can anybody help. Thanks in advance
    Ruhi

    you can only pass values to first screen fields

  • Pass Value from one screen to another screen filter Parameter

    Hi i am developing LightSwitch HTML client using VS 2013
    need some ideas for,
    I am having one browse screen for eg please refer the below,
    BrowseEmployee 
    ID
    Name
    Age
    1
    Srikanth
    25
    2
    Ashok
    25
    when i click on any row, it will lead to another screen (Not to the same entity View screen). In the another screen i am going to show with the lot of details,
    ViewResourceAllocation
    ID
    Name
    Role
    Allocation
    1
    Srikanth
    Developer
    0.5
    1
    Srikanth
    Architect
    0.5
    2
    Ashok
    Tester
    0.6
    2
    Ashok
    Manager
    0.4
    and in this screen i am pulling from SQL view entity, this will have ID field which is common to the previous screen (BrowseEmployee)
    Now my question is,
    1. If i click the ID 1 employee in the 1st screen here i need to show only the Employee ID 1 details alone.
    2. Even i tried to pass the value as parameter to the filters in the second screen, nothing is working out.
    so it will be convenient if i pass the value as filter parameter to the other screen. 
    Can anyone please tell me how to sort out this issue ?
    thanks!

    Hi Srikanth,
    For this issue, you need pass parameter to another screen, this will help you,
    See:
    How to Open a Open Another Screen (with or without Parameters) 
    Best regards,
    Angie
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Problem in passing parameters in FBL1N

    Hi,
    I am having my own selection screen, the parameters of this selection screen are passed to a selection screen of standard transaction FBL1N. This transaction gets data from logical database.
    My problem is , when i pass my data to standard screen of FBL1N, & execute the program, it is not showing the same result as when the transaction is exectued with the same parameters.
    I have checked in debug mode, & the parameters which i pass to the transaction are passed correctly.
    Is it something related to logical database & i need to pass some data or activate the database through any parameter as in the FBL1N screen, this parameter has addition “NO DATABASE SELECTION”.
    Anyone who has faced such a issue pls. reply as to what should be done to handle such problem.
    Thanks in advance.
    Best Regards,
    Prashant

    Hi Rich,
    Here is the code:
    SUBMIT FBL1N TO SAP-POOL
                 VIA           JOB W_JOBNAME
                 NUMBER        W_JOBCOUNT
                 DESTINATION   C_PRINT
                 IMMEDIATELY   C_PRT_IMME
                 KEEP IN SPOOL C_PRT_KSPOOL
                 LINE-COUNT    C_LINE
                 LAYOUT        C_LAYOUT
                 SPOOL PARAMETERS   %_PRINT
                 ARCHIVE PARAMETERS %_PRINT
                 SAP SPOOL-ID
                 WITHOUT SPOOL DYNPRO
                 WITH SELECTION-TABLE I_SELTAB
                 AND RETURN
    regards,
    Ruchi

  • Passing parameters in a html page using xwd_tmppg.create

    We are in the initial stage of Developing a OLAP Web Application using
    Oracle Express Web Agent 6.3.2,Oracle Express Administrator6.3.2.
    Flow of our screens are:-
    We have a login screen that authenticates user entry to access his assigned role screen.Based on the role the user selects we will be listing out the analysis in a screen that the user could access.
    Express Programs are used to create Role and Analysis screen.
    User logged information is passed from login to role screen and to
    analysis screen using XWD_APPPG.CREATE that accepts parameters.
    Moreover this function can only be used to create html page with out
    data views.
    Now let us come to our problem-
    We need to take the user from analysis screen to detailed data view screen that shows the OLAP cube with a back & exit button.As explained earlier you need to use the function XWD_TMPPG.CREATE to create dataview.It is not possible to pass parameters through this function.This function accepts .html as the only parameter.But we need to pass the userid info to get back to analysis screen for the user to select the next analysis.I need the user logged info available in the template file.
    Is there any solution for this problem or any other approach to capture the user logged info in the template file???

    Hi Aneel,
    Thanks for your informative suggestion on how to receive data from
    previous page on to the template page using LOCATION.SEARCH.SUBSTRING
    function.
    I could very successfully get the userid information by implementing
    this method within the SCRIPT boundary.
    I also want to pass this value to a express program embedded
    within the <!--EXPRESS call foot(userid)--> so that it will enable the
    user to go back to List of analysis page.her my footer program will
    inturn call the Analysis Page with the userid information.That's my
    whole idea.
    I tried the following methods to acieve my end result-
    1)Tried to store the value in a local variable in the template & passed
    it to the express program -- Error thrown was "userid is not attached in
    the database"
    2)Directly specifed location.search.sunstring in the express program..
    Still the same error was thrown
    3)Thought of storing the value in the name of hidden object .Still this
    will not work out because i need to declare the object in the FORM..
    Moreover the value is avialable wihin the JAVA SCRIPT range.Out of this
    range template is not able to identify this value.
    Any idea Aneel form your end.
    Can you let me know how to use hidden object in achieving the result.
    I have been working very hard for quite sometime.
    Advance thanks.
    Nanda Kishore

  • How to pass parameters to planning function in WAD

    Hi All,
    I want to pass parameters to planning function in WAD. Pls suggest how can I do that.
    Thanx
    Amit Jain

    Hi Amit,
    insert your planning function as a command in WAD ("EXEC_PLANNING_FUNCTION"). In the screen where you enter the technical name of your planning function you can also insert Data Bindings. There you can do a selection binding for a special characteristic or a variable value. If you want to assign a static (fix) value to a variable for example you can do a variable binding (technical name of variable/variable type "Variable Input String"/Variable Input String: set the required value).
    The same thing can be done executing planning sequences within WAD.
    Brgds,
    Marcel

  • How does customization form pass parameters?

    I need to create my own customization form so it can include linked LOVs and was wondering how the default customization form passed the LOV values back to the calling component.
    I put two copies of the same report on a page and called the customization form for each report selecting different LOV values. Since each report displays the correct results based on the LOV, I assume page parameters are not being used and neither is p_arg_values/p_arg_values.
    Can anyone tell me how this information is being passed to the individual reports?
    Thanks, Larry

    Sharmila,
    I guess I'm confused, the parameters that are selected on the Customization screen are persistent across different login sessions.
    Is is my understanding that passing parameters via p_arg_names/p_arg_values on the URL would not carry over from one logon to another or even allow me to navigate to another page and then back to the "customized" screen and still have the customizated values applicable?
    Are you saying that once I call a page and pass a name/value parameter pair to the page, that the paramter values remain in affect for subsequent calls to the same page where the name/value pair isn't being passed?
    Doesn't the customization screen use the wwpre_api_name and wwpre_api_value methods to pass parameters to components located on a page via the user preference storage?
    When I look at the URL associated with the customization link on my portlets I see the preference_path being passed to the customization form.
    Larry

  • Passing parameters to an ITS Transaction iView Table from Webdynpro Java

    Hi,
    I am calling the IW44 transaction from Webdynpro using ITS, and would like to pass a list of Confirmation Numbers as screen parameters. When I pass parameters to AFRUD-RUECK, I can fill one cell, but my question is how to fill up each row as the technical name will be the same?
    Thanks

    Try this
    <AFRUD-RUECK1>=<parameter1>
    &<AFRUD-RUECK2>=<parameter2>
    [http://help.sap.com/saphelp_nw70/helpdata/en/88/266a3e54a2e946e10000000a114084/frameset.htm]

  • Passing parameters to a BW Report iView dynamically

    Hi All,
    I want to pass parameters to a BW Report iView at runtime. The requirement is as such:
    I have got some screen selection in a webDynpro iView and I need to pass all those selected values to a BW Report iView based on the user selection. eg. start date and end date selection.
    This is on priority please help me as soon as possible.
    Thanks in advance,
    Murtuza

    Hi Rajat,
    I will try to describe my requirement once again. The iview A is the webDynpro iview and iview B is the BW Report iview. Now I want to make some selections in dropdown ,calendars and input fields in ivew A and then make a call to the iview B with all those parameters so that iview B can fire a query based upon the parameters.
    ie. if I selected say startdate as today's date then this should be passed as a parameter to the BW Report iview and i need to set the application parameter for the BW Report ivew. Hope the reuirement is clear now. Please help me.
    Thanks,
    Murtuza

  • Transactional Iview passing parameters for search help window

    Hi Experts,
    I have to create a transaction ivew through which i need to pass parameters to search help window (having two entries ). In has to select the particular entry and then go to next step.
    Can somebody give me guide me how to do it as i couldn't fine correct answer in the existing forum answers.
    Regards,
    Suresh

    Hi Suresh,
    Have you read the [documentation|http://help.sap.com/saphelp_nw70ehp1/helpdata/en/88/266a3e54a2e946e10000000a114084/frameset.htm]?
    >ApplicationParameter
    >
    >You can enter parameter values for certain screen fields for displaying a SAP transaction here.
    >This field is optional.
    >
    >The parameter values are specified with the following syntax:
    >
    ><Screen_field1>=<Parameter1>
    >&<Screen_field2>=<Parameter2>
    >&<...>=<...>,...
    >
    >Process First Screen
    >
    >The possible values are trueand false. By default this field is defined as false. It is a required field.
    >
    >If the value is set to true, this corresponds to the input key function in the transaction. It takes effect if there are no required >fields in the transaction or if all the required values are maintained in the ApplicationParameter property.
    Regards,
    Pierre

  • Passing Parameters to Reports 6.0

    How do I pass parameters from a HTML generated paramter screen residing on a OAS to Reports that reside on the Reports Server?
    Any ideas/suggestions would be of great help
    Thanks
    satish

    First, you need to set up the reports cgi/cartrige to accpet web request via a URL. Please refer to the Reports Server configuration whitepaper available on OTN.
    Reports can generate it's own HTML parameter forms, however if you want to create your own, create an html file containing an html form tag:
    <FORM ACTION="http://myhost.mydomain/cgi/rwcgi60.exe" METHOD="POST">
    and within this form tag, have various input fields:
    <INPUT TYPE="TEXT" NAME="p_param1" SIZE="6" VALUE="ENAME">
    where the NAME is the name of the report parameter. BTW, these fields don't have to be just text - you can have radio buttons, drop-down lists, etc.
    Regards
    The Oracle Reports Team http://technet.oracle.com

  • Linking form and report and passing parameters

    Is it possible to call a link with parameter from form to report? Let's say I have a form based on EMP table and when user clicks on DEPT_ID label I want to pass DEPT_ID as a parameter to a report showing detailed information about this department. All my attempts to do it were unsuccessful.
    I've seen many questions like this in this thread and most answers refer to Portal FAQ document but there is NO information there on linking form forms to reports and passing parameters between them.
    Any help will be greatly appreciated!
    Thanks.
    null

    This can be easily done. First open up two instances of your Portal. In one window, you will need to go into your component you wish to link FROM. In the other window you will need to go into your component you wish to link TO. In the component you wish to link TO there will be a moduleid. Note this somewhere. Then, you will see an area that says: "Call Interface: Show". Click on this. (In the window you are linking to.). In this window, you will see a bunch of stuff. At the bottom you will see a URL call. This is the call you need to use. At the top, it explains each piece of the URL call. Just subsitute YOUR appropriate information into the URL call. In the form you wish to link FROM, you will need to create a button. Just click on the green plus sign at the top of the screen (when in edit mode) and then declare it a button by using the Item Type drop down. Once you create this button, it will appear at the bottom, click on it and you will see an area to insert a Javascript. Click the onClick and insert:
    get_field_name = getField(this.form,'COLUMN_NAME_IN_DATABASE');
    window.open('/pls/cc_prod/DAD_NAME.wwa_app_module.link?p_arg_names=_moduleid&p_arg_values=MOD_ID_HERE&p_arg_names=_sessionid&p_arg_values=&p_arg_names=COLUMN_NAME_IN_DATABASE&p_arg values='+GETFIELD_NAME+'&p_arg_names=_COLUMN_NAME_IN_DATABASE_cond&p_arg_values=%3D');
    In the fourth tab, where it says, "....before displaying form" insert the following: (This will tell the form how to handle the getField function.)
    htp.p('<script language="JavaScript1.3">
    < !--
    function getField(form,fieldName)
    var objName = "";
    var tmp = "";
    var dAction = "";
    var sel_idx = 0;
    var cnt = 0;
    var instance = 0;
    var slicedName;
    var fillData = new Array();
    for (var i = 0; i < form.length; i++)
    slicedName = form.elements.name.split(".");
    tmp = slicedName[2];
    instance = parseInt(slicedName[3],10);
    if (!tmp)
    continue;
    objName = tmp;
    if (objName == fieldName)
    return form.elements[i].value;
    //-->
    </script>');
    I hope this helps.
    null

  • Passing parameters in messages

    hi ,i have to take the g/l account from the screen and display  it in the messasge.
    how to do it?i mean how to <b>pass parameters  to messages</b>!

    Hi,
    Define a MESSAGE-ID in teh report, see SE91 for message class, chhoose a message number with two<b> & &.</b>
    Suppose if u have taken message number 200 from ZX message class.
    REPORT XXX MESSAGE-ID ZX.
    Message e200 WITH itab-glaccount text-001.
    text-001 - Is wrong or xxxx.
    Hope u r clear, reward if this helps.

Maybe you are looking for

  • Error: No standard agreement found for....

    Hello, I've been fighting during hours with this error. I'm using PI 7.1 ehp 1 in a SOAP to RFC scenario and I can't find why this is happening. In the scenario everything it's ok. If I go to the receiver determination I can see the interface determi

  • SOLVED: How can I use or call a function that returns %ROWTYPE?

    Hi edit: you can probably skip all this guff and go straight to the bottom...In the end this is probably just a question of how to use a function that returns a %rowtype.  Thanks. Currently reading Feuerstein's tome, 5th ed. I've downloaded and run t

  • Unable to open D3 NEF in CS3 (Mac) and CS2 (Win)

    I have installed the latest Camera Raw Update file (Mac OSX 10.5.3), but when I try to open a nef-file that was taken with my Nikon D3, CS3 complains about an invalid file type - ??? Opening the same file in Nikon NX works without a problem. A friend

  • Wont play protected content

    My A-TV won't play any protected content. Anyone else having this problem?

  • Files on the base URL

    How can I explore / search for files on a Applets base URL. Is there a simple way to do this without using servlets or some kind of java security programing ?