Attaching URL using GOS with 2 key fields

I found a program to attach URL using GOS. I tried the program using his sample Business object (BUS2012) and supplied a valid PO and the program works.
When I use the program using business object BUS1505 (Real Estate Contract) and put a valid contract number, the program didn't attached the URL. When I check the business object, I found out that the key fields are 2, Company Code and Contract Number. With this, how can attach it to the program.
Please help me on this. Thanks in advance.
Report  Z_RMTIWARI_ATTACH_DOC_TO_BO
Written By : Ram Manohar Tiwari
Function   : We need to maintain links between Business Object and
             the attachment.Attachment document is basiclally a
             business object of type 'MESSAGE'.In order to maintain
             links, first the attachment will be crated as Business
             Object of type 'MESSAGE' using Message.Create method.
             Need to check if we can also use FM
             'SO_DOC_INSERT_WITH_ORIG_API1' or SO_OBJECT_INSERT rather
             than using Message.Create method.
REPORT  Z_RMTIWARI_ATTACH_DOC_TO_BO             .
Include for BO macros
  INCLUDE : <cntn01>.
Load class.
  CLASS CL_BINARY_RELATION definition load.
  CLASS CL_OBL_OBJECT      definition load.
PARAMETERS:
Object_a
   P_BOTYPE LIKE obl_s_pbor-typeid DEFAULT 'BUS1505', " e.g. 'BUS2012'
   P_BO_ID  LIKE OBL_S_PBOR-INSTID DEFAULT '0000010000273',    " Key e.g. PO No.
Object_b
   P_DOCTY  LIKE obl_s_pbor-typeid DEFAULT 'MESSAGE' NO-DISPLAY,
   P_MSGTYP LIKE SOFM-DOCTP        DEFAULT 'URL'     NO-DISPLAY,
Relationship
   P_RELTYP  LIKE mdoblrel-reltype DEFAULT 'URL'.
  types: BEGIN OF TY_MESSAGE_KEY,
          FOLTP   TYPE SO_FOL_TP,
          FOLYR   TYPE SO_FOL_YR,
          FOLNO   TYPE SO_FOL_NO,
          DOCTP   TYPE SO_DOC_TP,
          DOCYR   TYPE SO_DOC_YR,
          DOCNO   TYPE SO_DOC_NO,
          FORTP   TYPE SO_FOR_TP,
          FORYR   TYPE SO_FOR_YR,
          FORNO   TYPE SO_FOR_NO,
         END OF TY_MESSAGE_KEY.
  DATA : LV_MESSAGE_KEY type TY_MESSAGE_KEY.
  DATA : LO_MESSAGE type SWC_OBJECT.
  DATA : LT_DOC_CONTENT type standard table of SOLI-LINE with header
line.
First derive the Attachment's ( MESSAGE )document type.
  P_DOCTY = 'MESSAGE'.
  CASE P_RELTYP.
  In case of URls
    WHEN 'URL'.
       P_MSGTYP = 'URL'.
  In case of Notes / Private Notes
    WHEN 'NOTE' OR 'PNOT'.
       P_MSGTYP = 'RAW'.
    WHEN 'ATTA'.
       P_MSGTYP = 'EXT'.
  Not implemented as yet...exit
     EXIT.
    WHEN OTHERS.
   ....exit
     EXIT.
    ENDCASE.
Create an initial instance of BO 'MESSAGE' - to call the
instance-independent method 'Create'.
  swc_create_object LO_MESSAGE 'MESSAGE' LV_MESSAGE_KEY.
define container to pass the parameter values to the method call
in next step.
  swc_container LT_MESSAGE_CONTAINER.
Populate container with parameters for method
  swc_set_element LT_MESSAGE_CONTAINER 'DOCUMENTTITLE' 'Title'.
  swc_set_element LT_MESSAGE_CONTAINER 'DOCUMENTLANGU' 'E'.
  swc_set_element LT_MESSAGE_CONTAINER 'NO_DIALOG'     'X'.
  swc_set_element LT_MESSAGE_CONTAINER 'DOCUMENTNAME' P_DOCTY.
  swc_set_element LT_MESSAGE_CONTAINER 'DOCUMENTTYPE'   P_MSGTYP.
'DocumentContent' is a multi-line element ( itab ).
In case of URLs..it should be concatenated with &KEY& in the begining.
  CASE P_MSGTYP.
    WHEN 'URL'.
      LT_DOC_CONTENT = '&KEY&http://intranet.corpoff' .
      append LT_DOC_CONTENT.
In case of Notes or Private Notes, get the data from files on appl
server or from wherever(? - remember background).
     WHEN 'RAW'.
       LT_DOC_CONTENT = 'Hi How r u?' .
       append LT_DOC_CONTENT.
In case of File attachments
     WHEN 'EXT'.
      Upload the file contents using open dataset in lt_doc_content .
      Some conversion ( Compress ) might be required.
      Not sure at this point
  ENDCASE.
  swc_set_element LT_MESSAGE_CONTAINER 'DocumentContent' LT_DOC_CONTENT.
  swc_call_method LO_MESSAGE 'CREATE' LT_MESSAGE_CONTAINER.
Refresh to get the reference of create 'MESSAGE' object for attachment
  swc_refresh_object LO_MESSAGE.
Get Key of new object
  swc_get_object_key LO_MESSAGE LV_MESSAGE_KEY.
Now we have attachment as a business object instance. We can now
attach it to our main business object instance.
Create main BO object_a
  data: LO_IS_OBJECT_A type SIBFLPORB.
  LO_IS_OBJECT_A-INSTID = P_BO_ID.
  LO_IS_OBJECT_A-TYPEID = P_BOTYPE.
  LO_IS_OBJECT_A-CATID  = 'BO'.
Create attachment BO object_b
  data: LO_IS_OBJECT_B type SIBFLPORB.
  LO_IS_OBJECT_B-INSTID = LV_MESSAGE_KEY.
  LO_IS_OBJECT_B-TYPEID = P_DOCTY.
  LO_IS_OBJECT_B-CATID  = 'BO'.
*TRY.
CALL METHOD CL_BINARY_RELATION=>CREATE_LINK
  EXPORTING
    IS_OBJECT_A            = LO_IS_OBJECT_A
   IP_LOGSYS_A            =
    IS_OBJECT_B            = LO_IS_OBJECT_B
   IP_LOGSYS_B            =
    IP_RELTYPE             = P_RELTYP
   IP_PROPNAM             =
   I_PROPERTY             =
IMPORTING
   EP_LINK_ID             =
   EO_PROPERTY            =
*CATCH CX_OBL_PARAMETER_ERROR .
*CATCH CX_OBL_MODEL_ERROR .
*CATCH CX_OBL_INTERNAL_ERROR .
*ENDTRY.
Check if everything OK...who cares!!
  commit work.

HI
You can look at object VBAP as an example.  It'sthe sales order item and has two keys - sales order number and item number. 
the key was created:
BEGIN OF KEY,
     SALESDOCUMENTNO LIKE VBAP-VBELN,
     ITEMNO LIKE VBAP-POSNR,
END OF KEY,
     MATERIAL TYPE SWC_OBJECT,
     SALESDOCUMENT TYPE SWC_OBJECT,
     _VBAP LIKE VBAP.
ND_DATA OBJECT. " Do not change.. DATA is generated
Here is a object instantiation - just build the key with the two fields - then when you call the macro - you pass the one field that already has both keys in it.
GET_PROPERTY SALESDOCUMENT CHANGING CONTAINER.
  SWC_CREATE_OBJECT
    OBJECT-SALESDOCUMENT 'VBAK' OBJECT-KEY-SALESDOCUMENTNO.
  SWC_SET_ELEMENT CONTAINER 'SalesDocument' OBJECT-SALESDOCUMENT.
END_PROPERTY.

Similar Messages

  • Read Table with key field - question

    Hi,
    Can you use the same key field more than once?
    For example:
      READ TABLE I_TVKWZ INTO I_TVKWZ_2 WITH KEY WERKS = '1004'
                                                                                    Werks = '1002'.
    I get an error when trying this.
    Is there an alternative?
    Thanks,
    John

    Hi John,
    try this:
    DATA: begin of itab occurs 0,
            werks like mseg-werks,
            i     type i,
          end   of itab.
    itab-werks = '1000'. itab-i = itab-i + 1. append itab.
    itab-werks = '1000'. itab-i = itab-i + 1. append itab.
    itab-werks = '2000'. itab-i = itab-i + 1. append itab.
    itab-werks = '3000'. itab-i = itab-i + 1. append itab.
    itab-werks = '5000'. itab-i = itab-i + 1. append itab.
    itab-werks = '5000'. itab-i = itab-i + 1. append itab.
    itab-werks = '7000'. itab-i = itab-i + 1. append itab.
    itab-werks = '7000'. itab-i = itab-i + 1. append itab.
    itab-werks = '9000'. itab-i = itab-i + 1. append itab.
    itab-werks = '9000'. itab-i = itab-i + 1. append itab.
    itab-werks = '9000'. itab-i = itab-i + 1. append itab.
    loop at itab where werks = '1000' or werks = '9000'.
    write: / itab-werks, itab-i.
    endloop.
    Regards, Dieter

  • Dispaly material with key field customer based on tax classification

    Hello all,
    Material is classified based on tax classification as products and goods.I need to dispaly these of either for some customers.
    Client is saying me to use the table MLAN(Tax Classification for material).
    Can anybody suggest me how can i pull the material part/service part(matnr)  from the table (MLAN) based on tax classification(TAXKM) with key field customer(KUNNR) when this table does not have customer has key field in it.
    Thank you,
    Sirisha

    Hello all/Brad,
    Requirement is , i need to add and dispaly material data in a column with heading as  tax classification  in ALV Report for the customer.
    Ex:  Customer 11094 brings material 336047-B21(Product)
          Customer 10973 brings material LDMSPMAP-M (Service)
    Material is classified as per the tax classification  as Product and Service. If tax classification is 1 then it is Product and if the tax classification is 2 then it is Service.
    So i'm trying to pull the material(Product/Service) based on tax classification with customer as key field.
    Customer is coming from customer master data.
    So i have used MARA table which has all three fields (Customer,Material,Tax classification) to get the required information but the table does not have test data for customer.So i told my client to update mara table with customer and tax classification data.
    But  my client told me to use MLAN table  because they have updated the data in this table.But unfortunately this table doesn't have customer field to pull the data.
    So that is the reason, i put the above question in the forum.
    PLease help me in solving this issue.
    Thank you,
    Sirisha

  • Can I di Inner Join on 2 tables by using only 1 key field?

    Hello,
    I hv 2 Std. SAP tables, KNVV, KNKK.
    - KNVV - does hv 2 key fields (KUNNR and some other, say X)
    - KNKK - does hv 2 key fields (KUNNR and some other,say Y)
    I want to build a inner join on these 2 tables.
    So, Can I do a INNER JOIN on these 2 tables by using ONLY one key field (its KUNNR)? bcoz, there is ONLY common field!!
    thank you

    Hi,
    The correctness depends on your bussiness requirement. If the common key field is not a primary key, you may end up fetching duplicate entries which you may have to delete after the select query. You dont have to take of any extra precautions in a inner join select query compared to a ordinary select query. Just make sure you use most of the primary key fields of both the tables  in the where clause of the select query for better performance
    Vikranth

  • When attaching documents using GOS send them with workflow

    Hello experts,
    I have a scenario. We have to attach documents to SAP application using GOS. These documents can be edited also.
    Now second part is that when we attach the document or edit the document, the document should be send with the work item "when we attach the document".
    The first part of the scenario is completed and working fine. The second part of the scenario is causing problem. I have checked the various options but none of them are proving helpful.
    There is an option in GOS toolbar to send the documents through workflow but that also asks for the related workflow.
    I was trying to create an event for GOS object which can trigger the workflow automatically when the attachment are created and edited but can not go further with it as not so strong in workflow.
    I request you to kindly help me either in creating this event which will trigger the workflow (whole process) or any other method to do the same.
    Thank you all in advance.

    Hello Andrés,
    Thank you for replying. The main problem is starting the workflow. For that I need to create an event and that is my biggest trouble. I have seen the object IFSAP already. There are no events in it and as such I have created my custom object as super type.
    So I need to create the event from scratch.
    Hope my requirement is clear.
    Thank you.
    Edited by: Apoorv Lohani on Feb 3, 2012 7:54 AM

  • Sender File adapter File Conversion with key fields

    Please help me guys, I already spent way too much time on this!
    I checked a couple of BLOGs and I think I'm doing the right thing except I'm not getting the result I would expect.
    I'm trying to create an IDoc using the from a flat file.
    I get the following error:
    During the application mapping com/sap/xi/tf/_MM_TEST_ a com.sap.aii.utilxi.misc.api.BaseRuntimeException was thrown: RuntimeException in Message-Mapping transformatio~
    The Source file is this:
    H
    L0015
    The file adapter does create the XML below (looks fine):
      <ns:MT_SINGLE xmlns:ns="http://PPSC_TO_BO_INVOICE">
      <HEADER>
         <ID>H</ID>
      </HEADER>
      <LINE>
         <ID>L</ID>
         <SITE>0015</SITE>
      </LINE>
      </ns:MT_SINGLE>
    When I test the map in IR, with the XML that this file adapter created (above) it works fine!
    Also if I take away the HEADER from the source structure everything works fine and I can create the IDoc, therefore I think something must be wrong in the file conversion, the mapping is so simple there is nothing to fail there.
    The file conversion parameters that I have:
    Document Name: MT_SINGLE
    Document Namespace: http://PPSC_TO_BO_INVOICE
    Document Offset:
    Recordset Name: 
    Recordset Namespace:
    Recordset Structure: HEADER,1,LINE,*
    Recordset Sequence: Ascending
    Recordset per Message:
    Key Field name: ID
    Key Field Type: String (Case-Sensitive)
    LINE.fieldNames: ID,SITE
    LINE.fieldFixedLengths: 1,4
    LINE.keyFieldValue: L
    HEADER.fieldNames: ID
    HEADER.fieldFixedLengths: 1
    HEADER.keyFieldValue: H
    What am I doing wrong???
    Any help is much appreciated.
    Thanks,
    Viktor Varga

    Hi Viktor,
    Basic rules:
    1. Down load XML payload(output From Adapter) and test it in IR mapping program. If it is working there is no reason why it will fail in Runtime. Also Check Cache is up to date.
    Generally the problem lies with namespace.
    Hope this helps
    Regards,
    Satish

  • How to update database table with key field?

    Hello Experts,
    I have a database table with following fields
    MATNR   - Key
    SSOUR  -  Key
    KUNNR   - Key
    MENG1 
    MENG2
    MENG3
    And this table contains records like...
    MSD50001     R      1000001     5.30    2.30    5.25
    MSD50002     R      1000002     5.30    2.30    5.25
    MSD50003     R      1000003     5.30    2.30    5.25
    MSD50005     R      1000004     5.30    2.30    5.25
    MSD50004     R      1000005     5.30    2.30    5.25
    I have an internal table with same fields of above database table.
    MSD50001     A      1000001     5.30    2.30    5.25
    MSD50002     A      1000002     5.30    2.30    5.25
    MSD50003     A      1000003     5.30    2.30    5.25
    MSD50005     A      1000004     5.30    2.30    5.25
    MSD50004     A      1000005     5.30    2.30    5.25
    MSD50006     A      1000006     5.30    2.30    5.25
    I want to update the DB table with following internal table records.
    If internal table records = db table records are same then Update....else insert from internal table to db table.
    But here, SSOUR is key field so i am not able to use
    MODIFY dbtab from itab.
    It results me , entries in internal table are inserted into db table.
    So i have double records.
    Is there any statement which updates the key field? and if no fields in db table then insert it?
    Regards
    RH

    hi,
    u cannot update akey field.u can update only non key fields by using key field as a selection criteria.For example if u go to sm30 if u enter any table for inserting values, the key field will always be greyed out it is not succumbed to chnges.but u can insert value into ,if ur inserting and in the insert staemnet if  u have key field which is already present in the table it will return sy-subrc = 4 otherwise it will insert the record and return 0.
    eg for update :
    UPDATE zdm_wtyprof  SET upload_status = 'S'
                             WHERE spart = wa_upd-spart.
    here spart is the key field and it will update the status field in the table as S.
    if updated succesfully it will return 0.
    SIMILARLY U CAN USE select.

  • Using bapi_projectdef_update with CI_PROJ fields

    Does anyone know how to use bapi_projectdef_update to update fields added to PROJ through CI_PROJ ?
    Thanks...
    ...Mike

    Hi Micheal,
    Easy way for updating for the fields which were added through CI_PROJ is through enhancment.
    Below is the process:
    1) First create a project in CMOD and attach the enhancement CNEX0006 to the project.
    2) Go to se11 and in the PROJ table u will find ci_proj include , in this add the required custom fields.
    3) Go to se51 give SAPLXCN1 in the program name with screen number 0600 , create the subscreen and in the layout choose
         Dictionary./Program fields and drag and drop in the screen .
    4)  If u want to write any logic before the screen is displayed do it in PBO.
    5) Now in the function exit EXIT_SAPLCJWB_002 , go in the INCLUDE ZXCN1U11 and write this logic
        move-corresponding sap_proj_imp to proj.
    6) Now in the function exit EXIT_SAPLCJWB_003 , go in the INCLUDE ZXCN1U12. and write this logic
        move-corresponding proj to cnci_proj_exp.
    Activate the project .

  • Use DISTINCT with two fields to return one record

    I am using OleDB with a SELECT DISTINCT query that is used in C# code to populate a DataGridViewComboBox.  The queried table has two fields: ID and Description. The ID field values are unique. Descriptions may be duplicated. The DataSource of my DataGridViewComboBox
    is ListBoxItems which is a ListBox that is populated from a table. The ValueMember is ID and the DisplayMember is Description.  A sample table might look like this:
    ID    Description
     1     Blue
     2     Blue
     3     Red
     4     Blue
    I want my query to return two records; one for the Red description and only one for the Blue description.  I don't care which Blue description it returns, but I do need the corresponding ID for the selected Blue record and the ID value for the Red record. 
    Using SELECT DISTINCT ID, Description FROM... would give me four records instead of two.  How can I return only two records in this scenario?
    Rob E.

    Using window function:
    create table #temp
    ID int,
    description varchar(20),
    insert into #temp Values(1,'blue')
    insert into #temp Values(2,'blue')
    insert into #temp Values(3,'red')
    insert into #temp Values(4,'blue')
    ;WITH CTE AS (select RN=ROW_NUMBER() OVER (PARTITION BY description ORDER BY newid() ),
    ID,description from #temp)
    SELECT ID, description from CTE
    WHERE RN = 1;
    ID description
    4 blue
    3 red
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Database Design
    New Book / Kindle: Beginner Database Design & SQL Programming Using Microsoft SQL Server 2014

  • Error occurred while finding users using API with custom field

    Hi All,
    I am getting the following error while searching user using API with custom attribute. Did anybody faced the same problem before ?
    Hashtable<Object,Object> env = new Hashtable<Object,Object>();
    env.put("java.naming.factory.initial", "weblogic.jndi.WLInitialContextFactory");
    env.put(OIMClient.JAVA_NAMING_PROVIDER_URL, "t3://localhost:14000");
    System.setProperty("java.security.auth.login.config","C:\\Oracle\\Middleware\\Oracle_IDM1\\designconsole\\config\\authwl.conf");
    System.setProperty("OIM.AppServerType", "wls");
    System.setProperty("APPSERVER_TYPE", "wls");
    tcUtilityFactory ioUtilityFactory = new tcUtilityFactory(env, "xelsysadm", "Weblogic123$");
    OIMClient client = new OIMClient(env);
    client.login("xelsysadm", "Weblogic123$".toCharArray());
    SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
    tcUserOperationsIntf moUserUtility = (tcUserOperationsIntf)ioUtilityFactory.getUtility("Thor.API.Operations.tcUserOperationsIntf");
    Hashtable mhSearchCriteria = new Hashtable();
    mhSearchCriteria.put("USR_UDF_ACTUALSTARTDATE",formatter.format(date));
    tcResultSet moResultSet = moUserUtility.findAllUsers(mhSearchCriteria);
    printTcResultSet(moResultSet,"abcd");
    log4j:WARN No appenders could be found for logger (org.springframework.jndi.JndiTemplate).
    log4j:WARN Please initialize the log4j system properly.
    Exception in thread "main" Thor.API.Exceptions.tcAPIException: Error occurred while finding users.
    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 Thor.API.Operations.tcUserOperationsIntf_e9jcxp_tcUserOperationsIntfRemoteImpl_1036_WLStub.findAllUsersx(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.invoke(RemoteBusinessIntfProxy.java:85)
    at com.sun.proxy.$Proxy2.findAllUsersx(Unknown Source)
    at Thor.API.Operations.tcUserOperationsIntfDelegate.findAllUsers(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    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 com.sun.proxy.$Proxy3.findAllUsers(Unknown Source)
    at oim.standalone.code.OIMAPIConnection.usersearch(OIMAPIConnection.java:209)
    at oim.standalone.code.OIMAPIConnection.main(OIMAPIConnection.java:342)
    Caused by: Thor.API.Exceptions.tcAPIException: Error occurred while finding users.
    at com.thortech.xl.ejb.beansimpl.tcUserOperationsBean.findAllUsers(tcUserOperationsBean.java:4604)
    at Thor.API.Operations.tcUserOperationsIntfEJB.findAllUsersx(Unknown Source)
    at sun.reflect.GeneratedMethodAccessor1614.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
    at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
    at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at com.oracle.pitchfork.spi.MethodInvocationVisitorImpl.visit(MethodInvocationVisitorImpl.java:34)
    at weblogic.ejb.container.injection.EnvironmentInterceptorCallbackImpl.callback(EnvironmentInterceptorCallbackImpl.java:54)
    at com.oracle.pitchfork.spi.EnvironmentInterceptor.invoke(EnvironmentInterceptor.java:42)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
    at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
    at com.sun.proxy.$Proxy347.findAllUsersx(Unknown Source)
    at Thor.API.Operations.tcUserOperationsIntf_e9jcxp_tcUserOperationsIntfRemoteImpl.__WL_invoke(Unknown Source)
    at weblogic.ejb.container.internal.SessionRemoteMethodInvoker.invoke(SessionRemoteMethodInvoker.java:40)
    at Thor.API.Operations.tcUserOperationsIntf_e9jcxp_tcUserOperationsIntfRemoteImpl.findAllUsersx(Unknown Source)
    at Thor.API.Operations.tcUserOperationsIntf_e9jcxp_tcUserOperationsIntfRemoteImpl_WLSkel.invoke(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:667)
    at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:230)
    at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:522)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:518)
    at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
    Thank you

    Hi J,
    Thanks for the reply. But the code is working fine for OOTB attributes and  for 11g API i am getting permission exception
    Exception in thread "main" oracle.iam.platform.authz.exception.AccessDeniedException: You do not have permission to search the following user attributes: USR_UDF_ACTUALSTARTDATE.
    at oracle.iam.identity.usermgmt.impl.UserManagerImpl.search(UserManagerImpl.java:1465)
    at sun.reflect.GeneratedMethodAccessor1034.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
    at oracle.iam.platform.utils.DMSMethodInterceptor.invoke(DMSMethodInterceptor.java:25)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
    at com.sun.proxy.$Proxy366.search(Unknown Source)
    at oracle.iam.identity.usermgmt.api.UserManagerEJB.searchx(Unknown Source)
    at sun.reflect.GeneratedMethodAccessor1449.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
    at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
    at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at com.oracle.pitchfork.spi.MethodInvocationVisitorImpl.visit(MethodInvocationVisitorImpl.java:34)
    at weblogic.ejb.container.injection.EnvironmentInterceptorCallbackImpl.callback(EnvironmentInterceptorCallbackImpl.java:54)
    at com.oracle.pitchfork.spi.EnvironmentInterceptor.invoke(EnvironmentInterceptor.java:42)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
    at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
    at com.sun.proxy.$Proxy365.searchx(Unknown Source)
    at oracle.iam.identity.usermgmt.api.UserManager_nimav7_UserManagerRemoteImpl.__WL_invoke(Unknown Source)
    at weblogic.ejb.container.internal.SessionRemoteMethodInvoker.invoke(SessionRemoteMethodInvoker.java:40)
    at oracle.iam.identity.usermgmt.api.UserManager_nimav7_UserManagerRemoteImpl.searchx(Unknown Source)
    at oracle.iam.identity.usermgmt.api.UserManager_nimav7_UserManagerRemoteImpl_WLSkel.invoke(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:667)
    at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:230)
    at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:522)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:518)
    at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
    Caused by: oracle.iam.identity.exception.SearchAttributeAccessDeniedException: You do not have permission to search the following user attributes: USR_UDF_ACTUALSTARTDATE.
    at oracle.iam.identity.usermgmt.impl.UserManagerImpl.search(UserManagerImpl.java:1462)
    ... 44 more

  • JDBC Sender/Receiver Adapter Configuration with key fields in SAP XI

    Hi All,
    Good evening.
    Please let me know, what are the settings required for key fields when configuring both sender and receiver Adapter?
    In My IDOC-XI-File Scenario, when i am sending an IDOC from R/3, I got Mapping Runtime exception error? So, How to send the same IDOC after correcting the error?
    Thanks to all in advance.
    Regards,
    Nagarjuna.

    HI Nagarjuna,
    If my understanding is correct, When you trigger the Idoc from R/3 it thrown the error in XI.
    If  you want to send the same Idoc then go to WE19 in R/3 system enter the same Idoc number and execute the scenaio. It send the Idoc to XI system, but the message number will change.
    Regards
    Goli Sridhar

  • Ztable with key field automatically updated..

    Hi guys,
    I have created a Ztable and assigned a t-code and table view.
    I want to know whether it is possible when I am filling new entries, the key field should be automatically populated to the next number(+1 to the last key field) and should be read only
    (example in am zemp table empno is key field and when filling the employee details, system should prompt me the next empno(read-only) and ask me to enter the other details).
    thanks in advance.
    Pavan.

    Hi,
    for each employee u must insert new row and increment the emploee_no.
    In fieldcatalog the field should be non editable mode.i.e ex:wa_fieldcata-edit = 'x'.
    pass this parameter for key field it will bw only in non editable mode.remainning fields r editable.
    try for this ..
    if u hav any suggestion.tommorow i will post the code.
    thanks.
    Balu

  • Is it possible to use dynamic 'with key' conditions of 'READ itab' ??

    Hi~
    I want to try to set  'with key'  conditions dynamically..
    READ TABLE itab WITH KEY <...>.
    In this <...> phrase, the condition keys could be 2 or 3( don't know at yet this point)
    so i want to make it dynamic with importing data.
    Is it possible?
    Please help me!
    thank you in advance~

    Hey,
    You could write 2 READ statements instead of trying to write a dynamic READ statement.
    IF CONDITION FOR 2 KEYS IS MET.
    READ TABLE WITH KEY1 = (value1) KEY2 = (value2).
    ELSE.
    READ TABLE WITH KEY1 = (value1) KEY2 = (value2) KEY3 = (value3).
    ENDIF.
    ~Kiran

  • I can�t decrypt a text encrypted (using RSA) with keys on smartcard.

    I use a Cyberflex Access e-gate smartcard and I can encrypt and decrypt any text on the card but if I encrypt a text outside using the exported public key, card is not able to decrypt the message.
    On the card side:

    RSAPrivateCrtKey privateKey;
    RSAPublicKey publicKey;
    Cipher cipherRSA;

    private MyIdentity (byte buffer[], short offset, byte length){
            // initialise PIN
            pin = new OwnerPIN(PinTryLimit, MaxPinSize);
            pin.resetAndUnblock();  
            // Key Pair
            KeyPair kp = new KeyPair(KeyPair.ALG_RSA_CRT, (short)1024);
            kp.genKeyPair();
            privateKey = (RSAPrivateCrtKey) kp.getPrivate();
            publicKey = (RSAPublicKey) kp.getPublic();  
            cipherRSA = Cipher.getInstance(Cipher.ALG_RSA_PKCS1, false);
            if (buffer[offset] == (byte)0) {
                register();
            } else {
                register(buffer, (short)(offset+1) ,(byte)(buffer[offset]));
        private void GetPublicKey (APDU apdu) {
            if (pin.isValidated()){
                byte apduBuffer[] = apdu.getBuffer();
                // short byteRead = (short)(apdu.setIncomingAndReceive());
                   short bytesMod = publicKey.getModulus(apduBuffer, (short) 0);
                   short bytesExp = publicKey.getExponent(apduBuffer,bytesMod);
                   short outbytes = (short) (bytesMod + bytesExp);
                    // Send results
                 apdu.setOutgoing();
                 // indicate the number of bytes in the data field
                 apdu.setOutgoingLength((short)outbytes);
                 // at offset 0 send 128 byte of data in the buffer
                 apdu.sendBytesLong(apduBuffer, (short)APDUDATA, (short)outbytes);
            } else {
                ISOException.throwIt (ISO7816.SW_SECURITY_STATUS_NOT_SATISFIED);
         private void Decrypt (APDU apdu) {
            byte apduBuffer[] = apdu.getBuffer();
             short byteRead = (short)(apdu.setIncomingAndReceive());
            cipherRSA.init(privateKey, Cipher.MODE_DECRYPT);
              cipherRSA.doFinal(apduBuffer,(short)APDUDATA, byteRead, apduBuffer, (short)APDUDATA);
             // Send results
            apdu.setOutgoing();
            // indicate the number of bytes in the data field
            apdu.setOutgoingLength(byteRead);
            // at offset 0 send x byte of data in the buffer
            apdu.sendBytesLong(apduBuffer, (short)APDUDATA, byteRead);
         }Off the card, I have a java client:
    public void getPublicKey () {
            int CLA, INS, P1, P2;
            int iArray[] = new int[0];
            short sArray[] = new short[0];
            String ss = new String("");
            String s;
            byte [] sBytes = null;
            byte [] myModulus = new byte[128];
            byte [] myExponent = new byte[3];
            try     {
                CLA = 0x68;
                INS = 0x78;
                P1  = 0;
                P2  = 0;
                sArray = iopCard.SendCardAPDU(CLA,INS,P1,P2,iArray,0x83);
                int iErrorCode = iopCard.GetLastErrorCode();
                if (iErrorCode != 0x9000)     {
                    if (iErrorCode == 0x6300) {
                        System.out.println("Wrong PIN");
                    } else {
                        s = iopCard.GetErrorMessage();
                        System.out.println("SendCardAPDU: " + s);
                } else {
                    System.out.println("Getting Public Key...");
                    if (sArray != null)  {
                        sBytes = new byte[sArray.length];
                        for (int i = 0; i < sArray.length; i++)  {
                            sBytes[i] = (byte)sArray;
    ss = new String(sBytes);
    System.out.println ("------ BEGIN PUBLIC KEY -------------------");
    for (int i=0; i < sArray.length; i++){
    System.out.print(Integer.toHexString(ss.charAt(i)).toUpperCase());
    System.out.println ();
    System.out.println ("------ END PUBLIC KEY -------------------");
    } else {
    System.out.println("Nothing.");
    } catch (slbException b) {
    s = b.getMessage();
    System.out.println("Validate error: " + s);
    for (int i=0; i<128; i++){
    myModulus[i] = (byte) sArray[i];
    for (int i=0; i<3; i++){
    myExponent[i] = (byte) sArray[128+i];
    BigInteger modulus = new BigInteger (1,myModulus);
    BigInteger exponent = new BigInteger ("65537"); // there is a well-known bug in getExponent
    RSAPublicKeySpec keySpec = new RSAPublicKeySpec(modulus, exponent);
    KeyFactory keyFactory =null;
    try {
    keyFactory = KeyFactory.getInstance("RSA");
    publicKey = keyFactory.generatePublic(keySpec);
    } catch (NoSuchAlgorithmException e) {
    System.out.println(e.getMessage ());
    } catch (InvalidKeySpecException e) {
    System.out.println(e.getMessage ());
    System.out.println("------------------ BEGIN ------------------");
    ss = new String(publicKey.getEncoded());
    for (int i=0; i < publicKey.getEncoded().length; i++){
    System.out.print(Integer.toHexString(ss.charAt(i)).toUpperCase());
    System.out.println ();
    System.out.println("------------------ END ------------------");
    // to a file
    try {
    //Store in raw format
    FileWriter fw = new FileWriter("public_raw.txt");
    for (int i=0; i < publicKey.getEncoded().length; i++){
    fw.write(Integer.toHexString(ss.charAt(i)).toUpperCase());
    fw.close();
    //could also store it as a Public key
    System.out.println("Public key saved to file");
    } catch(Exception e) {
    System.out.println("Error opening and writing Public key to file : "+e.getMessage());
    public void encrypt () {
    byte cadena[] = {0x01,0x02,0x03,0x04};
    byte resultado[] = new byte[256];
    // Create Cipher
    try {
    cipherRSA.init(Cipher.ENCRYPT_MODE, publicKey);
    resultado = cipherRSA.doFinal (cadena);
    } catch (InvalidKeyException e) {
    System.out.println(e.getMessage());
    } catch (BadPaddingException e) {
    System.out.println(e.getMessage());
    } catch (IllegalBlockSizeException e) {
    System.out.println(e.getMessage());
    String ss = new String (resultado);
    System.out.println("------------------ BEGIN 4 ------------------");
    for (int i=0; i < resultado.length; i++){
    System.out.print(Integer.toHexString(ss.charAt(i)).toUpperCase());
    System.out.println ();
    System.out.println("------------------ END 4 ------------------");
    Another question is that I don�t understand why I get a constant length string when I encrypt a text on the card and variable length string when I encrypt off the card

    I thought that exponent was 3 bytes long...
    On the card I have the following code:
        private void GetExponent (APDU apdu) {
            if (pin.isValidated()){
                byte apduBuffer[] = apdu.getBuffer();
            short bytesExp = publicKey.getExponent(apduBuffer, (short) 0);
               // Send results
                 apdu.setOutgoing();
                 // indicate the number of bytes in the data field
                 apdu.setOutgoingLength((short)bytesExp);
                 // at offset 0 send 128 byte of data in the buffer
                 apdu.sendBytesLong(apduBuffer, (short)APDUDATA, (short)bytesExp);
            } else {
                ISOException.throwIt (ISO7816.SW_SECURITY_STATUS_NOT_SATISFIED);
        }And if I don't send an APDU with length expected, I get the exception 6C03 (Correct Expected Length (Le) = 0x6C00) so I send APDU with 03 length and I receive the exponent. The problem is that there is a well know bug in getExponent and it returns 00 00 00... so I set it up to 65537 outside the card.

  • Trouble to use COOIS with date fields

    Hi,
    Some trouble to use Tcode COOIS, which could provide a lot of information on Production Workflow. When
    indicating a date in one of the date fields, datas pulled do not fit with the criteria. For example, if the 08082011
    is entered, the report provides informations on postings created the 08082011 and lateru2026 Is there any idea to
    fix the problem or to understand why.
    Thks
    sb
    Edited by: STANISLAS BRESIN on Aug 25, 2011 11:46 AM
    Edited by: STANISLAS BRESIN on Aug 25, 2011 11:47 AM

    Hi,
    Please note that In COOIS, yes you donot have creation date / confirmation posting date.
    You can sort the production orders wrt basic start dates / finish dates.
    Select the basic start date column, rt click and click sort in ascending or descending order
    Refer the OSS note Note 434123 and 615206 - Filling and displaying own fields in information system
    Regards,
    sankaran

Maybe you are looking for

  • Wrapping of text in rows of Query in a Web Template

    Hello experts, implementing the coding in OSS Note 1292696 - Analysis modification: Fixed column width and line break helped in an Masterdata Query using several Attributes to have text wrapping in the header line. But the wrapping is needed for the

  • WLS 6.1 The transaction is no longer active...

    Hello guys, I have a litle problem. We have an application deployed on WLS 5.1. It is working perfect for more than an year now. We recently migrated to WLS 6.1, which went pretty painlessly. The only problem I figured out is a transaction timeout on

  • Strange Error message

    Hiya, anyone know what this means? Error reading/writing file "com.apple.logic.pro.cs": Logical end-of-file reached during read operation. I filled up my Mac HD drive (boot drive) so I moved my Logic song files to another partition on the same drive

  • Y is Stateless Session Bean is of type Session Bean?

    Hi all! Statless Session Bean...It not maintaining a state ...then y its of type Session Bean?

  • Add 1 factory week to result

    Hi, I need to add one factory calendar week to the date. Below isn't working. DATA: DATE type scal-date. DATA: WEEK type scal-week. CALL FUNCTION 'DATE_CONVERT_TO_FACTORYDATE' EXPORTING CORRECT_OPTION = '+' DATE = COMM_STRUCTURE-REQ_DATE FACTORY_CALE