IDOC_Err_Message

Hi..
In an IDOC creation , we are checking some standard fields and conditions.
Now,if an error has occured in a normal check then in that case I want to show a red light in the IDOC status with a small messasge text.
Please tell me how shall I proceed.?
Thanks

Hi Subhash,
First of all declare
Data :bapi_retn_info  LIKE   bapiret2,
      status LIKE  bdidocstat-status.
When u r validating the fields if it is successful then the status of idoc is 53 else 51
for example(for unsuccessful validation)
  status = '51'.
    bapi_retn_info-type       = 'E'.
    bapi_retn_info-id         = Message class name
    bapi_retn_info-number     = Message class number
    bapi_retn_info-message_v1 =  variable.
Then
Fill the idoc status.
idoc_status-docnum   = idoc_contrl-docnum.
  idoc_status-msgty    = bapi_retn_info-type.
  idoc_status-msgid    = bapi_retn_info-id .
  idoc_status-msgno    = bapi_retn_info-number .
  idoc_status-msgv1    = bapi_retn_info-message_v1.
  idoc_status-repid    = sy-repid.
  idoc_status-status   = status.
  APPEND idoc_status.
Hoping this will help.Please reward points if it is useful
Regards,
Nagaraj

Similar Messages

Maybe you are looking for

  • Speakers Suddenly Not Functioning

    Recently, I've encountered a strange problem with my laptop. It's a Dell Inspiron 17R, and the speakers no longer seem to function. They're set to default, the sound is up, and no headphones are plugged in. I initially tried a system restore (twice)

  • PLEAS help opening a frame when clicking a button

    i have a applet and when i click on a button it opens a frame. i have atried a couple of things but the frame does not open. Can anybody Please help import java.applet.*; import java.awt.*; import java.awt.event.*; public class mainscreen1 extends Ap

  • DW Tables Creation - Columns Missing

    Hi All, When i run the ETL for the execution plan containing tasks related to SCM, some tasks fail, predominantly of which are due to columns missing in the DW tables. I dropped and recreated the DW tables ( Tools -> ETLMgmt -> Configure) but it didn

  • Physical standby crash leads to peculiar process behavior on primary nodes

    Hey all, we had an issue early this morning with our physical standby database in our production environment. It's an odd problem and I thought I'd share it to see if anyone else has come across a similar problem. Our environment consists of a two no

  • No puedo abrir las aplicaciones que añadi

    alguien me pudiera ayudar. mi ipod no responde cundo quiero abrir las apicaciones que instale pero las originales si funcionan muy bien ...que hago graciasy