cancel
Showing results for 
Search instead for 
Did you mean: 

how to fetch line item text for a given purchase order number

Former Member
0 Kudos

Hello experts,

please let me know how to fetch the text from line item texts tab for the given PO.

points will be rewarded if helpful.

Thanks & regards,

Siddhartha Prakash.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

data: IT_TLINE4 LIKE TLINE OCCURS 0 WITH HEADER LINE,

V_INFO4(50).

concatenate it_OUT-ebeln it_OUT-ebelp into v_name1.

*endloop.

it_head-tdobject = 'EKPO'.

it_head-tdid = 'F01'.

it_head-tdspras = SY-LANGU.

IT_HEAD-TDNAME = V_NAME1.

APPEND IT_HEAD.

CALL FUNCTION 'TEXT_READ'

EXPORTING

I_HEADER = IT_HEAD

I_READONLY = 'X'

  • IMPORTING

  • E_HEADER =

TABLES

T_LINES = IT_TLINE4

EXCEPTIONS

NOTEDITED = 1

NOTFOUND = 2

ID = 3

OBJECT = 4

NAME = 5

LANGUAGE = 6

OTHERS = 7

.

IF SY-SUBRC = 0.

read table it_tline4.

v_info4 = it_tline4-tdline.

ENDIF.

If helpful give me the points.

Former Member
0 Kudos

thanks a lot.

u solved my probs.

Thanks & regards,

Siddhartha Prakash

Answers (2)

Answers (2)

Former Member
0 Kudos

Hey,

Do use the text type -->include text in the text elements that you are creating to print the smartform.

The values that needs to be passed to the text module are;

TEXT name

TEXT object

TEXT ID

Language.

Always check mark No error if no text exixts.

Now the question is where from you will get the above mentioned values.

No to the item texts in the purchase order, click on the detail icon, and now from the menu click on GOTO-->Header.

Cheers

former_member188005
Contributor
0 Kudos

Sid,

In Medruck SAP Script u have Text Element ITEM_TEXT and there by defualt the text gets picked from, PO.

If u want to display additional from that u have to write an external subroutine where in in the Sub routine use READ_TEXT function module and pass the TDOBJECT and TDID values and Pass back the text to SAP SCript from Subroutine.

Regards...