Any Simple Way to check wheter the user is belongs to SharePoint Group in Client object model

Hi All,
Generally we follow these steps to check whether user belongs to this perticular group:
1.Get the "Group" object from the Group Collection based on the group name
2.Get all UserCollection from the "Group" object
3.Take a loop and check with each user object (eg User.ID="777473844")
I am thinking this is time taking process( if group has more than 100 members).
Do we have any shortway to check whether user is belongs to this perticular SharePoint Group?
Thanks in Advance!
Thanks,
Mahesh Yamana
Mahesh@SharepointSolutions

Hi Mahesh,
Below is a CSOM JS code to check whether a user belongs to a group. We get the current user object, and then the list of Groups which the user is part of. And then check if the required group is present or not in the collection.
function retrieveWebSite() {
var clientContext = new SP.ClientContext.get_current();
this.oWebsite = clientContext.get_web();
this.oCurrentUser = this.oWebsite.get_currentUser();
this.oUserGroups = this.oCurrentUser.get_groups();
clientContext.load(this.oUserGroups);
clientContext.executeQueryAsync(
Function.createDelegate(this, this.onQuerySucceeded),
Function.createDelegate(this, this.onQueryFailed)
function onQuerySucceeded(sender, args) {
var Group1 = "Group Name One";
var Group2 = "Group Name Two";
var flag = false;
var iCount = this.oUserGroups.get_count();
for(var i=0; i<iCount; i++)
oGroup = this.oUserGroups.getItemAtIndex(i);
if(oGroup.get_title() != Group1 && oGroup.get_title() != Group2)
flag=true;
else
flag=false; break;
if(flag == true)
//Write your logic here
function onQueryFailed(sender, args) {
alert('Request failed. ' + args.get_message() +
'\n' + args.get_stackTrace());
Ram Prasad Meenavalli | MCITP | MCTS SharePoint | MCPD SharePoint | http://www.spdeveloper.co.in

Similar Messages

  • How to get list of users who all are having full access in sharepoint site using client object model c#

    Hi,
    I want to fetch the list of users who all are having full access to the sharepoint list using client object model with .Net
    Please let me know if any property for the user object or any other way to get it.
    Thanks in advance.

    Here you are complete code i created from some years it lists all groups and users, you can just add a check in the permissions loop to see if it is equal to Full Control.
    Private void GetData(object obj)
    MyArgs args = obj as MyArgs;
    try
    if (args == null)
    return; // called without parameters or invalid type
    using (ClientContext clientContext = new ClientContext(args.URL))
    // clientContext.AuthenticationMode = ClientAuthenticationMode.;
    NetworkCredential credentials = new NetworkCredential(args.UserName, args.Password, args.Domain);
    clientContext.Credentials = credentials;
    RoleAssignmentCollection roles = clientContext.Web.RoleAssignments;
    ListViewItem lvi;
    ListViewItem.ListViewSubItem lvsi;
    ListViewItem lvigroup;
    ListViewItem.ListViewSubItem lvsigroup;
    clientContext.Load(roles);
    clientContext.ExecuteQuery();
    foreach (RoleAssignment orole in roles)
    clientContext.Load(orole.Member);
    clientContext.ExecuteQuery();
    //name
    //MessageBox.Show(orole.Member.LoginName);
    lvi = new ListViewItem();
    lvi.Text = orole.Member.LoginName;
    lvsi = new ListViewItem.ListViewSubItem();
    lvsi.Text = orole.Member.PrincipalType.ToString();
    lvi.SubItems.Add(lvsi);
    //get the type group or user
    // MessageBox.Show(orole.Member.PrincipalType.ToString());
    if (orole.Member.PrincipalType.ToString() == "SharePointGroup")
    lvigroup = new ListViewItem();
    lvigroup.Text = orole.Member.LoginName;
    // args.GroupsList.Items.Add(lvigroup);
    DoUpdate1(lvigroup);
    Group group = clientContext.Web.SiteGroups.GetById(orole.Member.Id);
    UserCollection collUser = group.Users;
    clientContext.Load(collUser);
    clientContext.ExecuteQuery();
    foreach (User oUser in collUser)
    lvigroup = new ListViewItem();
    lvigroup.Text = "";
    lvsigroup = new ListViewItem.ListViewSubItem();
    lvsigroup.Text = oUser.LoginName;
    lvigroup.SubItems.Add(lvsigroup);
    //args.GroupsList.Items.Add(lvigroup);
    DoUpdate1(lvigroup);
    // MessageBox.Show(oUser.LoginName);
    RoleDefinitionBindingCollection roleDefsbindings = null;
    roleDefsbindings = orole.RoleDefinitionBindings;
    clientContext.Load(roleDefsbindings);
    clientContext.ExecuteQuery();
    //permission level
    lvsi = new ListViewItem.ListViewSubItem();
    string permissionsstr = string.Empty;
    for (int i = 0; i < roleDefsbindings.Count; i++)
    if (i == roleDefsbindings.Count - 1)
    permissionsstr = permissionsstr += roleDefsbindings[i].Name;
    else
    permissionsstr = permissionsstr += roleDefsbindings[i].Name + ", ";
    lvsi.Text = permissionsstr;
    lvi.SubItems.Add(lvsi);
    // args.PermissionsList.Items.Add(lvi);
    DoUpdate2(lvi);
    catch (Exception ex)
    MessageBox.Show(ex.Message);
    finally
    DoUpdate3();
    Kind Regards, John Naguib Technical Consultant/Architect MCITP, MCPD, MCTS, MCT, TOGAF 9 Foundation

  • Setting the default value to taxonomy column in sharepoint 2010 using client object model

    I am creating a metadata column and I want to set its default value in sharepoint 2010 using client object model. Can anyone help me?
    My code for creating metadata column is as below:
                ClientContext clientContext = new ClientContext(siteUrl);
                Web site = clientContext.Web;
                List list = site.Lists.GetByTitle("LibraryName");
                FieldCollection collField = list.Fields;
                string fieldSchema = "<Field Type='TaxonomyFieldType' DisplayName='SoftwareColumn' Name='SoftwareColumn' />";
                collField.AddFieldAsXml(fieldSchema, true, AddFieldOptions.DefaultValue);
                //oneField.DefaultValue = "ASP.NET|4c984b91-b308-4884-b1f1-aee5d7ed58b2"; // wssId[0].ToString() + ";#" + term.Name + "|" + term.Id.ToString().ToLower();
                clientContext.Load(collField);           
                clientContext.ExecuteQuery();

    Hi,
    Please try the code like this:
    ClientContext clientContext = new ClientContext("http://yoursite/");
    List list = clientContext.Web.Lists.GetByTitle("List1_mmsfield");
    clientContext.Load(list);
    clientContext.ExecuteQuery();
    FieldCollection fields = list.Fields;
    clientContext.Load(fields);
    clientContext.ExecuteQuery();
    Field f = fields.GetByTitle("mms");
    clientContext.Load(f);
    clientContext.ExecuteQuery();
    Console.WriteLine(f.Title + "---" + f.DefaultValue);
    //2;#A2|a0a95267-b758-4e4d-8c39-067069fd2eef
    //1;#A1|641f5726-992c-41c8-9ddc-204a60b88584
    f.DefaultValue = "1;#A1|641f5726-992c-41c8-9ddc-204a60b88584";
    f.Update();
    clientContext.Load(f);
    clientContext.ExecuteQuery();
    Console.WriteLine(f.Title + "---" + f.DefaultValue);
    Best regards
    Patrick Liang
    TechNet Community Support

  • To extract the users permission on files and folders in sharepoint 2010 using client object model

    To extract the users permission on files and folders in sharepoint 2010 using client object model

    Hello,
    This is sample code to get item level permisison: (Just written in notepad so it is not tested)
    public void ItemLevelPermission()
    SecurableObject curObj = null;
    ListItem curItem = ctx.Web.Lists.GetByTitle("LibraryName").GetItemById(ItemId); -> Use Id of file or folder.
    IEnumerable roles = null;
    roles = ctx.LoadQuery(
    curObj.RoleAssignments.Include(
    roleAsg => roleAsg.Member,
    roleAsg => roleAsg.RoleDefinitionBindings.Include(
    roleDef => roleDef.Name, // for each role definition, include roleDef’s Name
    roleDef => roleDef.Description)));
    ctx.ExecuteQuery();
    Hope it could help
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • How can I get an item and it's attachments from the current list using SP's JavaScript Client Object Model on newform.aspx?

    I only recently learned/read about SharePoint's JavaScript Client Object Model. I'm reading online trying to figure this out but not having much luck.
    On newform.aspx (and dispform.aspx) I want to get the
    current list,
    the last item created, and it's attachments. I now the CAML query I need to get the last item created, but first I have to get the current list and I am not sure how to do that.
    I tried this but it returns null:
    SP.ListOperation.Selection.getSelectedList()

    Hi,
    For your issue, you can get the list name from the new form url and retrieve the list last created item :
    https://social.msdn.microsoft.com/Forums/office/en-US/b90a64f8-2255-41b0-9d91-78335dd4a4cf/get-list-name-from-list-url-through-javascript?forum=sharepointdevelopmentprevious
    http://msdn.microsoft.com/en-us/library/office/hh185007(v=office.14).aspx
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

  • What's the best way to check whether a user is logged in or not?

    I have a question about basic session handling.
    I'm running Tomcat 5.0.30 and have a web application where users can register with a username and password, and then log into a "member site".
    What is the best way of making sure that a user actually has logged in or not?
    What I've done in previous applications I've made is that I've just put a simple variable into the users session after he has successfully entered his password (i.e. Boolean loggedIn=true). Then I just test if this flag is true to grant him access to the member site. Is that a smart way of doing it?
    Are there any libraries I can use which handles sessions for me in a secure way?
    All comments and suggestions are appreciated!

    Maintain a flag using session attributes it to one when the user is logs in set it to value.... and change set it zero or invalidate that session... when the user is logged out...
    use something like this while user had logged in
    session.setAttribute("flag",<unique_number>);
    for checking whether the user had logged in or not...
    if(Integer.parseInt(session.getAttribute("flag").toString())=!<unique_number>){
    out.println("The session had expired");
    out.close();
    }

  • Cisco 2504 Local radius configuration, is their any ways for backing up the user db? In case the WLC dies

    Cisco 2504 Local radius configuration, is their any ways for backing up the user db?  In case the WLC dies

    Please find the guide to keep the backup:-
    http://www.cisco.com/en/US/partner/docs/wireless/controller/7.0/configuration/guide/c70mfw.html#wp1063850

  • Is  any SIMPLE way to legally publish an original music piece to get it into the iTunes store as public domain use just for start up purposes? Any better ideas ? I write contemporary (mostly) dance pieces...any thoughts?

    Is  any SIMPLE way to legally publish an original music piece to get it into the iTunes store as public domain use just for start up purposes? Any better ideas ? I write contemporary (mostly) dance pieces...any thoughts?

    https://itunesconnect.apple.com/WebObjects/iTunesConnect.woa/wa/apply

  • Is there any simple way to close a group of PO's?

    Hello All,
    I was looking an answer for my question on forum but didn't found anything which could help me to solve my issue.
    I would like to close a group of PO's in some period of dates. Is there any simple way to do this? I mean transaction for example, which will let me to choose company number, period of dates  or range of PO numbers and close them by one tick (one action).
    Thank you in advance for any support from your site.
    Regards,
    Kamil

    Kamil,
    Though I have not used this functionality, can you check whether you can use this functionality for mass change?
    Upload and Download of Purchasing Documents
    http://help.sap.com/saphelp_srm70/helpdata/en/09/1f42188473402a890183fd1b7c6082/frameset.htm
    Using this function, you can download purchasing documents as a file to your PC, process them locally, and then upload the changed documents to the SAP Supplier Relationship Management (SAP SRM) system. You can download the following purchasing documents :
    Features:
    The upload/download supports the following functions and possible uses:
    - Cross-Document File Structure
    You can display and process the data in a standard tabular file structure for the documents named above. The file structure assigns a unique technical ID to each data field in a metadata area.
    - Process Document Data Offline and Retain
    You can change or delete existing data, add new data, and transfer all document data, for example, customer fields.
    - Process Large Documents
    This function simplifies the creation of documents with numerous items, and simplifies mass changes to large documents; for example, you can download a document with only one item, and add multiple items to it offline.
    Background processing occurs in the case of very large documents.
    Regards,
    Sandeep

  • IS THERE ANY SIMPLE WAY TO RETURN SPEED PERFORMANCE TO FACTORY SPEED AFTER ABOUT 3 YEARS OF RELATIVELY STANDARD USE?

    Everyone is often so quick to bash all these 'cleaning' utilities but rarely give any solutions.
    There's a lot of critiques and endless lists of what NOT to do to avoid performance problems.
    My Powerbook is 3 years old. It runs like molasses... SLOW.
    I'm not a computer geek, but I'm smart and understand quite a bit more than a newbie.
    Do I need a degree in computer engineering to fix/speed up my mac?
    Yes, I know, the cleaning utilities suck. But is it really true of all of them?
    I'm not totally convinced because there seems to be such a huge market for them.
    Sure, there's a huge market for bottled water too, so maybe they are just useless/marketing crap, but I really want to return to my original speed performance quickly and can't seem to find out if it's possible with a utility.
    I'm not willing to sit down for 3 hours and study line by line b.s. about how to fix it.
    I have no problem if it's not fixable. I've always assumed operating systems outgrow their hardware's capacity to keep up, and sell my old one for a new one, no prob.
    I don't care, really, but again, I'm curious if there is any quick, easy, user-friendly utility or method that I can use to return the speed performance I had as recently as a year ago? (I'd be satisfied with that).
    Anyone willing to bite on that? Anyone willing to not critique, complain, tell me what NOT to do and actually know a solution?
    IS THERE ANY SIMPLE WAY TO RETURN SPEED PERFORMANCE BACK TO (OR CLOSE TO) ORIGINAL FACTORY SPEED AFTER ABOUT 3 YEARS OF RELATIVELY STANDARD USE?
    The only thing I may have done outside of the norm was some video editing, but very little.

    Look for solutions here:
    https://discussions.apple.com/docs/DOC-3521
    https://discussions.apple.com/docs/DOC-3353
    Ciao.

  • How to check if the user has only the display authority of a message

    hi,
    How to check if the user has only the display authority of a message but does not have the change authority for a certain message?
    Best regards,

    hi blake
    though i am an application consultant and for authorisation u need to have help of BASIS person if u r not the one but still i can guide u regarding the same,
    Basically Authorization Management 
    Use
    You can use the following authorization objects to control the authorizations for maintaining business partner data:
    •        Authorization objects for the Business Partner:
    •     &#61601;        B_BUPA_GRP
    •     &#61601;        B_BUPA_ATT
    •     &#61601;        B_BUPA_FDG
    •     &#61601;        B_BUPA_RLT•       
    Authorization objects for relationships:
    •     &#61601;        B_BUPR_BZT
    •     &#61601;        B_BUPR_FDG
    In addition, you can assign an authorization group to a business partner in the dialog. The authorization group controls which users may maintain data for this business partner.
    You can also define authorizations for fields and field groups using the Business Data Toolset (BDT). Depending on the settings you have made, the system carries out the relevant authorization checks.
    In the dialog in the SAP GUI, you can display an overview of the authorizations assigned to you by pressing the button Settings.
    For more information on authorization management, see the Implementation Guide (IMG) of the Business Partner, as well as in the Developer’s Handbook for the BDT under  Authorizations.
    IntegrationAuthorization management for the Business Partner forms part of the  SAP authorization concept.
    Prerequisites
    You have made the necessary settings in Customizing of the Business Partner under Basic Settings--> -Address Management.
    Moving over
    AS ABAP Authorization Concept 
    The ABAP authorization concept protects transactions, programs, and services in SAP systems from unauthorized access. On the basis of the authorization concept, the administrator assigns authorizations to the users that determine which actions a user can execute in the SAP system, after he or she has logged on to the system and authenticated himself or herself.
    To access business objects or execute SAP transactions, a user requires corresponding authorizations, as business objects or transactions are protected by authorization objects. The authorizations represent instances of generic authorization objects and are defined depending on the activity and responsibilities of the employee. The authorizations are combined in an authorization profile that is associated with a role. The user administrators then assign the corresponding roles using the user master record, so that the user can use the appropriate transactions for his or her tasks.
    Authorization Checks 
    To ensure that a user has the appropriate authorizations when he or she performs an action, users are subject to authorization checks.
    The following actions are subject to authorization checks that are performed before the start of a program or table maintenance and which the SAP applications cannot avoid:
    •        Starting SAP transactions (authorization object S_TCODE)
    •        Starting reports (authorization object S_PROGRAM)
    •        Calling RFC function modules (authorization object S_RFC)
    •        Table maintenance with generic tools (S_TABU_DIS)
    Checking at Program Level with AUTHORITY-CHECK
    Applications use the ABAP statement AUTHORITY-CHECK, which is inserted in the source code of the program, to check whether users have the appropriate authorization and whether these authorizations are suitably defined; that is, whether the user administrator has assigned the values required for the fields by the programmer. In this way, you can also protect transactions that are called indirectly by other programs.
    AUTHORITY-CHECK searches profiles specified in the user master record to see whether the user has authorization for the authorization object specified in the AUTHORITY-CHECK. If one of the authorizations found matches the required values, the check is successful.
    Starting SAP Transactions
    When a user starts a transaction, the system performs the following checks:
    •        The system checks in table TSTC whether the transaction code is valid and whether the system administrator has locked the transaction.
    •        The system then checks whether the user has authorization to start the transaction.
    The SAP system performs the authorization checks every time a user starts a transaction from the menu or by entering a command. Indirectly called transactions are not included in this authorization check. For more complex transactions, which call other transactions, there are additional authorization checks.
    •     &#61601;        The authorization object S_TCODE (transaction start) contains the field TCD (transaction code). The user must have an authorization with a value for the selected transaction code.
    •     &#61601;        If an additional authorization is entered using transaction SE93 for the transaction to be started, the user also requires the suitable defined authorization object (TSTA, table TSTCA).
    If you create a transaction in transaction SE93, you can assign an additional authorization to this transaction. This is useful, if you want to be able to protect a transaction with a separate authorization. If this is not the case, you should consider using other methods to protect the transaction (such as AUTHORITY-CHECK at program level).
    •        The system checks whether the transaction code is assigned an authorization object. If so, a check is made that the user has authorization for this authorization object.
    The check is not performed in the following cases:
    You have deactivated the check of the authorization objects for the transaction (with transaction SU24) using check indicators, that is, you have removed an authorization object entered using transaction SE93. You cannot deactivate the check for objects from the SAP NetWeaver and HR areas.
    This can be useful, as a large number of authorization objects are often checked when transactions are executed, since the transaction calls other work areas in the background. In order for these checks to be executed successfully, the user in question must have the appropriate authorizations. This results in some users having more authorization than they strictly need. It also leads to an increased maintenance workload. You can therefore deactivate authorization checks of this type in a targeted manner using transaction SU24.
    •     &#61601;        You have globally deactivated authorization objects for all transactions with transaction SU24 or transaction SU25.
    •     &#61601;        So that the entries that you have made with transactions SU24 and SU25 become effective, you must set the profile parameter AUTH/NO_CHECK_IN_SOME_CASES to “Y” (using transaction RZ10).
    All of the above checks must be successful so that the user can start the transaction. Otherwise, the transaction is not called and the system displays an appropriate message.
    Starting Report Classes
    You can perform additional authorization checks by assigning reports to authorization classes (using report RSCSAUTH). You can, for example, assign all PA* reports to an authorization class for PA (such as PAxxx). If a user wants to start a PA report, he or she requires the appropriate authorization to execute reports in this class.
    We do not deliver any predefined report classes. You must decide yourself which reports you want to protect in this way. You can also enter the authorization classes for reports with the maintenance functions for report trees. This method provides a hierarchical approach for assigning authorizations for reports. You can, for example, assign an authorization class to a report node, meaning that all reports at this node automatically belong to this class. This means that you have a more transparent overview of the authorization classes to which the various reports are transported.
    You must consider the following:
    •     •         After you have assigned reports to authorization classes or have changed assignments, you may have to adjust objects in your authorization concept (such as roles (activity groups), profiles, or user master records).
    •     •         There are certain system reports that you cannot assign to any authorization class. These include:
    •     •         RSRZLLG0
    •     •         STARTMEN (as of SAP R/3 4.0)
    •     •         Reports that are called using SUBMIT in a customer exit at logon (such as SUSR0001, ZXUSRU01).
    •     •         Authorization assignments for reports are overwritten during an upgrade. After an upgrade, you must therefore restore your customer-specific report authorizations.
    Calling RFC Function Modules
    When RFC function modules are called by an RFC client program or another system, an authorization check is performed for the authorization object S_RFC in the called system. This check uses the name of the function group to which the function module belongs. You can deactivate this check with parameter auth/rfc_authority_check.
    Checking Assignment of Authorization Groups to Tables
    You can also assign authorization groups to tables to avoid users accessing tables using general access tools (such as transaction SE16). A user requires not only authorization to execute the tool, but must also have authorization to be permitted to access tables with the relevant group assignments. For this case, we deliver tables with predefined assignments to authorization groups. The assignments are defined in table TDDAT; the checked authorization object is S_TABU_DIS.
    You can assign a table to authorization group Z000. (Use transaction SM30 for table TDDAT) A user that wants to access this table must have authorization object S_TABU_DIS in his or her profile with the value Z000 in the field DICBERCLS (authorization group for ABAP Dictionary objects).
    please See also:
    •        SAP Notes 7642, 20534, 23342, 33154, and 67766
    guess this info will help you,there is one graphic which actually explain the hierarchy of authorisation,i will find some time out to let u know more info about the authorisation
    but if u sit with ur BASIS guy then u can learn lot of things in PFCG
    i guess u r a basis guy,then its not a problem
    best regards
    ashish

  • In howmany ways we can find the User-exits

    In howmany ways we can find the User-exits?

    Hi,
    Copy this code,execute and run this program.Now mention your tcode and it will give you the list of user-exits present in a Tcode.
    *& Report zuserexit
    *& This program helps find Exits for any given transaction
    *& This code is originally adopted from http://www.sap-img.com
    report zuserexit no standard page heading.
    *TABLES
    tables :
    tstc,
    tadir,
    modsapt,
    modact,
    trdir,
    tfdir,
    enlfdir,
    tstct.
    *INTERNAL TABLES AND STRUCTURES
    Internal table to hold Repository Objects
    data : jtab like tadir occurs 0 with header line.
    *Global variables
    data : field1(30).
    data : v_devclass like tadir-devclass.
    *SELECTION-SCREEN
    parameters : p_tcode like tstc-tcode obligatory.
    *START-OF-SELECTION
    START-OF-SELECTION.
    SELECT construct to get data for a given tcode
    select single * from tstc where tcode eq p_tcode.
    if sy-subrc eq 0.
    SELECT construct to get program names
    select single * from tadir where pgmid = 'R3TR'
    and object = 'PROG'
    and obj_name = tstc-pgmna.
    Moving the dev. class to v_devclass if program is of type 1
    move : tadir-devclass to v_devclass.
    if sy-subrc ne 0.
    select single * from trdir where name = tstc-pgmna.
    If Program type = Function Group
    if trdir-subc eq 'F'.
    select single * from tfdir where pname = tstc-pgmna.
    SELECT construct to get Attributes for Function Modules
    select single * from enlfdir where funcname = tfdir-funcname.
    SELECT construct to get FM names
    select single * from tadir where pgmid = 'R3TR'
    and object = 'FUGR'
    and obj_name eq enlfdir-area.
    Moving the dev. class to v_devclass if program is of type F
    move : tadir-devclass to v_devclass.
    endif.
    endif.
    SELECT construct to get SAP enhancements for the dev. class
    select * from tadir into table jtab
    where pgmid = 'R3TR'
    and object = 'SMOD'
    and devclass = v_devclass.
    SELECT construct to get t code texts
    select single * from tstct
    where sprsl eq sy-langu
    and tcode eq p_tcode.
    REPORT OUTPUT
    format color col_positive intensified off.
    Displaying t-code name & text
    write:/(19) 'Transaction Code - ',
    20(20) p_tcode,
    45(50) tstct-ttext.
    skip.
    List headings
    if not jtab[] is initial.
    write:/(95) sy-uline.
    format color col_heading intensified on.
    write:/1 sy-vline,
    2 'Exit Name',
    21 sy-vline ,
    22 'Description',
    95 sy-vline.
    write:/(95) sy-uline.
    SELECT construct to get SAP Enhancements - Short Texts
    loop at jtab.
    select single * from modsapt where sprsl = sy-langu
    and name = jtab-obj_name.
    format color col_normal intensified off.
    Exit names & texts
    write:/1 sy-vline,
    2 jtab-obj_name hotspot on,
    21 sy-vline ,
    22 modsapt-modtext,
    95 sy-vline.endloop.
    write:/(95) sy-uline.
    describe table jtab.
    skip.
    format color col_total intensified on.
    No of Exits
    write:/ 'No of Exits:' ,
    sy-tfill.
    else.
    format color col_negative intensified on.
    If no exits found
    write:/(95) 'No User Exit exists'.
    endif.
    else.
    format color col_negative intensified on.
    If tcode doesn't exist
    write:/(95) 'Transaction Code Does Not Exist'.
    endif.
    Call txn SMOD with selected Exit
    at line-selection.
    get cursor field field1.
    check field1(4) eq 'JTAB'.
    set parameter id 'MON' field sy-lisel+1(10).
    call transaction 'SMOD' and skip first screen.
    Reward if helpful.
    Regards,
    Harini.S

  • Any simple way to do popup image view overlay in DW? Can't get pickachoose+fancybox+fluid working

    Hey all,
    Just wondering if anyone knows any simple ways to create a popup over lay window like what fancybox/lightbox/shadow box does and get it to work with a Dreamwever fluid grid site?
    I've got pikachoose+fancy box to run together perfectly in a plain html page, but when I bring that code into a Dreamweaver fluid grid site, the code doesn't work (well images don't cycle, and popover doesnt load when you click on the image link).
    I'm guessing it's a jquery conflict of some kind.
    Any help would be great, I can post the full code if someone is able to take a look. When I inspect the code in Google Chrome web inspector I get in the console:
    Uncaught TypeError: Cannot read property 'msie' of undefined jquery.fancybox-1.3.4.pack.js:18
    Uncaught TypeError: Object [object Object] has no method 'fancybox'
    Code below
    <!doctype html>
    <html class="">
    <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>-</title>
    <link href="boilerplate.css" rel="stylesheet" type="text/css">
    <link href="css/ce4.css" rel="stylesheet" type="text/css">
    <link rel="stylesheet" type="text/css" href="jquery.fancybox-1.3.4.css" media="screen" />
    <link type="text/css" href="styles/bottom.css" rel="stylesheet" />
    <script src="respond.min.js"></script>
    <script type="text/javascript" src=" https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.js"></script>
    <script type="text/javascript" src="lib/jquery.pikachoose.js"></script>
    <script type="text/javascript" src="jquery.fancybox-1.3.4.pack.js"></script>
    <script language="javascript">
    $(document).ready(function (){
    var a = function(self){
    self.anchor.fancybox();
    $("#pikame").PikaChoose({hoverPause:true,  showCaption:false, text: {previous: "", next: "" }, buildFinished:a});
    </script>
    </head>
    <body>
    <div class="pikachoose">
    <ul id="pikame" >
    <!-- <li><a href="1.jpg"><img src="1.jpg"></a>-->   
    <li>
    <a href="images/1large.jpg">
    <img src="images/1small.jpg"/>
    </a>
    <span></span></li>
    etc... etc...
    Any help would be great

    I don't know what a pikachoose is, but Fancybox2 works in Fluid Layouts.  Copy & paste the following code into a new, blank document.
    <!doctype html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>HTML5, with Fancybox2 Viewer</title>
    <!--LATEST JQUERY CORE LIBRARY-->
    <script src="http://code.jquery.com/jquery-latest.min.js"></script>
    <!--FANCYBOX plugins-->
    <link href="http://cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.4/jquery.fancybox.css" rel="stylesheet" media="screen">
    <script src="http://cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.4/jquery.fancybox.pack.js"></script>
    <style>
    /**this styles image container**/
    #thumbs p {
    float:left;
    width: 180px;
    height: 12.5em;
    margin: 10px 0 0 20px;
    padding: 10px;
    border: 1px solid silver;
    /**rounded borders**/
    -moz-border-radius: 20px;
    -webkit-border-radius:20px;
    border-radius: 20px;
    /**this styles caption text**/
    font: italic 14px/1.5 Geneva, Arial, Helvetica, sans-serif;
    color: #666;
    text-align:center;
    /**recommend using same size images**/
    #thumbs img {
    width:  160px; /**adjust width to thumbnail**/
    height: 120px; /**adjust height to thumbnail**/
    margin-bottom: 1.5em;
    opacity: 0.75;
    #thumbs img:hover {opacity: 1.0}
    /**float clearing**/
    #thumbs:after {
    content:".";
    clear:left;
    font-size:0px;
    line-height:0;
    display:block;
    visibility:hidden;
    </style>
    </head>
    <body>
    <h1><a href="http://fancyapps.com/fancybox/">Fancybox2</a> Viewer with images</h1>
    <!--insert thumbnails with links to full size images below-->
    <div id="thumbs">
    <p><a class="fancybox" data-fancybox-group="gallery" href="http://placehold.it/400x320.jpg" title="optional captions"><img src="http://placehold.it/160x120.jpg" alt="Thumbnail 1" /></a> <br />
    Caption 1
    </p>
    <p><a class="fancybox" data-fancybox-group="gallery" href="http://placehold.it/400x320.jpg" title="optional captions"><img src="http://placehold.it/160x120.jpg" alt="Thumbnail 2" /></a> <br />
    Caption 2
    </p>
    <p><a class="fancybox" data-fancybox-group="gallery" href="http://placehold.it/400x320.jpg" title="optional captions"><img src="http://placehold.it/160x120.jpg" alt="Thumbnail 3" /></a> <br />
    Caption 3
    </p>
    <p><a class="fancybox" data-fancybox-group="gallery" href="http://placehold.it/400x320.jpg" title="optional captions"><img src="http://placehold.it/160x120.jpg" alt="Thumbnail 4" /></a> <br />
    Caption 4
    </p>
    <p><a class="fancybox" data-fancybox-group="gallery" href="http://placehold.it/400x320.jpg" title="optional captions"><img src="http://placehold.it/160x120" alt="Thumbnail 5" /></a> <br />
    Caption 5
    </p>
    <!--end thumbs--></div>
    <!--FancyBox function code-->
    <script>
    $(document).ready(function() {
         $('.fancybox).fancybox();
    </script>
    </body>
    </html>
    Nancy O.

  • Where to check whether the user is Admin  or developer?

    how to check whether the user is Admin or developer????? after he sign's in......I want to use role based login!!!!

    Login into a workspace or login into an application?
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • Is there any simple way to create ods files (OpenOffice Calc)?

    Is there any simple way to create ods files (OpenOffice Calc) using ResultSet (from java.sql)?

    Mabe, you can create CVS files (plain text) Ej...
    ====test.cvs=====
    1, "aaa"
    2, "bbb"
    3, "ccc"
    ===============
    Using a "BufferedWriter"

Maybe you are looking for