PU12 Interface for (PA-PA) with change validations
This interface example covers behavior of the PU12 tool while inserting a record/modifying a Record with change validations.
Please Note: Steps for implementing Interface format (YIN6) and File layout (YIN6_OUT) are same as explained in http://scn.sap.com/docs/DOC-47601 except change validation steps.
Change Validation Steps:
- Maintain change validation for interface ‘YIN6’ using transaction code PU12 as shown below:
Select Change validation button:
- Select the objects for which change validation needs to be implemented as shown below using create button. Interface Toolbox will look for the changes only on the fields specified here and will only export the whole record.
- Delete the fields for which single field validation is not required. Select the fields by double clicking and click the delete button to remove them as shown below
Icons available for change validation are listed below:
- Single Field Validation : This option can be applied at infotype or table level. The data that is unchanged is replaced with ‘#’ signs and the changed data is replaced with new values.
- Delimited : This option will allow specifying if the data is still valid for the current period or not. Interface toolbox will put ‘<” sign for the invalid data for current period.
- Key fields : Here we can define a composite key by selecting multiple or single fields of infotypes, which will make it a key and the key fields will be only exported once. This will help us in case we want to export the data for some specific key values just once.
- Relationships : If we want to export some fields depending on if we are exporting some other fields then we define relationships, for example click on NACHN and then click on then select VORNA, and do same for VORNA then click and select NACHN. This will ensure that whenever NACHN is exported then VORNA will be forcefully exported and when VORNA is exported then NACHN will be forcefully exported.
- User Defined Change Validation : Here we can put a user exit and do some logic before we approve the change validation, this subroutine will contain only one parameter which will be used by Interface Toolbox to determine if change validation should be enabled or disabled. A return value of ‘1’ will make it active and ‘0’ will make is disabled and no change validation will be carried out. Here old data for an infotype is available in OLD_XXXX table and new changed data will be available in NEW_XXXX table and we can put a custom logic to decide on change validation.
- For this document we are considering only single field validation option. We have implemented this validation for following fields:
- Implementing single field validation for P0007 and P0008
- Save the change validation and go back to main PU12 screen.
- The file layout for this document is as shown below. The output file structure has 17 fields including change validation fields:
Test PU12 Interface for (PA-PA) with change validations
Execution steps for inserting a record in infotype:
1. Insert a record in infotype IT0006 and Subtype 2 as shown below using PA30.
2. Execute transaction PU12. In the Export tab, select Interface format and execute it.
3. Provide the selection screen data as shown below using variant ‘CHANGE_VALID’:
4. Log Output:
5. Download from TemSe, i.e. Temporary Sequential File as shown below. Provide the file path on presentation server as shown below.
Execution steps for modifying a record in infotype:
3. Execute transaction PU12. In the Export tab, select Interface format and execute it.
4. Provide the selection screen data as shown below using variant ‘CHANGE_VALID’:
5. Log Output: Fields which are changed have new values and unchanged fields are replaced with hashes as shown below.
6. Download from TemSe, i.e. Temporary Sequential File as shown below. Provide the file path on presentation server as shown below.
7. File downloaded: