Hey Ram,
You were right - It was the values of the external codes that was not matching. Thank you for pointing it out...
After trying different scenarios I have now understood how the system uses the "values".
In case somebody else has had the same issue hopefully this explanation can help.
First a step by step is given. Then an explanation of what the system does is given. Ram please free to add/correct if needed....
Scenario: Automatically create a Purchase agreement using a sales agreement based on an IC relationship (in my case USMF is the selling company and DEMF is the buying company).
Step-by-step:
1) If you want to use external codes for the agreement classificaiton, then select the "External" and the code you want to use when setting up the IC PO value mapping in IC relationship setup form - for this example - let’s call this code "IC".
2) Create the sales agreement in USMF for the IC customer and select a sales agreement classification type that you created - let’s call it "SAC IC".
3) In USMF, navigate to Sales & Marketing -> setup -> sales agreements -> sales agreement classifications and select SAC IC and press "external codes" button at the top. In this window select the code IC, click the general tab and add a the following value in the value-pane at the bottom: "IC value".
NOTE: I have experienced that the "value-pane" sometimes is visible when on the overview tab . Other times you have to navigate to the general tab for it to be visible.
3) Navigate to DEMF -> Procurement and sourcing -> setup -> purchase agreement -> purchase agreement classification and select the agreement classification type that you would like the automatically purchase agreement to be created in - lets call it "General purchases".
4) When selected click external codes and you will notice that the code "IC" is also available here because the external codes table is global.. Select the code "IC" and click on the general tab and add t he same value called as added earlier under the USMF sales agreement section: "IC value".
5) Close all the forms and navigate back to USMF -> Common -> Sales Orders -> sales agreements. Find the sales agreement that you want to use to create the IC purchase agreement automatically and click the "Generate purchase agreement" button in the intercompany section of the action pane.
6) Your purchase agreement has been created. To check it navigate to DEMF -> Procurement and sourcing -> purchase orders -> purchase agreements.
What the system does:
1) According to your IC value mapping setting and your selection of the external code, the system finds the external code “IC” in USMF and finds the value assigned to it: “IC value”.
NOTE: Each agreement classification can give its own value to the external codes. And it is the "values" that link the sales agreement classifications to the purchase agreement classifications and vica versa.
2) Then it finds that same value for the same external code in DEMF and creates the purchase agreement using the classification under which the system found the IC value.