Application Development and Automation 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: 
Read only

Free Text in Sales Order

Former Member
0 Likes
2,492

Hi ,

How can we fetch the free text for a Sales Order .

Any inputs on the same would be very helpful.

Thanks

5 REPLIES 5
Read only

former_member776318
Participant
0 Likes
1,358

Hi,

It is just like fetching any other long text.

You need to use the function module READ_TEXT.

Pass the following parameters to it:

1. Text Name

2. Language

3. Text ID

4. Text Object

You can get the values of these parameter from sales order itself.

Go to Sales order (VA03). Enter a sales order & go inside it.

Go to item level & select the tab 'Texts'

In the left hand side, there will be a tree control containing text types.

Select a text type which contains any text.

Then click the lens button at the bottom (in the toolbar).

The text will appear in SAP Script Editor.

Then from the menu, select GOTO -> HEADER.

A popup will appear with the parameter values.

Pass these parameter values to the FM READ_TEXT & it will return you the long text.

Hope that helps.

Thanks,

Saurabh

Read only

0 Likes
1,358

Hi Saurabh ,

Thanks for the inputs . But , I am a bit confused over here . In the text tab on Left hand side .. there is whole list of Texts like Material Sales text , Item Note etc., .. of all these which one is the Free Text for a Sales Order .

Another point : Should it not be that the Free Text for the sales Order should be at Header level while the text's we are viewing are at item level .

Thanks

Read only

0 Likes
1,358

Hi there,

alle texts are free texts, just have the functional guy point out to you which text you need. As for the header text: go to the sales order header. You will find the headwer texts there.

Roy

Read only

Former Member
0 Likes
1,358

Hi ,

Please check the below link to get the answer for your question.

[http://www.sap-img.com/abap/use-fm--read-text-to-read-the-various-text.htm]

Read only

Former Member
0 Likes
1,358

Use function module READ_TEXT. The appropriate values to fill you van find in table STXH.

Sales order header is object VBBK, item is VBBP.

Example

CALL FUNCTION 'READ_TEXT'

EXPORTING

id = text id

language = sy-langu

name = sales order number

object = 'VBBK'

TABLES

lines = tb_text

EXCEPTIONS

id = 1

language = 2

name = 3

not_found = 4

object = 5

reference_check = 6

wrong_access_to_archive = 7

OTHERS = 8.