Role Menu/Function using BAPI

In an effort to integrate a customers two products, I am trying to list out all of the roles and menus assigned to a role using JAVA/JCO and BAPI.
Is this relationship well defined enough to use RFC_GET_TABLE_ENTRIES?  I can get a list of the role names from AGR_DEFINE (or V_AGR_SINGL, V_AGR_COLL) , but the menu/function table is not as obvious.   I noticed the ARG_HIERT table, which look like it has the textual names of the menus. I was thinking I'd get back an ID of a object instead of the textual representation. Or is this not recommended? 
Additionally, is there any iterative approach that can be used when listing objects (like roles) where the number of objects is in the 10's of thousands?  The only way I can see now is to fetch all of the names from a view that has only the names, then for each one make a separate call to get the details.
I see there are some nice APis in the com.sap.security.api package, but those will require I have an application living on the J2EE side of SAP and I would like to prevent that if at all possible.
Thanks,
Donny

Thanks for your help.
PRGN_ACTIVITY_GROUPS_LOAD_RFC has some good data in it I can use, however the one piece of information that I am after is the TCODES assigned to a role.
The information that is contained in the AGR_TCODES table. 
Is there a remote function/program I can call that given the name of the role will return all of the tcodes assigned to the role?
PRGN_READ_TRANSACTIONS_ONE_AGR
and
PRGN_1221_READ_TRANSACTIONS
Are exactly they type of thing am after, but they cannot be used for 'remote' calls.
Thanks again,
Donny Smith

Similar Messages

  • Changing Roles in CUA - Using BAPI's

    Hi Experts,
    My scenario is to Create and Change  SYSTEMS and ROLE of parent and children systems in CUA from Oracle .For that
    I am using BAPI_USER_LOCACTGROUPS_ASSIGN , I have been testing this BAPI in SAP system itself, But sometimes its working with respect to my input perfectly  , and few other times its not , Let me put my issue with Example:
    1) User created in SU01 without systems and roles .
    2) Using the above BAPI,  I can assign 3 Systems(1 parent and 2 child system ) and 3 Roles(1 for each),
    3) When i tried to change  roles of the child system i can achieve that ,
    But in 2nd time when i give only 1 parent and 1 child system with roles, in ACTIVITYGROUPS of a Table parameter in the BAPI,
    The role and systems are not get changed .
    My ques is :
    Is my approach wrong ? then  could you tell me the exact behavior of this BAPI with child and parent system?
    Note: After i tried in SAP system and also read lot of threads in SAP SDN , i am posting this que .
    Regards,
    Saravana.S
    Edited by: saravanasap on Jan 23, 2012 9:48 AM

    Hi Experts,
    My scenario is to Create and Change  SYSTEMS and ROLE of parent and children systems in CUA from Oracle .For that
    I am using BAPI_USER_LOCACTGROUPS_ASSIGN , I have been testing this BAPI in SAP system itself, But sometimes its working with respect to my input perfectly  , and few other times its not , Let me put my issue with Example:
    1) User created in SU01 without systems and roles .
    2) Using the above BAPI,  I can assign 3 Systems(1 parent and 2 child system ) and 3 Roles(1 for each),
    3) When i tried to change  roles of the child system i can achieve that ,
    But in 2nd time when i give only 1 parent and 1 child system with roles, in ACTIVITYGROUPS of a Table parameter in the BAPI,
    The role and systems are not get changed .
    My ques is :
    Is my approach wrong ? then  could you tell me the exact behavior of this BAPI with child and parent system?
    Note: After i tried in SAP system and also read lot of threads in SAP SDN , i am posting this que .
    Regards,
    Saravana.S
    Edited by: saravanasap on Jan 23, 2012 9:48 AM

  • How to use Role Menu item in BI 7.0

    Hi experts,
    From web applications desiger in version 3.5 we can use Role Menu item to access our querys easily.
    In version 7.0 this item has been deleted from standard items. How can we manage it ? Thanks a lot
    Best regards,
    Santi

    You can use EP role to have the same functionality.
    Another option is to use the 3.X role menu web item after applying note 1075789, in this case role meny web item will display 7.0 objects also.
    Thanks.

  • How to create Billing Plan in sales order using Function module /BAPI

    hi,
    How to create Billing Plan in sales order using Function module /BAPI
    i hv check few FM such
    BILLING_SCHEDULE_READ
    BILLING_SCHEDULE_GET_NUMBER
    BILLING_SCHEDULE_SAVE
    But unable to create billing plan for a sales order.....any other method to create???

    Hi,
    Use this link.
    Create sales order with billing plan via LSMW and BAPI BUS2032
    BAPI or Function to update Billing Plan in Sales Order Items
    Hope this will help you.
    Regards,
    Vijay

  • How to create Incoming Email Activity using BAPI or Function module

    To create an Incoming Email Activity using BAPI 'BAPI_ACTIVITYCRM_CREATEMULTI' or using 'CRM_ORDER_MAINTAIN' . what parameters i need to pass to a bapi.
    Suggest me with a solution.
    Regards,
    Sanjani

    For activity you must fill the following structures of 'CRM_ORDER_MAINTAIN'...
      CALL FUNCTION 'CRM_ORDER_MAINTAIN'
        EXPORTING
          it_activity_h             = t_activity_h
          iv_collect_exceptions = ''
        CHANGING
          ct_orderadm_h         = t_orderadm_h
          ct_input_fields       = t_input_fields
        EXCEPTIONS
          error_occurred        = 1
          document_locked       = 2
          no_change_allowed     = 3
          no_authority          = 4
          OTHERS                = 5.
    And at the end you must use also 'CRM_ORDER_SAVE' to performe the save.
    Regards.

  • I want F4Help Functionality by using BAPI(Like EVS Concept)

    Hi Friends,
    I have one doubt on F4Help Functionality.
    ABAPer gave one BAPI. that BAPI Having Output Table Structure.
    My Req. By using that i can display F4Help Functionality in Each and every input filed Attribute.
    For Example. By using EVS concept we can display the F4Help Functionality for that input filed.Same i want F4Help Functionality by using BAPI
    How Can i do.Please give me Sussitions.
    Regards
    Vijay K

    Hello Vijay,
    Take a context attribute and bind it to the Input field. now maniplate the SVS (simple value selector) of the Context attribute using the below code
         IWDAttributeInfo l_attInfo =     wdContext.nodeCtx_aa().getNodeInfo().getAttribute(     IPublicsdaf.IsadfElement
                                       .CTX__VA__VARIANTS);
         IModifiableSimpleValueSet l_valueSet =     l_attInfo.getModifiableSimpleType().getSVServices().getModifiableSimpleValueSet();
         l_valueSet.clear();
         l_valueset.put("","");
    what are the values which you keep in the l_valueset.put will come in the required dropdown or EVS.
    in your case you need to execute the BAPI and loop the output and keep the values in the l_valueset.
    Regards,
    Raju Bonagiri

  • How to produce Material output message when use bapi function?

    Dear Experts :
    I use bapi BAPI_GOODSMVT_CREATE to receive stock.
    I find the output message can't create automatically even when I have set the type in MR21.
    Hope someone can teach me how to produce the message when I create the material document by BAPI function.
    Thanks a lot.

    Hi,
    The messages are stored in the return table of the bapi.
    You can search in SCN or Google for BAPI error handling.

  • Creating/confirming transfer order (WM) using bapi/function modules

    Hi,
    I usually use BDC to create transfer orders or other documents in WM, but i've been told that using BAPI is more correct. I'm new to this concept, so could you please tell me how i can find the apropriate BAPI/function modules available for this purpose in 46C ?
    I thank you in advance,
    Bruno

    Hi Gisk,
    i am trying ot create a TO based on a material document and year. Same function as transaction LB12. Do you know which function module i can use for this.
    I am trying to use the function module L_TO_CREATE_SINGLE, i fill in the T_LTAK-MBLNR and T_LTAK-MJAHR. But do not know which fields to fill in.
    Hope you can help me.
    Grtz
    Coeno

  • Using "Role Menu"

    Hai Marc,
    As u know that in "Business Explorer" there are "Web Application Designer". We are studiny that right now. But we have problem when we using one of web item "Role Menu".
    My question is, if i create a template and devided into 2 coloms so then when i click the "role menu" the result appers in the other coloms.....is it posibble????
    Best regards,
    Wawan Suwandi

    Hi,
    you can use a frameset with 2 frames. One for the role menu and one for the content. Otherwise you can use "inline frames"! Dont forget to specify the name from the target (iframe or frame name) as Dirk said!
    Example:
    <html>
    <!-- BW data source object tags -->
    <object>
             <param name="OWNER" value="SAP_BW"/>
             <param name="CMD" value="SET_PROPERTIES"/>
             <param name="TEMPLATE_ID" value="RMENU"/>
             TEMPLATE PROPERTIES
    </object>
    <head>
    <meta http-equiv="Content-Language" content="de">
    <meta name="GENERATOR" content="Microsoft FrontPage 5.0">
    <meta name="ProgId" content="FrontPage.Editor.Document">
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>Neue Seite 1</title>
    </head>
    <body>
    <p><b><font face="Verdana" size="2">Role menu:<BR> </font></b><object>
             <param name="OWNER" value="SAP_BW"/>
             <param name="CMD" value="GET_ITEM"/>
             <param name="NAME" value="ROLEMENU_1"/>
             <param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_MENU"/>
             <param name="GENERATE_CAPTION" value=""/>
             <param name="TARGET" value="iframe1"/>
             <param name="HEIGHT" value="103"/>
             <param name="BORDER_STYLE" value="FORM"/>
             <param name="IFRAME" value="X"/>
             <param name="DISPLAY_USER" value="X"/>
             ITEM:            ROLEMENU_1
    </object></p>
    <p><b><font face="Verdana" size="2">Content:</font></b><br>
    <iframe name="iframe1" src="http://www.sap.com" style="WIDTH: 938px; HEIGHT: 489px">
    Your browser does not support frames</iframe></p>
    </body>
    </html>
    Its only an idea (i got no time to make nicer one). But all in all Frameset looks nicer! You can make cool designs if you want. Many things are possible.
    If you need templates drop me a mail.
    Regards,
    Adem

  • Partner Function Upload using BAPI function BAPIBUSISM007_CREATEFROMDATA

    Hi Guys,
    I can able to create Business Partner in SAP using BAPI function module BAPIBUSISM007_CREATEFROMDATA but i don't able to upload partner function (i.e. It will come under Sales Area)  using this BAPI. I don't want to go for BDC method.Is there any function modules. Is there any function modules or BAPI to upload partner function. Please suggest me.
    Thanks in Advance.
    Regards,
    Anil.

    Dear Anil,
    Few days back even i faced similar problem to upload partner function through BAPI.
    Later i created LSMW for XD02 and uploaded partner functions for those BPs.
    You can try the same.
    Regards,
    Rajesh

  • How to use BAPI function module for maintaing product type to material

    Hi,
    Can you pls suggest me how to use BAPI Fuction module CCAP_REV_LEVEL_MAINTAIN
    for maintaining the product type for the material using change number.
    Pts will be rewarded.
    Best Regards,
    Padhy

    Hi,
    Can you pls suggest me how to use BAPI Fuction module CCAP_REV_LEVEL_MAINTAIN
    for maintaining the product type for the material using change number.
    Pts will be rewarded.
    Best Regards,
    Padhy

  • Material creation for All VIEW using BAPI Function modules

    Dear All,
                 I want to create materials for all views using BAPI F.Ms. By using BAPI_MATERIAL_SAVEDATA i have extended materials for for only specified views. now my requirement is to create Material with All views including Classfication view also. For this i found BAPI_OBJCL_CREATEFM.
             Tell me that shall i use both Fm's at time to create material.Will it work? According to my knowledge we need to create Characters first ,then we should  assign this character to this class, then while creation of material we should select this class .
            so pls guide me the procedure to follow for both FM's .
    Note : Pls don't suggest me LSMW OR BDC procedure.
    regards,
    Prashanth Maturu.

    Hi prashanth,
    U can use both the FM. using BAPI_MATERIAL_SAVEDATA u can create all the views and for classification view use BAPI_OBJCL_CREATE. before assigning class to material u hve to make sure that the characteristics are uploaded and is attched to the class using transaction CL03.
    Regards,
    Anil N.

  • How to not display nodes in a tree if Oracle roles are NOT used?

    How to not display nodes in a tree if Oracle roles are NOT used?
    We don't use Oracle DB roles to grant users access to Forms from the menu. We use a template and role system of our own. Basically a few tables with templates and roles.
    We want to convert our normal Forms menu to a tree menu and one of our key requirements is that when the tree is populated ONLY nodes with programs (i.e. forms) he has been granted to execute is shown.
    Since we don't use Oracle Roles how to do this in a tree?
    I created a function to show/hide LEAF nodes, BUT problem is that there are sub-menu nodes showing even if the leaf-nodes under it has not being displayed. My function has suppressed it.
    My tree query is like this:
    SELECT
         t.status, LEVEL, t.label, t.icon, t.node VALUE
    FROM
         tma_tree_menu t
    WHERE
    tma_authenticate_sys_chk_role(USER, t.node) = 1
    CONNECT BY
         PRIOR t.node = t.master
    START WITH
         t.MASTER IS NULL
    ORDER SIBLINGS BY
    t.position
    The tma_authenticate_sys_chk_role will return 1 only if the user has access to the form under that node.
    I tried the FTree functions in Forms but even that has nothing.
    Any help would be greatly appreciated.
    Edited by: Channa on Mar 17, 2010 6:49 AM

    Would you share the source code? I guess what I need is how exactly you retreive the user credentials from the DB table and set that boolean variable.
    and then how to condition it in UIX?

  • Freight Carrier missing while creating sales order using BAPI

    Hi All,
    I am using BAPI BAPI_SALESORDER_CREATEFROMDAT2 to create sales order. At header level, I am passing sold-to-party,ship-to-party and Freight Carrier fields as partners.
    When the sales order is created it is creating partners sold-to-party,ship-to-party but freight carrier is missing in the partners.
    To partners inernal table, I am passing the partner role and partner number as following:
          int_partners-PARTN_ROLE = 'AG'.
          int_partners-PARTN_NUMB = int_order-kunnr.
          append int_partners.
          clear int_partners.
            int_partners-PARTN_ROLE = 'FC'.  "Frieght carrier
            int_partners-PARTN_NUMB = int_order-kunnr2.
            append int_partners.
            clear int_partners.
          int_partners-PARTN_ROLE = 'WE'.
          int_partners-PARTN_NUMB = int_order-kunnr1.
          int_partners-NAME       = int_order-name1.
          int_partners-NAME_2     = int_order-name2.
          int_partners-STREET     = int_order-street.
          int_partners-POSTL_CODE = int_order-post_code1.
          int_partners-COUNTRY    = int_order-country.
          int_partners-CITY       = int_order-city1.
          int_partners-REGION     = int_order-region.
          int_partners-TRANSPZONE = int_order-transpzone.
          int_partners-TAXJURCODE = int_order-taxcode.
          int_partners-district   = int_order-city2.
          append int_partners.
          clear int_partners.
    Freight Carrier is set up as a "Vendor" instead of Customer in our system.
    If anyone has solution to pass "Freight Carrier" through BAPI, please let me know.
    Thanks,
    Sonali.

    For Vendor (Freight carrier) , I checked the master data and it has partner function defined as VN (vendor).
    I have another issue with the salesorder create BAPI:
    I am getting error
    "E - 000010 : Condition rate does not agree with init. indicator for condition PR00"
    when I am updating the PR00 condition value with '0.0' .
    Please advice if anyone has any idea.
    Thanks,
    Sonali.
    Thanks,
    Sonali.

  • How to header and item data of sales order using bapi interface

    hi friends,
       i am geetha, i having a problem like how to upload sales oder header and item data through va01 tcode using BAPI FUNCTION MODULES.
    i need bapi function modules for header adn item data  and brief explation on that , how to pass importing and tables  parameters to get exact output .
    regards
    geetha.

    Use : BAPI_SALESORDER_CREATEFROMDAT2
    Sales order: Create Sales Order
    Functionality
    You can use this method to create sales orders.
    You must enter at least sales order header data (via ORDER_HEADER_IN structure) and partner data (via the ORDER_PARTNERS table) as input parameters.
    Enter the item data via the ORDER_ITEMS_IN table. You can allocate item numbers manually, by filling in the relevant fields, or the system does it, according to the settings for Customizing, by leaving the relevant fields blank.
    If you have configurable items, you must enter the configuration data in the ORDER_CFGS_REF, ORDER_CFGS_INST, ORDER_CFGS_PART_OF and ORDER_CFGS_VALUE tables.
    Credit cards can be transferred via the BAPICCARD structure, on the one hand, data for card identification, on the other, data for a transaction which has taken place in an external system.
    Once you have created the sales order successfully, you will receive the document number (SALESDOCUMENT field). Any errors that may occur will be announced via the RETURN parameter.
    If no sales area has been created in the sales order header, then the system creates the sales area from the sold-to party or ship-to party, who has been entered in the partner table. If a clear sales area cannot be created, you will receive a system message, and the sales order will not be created.
    Notes
    1. Mandatory entries:
    ORDER_HEADER_IN : DOC_TYPE     Sales document type
                       SALES_ORG    Sales organization
                       DISTR_CHAN   Distribution channel
                       DIVISION     Division
    ORDER_PARTNERS..: PARTN_ROLE   Partner role, SP sold-to party
                       PARTN_NUMB   Customer number
    ORDER_ITEMS_IN..: MATERIAL     Material number
    2. Ship-to party:
    If no ship-to party is entered, use the following: Ship-to party =
    sold-to party.
    3. Commit control:
    The BAPI does not have a database commit. This means that the relevant application must leave the commit, in order that can be carried out on on the database. The BAPI BAPI_TRANSACTION_COMMIT is available for this.
    4. German key words:
    The following key words must be entered in German, independantly of
    the logon language:
    DOC_TYPE     Sales document type, for example: TA for standard order
    PARTN_ROLE   Partner role, for example: WE for ship-to party
    Further information
    You can find further information in the OSS. The note 93091 contains general information on the BAPIs in SD.
    Parameters
    SALESDOCUMENTIN
    ORDER_HEADER_IN
    ORDER_HEADER_INX
    SENDER
    BINARY_RELATIONSHIPTYPE
    INT_NUMBER_ASSIGNMENT
    BEHAVE_WHEN_ERROR
    LOGIC_SWITCH
    TESTRUN
    CONVERT
    SALESDOCUMENT
    RETURN
    ORDER_ITEMS_IN
    ORDER_ITEMS_INX
    ORDER_PARTNERS
    ORDER_SCHEDULES_IN
    ORDER_SCHEDULES_INX
    ORDER_CONDITIONS_IN
    ORDER_CONDITIONS_INX
    ORDER_CFGS_REF
    ORDER_CFGS_INST
    ORDER_CFGS_PART_OF
    ORDER_CFGS_VALUE
    ORDER_CFGS_BLOB
    ORDER_CFGS_VK
    ORDER_CFGS_REFINST
    ORDER_CCARD
    ORDER_TEXT
    ORDER_KEYS
    EXTENSIONIN
    PARTNERADDRESSES
    Exceptions
    Function Group
    2032

Maybe you are looking for

  • How to Test SSRS Custom Data Extension in TSql

    Hi There, I have created a custom data extenstion for SSRS 2008 Reporting Service. I can test the CDE in the Report DataSet -> DataSet Properties -> Query Designer -> Run Query. In the Command Text I pass parameters to the invoked VB code which is of

  • Would like to record what's on my 24" iMac screen.  How?

    I would like to record video of exactly what's appearing on my 2008, 24" iMac screen. I would like to have the video saved directly onto my hard drive. I also have usb and firewire external drives available. Any suggestions on how to do this? And ins

  • Change from iBook to powerbook? Tough choice!

    Sorry if some of you think the question does not belong here. But I really want to get some suggestions from somebody who had or are having the same problem as me. I have been using my iBook for more than two years and everything is almost perfect. H

  • Need Help Applying Gradient to JPEG

    I'm trying to modify my companies logo for our new catalog by applying a gradient to it. I've tried to do this in both Illustrator CS4 and Photoshop CS4 and for some reason I can't get the gradient to apply only to the logo. Instead, it applies the g

  • PPR between the MessageLOVInput and the SubTabs

    Hi, I need information of how i can achieve the PPR action between a messageLOVInput and the tab. From the dev guide i have come to know that the MessageLOVInput doesn't have Enable PPR option so we need to capture the event and handle it manually. T