Idoc Extension & Processing
Idoc Extension & Processing
Idoc Extension & Processing
End
...
typedef struct z2incodx000
{
} z2incodx000
SAP Labs, Inc. 1999 EDI01 (Thomas Becker) / 21
.Developing IDoc Interfaces
=Definitions
=How to Extend ?
=Exercises to Extend
IDoc Processing
Agenda
SAP Labs, Inc. 1999 EDI01 (Thomas Becker) / 22
Exercises to Extend IDoc Processing
SAP System R/3 SAP System R/3
IDoc
Orders Light
Orders
Customer Vendor
SAP Labs, Inc. 1999 EDI01 (Thomas Becker) / 23
Exercise 1: Start-Up
C Set-up a partner profile to send purchase orders to vendor IDOC-LI-nn. The message
control settings are EF / NEU / LF, the logical message is ORDLGT with process code
ME21-BC621-nn.
E This set-up was already done!
C Create a purchase order via transaction ME21, and check with one of the monitor
programs that the IDoc exists (note the IDocs number).
C Set-up a partner profile to receive customer orders from customer IDOC-KU-nn. The
logical message is ORDLGT with process code VA01-BC621-nn.
E This set-up was already done!
C With the test tool, transaction WE19, flip-around the IDoc created in step 2. The IDoc will
serve as the customer order. Because you have changed sites, you have to change the
control record, so it will match with your set-up in step 3.
- Due to those exercises set-up, the inbound processing will fail, and the IDoc reaches
status 51: Document type NB unknown.
SAP Labs, Inc. 1999 EDI01 (Thomas Becker) / 24
Exercise 2: Extend Inbound (Cross Reference)
C You plan to overcome the error from exercise 1 by implementing a cross-reference from
purchasing document type NB to sales document type TA.
Hence you implement a customer-exit for the inbound processing in project
management.
C Create a project
C Select SAP enhancements; search with development class IDOCTRAINING
C Implement the exit in enhancement components
C Activate your project
C Test your exit by reprocessing the inbound IDoc from exercise 1 with the test tool,
transaction WE19.
- The IDoc now reaches status 53: Sales document posted.
SAP Labs, Inc. 1999 EDI01 (Thomas Becker) / 25
Exercise 3: Extend Outbound (Fill Field)
C The IDoc type ORDLGT01 has the field NAME (ekko-ernam in purchasing) in segment
E1HEAD, anyway the field is not populated by outbound processing.
Hence you implement a customer-exit for the outbound processing in project
management.
C Create a project
(With exercise 2 the project already exists!)
C Select SAP enhancements; search with development class IDOCTRAINING
(With exercise 2 the enhancement is already selected!)
C Implement the exit in enhancement components
C Activate your project
C Test your exit by creating a new purchase order via transaction ME21, and check with
one of the monitor programs that the IDoc exists, and the field NAME is populated.
SAP Labs, Inc. 1999 EDI01 (Thomas Becker) / 26
Exercise 4: Extend IDoc Type
C You are asked to transmit Terms of Delivery with your orders documents. Neither IDoc
type ORDLGT01 nor one of its segments has fields for Terms of Delivery.
C Extend the IDoc type ORDLGT01 with a 3-digit field for the code and a 28-digit field for
the description of Terms of Delivery (dataelements INCO1 and INCO2).
C Create a customer segment Z1INCOnn
C Create an extension ZEXTENnn by extending IDoc type ORDLGT01
C Assign logical message ORDLGT to basis type ORDLGT01 and extension ZEXTENnn.
- The processing of that extension will be implemented in the following exercises number 5
and 6.
SAP Labs, Inc. 1999 EDI01 (Thomas Becker) / 27
Exercise 5: Extend Outbound (Fill Customer Segment)
C You are asked to send Terms of Delivery with your orders documents. The IDoc type
ORDLGT01 was already extended in exercise 4. Now you have to implement the
outbound processing.
C Create a project
(With exercise 2 the project already exists!)
C Select SAP enhancements; search with development class IDOCTRAINING
(With exercise 2 the enhancement is already selected!)
C Implement the exit in enhancement components
C Activate your project
C Because of the IDoc type is maintained in the outbound partner profile, you have to
adjust the partner profile for vendor IDOC-LI-nn.
C Test your exit by creating a new purchase order via transaction ME21, and check with
one of the monitor programs that the IDoc exists, and the segment Z1INCOnn was
populated (note the IDocs number).
SAP Labs, Inc. 1999 EDI01 (Thomas Becker) / 28
Exercise 6: Extend Inbound (Process Customer Segment)
C You are asked to receive Terms of Delivery with your orders documents. The IDoc type
ORDLGT01 was already extended in exercise 4. Now you have to implement the
inbound processing.
C Create a project
(With exercise 2 the project already exists!)
C Select SAP enhancements; search with development class IDOCTRAINING
(With exercise 2 the enhancement is already selected!)
C Implement the exit in enhancement components
C Activate your project
C Test your exit by reprocessing the inbound IDoc from exercise 5 with the test tool,
transaction WE19.
- With exercise 2 the IDoc reached status 53: Sales document posted.
With the changes of this exercise also the Terms of Delivery in the sales document are
updated.