Script to Assign Groups

I have a script (see below) that assigns users to Groups. This worked fine in 9.0.2.3 but is not working in 10G.
Has anybody done this in 10G?
-- Assign User to Group
BEGIN
l_group := 'cn='||p_group||',cn=portal_groups,cn=groups,dc=sunportal,dc=centuryltd,dc=com';
l_member := 'cn='||p_name ||','||wwsec_oid.get_user_search_base;
wwsec_oid.grant_group_membership (p_group_dn => l_group, p_member_dn => l_member);
l_group_id := wwsec_api.group_id(p_group);
wwsec_api.set_defaultgroup(l_group_id, p_name);
EXCEPTION
WHEN OTHERS THEN
RAISE_APPLICATION_ERROR (-20001,'Call to wwsec_oid.grant_group_membership went wrong');
END;

Hi There,
just writing this so you can get better help in the future. maybe you should try and get things working a bit more yourself and when you want to get some feedback say WHY you want the feedback. Why do you want someone to suggest changes to your script?
Is it because you're getting errors? If so.. what error?
My point is people will be more interested in helping you if you try and help yourself first.
There is some very obvious mistakes in that script which would generate errors that would give big hints as to the solutions and I think you could work them out with a very small amount of SQL knowledge or just trying to understand what is happening in the script.
e.g. begin select statements with the word SELECT, and don't write MAXL statements in SQL scripts (line before spool off) (you want to output the text not have it execute as if it was SQL)
Edited by: Daniel Willis on Apr 14, 2010 10:30 AM

Similar Messages

  • Error while assigning group

    Hi friends,
      1. Iam getting the following error when assigning the group to a user.
      <b>An error occurred while adding group assignments; to see the correct status, perform a new assigned groups search</b>
    2. When uploading the template also its throwing the java.null exception..
       template contains , user name, password, roles , mail_id, group..
      after uploading the template all the above information is created except group
      when i search for the user which is created based on uploading template ,
      the group is not assigned.
       I need to send users list asap with groups assigned. but its giving problem...
      can anyone suggest me on this..
      Thanks & regards
      Sireesha.

    Hello Sireesha,
    Have u followed standard format while uploading the text file....
    If not use this format while preparing the groups and users etc.....
    http://help.sap.com/saphelp_nw04/helpdata/en/ae/7cdf3dffadd95ee10000000a114084/content.htm
    Rgds
    Pradeep

  • G/L account determination through material account assignment group

    Hi ,
           I would really appreciate any help on this . The scenario is .
    We changed the account assignment group of maetrial to 01 just 2 days back.
    We have old open sales order line up for this particular material . When I am trying to Bill these open orders , the system is not recognizing the account assignment grp change which happened 2 days back ,because of which I am getting a A/C determination error .
    This is a I/C order and we have PO linked to it. I am suggesting to back out everything (Do Invoice reversal,MIGO cancellation,PO cancellation , then cancel invoice ,delivery and sales order ) so that we can create a new cycle and  the system will recognize the account assignment grp change and determines  the G/L whwn it comes to acounting .
    1. Is this the right way
    2. Is there any other way by which I can make the accounting happen
    It was very obvoius that when I see the account determination analysis ,the system wasn't able to find the account assignment grp for the material .
    Thanks
    Sridhar

    Dear Sridhar
    First of all, I dont think, you will be able to change the Account Assignment Group of a material in sale order if any subsequent document is generated bcoz the said field will become uneditable.  Moreover, via MASS, this is not possible as the field name of Account Assignment Group for material (KTGRM) is not available in MASS.
    So the other option is via MASS, you can assign Reason for Rejection for existing orders.  To assign Reason for Rejection in bulk is run T.Code MASS, input [BUS2032]  as Object Type and execute.  There block he Sales Order Item Data and click on Fields and block the field MASSVBAP-ABGRU and execute.  Input the sale orders if possible otherwise leave it blank and once again execute.  Now you can assign Reason for Rejection in mass.
    Meanwhile, you have to create new orders for all those open items.
    thanks
    G. Lakshmipathi

  • Account Assignment Group for Customer........

    Hi Experts,
    We have created few new account assignment groups as per our customer requirement.....now if we want to update those new AAG for the already created documents like open sales order,sale order with delivery & open billing,how to proceed with that?.....any transctions do we have to execute this?.........Looking forward for your reply..........
    Regards,
    S.Kumar

    Hi,
    You can change the account assignment group in completely open orders via tcode "MASS" by selecting object type BUS2032.
    since the account assignment group will be picked from sales order, need not to be changed in open delivery or billing.
    Also for partial processed order would advise pls do not change the account assignment group. Another option could be to close the open orders and creat equivalent qty new order with correct account assignment group.
    Pls check & revert.
    Regards
    Sanjay

  • Change in Account Assignment group in Open Sales orders

    Dear All
    In SAP 4.7 there are 100 nos of Sale order item having Account Assignment Group .
    I need to change the account assigment group field from open sale orders, but the field is grey.
    Is it possible to change the subject field.? Please help
    Regards
    BGLimaye

    If I am correct, even in creation mode, this field (Account Assignment Group) will be in grey mode and cannot be maintained manually in sale order. 
    Whatever you maintain in material master, that only will flow.  Due to some reasons, if the same is not flowing in sale order and you want to rectify this,  if you ask me, the only option is close those line items, maintain the account assignment group in material master, create LSMW for VA02 and include as new line items.
    thanks
    G. Lakshmipathi

  • Report as per Customer Account Assignment group or Material Account Assig

    Hi,
    I require report as per customer account assignment group or material account assignment group.
    Can you please tell me how to fullfill this requiremetn.
    I have go for ZReport or any standard report is available.
    Regards,
    ch.srinivas

    Hi,
      You could have gone for a query but unfortunately,you cannot use table TSTMT in a query so I think ZREPORT would be a better option.
    Regards
    Karan

  • How to grey out the Account Assignment Group Fld  in Billing Doc Line Item

    Hi SD Guru's
    I have a small doubt.
    I have maintained account assignment group in material master. Now when i create an order , the account assignment group gets picked from material master into this sales order.
    Now i go to VF01 for doing the invoicing.
    Now i can still go to billing document line item against the material and change its account assignment group before raising the invoice. When i change this field, i can still post to accounts.
    I want to know is there any way in which we can restrict the way in which this field is greyed out and is made non-editable, so that only correct entries with account assignment group maintained in material master are posted.
    Answers will be appreciated.
    Kind Regards
    Ravi

    Hi,
    Sandeep can you please give me step by step process of using SHD0 in this case.
    Now if i apply this to transaction VF01 and VF02, would it apply for all billing document types? I dont want that, i want it to work for a specific billing type
    Kind Regards
    Ravi

  • How to maintain different account assignment group for a material

    One of our items in plant A was extended in B to use in an business scenario.
    Since the item was extended using the copy function every change
    made in A seems to affect our Item master in B . What governs this?
    Since the item is manufactured in A the Acct. assignment Group in
    Sales Org. 2 is set to 01 manufactured item, while for B it is a
    purchased item and so 03.
    Please let me know how to go a head with this.

    Hi
    As per standards and logics a material can be created only once in MM01
    In MM01 we create a material say pen under some organizational data and that includes plant, storage location,sales org,DC,warehouse etc
    If you are extending the same material to another plant the same can be done in MM01 with the new organizational data and after that if you hit enter you will get a message that the material is already created and extended to such and such data
    In that exept the basic data 1 and 2 many or most of the fields can be changed
    I have checked account assignment category in sales org data 2 can be changed
    Say for plant 1000 for material pen assignment category can be 01 and
    plant 1001 for the same  material pen assignment category can be 02  like that
    The extra keys for account assignment categories are defined in t code OVK5
    img-sd-basic functions-account assignment and costing-revenue account determination---check master data relevant for account assignment
    Relevant VKOA settings to be done
    Then based on plant (in sales order) diffrerent GL accounts will be picked
    So a same material with respect to the organizational data can have different account assignment categories
    Regards
    Raja

  • Material type and account assignment group relation

    Hi,
    Getting an error while creating material master save. Account assignment Zx can't be with Material Type Zxxxx.
    Please advise where is the link maintained between material account assignment group and material type.
    My material is Z service material.
    As I no for plant,industry, material type valuation class quanity update tick required but that is for stockable materials which is not the case above.
    Thanks

    HI,
    You can make the field Account Assignment Group of Material Master as inactive.
    But it depends up on Plant, Industry Sector Type and Material Type.
    You can do this in IMG --> Logistic General --> Material Master --> Field Selection
    Or
    use SHD0.. give T-code MM01. and you can deactivate the field.
    Hope this helps you.
    TC
    BR
    AKS

  • The material account assignment group is missing in sales Order creation

    Hi Gurus,
    When creating the sales order the material account assignment group is not copied in the sales order line item. 
    For eg: when the sales order has 5 line item for one of the line item the material account assignment group is not getting copied. 
    I checked the material master - A/C assignment group was maintained.
    I checked the revenue account determination every entry is maintained with respect to GL account. 
    But even though while creating the sales order the line item does not have account assignment group. Due to this i could not able to release the billing doc to accounting.
    Please if any one can help in this regard to solve why the account assignment group is not copying in the sales order line item while creating.
    Thanks in advance.
    Jack

    Hi,
    May be the system is not updating the data. Try creating a new sales order to check. Also check the division of the product for which the acct *** grp is not showing.
    Check whether the acct assgt group which you have maintained in the matl master and that in the acct determination (VKOA) is the same.
    Reward points if solution helps.
    Regards,
    Allabaqsh G. Patil

  • Material Account Assignment Group, in Sales Order Mass Update

    Sd Experts,
    We just went live, our consultant updated Account assignment group at the material level but did not updated existing materials. When we caught the problem and updated exisisting materials there were some existing orders already created. Which now I am getting an account determination error due to this field being empty at the material level.
    We have some sales orders that I need to update but they are just too many, currently I have been fixing them thru VF02, for to the material and update manually.
    Does anyone has any idea how to mass update this field for all existing orders, to update "Account Assignment Group" field automatically
    Your help will be greatly appreciated.

    Hi
    In Mass transaction choose object type as #BUS2032,after executing in the next screen from the tables choose#Sales Order Item Data, and from the fields choose#AcctAssgGr (MASSSDHE)-MASSSDHEAD_S-KTGRD, now execute to find fields Sales document and Sales Document item , here load all the Sales Orders for which the change is needed along with the items for which the changes are needed execute again to find the next screen with Sales Documet, Sales Document item and Account assignment which needed to be changed,now select the entire block enter new values in the Account assignment  box in the above, click on the 'Carry out MAss change button ' and then save, it will take some time basing the change tobe carried and issues a log as to how many documents were changed
    Hope this is clear,please do a test run before.
    Regards
    Chandra

  • About account assignment group in Sales Order.

    Hi gurus,
    I am working in SD for the first time and I am facing below problem
    1. Material code was created  with account assignment group (MVKE-KTGRM)  as blank (Sales Org 2 view)
    2. Later this material was entered in Sales Order.
    3. Subsequently Sales Order BOM and Production Order were made against this material.
    4. We maintained account assignment group in material master after creation of Sales order but account assignment group was not updated in Sales Order.
    5. Now the field is gray out or non-editable is there any way by which we can maintain account assignment group in the sales order.
    6. As the field is non editable we are unable to do Invoice by VF01.
    Is there any way by which we can maintain account assignment group in Sales Order??
    Edited by: Deepak Kulkarni on Mar 6, 2012 2:09 PM

    Hi
    As you have mentioned that you have maintained the acct assignment grp in the material master after the order was created, it will not appear in the sales order item already created and it will only reflect in new orders and changes to existing orders for that material.
    Proposed solution:
    If it is order related billing that you are doing, then goto VA02 and delete and re-enter the item with same material and qty.
    The account assignment group will appear.
    If the item is delivery related and if the delivery has already been created but PGi not done, then delete the delivery and then delete the item in the sales order and re-enter the item as told above. If PGI also done, then reverse the PGI, delete the delivery and re-enter as suggestd in above scenarios.
    The account assignment group will appear in the billing document document tab in item level.
    Regards
    Madhu

  • An incorrect default value of account assignment group in sales order

    I created a new sales order; however, the default value for account assignment group is not the same value maintained in customer master.
    Any idea how could this happen?

    have you checked user exit MV45AFZZ? Maybe there is a coding inside, changing the default value when creating a new sales order.
    regards
    Ralf

  • Mass change of account assignment group in sales order

    Dear All.
    We have created a new Account assigement group and assigned revenue accounts to it.When the orders are registered this data will flow from the master data automatically.Where as in the open orders i need to make the changes manually.Is there a provision in std SAP to Mass change a filed in  sales order .Like we do in MM17 or XD99 .Kindly let me know.
    Thanks in advance .
    regards,
    K.Vivek

    Hi,
    Go to XD99,
    1. Select the table ie KNVV in the tables tab, select the fields tab and select the fields u would like to change for eg Acct assignment group
    2. Execute the report
    3. U will come to the screen where u can restrict the entries.
    Enter the criterion say
    Cust: Test 1
    Sales Org 8000
    Dist 08
    Div 08
    4. Again press execute
    5. Enter the new values you would like to have
    6. Now select columns of the new values and press carry out mass maintainence button in the new values area
    7. Press Save
    8. u will then receive a success message
    Best regards
    Mahesh

  • Account Assignment group is blank in billing dcoument !

    Hi,
    In some order Account assignment group is blank in billing document which led to Account determination error in production system .
    I have checked account assignment group is already maintained for material(mm03) and customer(xd03) in the PEC.
    In VF02 for only one item in order AAG is coming as blank . that is why in account determination analysis for that item 'No G/L account found in Account determination type KOFK' is coming . And User is getting Account determination error . I have checked in VKOA G/L account is maintained.
    I know manually I can enter the value of AAG in VF02 for the item &  error will get resolved but I want to find the reason since it is in PEC system.
    Can anyone provides solution k why AAG comes blank for  billing document that led to  account determination error. ?
    thanks in adv.
    Reg,
    Rahul.

    Hi Rahul,
    Kindly refer the answers below:
    Q. Can you suggest where/how to check all condition table which is being used to determine G/L account
    A. After creating the invoice, go to VF02 transaction code by providing your billing document nnumber and enter it. In main menu bar, you need to choose Environment --> Acc.determ.analysis --> revenue Accounts. Here you will get on what level GL code is getting determined. Further in transaction VKOA, you can check on what basis / selection parameters G/L codes are aligned. In VKOA initial screen, you will have the table column. If table is showing as 230, that means in SE16 transaction code, it will be C230.
    Q. Why  AAG value is  blank in Billing document.
    Regards. 

Maybe you are looking for

  • Creating a simple and small DataBase..Please HELP

    I study Information Systems (MSc)..and I am taking a DataBase course that requires a Project to be done on a RDBMS..I decided to build the database using ORACLE 9i (on windows xp professional).. I want to use the Database Configuration Assistant to b

  • No color on my new COLOR ipod

    Why is there no color on my new color ipod?? The screen is EXACTLY like the old version.

  • IPhone "live" video to multiple AppleTVs?

    Is there a way to stream live video that is being recorded from an iPhone to multiple AppleTVs that are all on the same Wi-Fi network?

  • SimpleDateFormat and French

    Hi, I use SimpleDateFormat for converting a string to Date. My input will be a String in MMM DD, YYYY format and I want the output in yyyy-MM-dd format. The piece of code I hv written works well for English, but not for French. My code:      String s

  • Time Machine on a NAS - Avoiding "Time Machine completed a verification of your backups....."

    I use Time Machine to wirelessly backup my MBA to a Buffalo NAS. It will work fine for weeks or months, then I will see the dreaded "Time Machine completed a verification of your backups. To improve reliability, Time Machine must create a new backup