Need to change the status of IDOC of type 'INFREC' to 51 failed

Hi SapAll.
here i have got a situation  where iam running a sap standard program 'RBDSEINF' tcode'me18'  by filling in parameters "Info record,Merchanise category as INFREC and while running  it is doing some validations using the Function module 'MASTERIDOC_CREATE_INFREC'  through the sap standard Enhancement which is implemented inside it and there is also code written in the EXIT 'EXIT_SAPLMEAO_002' under the include ' ZXMALU03 'to insert some ZSegments,etc.finally after all the explained process it was creating the IDOC Sucessfully.
now here the requirement is i need to define some code in the following below mentioned FM  to make the IDOC Fail with status 51 when the below mentioned condition  happens
code in the FM 'MASTERIDOC_CREATE_INFREC'  in the standared enhancement as below :
FUNCTION masteridoc_create_infrec.
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$\SE:(1) Function Module MASTERIDOC_CREATE_INFREC, Start                                                                                                   A
*$*$-Start: (1)---------------------------------------------------------------------------------$*$*
ENHANCEMENT 1  ZRMD_INFOREC_FILTER.
TYPES: BEGIN OF t_tvkov,
            vkorg TYPE tvkov-vkorg,
            vlgfi TYPE tvkov-vlgfi,
         END OF t_tvkov,
         BEGIN OF t_marc,
            werks TYPE marc-werks,
         END OF t_marc.
* Variables
  DATA: lv_index TYPE i,
        lv_urzla TYPE eina-urzla,
        lv_matnr TYPE eina-matnr.
* Tables
  DATA: lt_tvkov TYPE TABLE OF t_tvkov,
        lt_marc  TYPE TABLE OF t_marc.
* Structures
  DATA: ls_tvkov   LIKE LINE OF lt_tvkov,
        ls_bdieine LIKE LINE OF t_bdieine.
* Leave only relevant inforecords
  SELECT  SINGLE matnr urzla
    FROM  eina
    INTO  (lv_matnr, lv_urzla)
    WHERE infnr = f_bdieina-infnr.
  IF lv_urzla IS INITIAL.**********************************************************************8
*    EXIT.
MESSAGE e019(zrmd_msg).
          TE_IDOC_CONTROL-STATUS ='51'.
         append TE_IDOC_CONTROL.
     ENDIF.*************************************************************************************
when the above higlited condition is true then i have to create  the IDOC as failed  with the status 51 and with the error message saying 'Country of Origin must be maintained in Purchase info Record”.'
i have tried debugging for  2 to 3 hours to check if i can create the failed IDOC with status 51 but i couldnt.
so could any body help me in this.
regards.
Varma

Hi mr  Bhagath.
the only options where i can get the IDOC Number is as shown in the below attached screen s .
Varma
iam not sure of where i can get the IDOC number  and implement the code,the only area where i could get the IDOC number is at the higlited square  block where i explained that i can get but i am not able to write any code there as SAP is not allowing me .
hope to get the best answer from you.
regards.
Varma

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

  • Help needed on Changing the Status of a Functional Location

    Hi All,
    After I create a functional location, I have a requirement where in I have to change its status.  E.g., from CRTE to INAC.  Is any there any pre-defined RFC which fulfills this requirement? or Do I have to write any new RFC for changing the status?  Please let me know in detail.
    Also, please let me know how can I set the Deletion flag for a Functional Location?
    Any help is really appreciated.
    Thanks,
    Vijay

    The codes in level_selection.as looks like this, but the problem is I cannot find main_menu_button anywhere, except for main_menu.
    package {
        import flash.display.Sprite;
        import flash.events.MouseEvent;
        import flash.display.SimpleButton;
        public class level_selection extends Sprite {
            public var main_class:the_game;
            private var level_thumb:level_thumbnail;
            public function level_selection(passed_class:the_game) {
                main_class = passed_class;
                for (var i:int = 1; i<=5; i++) {
                    level_thumb = new level_thumbnail(i,main_class);
                    addChild(level_thumb);
                main_menu_button.addEventListener(MouseEvent.CLICK, on_main_menu_button_clicked);
            public function on_main_menu_button_clicked(event:MouseEvent) {
                main_class.show_splash();

  • 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

  • Need to change the status indicator in CV01n,CV02n and CV03n

    Hi,
        When i am creating the document in CV01n,if the status set to Release then the status indicator need to change in to green.

    Transaction Code - CV01                     Create Document Info Record
    Exit Name           Description
    CV000001            Check-in enhancement for document management
    CV110001            DMS: Enhancements for DMS Dialog (FB: CV110)
    CVDS0001            User exits for ALE DMS (DOCMAS)
    No of Exits:          3
    USER EXIT
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sapgenie.com/abap/code/abap26.htm
    http://www.sap-img.com/abap/what-is-user-exits.htm
    http://wiki.ittoolbox.com/index.php/HOWTO:Implement_a_screen_exit_to_a_standard_SAP_transaction
    http://www.easymarketplace.de/userexit.php
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sappoint.com/abap/userexit.pdfUser-Exit
    http://www.sap-img.com/ab038.htm
    http://help.sap.com/saphelp_46c/helpdata/en/64/72369adc56d11195100060b03c6b76/frameset.htm
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sap-img.com/abap/what-is-user-exits.htm
    http://expertanswercenter.techtarget.com/eac/knowledgebaseAnswer/0,295199,sid63_gci982756,00.html
    Rewards if useful.........
    Minal

  • How to change the status of clinical order header

    Hi all,
    I need to change the status (N1CORDER-WLSTA) of the clinical order header. I have found the way to change the status of the items and it works, but i dont know how to change the header status.
    Now, for the items i do:
    1- Create an object type cl_ishmed_prereg
    2- Load the item (n1vkg-vkgid)
    3- Use set_status method
    4- Save the object
    5- Commit work
    So, do you know how i can change the status of the header? Im looking for other methods but...
    Thanks,
    Manel

    In order to change the clinic order header status u have to:
    1- Obtain the instance from item instance:
        CALL METHOD lv_prereg->get_corder
          IMPORTING
            er_corder = lv_corder
            e_rc      = rc.
    2- Create a var type rn1_corder_x
    3- Modify:
    is_n1corder_x-wlsta = 'RE'. " new status
    is_n1corder_x-wlsta_x = 'X'.
    4- Use change mehod:
        CALL METHOD lv_corder->change
          EXPORTING
            is_corder_x     = is_n1corder_x
          IMPORTING
            e_rc            = rc
          CHANGING
            cr_errorhandler = cl_error.
    5- Save:
    CALL METHOD lv_corder->if_ish_objectbase~save
    6- Commit work
    Regards,
    Manel

  • Change the status of a form

    Hi All,
    Can anybody tell me how to change the status of the form?
    I want to exit the form with out committing the changes when the user click a button,
    For it...
    EXIT_FORM(NO_COMMIT);
    will do but, only when the form is not in a query mode.
    How do I change the status of the form or do something so that I can exit the form when I click the button irrespective of the form mode?
    Thanks,
    Naren.

    You don't need to change the status, you just need to ignore it. Try:
    exit_form(NO_VALIDATE)
    Oracle Forms exits the current form without validating the changes, committing the changes, or prompting the operator.

  • Bapi / Function module to change the status of transaction crmd_order

    Hello team,
    I am developing the utility in CHARM for which i need to change the
    Status of transaction CRMD_ORDER from "New to "In process" through
    report/BAPI / FM etc... I tried to use report
    CRM_socm_service_report.But it never puts status " In process" rather i
    updates only " "work in progress ".
    Also tried FM "CRM_STATUS_CHANGE_EXTERN" , but doen't work.
    After the process is put "In process" , i want to create change request
    and assign resource". Is there any report / FM /Bapi or anything in the
    system to do this.
    I tried to write BDC but dropdown list is not recorded in the recording.
    Please advice.
    Thanks and regards,
    Swapnil

    Not sure I understand your requirement but maybe FM CRM_ORDER_MAINTAIN will be of help to you.

  • Change the Status Message description of IDOC

    Hi All,
    As per the requirement, we need to change the Description of the standard IDOC status messages.
    Example:
    STANDARD : Status 51 - Application Document not posted
    DESIRED       : Status 51 - Application Document not posted, can be reprocessed
    We have found the maintenance view to change the same : VEDI_STATS.
    Is it advisable to do so?
    if Yes Why? and if No then Why?
    Note: I'll be changing ONLY description and nothing else.

    Hi,
    I would suggest not to change the status using VEDI_STATS.
    .. if you want to change do it at function module level for each message type. where you can change the idoc status to which ever message you want to.
    Regards,
    Nagaraj

  • Need to capture a Status date and keep it unchanged if I change the status

    Hi,
    I have a task list with multiple status like NOT STARTED, IN PROGRESS, WAITING FOR PROOF, WAITING ON SOMEONE ELSE, APPROVED, COMPLETED.
    Now, I wanted to capture the WAITING FOR PROOF date so that I can compare it with TASK DUE date and set if it is "On Due" or Over Due" so I used the following syntax:
    =IF(OR(Status="Waiting for proof",Status="Waiting on someone else"),DATE(YEAR(Modified),MONTH(Modified),DAY(Modified)))
    This works, but if I change the status from WAITING FOR PROOF to COMPLETED, the captured date is changed to "No" which I do not want to happen. I want to retain the same date captured even if I change the status.
    Many thanks,
    Vasanth

    
    Vasanth, your issue is because you are using the "modified" field whichchanges anytime you open the record. What you may need to add is a datefield that you control and will hold the date you which to compare against. You could initially capture the "created" date in that field then update it ONLY if specific field changes happen so you can change the Status field without disturbing your date comparison. This would require some calculated fields to update this date field only when it is necessary. Good luck!

  • I need To change the order status

    Hi Guru's,
    My application Version:11.5.9base
    My database Version:8.1.7.4
    In Order Management Super User--->Order organiser
    one Of my order Line Item showing status fulfilled. But status Is already Closed.
    Can you tell how to change the Status to Closed.
    regards,
    ***SBJ***
    Edited by: user13098774 on May 16, 2011 1:51 AM

    Hi
    In Oracle Order Management, I have ship confirmed a order, the order line status is staying at 'fulfilled' status and is not getting to 'Closed' status.
    please Give M e any answer .
    Regards,
    ***SBJ***

  • Changing the status of Equipment in a follow up action

    Hi All,
               I have a requirement in which a function module will be triggered for a particular Follow up action.
    In this FM we have to determine the equipment and the Maintenance Order , if both are available , status of the equipment
    should change to 'A' , status of maintenance - order = 'Technically completed' and Maintenance Notification = 'Notification Completed' .
    How can this be done.? I am able to change the status of Maintenance order and notification but can anyone help me in
    determining the equipment and changing its status to 'A'. ?
    Thanks in advance.
    Vasuki

    Hi Gajesh,
                     The process is as follows :
    1) During Calibration of a product,depending on the technician's User decision , 3 follow up actions are created.
    2) Each follow up action has one FM associated with it, which is customised in      SPRO > Display IMG > Quality Management > Quality Inspection > Inspection Lot Completion > Define follow-Up Action .
    3) In the first case ( first Follow up action when the inspection is successful) the first FM is triggered. In this FM we have to perform the following steps :
                                   a) Determine the Maintenance Order and the equipment.
                                   b) Incase both are available, status of equipmnt should be changed to 'A',
                                       Maintenance Order should be changed to 'Technically completed' and
                                       Maintenance Notification to 'Notification Completed' .
    If you need further info pls let me know.
    Thanks,
    Vasuki

  • Error in CV02N while changing the status.

    Hi Experts,
    We are getting a error while changing the status of technical change document that " Inconsistent characteristic value assignment" .The document is in status "in use" and we are trying to change it to " old version" using T code CV02N.
    when I tried to see the error desription it is telling that delete the inconsistencies. But I didn't find the list of incosistencies. What may be the problem? Please help me out to get ride of this problem.
    Thanks and best regards,
    Praveen

    Hi Pete,
    The full text message: Inconsistent characteristic value assignment
    Message no. C1821
    In diagnosis it is telling that "You want to change the value assigned to a characteristic. However, the change causes inconsistency, so the new value is not allowed."
    Actually I am just changing the status of the document. I am not changing any characteristic value.
    Actually it is appearing as information message. but while saving it pop up and not allowing to save.
    Please do the needful.
    Best Regards,
    Praveen

  • RE: Mail notification on changing the status of the spport desk messages

    Hi,
    I am facing problem with the automatic mail notification in service desk configuration.
    When i create a support desk message in the satellite system, the message appears in crn_dno_monitor in solution manager. When i change the status of the message from new to in process, i get a mail only with the subject line "MESSAGE IN PROCESS STATUS' and the pdf attachement (sapscript) is missing. I have checked all the configurations in SPPFCADM but i am not able to figure out the problem. Please help me out of this problem.
    Regards,
    Sowmya

    Hi,
    there is a SAP Note with a tutor for send_mail via action. See Note 691303 and the attached .zip-file.
    It shows step by step how to set it up and is a very good tutorial. You'll need additional (free) software to let it run.
    Regards,
    Dirk
    @Sowmya: what content does the mail have? None? There is a possibility in SolMan where you can choose whether you want the content as a .PDF-Attachment (which, in my eyes, isn't that sparkling) or as regular mail text.
    It is located in TA SCOT. Double klick on "SMTP", then klick on "Internet" and there choose in the Drop Down Menu of Sapscript. When you have trouble, look at my [screenshot|http://home.arcor.de/dirk.malas/solman/Mail_TXT_PDF.JPG].

  • How to change the status value?

    Hi Experts
    We landed in the starnge situation. We defined a multi task EE Monitor activity to change the status attribute to past due when particular internal event code is overdue. We forgot to assign the correct EE monitor Activity to EE Profile and the report /SAPTRX/EE_MONITOR converted the internal event code to overdue but did not change the status to past due for lakhs of records.
    Now we assigned the correct EE Monitor activity to the EE profile. How do we change the status to past due for already processed records? Is there any standard program available for this purpose or shall we need to write any custom program for it?
    Your quick response is much appreciated.
    Thanks
    Ravi

    Hi Ravi,
    the coding in the EE Mon activity SET_STATUS can be used as template. The method is unfortunately protected.
    It depends if you use EE History (Setting in EH Type Customizing). If yes it is importatnt to update also EE History table and the counter in the EH header for the History.
    Maybe the easiest way would be to send with a report messages to the EH and do the update in the rule set with the standard activity.
    You could use a new event code and react on it in the rule set.
    Best regards,
    Steffen

Maybe you are looking for

  • MacBook using BootCamp - Windows XP Bootup shows display in Portrait Mode

    I loaded Windows XP on my MacBook using Bootcamp. Everything was working fine, but now for some reason the display is in Portrait Mode when in XP. Does anyone know how to get the screen back to a normal mode?

  • Best way to manage music, movies

    We have one Mac and multiple accts.  How can I better organize our pictures, music and movies so everyone have access to all?

  • Access 2000 schema export failing

    I'm running Windows XP Sp2 MS Access 2003 (DB is 2000 file-format) Exporter for Microsoft Access Release 10.1.0.4.0 I just downloaded and tried to run the omwb access export utility, and it keeps giving me the following error whenever I click "export

  • [SOLVED] offline install

    Hey fellow Archers. I am attempting to install Archlinux onto my lappy so i can move that away from Xubuntu point 1: The reason for me doing this 'offline' is that i ONLY have a 3G connection to the internet & want to keep my bandwidth usage down to

  • Does the new Map app under iOS6 not offer driving directions in the United Arab Emirates?

    When I want the app to give me driving directions between two locations in Dubai, the app displays "Directions Not Avaiulable". I sued the Google Maps app a lot under iOS5 for driving directions. Now I am literally often lost ....