2006 Sep 28 9:24 AM
I have few queries regarding texts in a document.
1. How do i identify the id for a text of a line item in any PO document?
2. Secondly a pgm is using read_text to get this text. before which 'stxh' is queried. But when i debugged i found that for a particular document there is no entry in this table though there is a text in the document and hence doesnot perform a read_text. The text is auto generated through info records. How to retrieve this text?
Ans wil be appreciated and rewarded
2006 Sep 28 10:03 AM
Hi Kantheri,
Use tcode se75. Double click on EKKO or EKPO. There you can find the id of the text.
Regards
Arun
2006 Sep 28 9:28 AM
To identify text id, double click on the text editor area.
In that click on Goto--> Header
*Please award points if it helps
2006 Sep 28 9:31 AM
Try using the function module READ_TEXT with the following keys:
OBJECT: EKPO
ID: F01
LANGUAGE: sy-langu
NAME: PO number + PO item number
Stored texts can be located in tables: STXH, STXL
Best regards
Tamá
2006 Sep 28 9:34 AM
In your PO, go to Item > Texts > Overview. Now select the text that you want the ID for and click 'Long text'. In the long text screen, you should be able to see the Id of the object in Goto > Header. The combination of the Language, textname, ID and object is used for selection from STXH.
There should be a corresponding entry in STXH for each text created - maybe the program reads it wrong?
Hope this helps.
Sudha
2006 Sep 28 9:35 AM
Hi,
text are stored in table <b>stxh</b>,<b>stxl</b> .
if you want the Texts in PO, GOTO --> HEADER , here you will find the header text, double click that Text, you will find the attributes, or there would be a option in the menu to find the options for the texts, you will find the ID etc ...
GOTO --> ITEM --> text for Item texts in PO
Regards
Sudheer
2006 Sep 28 10:03 AM
Hi Kantheri,
Use tcode se75. Double click on EKKO or EKPO. There you can find the id of the text.
Regards
Arun
2006 Sep 28 10:33 AM
Hey I am getting error while trying to reward u all.
Will surely reward if it works.
but i have got ans for first query.
second one.. i found that the tdid for text is F05 (info record), which is not stored in stxh and stxl and hence it is failing. how to handle this situation?
2006 Sep 28 11:16 AM
even if i use read_text
with values F05,EN,docnum+linenum,EKPO, it doesnot return the value.
I cross verified that the text id is correct from ME23n.
but it doesnot exit is stxh too, neither read_text returns it...wht could be the reason and how to solve it?
2006 Sep 28 11:19 AM
for INFO record
BT (text ID ) Purchase order text
,
for more info check Tcode SE75.
If dont know how to use SE75 , i cannt help u out.
regards
Prabhu
2006 Sep 28 11:38 AM
2006 Sep 28 12:13 PM
If you see the text in that text field it has to be there.
Try selecting STXL tables also.
Try to use less selection criteries (fro example only TDOBJECT).
Maybe the language was different than "EN".
Check all of these, and you will find the texts.
Happy developing
Tamá
2006 Sep 29 3:19 AM
This is what i could find.
for a PO, the TEXT is auto generated for its relevant info record. (in PO it is F05 but doesnot exist in STXH)
So to get this text, i have to find its info record first then use the below info in read_text to get it.
TDID = BT
Object = EINE
objectname = inforecordnum+..
i get this text, but isnt there a direct way to get this text given the PO. And secondly, if i put this logic, then all the PO would get this. As i noticed that for some PO this text is generated but still can be retrieved using object EKPO.
2006 Oct 02 2:21 AM
2006 Oct 02 2:38 AM
Hi,
When a PO is created the INFO RECORD text will be referred from the text of the MATERIAL INFORECORD, that is why you are able to retrieve the same using the INFORECORD parameters.
However, when you change the same, the text gets copied and is stored separately for the PO alone and then you will be fetch this new text using the PO parameters.
Regards,
Ravi
2006 Oct 02 2:50 AM
Hi Ravikumar thanks for u quick reply.
This is wht is currently coded.
concatenate values to get item text for read text function
invar3+0(10) = invar1. "PO number
invar3+10(5) = invar2. "PO line number
SELECT SINGLE * FROM stxh WHERE tdobject = 'EKPO'
AND tdname = invar3
AND tdid = 'F01'
AND tdspras = sy-langu.
IF sy-subrc = 0.
invar4 = invar3.
reading the text for the document items.
CALL FUNCTION 'READ_TEXT'
EXPORTING
id = 'F01'
language = sy-langu
name = invar4
object = 'EKPO'
TABLES
lines = it_itab.
I have seen some PO's which have info rec texts in that, which gets pulled by the above code...first thing is its id is F02 which exist in STXH table also there is other text with F01 id, and hence the table it_itab gets both these text hence no pbm.
but i came across a PO which has only one text which is info rec text with id F05 and is not store in stxh and hence doesnot get pulled by read_text fm. How do i change my cod to get this text which should not hamper other PO's as well.
As mentioned in above msgs, this F05 could be retrieved by providing object name as EINE.
anyhelp will be appreciated and rewarded.
thanks
2006 Oct 02 2:53 AM
You can change the code to read the PO text first and if you don't get the text, then you read the INFORECORD text.
Regards,
Ravi
2006 Oct 02 2:57 AM
Thanks, will try this and see, and hopefully this does not effect other PO's, I mean it shouldnot pull unnecessary texts.
2006 Oct 23 10:38 AM
Hi,
I am trying to get the info rec number for this PO and then found entry for this info rec in STXH tdid BT and object EINE. And using read_text i am getting the correct the text name.
But how do i generate the textname for this.
I found for some it is directly infnr, for some it is infnrline and for some infnrline+plant(or porg).
Any inputs on this?
2006 Oct 23 10:47 AM
I am not sure what exactly are you trying to do
But if you are looking to get the INFORECORD for a given a line item of the PO, that will be available in the PO line item table EKPO and the field INFNR.
Regards,
Ravi
2006 Oct 23 10:51 AM
No I am not asking for info record for a given Po. I know how to retrieve it.
But I need to get the PO text using this info record.
SO i will be provideing object = EINE, id = BT, lang = EN and text name = generated number.
I tried this for my e.g and it worked. But this generated number i found it directly from stxh.
But in the progrom how do i generate it?
inforecord numberline itemplant is it? for some i see it is number+line and no plant. hence confused abt its generation.
any help here?
2006 Oct 23 10:57 AM
I am not sure, may be its dependent whether or not plant is entered on the line item of the PO. Did you see that?
It might be a good idea to see if the plant info is stored in the EINE table and if present concatenate that as well to get the text else just the INFNR and the LINE ITEM number.
Regards,
Ravi
2006 Oct 23 11:16 AM
Thank you very much.
Looks like it is generated from EINE table with fields
Info record
Purchasing Org.
Infotype
Plant.