Tax Creation using  DI API

hi kings,
how to create tax types using DI API
Thanks & regards
B.Lakshmi Narayanan

hi shafi,
thanks for your valuable reply. First i need to create the Tax Types
i trying to following code but its show the Error "Enter valid code  [OSTT.NfTaxId]"
Dim oAutCode As SAPbobsCOM.SalesTaxAuthoritiesTypes
        oAutCode = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oSalesTaxAuthoritiesTypes)
        oAutCode.Name = "DUTY"
        oAutCode.VAT = SAPbobsCOM.BoYesNoEnum.tNO
Tax types have Name,Category,Parameter
i passed only Name and vat type i search remaining two attribute  but its not available.
and also i trying to url code its also show the error
Dim oCode As SAPbobsCOM.SalesTaxCodes
            Set oCode = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oSalesTaxAuthoritiesTypes)
            oCode.Code = "VAT5"
            oCode.Name = "VAT5"
            oCode.Lines.STACode = "VAT"
            oCode.Lines.STAType = "1"
            oReturn = oCode.Add
            If oReturn  0 Then
                oCompany.GetLastError oError, errMsg
                MsgBox (errMsg)
            Else
                MsgBox ("Sales Tax Code Added")
            End If
thanks & regards
B.Lakshmi Narayanan

Similar Messages

  • Need Sample Code for Vendor creation using JAVA API

    Hi,
    I have a scenario like Vendor creation using <b>Java API</b>.
    1.I have Vendors (Main) Table.
    2.I have <b>look up</b> tables like Account Group.
    3.Also <b>Qualifier table</b>(Phone numbers) too.
    Could you please give me the sample code which helps me to create Vendor records using Java API?
    <b>I need Code samples which should cover all of the above scenario.</b>
    <b>Marks will be given for the relevent answers.</b>
    Best Regards
    PK Devaraj

    Hi Devraj,
    I hope the below code might solve all your problem:-
    //Adding Qualified field
    //Creating empty record in Qualifed table 
    //Adding No Qualifiers
    Record qualified_record = RecordFactory.createEmptyRecord(new TableId(<TableId>));
    try {
    qualified_record.setFieldValue(new FieldId(<fieldId of NoQualifier), new StringValue(<StringValue>));//Adding No Qualifier
    catch (IllegalArgumentException e2) {
    // TODO Auto-generated catch block
    e2.printStackTrace();
    catch (MdmValueTypeException e2) {
    // TODO Auto-generated catch block
    e2.printStackTrace();
    //Creating Record in Qualified table
    CreateRecordCommand create_command = new CreateRecordCommand(connections);
    create_command.setSession(sessionId);
    create_command.setRecord(qualified_record);
    try
    create_command.execute();
    catch(Exception e)
    System.out.println(e.toString());
    RecordId record_id = create_command.getRecord().getId();
    //Adding the new record to Qualifed Lookup value and setting the Yes Qualifiers
    QualifiedLookupValue lookup_value = new QualifiedLookupValue();
    int link = lookup_value.createQualifiedLink(new QualifiedLinkValue(record_id));
    //Adding Yes Qualifiers
    lookup_value.setQualifierFieldValue(0 , new FieldId(<FieldID of Yes Qualifier>) , new StringValue(<StringValue>));
    //Now adding LookUP values
    //Fetch the RecordID of the value selected by user using the following function
    public RecordId getRecordID(ConnectionPool connections , String sessionID , String value , String Fieldid , String tableid)
    ResultDefinition rsd = new ResultDefinition(new TableId(tableid));
    rsd.addSelectField(new FieldId(Fieldid));
    StringValue [] val = new StringValue[1];
    val[0] = new StringValue(value);
    RetrieveRecordsByValueCommand val_command = new RetrieveRecordsByValueCommand(connections);
    val_command.setSession(sessionID);
    val_command.setResultDefinition(rsd);
    val_command.setFieldId(new FieldId(Fieldid));
    val_command.setFieldValues(val);
    try
         val_command.execute();
    catch(Exception e)
    RecordResultSet result_set = val_command.getRecords();
    RecordId id = null;
    if(result_set.getCount()>0)
         for(int i = 0 ; i < result_set.getCount() ; i++)
         id = result_set.getRecord(i).getId();     
    return id;
    //Finally creating the record in Main table
    com.sap.mdm.data.Record empty_record = RecordFactory.createEmptyRecord(new TableId("T1"));
    try {
         empty_record.setFieldValue(new FieldId(<FieldId of text field in Main table>),new StringValue(<StringValue>));
         empty_record.setFieldValue(new FieldId(<FieldId of lookup field in Main table>), new LookupValue(<RecordID of the value retrieved using the above getRecordID function>));
    empty_record.setFieldValue(new FieldId(<FieldId of Qualified field in Main table>), new QualifiedLookupValue(<lookup_value>));//QualifiedLookUp  value Retrieved above
    } catch (IllegalArgumentException e1) {
    // TODO Auto-generated catch block
         e1.printStackTrace();
    } catch (MdmValueTypeException e1) {
         // TODO Auto-generated catch block
         e1.printStackTrace();
    //Actually creating the record in Main table
    CreateRecordCommand create_main_command = new CreateRecordCommand(connections);
    create_main_command.setSession(sessionId);
    create_main_command.setRecord(empty_record);
    try
         create_main_command.execute();
    catch(Exception e)
         System.out.println(e.toString());
    Thanks
    Namrata

  • Log file creation using km api

    Hi,
    how to create log file using km api . please provide me if any sample code available.
    Thanks and Regards,
    Nari.

    Thanks for your quick reply but one more requirement is... here i can able create text file in km and adding content to created text file on the same line but i want to update new content in next line(newline).Please see below code and correct it.
         Date dt = new Date(Calendar.getInstance().getTimeInMillis());
                                  com.sapportals.portal.security.usermanagement.IUser iuser = WPUMFactory.getServiceUserFactory().getServiceUser("cmadmin_service");
                                  IResourceContext irCtx = new ResourceContext(iuser);
                                  RID docsResource = RID.getRID(filepath);
                                  IContent initCont = new Content(new ByteArrayInputStream("".getBytes()),"text/plain",-1,null);
                                  if(ResourceFactory.getInstance().getResource(RID.getRID(filepath+"/"+filename), irCtx) == null)
                                       ICollection docsColl = (ICollection)com.sapportals.wcm.repository.ResourceFactory.getInstance().getResource(docsResource,irCtx);
                                       docsColl.createResource(filename,null,initCont);
                              String InputData = Exception;
                              RID sugg_html = RID.getRID(filepath+"/"+filename);
                              IResource resource = com.sapportals.wcm.repository.ResourceFactory.getInstance().getResource(sugg_html,irCtx);
                              String existingComments;
                              IContent cont = resource.getContent();
                              BufferedReader buf_in = new BufferedReader(new InputStreamReader(cont.getInputStream()));
                              existingComments = buf_in.readLine();
                              existingComments = existingComments+"   "+"\n"+dt+InputData;
                              ByteArrayInputStream inputStream = new ByteArrayInputStream(existingComments.getBytes());
                              cont = new Content(inputStream,"text/plain",-1,null);
                              resource.updateContent(cont);
                              cont.close();

  • Page Creation using pageservice API in Webcenter Spaces(11.1.1.8)

    Hi,
    I am trying to create portal pages using pageserviceimpl api in webcenter spaces(11.1.1.8) by using the taskflow but i am getting the exception as below while creating the page
    Caused By: oracle.webcenter.page.model.PageServiceRuntimeException: oracle.webcenter.page.model.PageServiceRuntimeException
            at com.cvs.mylife.portal.pagecreate.bean.CreatePageMBean.createPage(CreatePageMBean.java:196)
            at com.cvs.mylife.portal.pagecreate.bean.CreatePageMBean.onDialogEvent(CreatePageMBean.java:347)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    Caused By: oracle.webcenter.page.model.PageServiceRuntimeException
            at oracle.webcenter.page.internal.model.PageServiceImpl.throwNoPrivException(PageServiceImpl.java:12539)
            at oracle.webcenter.page.internal.model.PageServiceImpl.createHierarchyPage(PageServiceImpl.java:4045)
            at com.cvs.mylife.portal.pagecreate.bean.CreatePageMBean.createPage(CreatePageMBean.java:175)
            at com.cvs.mylife.portal.pagecreate.bean.CreatePageMBean.onDialogEvent(CreatePageMBean.java:347)
    Can anyone please tel the value needs to be feed to create the page using the below method
                page =
        pageService.createHierarchyPage(parentPagePath, pageNameFormat, pageTitle,
                                    pageStyle, pageTemplate, createAfterPagePath);
    parentPagePath=?
    pageNameFormat=?
    pageTitle=?
    pageStyle=?
    pageTemplate=?
    createAfterPagePath=?
    This is very much need for one of our customer requirement.
    Regards,
    Santhosh

    Kingsley,
    I used the same ateam code for creating the page  in portal framework, it works fine there, but if i use the same code in webcenter spaces 11.1.1.8 it is not working and in that ateam code they are passing null to the parent page path and i tried all these entries for the parent page path in webcenter spaces but nothing worked.
    parentPagePath="/oracle/webcenter/page/scopedMD/s1df097cd_2859_4e32_bee4_16f81f5b09f3/";
    parentPagePath="/oracle/webcenter/page/scopedMD/s573026b5_4f17_45e0_bdae_986017c24427/pages.xml";
    parentPagePath="/oracle/webcenter/page/scopedMD/s573026b5_4f17_45e0_bdae_986017c24427/Page11.jspx"
    Regards,
    Santhosh

  • Room creation error using Room API

    Hi Experts.
    We're triying to create a collaboration room through Room API
    As a previous step a standard template copy was created (SAP_Information_Site_2)  to be used in the room creation through API.
    In this template we defined one parameter (FolderPath) which sets the KM navigation path  of a specific folder and then we made the mappings of this parameter into the views used by template to show documents.
    When Room is created using "Room creation wizard" we set name, description, category, template (SAP_Information_Site_2), FolderPath, etc. this way everything is OK.
    The problem is triying to create it when generating the room througn a Webdynpro using Room API, afeter we set all same parameters the room is created with no errors. but despite having put all the parameters like those we place using creation wizard the Room API created Room shows the default folderpath and not we have set through API.
    We are able to compare both rooms and they shows same properties except the folderpath.
    Here the used code:
          private  void createRoom(){
                String strTemplateName = "Techint_Template";
                String strRoleName = "Admin";
                String strCategory = "Default_Category";
                //Get the Rooms 6.0 API Portal Service
                IRooms roomsAPI = (IRooms)PortalRuntime.getRuntimeResources().
                                              getService(IRooms.PORTAL_SERVICE_ID);
                //Get Template Related Infos
                ITemplate template = null;
                IRoomRole role1 = null;
                IRoomCategoryFactory cf = roomsAPI.getRoomCategoryFactory();
                try {
                      template = roomsAPI.getRoomTemplate(strTemplateName);
                      role1 = template.getRoomRole(strRoleName);
                      //Get an empty RoomInfo object
                      IRoomInfo roomInfo = roomsAPI.getRoomCreationInfo();
                      //Fill RoomInfo object with values
                      roomInfo.setName(wdContext.currentFormDataElement().getProjectCode().trim()+" - "
                                  +wdContext.currentFormDataElement().getRevisionNumber());
                      String strDescription = wdContext.currentFormDataElement().getTechintDocument();
                      if (strDescription!=null && strDescription.length()>0)
                            roomInfo.setDescription(wdContext.currentFormDataElement().getTechintDocument());
                      else
                            roomInfo.setDescription(wdContext.currentFormDataElement().getProjectCode().trim()+" - "
                                  +wdContext.currentFormDataElement().getRevisionNumber());
                      roomInfo.setTemplateName(strTemplateName);
                      roomInfo.addRoomParameter("FolderPath", "FolderPath",strRevisionFoldePath, false);
                      //asign the room category
                      IRoomCategory objRoomCategory = cf.getDefaultRoomCategory();
                      IRoomCategory objRCA[] = {objRoomCategory};
                      roomInfo.setCategories(objRCA);
                      //Set User Role Assignments
                      com.sap.security.api.IUser owner = UMFactory.getUserFactory().getUserByLogonID("km_user");
                      roomInfo.setOwnerId(owner.getUniqueID());
                      roomInfo.addUserToRole(owner.getUniqueID(), role1);
                      //Finally Create the Room
                      IRoomDataElement objRoomDE =  wdContext.createRoomDataElement();
                      if(roomInfo.validate()){
                            IRoom newRoom = roomsAPI.createRoom(roomInfo, true);
                            objRoomDE.setRoomLink(newRoom.getRoomAccessURLExternal());
                      }else{
                            RoomCreationValidationErrors[] errors = roomInfo.getValidationErrors();
                            for (int i=0; errors.length>i;i++){
                                  logWebDynproMessages(IS_LOG_ENABLED,
                                        //ILoggingConstants.INFO,
                                        4,wdComponentAPI.getMessageManager(),
                                        "ErrorRoom: "+errors<i>.getShortText(), false);
                            objRoomDE.setRoomLink("ERROR");
                      wdContext.nodeRoomData().addElement(objRoomDE);
                      logWebDynproMessages(IS_LOG_ENABLED,
                            //ILoggingConstants.INFO,
                            1,wdComponentAPI.getMessageManager(),
                            "Se creo el room asociado al proceso/revision:"+strRevisionFoldePath, false);
                } catch (TemplateInstantiationException e) {
                      printException(wdComponentAPI.getMessageManager(), e);
                      e.printStackTrace();
                } catch (NoSuchRoleException e1) {
                      printException(wdComponentAPI.getMessageManager(), e1);
                      e1.printStackTrace();
                } catch (UMException ex){
                      printException(wdComponentAPI.getMessageManager(), ex);
                      ex.printStackTrace();
                } catch (RoomCreationException ex){
                      printException(wdComponentAPI.getMessageManager(), ex);
                      ex.printStackTrace();
                } catch (NoSuchRoomCategoryException ex){
                      printException(wdComponentAPI.getMessageManager(), ex);
                      ex.printStackTrace();
                } catch (Exception ex){
                      printException(wdComponentAPI.getMessageManager(), ex);
                      ex.printStackTrace();
    This code was created using the following directions
    http://help.sap.com/saphelp_nw04s/helpdata/en/7d/c69c42d706c66ae10000000a155106/content.
    Any help will be really appreciated and accordingly rewarded
    Thaks in advance,
    Ramien.-

    Hi Venkat,
    did you check the Initial Configuration Tasks ? especially the portal permisions...
    http://help.sap.com/saphelp_nw04/helpdata/en/f6/2604f005fd11d7b84200047582c9f7/content.htm
    and there is a SAP Note which references a How To Guide for configuring permissions. The Note number is 766765 and the document it references is "How To... Configure Permissions for Initial Content in SAP Enterprise Portal 6.0 SP9 & Higher."
    PS: Please consider rewarding points for helpful answers on SDN. Thanks in advance!

  • Document Set Creation in document library using REST API in Sharepoint 2013

    Hi,
    I want to create the document set using REST API call. Currently i am able to create the folder and able to upload the files using REST API's in the document library. Is there any way we can pass the contentype name or Id and create the document set using
    REST API call. We need to create the document set along with metadata and upload the files inside the document set.
    I need to create the document set along with meta data column values using REST API. Please let me know how we can achieve this through REST API.
    Thank you,
    Mylsamy

    Hi,
    According to your post, my understanding is that you wanted to create document set along with managed metadata fields.
    The REST API does not currently support working with Managed Metadata or Taxonomy fields.
    As a workaround, we can use the JavaScript Client Object Model.
    Create document set using JavaScript Client Object Model.
    http://blogs.msdn.com/b/mittals/archive/2013/04/03/how-to-create-a-document-set-in-sharepoint-2013-using-javascript-client-side-object-model-jsom.aspx
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/aacd96dc-0fb2-4f0d-ab4c-f94ce819e3ed/create-document-sets-with-javascript-com-sharepoint-2010
    Set managed metadata field with JavaScript Client Object Model.
    http://sharepoint.stackexchange.com/questions/95933/add-list-item-with-managed-metadata-field-through-jsom
    http://sharepointfieldnotes.blogspot.com/2013/06/sharepoint-2013-code-tips-setting.html
    Thanks,
    Jason
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Jason Guo
    TechNet Community Support

  • 11g R2: Role creation using API

    I am trying to create a role using OIM API RoleManager
                RoleManager roleService = oimClient.getService(RoleManager.class);    
                Role roleObj = new oracle.iam.identity.rolemgmt.vo.Role("");
                roleObj.setAttribute("Role Name","SampleTestRole");
                roleObj.setAttribute("Role Display Name","Sample Test Role");
                roleObj.setAttribute("Role Description","Sample Test Role");
                System.out.print(roleService.create(roleObj));
                System.out.print("Role has been created.... ");
    I am getting the following exception:
    oracle.iam.identity.exception.RoleCreateException: Orchestration process with id 14915, failed with error message null.
      at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:237)
      at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:348)
      at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:259)
      at oracle.iam.identity.rolemgmt.api.RoleManager_ogut7n_RoleManagerRemoteImpl_1036_WLStub.createx(Unknown Source)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.invoke(RemoteBusinessIntfProxy.java:85)
      at $Proxy2.createx(Unknown Source)
      at oracle.iam.identity.rolemgmt.api.RoleManagerDelegate.create(Unknown Source)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at Thor.API.Base.SecurityInvocationHandler$1.run(SecurityInvocationHandler.java:68)
      at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
      at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
      at weblogic.security.Security.runAs(Security.java:41)
      at Thor.API.Security.LoginHandler.weblogicLoginSession.runAs(weblogicLoginSession.java:52)
      at Thor.API.Base.SecurityInvocationHandler.invoke(SecurityInvocationHandler.java:79)

    Tried as suggested in the link posted but still getting the same exception.
            Role managerRole=new Role("powerUser");
            managerRole.setName("powerUser");
            managerRole.setDisplayName("powerUser");
    oracle.iam.identity.exception.RoleCreateException: Orchestration process with id 14930, failed with error message null.
      at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:237)
      at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:348)
      at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:259)
      at oracle.iam.identity.rolemgmt.api.RoleManager_ogut7n_RoleManagerRemoteImpl_1036_WLStub.createx(Unknown Source)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.invoke(RemoteBusinessIntfProxy.java:85)
      at $Proxy4.createx(Unknown Source)
      at oracle.iam.identity.rolemgmt.api.RoleManagerDelegate.create(Unknown Source)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at Thor.API.Base.SecurityInvocationHandler$1.run(SecurityInvocationHandler.java:68)
      at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
      at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
      at weblogic.security.Security.runAs(Security.java:41)
      at Thor.API.Security.LoginHandler.weblogicLoginSession.runAs(weblogicLoginSession.java:52)
      at Thor.API.Base.SecurityInvocationHandler.invoke(SecurityInvocationHandler.java:79)
      at $Proxy5.create(Unknown Source)

  • NO-DATA_FOUND while using the API hr_employee_api.create_employee.

    Hi All,
    I am using the API "hr_employee_api.create_employee", to create an employee.
    My call is as follows :
    hr_employee_api.create_employee
    -- p_validate in boolean default false
    p_hire_date =>sysdate
    ,p_business_group_id =>0
    ,p_last_name =>'Keerthi'
    ,p_sex =>'M'
    ,p_person_type_id =>6 --from the 'table PER_PERSON_TYPES'
    ,p_per_comments =>'Test Employee Creation'
    --,p_date_employee_data_verified in date default null
    ,p_date_of_birth =>TO_DATE('07-NOV-1981','DD-MON-YYYY')
    ,p_email_address =>'[email protected]'
    ,p_employee_number =>l_emplyee_number
    -- ,p_expense_check_send_to_addres in varchar2 default null
    ,p_first_name =>'Vijay'
    ,p_known_as =>'Vijay Keerthi'
    ,p_marital_status =>'S'
    -- ,p_middle_names in varchar2 default null
    -- ,p_nationality =>'US'
    -- ,p_national_identifier in varchar2 default null
    -- ,p_previous_last_name in varchar2 default null
    -- ,p_registered_disabled_flag in varchar2 default null
    ,p_title =>'MR.'
    -- ,p_vendor_id in number default null
    ,p_work_telephone =>'3033284497'
    -- ,p_attribute_category in varchar2 default null
    -- ,p_attribute1 in varchar2 default null
    -- ,p_attribute2 in varchar2 default null
    -- ,p_attribute3 in varchar2 default null
    -- ,p_attribute4 in varchar2 default null
    -- ,p_attribute5 in varchar2 default null
    -- ,p_attribute6 in varchar2 default null
    -- ,p_attribute7 in varchar2 default null
    -- ,p_attribute8 in varchar2 default null
    -- ,p_attribute9 in varchar2 default null
    -- ,p_attribute10 in varchar2 default null
    -- ,p_attribute11 in varchar2 default null
    -- ,p_attribute12 in varchar2 default null
    -- ,p_attribute13 in varchar2 default null
    -- ,p_attribute14 in varchar2 default null
    -- ,p_attribute15 in varchar2 default null
    -- ,p_attribute16 in varchar2 default null
    -- ,p_attribute17 in varchar2 default null
    -- ,p_attribute18 in varchar2 default null
    -- ,p_attribute19 in varchar2 default null
    -- ,p_attribute20 in varchar2 default null
    -- ,p_attribute21 in varchar2 default null
    -- ,p_attribute22 in varchar2 default null
    -- ,p_attribute23 in varchar2 default null
    -- ,p_attribute24 in varchar2 default null
    -- ,p_attribute25 in varchar2 default null
    -- ,p_attribute26 in varchar2 default null
    -- ,p_attribute27 in varchar2 default null
    -- ,p_attribute28 in varchar2 default null
    -- ,p_attribute29 in varchar2 default null
    -- ,p_attribute30 in varchar2 default null
    ,p_per_information_category =>'US'
    -- p_per_information_category - Obsolete parameter, do not use
    -- ,p_per_information1 in varchar2 default null
    -- ,p_per_information2 in varchar2 default null
    -- ,p_per_information3 in varchar2 default null
    -- ,p_per_information4 in varchar2 default null
    -- ,p_per_information5 in varchar2 default null
    -- ,p_per_information6 in varchar2 default null
    ,p_per_information7 =>'INCL'
    -- ,p_per_information8 in varchar2 default null
    -- ,p_per_information9 in varchar2 default null
    -- ,p_per_information10 in varchar2 default null
    -- ,p_per_information11 in varchar2 default null
    -- ,p_per_information12 in varchar2 default null
    -- ,p_per_information13 in varchar2 default null
    -- ,p_per_information14 in varchar2 default null
    -- ,p_per_information15 in varchar2 default null
    -- ,p_per_information16 in varchar2 default null
    -- ,p_per_information17 in varchar2 default null
    -- ,p_per_information18 in varchar2 default null
    -- ,p_per_information19 in varchar2 default null
    -- ,p_per_information20 in varchar2 default null
    -- ,p_per_information21 in varchar2 default null
    -- ,p_per_information22 in varchar2 default null
    -- ,p_per_information23 in varchar2 default null
    -- ,p_per_information24 in varchar2 default null
    -- ,p_per_information25 in varchar2 default null
    -- ,p_per_information26 in varchar2 default null
    -- ,p_per_information27 in varchar2 default null
    -- ,p_per_information28 in varchar2 default null
    -- ,p_per_information29 in varchar2 default null
    -- ,p_per_information30 in varchar2 default null
    -- ,p_date_of_death in date default null
    -- ,p_background_check_status in varchar2 default null
    -- ,p_background_date_check in date default null
    -- ,p_blood_type in varchar2 default null
    -- ,p_correspondence_language in varchar2 default null
    -- ,p_fast_path_employee in varchar2 default null
    -- ,p_fte_capacity in number default null
    -- ,p_honors in varchar2 default null
    -- ,p_internal_location in varchar2 default null
    -- ,p_last_medical_test_by in varchar2 default null
    -- ,p_last_medical_test_date in date default null
    -- ,p_mailstop in varchar2 default null
    -- ,p_office_number in varchar2 default null
    -- ,p_on_military_service in varchar2 default null
    -- ,p_pre_name_adjunct in varchar2 default null
    -- ,p_rehire_recommendation in varchar2 default null -- Bug3210500
    -- ,p_projected_start_date in date default null
    -- ,p_resume_exists in varchar2 default null
    -- ,p_resume_last_updated in date default null
    -- ,p_second_passport_exists in varchar2 default null
    -- ,p_student_status in varchar2 default null
    -- ,p_work_schedule in varchar2 default null
    -- ,p_suffix in varchar2 default null
    -- ,p_benefit_group_id in number default null
    -- ,p_receipt_of_death_cert_date in date default null
    -- ,p_coord_ben_med_pln_no in varchar2 default null
    -- ,p_coord_ben_no_cvg_flag in varchar2 default 'N'
    -- ,p_coord_ben_med_ext_er in varchar2 default null
    -- ,p_coord_ben_med_pl_name in varchar2 default null
    -- ,p_coord_ben_med_insr_crr_name in varchar2 default null
    -- ,p_coord_ben_med_insr_crr_ident in varchar2 default null
    -- ,p_coord_ben_med_cvg_strt_dt in date default null
    -- ,p_coord_ben_med_cvg_end_dt in date default null
    -- ,p_uses_tobacco_flag in varchar2 default null
    -- ,p_dpdnt_adoption_date in date default null
    -- ,p_dpdnt_vlntry_svce_flag in varchar2 default 'N'
    -- ,p_original_date_of_hire in date default null
    -- ,p_adjusted_svc_date in date default null
    ,p_town_of_birth =>'Denver'
    ,p_region_of_birth =>'Asia'
    ,p_country_of_birth =>'US'
    -- ,p_global_person_id in varchar2 default null
    -- ,p_party_id in number default null
    ,p_person_id =>l_person_id
    ,p_assignment_id =>l_assignment_id
    ,p_per_object_version_number =>l_per_object_version_number
    ,p_asg_object_version_number =>l_asg_object_version_number
    ,p_per_effective_start_date =>l_per_effective_start_date
    ,p_per_effective_end_date =>l_per_effective_end_date
    ,p_full_name =>l_full_name
    ,p_per_comment_id =>l_per_comment_id
    ,p_assignment_sequence =>l_assignment_sequence
    ,p_assignment_number =>l_assignment_number
    ,p_name_combination_warning =>l_name_combination_warning
    ,p_assign_payroll_warning =>l_assign_payroll_warning
    ,p_orig_hire_warning =>l_orig_hire_warning
    This gives me an Error No_DATA_FOUND. I went an debugged through the code, where in I found that
    the following cursor query (in the API: "hr_assignment.update_assgn_context_value") is returning no values.
    cursor csr_ass_data is
    select ass_attribute_category
    from per_all_assignments_f
    where business_group_id = p_business_group_id
    and person_id = p_person_id
    and assignment_id = p_assignment_id
    and effective_start_date = p_effective_start_date
    and primary_flag = 'Y';
    Also, I found out that an assignment_id is coming back after the call to the API "hr_assignment_internal.create_default_emp_asg" from within the API "hr_employee_api.create_employee".
    Now, my question, why is the above cursor query giving me a no-data-found.
    Is there any setup that I am missing like setting DFF or enabling a profile option etc.,
    Please let me know.
    Thanks in Advance,
    Vijay

    Hi Gaurav,
    Thanks for the reply. But I caught the issue.
    The issue is with the parameter "p_hire_date =>sysdate" and the code in the API hr_employee_api.create_employee.
    What it does is, it captures the date that we pass "p_hire_date" into a local variable "l_hire_date" as follows:
    l_hire_Date := TRIM(p_hire_date) and then passes the l_hire_date to the API "hr_assignment_internal.create_default_emp_asg". The API works fine and also returns us an assignment ID. Everything is fine till now.
    The problem begins with the call to the API "hr_assignment.update_assgn_context_value", where in the p_hire_date is passed, instead of the l_hire_date and hence the NO_DATA_FOUND comes up.
    What Happens ?
    1.The date that I passed has the time component in it.
    2.The assignment gets created with a date that has no time component (due to TRIM).
    3The query has a where condition on the date with the time component.
    Hence, it returns no rows.
    Solution: Pass the p_hire_Date as trunc(sysdate) than simply sysdate.
    Thanks,
    Vijay

  • Issue with mapping XML to Java using SAX API

    I am using SAX API to Map XML Documents To Java. Is it possible to differentiate the elements based on the attribute rather than localname or element name in SAX API? because I am having the below xml structure. In SAX API we are processing the element values based on start/End Element name.
    <?xml version="1.0" encoding="UTF-8"?>
    <response>
    <result name="response">
    <doc>
    <str name="art_id">192201910</str>
    <str name="title">test</str>
    <arr name="author">
    <str>Darrell Dunn</str>
    <str>William </str>
    </arr>
    <arr name="tax">
    <str>113243335</str>
    <str>233454666</str>
    </arr>
    </doc>
    <doc>
    <str name="art_id">192201911</str>
    <str name="title">test2</str>
    <arr name="author">
    <str>Darrell Dunn1</str>
    <str>William 1</str>
    </arr>
    </doc>
    </result>
    </response>
    I want to map the elements based on attributes such as
    classobj.art_id, classobj.title, classobj.tax[]. I have wriiten code below, but I am not getting the proper result.
    import org.xml.sax.;
    import org.xml.sax.helpers.;
    import java.io.;
    import java.util.;
    import common.;
    public class XmltoObjectHandler extends DefaultHandler{
    /* Creates a new instance of XmltoObjectHandler */
    public XmltoObjectHandler() {
    // Local SolrDocument object to collect
    // document XML data.
    private XmlDocument doc = new XmlDocument();
    // Local list of solr documents items...
    private Vector xmlDocuments = new Vector();
    // Local current solr document reference...
    private XmlDocument currentSolrDoc;
    // Buffer for collecting data from
    // the "characters" SAX event.
    private CharArrayWriter contents = new CharArrayWriter();
    // Override methods of the DefaultHandler class
    // to gain notification of SAX Events.
    // See org.xml.sax.ContentHandler for all available events.
    public void startElement( String namespaceURI,
    String localName,
    String qName,
    Attributes attr ) throws SAXException {
    if ( localName.equals( "doc" ) ) {
    currentXmlDoc = new XmlDocument();
    solrDocuments.addElement( currentSolrDoc );
    if( localName.equals("str"){
    for ( int i = 0; i < attr.getLength(); i++ ){
    if("art_id".equals(attr.getValue(i))){
    currentSolrDoc.art_id = contents.toString();
    if("title".equals(attr.getValue(i))){
    currentSolrDoc.title = contents.toString();
    public void endElement( String namespaceURI,
    String localName,
    String qName ) throws SAXException {
    public void characters( char[] ch, int start, int length )
    throws SAXException {
    contents.write( ch, start, length );
    public Vector getxmlDocuments() {
    return solrDocuments;
    public static void main( String[] argv ){
    System.out.println( "Example4:" );
    try {
    // Create SAX 2 parser...
    XMLReader xr = XMLReaderFactory.createXMLReader();
    // Set the ContentHandler...
    XmltoObjectHandler ex4 = new XmltoObjectHandler();
    xr.setContentHandler( ex4 );
    // Parse the file...
    xr.parse( new InputSource(new FileReader( "xmlfile.xml" )));
    // Display all documents items...
    XmlDocument i;
    Vector items = ex4.getxmlDocument();
    Enumeration e = items.elements();
    while( e.hasMoreElements()){
    i = (XmlDocument) e.nextElement();
    System.out.println(i.art_id+"\n");
    System.out.println(i.title+"\n");
    }catch ( Exception e ) {
    e.printStackTrace();
    Can anybody help me how to process this type of xml. Is there any other way we can do this? I am trying for two days. It is a big deadlock for me. any help greatly appriciated. Thanks in advance.

    I added my code inside code tags...
    import org.xml.sax.*;
    import org.xml.sax.helpers.*;
    import java.io.*;
    import java.util.*;
    import common.*;
    public class XmltoObjectHandler extends DefaultHandler{
        /** Creates a new instance of XmltoObjectHandler */
        public XmltoObjectHandler() {
        // Local SolrDocument object to collect
        // document XML data.
        private XmlDocument doc = new XmlDocument();
        // Local list of solr documents items...
        private Vector xmlDocuments = new Vector();
        // Local current solr document reference...
        private XmlDocument currentSolrDoc;
        // Buffer for collecting data from
        // the "characters" SAX event.
        private CharArrayWriter contents = new CharArrayWriter();  
        // Override methods of the DefaultHandler class
        // to gain notification of SAX Events.
        // See org.xml.sax.ContentHandler for all available events.
        public void startElement( String namespaceURI,
                String localName,
                String qName,
                Attributes attr ) throws SAXException {
              if ( localName.equals( "doc" ) ) {
                currentXmlDoc = new XmlDocument();
                solrDocuments.addElement( currentSolrDoc );
              if( localName.equals("str"){
                   for ( int i = 0; i < attr.getLength(); i++ ){               
                    if("art_id".equals(attr.getValue(i))){
                             currentSolrDoc.art_id = contents.toString();
                        if("title".equals(attr.getValue(i))){
                             currentSolrDoc.title = contents.toString();
        public void endElement( String namespaceURI,
                String localName,
                String qName ) throws SAXException {      
        public void characters( char[] ch, int start, int length )
        throws SAXException {       
            contents.write( ch, start, length );       
        public Vector getxmlDocuments() {
            return solrDocuments;
        public static void main( String[] argv ){       
            System.out.println( "Example4:" );
            try {          
                // Create SAX 2 parser...
                XMLReader xr = XMLReaderFactory.createXMLReader();           
                // Set the ContentHandler...
                XmltoObjectHandler ex4 = new XmltoObjectHandler();
                xr.setContentHandler( ex4 );           
                // Parse the file...
                xr.parse( new InputSource(new FileReader( "xmlfile.xml" )));          
                // Display all documents items...
                XmlDocument i;
                Vector items = ex4.getxmlDocument();
                Enumeration e = items.elements();
                while( e.hasMoreElements()){
                    i = (XmlDocument) e.nextElement();
                    System.out.println(i.art_id+"\n");
                        System.out.println(i.title+"\n");
            }catch ( Exception e ) {
                e.printStackTrace();
    }

  • Dynamic Load Plan creation using scripting

    Hello All,
                   We have a requirement to create load plans dynamically i.e using script groovy. Idea is that we will store interface scenarios in a table and then script will read these scenarios an create dynamic load plans. Now following are my question.
                   1) Is it possible to create load plans through script ? (different blogs on net claims that you can do anything or everything whatever ODI studio can do)
                    2) Any pointer what API to use for this task ? I am very new to scripting and have zero idea about how to go about it . if possible please suggest sample script to create load plans (I can see some sample to create interface,folder etc on net.)
    Thanks in advance for your reply.
    Thanks & Regards

    ODI SDK apis allows dynamic creation of Loadplans. Oracle Fusion Middleware Java API Reference for Oracle Data Integrator
    Studio too uses these APIs for LP related operations so you should be able to do using these whatever studio allows.
    You can find SDK samples at Oracle Data Integration Sample Code

  • Can I create new TeamProjectCollection and TeamProject on TFS using Tfs API programmatically

    Hi,
    I want to ask that is there is any way to create new TeamProjectCollection and then new TeamProject on that collection using tfs api programmatically ?
    Thanks in advance.

    Hi Hassan,
    There is no API to create a team project, but you can script it using devenv. You can check the links below for more information:
    http://blogs.msdn.com/b/granth/archive/2009/09/25/scripting-team-project-creation-in-tfs2010.aspx
    https://social.msdn.microsoft.com/Forums/vstudio/en-US/99184c0e-31b4-43aa-8f36-52545bb48e33/create-a-team-project-programatically?forum=tfsprocess
    Best regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Tax creation in a security transaction

    Hi,
    does anyone implemented tax creation from a security transaction.
    I used note 93374 but it only works from manual posting.
    Can anyone help me.
    Best regards.
    Marcus

    I got it
    Srinivas

  • Using TableLocking API in Stateless Session Bean through WD application

    Hi All,
    We have develpoed a webDynpro application which involved Jav Dictionary Table.
    We have given UI for Creation, Updation and Deletion of the table.For database connection we have used Stateless Session Bean.
    we have the requirement of Locking the Table record when one user is either editing or deleting the record of Table from UI, so any other user cannot update or delete the same record.
    To implement the above functionality, we have used TableLocking API with lifetime as userSession in the Stateless Session Bean to acquire a Lock for particular record.
    With lifetime as usersession the record should get unLocked automatically, if the session of application is expired and record is not unLocked Explicitly.
    We are calling the Session Bean from Webdynpro application to acquire a lock, When the Dynpro application expires the locked record should get unlocked automatically as the lifetime is defined as usersession,But the record remains unlocked only even after expiration of the application sessionand deadlock occurs for that record.
    So if anyone can suggest the solution for the above problem.
    Or some other method to Lock Particular Record from application.
    Thanks in advance.
    Regards,
    Shruti.

    HI,
    Can you resolve this issue?
    I have the same scenary, could you give me some tips?
    Thanks,
    Freddy F

  • How to assign roles to users using WL api?

    Hi,
    We have a requirement to allow creation of new users through application screens and assign groups and roles to those users.
    My users will exist in external LDAP server while my groups and roles will exist in embedded LDAP server. Using WL APIs i am able to create users and add them to groups using the code peices given below:
    ========================================
              userProviderControl.createUserSimple(form.userID, form.password);
              groupProviderControl.addUserToGroup(ocnGroup, form.userID);
    ========================================
    How do i assign roles to this new user programatically?
    If i add a role from console (Home > Realm Roles > Summary of Security Realms > myrealm > Realm Roles -> Global Roles) and edit role condition to add this newly created user then i it works fine. I want to achieve the same i.e. edit role condition programatically.
    Any help will be greatly appreciated.
    Thanks,

    Problem Solved !!!
    The data-type conversion needs to be performed in the SPML2 Person Form. Add a Field called waveset.roles and map it to the SPML2 attribute name being used in ur client. It's best done through a rule.....
    If anybody is facing similar problem and need more details....please email me @ [email protected]

  • How can I extract model dll information (inports, outports etc) using VeriStando API?

    Hi,
    I am working in a system that may run using the actual or modelled UUT. Besides this, it uses 3 heavy models running at 5 kHz.
    I am looking for a way to inspect the model dll and extract its information as System Explorer does when the model is included.
    Is it possible to do this using VeriStand API?
    Cheers,
    Cláudio H.
    CHCastro

    Hi Jarrod,
    This VI does what I am doing now but in a cleanner way.
    I made some changes to let it model independent.
    The point is: it is necessary to run the project to retrieve the model information. My feeling is that System explorer does this without run the project and this is what we would like to do.
    Other point: when we compile the model we fill the fields of information in "NI Information" which we want to retrieve. These information field are avaiable in system explorer during in4 creation.
    Is this possible?
    I am including the generic version of your VI that I changed.
    Cheers.
    Cláudio H.
    CHCastro
    Attachments:
    Simple LabVIEW API Example.zip ‏20 KB
    Simple LabVIEW API Example.zip ‏20 KB

Maybe you are looking for