Overwrite Object Instance or all Attributes of it

Hello,
i have an question regarding ABAP OO,
i like to do following:
1) i like to give the reference me into a attribute of an local object.
2) edit attributes of this object
3) overwrite attributes of me with changed on of the atrribute of the local attribute
Step 1 and 2 is no problem,
but when i tried it like this.
me = lo_test->test.
i get the message that "me" is not overwriteable,
sure i can make it by every attribute of my class:
me->test1 = lo_test->test->test1.
me->test2 = lo_test->test->test2.
but i want a dynamic why to overwrite all attributes.
Thank you for any idea!
Regards
Marcus

Hi Marcus!
'me' (or 'lo_test') are pointer to an object. In case of attributes handling looks similar to a structure with their fields, but you discover the main difference: the structure name is just the head for all components - but 'me' is not a pointer to a (structured) field string.
You have to handle the attribute level (or make your assignments in a method). Maybe you can get a more dynamic access by using one structure with all values as single attribute.
Regards,
Christian

Similar Messages

  • Size limitation for all attributes in user objects in Active Directory????

    hi geeks , i wanna know maximum size limit of an user objects attribute in   active directory ... like max amount of character first name attribute can hold ... Thank in advance..

    You can use ADSI Edit to view the properties of the attributes in the Schema container of your AD. In the Schema container you can select an attribute, like Company, right click, select properties, and find the rangeUpper property of the attribute. This
    is the maximum length in characters (or bytes). You can also use dsquery to retrieve rangeUpper for an attribute. For example:
    dsquery * "cn=Schema,cn=Configuration,dc=MyDomain,dc=com" -filter "(LDAPDisplayName=streetAddress)" -attr rangeUpper
    where your domain is MyDomain.com. This finds the maximum length for the "street address" attribute. A few values in my test domain (the values can be modified, so these are the defaults):
    company                      64
    streetAddress              1024
    physicalDeliveryOfficeName  128
    initials                      6
    st                          128
    postOfficeBox                40
    name                        255
    cn                           64
    You can use the first two spreadsheets on this page to help identify attributes in AD (with no Exchange):
    http://www.rlmueller.net/UserAttributes.htm
    The first spreadsheet documents the attributes corresponding to the fields on most of the tabs of ADUC. For example, "st" is the attribute for state, "physicalDeliveryOfficeName" for the field labeled "office". You need the
    LDAPDisplayName's of the attributes, like I used in the dsquery command above. The second spreadsheet documents all attributes in AD with more information, like the syntax and which class each applies to.
    Richard Mueller - MVP Directory Services

  • Error when determining attribute 'OBJECTTOAPPROVE' of object instance

    Hi,
    I'm using Item-based level approval shopping cart. I've written code in BADI for approval level as per our requirement. When I create shopping cart, it is triggering workflow and going to particular user, but when I saw the step history for the approval activity it shows, Error when determining attribute 'OBJECTTOAPPROVE' of object instance BO.BUS30003.
    And when I execute the workitem, the status changes to error state and it has one more message in step history which is Work item 000000006030: Object FORM method HTMLPROCESS cannot be executed.
    Any one knows about this errors ?
    Regards,
    JMB

    Hi..
    In simulating the workflow is it working.
    Regards,
    Surjith

  • How to remove all scripts on object instances?

    I'm looking for any kind of solution here, besides disabling the warning.
    I hate it when I'm converting someone else's AS2 project to AS3, and there's code buried on an onstage instance somewhere, which gives me the warning:
    "Actions on button or MovieClip instances are not supported in ActionScript 3.0. All scripts on object instances will be ignored."
    How can I:
         A) Find which instances have code on them.
              or
         B) Remove all code on all instances.
    Idea:
    Can I save as a different format/version/something and lose this data somehow. Then I could convert it back its current FLA format?

    YES!!! So awesome!!  Thanks

  • Can't read all attribute of my serialized object

    Hello everybody,
    I've got a problem with my program. I try to serialized a MutableTreeNode root in order to save and then open my JTree.
    I serialize it and i have no problem but when i open it the parent hierarchy is saved (x is son of y...) but their name are null. I loose nodes' name... :/
                   try {
                        //Je cr�e un fichier temporaire dans le r�p�rtoire courant
                        //Ce fichier est l'arbre (selection de l'utilisateur) serializ�
                        //Flux cr�ant un fichier
                        FileOutputStream fos = new FileOutputStream(this.path);
                        //Flux dans lequel je stocke un objet
                        ObjectOutputStream oos = new ObjectOutputStream(fos);
                        //J'�cris dans mon flux mon objet
                        System.out.println("root before drag = "+this.root); 
                        oos.writeObject(this.root);
                        //On ferme le flux
                        oos.flush();
                        fos.close();
                   } catch (FileNotFoundException e1) {
                        System.err.println("FileNotFoundException");
                        e1.printStackTrace();
                        return null;
                   } catch (IOException e1) {
                        System.err.println("IOException");
                        return null;
                   } catch (ClassCastException e1) {
                        System.err.println("ClassCastException");
                        return null;
                   try {
                        FileInputStream fos = new FileInputStream(this.path);
                        ObjectInputStream oos = new ObjectInputStream(fos);
                        //J'�cris dans mon flux mon objet
                        MutableTreeNode sousArbre = (MutableTreeNode) oos.readObject();
                        //On ferme le flux
                        fos.close();
                        //On r�cup�re l'arbre
                        System.out.println("root after drag = " + sousArbre);
                        this.root = sousArbre;
                        modele = new DefaultTreeModel(root);
                        Arbre.setModel(modele);
                        Aide a = new Aide(Arbre);
                   } catch (FileNotFoundException e1) {
                        System.err.println("FileNotFoundException");
                        e1.printStackTrace();
                   } catch (IOException e1) {
                        System.err.println("IOException");
                        e1.printStackTrace();
                   } catch (ClassNotFoundException e1) {
                        System.err.println("ClassNotFoundException");
                        e1.printStackTrace();
                   } catch (ClassCastException e1) {
                        System.err.println("ClassCastException");
                        e1.printStackTrace();
                   }so:
    System.out.println("root before drag = "+this.root);
    return node name
    Mais :
    System.out.println("root after drag = " + sousArbre);
    return null
    Have you an idea ?
    Thx :)

    Please check your Node Object, I mean all Objects that you are going to save is serialized or not.

  • Object instance 1200 does not exist (while executing task SWUS)

    hello all,
    i have created a workflow class and two methods (constructor, display) and 1 attribute PLANT (instance,public) in it.
    i am using this class and display method in task t code PFTC.
    While executing this task from SWUS , i am getting this error.Object instance 1000 does not exist.
    As i was going through this blog. i have created everything exactly just like it is mentioned there.
    But still i am getting this error. please guide me to detect where i am mistaken.
    http://scn.sap.com/community/bpm/business-workflow/blog/2006/07/25/using-abap-oo-methods-in-workflow-tasks
    this is class screen-shot and error i am facing while executing the task.
    The methods which are implemented using the interface are emtpy(don't contain any source code lines).

    sorry i forgot to mention that input value 1000 does exist in our system.
    i have also tried F4 help. it is showing all existing plants in our system, but still it is not accepting values select from f4 help.
    Also to add information,
    I have executed class using F8 option in class builder, and it is working perfect.
    source code of display method.(i am trying to view plant in display method just like in blog).
    method DISPLAY.
    break-point.
       data: ls_vt001w type v_t001w.
       CLEAR ls_vT001W.
       ls_VT001W-MANDT = SY-MANDT.
       ls_VT001W-WERKS = me->PLANT.
       CALL FUNCTION 'VIEW_MAINTENANCE_SINGLE_ENTRY'
         EXPORTING
           ACTION    = 'SHOW'
           VIEW_NAME = 'V_T001W'
         CHANGING
           ENTRY     = ls_vT001W.
    endmethod.

  • How to invoke BPM object instance variable from interactive activity?

    I have a screenflow with an automatic activity "A" followed by an interactive activity "B". "B" calls a BPM object "X" and uses a JSP presentation to show its attributes. Is there a way to use another BPM object, say type "Y", create an instance variable of that type inside "A", and get its attributes values from the JSP page associated to "B"?
    Edited by: user6473912 on 20/07/2010 03:37 PM

    Try this. It assumes you have:
    <li> a user named "auto"
    <li> a project variable named "customerType"
    <li> an instance variable named "orderAmount" that is a decimal
    <li> an instance variable named "order" that is a BPM Object that has attributes named "customerName" and "amount"
    ps as ProcessService
    xmlObject as Fuego.Xml.XMLObject
    do 
      connectTo ps
          using url = Fuego.Server.directoryURL,
          user = "auto",
          password = "auto"
      instF as InstanceFilter
      create(instF, processService : ps)
      addAttributeTo(instF, variable : "customerType", comparator : IS, value : "Gold")
      instF.searchScope = SearchScope(participantScope : ParticipantScope.ALL, statusScope : StatusScope.ONLY_INPROCESS)
      for each inst in getInstancesByFilter(ps, filter : instF) do
        // here's how to get the value inside a primitive instance variable
        orderAmtObj as Object = getVar(inst, var : "orderAmount")
        // here's how to get the value of attributes inside a complex BPM Object instance variable
        //    - in this case this is an "order" object with two attributes (customerName and amount)
        orderObj as Object = (getVar(inst, var : "order"))
        xmlObject = Fuego.Xml.XMLObject(createXmlTextFor(DynamicXml, object : orderObj, topLevelTag : "xsi"))
        logMessage "The value of the order object's customer name is: " +
               selectString(xmlObject, xpath : "customerName")
        logMessage "The value of the order object's order amount is: " +
               selectNumber(xmlObject, xpath : "amount")
        // here's a rather uninspired way to retrieve who the participant is that was assigned the instance
        logMessage "The participant assigned to this instance is: " + inst.participantId
      end
    on exit
      disconnectFrom ps
    endDan

  • Share Java Object Instance between JSP's

    Hi@all!
    Can i share a Java Object Instance between JSPages?
    Example:
    Class x
    Public Attribute txt
    Object creation in x.jsp
    set public Attribute txt to "HelloWorld"
    goto y.jsp
    get value from txt
    or...
    a global package
    thnx for help

    Here is a tutorial that explains how to use jsps and javabeans together.
    http://www.roseindia.net/jsp/usingbeansinjsp.shtml
    Quick question is sounds like you are pretty early in your development phase. Have you considered adopting JSF. You may find it a bit easier.
    Regards.

  • Generate one instance for all users in a Group

    Hi All,
    We have BO 3.1 with  FP 2.6.
    There is a report that needs to be schedule in such a way that it will generate only one instance for all the users belonging to u201CGlobalu201D community while for rest of the users wonu2019t see any instance of it. They will simply run the report on demand providing the prompt values.
    I am able to run the report for whole u201CGlobalu201D group (using u2018schedule foru2019) option but the problem is it creates as many instances as the number of users I have in this group. As users of this group have same data level access, so primarily theyu2019ll get same report output. That is why it is not desirable to run this report for all of them instead there should be a way it creates one instance after each schedule for the whole community.
    Please suggest.
    Thanks,
    Chandra

    Hi Chandra,
    I think there are still ways to use publications to achieve what you want.
    For instance, I created the below scenario:
    - Created 3 users (pub1, pub2, pub3) and put them in group (publication users)
    - I created a publication and specified the "publication users" group as the enterprise recipients
    - Set the destination to be Default & BusinessObjects Inbox.  Set the "Send As" option to Shortcut instead of copy.
    - Under Advanced, I set it to one db fetch for all recipients.
    - Scheduled this and it ran the report once, and created a shortcut to that object in each users inbox (user in the group specified)
    This meets most of your criteria.  The rest of it should be handled by security on the objects/folders.
    Another option may be Object Packages with the proper security setup.
    Thanks
    JB

  • CAL Instance missing all the times I login (region EU)

    I've created the instance and all seemed fine.
    I suspended and logged off.
    I logged in again and the instance was missing. Created again, logged out automatically by the system after some time. Logged again and the instance is missing again !!!
    Any idea why ?
    Much appreciated.
    Walter

    Hi,
    the solution is
    SAP Business Warehouse 7.4 SP5 incl. SAP Business Objects BI 4.1 SP2 on SAP HANA 1.0 SP7
    It happened today but also 3 days. ago.
    I just noticed because I've logged again and I've found no instance created few days ago.
    How can I reply in private and send my ID ?
    Regards
    W.

  • OIM - Task Assignment Adapter - How to get the object instance key?

    Hello experts,
    I'm trying to use a task assignment adapter to assign an approval task dynamically. Basically, the user can request a resource like "CustomApp Profiles" and we create an object form to let them choose the profile that he needs. Each profile has an owner, which is populate in a Lookup (Owner is the code and Profile is the decode).
    So, in the approval task, I need to get the profile selected by user in the object form and search into the lookup who is the owner of that profile. But I don't know how can I get the object instance key using the parameters that can be mapped to a task assignment adapter.
    Looking into the OIM documents, I believe that the easier way is using the request key, because the REQ_KEY is a foreign key in OBI table.
    Did anyone knows how can I get the object instance key using the request key? Can I use some API or should I execute a SQL statement directly in OIM database?
    Best Regards,
    Nitto

    To retry a task that is in a rejected state, you use the SCH_KEY which is the task key.  In OIM, all rejected tasks are listed in the OTI table.  It contains all the important information about a rejected or pending task.
    You can use the APIs found in the tcProvisioningOperationsIntf class to retrieve open tasks.
    -Kevin

  • How can i have a refrence of a java class object instance in my c++ project

    Hi!
    How can i have a refrence of a java class object instance in my c++ project. Is there a way?

    hahaxia wrote:
    The second question is the big one. The first question is half of the problem of "c++ to java" invocation and access. But the other half which is "java to c++ " invocation and access is still not solved. jni only provide the "java to c++ " DLL invocation Wrong,
    Using JNI your java classes can have methods implemented in C/C++.
    Using JNI you can call java classes.
    There is no other possible interaction between C++ and java, so it does it all.

  • Can't create detail VO  in one VO that including all attributes from M/D VO

    Hi,
    I have two EOs(BrFixreq/DafDefect) and two VOs(BrFixreqVO/DafDefectVO) based on the EOs, when create association between them I have selected "composition association" check box and "Cascade Update key Attributes" check box, and cardinality is 1 to 1.
    And also another VO( TestViewObj) includes all attributes in BrFixreqVO and DafDefectVO, and set BrFixreq/DafDefect to updatable in TestViewObj definition , and add TestViewObj to an AM(AppModue).
    When I run this AM in Oracle Business Component Browser, click "TestViewObj1" in left tab, and click the green plus sign on the toolbar, it only creates master VO attributes, not including detail VO attributes.
    Any directions will be great help to me!
    Thanks,
    zeroxin

    Hi,
    I presume that your tables are associated "1 to 1".
    This means that you could create your VO's and a viewLink and drop them in the page as Master(form)-Detail(form).
    You would have to bind actions for both VO's in each CRUD button (ex. Insert should execute CreateInsertMaster and CreateInsertDetails).
    Off course it would be better if things worked with a single VO because you would not have to do anything.
    This is simply proposed as a workaround in case that you cannot make it work. More issues regarding the details of your implementation could occur that you would have to deal with.
    Another way to handle this so that you have a single VO would be to create a database view that will handle insert, update, delete on both tables and create an Entity Object based on this view.
    You can read more about this in the Fusion Developer's Guide For Oracle ADF (Chapter 37.5)
    Gabriel.

  • Create an object instance without calling its constructor?

    Hi,
    Sometimes it's useful to create object instances without calling their constructor. When? For example object deserialization.
    By default when deserializating an object, the instance in the VM is created by calling the default constructor of the first non Serializable super-class (if you don't have such you're in trouble). I think that the db4o object database don't even call any constructor you may have written.
    So such thing exists, but how is this possible? I fugured out that sun's deserialization mechanism first finds the constructor of the first non Serializable super-class and then:
    cons = reflFactory.newConstructorForSerialization(cl, cons); Here I'm stuck.
    Here's the source of the method for finding serializable constructor:
         * Returns subclass-accessible no-arg constructor of first non-serializable
         * superclass, or null if none found.  Access checks are disabled on the
         * returned constructor (if any).
        private static Constructor getSerializableConstructor(Class cl) {
         Class initCl = cl;
         while (Serializable.class.isAssignableFrom(initCl)) {
             if ((initCl = initCl.getSuperclass()) == null) {
              return null;
         try {
             Constructor cons = initCl.getDeclaredConstructor(new Class[0]);
             int mods = cons.getModifiers();
             if ((mods & Modifier.PRIVATE) != 0 ||
              ((mods & (Modifier.PUBLIC | Modifier.PROTECTED)) == 0 &&
               !packageEquals(cl, initCl)))
              return null;
             cons = reflFactory.newConstructorForSerialization(cl, cons);
             cons.setAccessible(true);
             return cons;
         } catch (NoSuchMethodException ex) {
             return null;
        }So any info about this ReflectionFactory, and the problem as a whole?
    Thanks.

    So the question is how to create object instance without initializing it (calling the constructor)? And if you have any info about ReflectionFactory it will be useful too.
    When serializing an object you save all its fields and some extra info. When you deserialize it you have to reconstruct it, by copying the fields back, but not to reinitialize.
    import java.lang.reflect.*;
    import java.io.Serializable;
    import java.security.AccessController;
    import sun.reflect.ReflectionFactory;
    public class Test0 implements Serializable {
        public Test0() {
            System.out.println("Test0");
        public static void main(String[] args) throws Exception {
            Constructor<Test0> constr = reflectionFactory.newConstructorForSerialization(Test0.class, Object.class.getConstructor(new Class[0]));
            System.out.println(constr.newInstance(new Object[0]).getClass());
        private static final ReflectionFactory reflectionFactory = (ReflectionFactory)
         AccessController.doPrivileged(
             new ReflectionFactory.GetReflectionFactoryAction());
    }When you execute this piece you get:
    class Test0

  • Create SOFM object instance from PDF

    Hi All,
    I am using 4.6 version of SAP where FM 'sap_wapi_attachment_add' is does not exit. My query is to create an attachment (SMARTFORM coverted in PDF) in ABAP progam which i have to send as attachment with a Decision Task in the workflow.
    I am able to send attachment with mail but to send attachment with decision task i need to create an instance of SOFM object. Please suggest an alternative method to do so instead of FM 'sap_wapi_attachment_add' .

    Hi Taran,
    I had put my code in workflow task. You can find the task method code below:
    *Data declaration
    DATA: GITAB     TYPE SOLIX_TAB,                     
          GSTAB     LIKE LINE OF GITAB,                 
          SOFM_KEY  TYPE SOFMK,                         
          GIT_LINES TYPE SOLI_TAB.                      
    DATA: LREF_DOCUMENT_BCS  TYPE REF TO CL_DOCUMENT_BCS,
          LREF_IM_DOCUMENT   TYPE REF TO IF_DOCUMENT_BCS.
    Generate Smartform*
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
        EXPORTING
          FORMNAME                 = C_FORM
    *      VARIANT                  = ' '
    *      DIRECT_CALL              = ' '
        IMPORTING
          FM_NAME                  = GV_FM
        EXCEPTIONS
          NO_FORM                  = 1
          NO_FUNCTION_MODULE       = 2
          OTHERS                   = 3.
      IF SY-SUBRC <> 0.
    *    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *       WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      CALL FUNCTION 'SSF_GET_DEVICE_TYPE'
        EXPORTING
          I_LANGUAGE                   = SY-LANGU
    *      I_APPLICATION                = 'SAPDEFAULT'
        IMPORTING
          E_DEVTYPE                    = GV_OUTPUT_OPTIONS-TDPRINTER
        EXCEPTIONS
          NO_LANGUAGE                  = 1
          LANGUAGE_NOT_INSTALLED       = 2
          NO_DEVTYPE_FOUND             = 3
          SYSTEM_ERROR                 = 4
          OTHERS                       = 5.
      IF SY-SUBRC <> 0.
    *    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *       WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      GV_OUTPUT_OPTIONS-TDNOPREV = 'X'.
      GV_CONTROL_PARAMETERS-GETOTF = 'X'.
      GV_CONTROL_PARAMETERS-NO_DIALOG = 'X'.
      CALL FUNCTION GV_FM
        EXPORTING
    *      ARCHIVE_INDEX              =
    *      ARCHIVE_INDEX_TAB          =
    *      ARCHIVE_PARAMETERS         =
          CONTROL_PARAMETERS         = GV_CONTROL_PARAMETERS
    *      MAIL_APPL_OBJ              =
    *      MAIL_RECIPIENT             =
    *      MAIL_SENDER                =
          OUTPUT_OPTIONS             = GV_OUTPUT_OPTIONS
          USER_SETTINGS              = 'X'
          GV_ENAME                   = GV_ENAME
          GV_PERNR                   = GV_PERNR
          GV_PERSK                   = GV_PERSK
          GV_ZZ_LEVEL                = GV_ZZ_LEVEL
          GV_BTRTX                   = GV_BTRTX
          GV_GBDAT                   = GV_GBDAT
          GV_JOIN_DATE               = GV_JOIN_DATE
          GV_RESIN_DATE              = GV_RESIN_DATE
        IMPORTING
          DOCUMENT_OUTPUT_INFO       = GV_DOCUMENT_OUTPUT_INFO
          JOB_OUTPUT_INFO            = GV_JOB_OUTPUT_INFO
          JOB_OUTPUT_OPTIONS         = GV_JOB_OUTPUT_OPTIONS
        EXCEPTIONS
          FORMATTING_ERROR           = 1
          INTERNAL_ERROR             = 2
          SEND_ERROR                 = 3
          USER_CANCELED              = 4
          OTHERS                     = 5.
      IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      CALL FUNCTION 'CONVERT_OTF_2_PDF'
    *    EXPORTING
    *      USE_OTF_MC_CMD               = 'X'
    *      ARCHIVE_INDEX                =
        IMPORTING
          BIN_FILESIZE                 = GV_BIN_FILESIZE
        TABLES
          OTF                          = GV_JOB_OUTPUT_INFO-OTFDATA
          DOCTAB_ARCHIVE               = GIT_DOCS
          LINES                        = GIT_LINES_TEMP
        EXCEPTIONS
          ERR_CONV_NOT_POSSIBLE        = 1
          ERR_OTF_MC_NOENDMARKER       = 2
          OTHERS                       = 3.
      IF SY-SUBRC <> 0.
    *    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *       WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      CALL FUNCTION 'SX_TABLE_LINE_WIDTH_CHANGE'
        TABLES
          CONTENT_IN  = GIT_LINES_TEMP
          CONTENT_OUT = GIT_LINES.
      IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      CALL FUNCTION 'SO_SOLITAB_TO_SOLIXTAB'
        EXPORTING
          IP_SOLITAB  = GIT_LINES   "GIT_LINES_TEMP1
        IMPORTING
          EP_SOLIXTAB = GITAB.
    *Create SOFM object from smartform PDF
    IF NOT GITAB IS INITIAL.                    
          TRY.                                                        
              CALL METHOD CL_DOCUMENT_BCS=>CREATE_DOCUMENT            
                EXPORTING                                             
                  I_TYPE          = 'BIN'                             
                  I_SUBJECT       = 'NOTICE PAY WAIVER FORM'          
    *          I_LENGTH        =                                      
    *          I_LANGUAGE      = SPACE                                
    *          I_IMPORTANCE    =                                      
    *          I_SENSITIVITY   =                                      
    *          I_TEXT          =                                      
                  I_HEX           = GITAB                             
    *          I_HEADER        =                                      
    *          I_SENDER        =                                      
                RECEIVING                                             
                  RESULT          = LREF_DOCUMENT_BCS.                
            CATCH CX_DOCUMENT_BCS .                                   
          ENDTRY.                                                                               
    LREF_IM_DOCUMENT = LREF_DOCUMENT_BCS.                                                                               
    TRY.                                                        
              CALL METHOD LREF_DOCUMENT_BCS->ADD_DOCUMENT_AS_ATTACHMENT
                EXPORTING                                             
                  IM_DOCUMENT = LREF_IM_DOCUMENT.                     
            CATCH CX_DOCUMENT_BCS .                   
          ENDTRY.                                                                               
    TRY.                                        
              CALL METHOD LREF_DOCUMENT_BCS->GET_DOCTP
                RECEIVING                             
                  RESULT = SOFM_KEY-DOCTP.            
            CATCH CX_OS_OBJECT_NOT_FOUND .            
          ENDTRY.                                                                               
    TRY.                                        
              CALL METHOD LREF_DOCUMENT_BCS->GET_DOCYR
                RECEIVING                             
                  RESULT = SOFM_KEY-DOCYR.            
            CATCH CX_OS_OBJECT_NOT_FOUND .            
          ENDTRY.                                                                               
    TRY.                                        
              CALL METHOD LREF_DOCUMENT_BCS->GET_DOCNO
                RECEIVING                             
                  RESULT = SOFM_KEY-DOCNO.            
            CATCH CX_OS_OBJECT_NOT_FOUND .            
          ENDTRY.                                                                               
    SWC_CREATE_OBJECT NOTICE_PAY_WAIVER_FORM 'SOFM' SOFM_KEY.
          SWC_SET_ELEMENT CONTAINER 'NOTICE_PAY_WAIVER_FORM'      
                                     NOTICE_PAY_WAIVER_FORM.      
        ENDIF.
    The object instance thus created will be visible along with other  object instances in the workitem display. Provide this object in binding of decision step as you provise any other obect instance and not as ATTACH_OBJECT       
    Regards,
    Neha

Maybe you are looking for