Trigger workflow with inbound IDOC.

Hi all,
i have to trigger my workflow with incoming idoc which coming from other server. this IDOC content is  financial document. can any one tell me what is the procedure to make it happen.
Regards,
Sri harsha.M

Hi Harsha,
You have to call this Event FM in your ABAP program
for example
REPORT Z_TIBOR_EVENT_SAP_SW .
INCLUDE <CNTN01>. " include container macros
DATA: OBJKEY LIKE SWEINSTCOU-OBJKEY,
EVENTID LIKE SWEDUMEVID-EVTID.
DATA: EVENT_CONTAINER LIKE SWCONT OCCURS 0 WITH HEADER LINE.
PARAMETERS:
OBJTYPE LIKE SWETYPECOU-OBJTYPE DEFAULT 'BUS1001006',
MATERIAL LIKE MARA-MATNR,
EVENT LIKE SWETYPECOU-EVENT DEFAULT 'CREATED',
END_DATE LIKE SYST-DATUM DEFAULT SPACE.
OBJKEY = MATERIAL.
CALL FUNCTION 'SWE_EVENT_CREATE'
EXPORTING
OBJTYPE = OBJTYPE
OBJKEY = OBJKEY
EVENT = EVENT
CREATOR = ' '
TAKE_WORKITEM_REQUESTER = ' '
START_WITH_DELAY = ' '
START_RECFB_SYNCHRON = ' '
NO_COMMIT_FOR_QUEUE = ' '
DEBUG_FLAG = ' '
NO_LOGGING = ' '
IDENT =
IMPORTING
EVENT_ID =
TABLES
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.
else.
commit work.
ENDIF.
Thanks and Regards
Prabhakar Dharmala

Similar Messages

  • Create PM orders/notif with inbound IDOC

    Hi all,
       Anyone knows how can I create a PM order and a PM notification with inbounds IDOC?. If there are not IDOC available, it´s possible create PM order and notification trhought BAPI´s?.
    Thanks in advance
    Abel

    Hi Abel,
    Have a look at BAPI_ALM_ORDER_MAINTAIN for PM Order and BAPI_ALM_NOTIF_CREATE for PM Notification.
    You can check the BAPI's from transaction code BAPI.
    Hope this helps.
    Thanks
    Lakshman

  • Outbound delivery with Inbound IDOC DELVRY06 with Message type SHPCON

    Hi Friends
    I am trying to pack outbound delivery with Inbound IDOC DELVRY06 with Message type SHPCON.
    But IDOC has error Specification of destination HU missing.
    Could you please help us to resolve the issue to Pack the outbound delivery with the  IDOC.
    Thanks
    SR

    HI Ian Kehoe
    Sorry for delay in reply
    Thanks you very much
    I solved that problem .
    Could you please advice  test data for IDOC  DELVRY06 packing hierarchy (multi level packing) to pack SAP outbound delivery.
    Thanks
    Ravi

  • Goods receipt against process order with inbound idoc

    Hi Experts,
    We need to post good receipt against process order with movement type 101 and for By-product 531.
    Can we use inbound idoc-WMMBID02,with message type WMMBXY to achieve this functionality?
    Or please advise if we can achieve this  from any other Idoc type.
    We are getting below field values for external system
    1. process order number
    2.plant
    3.material
    4.quantity in unit of entry
    5.unit of measure
    6.storage location
    7. movement type
    8.Batch
    Kindly advise how can we achieve this.
    Best Regards
    CS

    261 and 262 are two different movement types INDEPENDENT of each other. I definitely know for the fact that SAP allows you to create a 262 without a 261. if you were to restrict it... you can disable access through a tcode for that mov. type 262 and ask users to use MBST to cancel any material documents created via 261 movt type.. that would ensure a smooth process

  • Problem with Inbound Idoc

    Hi everybody.
    I´ve got a problem with an inbound idoc. I've got a standard idoc INOTIF with an extension.
    To receive this Idoc from external systema I´ve created a Z FM to process this idoc.
    The problem is that when this idoc get to SAP the FM never is executed and the idoc appears with red flag and show me
    the next error: No status record was passed to ALE by the application and the idoc is shown with the status 51.
    ¿¿How can I fix this??
    Thanks a lot
    Regards

    hi
    and also give the funtion type is function module in we57 and in BD51 give ur ZFM and give 1 in input.t field.
    now you can see ur FM in WE42 under Identification field F4 value.
    The FM which is created by you  it should be in F4 help list fo field Identification in we42.
    and give the  Message type and Process code in we20 in inbound parameters.
    i am sure this will work .
    regards,
    Kiran Jagana

  • Workflow for inbound idoc failures

    Hi Gurus,
    Can anybody please point me to a place where i can start to see how i can setup workflow to notify users via SBWP whenver there is an inbound idoc error happens. We want to derive the standard functionality to its fullest even before thinking of putting any custom code. I'm specifically looking for hte order acknowledgemetns and shiipping notifications errors of idocs coming from the vendor
    Thanks
    anusha
    Edited by: anusha vemulapati on Jul 2, 2011 4:43 PM

    Hi Anusha,
    The simplest way is to link the partner profile to a specific user ID. This is done in trs WE20 - you have the link to the WF recipient both generally for the partner (on the initial screen of WE20 when the partner has been selected) and specifically for the different message types - double-click on the inbound message type and choose the tab "Post processing - permitted agent".
    You link the partner profile to a specific user by choosing the user type = "US" (user") and then specifying the user name below it. If you want several users to receive the same WF, you can link the partner profile to another user type, e.g. O = Organisational unit. Then you link the users to the organisational unit in trs PPOME.
    As far as I remember, the WF for IDoc's in error is activated in the standard system, i.e. the setting above shall be sufficient.
    BR
    Raf

  • Outbound delivery creation with inbound IDOC transfer from Java system

    Dear Experts,
           The scenario we are having is really very interesting. Hopefully its a good learning for me and also for others also.
    The scenario is,
                   After sales order creation the details will be sent to one Non SAP system (Java) for performing some tasks related to forwarding agent decision, shipping date and etc. Once the details are finalized in that Java system then, the details needs to be transferred to SAP as "Inbound IDOC" process. For this proposed to use the SAP Jco middle ware.
                 Once the details transfered from Java system to SAP then, the outbound IDOC needs to get generated automatically. Assuming the stock for that sales order line item is available. Also one more complexity is, our client is using custom transaction (ZVl10C) for delivery creation.
    Now Query is,
                   1. Which IDOC, message type and Functional module needs to be used for creating the delivery automatically..??
                   2. As per assumption, stock of that sales order line item should be available. Due to some business reason the stock was removed during inbound IDOC transfer then, what will happen to the IDOC..?. How to avoid this situation..??
                   3. As we told we are re going to use SAP Jco b/w SAP & Java system. In this case, how the data will get transfered from Java system to SAP..?
    Thanks in advance for the replies I am going to get
    Regards,
    VEL

    Didn't get any feedback from experts for long time. So we are closing the question

  • Handling BDC with inbound IDOC processing

    Hi All,
    In the function module for inbound processing, I have a BDC to be executed.
    But when the IDOC is received from the WEBSPHERE(Middleware) the BDC fails. There is an exception, "CNTL_ERROR"  raised by the class "CL_GUI_CUSTOM_CONTAINER=======CP"  when in BDC for the required transaction.
    I have contacted the Basis team and they are of the view that this happens when there is a difference in screen elements of the BDC creator(me) and the executor(websphere in this case).
    Can anyone tell me how can I correct this?
    Anuj

    John,
    WEBSPHERE is a system ID so Basis team will not allow me to access it as a user ID.( I had already requested them for the same).
    But I also compared the user-id parameters with mine and there is no difference.
    Can you think of something related to BDC? or some precaution which needs to be taken to cater the requirement if the screen elements are differing?
    Thanks for your replies.
    Anuj

  • Workflow for INBOUND IDOC

    Hi,
    I want to set you a workflow for one IBOUND idoc coming via edi partner. I want to use the organization units and then assign the user to it. what are the steps required for setting up a new workflow totally from the start for a IDOC / Message type and config.
    Thanks in adv
    /Manik

    STEP 1.       USE   SALE -> Error Handling                 
    STEP 2.   Go To  Basic Workflow  Settings.Use Auto-customise button to allow the system to configure most of the options.
    STEP 3 
      a)Go to SAP MENU -> TOOLS-> BUSINESS WORKFLOW ->
    DEVELOPMENT ->DEFINITION TOOLS->TASKS
      b) Create a customised task putting IDOCCLFMAS for example   as object type and    INPUTFOREGROUND  as object method.
    c)Associate the triggring event InputErrorOccurred with the standard task.
    d)Associate the terminating event InputFinished with the standard task
    e) Assign appropiate agent to the customised task. For this GO TO
         Additional data -> Agent assignment -> Maintain
    STEP 4  --  Go to transaction WE20.In the partner profile of the message type CLFMAS enter for the post  processing permitted agent.Enter the agent type (Organisational unit,Workcenter,Job,Person,Position or User),agentId and the language.
    STEP 5- In case of any error in processing of Idoc a workflow notification is sent to concerned agents.The message is sent to the inboxes of concerned persons which indicates which interface has erred,the associated IDOC number ,status of the IDOC and the date and time of error.
    Regarding the complete set up you can check the workflow tutorial in help.sap.com.
    regards
    Aveek

  • Starting a workflow with inbound Wf-XML

    Hi
    I read on help.sap.com that a workflow can be started when an inbound Wf-XML document arrives. Can anyone clarify where the XML actually arrives?
    Will the XML arrive at the integration layer (in our case SAP XI), and XI will have to trigger the workflow, or will the XML somehow arrive at the workflow? Can anyone clarify this?
    Any help is, as usual, greatly appreciated.
    Regards,
    Thomas
    Message was edited by: Thomas Kjelsrud

    Hi Thomas,
    Wf-XML was implemented when XI wasn't even a glint in SAP's eye. The message arrives in the SAP Web AS and triggers a workflow directly (or responds to an incoming workflow request message).
    Exception: prior to the 6.10 release of the Web AS the incoming messages are received in an ITS.
    Best regards,
    Alan

  • Problem with inbound idoc processing.

    hi
    I am creating release orders through idocs with the help of a custom program.
    After posting the release orders, i need to take the RO number created by the posting from EKPO table, which is required for further processing within the same program. An error is coming saying that no RO exists for the specified criteria. May be the idocs are not getting updated.
    Appreciate any suggestion for the above problem.

    Hi,
    Have you used
    COMMIT after creating the RO..
    That might be the reason i Think .
    Use
    Commit and wait.
    Hope that helps.
    Regards,
    Tanveer.
    <b>Please maek helpful answers</b>

  • Want to create program which will trigger workflow with PDF attachement

    Hi Expert,
    I m new for work flow.
    I want to create abap program  which  trigger work flow with PDF attachment.
    Thanks in advanced.
    Regards,
    Laxman Sankhla.

    HI i have written code as per below.
    Now if i m running programe i m getting error  "Unable to create work item container
    (CL_SWF_RUN_WIM_FLOW->_IMPORT_CONTAINER) "
    CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
        EXPORTING
          BUFFER                = FP_FORMOUTPUT-PDF
        APPEND_TO_TABLE       = ' '
       IMPORTING
          OUTPUT_LENGTH         = ZVAR1
        TABLES
          BINARY_TAB            = IT_SOLIX_TAB.
      IF SY-SUBRC = 0 AND NOT IT_SOLIX_TAB[] IS INITIAL .
        SWC_SET_TABLE   CONTAINER 'IT_SOLIX_TAB'  IT_SOLIX_TAB.
        SWC_SET_ELEMENT CONTAINER 'ZVAR1' ZVAR1.
        SWC_SET_ELEMENT CONTAINER  'YBUS2012' OBJ.
        GV_INITIATOR = SY-UNAME.
        CALL FUNCTION 'SWW_WI_START_SIMPLE'
          EXPORTING
           CREATOR                            = GV_INITIATOR
          PRIORITY                           = SWFCO_NO_PRIO
            TASK                               = 'WS99900241'
           CALLED_IN_BACKGROUND               = 'X'
          TABLES
            AGENTS                             = IT_AGENTS
            WI_CONTAINER                       = CONTAINER.
        COMMIT WORK.
        IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
    Thanks in advanced
    Laxman Sankhla.

  • Can we send attach with Inbound IDoc

    Hi All,
    I have requirement, Proxy to Idoc scenario where i need to send attchement along with Idoc message coming from proxy message. Can we do that?
    Also, i have another requirement as , i have 2 receivers , one is soap and one is Idoc , i need to send payload to Idoc reciever and just attachment to SOAP which is coming from Proxy message. How to do this.
    Please let me know. Thanks.
    Vishal

    HI Vishal
    You cannot send attachment to IDOC but for SOAP you can.
    Attachment from proxy cannot be accessed in mappings and has to be handled as attachment.
    Thanks
    Gaurav

  • Inbound IDOC should trigger worklfow.

    Dear Experts,
    My requirement is, when ever an Inbound IDoc is created, one workflow with that IDOC data sholud trigger.
    Problem is how to get IDoc data into workflow.
    Thanks in advance.
    Regards,
    Bala

    Whenevr you are triggering the workfLow via idoc you can pass the value to the workflow container.
    Nabheet

  • How to block the status mail for an inbound Idoc to a specific user

    Hi,
    I have to stop sending the error status mail to a specific user depenidng on Partner Type. This will trigger when an inbound Idoc contains status error(message type INVOIC &ORDRSP).This user needs other mails which are getting triggered with the same Idoc for the same partner. Basically, the requirement is to block only the status mail for that user. The statndard task for this is TS70008125 and it uses the agent determination rule 30000001 (Idoc Administrator).in WE46, this task is assigned to process code EDIR. I have copied the task to a custom task and changed the agent determination rule. I would like to know how will I configure this task so that this custom task will trigger for the status error, without altering other workflows for the same message type & the partner type. Or is there any other way to block the mail?
    Thanks,
    Santosh

    Hi,
    I have done the required coding to exclude the specific agent from the rule,copied the task and its ready. My question is how do I map this custom task to a particular partner type, for the message type INVOIC in WE20? (The message type used for the inbound Idoc is INVOIC). I checked the Partner profile in WE20. Most of the process code is using function module as the processing type.
    Thanks,
    Santosh

Maybe you are looking for