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

Similar Messages

  • How to Attach a Smartform to a BOR method

    Hi Friends,
    I had a query How to Attach a Smartform to BOR method.To attach a customized Smartform to a Customized BOR Object.

    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

  • How to attach ERP smartform to a ERP Quotation generated from CRM 7.0

    Hi,
    I have this requirement of calling the ERP smartforms in CRM 7.0 where ever applicable.
    I don't want to use Transaction Launcher and also creating the same smartform in CRM would be double work.
    1. Can we attach a smartform of ERP to LEAD/OPPORTUNITY when we click on the MORE button on toolbar and choose PREVIEW OUTPUT/ TRIGGER OUTPUT. I think in ACTION we can just assign a smartform which is created in CRM system.
    Actually this is my client requirement and since my first CRM implementation do't know whether this is a valid point and how to go on.
    2. Also on ERP Quotation view page (toolbar) there is no button called MORE to PREVIEW OUTPUT. Can we assign a smartform to ERP Quotation?
    If any body can direct me on this issue would be of great help and full points will be given.
    Thanks,
    Jaya

    Hi,
    as far as I know there is no standard way of doing this in CRM 7.0.
    I imaging it would be possible to call an ERP smartform from CRM by :
    - writing an RFC capable function module in ERP that wraps the call of the smartform and returns the generated PDF data.
    - writing a function or method in CRM that calls the ERP function module and displays the returned data.
    In the lead and opportunity the print preview is done by having a print relevant action in the action profile assigned to the transaction type and I guess for these it should be possible to call a function module by creating an own smart forms method.
    But I think this is not possible for an ERP quotation, so you would have to create an own button. In the event handler for this button, one could call the ERP function module and display the result.
    Paul

  • How to attach a smartform in to an e-mail

    Hi All,
        My scenario is i wants to send a quotation details to customer for acceptance for this i prepared a smartform which contains quotation details. I wants to send this information to Customer for this i created a Outgoing email activity can i send by using this activity, if yes let me know how to attach smartform in to this activity and how this ourgoing email will reach to customer , what settings i need to do.
    Thanks in Advance.
    kumar.

    Hi,
    Go to SPRO Customer Relationhip management ->transactions->BasicSettings->DefineTransactionTypes.
    Here select your  order type and press on display appliction tool bar .
    you will see 5 different blocks.
    In Profiles block, for the field Action Profile select ZORDER_MESSAGES for email and ZORDER_MESSAGES_PRINT for printing.
    Thank You,
    Gajendra.

  • How to attach event to custome workflow object ?

    Hi Guys,
    Could someone help me on how to raise event while creating custom workflow object.We can attach event to object in transaction swe2 . I would like to know how to create that event. Could some send sample custom workflow object with events.
    Many thanks in advance.
    Cheers,
    Garrick.

    Here's an example  using Business object BUS2080  Service notification
    I delegated ZBUS2080 to BUS2080 (service notification).  Added 2 Events REASSIGNED and MODIFIED.
    Use transaction SWO1 for manipulating business objects.
    The User performs an action on a service notification  (IW52) say PUT IN SERVICE AGAIN.
    When the user puts the service notification in service again the event triggered will start a (user defined) workflow which makes a call to a method in the business object ZBUS2080 which launches a batch job.
    This batch job creates our user event REASSIGNED which in turn calls a new workflow to be executed.
    This workflow performs the action I want -- in this case to re-assign the service notification to a new person, send an email and escalate the deadlines
    Code samples are shown below.
    So here's how it works.
    First you need to set up some entries with table SWE2. I've assumed you've already defined the events to the Business object(s) you want to use.
    In SWE2 define entries for BUS2080 (or ZBUS2080) For Events INPROCESSAGAIN and (our event) REASSIGNED.
    IN SWE2 define the receiver call as a FUNCTION MODULE
    For the receiver function modules  for the SAP event (INPROCESSAGAIN) define the receiver module as SWW_WI_CREATE_VIA_EVENT
    For the event REASSIGNED define the receiver module as SWW_WI_CREATE_VIA_EVENT_IBF.
    I have no idea whatwhat the difference is between the two but the process works when it's done like this.
    Ensure the linkage Activated box is clicked in both cases.
    Put your workflow numbers in the RECEIVER TYPE in SWE2 table.
    In the first workflow when the user puts the service notification in service ensure your workflow starts a batch job which raises another event
    Note : You need to instantiate the object (I.e supply the key) to trigger the event correctly. The key is obtained from the WF and will be in the container anyway.
    You can do this by adding this type of function module into the method of the business object you want to execute during the first workflow. The code here creates a batch job which submits the EVENT creating program.
    function z_create_event_for_cs.
    ""Local interface:
    *"  IMPORTING
    *"     REFERENCE(OBJECT_KEY) LIKE  SWOTOBJID-OBJKEY
    *"     REFERENCE(W_REASON) LIKE  HRPXXXX-DUMMY
    *"     REFERENCE(W_ESCLEVEL) LIKE  HRPXXXX-DUMMY
    Create Batch job to run ZZREASSIGNCS
    which creates event REASSIGNED in Customer query workflow.
    data: jobnr like tbtcjob-jobcount,
          jobname like tbtcjob-jobname,
          pgmname  like sy-repid,
          w_key like viqmel-qmnum,
          w_code type c,
          w_num  type c.
          w_num = w_esclevel.
          jobname = 'CREATEEVENT'.
        pgmname = 'ZZREASSIGNCS'.
    call function 'JOB_OPEN'
      exporting
        jobname                = jobname
    importing
       jobcount               =  jobnr
    CHANGING
      RET                    =
      exceptions
       cant_create_job        = 1
       invalid_job_data       = 2
       jobname_missing        = 3
       others                 = 4
    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 'CONVERSION_EXIT_ALPHA_INPUT'
    exporting
      input =  object_key
      importing
      output = w_key.
    w_code = w_reason.
    if w_code = ' '.
    w_code = 'Z'.
    endif.
    submit zzreassigncs
    with p_key = w_key
      with p_escl = w_code
      with p_escnum = w_num
      via job jobname number jobnr
      and return.
    call function 'JOB_CLOSE'
      exporting
         jobcount                          = jobnr
         jobname                           = jobname
       strtimmed                         = 'X'
      exceptions
        cant_start_immediate              = 1
       invalid_startdate                 = 2
       jobname_missing                   = 3
       job_close_failed                  = 4
       job_nosteps                       = 5
       job_notex                         = 6
       lock_failed                       = 7
       invalid_target                    = 8
       others                            = 9
    if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    endfunction.
    For the actual program which creates the event  use something like this
    program zzreassigncs.
    This program creates an event REASSIGN
    This triggers a "clone" of the initial customer query workflow
    which is now marked as completed.
    The deadline and escalation level from the original workflow
    should be passed to the new workflow via the event container
    Program is submitted from the original workflow
    Ensure transaction SWE2 has the event REASSIGN for bus object BUS2080
    defined or the WF won't start even if the event is raised correctly
    As this program is run as a background / batch task
    you need to obtain the relevant notification number and pass it
    as a parameter.
    When run from the WF the you can get the notification number obtained
    from the workflow / task  container.
    include <cntn01>.   "For WF macros.
    parameters: p_key like swotobjid-objkey,  "Service notification number
                p_escl type c,
                p_escnum type c.
    constants: c_event    like swetypecou-event   value 'REASSIGNED',
               c_attrib   like swotra-attribute   value 'USRSTATUS',
               c_object   like swetypecou-objtype value 'BUS2080'.
    data:     w_object like swotobjid,
              w_stat     like  tj30t-txt04.
    data: rc like sy-subrc.
    data: begin of event_cont occurs 0.
          include structure swr_cont.
    data: end of event_cont.
    data: begin of return.
      include structure swotreturn.
    data end of return.
    if running from WF rather than a batch job
    swc_container container.
    swc_get_element container  'Znumber' p_key.
    w_object-objkey = p_key.
    w_object-objtype = 'BUS2080'.
    call function 'SWO_PROPERTY_GET'
    exporting
        object                = w_object
        attribute             = c_attrib
      changing
        value                 =  return.
    if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    w_stat = return(4).
    event_cont-element = 'Status'.
    event_cont-value = w_stat.
    append  event_cont.
    event_cont-element = 'Escalated'.
    event_cont-value = p_escl.
    append event_cont.
    event_cont-element = 'Escalation'.
    event_cont-value = p_escnum.
    append event_cont.
    Note WAPI calls only valid from rel 6.1 using Webflow engine
    (part of standard WF since rel 6.1)
    CALL FUNCTION 'SAP_WAPI_CREATE_EVENT'
      EXPORTING
        OBJECT_TYPE           =   w_object-objtype
        OBJECT_KEY            =   w_object-objkey
        EVENT                 =   'REASSIGNED'
      IMPORTING
       RETURN_CODE           =  rc
      EVENT_ID              =
    TABLES
       INPUT_CONTAINER       =  event_cont.
    if rc <> 0.   "Houston ---We have a problem !! '
      write: text-002 color col_negative.
      exit.
    endif.
    even though no database / table is updated here by the event
    we still need the commit work to initiate the event correctly
    commit work.
    You CAN use Objects (OO ABAP) but if you are fairly new to this sort of stuff just stick with standard BOR (Business objects) to parctice on until you've got the hang of the process.
    It's actually a lot simpler than most people realize --which is why WF consultants get paid decently !!!!.
    Cheers
    Jimbo

  • How to attach a smartform on a notification

    dear sdn,
    i am trying to add a smartform on a notification and when i am defining shop papers, i am getting a message "choose the key from the allowed name space"

    Dear Shah,
    While defining the shop paper, system asks for the program name, give your own z program there, and in that z-program, u can define the smart form and keep the next field as blank(since that is SAP script and not smartform).

  • How to attach a file from a URL?

    Hi experts,
    I need to attach a file which is already in the repository, and I only know its URL.
    I think I have to use BBP_PD_BID_UPDATE but it doesn't attach anything, or I'm mising some information.I have the GUID of the object and the URL. If I could have the file properties as mime or file size... I think it should be easier.
    Anyone knows how to get this info? or how to attach the file to the object?
    kind regards

    Btw, you may read below links for more details
    SyBooks Online
    Sybase Unwired Platform ( SMP ) – Custom Attachment Icon in HWC Application
    SUP HWC Attachment Viewer not displaying attachment

  • 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

  • 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.

  • ABAP OO sales order object - how to attach link to VA03

    I'm trying to build workflow using ABAP Objects instead of BOR. I created custom object for sales order according to blog "Getting started with ABAP OO for Workflow using the IF_WORKFLOW interface". It works correctly in my workflow but I would like to attach link to "browse sales order" (VA03) to workflow step. When using BOR I can attach link my binding BOR objest to AdhocObjest step container element. The same way does not work for ABAP OO object. The error message is "The object categories 'CL' (source) and 'BO' (target) are not compatible".
    Is there any way to add this link to attachments when sales order object is OO not BOR?

    At least make sure that you have a default method 'browse' in your class. I mean that make a method for "displaying" or "browsing" or whatever you want to happen when you click the object, and make it default. OR actually if I remember correctly there is a default method existing already, but put your code to there.
    Also try this:
    -Create a container element of type 'sales order' into your task
    -Bind the sales order object from workflow to the the task
    Regards,
    Karri

  • 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.

  • 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

  • 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

  • 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

  • Attaching BOR object to Z  transaction

    Hi All,
    Can we attach a BOR object to a Z transaction. For example, if we have created a complete transaction in module pool, cn we send data to a BOR object from that module pool programming...or in simple words attachin a BOR object to a Z transaction???
    Regards,
    Sangvir Singh

    Hi,
    1) While you creating the BO attribute, it will ask for the option To refer Table (Virtual or Database Field).
    2) In that select give your Table Name (Database Field) which you Custom Application referring.
    3) You have to Assign the Key Field refer to that Table and attribute also you can assign like that.
    4) Then once you execute the BO, it will ask for the Object Key, once you give it will bring those data and display.
    5) And if you declare as Virtual attribute you can get the value at runtime and assign it to that attribute (it depends on your Requirement)
    Regards,
    Surjith

Maybe you are looking for