In Release 4.6, the IDoc base does not use the Workflow container with type C to save links but the system was changed to the generic object services.
This note describes in which relations the objects in the IDoc processing are saved.
This know-how is a prerequisite in order to effectively find a special object whose link was saved during the IDoc processing.
All relationships types defined in the SAP System can be found in table VRBRELTYP.
From the IDoc base, the following essential relationships have been defined:
IDC0 - Application document and outbound IDoc are related
IDC1 - Inbound IDoc and application document are related
IDC3 - Inbound IDoc and its original IDoc are related (while editing)
IDC4 - Inbound IDoc and outbound IDoc of the sending system are related (for R/3 - R/3 link)
IDC7 - Outbound IDoc and its original IDoc are related (while editing)
IDC8 - Inbound IDoc and transaction ID (of tRFC) are related
IDCA - Outbound IDoc and transaction ID (of tRFC) are related
In order to read relationships use SREL_GET_NEXT_RELATIONS. Generally, you need to transfer the BOR object (triple: object key, object type an logical system) for which you want to read the relationships to this function module.
In order to find a special link you should know in which relationship the link was saved and whether the BOR object was saved into role A or into role B.
For individual relationship types you can find this information also in table VRBRELTYP.
For the relationship types described above, the object named first is always in role A and the second object is always in role B.
Example: Searching the outbound IDoc of the sending system for an inbound IDoc which was generated via an R/3 - R/3 communication. The example source code represents the correction.
The internal table will then contain an entry from which you can read the following information:
The fields OBJKEY_A, OBJTYPE_A and LOGSYS_A contain all transferred values of the object for whose link you are searching - this object occurs in role A.
The field RELTYPE contains the value 'IDC4' - since we only searched for this.
The fields OBJKEY_B, OBJTYPE_B and LOGSYS_B contain all values of the searched linked object - this searched object occurs in role B.
That is: the field OBJKEY_B contains the IDoc number of the sending system, the field OBJTYPE_B should contain the value 'IDOC' and the field LOGSYS_B should contain the sending logical system.
* find the outbound-IDoc of the sending system for an inbound-IDoc,
* which was created during R/3 - R/3 - communication
data: object1 like borident.
data: begin of links occurs 0.
include structure relgraphlk.
data: end of links.
object1-objkey = '0000000000004711'."IDOC-Nummer of the inbound-IDoc
object1-objtype = 'IDOC'.
object1-logsys = 'TTTCLNT999'. " << own logical system
* in table links we can find one entry with following informations:
* in fields OBJKEY_A, OBJTYPE_A und LOGSYS_A are all values of
* object1 - to this object we looked for the special link
* object1 appears in role A
* in field RELTYPE is the value 'IDC4' - we looked only for this kind
* in fields OBJKEY_B, OBJTYPE_B and LOGSYS_B are all values of the
* linked object - this linked object appears in role B
* this means: in field OBJKEY_B is the IDoc-number of the sending
* system, in field OBJTYPE_B should be 'IDOC' and in LOGSYS_B is the
* name of the sending logical system.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG. SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG. Every effort is made to ensure content integrity. Use information on this site at your own risk.