Mthod-Call of BOR-Object

Hi!
I've to create objects of the BOR-Object PDOTYPE_F. There is a method named CREATE.
Is it possible to call this method in a "normal" ABAP-Coding. Does anybody knows an example coding?
Any hints are welcome!
Thanks
Peter

Hi,
   Below is a sample code in ABAp
   Hope this may be helpful
INCLUDE OLE2INCL.                                              
DATA EXCEL    TYPE OLE2_OBJECT.                               
DATA WORKBOOK TYPE OLE2_OBJECT.                               
Regards,
Amole                                                  
CREATE OBJECT   EXCEL    'Excel.Application'.                 
CALL METHOD  OF EXCEL    'Workbooks' = WORKBOOK.              
CALL METHOD  OF WORKBOOK 'Open'    EXPORTING #1 = 'C:\EX1.XLS'.

Similar Messages

  • Where to call the BOR objects in the wokr flow builder

    where do we call  the BOR objects in the workflow builder
    suppose we need to trigger the even bus7015 or some thing like that in the workflow to find if the manger is terminated or not
    where do we call a bor object in work flow.

    <img src="https://weblogs.sdn.sap.com/weblogs/images/37984/ChangeWF.JPG">
    Second icon from the right...looks like a silver hat with a red brim.

  • Using the transaction launcher to call a BOR method to display a PDF

    Hello gurus,
    I have created a PDF icon and an onclick action to open a pdf, that displays on every row of an assignment block in the actions column, but I do not know the technical process to determine how to get a PDF from the IXOS system from the line selected. (even if I know it depends on an ID attribute of that assignment block) I want to to call a transaction launcher with the url for the pdf in the IXOS that has an ID that identifies which line in the assignment block the user has clicked the pdf icon for (does that make sense?)
    In CRM 4, in the collection factsheet assignment block, the link was coded into an XSLT which is then displayed in the GUI and you would have a clickable link for a pdf file in a row in a table. That link would be as follows:
             <xsl:variable name="ev_key">SAPEVENT:?OBJTYPE=<xsl:value-of select="attributes/OBJTYPE"/>&amp;OBJKEY=<xsl:value-of select="@KEY"/>&amp;LOGSYS=<xsl:value-of select="attributes/LOGSYS"/></xsl:variable>
                 <a href="{$ev_key}"></a>
    This will get the file in IXOS and display it, in CRM 4. In CRM 7, the link is an icon in every line of an assignment block.
    Here are some questions I have now for the functional side in the meantime:
    1) Can we fetch the PDF in IXOS for each line of an assignment block and have it open? If so, how? Transaction launcher, function modules (like ARCHIVOBJECT_DISPLAY) in the OPTA package? (the package for all IXOS related function modules..)
    2) Which URL should I call with the transaction launcher? a URL link to the PDF on the IXOS system?? or sapevent:xxx?
    3) Do we have to configure a transaction in the IMG to be launched with the attributes listed there? Do we have to link it to any classes/ objects?
    4) Do we have to have the code to the logical link dynamically to call the right PDF for each table line? Is it right to put this code in my event handler?? Usually transaction launchers are just in the nav bar.....
    5) Are there any existing examples of this or a similar functionality/ logic that I could refer to, preferably in CRM 7 WebUI?
    6) Do you have any code to just display a PDF in a new window? Or prompt a download?
    One possible way I thought of would be for me to have a logical link defined in the IMG for the transaction launcher, and have the attributes defined for my BOR object that I would call, and pass it different attributes (eg. objtype, objkey, logsys...) and then return the PDF and display it in the UI in a new browser window by itself. (There is a BOR method for my BOR object named  'display_pdf'!!!!)
    What do you think would be the optimal solution here? Does my theory of calling a BOR object with a transaction launcher to display a PDF make ANY sense whatsoever???
    Please do not hesitate to propose any potential solution. Any partial answers/ links to wikis/ other threads, anything would be much appreciated.
    Thank you in advance.
    Best regards,
    Jonathan Laplante
    Edited by: Jonathan Laplante on Jul 2, 2011 4:50 AM

    Hi Any help on this....I am still awaiting the response.
    Requirement: My requirement is to launch the SE38 transaction on WEBUI using transaction luncher tool and set the parameter on the selection screen.
    Issue: The issue is that I am able to lunch the transaction but unable to set the parameter
    Steps Performed:
    I want to list down all the steps I performed to launch an SE38 transaction using transaction launcher on the WEBUI
    1) Defined logical system in tcode CRMS_IC_CROSS_SYS
    -The logical link looks like this
    http://<server>:<port>/sap/bc/gui/sap/its/webgui/!?transaction=IC_LTXE&okcode=ICEXECUTE ?sap-client=300
    2) Defined URL & paratemeter wherein the request method is "GET", opted for NON-BSP URL
    URL link here is
    http://<server>:<port>/sap/bc/gui/sap/its/webgui/!?transaction=SE38&okcode=ONLI
    -Note: My selection screen okcode os ONLI*
    -The logical system ref is provided here
    3) Defined the parameter by giving the screen name like for SE38 selection screen name is "RS38M-PROGRAMM"
    4) Configured the transaction launcher of type B - URL type and provided the reference of the URL ID, choose the relevant parameter from the drop down and have hardcoded the value, cheked the box "Save Data in Activity Clipboard
    5) Added this in the NAvlink/Bus Role etc
    6) Now in the handler class of the TL the code looks like this:
    IF_CRM_IC_ACTION_HANDLER~PREPARE_DATA_FLOW
    __gdc ?=
    cl_crm_ui_data_context_srv=>get_instance( gv_view_controller ).
    __value
    =
    'ZC_TEST'.
    add_parameter(
       iv_name =
    'RS38M-PROGRAMM'
    iv_value = __value ).
    However, after performing the above steps I am unable to set the parameter. Please suggest where am I missing out on. An early response would really be appreciated.

  • How to transfer my container element to the bor object

    Hello
    I am quite new to workflow. I have created a workflow with a task and in this task I have a container element that is an Id for a campaign element and I can see that the container is filled correctly. In my task I call a BOR object amd a method and I want to transfer my campaign Id to this method, but when I debug I can see the ID is getting into the bor object. How do I get the id into the bor object
    Thanks
    Claus

    Hi Claus
       After binding from task to method. You will get the data in the method parameters but to transfer the data from parameter to method you need to use this code in your method.
    SWC_GET_ELEMENT CONTAINER 'CONTAINER NAME' VARIABLE NAME.
    SWC_SET_ELEMENT CONTAINER 'CONTAINER NAME' VARIABLE NAME.
      Use this statement to get the data to the method container.
    Regards
    vijay

  • How to call BOR object- method in custom program

    hi all,
    I have the following details:
    BOR object : INSTLN
    Method: createdirect
    I need to call the above method in my custom program.
    I need to call it entirely. Means if it contains fn modules I dont want to call those fn modules seperately.

    Hi Sammy,
    Phil Soady from SAP Australia provided me with this little gem a few years back. The actual documentation for this can be found somewhere in the workflow programming area, but I just looked and couldn't find it for you. Anyway, this is a sample program I built to show how to do this. In this example I call the Display method of the Sales Document BO.
    INCLUDE <cntn02>.
    INCLUDE <cntn03>.
    FUNCTION zcallbomethod.
    *"*"Local interface:
    * Data declaration
      DATA: vbak_ref TYPE swc_object.
    * Declare and initialise container
      swc_container container.
      swc_create_container container.
    * Create object reference to sales document
      swc_create_object vbak_ref 'VBAK' '0000000009'. "Sales Document Number
    * Call Display
      swc_call_method vbak_ref 'Display' container.
    * Error handling
      IF sy-subrc NE 0.
      ENDIF.
    ENDFUNCTION.
    Cheers
    Graham Robbo

  • ZFM to be called inside a BOR object

    Hi Experts,
    I had developed a Func Module (FM) and this is to be called inside a method or an event in the standard BOR object .
    Any Suggestions pls..
    Thanks
    Dany

    Hi Dan,
    Goto to t.code SWO1 and create a object/interface type click on create and you will be able to find one tree structure and there will be one node of method select the method and click on the create button on the application tool bar, once clicked it will ask for fucntion module, pass the fm name and the first generate it and then implement it and then release it.
    I hope you can add your fm into the bor.

  • How to create an inbox item with attached BOR object?

    Dear Colleagues,
    Does anyone of you know a simple way to create inbox items for a user?
    I would like to use the inbox for notifying users and attach a BOR object to the message as attachment. Is there a good and plain way to do that?
    It would also be good, to be able to do the determination of the receiver by a customizable responsibility or something similar, so that it is not hard-linked to SAP user accounts.
    Does anyone of you know a solution for this, that is not too complicated?
    Also I read that in the future notifications should be usable in the UWL (Universal Work List).
    I did not find anything but marketing material on UWL and I would not be terribly happy to set up a portal just for sending simple notifications/work items to people. Does anyone have a clue on how to accomplish this?
    That would be wonderful, thank you.
    Regards
    Christian

    Dear Scott,
    Thank you for this hint, the function looks promising.
    Is there a way to specify a receiver group and a text for the text part of the message?
    There is a Parameter called RECTYPE, which is expected to contain a "task id". The text seems to be derived in some way from the object type. Do you know any documentation or sample where this is used?
    How do I specify the recipient and the message subject and text?
    Concerning a single-step workflow: I don't know what the advantages/disadvantages are. The system receives a message or discovers a problem and wants to inform the related user.
    A simple workflow should be possible, but I have no idea what that means in terms of complexity for implementation and customizing.
    Sorry for so many questions and thank you.
    Christian

  • BOR Objects and ABAP

    Guys,
    Not even sure if this is possible...
    How do I find BOR calls in an ABAP program.
    Example: BUS2088 or BUS2008 in program SAPLCOIH - for PM/CS orders).
    PeteA

    Hi Peter,
    Specify your business object and the method of the BOR object in the BASIC data tab in PFTC transaction.
    If you want to trigger the Workflow through and event then you will have to first link your event of the Business Object to the WorkFlow Task in Workflow Builder (TCODE PFTC) and then you can do the following :
    Please refer the code below to for your information.
    Data for workflow trigger
    DATA: objtype LIKE swetypecou-objtype,
    objkey LIKE sweinstcou-objkey,
    event LIKE swetypecou-event,
    event_container LIKE swcont OCCURS 0 WITH HEADER LINE.
    objtype = 'ZBUS1001'. "Material [sub object of BUS1001]
    MOVE v_wfmatnr TO objkey. "V_WFMATNR is material number
    event = 'CreatePLMMaterial'."Custom Event defined in
    ZBUS1001 [Tcode SWO1]
    REFRESH event_container.
    *Following are the Event parameters required in the *Workflow
    swc_set_element event_container 'Attachment' v_wfattachment.
    swc_set_element event_container 'Material' v_wfmatnr.
    swc_set_element event_container 'TisGroup' v_wftisgroup.
    swc_set_element event_container 'SchDate' v_schdate.
    CALL FUNCTION 'SWE_EVENT_CREATE'
    EXPORTING
    objtype = objtype
    objkey = objkey
    event = event
    TABLES
    event_container = event_container
    EXCEPTIONS
    objtype_not_found = 1
    OTHERS = 2.
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    COMMIT WORK.
    Please reward some points if it helps you.
    Regards,
    Amit M. Mishra

  • How to include the ordinary program in the BOR object type program

    Hi Guys, while i am trying to include a program in the BOR object type program. It is showing the following error:
    "Statement 'INCLUDE Z_ERC_SEARCH_VALOFACT_MACRO .' is not permitted in BOR".
    then, i tried to add  "<" and ">" to enclose it, but it wants the access key to create it.   anyone knows how to add the ordinary program in the BOR object type program.

    It's correct that we CAN'T insert our INCLUDES in BOR program. We CAN only use TYPE-POOLS there. So you can create Type Group with TYPES, CONSTANTS and DEFINE statements, and then use them in BOR programs.
    Using DEFINE you can construct MACROs with parameters and call your code there. It's limited, and not the easiest way, but some things can be achieved this way. Also forget about using Code Patterns while editing Type Group.
    Note: Use TYPE-POOLS statement after INCLUDE statement in BOR program .
    Best regards,
    Tomas.

  • Generic BOR Object - TSTC

    Hi all,
    Can anyone let me know how the generic BOR object 'TSTC' can be used to call transactions from CRM4.0(SIE) to backend R/3 systems in a transaction launcher. Basically, i will be interested in knowing
    - how one can pass the transaction code
    - any customizing settings required for this
    Regards
    Hem

    Hemchandra,
    You can launch R/3 Transactions into IC WebClient using Transaction Launcher wizrd.
    Important points to be followed
    1. ITS should be configured properly
    2. Use the Tx Launcher Wizard and select transaction  type as BOR and choose TSTS_PAR in the next screen
    and select the process type parameter from list box and enter the R/3 Tx Code as value parameter.
    3. You can see the transaction code,process type parameters in the method PREPARE_DATA_FLOW of Action Handler class
    ex:
      bdc ?=
        gv_view_controller->get_custom_controller( 'CuCoBDC' ). "#EC NOTEXT
    <b>        TRANSACTIONCODE =
      'VA01'. "#EC NOTEXT</b>
      me->set_data( iv_name = gc_TRANSACTIONCODE
                    iv_value = TRANSACTIONCODE ).
          SALESDOCUMENTTYPE =
      'OR'. "#EC NOTEXT
    Hope this helps.
    Thirumal.

  • Send Archived BOR Object as an Email Attachment

    Hi,
    I am sending an email with Attachments. There are some archived documents which are scanned and stored as pdf files.
    I need to send these  documents attached together with the email as attachment.
    *I have retrieved the BOR keys of the files to be sent. However, I am unable to physically attach these to the email. *
    I have written the following code.
    * Get attached BOR objects
      call method gr_case->bor_objects_get
        receiving
          re_bor_objects = lt_attachmnt
        exceptions
          failed         = 1
          others         = 2.
    * Build list of attachments
      loop at lt_attachmnt into ls_attachmnt.
        lv_object-describe = c_object_desc.
        lv_object-objtype  = ls_attachmnt-bor_type.
        lv_object-objkey   = ls_attachmnt-bor_key.
    *   Write Packing List (Attachments)
        ls_objpack-head_start = 1.
        ls_objpack-head_num   = 1.
        ls_objpack-body_start = 0.
        ls_objpack-body_num   = 0.
        ls_objpack-doc_type   = 'OBJ'.
        ls_objpack-obj_name   = ls_attachmnt-bor_type.
        ls_objpack-obj_descr  = ls_attachmnt-bor_key.
        append ls_objpack to lt_objpack.
      endloop.
    * send mail
      call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
        exporting
          document_data              = ls_doc_change
          put_in_outbox              = 'X'
          commit_work                = 'X'
        tables
          packing_list               = lt_objpack   " 1. row for document, following rows for each attachment
          object_header              = lt_objheader " e.g. for the filename
          contents_txt               = gt_text_tab  " content of ASCII data
          receivers                  = lt_receiver  " recipient
        exceptions
          too_many_receivers         = 1
          document_not_sent          = 2
          document_type_not_exist    = 3
          operation_no_authorization = 4
          parameter_error            = 5
          x_error                    = 6
          enqueue_error              = 7
          others                     = 8.
    This code sends some text files as attachments with the description of the BOR objects.
    Can someone please help?
    Best regards,
    Abhinava

    Is there a technical name? Something like BUS1234.
    Any way, from the code snippet you show above, I think there might be some confusion. The way I understand it is that you attach BOR objects to Cases (whatever case means). This is where the method BOR_OBJECTS_GET comes. If you want to attach PDF files, then, you will need a means to extract these files as binary internal tables. Your code below does not seem to do that. So, the BOR object attached to the case is different than the actual attached PDF file.
    If your BOR object provides a method to display a PDF file, then, you might want to look into that method's code and see how the PDF is extracted.

  • How to attach a smartform in BOR object

    Hi,
    I want to know how to attach a z smartform to BOR object? I tried to search out here but not able to have the result.
    Kindly provide the guidelines for it....
    Regards,
    Rickky

    Hi,
    In the BOR object, create a method say display_SF. Now in the ABAP properties for that method give "OTHER" option.
    Now in the BOR object, you can find the program which is used. Inside that program, You need to write the code to fetch the required data (ONLY BASIC REQUIRED DATA WILL BE ENOUGH) and call the smartform by passing all the print parameters and all the required data for that smartform.
    Now inside the smartform, with imported required data, you can write all the logic and data fetch etc for the printouts.
    The following sysntax can be used to fetch the required data into the method and can use to pass the same while calling the smartform.
    SWC_GET_ELEMENT CONTAINER 'Plant' PLANT.
    Regards,
    Harish

  • Calling a BOR method

    Hi All,
    There is a particular method in a BOR object (T-Code SWO1)which needs to be invoked from a report program .
    Please tell the method of declaring the same in the program and calling the same in the report program.
    Urgently needed ....
    Thanks in advance,
    Paul.

    Hi,
    You should include <CNTN01>
    Then you can instantiate the BO by macro swc_create_object passing the business object and the key
    With swc_call_method you can call the method. Just as in SWO1.
    Kind regards, Rob dielemans

  • How to use BOR object?

    Hello,
    We have never used a BOR object. We want use FIPP object. How can we do it? How can we call the Post method?
    Thanks a lot.
    Edited by: LM on Sep 8, 2008 11:07 AM

    Hi
    Refer to the links,
    Probel with POST method of FIPP
    FIPP Workflow
    Regards
    Sumit Agarwal

  • Function module parameters declare BOR Object

    I dont know if this is even logical...
    I need to create a function module which will be used in my  program..
    Can I create an object of BOR object type say 'Sales Order'  and pass it as an export parameter in Function Module..
    i.e i will pass the obj key and obj type as import..
    I want to instantiate that Sales Order.. and pass the whole Sales oRder as export/tables  parameter..
    I know swc_object_create is supposed to create an object but as i can see it only has the handle.. and it is of type swc_object..
    But i want to export  the whole Instance .. so that i can call the methods of the object  in my original program..
    Regards,
    krishna

    Hi Ravi ,
    I simplified my requirement but my actual requirement is with workflows...
    I have a scenario in workflow where,
    1.Activity step to fill internal table with sales order numbers
    2.loop at sales order numbers internal table
    3.Activity Step to Instantiate  based on order numbers
    4. Activity Step to Edit these sales orders
    5.end the loop
    For the above logic in workflows i have separate Activity step for instantiation..What I am thinking of is to instantiate the sales orders and fill the instances in the internal table in Step 1 instead of just order numbers..In the BOR method/F.M  of Step 1 I need to export the Instance of the Sales Orders (this is my actual question/problem, how do i instantiate while coding??swc_object_create, creates only a ref to object ...If I am able to create the object what should the type be in export /tables parameter)
    This way i can remove the loop and offer parallel processing (from miscellaneous tab in activity step) and send multiple Edit workitems to user  at Once instead of one after the other..
    Please let me also know how you would handle the above situation, i am very new to workflows and BOR.

Maybe you are looking for