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: 

Not able to pick PO text via READ_TEXT when PO is created by copy.

Former Member
0 Kudos
1,013

Hi,

I am not able to pick PO texts from READ_TEXT function module for PO's which are created via Copy of another PO as entries for that PO texts are not found in STXH table.However after creating PO if I do some modification in any text and save PO again then READ_TEXT is able to pick that text.

Please help.

Thanks.

1 ACCEPTED SOLUTION

Former Member
0 Kudos
386

Hi Vedant,

Strange,I have tested your scenario, but here system stores Long Text in STXH even if you create a PO copying another PO.

I will suggest you to raise message to SAP, coz it looks like an application error.

Thanks & Regards,

Faheem.

8 REPLIES 8

Former Member
0 Kudos
386

Hi Experts,

Please help and guide some solution for this problem.

Thanks,

Former Member
0 Kudos
386

Did you check for the copied PO's whether the ID , OBJECT and NAME are maintained or not for respective header/item text. I assume it's the reason you don't find entries in STXH table.

0 Kudos
386

Hi Manas,

Yes, I have checked ID,NAME,SPRAS,OBJECT etc. are maintained at item/header level in new PO created by copying.If I do some modification in any PO text at item level and save it again then READ_TEXT shows that text value and it get maintained in STXH also.

Thanks.

0 Kudos
386

I assume you need to change the item/header text after copying the PO to be updated in STXH table.

0 Kudos
386

PLease try the sample code as shown below..

data: lc_ebeln type ekpo-ebeln,

lc_ebelp type ekpo-ebelp,

lc_text type thead-tdname,

lc_id type thead-tdid,

lc_object type thead-tdobject.

data: it_tline type table of tline,

wa_tline type tline.

*wa_ekpo type ekpo.

concatenate wa_ekpo-ebeln wa_ekpo-ebelp into lc_text.

lc_id = 'F03'.

lc_object = 'EKPO'.

call function 'READ_TEXT'

exporting

client = sy-mandt

id = lc_id

language = 'E'

name = lc_text

object = lc_object

  • IMPORTING

  • HEADER =

tables

lines = it_tline

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.

Regards,

*******.

0 Kudos
386

>

> PLease try the sample code as shown below..

>

> data: lc_ebeln type ekpo-ebeln,

> lc_ebelp type ekpo-ebelp,

> lc_text type thead-tdname,

> lc_id type thead-tdid,

> lc_object type thead-tdobject.

>

> data: it_tline type table of tline,

> wa_tline type tline.

> *wa_ekpo type ekpo.

>

> concatenate wa_ekpo-ebeln wa_ekpo-ebelp into lc_text.

>

>

> lc_id = 'F03'.

> lc_object = 'EKPO'.

> call function 'READ_TEXT'

> exporting

> client = sy-mandt

> id = lc_id

> language = 'E'

> name = lc_text

> object = lc_object

> * IMPORTING

> * HEADER =

> tables

> lines = it_tline

> 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.

>

> Regards,

> *******.

Did you get a chance to see what the OP is asking about?

Former Member
0 Kudos
387

Hi Vedant,

Strange,I have tested your scenario, but here system stores Long Text in STXH even if you create a PO copying another PO.

I will suggest you to raise message to SAP, coz it looks like an application error.

Thanks & Regards,

Faheem.

Former Member
0 Kudos
386

Hi Vedant,

Please discuss with the functional analyst, since it could be that the configuration in your system is not setup as such to copy texts from one PO to the other (Define copying rules for header /item texts in the IMG).

Kind regards,

Robert