How to set first_visible_row for a table on a web dynpro

How can I set the attribute first_visible_row in a table which I placed on a Web Dynpro?
I need the table to scroll automatically to a specific row depending on a date. So I'm calling a method using this date, but how can I change the attribute of the table?
Thank you!

Follow these steps,
1- Create an attribute with char1 in the view context e.g first_vis_row
2- go to the table properties in view and bind the property first_visible_row to this attribute.
3- NOw go to the wddoinit method of the view...
4- read the internal table and find out the index of the row which you want to set as first row. As in ur case you want a specific date in first row. So read the internal table and findout the index.
5- now write this code, say your attribute name is first row inside node flag1...(you can change it for yoru requirement)
DATA lo_nd_flag1 TYPE REF TO if_wd_context_node.
  DATA lo_el_flag1 TYPE REF TO if_wd_context_element.
  DATA ls_flag1 TYPE wd_this->element_flag1.
  DATA lv_first_row LIKE ls_flag1-first_row.
* navigate from <CONTEXT> to <FLAG1> via lead selection
  lo_nd_flag1 = wd_context->get_child_node( name = wd_this->wdctx_flag1 ).
* get element via lead selection
  lo_el_flag1 = lo_nd_flag1->get_element(  ).
* get single attribute
  lo_el_flag1->get_attribute(
    EXPORTING
      name =  `FIRST_ROW`
    IMPORTING
      value = lv_first_row ).
here change the lv_first_row to the index which you got after raeading the internal table.
suppose it's
lv_first_row = 4.
  lo_el_flag1->set_attribute(
    EXPORTING
      name =  `FIRST_ROW`
      value = lv_first_row ).
Hope it works.

Similar Messages

  • How to set a variable in portal session using web dynpro java.

    Hi,
    I have created a web dynpro application, which is running inside portal. I have created a role called "R1". Inside role R1, i have created 3 workset W1, W2 and W3. and inside each workset i have some pages and iviews.
    My requirement is when user logins to the portal , and when he clicks on role R1 for the first time, a login page should come (so that we can do revalidation), and when he enters his password again in that login page , then only workset W1, W2 and W3 should be visible/accessible to him and after successful revalidation, if he clicks again on role R1, in that particular portal session, than that login page should not come.
    for this, i thought i will set a variable in portal session, whenever user successfully revalidated himself, and if after successful revalidation he clicks again on role R1, i will check in doinit method of webdynpro whether variable is set or not (which i already set on successful revalidation), and if it is set then i will do Donavigation else i will present login page to the user.
    Can anyone tells me how to set a variable in portal session using web dynpro java.
    thanks
    Arush

    Hi,
    Try this:
    WDScopeUtil.put(WDScopeType.CLIENTSESSION_SCOPE, key, value)
    WDScopeUtil.get(WDScopeType.CLIENTSESSION_SCOPE, key)
    Ex:
    WDScopeUtil.put(WDScopeType.CLIENTSESSION_SCOPE,"Key1","Value1");
    String value1=WDScopeUtil.get(WDScopeType.CLIENTSESSION_SCOPE,"Key1").toString();
    /people/william.cui/blog/2007/02/12/sharing-session-context-between-parent-and-external-windows-running-on-same-host
    Regards,
    Charan

  • How to set optional for table structure in functiona module

    hi experts,
    as i have small doubt regarding
    while publishing web service by using rfc where i am unable to set optional for table structure i am able to put optional for import parameters may i know how to set optional for table structure ....
    reagrds prabhanjan

    Ignoring the TABLES/CHANGING/EXPORTING argument...
    while publishing web service by using rfc where i am unable to set optional for table structure i am able to put optional for import parameters may i know how to set optional for table structure
    Why not?  There's no issue with marking a TABLES interface parameter with 'Optional' and publishing the function module or function group as a web service...

  • How to set border lines in table and also in template in the smartforms ?

    How to set border lines in table and also in template in the smartforms ?
    As I have to create table with following detals
    total row = 3
    row1 = 3 column
    row2 = 6 column
    row3 = 9 column
    for 2nd and 3rd row data to be fetched using coding.
    so can anybody explain me what should i use
    Table or Template ?
    and I want the border like excel format.
    Can anybody suggest me ?
    Thanks
    naresh

    if the data is multiple i.e. line items choose table.
    if the data is single i.e. fixed choose template.
    Create table
    >  Draw u r no lines
    > choose option select pattern
    > select display framed patterns
    Choose u r required one.
    out lined, or full lined. u can choose option.
    same procedure to be followed for template also.
    with regards,
    Kiran.G

  • What is authorization object and how to create it for a table

    Hi All,
    What is authorization object and how to create it for a table?
    Thanks

    Hi
    Authorization
    For authorization checks, there are many ways of linking authorization objects with user actions in an SAP system. The following discusses three possibilities in the context of ABAP programming.
    Authorization Check for Transactions
    You can directly link authorization objects with transaction codes. You can enter values for the fields of an authorization object in the transaction maintenance. Before the transaction is executed, the system compares these values with the values in the user master record and only starts the transaction if the appropriate authorization exists.
    Authorization Check for ABAP Programs
    For ABAP programs, the two objects S_DEVELOP (program development and program execution) and S_PROGRAM (program maintenance) exist. They contains a field P_GROUP that is connected with the program attribute authorization group. Thus, you can assign users program-specific authorizations for individual ABAP programs.
    Authorization Check in ABAP Programs
    A more sophisticated, user-programmed authorization check is possible using the Authority-Check statement. It allows you to check the entries in the user master record for specific authorization objects against any other values. Therefore, if a transaction or program is not sufficiently protected or not every user that is authorized to use the program can also execute all the actions, this statement must be used.
    AUTHORITY-CHECK OBJECT object
                            ID name1 FIELD f1
                            ID name2 FIELD f2
                            ID namen FIELD fn.
    object is the name of an authorization object. With name1, name2 ... , and so on, you must list all fields of the authorization object object. With  f1, f2 ... , and so on, you must specify the values that the system is to check against the entries in the relevant authorization of the user master record. The AUTHORITY-CHECK statement searches for the specified object in the user profile and checks the useru2019s authorizations for all values of f1, f2 ... . You can avoid checking a field name1, name2 ... by replacing FIELD f1  FIELD f2 with DUMMY.
    After the FIELD addition, you can only specify an elementary field, not a selection table. However, there are function modules available that execute the AUTHORITY-CHECK statement for all values of selection tables. The AUTHORITY-CHECK statement is supported by a statement pattern.
    Only if the user has all authorizations, is the return value sy-subrc of the AUTHORITY-CHECK statement set to 0. The most important return values are:
    ·        0: The user has an authorization for all specified values.
    ·        4: The user does not have the authorization.
    ·        8: The number of specified fields is incorrect.
    ·        12: The specified authorization object does not exist.
    A list of all possible return values is available in the ABAP keyword documentation. The content of sy-subrc has to be closely examined to ascertain the result of the authorization check and react accordingly.
    REPORT demo_authorithy_check.
    PARAMETERS pa_carr LIKE sflight-carrid.
    DATA wa_flights LIKE demo_focc.
    AT SELECTION-SCREEN.
      AUTHORITY-CHECK OBJECT 'S_CARRID'
                      ID 'CARRID' FIELD pa_carr
                      ID 'ACTVT' FIELD '03'.
      IF sy-subrc = 4.
        MESSAGE e045(sabapdocu) WITH pa_carr.
      ELSEIF sy-subrc <> 0.
        MESSAGE e184(sabapdocu) WITH text-010.
      ENDIF.
    START-OF-SELECTION.
      SELECT  carrid connid fldate seatsmax seatsocc
        FROM  sflight
        INTO  CORRESPONDING FIELDS OF wa_flights
        WHERE carrid = pa_carr.
        WRITE: / wa_flights-carrid,
                 wa_flights-connid,
                 wa_flights-fldate,
                 wa_flights-seatsmax,
                 wa_flights-seatsocc.
      ENDSELECT.
    Regards
    Hitesh

  • HOW TO: set anchoredObjectSettings for .palce() object?

    Hi, I'm currently working on interesting script for GREP placing, and I'm wondering how I can set anchoredObjectSettings for .palce() object?
    for(i=0; i < found.length; i++)
        foundElem = new File (myFolder + "/" + found[i].contents);
        found[i].place(foundElem); // Placing Ancored Object
        // HERE IS WHERE I NEED SOME HELP: how to set "anchoredObjectSettings" for just placed Ancored Object
        //anchoredObjectSettings.anchoredPosition = AnchorPosition.ABOVE_LINE;
        //anchoredObjectSettings.horizontalAlignment = HorizontalAlignment.TEXT_ALIGN;
    Here you can download example files - script, InDesign file and images, that should be placed into InDesign file with script
    Dropbox - GREP placing.zip
    PS: I believe this script will be very useful, so if anybody have any ideas/suggestions, and want to help me with further development - this would be great!

    Hi Kai, this script is still under development, here is updated version attached (now it can also place files/images by file name only, without extension):
    #target indesign;
    //#include  "! Basic functions.jsx"
        GREP place files.
        This script will ask to select source folder with files to place,
        and then, with dialog box (or prompt) [this is not implemented yet, so I use static GREP value while developing]
        will ask to type GREP find expresion to search for text placeholder, that need to be replaced with file from source folder we just selected.
        TODO: Check how it works with other than image formats
            Also, this might be usefull to make anchored frame with column widh, and fit image proportionally
    scriptName = decodeURI(File(app.activeScript).name.slice(0, -4)); // detect name of current script without expression
    function Alert(msg) // function for native-looking alerts
        w = new Window ("dialog", scriptName, undefined, {closeButton: true});
        w.preferredSize = [300,75]; // window width and height
        w.margins = 15; // window margins
        w.orientation = "column";
        w.alignChildren = ["left", "top"];
        w.add("statictext", undefined, msg);
        close = w.add ("button", [0,0,96,20], "OK", {name: "Ok"});
        close.alignment = ["right", "bottom"];
        close.onClick = function(){exit();}
        w.show();
    main();
    function main()
        app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll;
        if(app.documents.length == 0)
            Alert("No documents are open. Please open a document and try again."); exit();
        else
            //> START OF doUndoWraper
            if (parseFloat(app.version) < 6) // "app.version < 6" if it's running under an earlier version than CS4, as earlier versions don't support "Undo" in scripts
                doUndoWrapper();
            else
                app.doScript(doUndoWrapper, ScriptLanguage.JAVASCRIPT, undefined, UndoModes.ENTIRE_SCRIPT, scriptName);
            //< END OF doUnoWraper
    function doUndoWrapper() // this is the wraper function UNDO everything script made  by single undo
    {// START OF doUndoWrapper
    defaultGREPexpression = "(?i)^[a-z0-9 _-]+\\.\\w{2,4}$"; // Paragraph that starts with upper or lower case latin character, digits, spaces, hyphen or underscore, and ends with .extension
    var myFilteredFiles;
    var myExtensions = []; // initialize array
    myExtensions.push(".jpg", ".jpeg", ".png", ".gif"); // raster images
    myExtensions.push(".psd", ".tif", ".tiff", ".pdf"); // raster images (layered)
    myExtensions.push(".ai", ".eps", ".svg", ".cdr"); // vector graphics
    myExtensions.push(".mp3"); // audio files
    myExtensions.push(".mp4"); // video files
    myExtensions.push(".swf"); // flash files
    myExtensions.push(".doc", ".docx", ".rtf", ".txt"); // text documents
    myExtensions.push(".xls", ".xlsx"); // table documents 
    //Display the folder browser.
    if(app.activeDocument.saved) // our document was saved before - we suggest to start search for source folder from were InDesign file saved
        var myFolder =  Folder(app.activeDocument.filePath).selectDlg("Select the source folder with files for placing", "");
    else // file was not saved before, so we don't know where to search > suggest to start from Desktop
        var myFolder = Folder.selectDialog("Select the source folder with files for placing", "");
    if(myFolder) // if folder was selected
        //Get the path to the folder containing the files you want to place.
        var files = new Object(); // This will assoc array with FILE_NAME => FILE_EXTENSION
        if(File.fs == "Macintosh")
            myFilteredFiles = myMacOSFileFilter(myFolder);
        else
            myFilteredFiles = myWinOSFileFilter(myFolder);
        if(myFilteredFiles.length != 0) // success: we have found supported files to place
            for(i = 0; i < myFilteredFiles.length; i++)
                var filename = myFilteredFiles[i].fsName.toString().replace(/^.*[\\\/]/, ""); // now we get only file names with extenstions
                var file = [];
                file = filename.split("."); // separate file name from file extension         
                files[file[0]] = file[1]; // write FILE_NAME => FILE_EXTENSION as assoc array
        else // error: There is no supported files for placing in specified folder
            Alert("ERROR: There is no supported files for placing in specified folder.");
            exit();
    else // ERROR: we have not choose source folder
        Alert("Folder with source files was not specified"); exit();
    //Windows version of the file filter.
    function myWinOSFileFilter(myFolder)
      var myFiles = new Array;
      var myFilteredFiles = new Array;
      for(myExtensionCounter = 0; myExtensionCounter < myExtensions.length; myExtensionCounter++)
            myExtension = myExtensions[myExtensionCounter];
            myFiles = myFolder.getFiles("*"+ myExtension);
      if(myFiles.length != 0)
                for(var myFileCounter = 0; myFileCounter < myFiles.length; myFileCounter++)
      myFilteredFiles.push(myFiles[myFileCounter]);
      return myFilteredFiles;
    function myMacOSFileFilter(myFolder)
      var myFilteredFiles = myFolder.getFiles(myFileFilter);
      return myFilteredFiles;
    //Mac OS version of file filter
    //Have to provide a separate version because not all Mac OS users use file extensions and/or file extensions are sometimes hidden by the Finder.
    function myFileFilter(myFile)
        var myFileType = myFile.type;
        switch (myFileType)
            case "JPEG":
            case "EPSF":
            case "PICT":
            case "TIFF":
            case "8BPS":
            case "GIFf":
            case "PDF ":
                return true;
                break;
            default:
            for(var myCounter = 0; myCounter<myExtensions.length; myCounter++)
                var myExtension = myExtensions[myCounter];
                if(myFile.name.indexOf(myExtension)>-1)
                    return true;
                    break;
      return false;
    //> START OF GREP expression dialog
    w = new Window ("dialog", scriptName+": specify expression", undefined, {closeButton: true});
    w.preferredSize = [300,75]; // window width and height
    w.margins = 15; // window margins
    w.orientation = "column";
    w.alignChildren = ["left", "top"];
    panel = w.add("panel", undefined, "Find what: (GREP expression)");
    if(app.findGrepPreferences.findWhat != "")
        grepExpression = app.findGrepPreferences.findWhat;
        clearFindWhat = false;
    else
        grepExpression = defaultGREPexpression; // use default GREP expression
        //fgrepExpression = "\\[.+\\]"; // \\< means "begining of the world", and \\> means end of the world;
        clearFindWhat = true;
    var grepExpression = panel.add ("edittext", [0,0,270,20], grepExpression);
    grepExpression.active = true;
    panel.add("statictext", undefined, "GREP expression no need for for double \\\\ escaping");
    ok = w.add ("button", [0,0,96,20], "Continue", {name: "Ok"});
    ok.alignment = ["right", "bottom"];
    ok.onClick = function()
        findWhat = grepExpression.text; 
        w.hide();
    w.show();
    //< END OF GREP expression dialog
    if(typeof findWhat !== "undefined") // check we have not left GREP expression field empy
        app.findGrepPreferences.findWhat = findWhat; // our GREP that search for image placeholder text;
        found = app.activeDocument.findGrep();
        for(i=0; i < found.length; i++)
            if(found[i].contents.indexOf(".") > -1) // we wroking with file name with extension
                foundElem = new File (myFolder + "/" + found[i].contents);
            else // we work with file name only, so we need to add file extension manually
                found[i].contents = found[i].contents.replace(/[^a-z0-9 _-]/gi, ""); // remove all unwanted characters from file name: only letters, numbers, spcaces, minus and underscores allowed     
                foundElem = new File (myFolder + "/" + found[i].contents + "." +  files[found[i].contents]);     
          try
                placedObj = found[i].place(foundElem)[0].parent; // THANKS TO: Jump_Over for help @ https://forums.adobe.com/message/6912489#6912489
                placedObj.anchoredObjectSettings.anchoredPosition = AnchorPosition.ABOVE_LINE;
                placedObj.anchoredObjectSettings.horizontalAlignment = HorizontalAlignment.TEXT_ALIGN;
                placedObj.frameFittingOptions.autoFit = true;
                placedObj.frameFittingOptions.fittingOnEmptyFrame = EmptyFrameFittingOptions.FILL_PROPORTIONALLY;
                placedObj.frameFittingOptions.fittingAlignment = AnchorPoint.CENTER_ANCHOR;         
            catch(e)
                Alert(e);         
        app.changeGrepPreferences.changeTo = "";
        app.activeDocument.changeGrep();
        if(clearFindWhat) // clearing only if typed GREP expression manually
            app.findGrepPreferences = app.changeGrepPreferences = null; // clear Find/Change preferences once we finished
    else
        Alert("Find what GREP expression was not specified"); exit();
    }// END OF doUndoWrapper
    Top part with Windows/Mac filtering was copy-pasted from default InDeign script "ImageCatalog.jsx" as example and modified - I'm not sure if all this stuff is needed, I haven't test if it works the same without those filtering on both OS - if that's not needed - then thanks for tip!
    PS: in your findWhat \l{3,4} will not catch .ai files
    and what means .source at the end? is that doing necessary escaping, so with it it's posible to write \l instead of \\l

  • How to set View for Completed items inside Tasks?

    How to set button for 'View' and see Completed items or not completed inside Tasks?

    Hi,
    You want to set custom views for Tasks folder so that when we click a view button, it will show all Completed or incomplete tasks, am I correct?
    Which version of Outlook are you using? There are existing views for completed/incomplete tasks in Outlook. In Outlook 2010 and Outlook 2013, we can find the buttons under View tab > Change View. Click Completed button to view all completed
    tasks; Click Active button to view incomplete tasks.
    In Outlook 2007, just click View > Current View to switch between different views.
    If I've misunderstood something, please feel free to let me know.
    Regards,
    Steve Fan
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • How to set  password for BPEL domain

    Hi,
    I am new to SOA.
    I want to setup client-server environment for few developers.
    I installed SOA 10.1.3.3 in the server machine.
    And I created few domains in BPEL, one for each developer.
    It didn't ask me to set the password while creation of the domain.
    Please let me know how to set password for newly created domain so that each developer login to his/her own domain and manage processes.
    Thanks!!!

    Thanks for the prompt response.
    What roles should I give to my developers to allow them to manage their services in ESB control, BPEL control, WSM control.
    And I would like to know how to set the password for a BPEL domain too.
    Message was edited by:
    user644377

  • How to set password for every application

    Hi,
    As a administrator how to set password for every weblication in sharepoint 2013.
    Is there any way to set?
    Thanks,

    Who's password are you trying to set? Please provide more details.

  • How to set password for a zip file and should be checked when reading that

    Hi friends,
    how to set password for a zip file and should be checked when reading that file???
    thanks.
    Praveen Reddy.J

    Heyy man, i think, u did not get my problem.
    all i have to do is:
    i have to create a zip file, and we should secure it with password when creating. and whenever the user wants to open that zip file he should provide correct passowrd otherwise he could not read that file. So, we should check for that also.
    Tanks for reply.

  • How to set password for Local are connection?

    How to set password for Local are connection?

    do you mean the 802.1x authentication?
    check out links below:
    http://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst2950/software/release/12-1_9_ea1/configuration/guide/scg/Sw8021x.html
    http://technet.microsoft.com/en-us/network/bb545365.aspx
    Every second counts..make use of it. Disclaimer: This posting is provided AS IS with no warranties or guarantees and confers no rights.
    IT Stuff Quick Bytes

  • How to set value for trim and bleed using jsx script?

    I have tried using bleedoffsetRect but somehow it is not working. Can anybody please help me on how to set value for trim and bleed using jsx script? Any example will be highly appreciated.
    Following is the code I am trying with:
    var _saveName = new File ( root_path +_strFileName+".pdf");
        var _saveOpts = new PDFSaveOptions();
        _saveOpts.printerResolution = 300; 
        var bleedarray = new Array();
         bleedarray[0] =9.00;
         bleedarray[1]=9.00;
         bleedarray[2]=9.00;
         bleedarray[3]=9.00;    
        _saveOpts.bleedOffsetRect = bleedarray;

    I would expect although I've not actually tried this for the bleed off set box to be larger than the artbaord and the first two values to be negative or 0…
    var bleedarray = new Array(-9,-9,artboard.width+9,artboard.height+9);
    Where 'artboard.width' & 'artboard.height' you will have calculated from your file. An Array(9,9,9,9); would not constitute any boxes bounds.

  • How to set sourceURL for MS Access database in other computer?

    How to set sourceURL for MS Access database in other computer?
    getConnection("jdbc:odbc://www.micrsoft.com:9999/msaccess");
    How do you determine the port for the MS Access?
    Thank you very much.

    How to set sourceURL for MS Access database in other computer?You don't.
    How do you determine the port for the MS Access?You don't.
    Databases like Oracle and MS SQL Server have 'server' software which runs on a server computer. Requests talk to that server software. MS Access does not have a server, so there is nothing to talk to.
    You either must use a DSN or create you own server. For the DSN each client must have a mapped driver to the computer with the database. For your own server search the Sun site for JDBC drivers or use RmiJdbc (http://www.objectweb.org/)

  • How to create view for xmltype table in oracle

    hi:
    Can some one help me how to create view for xmltype table in oracle?
    XMLType do not have column
    Sem

    Thank you !!
    I read it and become very hard to implement what I want to do.
    Can you give me example please?
    My main goal to create view for xmltype table is to XQuery the XML data?
    Do you have any other suggestion?
    Please help
    Ali_2

  • How to change tablespace for a table in 10g?

    Does anyone know how to change tablespace for a table (like changing tablespace for an index [alter index ... rebuild tablespace ... ])? Many thanks in advance.

    alter table tablename move tablespace newtsname;
    You need to rebuild the indexes after the move.

Maybe you are looking for

  • How do I transfer music from my iPod to my MacPro?

    How can I transfer music from my iPod Classic to my current MacPro laptop? I thought I could "Match" them but from what I am reading in this process it seems to want to delete the music in my  iPod during the process and then upload music from my Mac

  • Issue with structure and RKF

    Hi All, i am having a requirement where i need to create 10 restricted key figures and need to place in the rows, i am unable to place them in the row without structure, is der any alternate solution for this. another thing is i had created a structu

  • For File -- RFC-- File scenario want to remove sync/async bridge

    For File -- RFC-- File scenario want to remove sync/async bridge Can I work with File -- RFC-- File scenario without BPM Regards

  • How to delete trailing zeros after the decimal point in the ALV sum

    Hello Expert, In my alv output, I need to sum up one column, but in the sum result, I don't want to display zeros after the decimal point. for example, If the sum is 134.00, I only want to display 134 on the alv. Does any expert have idea about it? T

  • Iphone 4 will not charge past 5% and will not sync with my Macbook Pro

    It will also not show up in itunes.. The liquid damage indicators are both white... when I compared the ports on my phone and my friends phone there are no differences that I can see... And I've cross tested every cable and charger with another phone