2022 Dec 05 10:33 AM
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.
2022 Dec 05 12:48 PM
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:
Best regards
Dominik Tylczynski