Easily Automate Text Block Creation in M3
Nov 25 2014
Here’s a useful tip from one of our Business Consultants, Joseph Konka. If you need to automate the creation of text blocks in M3, API CRS980MI makes the process easy. This article shows an example of how to generate a Text Block and assign it to an item, using the Item Master, MITMAS…
Step 1.
All text requires a unique identifier that will be assigned to both the text block and the related M3 transaction or master data. The first step then is to retrieve a new Text ID from CRS980MI/RtvNewTextID.
Note: Its important to use the correct text header table, please refer to the end of this article for a general guide to selecting the right text header-table.
Figure 1. CRS980MI/RtvNewTextID – INPUT
Figure 2. CRS980MI/RtvNewTextID – OUTPUT
Step 2.
Next, assign the new Text ID to the MITMAS table row based on the primary key. The view for the primary key can be found in MDP by accessing the database table and retrieving the index with a unique key.
Step 3.
Text Block headers and lines can now be generated in the text file. Generate the text header via AddTxtBlockHead:
Step 4.
Generate the text lines via AddTxtBlockLine:
Step 5.
The item Y10032 now shows text under the selected Text Block:
Figure 3: MMS001 Text Block Now Created
Relationship Diagram
Note: Column KV01 is always Company Number (CONO)
Using the Correct Text Header Table
Text block generation requires that the correct text header table is identified. In the MITMAS example we are using in this blog, that would be the MSYTXH text header table (shown red in the guide below.)
General Guide to Text Header Tables:
Text Header | M3 Area/functions |
CSYTXH | Purchase Order confirmations – PPS2xx |
FSYTXH | Finance – APSxxx, ARSxxx, CRS6xx, FASxxx |
ISYTXH | CO Pricelist report – OIS538 |
MSDTXH | MSDS – MSSxxx |
MSYTXH | ECSxxx, MMSxxx, MOSxxx, MWSxxx, PDSxxx, PPSxxx |
OSYTXH | COSxxx, JTSxxx, OISxxx, POSxxx, SASxxx, SOSxxx |
PSYTXH | HRSxxx, PRSxxx, TESxxx |
SSYTXH | STSxxx |
Note: This table is a general guide to selecting the right text header, but there are always exceptions to the rule.