How to set the status when Idoc fails

Hai ,
I created Idoc extension & created a segment under that(Delivery related).
My requirement is,
if certain data not found,
Idoc should fail with text"Shipemnt for delivery <del. No> not found.
Could you please help me how to do this?
I checked the table EDIDC table but the above mentioned status is  not there.
Thanks & Best Regards,
Bhaskar.

you need to set the status using IDOC_STATUS
where ever error occurs populate the status table.
IDOC_STATUS-DOCNUM = IDOC_CONTRL-DOCNUM.
   IDOC_STATUS-STATUS = '51' ." if it is inbound
   IDOC_STATUS-MSGTY  = Message-type.
   IDOC_STATUS-MSGID  = message-id.
   IDOC_STATUS-MSGNO  = message-MSGNR.
   IDOC_STATUS-MSGV1  = message-MSGV1.
   IDOC_STATUS-MSGV2  = message-MSGV2.
   IDOC_STATUS-MSGV3  = message-MSGV3.
   IDOC_STATUS-MSGV4  = message-MSGV4.
*  IDOC_STATUS-SEGNUM = ?????????????????
*  IDOC_STATUS-SEGFLD = ?????????????????
*  IDOC_STATUS-UNAME  = ?????????????????
   IDOC_STATUS-REPID  = SY-REPID
*  IDOC_STATUS-ROUTID = ?????????????????
   APPEND IDOC_STATUS.

Similar Messages

  • How to change the status of IDOCS from 29 status to 53

    Guys
    how to change the status of IDOCS from 29 status to 53
    Thanks in advance

    Hi Krishna
    IDOC_STATUS_CONVERT Use this FM and reward me

  • How to set the status for a customer plan to RELEASED.

    Hello all,
    I created a program for mass creation of customer plans. But after the creation of a plan, the status should be set to released, so that the user can go about creating the trade promotions for the customer plan. Can anybody tell me how to set the status of a customer plan to RELEASED.
    Thanks,
    Disha.

    Hi Clemens,
    I am not talking about doing it in the CRM_UI transaction..I created a program..which would create the customer plans based on the planning account data provided. I was succesfull in creating the plans, but I am not knowing how to release it, if only anybody can tell me about a Function module or method, which can help me do this, that would be great
    Thanks,
    Disha.

  • How to set the selectedIndex when dataProvider is an XML object in DropDownList?

    dataProvider was an XML object
    How to set the selectedIndex when dataProvider is an XML object in DropDownList?
    I do this:
    <s:DropDownList id="dropDownList" requireSelection="true" selectedIndex="2"
                    labelField="lastName" dataProvider="{employeeService.lastResult.employees.employee}"/>
    But always the first item is selected whatever the value of selectedIndex equals to.

    if i understand correctly, you want the selectedindex to be 2 when the DropDownList  displays.
    It might be the case that the dataprovider is being sought after it's already selected its index (as the dataprovider isn't already determined to begin with), so currently it's
         - setting the selected index to default
         - setting the selected index to 2 (your command)
         - getting the dataprovider
         - setting the selected index to default
    try writing a function to set the DropDownList's selected index after it's received the information, or even just attach it to the employeeService result handler.
    for quick testing sake you could just add
    <s:DropDownList id="dropDownList" requireSelection="true" updateComplete="dropDownList.selectedIndex = 2"
                    labelField="lastName" dataProvider="{employeeService.lastResult.employees.employee}"/>
    to see if my theory is correct.

  • How to set custmer master block for posting & how to set the status .....

    < MODERATOR:  Message locked.  Please read the [Rules of Engagement|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/rulesofEngagement] before posting next time. Use an appropriate subject in your message thread. >
    Hi ...
    How to set custmer master blocked for posting & how to set the status has deleted. please provide the steps for the above two actions.
    thanks

    Hi,
    U can use T-code FD05 for Blocking the customer and
    T-code FD06 in order to set for deletion,
    Assign Points if useful,
    Regards,

  • How to set the Status

    Hi
    How to set the status of  user defined form as "closed" . I have one form, i want that form should not be editable after one condition is true. Can anyone tell one solution
    Advance Thanks
    jintu

    Hiii,
    Use this
    Sub FormDataEvent(ByRef BusinessObjectInfo As SAPbouiCOM.BusinessObjectInfo, ByRef BubbleEvent As Boolean)
            Try
                Select Case BusinessObjectInfo.EventType
                    Case SAPbouiCOM.BoEventTypes.et_FORM_DATA_ADD, SAPbouiCOM.BoEventTypes.et_FORM_DATA_UPDATE
                        If BusinessObjectInfo.BeforeAction = True Then
                            objForm = objMain.objApplication.Forms.Item(BusinessObjectInfo.FormUID)
                        ElseIf BusinessObjectInfo.ActionSuccess = True Then
                            If BusinessObjectInfo.EventType = SAPbouiCOM.BoEventTypes.et_FORM_DATA_UPDATE Then
                            End If
                        End If
                    Case SAPbouiCOM.BoEventTypes.et_FORM_DATA_LOAD
                        If BusinessObjectInfo.ActionSuccess = True Then
                            objForm = objMain.objApplication.Forms.Item(BusinessObjectInfo.FormUID)
                            objForm.Freeze(True)
                            If (objForm.Mode = SAPbouiCOM.BoFormMode.fm_OK_MODE) Then
                               if objForm.Item.Items("Status").Value.equals("Closed")= True
                             objForm.Mode = SAPbouiCOM.BoFormMode.fm_VIEW_MODE
                             End If
                              end if              
                        End If
                End Select
            Catch ex As Exception
                objMain.objApplication.StatusBar.SetText(ex.Message)
            End Try
        End Sub

  • How to set workflow status when workflow manually cancelled?

    Hi All,
    When i manually cancelled designer workflow, then status comes as 'cancelled'. Instead i need to set different status. How to  achieve this? 
    Thanks in advance!

    You can use this action
    Set Workflow Status
    This action is initially displayed in a workflow step as Set workflow status to Canceled. Use this action to set the status of the workflow. The default options are Canceled, Approved, and Rejected.
    You can enter a new status value in the dropdown in the action. Once you enter a status value, the entry is automatically added to the dropdown list. For example, you can enter a status that is more user-friendly and informative than Completed or Canceled,
    such as Expense Report Approved.
     NOTES 
    You cannot rename or delete a status value once it has been created. However, you do not have to use it.
    A custom status is applicable to the current workflow only, and cannot be used in another workflow.
    A workflow cannot use custom status values that you define in the action if the action is used inside an impersonation step.
    If the Set Workflow Status action is the last step in your workflow where you have also used a custom value, you can see your custom value in the Status column in
    the list upon workflow pausing or completion.
    Following is an example of what the action might look like in a workflow step,
    Set workflow status to Specification status: Ready for Design Review
    http://office.microsoft.com/en-in/sharepoint-designer-help/workflow-actions-in-sharepoint-designer-2010-a-quick-reference-guide-HA010376961.aspx
    Mark ANSWER if this reply resolves your query, If helpful then VOTE HELPFUL
    INSQLSERVER.COM
    Mohammad Nizamuddin

  • How to set window.status when returning to a page with back button/list?

    It is easy enough to set window.status to application-oriented information when loading a page: do it in a function which is the onload handler for the page's body element. But, when returning to this window from another window with the second window's back button, or selecting the first window from the second window's back list, window.status gets set to browser-oriented information, usually the string "Done". Is there any means by which I can set window.status to application-oriented information when returning to the window via another window's back button/list? What would be really great is if there is an event handler like this:
    window.onreturnviaback = onreturn_via_backhandler;
    Any ideas?

    How about:
    - (void)viewWillAppear:(BOOL)animated
    I use that a lot.

  • How to changes the status of IDOCs from 18 to 06....

    Hi All,
    I have set an Idoc to send the invoice to a midleware called Inovis via ALE, everything is looking OK at the moment and we are getting status 18. however for some reason Inovis needs the status 06, I have not idea how to set this change.
    Thanks in advance
    Regards

    Actually we asked Inovis Consultant to resolve this matter, apparently it was a problem with the message confirmation.
    Regards
    Alexis

  • How to set the status of an Workitem, while processing?

    Hi,
    My requirement is to set/ Change the workitem status after/ while procecssing if certain condition is not met for all the users. I have one workitem assigned to multiple users. If any one of the user's executes the workitem, it displays a zprogram, but the user has not taken any action (SAVE), he simply came out of the transaction using "BACK" button. Here the Workitem has been vanished/disappeared from the other two users Inbox, and the workitem is in "In Processu201D Status for the User who executed the workitem. But my requirement is to set the workitem to be in "READY" status for all the users to whom the workitem is assigned; until the user "SAVE" the transaction I need the workitems to be in "READY" status only.
    Please suggest me with your ideas to get the above results.
    Note: I have used the function modules u201CSAP_WAPI_SET_WORKITEM_STATUS (or) SWW_WI_ADMIN_READY ", to change the status of the workitem while processing, it's throwing an error u201CWork item & locked by user & (enqueue erroru201D.
    Thanks in advance,
    Ajay Kumar

    Thanks Florin,
    Your piece of code has worked alot, and it was very helpful in changing the Status of the Workitem to "READY" for all the Users fo the workitem.
    Points have been rewarded for your help.
    Process: We have acheived this using the "Work Item Exits", Usng "AFTER_EXECUTION" Method.
    Note: The Exit will be executed if "exit_cancelled"  statement is present/used in the work item method. if not it is not taking to the exit code. I'm unable to find the reason for it. Florin can u please explain this point.
    Please check the link for adding the code in Work Item Exits.
    http://wiki.sdn.sap.com/wiki/display/ABAP/ProgramExitsIn+Workflow
    Please find the Code:
    method IF_SWF_IFS_WORKITEM_EXIT~EVENT_RAISED.
    Get the context of the workitem
      me->wi_context = im_workitem_context.
    After execution of the workitem call the method AFTER_EXECUTION
      if im_event_name eq swrco_event_after_execution.
        me->after_execution( ).
      endif.
    endmethod.
    METHOD AFTER_EXECUTION.
    This method acts as the Event Handler for SWRCO_EVENT_AFTER_EXECUTION
      DATA: LCL_L_WID TYPE SWW_WIID,
            L_STATUS TYPE SWR_WISTAT-STATUS,
            L_NEW_STATUS  TYPE SWR_WISTAT,
            L_SWR_MESSAG  TYPE STANDARD TABLE OF SWR_MESSAG,
            L_SWR_MSTRUC  TYPE STANDARD TABLE OF SWR_MSTRUC.
    Get work item
      CALL METHOD WI_CONTEXT->GET_WORKITEM_ID
        RECEIVING
          RE_WORKITEM = LCL_L_WID.
      L_STATUS = 'READY'.
      CALL FUNCTION 'SAP_WAPI_SET_WORKITEM_STATUS'
        EXPORTING
          WORKITEM_ID    = LCL_L_WID
          STATUS         = L_STATUS
          USER           = SY-UNAME
          LANGUAGE       = SY-LANGU
          DO_COMMIT      = 'X'
        IMPORTING
          NEW_STATUS     = L_NEW_STATUS
         RETURN_CODE    = SY-SUBRC
        TABLES
          MESSAGE_LINES  = L_SWR_MESSAG
          MESSAGE_STRUCT = L_SWR_MSTRUC.
      IF SY-SUBRC EQ 0.
      ENDIF.
    ENDMETHOD.
    Thank You Once Again,
    Ajay Kumar Chippa

  • How to set the filename when downloading a file?

    I'm working on mvc4. I have generated excel file dynamically using following simple code my hosting is on Azure
    I have created a Root path and then try to save that excel file.
    Problem is when my Action Result method response comes back it is giving default popup to open a file but file name is having a GUID instead my provided file name
    What id wrong any clue?
    Excel file generation code:
    Microsoft.Office.Interop.Excel.Application xlApp =
    new Microsoft.Office.Interop.Excel.Application();
    return tempPath;
    This method returns something like C:\AppData\Local\dftmp\Resources\11a2435c-998c-4fe8-aa55-8bb42455b4ca\directory\myexcelFILE.xls.
    The Download File popup does not give file name as myexcelFILE.xls it gives some GUID why so?
    Action
    Result method code
    public ActionResult DownloadExcel(){
    string path = ExcelGenerationCode(fileName);
    Stream s = new FileStream(path, FileMode.Open, FileAccess.Read);
    return new FileStreamResult(s, "application/vnd.ms-excel");
    Ashish Fugat (ashuthinksatgmail.com) SE

    http://forums.asp.net/
    The above forum has the MVC section.

  • How to set 'error' status with DB poll Adapter in OSB

    1. Configured DB Adapter to poll rows with status 'notprocessed' and set the status to 'processed'
    2. Configured FTP Adapter to write fetched rows from DB into a CSV file
    Now my requirement is if any error like FTP server is not available, how to set the status in DB table to 'error'

    Yes Vlad you are right, this will avoid another DB connection created in Error Handler.
    I hope this will provide some lights on the usefulness of "Transaction"
    http://www.nysolutionsltd.com/transaction-handling-in-oracle-service-bus/
    http://kd-blog-tech.blogspot.com.au/2010/12/transaction-management-for-osb-service.html
    Regards
    RK
    Edited by: RK.. on 27/03/2013 17:10

  • Set the status of mass orders from CLSD (Business completion) to TECO

    Hi All,
    Can you please help me out on how to set the status of multiple orders from CLSD (Business completion) to TECO(Technical Complete) .
    Regards,
    Shruthi.

    I'm assuming production orders, you can do that in COHV, selection criteria Sys. Status "CLSD". Click on Mass Processing button and select Technically Complete.

  • How to set the message in the status bar...

    hai,
    how to set the message in the status bar...
    let us say "inserted data successfully, or opening page followed  by the link clicked on the screen....."
    kindly help me out

    sunil,
    do not use advise by Ashutosh with WebDynpro.
    Instead of placing message into browser status bar (and browser is not the only WD UI agent), use IWDMessageManager API to post messages of such kind:
    wdComponentAPI.getMessageManager().reportSucces("Record inserted"); 
    VS

  • How to set the root path of XML document when calling Inserting procedure

    Hi,
    I was create a procedure to insert XML Document in to DBMS Tables, but i am not able to set the Start root element in calling procedure.
    My calling procedure is
    exec insXmldoc('pmc_sample.xml', 'pmc')
    When i am calling this procedure i got this error
    11:23:54 Error: ORA-29532: Java call terminated by uncaught Java exception: oracle.xml.sql.OracleXMLSQLException: Start of root element expected.
    ORA-06512: at "SYS.DBMS_XMLSAVE", line 65
    ORA-06512: at "SCOTT.INSPROC", line 8
    ORA-06512: at line 2
    I am checking my XML file using XML Validator. My XML file was parsed with out errors.
    Please give the solution,and tell me where i did wrong in my calling procedure.
    suppose i have this XML file in local E drive ,how to set the path for that XML file in my calling procedure.

    Hi, I am doing the code likthis,please give the solution.
    SQL> create or replace procedure insProc(xmlDoc IN CLOB, tableName IN VARCHAR2) is
    2 insCtx DBMS_XMLSave.ctxType;
    3 l_ctx dbms_xmlsave.ctxtype;
    4 rows number;
    5 begin
    6 insCtx := DBMS_XMLSave.newContext(tableName); -- get the context handle
    7 rows := DBMS_XMLSave.insertXML(insCtx,xmlDoc); -- this inserts the document
    8 DBMS_XMLSave.closeContext(insCtx); -- this closes the handle
    9 end;
    10 /
    Procedure created.
    SQL> begin
    2 insProc('/usr/tmp/ROWSET.xml', 'emp');
    3 end;
    4 /
    begin
    ERROR at line 1:
    ORA-29532: Java call terminated by uncaught Java exception: oracle.xml.sql.OracleXMLSQLException:
    Start of root element expected.
    ORA-06512: at "SYS.DBMS_XMLSAVE", line 65
    ORA-06512: at "SCOTT.INSPROC", line 7
    ORA-06512: at line 2
    Kishore B

Maybe you are looking for