Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How do I check the impact of automatically adopting text in Purchase Orders?

walkerist
Participant
0 Kudos
196

Hi, so I have an ongoing issue that the Info record PO text doesn't get saved in STXH/STXL unless I click the Adopt text button below. I want upon order creation that the text will be automatically adopted but I'm not sure with the impact.

1 REPLY 1

DominikTylczyn
Active Contributor
154

Hello walkerist

Long texts are always stored in the STXH/STXL tables and they can always be read with the READ_TEXT function. The issue you are facing is that your "info record PO text" is not stored in a PO item. It is only referenced from the corresponding info record. In other words, it is not adopted in the purchase order. Until it is adopted, the "info record PO text" is stored in the info record, not in the purchase order item. It is only referenced and visible in the purchase order item, but the text itself sits with the info record. In fact you have only one text here.

Only if the text is adopted, the system creates a new copy of the text and saves it with the purchase order item. Now, you have two separate texts. The info record text and purchase item text are from now on independent. Any change to the info record text is not propagated to the PO item.

You don't really need to change purchasing text's configuration to "automatically adopted" option. Instead you can read them from corresponding objects e.g. from info records. Examine the form routine PREPARE_ITEM_TEXT in the MEDRUCK function module. The routine reads purchasing texts for SAP standard PO printouts. You can easily mimic that logic in your custom developments.

Naturally, "automatically adopted" is also an option, but be aware of the following side effects:

  1. You will be storing more texts in the database than it is necessary as each purchasing text will be copied from e.g. an info record to a purchase order even if the text is not changed in the PO.
  2. If the info record text is changed and the text is adopted in the PO item, the change will not be visible in the PO. As described above, once a text is adopted, there are two independent copies of the text.

Best regards

Dominik Tylczynski