You can include long text in your script using any of the following three methods:
- Use the Add Long Text feature. This method supports If conditions, loops, and downloading long text.Notes: - To use the Add Long Text feature, Automate Function Module 20.3 must be installed on the SAP system. - Text added using the Add Long Text command will overwrite any existing long text that was previously recorded. - The Add Long Text feature does not support create t-codes such as MM01 and VA01.
- Batch Input mode and Non-Batch Input mode and use the text editor. Use this method if you are including If conditions or loops, or if other recording methods have not worked. To use the text editor, you must split the long text into lines that are no more than 72 characters long.
- Non-Batch Input mode with SAP controls and Standard mode and use the rich text control. This method does not support If conditions or loops.
If a long text box does not contain SAP field properties, it may not be able to be recorded.
Add the Long Text feature
To use the Add Long Text feature, Automate Function Module 20.3 must be installed on the SAP system.
The following t-codes are supported:
- AS02, AS03
- CV02N, CV03N, CT04
- FB02, FB03
- FD02, FD03
- FK02, FK03
- IE02, IE03
- IL02, IL03
- IP02, IP03, IP05
- IW22, IW23, IW32, IW33
- KS02, KS03
- ME12, ME13, ME22N, ME23N, ME32K, ME33K ME52N, ME53N
- MK02, MK03
- MM02, MM03, MM42, MM43
- SO10
- VA02, VA03, VA12, VA22, VA32, VA42
- VD02,VD03
- VF02, VF03
- XD02, XD03
- XK02, XK03
For t-code SO10, use RFM /WINSHTLQ/TRN_CREATE_TEXT to upload long text - with WFM 20.3 (via the Direct module).
If you do not have authorization for the T002 t-code, a "Not authorized" error will appear in the long text log.
- On the Map tab, click Add Long Text.
- Check the boxes for the long text fields you want to add, then click OK.
Studio Transaction adds the fields to the Mapper, below all the other fields. Studio also adds a long text log field where any issues with the added long text will be displayed.
- Map the new fields to the data file.Note: Make sure all identifier fields map to the same column in the data file or have the same fixed value, so that all the long text is posted to the correct record in SAP. If you click Auto Map, you may need to manually map the identifier fields.
- Click the Run tab, enter the long text and other data, and then run the script.
Batch Input mode and Non-Batch Input mode
You can use this method to upload line-item texts.
- Click the field that will contain the long text, and then click the Editor button in the SAP console.
- Click GoTo, and then click Change Editor.
- In the SAP Editor, the screen is divided into separate lines, and each line is limited to 72 characters. Each line is already assigned a field name, which Transaction captures and stores in the Transaction script.
- Split your long text into lines of the specified length.
- Record a line for each line of text that will be posted when the script is run.
Next, map the long text fields.
Non-Batch Input mode with SAP controls and Standard mode
When you record long text in Non-Batch Input mode with SAP controls or Standard mode, you can enter the text directly into the SAP field. Entering the text is like typing in Notepad. SAP processes the text, converts it, and assigns it to an SAP field. Transaction records this as an additional field and displays it in the Mapper.
Non-Batch Input mode with SAP controls and Standard mode are the preferred modes for recording long text, but they cannot be used for line item texts. To record line item texts or to update long text (adding a disclaimer to an existing materials description, for example), use Batch Input mode as described above.