Documente Academic
Documente Profesional
Documente Cultură
The full documentation can be found here Inbound Processing of IDocs Received.
1
2
3
4
5
6
7
8
9
1
0
1
1
1
2
1
3
1
4
*"*"Globale Schnittstelle:
*" IMPORTING
*"
VALUE(CONTROL_RECORD_OUT) LIKE EDIDC STRUCTURE EDIDC
*"
VALUE(DVBDKR) LIKE VBDKR STRUCTURE VBDKR OPTIONAL
*"
VALUE(DOBJECT) LIKE NAST STRUCTURE NAST OPTIONAL
*" EXPORTING
*"
VALUE(CONTROL_RECORD_OUT) LIKE EDIDC STRUCTURE EDIDC
*" TABLES
*"
DXVBPA STRUCTURE VBPA OPTIONAL
*"
DTVBDPR STRUCTURE VBDPR OPTIONAL
*" EXCEPTIONS
*"
ERROR_MESSAGE_RECEIVED
*"
DATA_NOT_RELEVANT_FOR_SENDING
*"----------------------------------------------------------------------
EXIT_SAPLVEDF_002 (ZXEDFU02)
This User Exist allows Customer Enhancement in Data Segments when generating Billing Document
Output.
It called when generating the INVOIC02 Idoc SEGMENT BY SEGMENT.
The following Code is an example of ABAP implementation of the user exit ZXEDFU02
1
2
3
4
5
6
7
8
9
1
0
1
1
1
2
1
1.
2.
1 DATA : ls_nast
2
ls_ctrl_in
3
ls_ctrl_out
TYPE nast,
TYPE edidc,
TYPE edidc.
4
5
6
7
8
9
1
0
1
1
1
2
1
3
1
4
1
5
1
6
1
7
1
8
1
9
2
0
2
1
2
2
2
3
2
4
2
5
2
6
2
7
2
8
2
9
3
0
3
1
3
2
3
3
3
4
3
5
3
6
3
DATA
DATA
DATA
DATA
:
:
:
:
lt_idoc_data
TYPE TABLE OF edidd.
ls_idoc_header
TYPE edidc.
lt_comm_idoc_control TYPE TABLE OF edidc.
lt_created_comm_idocs TYPE TABLE OF edidc.
CLEAR ls_nast.
ls_nast-mandt = sy-mandt.
ls_nast-objky = lv_invoicekey. " @Change with Invoice number
clear ls_ctrl_in.
ls_ctrl_in-IDOCTP = 'INVOIC02'.
ls_ctrl_in-MESTYP = 'INVOIC'. " @ You can put your extension
CLEAR lt_idoc_data[].
CALL FUNCTION 'IDOC_OUTPUT_INVOIC'
EXPORTING
object
= ls_nast
control_record_in
= ls_ctrl_in
IMPORTING
control_record_out
= ls_ctrl_out
* OBJECT_TYPE
=
TABLES
int_edidd
= lt_idoc_data[]
EXCEPTIONS
error_message_received
=1
data_not_relevant_for_sending = 2
OTHERS
= 3.
CLEAR lt_comm_idoc_control[].
CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE'
EXPORTING
master_idoc_control
= ls_idoc_header
TABLES
communication_idoc_control
= lt_comm_idoc_control
master_idoc_data
= lt_idoc_data
EXCEPTIONS
error_in_idoc_control
= 01
error_writing_idoc_status
= 02
error_in_idoc_data
= 03
sending_logical_system_unknown = 04.
IF sy-subrc EQ 0.
CALL FUNCTION 'DB_COMMIT'.
COMMIT WORK.
ENDIF.
7
3
8
3
9
4
0
4
1
4
2
4
3
4
4
4
5
4
6
4
7
4
8
4
9