Determining document type in exceptions

Hi,
We have a requirement for performing different error handling actions based on the doc type . For example,
If docType=850 then send email
if docType=810 then update database etc.
Now the BPEL process which is listening for errors (using b2berroruser consumer) gets an exception message but the doctype in the header has a value "Exception" instead of the original doctype which caused this exception and hence BPEL is unable to determine which action to perform.
Please let me know the best way to handle this.
regards,
Narayanan

Hi,
You can use extract the b2bMessageId from the exception payload to obtain the original message's document type from b2b_instancemessage view. For example, you can 'select documenttype from b2b_instancemessage where b2bmessageid = '<b2bMessageId>'; This can be done with the DB Adapter. Base on the return value, the BPEL process can process the error further.
Hope this helps,
Eng

Similar Messages

  • Determining document type:  Debit Request vs Sales Order

    Our scenario:
    o     Business activities that are not our core revenue-generating business and currently invoiced out of FI-AR (FB70)
    o     Intend to change the billing process to invoice out of SD instead of FI-AR, one of the reasons is being able to capture SD related data for reporting purposes
    o     Different material masters but no more than 10 records, has yet to decide if the same material type
    o     Different pricing (procedures?)
    o     Relatively simple processes
    o     Same customer base
    o     Share same business attributes as core business like PO #, PO Date, Vessel #, etc. Therefore the new document type may want to reference to the underlying contract/sales orders.
    o     Different revenue account assignment
    SAP refers Debit/Credit Request as complaint process but this type of billing has nothing to do with complaints.  It's just a different type of billing.
    Questions:  We are trying to decide whether to create the new sales document type as Debit Request or another Sales Order type.  Or does it matter?  How are these two different and what are the determining factors? 
    Appreciate any suggestion on how to tackle this.

    Hello,
    Yes, it does matter which way you go.  Suggest you consider what the business flow  is in more detail  and then look further into what types of SD docs most align with the business flow at hand.
    Some very general things to keep in mind:
    Debit/Credit Request:  not relevant for ATP, billing occurs without delivery processing. Generally used for billings for price adjustments to what'd been invoiced or credited previously. 
    Other order types:  can be relevant for ATP, require delivery processing before billings can occur.
    Good luck

  • Determine the type of the caught exception

    Hi!
    Here is my problem :
    I'm using a web service and the method I call throws different types of Exception (RemoteException, ServiceException, etc...)
    And, the reaction to the caught exception depends on its type, that's why I need to determine what type of exception i've caught. I know that with C# I use the boolean function is :
    if (exception is TypeOfException1)
        // associated reaction
    else if(exception is TypeOfException2)
       // associated reaction
    }Is there any method or any other way in Java to do that?
    Thanks a lot,
    Gan�che.

    >
    Here is my problem :
    I'm using a web service and the method I call throws different types of Exception (RemoteException, ServiceException, etc...)
    And, the reaction to the caught exception depends on its type, that's why I need to determine what type of exception i've caught. >
    try {
      // stuff that may cause exceptions..
    } catch(RemoteException re) {
      // deal with this re
    } catch(ServiceException se) {
      // deal with this se
    } catch (Throwable didNotExpectThis) {
      // exceptional!
      didNotExpectThis.printStackTrace();
    }

  • Message output for New Purchase Order Document type

    Hi experts,
    I am having trouble getting a Print message output for a New Purchasing Document type that I created.
    Steps that I followed are:
    1.Created a new Document type NS via customizing.
    2.Assigned the new Purchasing Document Type NS to Output Type NEU which is linked to our customized form for Purchase order display. I used MN04 /NACE to do this step.
    Now the message output gets created for my new document type NS but I am unable to display the message.
    Notes:
    -There are no release stratergies in place for document type NS
    -The NEU format works fine the other document type NB which we use for Standard POs.
    Are there any steps I have missed? Please help to resolve the issue.
    Arosh.

    Goto NACE select application  EF Purchase Order then goto condition record NEU select condition record select the last key combination "Purchasing Output Determination: Document Type"
    here enter your doc. type execute
    maintain the condition record
    NS  VN(function)   1 3 EN and click on communication and maintain
    Or goto NACR here put EF and NEU and select the last combination "Purchasing Output Determination: Document Type"
    maintain ..
    NS  VN(function)   1 3 EN and click on communication and maintain
    Hope it helps..

  • Output type neu not coming automaticaly my document type zcpo contract po

    Hi
    I need output type neu automaticaly for create  purchase order  document type zcpo,nb,fo, this two condition type  coming automaticaly my output type neu,
    Following configurations i have completed for nb,fo,zcpo document type in Nace t.code
    In nace EF purchase order i click condition records NEU I click my key combination purchasing output determination document type
    purchasing document type is zcpo execute i give document type zcpo,fuction vn,medium i give 5.date time 3,lang EN,then
    i click communication comm strategy cs01,output device is HP,i tick print immidiately,request status is all statuses,status by mail is
    all statuses save it.
    in spro- messages- output control-fined tune message control-i give operation 1 for new my ouput type neu.still my condition type
    zcpo in po my output type neu not coming automaticaly plz suggest
    Regards
    Sam

    Hi,
    Go to MN05 Maintain Doc. Type, Function (VN), Medium (1), Date & Time (3) indicators select the row click on communication maintain out put device tick print immediately.
    Hope this will help you.
    Regards,
    Manish Jain

  • New document type--printing PO

    Hi, I created new doc types and I noticed that the POs created under the new doc types did not displayed anything in the Messages (printing).  Do I have to configure the output control? if yes, how? thanks so much!

    Hi
    You may not view it in the dropdown list, for message setting whe you are creating the condition record, you select the output type in MN04 (NEU or any other customised out type for PO) , from the key combination when you are selecting Purchasing output determination: Document type and executing , you will find the condition record fields enter your new document type directly instead of selecting it from the drop down. It will pick the details as you wish. There is no configuration required for this.
    Regards

  • I need output type NEU automaticaly for create purchase order document type

    Dear Experts,
    I need output type NEU automaticaly for create purchase order document type NB
    when transaction code MN04, I am doing the following:
    (1) I selected the third option Purchasing Output determination: Document type
    (2) I selected the output type NEU.
    (3) In condition records in document type , i have chosen NB.
    (4) In name its automatically coming as Purchase requisition
    Please suggest how Purchase Order NB will come

    Hi,
    Check & press F4, NB Purchase Order (for catagory F) will be there after entering PO output type NEU & then maintaion the condition record in MN04.
    Output type NEU automaticaly defaulted during purchase order creation with document type ,then just fine tune the output (message) type in following path:
    SPRO--->MM->Purchasing>Message>Output control->Message types> Define message type for Purchase Order----->Fine-Tuned Control: Purchase Order
    Now here select the check box corresponding to your output(message) type NEU to have print output automatically displayed & save.
    Now try to creating Purchase Order & you will have default message type NEU.
    Regards,
    Biju K

  • Print with ME9F or SP01 for different PO document type

    Fiends,
    I have copied a PO document type to ZNB and I am unable to see the documents in ME9F or SP01 inspite of maintaining the following. But I can see the print preview
    With the similar settings document Type NB is working fine in ME9F
    Output Type  NEU
    Key Combination Purchasing Output Determination  Document Type
    Document Type ZNB
    Function VN
    Medium 1
    Date Time 3
    Language EN
    Communication
    Output Device  LP01
    Print Immediately is Checked
    Sap Cover Page Do not print
    Assigned device to Purchase group
    Defined Text for messages for this PO type too
    Friends please give me solution for this It is very very critical.
    Regards

    Sorry guys for confusing all of you. The issue was with the release procedure..the POs were not released... inspite of the release button showing "released"... I did not check the status..
    hence closing this thread
    Thanks

  • SAP SD Material Determination not reflected in assigned sales document type

    Hi Experts,
    I have implemented customized material determination, with requirement to change the UoM of the entered material, from GJ to MJ. I have assigned the procedure to 3 document types:
    1. sales order type
    2. credit memo request
    3. debit memo request
    However, this setup is only reflected in the 1st sales document assigned with the procedure. It is not reflected in the credit or debit memo request.
    I have turned on the material determination analysis in sales order. Per my checking during credit memo request creation, the analysis indicated that the condition is found successfully. But the UoM did not change in the document.
    Please assist.
    Thank you.
    HJMY
    Edited by: HJMY on Sep 20, 2011 1:24 PM

    Hi Ravi,
    Thx for your reply.
    But I am creating credit/debit memo request without reference to billing.
    When I create credit/debit memo request, the material determination is triggered.
    Per my test today for credit memo request, I found that the material determination is triggered.
    However, the substition UoM is not reflected in the credit memo request document.
    The result is reflected only in sales order.
    Please help.
    Edited by: HJMY on Sep 21, 2011 3:28 AM

  • Revenue Account Determination based on Sales Order Document Type & Service Order Type

    Hi Expert,
    I have Customer Service Module with Resource Related Billing for services attached with SD.
    When DP90 runs sales document debit memo request is created & then debt memo is created.
    I need to configure Revenue Account Determination based on Sales Order Type and also based on Service Order Type.
    I did not see any field catalogue in revenue account determination for order type, For communication structure KOMKCV Header and KOMPCV Item level there is no field for sales order type nor service order type.
    Is it possible to bring in both order types? Can ABAP person do it?
    How to bring these fields?
    Is it possible & recommendd to have service order type filed AURAT for service order into this sturcture?
    Is this configuration is OK acceptable by SAP? If so is there any chnace for issues errors & wrong determination from FI CO view?
    Your valued input is highly appreciated.
    Thanks
    Prakash Parikh

    Hi Prakash,
    Yes, you can certainly add new table fields into the field catalog KOMKCV and KOMPCV and use it during account determination. You will also have to add these new fields in the user exit RV60AFZZ for it to work. I believe you will need ABAPer's help to make this work. The abaper will have to crate a ZZFIELD (ZZAUART for example) and put it in the structure and use the same in the user exit to pass the values.
    In your case, what I am not sure is, are you looking to modify the existing standard tables or creating new ones. My suggestion is to create the new condition tables with these new fields (like document type) after adding it to the field catalog. Only modify the access sequence (KOFI) in such a way that your new tables are access first before it goes into standard tables (or you can adjust it according to your scenario.
    We have done it in our company and it is working fine. Basically what we have done is to create new tables instead of modifying the standard ones. We have adjusted the access sequence in such a way that some of our custom tables are accessed first before the standard SAP tables (C001 to C005).
    I found a similar requirement on SCN. This might help.
    Adding New Field in Account Determination
    Hope this helps.
    Regards,
    Mukund S

  • Determination of PR and PO document type

    Can anyone tell me what I need to do if I want a ZNB purchase requisition type created rather then the usual NB? I also would like the same to occur for Purchase order type. What determines what order type gets created, once you have configured a "Z" document type?

    Hello, Charlie
    With reference to your Recent query
    (i.e, The document type ZNB is for PR and PO. I have one created for both documents. I am trying to get the system to automatically create the ZNB for purchase requisition doing MRP planning and to automatically convert the ZNB to a ZNB purchase order type.)
    When you Run MRP, a PR of your own document type will be created, yes, you can do so like that,
    For that you need to Setup some Configuration, is as follows:
    Use t.code: OPPZ, 
    (i.e, the t.code is settings for MRP Group)
    Select the Plant (for which you want to do it)
    -> Create   (press tab)
    and
    then -> Maintain Tab  (here, you are maintaining MRP Group for External Procurement for your Plant)  
    then 
    -> press Maintain Tab (Maintain MRP Group screen will appears)
    Here,   
    under External Procurement -
    >
    -> Scheduling /doc. type ( Press this tab )
    Display view: "External Procurement for MRP Groups": Over view;  
    in the above Screen, there is a table like below: (need to config)
    Plant    Name1  MRP Group Name                 Doc Type SPO
    XXXX    YYYY    ZZZZ           External Procurement     ZNB
    Suggestion: In the above configuration, you are assigning (your own customized purchase requision document type, i.e, ZNB instead of NB (default) to your Plant and also to the MRP Group.
    If you need path for the above Configuration setup:
    in Display IMG:
    ->  MM -> Consumption-Based Plannning -> MRP Groups
    then
    -> Carry Out Overall Maintenance of MRP Groups 
    click on it on above
    Maintain MRP Group for your Plant  (t.code: OPPZ) 
    When MRP is carried out, then the requirement is generated that is PR is created automatically (of your own customized PR document type, that is here, ZNB)
    Hope this will clarifies you,
    Reward, if it helps,
    Regards,
    Srin.K

  • Accounting document type determination

    How is the accounting document type 'RV' determined in an acounting document?

    Dear Prabhu,
    The document RV is determined if document type is blank in VOFA,  because in sap standard function module RV_ACCOUNTING_DOCUMENT_CREATE, sap set RV into blart field.
    as shown below.
    IF tvfk-blart IS INITIAL.
    xaccit-blart = 'RV'.
    ELSE.
    xaccit-blart = tvfk-blart.
    ENDIF.
    This you can check in SE37.
    Regards,
    Abhee.

  • Customs document type cannot be determined for external document Type F8

    Hello Experts
    Need help
    I am trying to transfer F8 to GTS 10.1 and getting following message in GTS  Transfer log for export:
    Customs document type cannot be determined for external document Type F8
    New implementation
    GTS 10.1 running with SP 12
    ECC side Plug-In settings are fine. BAdi is Active.(There is no document mapping for F8/CUSDEC as it is not required in 10.1)
    GTS side configurations are also fine. Checked several times by 4 sets of eyes!!
    (Include general settings configurations, Customs communication configurations:)
    (Defining technical medium, conditions/output parameters, defining messages for communication process,
    defining determination for activity sequence and control settings for communication process)
    Despite this I am not able to trnasfer F8 successfully
    Can someone throw some light on this issue please?
    Keshav Murthy
    [email protected]

    Hi Dhilipan
    Here we go..
    You asked me to check the following
    Please check following things
    1) Legal regulation is activated. - Yes Activated
    2) Process template assigned to the legal regulation - Yes Assigned
    3) Activity Sequence determination - Yes done
    4) Open the activity sequence in under Control settings for Communication processes and check if there is a document type assigned to it. Table- /SAPSLL/TLEPAF - Yes done.
    It is really puzzling.
    Thanks
    Keshav Murthy

  • Assign partner determination procedure to Item Category/Sales document type

    Hello All,
    How can I assign a partner determination procedure to an item category or sales document type? That field is disabled in item category config step. Please suggest.
    Thanks,
    lavanya

    HI Lavanya,
    The partner determination will happen through a different way and not through item category definition.
    The path would be
    S&D->MAster Data->Bussiness partners->customers->Customer hierarchy->set partner determination for hirearchy categories.
    In this you will have one option to define by item category.
    Hope this helps.
    Abhishek

  • User Exit for PO Calculation Schema Determination by PO Document Type

    Hello,
    Due to complex pricing requirements for both standard inbound purchase orders and return to vendor purchase orders, we need two separate calculation schemas to be applicable to each vendor.
    I have configured the primary calculation schema (ZM1000) which is correctly calculated on our standard purchase orders.  Through ENHANCEMENT-POINT mepo_header_fill_neu_01 SPOTS es_saplmepo (program SAPLMEPO) we have implemented code to change the calculation schema to the return schema (ZM1002) if the document type is one of our return purchase order types.
    ENHANCEMENT 1  ZMEEI_PO_PRICE_SCHEMA_DETM.    "active version
    IF fekko-bsart eq 'ZR1' or fekko-bsart eq 'ZR2' or fekko-bsart eq 'ZR3' or fekko-bsart eq 'ZR4'  .
         fekko-kalsm = 'ZM1002'.
    ENDIF.
    ENDENHANCEMENT.
    We are facing an issue where once the data is correctly entered into the return PO and the pricing has been determined there are errors.  The following is observed in the pricing analysis:
    1)  The correct calculation schema is determined (ZM1002).
    2)  Pricing conditions which have a condition record under the main calculation schema (ZM1000), but which do not exist in the return one (ZM1002) still appear in the pricing.  This is an issue.
    3)  Price conditions which have a condition record under the new schema (ZM1002), and which should appear, receive the message "Condition record exists, but has not been set".  This is an issue.
    When the pricing is re-determined manually at the line item level, it recalculates correctly and issues 2 and 3 above are adjusted accordingly.
    Question:
    Is there something missing in our code above which is cause these issues or is there a better user exit we should be using to address this requirement?
    Thanks in advance!

    Melih
    What we ended up doing was using ENHANCEMENT-POINT item_process_main_01 SPOTS es_saplmepo (program SAPLMEPO) to re-price the line items automatically when processing.  This solved our issue.
    IF EKKO-BSART = 'ZR1' or EKKO-BSART = 'ZR2' or EKKO-BSART = 'ZR3' or
    EKKO-BSART = 'ZR4'.
    lf_ext_calctype = 'C'.
    ENDIF.

Maybe you are looking for