Application Development 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: 

display 'item text' and 'material PO text' in a purchase order ?

Former Member
0 Kudos

hello,

i am creating a purchase order and i have inputted the 'item text' and 'material PO text' in the ITEM TEXT of the ITEM DETAILS section. I have a smart forms where i am displaying the purchase order by displaying fields from various tables like ekko,ekpo,t024,eket etc ..

I want ti display the 'item text' and the 'material PO text' on the smartform but i cant find the table or the fields which keep these values(text) ??

help me on this one ? thanks for yur time...

1 ACCEPTED SOLUTION

former_member181962
Active Contributor
0 Kudos

Use the function module READ_TEXT to get the texts.

Pass the following values

Text object EKPO

Text Name <PONUMBER+ITEM NUMBER>

Text ID F01

Language EN

Regards,

Ravi

18 REPLIES 18

former_member181962
Active Contributor
0 Kudos

Use the function module READ_TEXT to get the texts.

Pass the following values

Text object EKPO

Text Name <PONUMBER+ITEM NUMBER>

Text ID F01

Language EN

Regards,

Ravi

abdul_hakim
Active Contributor
0 Kudos

hi dahar,

you need to call the function module READ_TEXT for reading your text.Check the table STXH for the parameters needs to be passed the FM...

Cheers,

Abdul

Reward Points for all useful anwers...

Former Member
0 Kudos

Hi,

Use the READ_TEXT function. In order find the parameter values for this, go to the text in the full screen mode in ME23n transaction.

In there, menu Go To--> Header and you can see all the parameters you will have to pass like TDOBJECT, TDID, TDNAME etc.

Regards,

Ravi

Note : Please mark the helpful answers

Former Member
0 Kudos

Hello Shehryar,

U need to use FM READ_TEXT with following para...

Item Text: ID: F01

Language : EN

Name: Concatenate Purchase order number & Item number

Object: EKPO

For Material Po text

Item Text: ID: F03

Language : EN

Name: Concatenate Purchase order number & Item number

Object: EKPO

0 Kudos

the function returns 'THEAD' as the associsated type ... how do i use it in my smartform ?h

0 Kudos

Hi,

This data can be passed to the SMART Form and the entire long text can be printed with your fetching it.

CREATE a TEXT ELEMENT of type INCLUDE TEXT and you can specify the TDNAME, TDID, and TDOBJECT with language details and SMART Forms will take care of fetching the long text and displaying the same.

Make sure this is a part of the MAIN window.

Regards,

Ravi

Note :Please mark the helpful answers and close the thread if the issue is resolved.

0 Kudos

can you or someone else please demonstrate how to call the read_text function , how to export the return parameter from it and how to use it in the include text for display?

0 Kudos

i want to display the item text and material po text , together

0 Kudos

Hi Shehryar,

I once you use this function module, you will get the text in an internal table and hence you cannot use include text option here.

CALL FUNCTION 'READ_TEXT'

EXPORTING OBJECT = I_HEADER-TDOBJECT

ID = I_HEADER-TDID

LANGUAGE = I_HEADER-TDSPRAS

NAME = I_HEADER-TDNAME

IMPORTING HEADER = E_HEADER

TABLES LINES = T_LINES

EXCEPTIONS ID = 1

OBJECT = 2

NAME = 3

LANGUAGE = 4

NOT_FOUND = 6

OTHERS = 8.

The t_lines will have the text in more than one lines.

YOu chave to use this internal table to print the text.

Regards,

ravi

0 Kudos

Have two text elements next to each other and display both the texts.

Regards,

Ravi

0 Kudos

i-header ?

0 Kudos

Hi Dahar,

just below the box where the text is maintained in ME21N, u can select sapscript editor, ther goto>header> u ll get all the parameters ( text name, id, object, lang) that u need to give in the Include in smartforms..for items the text name will be variable n depends on items, so u take it in a variable before passing it in the include...

also the text id for different texts will be different ,...so u need to put these 2 texts one under the other in different text includes...

0 Kudos

got it. but how do i apply the character format ony include ?

0 Kudos

secondly isnt this include text thing like a hardcode way. i mean what if i dont give the 'item text' while creating a purchase order. It will stop me while previewin it ...

0 Kudos

wat do u mean by 'It will stop me while previewin it ... '.. u just check the check box : no errors if no text present',.. it will work fine.. n ya u cannot apply character format in this but u can apply paragraph format.. in case u need to apply character formatting, then use the FM 'READ_TEXT' in the program lines, retreive the texts in an internal table as suggested by ppl and use it along with ur formatting..

Regards

0 Kudos

yeah it works .. can you take sum time and write me how to use the function module i.e what to pass , how to pass, what will the FM return, how will the FM return and what will be types of the parameters passed and the object returned. ?

thanks..

0 Kudos

c the example below:

PERFORM read_text USING g_transp 'Z010'.

FORM read_text USING l_text l_id.

DATA : lt_text TYPE TABLE OF tline WITH HEADER LINE.

DATA : l_name LIKE thead-tdname.

CLEAR l_name.

l_name = g_delivery.

CLEAR lt_text.

REFRESH lt_text.

CALL FUNCTION 'READ_TEXT'

EXPORTING

  • CLIENT = SY-MANDT

id = l_id

language = sy-langu

name = l_name

object = 'VBBK'

TABLES

lines = lt_text

EXCEPTIONS

id = 1

language = 2

name = 3

not_found = 4

object = 5

reference_check = 6

wrong_access_to_archive = 7

OTHERS = 8

.

IF sy-subrc <> 0.

  • MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

  • WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

CLEAR l_text.

LOOP AT lt_text.

CONCATENATE l_text lt_text-tdline INTO l_text.

ENDLOOP.

ENDFORM. "read_text

Former Member
0 Kudos

Hi dahar,

u can make use of the include functionality in smartforms to print the texts.. create a text window where u want to write ur text..there in type give>Include Text> there mention the text name, id, object and language ..these values u can get by going into the sapscript editor of the text>goto>header..

hope it helps,

Regards,

Bikash