Skip to Content
author's profile photo Former Member
Former Member

Existing Idoc edit transaction

Hi everybody,

Is there any transaction to edit the contents in the idoc (EDIDD) segments without creating a new one. I know that we can create a new idoc with WE19.

Thanks & regards,

Kiran.

Add comment
10|10000 characters needed characters exceeded

3 Answers

  • Best Answer
    Posted on Aug 02, 2006 at 03:14 PM

    You can edit the contents of an existing IDOC using standard transaction WE05. Use WE05 to select the IDOC you wish to edit, expand the Data Records until your segment is visible, double click the segment you wish to edit (not single point and click), this should open the "Display Data Record for IDOC" screen, from the menu select Data Record -> Display -> Change, change the data and save it.

    Hope this helps.

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 02, 2006 at 02:50 PM

    Hi ,

    No such transaction is there . Hope you need to write your own program for that.

    Regards,

    Raghav

    Add comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 02, 2006 at 02:58 PM

    Hi Kiran,

    You can use FM <b>EDI_DOCUMENT_OPEN_FOR_EDIT</b> and <b>EDI_CHANGE_DATA_SEGMENTS</b> to edit the IDoc segment(s) and save the segment changes.

    Please check this sample codes.

    CALL FUNCTION 'EDI_DOCUMENT_OPEN_FOR_EDIT' 
      EXPORTING 
        document_number = t_docnum 
      IMPORTING 
        idoc_control = itab_edidc 
      TABLES 
        idoc_data = itab_edidd 
      EXCEPTIONS 
        document_foreign_lock = 1 
        document_not_exist = 2 
        document_not_open = 3 
        status_is_unable_for_changing = 4 
        OTHERS = 5. 
    
    LOOP AT itab_edidd WHERE segnam = 'E1EDKA1'. 
                             e1edka1 = itab_edidd-sdata. 
     
      IF e1edka1-parvw = 'LF'. 
        e1edka1-partn = t_eikto. 
        itab_edidd-sdata = e1edka1. 
        MODIFY itab_edidd.
        EXIT.
      ENDIF.
    
    ENDLOOP. 
    
    CALL FUNCTION 'EDI_CHANGE_DATA_SEGMENTS' 
      TABLES 
        idoc_changed_data_range = itab_edidd 
      EXCEPTIONS 
        idoc_not_open = 1 
        data_record_not_exist = 2 
        OTHERS = 3.

    Other alternative, please find user exits available in the correspondence inbound function module to edit the segment(s).

    Here is an example for FM IDOC_INPUT_ORDERS.

    CALL CUSTOMER-FUNCTION '001'    
      EXPORTING 
        SEGMENT = IDOC_DATA              
        DVTCOMAG = VTCOMAG              
        DXMESCOD = IDOC_CONTRL-MESCOD              
        CONTRL   = IDOC_CONTRL    
      TABLES    
        DXBDCDATA = BDCDATA              
        DXVBAP    = XVBAP              
        DXVBEP    = XVBEP              
        DYVBEP    = YVBEP              
        DXVBADR   = XVBADR              
        DYVBADR   = YVBADR              
        DXVBPA    = XVBPA              
        DXVBUV    = XVBUV              
        DD_FLAG_P = D_FLAG_P              
        DXKOMV    = XKOMV              
        DXVEKP    = XVEKP              
        DYVEKP    = YVEKP    
      CHANGING  
        DXVBAK   = XVBAK              
        DD_FLAG_K = D_FLAG_K    
      EXCEPTIONS     
        USER_ERROR = 01.

    Hope this will help.

    Regards,

    Ferry Lianto

    Add comment
    10|10000 characters needed characters exceeded