Then set it released by press F3, Go to Menu->Edit->Set Release
2. Create Extension for Basic Type ARBCIG_DELINS (Tcode WE30)
3. Maintain Output Types and Assignment to IDoc Types in WE82 (Tcode WE82)
4.Maintain Partner Profile in WE20 (Tcode WE20)
5.Write the code in USER EXIT ZXM06U60 (for Scheduling Agreement)
Because our ZSegment position is right under E1EDP10 Segment, therefore we need to find the exact index no. where to insert the new segment. We use the following code:
CALL FUNCTION 'IDOCTYPE_READ'
EXPORTING
PI_IDOCTYP = 'ARBCIG_DELINS'
PI_CHECK_AUTHORITY = ' '
TABLES
PT_SYNTAX = LT_EDI_IAPI02
EXCEPTIONS
OBJECT_NOT_FOUND = 1
DB_ERROR = 2
NO_AUTHORITY = 3
OTHERS = 4.
IF SY-SUBRC <> 0.
EXIT.
ELSE.
READ TABLE LT_EDI_IAPI02 INTO LS_EDI_IAPI02 WITH KEY SEGTYP = 'E1EDP10' .
IF SY-SUBRC <> 0 .
EXIT.
ELSE.
LV_NR = LS_EDI_IAPI02-NR .
ENDIF.
ENDIF.
** Identify the exact index no. where to insert the new segment.
LOOP AT DINT_EDIDD ASSIGNING FIELD-SYMBOL(<LF_IDOCS>) .
LW_INDEX = SY-TABIX.
READ TABLE LT_EDI_IAPI02 INTO LS_EDI_IAPI02 WITH KEY SEGTYP = <LF_IDOCS>-SEGNAM.
IF LS_EDI_IAPI02-NR > LV_NR AND LV_COMPL = SPACE.
LV_COMPL = 'X' .
EXIT.
ENDIF.
ENDLOOP.
Then we check the Zsegment is existing or not and Append or Insert corresponding.
READ TABLE LT_EDIDD ASSIGNING FIELD-SYMBOL(<LF_TEST>)
WITH KEY SEGNAM = 'Z1EDP10'.
IF SY-SUBRC = 0.
<LF_TEST>-SDATA = LS_Z1EDP10.
ELSE.
MOVE <LF_E1EDP10_TM> TO LS_EDIDD.
CLEAR LS_EDIDD-SDATA.
LS_EDIDD-SEGNAM = 'Z1EDP10'.
LS_EDIDD-SDATA = LS_Z1EDP10.
LW_INDEX = LW_INDEX + 1.
IF LV_COMPL = 'X' .
INSERT LS_EDIDD INTO DINT_EDIDD INDEX LW_INDEX.
ELSE.
APPEND LS_EDIDD TO DINT_EDIDD.
ENDIF.
ENDIF.
Finally, the values of Zsegment will come through into IDoc.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
7 | |
6 | |
5 | |
4 | |
4 | |
4 | |
4 | |
3 | |
2 | |
2 |