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: 

IDOC check issue

Former Member
0 Kudos

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?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Would it be enough with releasing the segment again?

3 REPLIES 3

Former Member
0 Kudos

Would it be enough with releasing the segment again?

gaurab_banerji
Active Participant
0 Kudos

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.

  • table IDOCSYN

  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.

  • table EDISYN

  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.

Former Member
0 Kudos

Transporting again the extension the issue was solved.