cancel
Showing results for 
Search instead for 
Did you mean: 

Production Order-Long Text

Former Member
0 Kudos

hi,

I want to pull the data from the long text field in production order.

Does someone know the table and field from which the data can be pulled?

thanks in advance

regards

Lyroj

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

To read the production order header text, refer to tables STXH & STXL or use FM - READ_TEXT.

If you want to read via tables then specify the below:

TDOBJECT = AUFK,

TDID = KOPF,

TDSPRAS = EN,

TDNAME = Client nos. + 12 digit order nos. (Eg: 123001000012345, where 123 is client nos. & the remaining are the order nos.)

To read via FM

CALL FUNCTION 'READ_TEXT'

EXPORTING

CLIENT = SY-MANDT

ID = 'KOPF'

LANGUAGE = 'EN'

NAME = Client nos. + 12 digit order nos.

OBJECT = 'AUFK'

  • ARCHIVE_HANDLE = 0

IMPORTING

HEADER = it_htext

TABLES

LINES = it_ltext

EXCEPTIONS

ID = 1

LANGUAGE = 2

NAME = 3

NOT_FOUND = 4

OBJECT = 5

REFERENCE_CHECK = 6

WRONG_ACCESS_TO_ARCHIVE = 7

OTHERS = 8.

Hope the above answers your query.

Regards,

Vivek

Former Member
0 Kudos

Thank you vivek.

regards

Lyroj

Former Member
0 Kudos

I have a question Vivek.

I want to create a query that reads data only from table CAUFV and then I want to add the Long text of the Production Order.

I created an additional field and wrote the FM you shared with us.

On the "EXPORTING" part, you wrote: NAME = Client nos. + 12 digit order nos

My client number is '010' but the Order number should change for each line in the query. How can I achieve this? Maybe through a concatenate of some sort?

Any help will be appreciated.

Former Member
0 Kudos

Hi Fernando,

Declare a variable for storing the value of NAME (eg: v_name) with the same details as for the field NAME

I presume your writing this in a infoset-query, so just write the below statement to read the value in your processing section just before the section where you call the FM.

CLEAR v_name.

CONCATENATE sy-mandt caufv-aufnr INTO v_name.

Now you can pass the variable to the FM.

Regards,

Vivek

Answers (0)