2011 Jan 11 9:05 AM
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.
2011 Jan 12 8:55 AM
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.
2011 Jan 12 8:12 AM
Hi Experts,
Please help and guide some solution for this problem.
Thanks,
2011 Jan 12 8:28 AM
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.
2011 Jan 12 11:07 AM
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.
2011 Jan 12 11:23 AM
I assume you need to change the item/header text after copying the PO to be updated in STXH table.
2011 Jan 12 11:49 AM
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,
*******.
2011 Jan 12 11:55 AM
>
> 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?
2011 Jan 12 8:55 AM
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.
2011 Jan 12 7:10 PM
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