cancel
Showing results for 
Search instead for 
Did you mean: 

re: po text

Former Member
0 Kudos

hi 2 all,

iam getting po print by using z script in that i used subroutine pool for getting po text by read_text and passed the values but unable to get the po text......can anybody guide me.............

Moderator message: please choose more descriptive subject lines for your posts.

Moderator message: please do not use SMS speak.

Edited by: Thomas Zloch on May 23, 2011 5:02 PM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Check the text ID, text Object and text Name .

lv_name = ekko-ebeln.

CALL FUNCTION 'READ_TEXT'

EXPORTING

CLIENT = SY-MANDT

id = 'F01'

language = sy-langu

name = lv_name

object = 'EKKO'

  • ARCHIVE_HANDLE = 0

  • LOCAL_CAT = ' '

  • IMPORTING

  • HEADER =

tables

lines = t_lines

EXCEPTIONS

id = 1

language = 2

name = 3

not_found = 4

object = 5

reference_check = 6

wrong_access_to_archive = 7

OTHERS .

Regards

Jshree

Answers (2)

Answers (2)

Former Member
0 Kudos

thanks 2 alll. problem is solved....

Former Member
0 Kudos

Any specific reason for using read text in subroutine pool instead of Include text in script ?

Former Member
0 Kudos

hi dude,

actually while printing po the user manually enters text in me22n it should replicate in print ,,,,, bt it is not hapening........wt to do for this...........plz guide me.....

Former Member
0 Kudos

Hi,

Please check what values are you passing to read text for name and ID.

Also, what is the value of sy-subrc you get after read-text?.

Please provide a snippet of your code,if problem still not solved.

Former Member
0 Kudos

k i will send...........

Former Member
0 Kudos

form get_text

TABLES: itab STRUCTURE itcsy

otab STRUCTURE itcsy.

DATA: BEGIN OF WA_STXH OCCURS 10.

INCLUDE STRUCTURE STXH.

DATA: END OF WA_STXH.

data:

BEGIN OF header OCCURS 0,

ld_txt1(163),

ld_txt2(163),

ld_txt3(163),

END OF header.

DATA: li_lines LIKE STANDARD TABLE OF tline WITH HEADER LINE,

ID like THEAD-TDID,

TNAME LIKE THEAD-TDNAME,

TDOBJECT like THEAD-TDOBJECT.

data: w_ebeln type ebeln.

data: BEGIN OF t_lines occurs 10.

INCLUDE STRUCTURE tline.

DATA END OF t_lines.

    • DATA: HTEXT TYPE THEAD.

  • DATA: PONUMBER TYPE EKKO-EBELN.

CLEAR: w_ebeln, w_text.

READ TABLE itab WITH KEY name = 'EKKO-EBELN'.

WRITE itab-value TO w_ebeln.

**added by prashant on 20090409************

data: w_char type i.

w_char = strlen( w_ebeln ).

case w_char.

when '1'.

CONCATENATE '000000000' w_ebeln into w_ebeln.

when '2'.

CONCATENATE '00000000' w_ebeln into w_ebeln.

when '3'.

CONCATENATE '0000000' w_ebeln into w_ebeln.

when '4'.

CONCATENATE '000000' w_ebeln into w_ebeln.

when '5'.

CONCATENATE '00000' w_ebeln into w_ebeln.

when '6'.

CONCATENATE '0000' w_ebeln into w_ebeln.

when '7'.

CONCATENATE '000' w_ebeln into w_ebeln.

when '8'.

CONCATENATE '00' w_ebeln into w_ebeln.

when '9'.

CONCATENATE '0' w_ebeln into w_ebeln.

when OTHERS.

ENDCASE.

SELECT single * FROM stxh INTO wa_stxh WHERE tdobject EQ 'EKKO' and tdid = 'F01' AND tdname = W_EBELN.

IF sy-subrc EQ 0.

  • LOOP AT WA_STXH.

CALL FUNCTION 'READ_TEXT'

EXPORTING

id = 'F01'

language = 'E'

name = 'W_EBELN'

object = 'EKKO'

  • IMPORTING

  • HEADER = HTEXT

TABLES

lines = t_lines

EXCEPTIONS

id = 1

language = 2

name = 3

not_found = 4

object = 5

reference_check = 6

wrong_access_to_archive = 7

OTHERS = 8.

clear otab.

refresh otab.

loop at t_lines.

case sy-tabix.

when '1'.

itab-name = 'T_TEXT1'.

when '2'.

itab-name = 'T_TEXT2'.

when '3'.

otab-name = 'T_TEXT3'.

when '4'.

otab-name = 'T_TEXT4'.

when '5'.

otab-name = 'T_TEXT5'.

when '6'.

otab-name = 'T_TEXT6'.

when '7'.

otab-name = 'T_TEXT7'.

when '8'.

otab-name = 'T_TEXT8'.

when others.

endcase.

  • otab-value = T_LINES-TDLINE.

READ TABLE otab WITH KEY name = 'T_TEXT1'.

otab-value = wa_STXH-TDNAME.

MODIFY otab INDEX syst-tabix.

  • modify otab INDEX SYST-TABIX.

APPEND otab.

clear t_lines.

clear otab.

endloop.

ENDIF.

endform. "get text

Former Member
0 Kudos

how to pass all d values in script ................

Former Member
0 Kudos

how to pass all the parameters in script.

Former Member
0 Kudos

Hi,

Please make sure the type of variable w_ebeln being passed to read_text parameter NAME is compatible.

Also could you please tell what is teh sy-subrc value after this FM?

Also are you reading header text or item text?

Former Member
0 Kudos

sy-subrc = 4.

Former Member
0 Kudos

my requirement is while po print user manually enters some text in me22n (text). ..... it shd replicate in po print.......i

Former Member
0 Kudos

Hi,

i believe you are passing an incorrect value in NAME.Goto SE37 and execute this FM independently with the value you get in W_EBELN.Also,if you are reading item level text of PO,then you ene dto pass the concatenated value of item no+PO No in NAME.

Former Member
0 Kudos

fm is working fine.

Former Member
0 Kudos

fm is working fine .........bt no result in po......

Former Member
0 Kudos

Hi,

I think your getting short text in t_lines-TDLINE. then why your passing 'wa_STXH-TDNAME'.

'wa_STXH-TDNAME' please check what your getting the field. Please change your codding like this..

read table out_par with key name = ' ' " 'T_TEXT1'.

out_par- value = field value " Pass the field value what your getting t_lines-TDLINE.

*here your passing 'wa_STXH-TDNAME' actually put break-point over here. what value your getting here.

modify out_par.

endform.

Regards,

Dhina..

ThomasZloch
Active Contributor
0 Kudos

Please do not use SMS speak in these forums!

Thomas