2014 May 20 6:00 AM
I have just created a custom extension for IDOC HRMD_A07.
Currently i have discovered a problem with an employee.
It has information about custom infotype 9701 and it is the unique employee at this moment.
When SAP tries to create the IDOC with the custom segment Z1P9701 system crash in one of the syntax checkings.
I replicate the example in development system without problems.
Debugging i disocovered that an entry is missed in EDISYN table.
How can i align both systems?
2014 May 20 1:49 PM
I have just created a custom extension for IDOC HRMD_A07.
Currently i have discovered a problem with an employee.
It has information about custom infotype 9701 and it is the unique employee at this moment.
When SAP tries to create the IDOC with the custom segment Z1P9701 system crash in one of the syntax checkings.
I replicate the example in development system without problems.
Debugging i disocovered that an entry is missed in EDISYN table.
How can i align both systems?
2014 May 20 1:49 PM
2014 May 20 2:43 PM
This is a problem which occurs throughout lots of SAP systems. This occurs due to someone changing the IDOCSYN table without making the neccessary changes to the EDISYN table.
For more information on this you can check out the note - 370021. Also if you run the following program in your system and make the changes to your IDOC segment, this error will go away.
(Please note that this program is provided by SAP and I just made a small adjustment by adding the COMMIT WORK AND WAIT statement) .
Hope this helps.
_____________________________________________________________________________________
REPORT ze1edp19.
TABLES: idocsyn, edisyn, cimsyn.
DATA: old_idocsyn TYPE idocsyn,
lt_idocsyn TYPE STANDARD TABLE OF idocsyn,
ls_idocsyn TYPE idocsyn,
old_edisyn TYPE edisyn,
lt_edisyn TYPE STANDARD TABLE OF edisyn,
ls_edisyn TYPE edisyn.
PARAMETER idoc_typ TYPE idocsyn-idoctyp DEFAULT 'ORDERS05'.
PARAMETER idoc_seg TYPE idocsyn-segtyp DEFAULT 'E1EDP19'.
PARAMETER occmax TYPE idocsyn-occmax DEFAULT '99'.
PARAMETER upd_flag AS CHECKBOX DEFAULT space.
START-OF-SELECTION.
SELECT * FROM idocsyn INTO TABLE lt_idocsyn WHERE idoctyp = idoc_typ. READ TABLE lt_idocsyn INTO ls_idocsyn WITH KEY idoctyp = idoc_typ segtyp = idoc_seg. IF sy-subrc = 0. MOVE ls_idocsyn TO old_idocsyn. ls_idocsyn-occmax = occmax. IF upd_flag EQ 'X'. UPDATE idocsyn FROM ls_idocsyn. COMMIT WORK AND WAIT. WRITE: 'Table IDOCSYN updated', /,' Idoctype: ',idoc_typ, /' segment number: ',ls_idocsyn-nr. WRITE: /,'OCCMAX changed from',old_idocsyn-occmax, ' to ',ls_idocsyn-occmax. ELSE. WRITE: 'No UPDATE done in table IDOCSYN', /,' Idoctype: ',idoc_typ, /' segment number: ',ls_idocsyn-nr. WRITE: /,'OCCMAX changed from',old_idocsyn-occmax, ' to ',ls_idocsyn-occmax. ENDIF. ELSE. WRITE: 'no such record in table IDOCSYN'. ENDIF. ULINE.
SELECT * FROM edisyn
INTO TABLE lt_edisyn
WHERE idoctyp = idoc_typ AND
cimtyp = space.
READ TABLE lt_edisyn INTO ls_edisyn
WITH KEY idoctyp = idoc_typ
cimtyp = space
segtyp = idoc_seg.
IF sy-subrc = 0.
MOVE ls_edisyn TO old_edisyn.
ls_edisyn-occmax = occmax.
IF upd_flag EQ 'X'.
UPDATE edisyn FROM ls_edisyn.
WRITE: 'Table EDISYN updated',
/,' Idoctype: ',idoc_typ,
/' segment number: ', ls_edisyn-posno.
WRITE: /,'OCCMAX changed from',old_edisyn-occmax,
' to ',ls_edisyn-occmax.
ELSE.
WRITE: 'No UPDATE done in table EDISYN',
/,' Idoctype: ',idoc_typ,
/' segment number: ',ls_idocsyn-nr.
WRITE: /,'OCCMAX changed from',old_idocsyn-occmax,
' to ',ls_idocsyn-occmax.
ENDIF.
ELSE.
WRITE: 'no such record in table EDISYN'.
ENDIF.
2014 Jun 18 10:02 PM