CRM: How to create document flow

Hello together,
In the process framework I defined a new process which can be started from a sales qutotation. This process loads my own compentent where the user can upload technical objects (such as connection objects or points of delivery) and create a new object set (IsuOrderBasketSet) with the uploades technical objects.
The requirement is to link the quotation with the created object set and vice versa so that the user can see the object set in the quotations assignment block "transaction history" and the qoutation in the object sets assignment block "transaction history".
Does anybody know how I can meet this requirement?
Thanks in advance,
Sebastian

Hi,
I found a solution using the following Code. I have successfully created a document flow between two quotations:
    DATA guid_a TYPE crmt_object_guid.
    DATA guid_b TYPE crmt_object_guid.
    DATA: it_activity_h TYPE crmt_activity_h_wrkt,
        ls_activity_h LIKE LINE OF it_activity_h,
        it_requested_objects TYPE crmt_object_name_tab,
        ls_requested_objects LIKE LINE OF it_requested_objects,
        it_orderadm_h TYPE crmt_orderadm_h_wrkt,
        ls_orderadm_h LIKE LINE OF it_orderadm_h,
        it_doc_flow TYPE crmt_doc_flow_wrkt,
        ls_doc_flow LIKE LINE OF it_doc_flow,
        it_header_guid TYPE crmt_object_guid_tab,
        ls_header_guid LIKE LINE OF it_header_guid.
  DATA: it_activity_h_comt TYPE crmt_activity_h_comt,
        ls_activity_h_comt LIKE LINE OF it_activity_h_comt,
        ct_doc_flow TYPE crmt_doc_flow_comt,
        ls_doc_flow_comt LIKE LINE OF ct_doc_flow,
        ref_guid TYPE guid_16,
        lt_doc_link TYPE crmt_doc_flow_extdt,
        ls_doc_link LIKE LINE OF lt_doc_link,
        ct_input_fields TYPE crmt_input_field_tab,
        ls_input_field TYPE crmt_input_field,
        ls_input_field_names TYPE crmt_input_field_names,
        log_handle TYPE balloghndl.
  DATA: lt_return TYPE TABLE OF bapiret2,
        ls_return LIKE LINE OF lt_return.
   guid_a = '0026B98B6AD11ED2B9F49BA972EC069E'
  guid_b = '0026B98B6AD11ED2B9E27FFF042682F6'
  REFRESH it_header_guid.
* Append GUID_A to Header GUID Table
  APPEND guid_a TO it_header_guid.
* What should we read
  ls_requested_objects = 'ACTIVITY_H'.
  APPEND ls_requested_objects TO it_requested_objects.
  ls_requested_objects = 'DOC_FLOW'.
  APPEND ls_requested_objects TO it_requested_objects.
* Read Activity A
  CALL FUNCTION 'CRM_ORDER_READ'
    EXPORTING
      it_header_guid       = it_header_guid
      it_requested_objects = it_requested_objects
    IMPORTING
      et_orderadm_h        = it_orderadm_h
      et_activity_h        = it_activity_h
      et_doc_flow          = it_doc_flow.
  LOOP AT it_activity_h INTO ls_activity_h.
    MOVE-CORRESPONDING ls_activity_h TO ls_activity_h_comt.
    APPEND ls_activity_h_comt TO it_activity_h_comt.
  ENDLOOP.
* Fill DOC_FLOW Structure
  ls_doc_link-objkey_a   = guid_a.
  ls_doc_link-objtype_a  = 'BUS2000115'."BUS2000126'.
  ls_doc_link-objkey_b   = guid_b.
  ls_doc_link-objtype_b  = 'BUS2000115'.
  ls_doc_link-vona_kind  = 'A'.
  ls_doc_link-reltype    = 'VONA'.
  ls_doc_link-brel_kind = 'A'.
  APPEND ls_doc_link TO lt_doc_link.
  CLEAR: ls_doc_flow_comt.
  ls_doc_flow_comt-ref_guid   = guid_a.
  ls_doc_flow_comt-ref_kind   = 'A'.
  ls_doc_flow_comt-doc_link[] = lt_doc_link.
  APPEND ls_doc_flow_comt TO ct_doc_flow.
* Fill INPUT_FIELDS which indicate what Values where changed
* and had to be updated
  ls_input_field_names-fieldname = 'OBJKEY_A'.
  INSERT ls_input_field_names INTO TABLE ls_input_field-field_names.
  ls_input_field_names-fieldname  = 'OBJTYPE_A'.
  INSERT ls_input_field_names INTO TABLE ls_input_field-field_names.
  ls_input_field_names-fieldname  = 'OBJKEY_B'.
  INSERT ls_input_field_names INTO TABLE ls_input_field-field_names.
  ls_input_field_names-fieldname  = 'OBJTYPE_B'.
  INSERT ls_input_field_names INTO TABLE ls_input_field-field_names.
  ls_input_field_names-fieldname  = 'VONA_KIND'.
  INSERT ls_input_field_names INTO TABLE ls_input_field-field_names.
  ls_input_field_names-fieldname  = 'RELTYPE'.
  INSERT ls_input_field_names INTO TABLE ls_input_field-field_names.
  ls_input_field_names-fieldname  = 'BREL_KIND'.
  INSERT ls_input_field_names INTO TABLE ls_input_field-field_names.
  ls_input_field_names-fieldname = 'BREL_MODE'.
  INSERT ls_input_field_names INTO TABLE ls_input_field-field_names.
  ls_input_field_names-fieldname = 'RELATIONID'.
  INSERT ls_input_field_names INTO TABLE ls_input_field-field_names.
  ls_input_field_names-fieldname = 'RELATION_HANDLE'.
  INSERT ls_input_field_names INTO TABLE ls_input_field-field_names.
  ls_input_field-objectname = 'DOC_FLOW'.
  ls_input_field-ref_guid = guid_a.
  ls_input_field-ref_kind = 'A'.
  INSERT ls_input_field INTO TABLE ct_input_fields.
* Update Document Flow
  CALL FUNCTION 'CRM_ORDER_MAINTAIN'
    CHANGING
      ct_input_fields   = ct_input_fields
      cv_log_handle     = log_handle
      ct_doc_flow       = ct_doc_flow
    EXCEPTIONS
      error_occurred    = 1
      document_locked   = 2
      no_change_allowed = 3
      no_authority      = 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.
  DATA: it_saved_objects TYPE crmt_return_objects.
* Save Changes
  CALL FUNCTION 'CRM_ORDER_SAVE'
    EXPORTING
      it_objects_to_save   = it_header_guid
      iv_update_task_local = 'X'
      iv_save_frame_log    = 'X'
    IMPORTING
      et_saved_objects     = it_saved_objects.
* Commit Changes
  CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
      wait   = 'X'
    IMPORTING
      return = ls_return.
Regards,
Saravanan.C

Similar Messages

  • Error when creating document flow for delivery

    Hi,
    I would like to post the GR for Inbound delivery. I receive an error the TO is not confirmed. I have tried to confirm the tranfer order and I receive the "error when creating document flow for delivery . In order to avoid inconsistencies the goods movement posting was cancelled." It seems like the document already exist.
    How can I do to confirm the TO and post the GR.
    Thanks
    Dede

    In Inbound delivery after GR only a TO is created and confirmed.
    So please check the PO history and see a GR is there or not .
    Once a GR is found create a TO and do the confirmation

  • How to find Document flow / Relationships to a support message

    Hi Friends,
    I am new to Solution manager. I would like to know how to find Document flow of a Support message.
    For example I have a Support message, there are few Change requests and tasks linked to it. This can be viewed from CRMD_ORDER transaction (Where used list button / Document flow), preceding documents and related documents.
    Is there any function module or table where I find the link between these different transaction types or atleast any report!
    Thanks in advance

    Hello Sesagiri,
    Can you explain the process to link support message with change requests and tasks.
    pls help me.
    Regards,
    Babu

  • How to create document in process chain

    Hi,
    can u plz tell me how to create document in process chain and wat i need to edit the text for particular info package when document.

    Hi Anil,
    Goto Tcode:RSPC and select your load data process type where you have to right click on the process chain and select Select create message,there are three types of messages
    1>Successful
    2>Error
    3>Always
    If you already created message then go to maintain message
    Where you have two buttons
    1>is for Edit Document
    2>Maintain Recpiants
    Goto Edit Document and put your comment and set their mail address in Mail recipiants.
    Note there are 2 types of messages you can kept at execution of infopackage process type.
    If load is successful send the mesaage to recipients
    If load is failed send the message to mail recipt.
    It would help you.

  • How to create Document / Literal WSDL with axis 1.3

    Dear All,
    1. How to create Document / Literal WSDL from java interface ?? or how to create Java 2 WSDL using Document/ Literal.
    2. from document/literal WSDL to java classes(stub, skelton, serivces).
    I am using Axis 1.3 , tomcat-5.5.20 and eclipse.
    Please provide the command and arguments for java2wsdl and wsdl2java for doc/lit.
    is there any tool that help to generate java2wsdl and wsdl2java for doc/lit.

    That would be the <web-service> element in the web-services.xml file, of course.
    "Michael Wooten" <[email protected]> wrote:
    >
    Hi Rich,
    Try adding a style="document" attribute to the starting <web-service>
    element.
    The might be a way to get <servicegen> to do this for you, but I haven't
    found
    it yet :-)
    Regards,
    Mike Wooten
    "Rich Muth" <[email protected]> wrote:
    How do you create document/literal web services with WLS7 ( not workshop)
    - Is it possible with servicegen and stateless EJBs as the backend component?
    The default is RPC/Soap-encoded is there anyway to craft the web-services.xml
    to make it document/literal
    - Is it possible with the JMS-implemented web services - have not tried
    this yet
    - Is there another mechanism?

  • Flash CS4 - how to create event flow from children to parents?

    In my opinion natural event flow direction is from children
    to its parants.
    E.g. when in dialog box buttons are pressed it is natural to
    inform only
    this dialog box about these actions. When dialog box can't
    handle particular
    event then passes it to its parent and so on .
    Unfortunately this direction is not well supported by Flash.
    To achieve
    support for this event direction it is necessary to call
    parent.dispatchEvent() with bubbling option off. This
    solution is
    inconvenient because sometimes I can't predict what event
    types will be
    triggered inside dialog components. Most likely there is no
    function to
    catch all events which have no defined handlers in dialog in
    order to be
    possible to pass them one level higher.
    Have you got any experience with building communication model
    between
    objects in Flash applications?
    Regards,
    Marek

    XML shema is basically an XML file. So u need to know how to create an XML,
    provided u know how the shema file should be.
    Creating an XML :
    http://forum.java.sun.com/thread.jspa?threadID=5181031&messageID=9705786#9705786

  • How to create document in portal

    Hi All,
    I am new to portal development.
    Please tell me how to Create a Document with the permission defined in Access Control List.
    Your answer will helpfull in my development work.
    Thanks

    Hi All,
    I got the way to create the Permission on a resource for the specific user.
    // returnResourceInfo is of type IResource on which the permission need to create.
    // Get the Acl Security manager.
    IAclSecurityManager aclSecurityManager = (IAclSecurityManager) returnResourceInfo.getRepositoryManager().getSecurityManager(returnResourceInfo);
    // Get the resourceAcl manager.
    IResourceAclManager resourceAclManager = aclSecurityManager.getAclManager();
    // Get the resource Acl
    IResourceAcl rACl = resourceAclManager.getAcl(returnResourceInfo);
    if(rACl == null)
    rACl = resourceAclManager.createAcl(returnResourceInfo);
    IUMPrincipal userPrinciple = WPUMFactory.getUserFactory().getUser(user);
    // user is the id which is avaliable in the portal and for whom the Permission need to create.
    rACl.addEntry(resourceAclManager.createAclEntry(userPrinciple,false,               resourceAclManager.getPermission(IAclPermission.ACL_PERMISSION_READ),0));
    Edited by: Lokesh Malik on Nov 13, 2008 12:20 PM

  • How to create document type ?

    Hi experts
    We need assign document type to mateiral in material master. So we need create new document type background. How to create it ? Does it just copy one doc type from spro-> cross application componets-> document management-> define document type?  It seems it will also copy the following screen setup .... but dont' know anything else need be setup ?
    Thanks
    Alice

    Hi Alice,
    You have create document type from
    spro-> cross application componets-> document management-> define document type
    There are already standard document types available. You ca use that or copy and create new types and assign it on the material master.
    Thanks and regards
    Murugesan

  • How to create document whenever we enter F1

    hi guru.
    actually whenever we click f1 , we get the the regarding documents.
    how to create this things.
    is this possible by the help of se11 , we can create our document.
    with best regards.
    asis.

    creation of data element short text answers ur question

  • How to create Document Structure for existing project in Solution Manager

    Hi gurus
    We have all the project document saved using Solution manager . we have ended with Phase1.
    We are starting Phase2 and they are asking me to creat different folder as Phase to in existing project and store all the Documents
    Can any one please tell me how to create New folder and store the documents in Existing project
    Point will given for helpfull Answer
    Thanks
    Bhaskar

    Hi Bhaskar,
    Assuming you have full authorisations, the procedure is simple.
    Please go SOLAR_PROJECT_ADMIN transaction.
    From the menu please select Project -> Copy
    In the ensuing screen, key in your desired project name, scroll through the other checkboxes to see if you are happy with the default choices; if not, take corrective actions.
    In the last set of radi buttons "Desired behaviour at later version comparison", the default choice (2nd entry there - Adjust target project to the original of the source project) is fine.
    From your scenario, since you do not have a Template -> Implementation Project functionality and instead are copying from one Implementation to the other, this radio button is of little consequence.
    Execute the process.
    In the window that comes up, please choose Local Object, assuming that you do not want to capture the whole contents into a 'Transport'. This is more required if you are aiming to copy the project from one SolMan instance to another.
    It would give an information message "Generating in batch job (Name ......)
    In a few minutes, you'd receive an intimation of the Project being copied.
    That's pretty much about it. Have a check on the newly created project in SOLAR01.
    Please let me know if you have any doubts.
    Best regards,
    Srini

  • How to create document/literal web services with WLS7

    How do you create document/literal web services with WLS7 ( not workshop)
    - Is it possible with servicegen and stateless EJBs as the backend component?
    The default is RPC/Soap-encoded is there anyway to craft the web-services.xml
    to make it document/literal
    - Is it possible with the JMS-implemented web services - have not tried this yet
    - Is there another mechanism?

    That would be the <web-service> element in the web-services.xml file, of course.
    "Michael Wooten" <[email protected]> wrote:
    >
    Hi Rich,
    Try adding a style="document" attribute to the starting <web-service>
    element.
    The might be a way to get <servicegen> to do this for you, but I haven't
    found
    it yet :-)
    Regards,
    Mike Wooten
    "Rich Muth" <[email protected]> wrote:
    How do you create document/literal web services with WLS7 ( not workshop)
    - Is it possible with servicegen and stateless EJBs as the backend component?
    The default is RPC/Soap-encoded is there anyway to craft the web-services.xml
    to make it document/literal
    - Is it possible with the JMS-implemented web services - have not tried
    this yet
    - Is there another mechanism?

  • Inbound delivery - Error when creating document flow for delivery #########

    Hello all:
    When attempting to PGI an inbound delivery (via VL06I - For Goods receipt - select inbound delivery - click Post Goods Receipt) I received error messgae VL 659:
    Diagnosis
    As the system was recording the document flow for the goods movement, it determined that the subsequent document number is either blank or identical to the number of the preceding document.
    System response
    In order to avoid inconsistencies, the goods movement posting was cancelled.
    All WMS transfer orders tied to this inbound delivery are complete.  This hasn't happened with any other delivery.    Any suggestions as to what I can do?
    Thanks,
    Bill

    Hi,
    I would suggest you to go trough OSS notes using the error message number as search key (e.g. 352243, 645119, 197864).
    If you fail to find any maybe it would be worth of contacting SAP AG.
    Regards,
    Csaba

  • How to  check document flow table of  a document

    Hi,
    There is existing report and additional data needs to be added to existing report.
    Its SD.
    It is required that i display a field only when FI document is created.
    i.e :
    of Claims Paid : If FI document is created for a claim.
    So, for this i need to know how to check whether a FI document has been created or not. As i don't even know the order number.
    Is there any way to find this??
    Please help me on this!!
    thanks

    Hi,
    Rashi here is the Link for VBFA to BSEG
    VBFA-VBELN here VBELN is primary key
    BSEG-VBELn here VBELN is foreign key.
    So proceed.
    Hope my answer helps you.
    Cheers!!

  • Campaign automation - How to create correct flow?

    Hi Experts,
    I am trying to understand how campaign automation is working. So fare autostudy works fine.
    I did some tests in client 100 with the follwing structure: Campaign (without channel) and two campaign elementes: 1) email with survey X (channel is email with activity), 2) generation of Lead (channel is the lead).
    In the campaign modelling screen, I connected campaign with the first campaign element.
    1. campaign elemente has a target group, the workflow assigne is "send target group to channel".
    I created a decision note for survey, with one rule that is: for everybody that answers survey X conect with 2. campaign element.
    2. campaign has marked flag "Start for every respondent", workflow is "Transfer responder to channel".
    This works fine in client 100.
    But in cliente 200, I get the error "No channel has been entered for the campaign/campaign element".
    When I enter target group and channel to campaign in client 200 I am able to start the campaign.
    Now I am confused: What is the correct prosses? Use campaign elements with channel data and leave these fiels in blank in campaign?
    Or is the neccessary to enter target group and channel data to campaign?? This seems weired to me.
    Thanks and best regards,
    Cristina

    Hello Cristina,
    As far I know, each campaign element is campaign itself.
    So each campaign or campaign element can have TG and channel assigned to it depending on the business scenario.
    With respect to campaign automation , the cannel assigned to the campaign corresponds to the channel on which you would be running this automation.
    Hope this helps!
    Best Regards,
    Shanthala Kudva.

  • How to create documents on Mac that are compatible with Windows?

    I have just started working in InDesign for a client who uses InDesign and wanted me to learn the program so that they could make changes on their own in the future to documents I create for them.  I am working on a Mac OS 10.6.2 They have PCs and are working in a Windows environment.  I sent the first packaged dvd for their printer and sent it to them last week.  Everything looked beautiful on this end, no errors, packaged with links and fonts.  When they received the disc the font files on the disc that looks perfect on my computer-- on their computer all read as 0kb and they can't make it work.  I have used truetype, type 1 and open type fonts.  I just read something in an earlier discussion about true type and T1 as being problematic with PCs?  What can I do to be compatible?

    My apologies. I find working in unfamiliar computer systems challenging and after over an hour on the phone trying to help an inexperienced PC user find fonts and find her way around InDesign with which she was even less familiar on a PC, a platform with which I have had no experience in the last 13 years, I was frustrated. My comment was inapropriate to this forum.  I do realize that PCs are valuable tools.  The computer system one is familiar with is always the best platform there is when in the middle of a complicated job.

Maybe you are looking for