Attachment to _Attach_Objects in user dicision step

hi friends
  I need to attach the PDF to my work item (user dicision step). I know this has been discussed many times. I have read all most all the forms. I am still facing the problem. I have function module ZPDF which converts smart form into PDF and putting the PDF in my BINFILE of type SOLIX. Now i need to attach this BINFILE to my user dicision AttachObjects. In my method am calling ZPDF in my OBJECT ZBUS2089 method wiattachment. I know SOFM instance to be created. But how to create the SOFM INSTANCE?. i used this syntax
DATA : ls_sofm_key type SWOTOBJID-OBJKEY.
DATA: lr_sofm TYPE swc_object.
SWC_CREATE_OBJECT lr_sofm 'SOFM'  ls_sofm_key.
CALL METHOD t_container->if_swf_ifs_parameter_container~set
EXPORTING
name = 'Attachments'
value = lr_sofm
IMPORTING
returncode = ls_subrc.
Its showing the error t_container is not know there is similiar name container.
So i changed  t_container to container.
But its show there is no reference. what i need to do now.how to get the reference.
IF this is not the correct way to proceed then tell me the write way to use.
My ultimate aim to fill my workflow container with Attachment of type SOFM and in the binding
attachment --> AttachObject.
I want to fill my WF container with SOFM instance.
Regards
vijay

Hi pavan
  In my method i have written the code has above i have created attribute with SOFM with type SOFM. But i when i debug it comes excatly to the last line and giving me a dump.
   IF lv_return = 0.
        lv_objtkey = lv_att_id.
        lv_objsofm = 'SOFM'.
        swc_create_object bo_sofm lv_objsofm lv_objtkey.
  SWC_SET_ELEMENT CONTAINER 'LV_ATT_ID' LV_ATT_ID.
  SWC_SET_ELEMENT CONTAINER 'SOFM' lv_objtkey.
      ENDIF.
i have put this container element inside the if statement. I am getting a dump.
Dump.
Short text
    Data objects in Unicode programs cannot be converted.
Error analysis
    The statement
       "MOVE src TO dst"
    requires that the operands "dst" and "src" are convertible.
    Since this statement is in a Unicode program, the special conversion
    rules for Unicode programs apply.
DATA abapfield_type.
  IF container-type CO 'DT'.
    ASSIGN container-value(container-elemlength) TO <swc_cont>
           TYPE container-type.
    DESCRIBE FIELD abapfield TYPE abapfield_type.
    IF abapfield_type = 'C'.
       IF container-type = 'D'.
         WRITE <swc_cont> TO abapfield DD/MM/YYYY.
       ELSE.
         WRITE <swc_cont> TO abapfield USING EDIT MASK '__:__:__'.
       ENDIF.
    ELSE.
       abapfield = <swc_cont>.
    ENDIF.
  ELSEIF container-type = swc_type_key.
    PERFORM move_key USING    container-element container-value
                     CHANGING abapfield.
  ELSEIF container-type = swc_type_handle.
    PERFORM move_handle USING    container-element container-value
                        CHANGING abapfield.
  ELSEIF container-type = swc_type_structure.
     PERFORM move_structure TABLES   container
                            CHANGING abapfield index tabindex.
  ELSEIF container-type = 'X' AND container-elemlength > 127.
    FIELD-SYMBOLS: <ptr_x> TYPE x.
    ASSIGN container-value TO <ptr_x> CASTING.
    abapfield = <ptr_x>.
  ELSE.
    ASSIGN container-value TO <swc_cont>.
>    abapfield = <swc_cont>.                      " here its dump
  ENDIF.
Regards
vijay

Similar Messages

  • How To Send Invoice List as attachment in User Decision Step?

    HI All,
    I have developed a workflow in which there is one ZMETHOD in which i will get the list of invoices.and that i want to send it as attachment to User Decision Step.
    How to do this?
    Regards,
    Arpita

    If your users will have access to MIR4, why not just bind the business object BUS2081 as an adhoc object into your decision step?  That would solve everything pretty nicely, I think. 
    Regards,
    Sue

  • Smart form attachment in User decision step

    Hi,
    i have a requirement to display Smart form in user decision step along with Approce and reject buttons.
    Please guide how to attach a smart form in workflow.
    Thanks.
    Edited by: Sanjay_lnt on Jul 10, 2010 8:13 PM

    Here are some codelines may help you.
      CALL FUNCTION 'SO_FOLDER_ROOT_ID_GET'
        EXPORTING
          region                = 'B'
        IMPORTING
          folder_id             = lv_folder
        EXCEPTIONS
          communication_failure = 1
          owner_not_exist       = 2
          system_failure        = 3
          x_error               = 4
          OTHERS                = 5.
      lv_object-objla    = 'EN'.
      lv_object-objnam   = 'MESSAGE'.
      lv_object-objdes   = p_name.
      lv_object-file_ext = 'PDF'.
      CALL FUNCTION 'SO_DOCUMENT_INSERT'
        EXPORTING
          parent_id                        = lv_folder
          object_hd_change                 = lv_object
          document_type                    = 'EXT'
       IMPORTING
          document_id                      = lv_doc
       TABLES
         objcont_bin                     = it_objcont_bin " Your binary file data
       EXCEPTIONS
         active_user_not_exist            = 1
         dl_name_exist                    = 2
         folder_not_exist                 = 3
         folder_no_authorization          = 4
         object_type_not_exist            = 5
         operation_no_authorization       = 6
         owner_not_exist                  = 7
         parameter_error                  = 8
         substitute_not_active            = 9
         substitute_not_defined           = 10
         x_error                          = 11
         OTHERS                           = 12     .
    Now pass the folder details to AttachObjects of BO type SOFM
    Edited by: Saurabh Thalpati on Jul 14, 2010 12:20 PM

  • Adobe form as attachment to user decision step

    Hi,
    i need to add adobe form as attachement to user decision step in workflow.
    1. i created activity step which call business object method with parameters workitem id
         i am using FM  SAP_WAPI_ATTACHMENT_ADD’  which will return attribute id
         i am passing that attribute with document id to 'ZSOFM'
            ZSOFM <-----------------------------------ZSOFM (Method to task)
          Bindings 'Attach_objects'  <------------- ZSOFM(Task to Workflow).
    2. i created user decision step
        Bindings  'Attach_objects' --------------------> 'Attach_Objects'( Workflow to user decision task).
    but when we execute first activity step in background i am not getting any PDF output .but when we  execute same method from class i can see pdf data is coming is it due to user name WF-Batch.
    when i execute activity step in back ground which will have sy-uname as WF-Batch i am not getting any PDF output data.
    please help how to solve .
    Thanks,
    Phani

    In transaction SWO1 create a z-object lets say zmyobjpdf (you might want to use it as a sub object of your standard object without delegation since they will probably have the same key).
    create a method in that object calling the adobe form.
    set it as the default method in the object header.
    now create an instance of the zmyobjpdf in the workflow for example as an attribute of the original object) and transfer it to the decision task.
    It will be displayed as an attached object pressing it will call the default method - your adobe form.
    If your question was about how to create a function module to display the form see SAP Library - PDF-Based Forms

  • Smart Form to be attached to the user decission step

    Hi Experts,
    I have a requirement wherein I need to convert a smart form to .doc file (document should be edited by the user) and attach the same to the user decission step.Can some one suggest me what is that I need to do to achieve this requirement.
    Thanks and Regards,
    Srini..

    Hi Experts,
    I have a requirement wherein I need to convert a smart form to .doc file (document should be edited by the user) and attach the same to the user decission step.Can some one suggest me what is that I need to do to achieve this requirement.
    Thanks and Regards,
    Srini..

  • Attachment in WORKFLOW user decision step

    Hi all,
    My requirement is to display a link in user decision step.
    When link is clicked, control should navigate to MM02 transaction.
    Also in following user decision step i need to provide link for smart form in user decision.
    Can anybody please guide in detail .
    Thanks.
    Edited by: Sanjay_lnt on Sep 26, 2010 1:14 PM
    Edited by: Sanjay_lnt on Sep 26, 2010 1:15 PM

    Closed.

  • SOFM in user decision step - provide reason in UWL

    Hello Everyone,
    I'm working with a customer who wants to use a user decision step and add a reason for the rejection only.  This step will be executed in UWL - since UWL doesn't support syncrhonous dialog chains, it can't be implemented by adding another step with SOFM.  I have seen the 'template with attachment' in the user decision step, and have tried binding SOFM to the Reference in the container, but the user doesn't have the option.
    Perhaps this could be implemented with a secondard amodal method - which checks the user decision code and only implements if the decision was rejected.  I'd like to be able to put a condition on the secondary methods.
    If you've done something like this, please let me know!
    Regards
    Ginger

    Hi Ginger,
    Unfortunately it is not only synchronous dialog chains, but also secondary methods that are not supported in the UWL, so you're stuck both ways.
    Though, I have been told that the latest SP does support some kind of advance with dialog functionality (SP15 I think?).
    At one customer we used a custom ABAP-based decision step which executed in a wingui session - thus synchronous dialog chains worked as long as every subsequent step was wingui based (which SOFM.CREATE obviously is) - worked quite well.
    Let me know if you need more info.
    Cheers,
    Mike

  • Calling Transaction through User Decision step in workflow

    Hi all,
    Pls help me calling a transaction through User Decision step in workflow. I have attached two buttons to my User decision and the one of the outcomes to a task where I am calling the transaction through a method of BOR. But the problem is I am unable to see the transaction when I press the button on my User Decision at test run.
    Can you ppl let me know how can I achieve this?
    Pls reply ASAP...
    Thanks
    Sangharsh

    Hello Sangharsh ,
    Please Check the paramater of of the method which you define.
    e.g. I define CALL_TCODE_CJ03 method
          which have the parameters FLAG,ProjectDefinition,WBSElement2,User
          with export, import checkbox.            
    Pass the paratmeres in programs
    e.g.
    BEGIN_METHOD CALL_TCODE_CJ03 CHANGING CONTAINER.                      
    DATA:                                                          
          FLAG(1),                                                        
          PROJECTDEFINITION TYPE PROJ-PSPID,                              
          WBSELEMENT2 TYPE PRPS-POSID,                                    
          USER TYPE USR21-BNAME.                                                                               
    SWC_GET_ELEMENT CONTAINER 'FLAG' FLAG.                              
      SWC_GET_ELEMENT CONTAINER 'ProjectDefinition' PROJECTDEFINITION.    
      SWC_GET_ELEMENT CONTAINER 'WBSElement2' WBSELEMENT2.                
      SWC_GET_ELEMENT CONTAINER 'User' USER.                                                                               
    GET PARAMETER ID 'PSP' FIELD PROJECTDEFINITION.                       
      GET PARAMETER ID 'PRO' FIELD WBSELEMENT2.                                                                               
    SET PARAMETER ID 'PSP' FIELD PROJECTDEFINITION.                       
      SET PARAMETER ID 'PRO' FIELD WBSELEMENT2.                             
      CALL TRANSACTION 'CJ03' AND SKIP FIRST SCREEN.                                                                               
    SWC_SET_ELEMENT CONTAINER 'FLAG' FLAG.                              
      SWC_SET_ELEMENT CONTAINER 'ProjectDefinition' PROJECTDEFINITION.    
      SWC_SET_ELEMENT CONTAINER 'WBSElement2' WBSELEMENT2.    SWC_SET_ELEMENT CONTAINER 'User' USER. 
    END_METHOD.
    I hope it will help you.
    ***Assigning points is the way to say thanks in SDN.***
    Minaxi Shah

  • URL in user decision step

    Dear Experts,
    I am using ecc4.7 version system. I have a user decision step. I want to display an url in objects and attachments section of user decision step. Ofcourse I found many similar threads from SDN. But they are not helping me with the solution. Please tell me how to achieve the same.
    KR,
    Bharath
    Edited by: bharath padmanabhan on Dec 21, 2009 9:08 PM

    Hi Bharath,
    Have you displayed the URL in Attachmnt & Object of UD step?. If not try this,
    If we need to display something, say URL in Attachmnet & object of UD step, we need to have a BO (instantiated) and the default method of the BO (mentioned in Basic data of SWO1) will be executed, if we click the URL in Attachment & Object.
    I am not sure, whether you have any ZBO or not, if not create a ZBO and create a key field, this key field needs to hold the URL link. Then create a method, inside the method, call the FM- "CALL_BROWSER" by passing the Exporting para of FM (URL) as object-key-<key field>. Also in the basic data tab of the SWO1, give this Zmethod name in default section tab.
    Now copy the std task of UD step and create a task container as same type of ZBO and create a WKF container as same as ZBO and instantiate this ZBO. And do the binding in the UD step,
    <WKF container of ZBO> -> <Task container of ZBO>
    Make sure before this binding, the WKF container of ZBO needs to be instantiated with the corresponding URL as key field. Now execute the WKF, you will find the Link in Attachmnet & Object and after clicking the link, it will direct to you the corresponding place. Let me know for any issues.
    Regards,
    Vinoth

  • Tcode in user decision step

    Dear experts,
    I have a user decision step. Before the approver can approve or reject the workitem i need to show a tocde screen to him. Say for example CN25. My workitem will be generated only after initiator makes changes in that tcode. I want approver who gets the workitem to see CN25 tcode screen and then only make decision. Is there any possibility to attach or bring a tcode screen in user decision step.

    Dear Hemalatha,
    Thanks a lot for your reply.
    You can direct;y use the Object which is used to trigger the workflow. Then you can bind this object to get that tcode as
    attachment in decision task.
    This is exactly my requirement. In my BO i have a standard method "display" to display the Tcode. I want to know how should i do the binding from BO's method to user decision task so that i can display a link as attachment of user decision step, by clicking which user can see the display screen.

  • Workflows : Objects & Attachments @ User Decision Step ?

    Hi pple,
    As Ramki said,I was able to create a link in the OBJECTS and ATTACHMENTS part for a normal Activity step.
    But now my requirement is to create a Link at Objects and Attachments part in USER DECISION Step. Can I do so?
    I tried copying the DECISION BO to ZDECISION and copied the the standard Decision task TS00008267 to my task say..TS97900168 with my BO ZDECISION, Now when I tried to include this task in the WF User Decision step, I am getting an error that I cannot include any other object other than DECISION BO.
    I thought of creating a ZDECISION Business Object and change the Default method of this BO. But I am not able to include a Z Business Object in the USER DECISION Step itself.
    Is there any way of instantiating the Objects and Attachments part with our own Attachment of the USER DECISION Step.
    Please let us know.
    Regards,
    Raja Sekhar.

    <i>But now my requirement is to create a Link at Objects and Attachments part in USER DECISION Step. Can I do so?
    </i>
    I am not sure I understand your requirement correctly. But an agent can attach objects or documents at a decision step by clicking on the Create button in the Decision step display.
    <i>Is there any way of instantiating the Objects and Attachments part with our own Attachment of the USER DECISION Step.</i>
    You can copy the standard decision task and define container elements for the BO references already available in the WF container. Bind them from WF to the step. These objects will then show up under Objects and attachments in the decision step.
    You can use the 'Create object reference' wizard to create an object reference if it is not already available.
    Cheers,
    Ramki Maley.

  • Check in Standard USer decsion step before Approval

    Hi ,
    I am using a standard SAP User desion task  I have requirment from the user that the user should not APProve or reject without putting a note as attachement .
    how can I achieve the same ?
    do we have any user exits on the standard user decsion step or in methods option I also find Secondary methods call do anyone have an idea what this is for ?
    Regards
    Abhilash
    Edited by: Abhilas Stanly on Mar 18, 2009 11:22 AM
    Edited by: Abhilas Stanly on Mar 18, 2009 11:22 AM

    Hi,
    Below the approve & Reject branch of the User decision call the std. Task TS20000139 and give the neccessary binding.
    While the approver approves or reject this will open as a popup and they have to the enter the comments. This can be sent to email and also mail to SAP Inbox.
    Regards,
    Surjith

  • Can we display custom error message in user decision step screen.

    Hi,
    My requirement is to display error message when approver selects reject button in user decision step.
    based on some condition i need to display error message in user decision screen when approver tries to
    reject .
    Please help
    Thanks,
    Phani

    Hi ibrahim,
    Thanks for your Replay.
    steps
    1. cretae global class with interface  IF_SWF_IFS_WORKITEM_EXIT.
    2. cretae Event with importing parameter.
    where i need to call EVENT_RAISED method ,do inned to call that method in
    IF_SWF_IFS_WORKITEM_EXIT ?
    how  SWRCO_EVENT_AFTER_EXECUTION value is passed to method EVENT_RAISED ?
    Thanks,
    phani

  • Erorr while attaching License to a user

    Dear All
    I get an error while attaching 'LICENSE' to the user.
    "XML PARSING FAILED (MESSAGE -60070-33).
    I had already attached license to 3 users and it's working fine. But all of a sudden when i am trying to assign license to new users it's giving me this error.
    I  am using 8.8 ver patch 10
    Can anybody help me on this, since this is very urgent
    regards
    Karthik

    Hi Karthik,
    configure security in License manager you need to fill in the data.
    XML Parsing Failed (Error)
    XML Parsing error
    Thanks,
    Srujal Patel

  • Container variables in User decision Step in BPM

    Hello,
    I am using User decision Step in BPM.
    When i use only text in "Title for Display" the BPM is activated successfully and Status in SXI_CACHE also shows 0.
    If I use container variables in "Title for Display" the BPM is activated successfully but status in SXI_CACHE shows 99.
    It shows the below error
    "Problem updating an integration process with object ID 073AF2C620F43E839B2903344DEE29BB. Symbol 'CE/KO' expected at position 1 in expression ''
    Please suggest.
    Thanks,
    Shabari

    Hi Shabari, did you follow the steps for declaration of variables as in [SAP help for user decisions|http://help.sap.com/saphelp_nwpi71/helpdata/en/42/c2a19fb4511d65e10000000a1553f6/content.htm]? How did you define your variable?
    Maybe discussion [in this thread|BPM activation Error in SXI_cache; can help, it is unanswered though.
    Regards, Martin

Maybe you are looking for