Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Existing Idoc edit transaction

Former Member
0 Kudos

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.

1 ACCEPTED SOLUTION

former_member378318
Contributor
0 Kudos

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.

5 REPLIES 5

Former Member
0 Kudos

Hi ,

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

Regards,

Raghav

0 Kudos

thanks mate

ferry_lianto
Active Contributor
0 Kudos

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

former_member378318
Contributor
0 Kudos

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.

0 Kudos

thanks a lot mate