Read PO Item Text
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
ID = 'PB'
LANGUAGE = 'E'
NAME = TNAME
OBJECT = 'PBPT'
ARCHIVE_HANDLE = 0
IMPORTING
HEADER = HTEXT
TABLES
LINES = LTEXT
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
NOT_FOUND = 4
OBJECT = 5
REFERENCE_CHECK = 6
WRONG_ACCESS_TO_ARCHIVE = 7
OTHERS = 8.
How do i retrieve the PO item text if language is unknown? is there a way to retrieve it by a default language?
Hi,
If the language is unknown, then pass sy-langu so that it will take on the logon language...which would look logical
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
ID = 'PB'
LANGUAGE = sy-langu
Regards
Shiva
Similar Messages
-
Reading line item text from sales order
Hi,
I have a sales order which has an item text, I need to get the value from the text. I want to test the READ_TEXT function and I am giving values as
Import parameters Value
CLIENT 400
ID 0011
LANGUAGE EN
NAME 0001171445000010
OBJECT VBBP
ARCHIVE_HANDLE 0
LOCAL_CAT
It is not giving me any value. Am I giving any thing wrong? In the NAME I gave the value as sales ord num + item number, is this correct. Please help me.
Thanks,
Veni.Hi
Name is the Concatenation of Order No and Item No.
pass the 4 parameters ID,OBJECT,NAME and LANG
use the correct declarations for the parameters and use
ID = '0011'
LANGUAGE = 'EN'
NAME = '0001171445000010'
OBJECT = 'VBBP'
See the doc
READ_TEXT
READ_TEXT provides a text for the application program in the specified work areas.
The function module reads the desired text from the text file, the text memory, or the archive. You must fully specify the text using OBJECT, NAME, ID, and LANGUAGE. An internal work area can hold only one text; therefore, generic specifications are not allowed with these options.
After successful reading, the system places header information and text lines into the work areas specified with HEADER and LINES.
If a reference text is used, SAPscript automatically processes the reference chain and provides the text lines found in the text at the end of the chain. If an error occurs, the system leaves the function module and triggers the exception REFERENCE_CHECK.
Function call:
CALL FUNCTION 'READ_TEXT'
EXPORTING CLIENT = SY-MANDT
OBJECT = ?...
NAME = ?...
ID = ?...
LANGUAGE = ?...
ARCHIVE_HANDLE = 0
IMPORTING HEADER =
TABLES LINES = ?...
EXCEPTIONS ID =
LANGUAGE =
NAME =
NOT_FOUND =
OBJECT =
REFERENCE_CHECK =
WRONG_ACCESS_TO_ARCHIVE =
Export parameters:
CLIENT
Specify the client under which the text is stored. If you omit this parameter, the system uses the current client as default.
Reference field: SY-MANDT
Default value: SY-MANDT
OBJECT
Enter the name of the text object to which the text is allocated. Table TTXOB contains the valid objects.
Reference field: THEAD-TDOBJECT
NAME
Enter the name of the text module. The name may be up to 70 characters long. Its internal structure depends on the text object used.
Reference field: THEAD-TDNAME
ID
Enter the text ID of the text module. Table TTXID contains the valid text IDs, depending on the text object.
Reference field: THEAD-TDID
LANGUAGE
Enter the language key of the text module. The system accepts only languages that are defined in table T002.
Reference field: THEAD-TDSPRAS
ARCHIVE_HANDLE
If you want to read the text from the archive, you must enter a handle here. The system uses it to access the archive. You can create the handle using the function module ACHIVE_OPEN_FOR_READ.
The value '0' indicates that you do not want to read the text from the archive.
Reference field: SY-TABIX
Default value: 0
Import parameters:
HEADER
If the system finds the desired text, it returns the text header in this parameter.
Structure: THEAD
Table parameters:
LINES
The table contains all text lines that belong to the text read.
Structure: TLINE
Exceptions:
ID
The text ID specified in the parameter ID does not exist in table TTXID. It must be defined there together with the object of the text module.
LANGUAGE
The parameter LANGUAGE contains a language key that does not exist in table T002.
NAME
The parameter NAME contains the name of a text module that does not correspond to the SAPscript conventions.
Possible errors:
The field contains only blanks.
The field contains the invalid characters * or ,.
OBJECT
The parameter OBJECT contains the name of a text object that does not exist in table TTXOB.
NOT_FOUND
The system did not find the specified text module.
REFERENCE_CHECK
The text module to be read has no text lines of its own but refers to the lines of another text module. This reference chain can include several levels. For the current text, the chain is interrupted, that is, one of the text modules referred to in the chain no longer exists.
WRONG_ACCESS_ TO_ARCHIVE
The exception WRONG_ACCESS_TO_ARCHIVE is triggered if an archive is accessed using an incorrect or non-existing archive handle or an incorrect mode (that is, read if the archive is open for writing or vice versa).
Reward points if useful
Regards
Anji -
Nested table for PO Output (Item texts) - trying again.
Hi experts
I posted this question already, but the formatting disappeared, so trying again.
I have created a PDF version of the Purchase Order output. Everything works well, except for the last step - a nested table where I want to display Item texts from the PO for every item.
The steps I followed:
1. In the Interface, I read the item texts, and placed them in an internal table, where the table has a field EBELP (item number) and a field for the text. So, for a PO with 5 items, where 2 items have texts, the table might look like this:
00010 First line of text for item 10.
00010 Second line of text for item 10.
00040 Only line of text for item 40.
2. In the context of the form, I put this table 'under' the existing 'ITEM' entry. In other words, for every item, the texts must be displayed. Obviously I then put in an entry under the WHERE CONDITIONS to say that EBELP = ITEM-EBELP, otherwise it would repeat every line of text for every item.
The problem is that it does not behave quite as I expected. It currently prints:
Item 10 information
First line of text for item 10.
Second line of text for item 10.
Item 20 information
Only line of text for item 40.
Item 30 information
Item 40 information
Item 50 information
Where it should print:
Item 10 information
First line of text for item 10.
Second line of text for item 10.
Item 20 information
Item 30 information
+Item 40 information+
Only line of text for item 40.
Item 50 information
In other words, it simply 'breaks' on change of EBELP, and moves the text to the next line, as opposed to the correct line.
I tried debugging, and it does appear to be doing things in the right order, but it is still doing the output incorrectly. I also searched the forums for similar problems, but I could not find a solution to the problem I am experiencing.
I also put 'dummy' (empty) rows into the table - that fixes it, but then it messes with my layout and I get something like:
Item 10 information
First line of text for item 10.
Second line of text for item 10.
Item 20 information
Item 30 information
Item 40 information
Only line of text for item 40.
Item 50 information
In the above, I don't want the gaps where the empty rows are.
Please advise?
Thanks and kind regards
CasperReposted without formatting...
I have created a PDF version of the Purchase Order output. Everything works well, except for the last step - a nested table where I want to display Item texts from the PO for every item.
The steps I followed:
1. In the Interface, I read the item texts, and placed them in an internal table, where the table has a field EBELP (item number) and a field for the text. So, for a PO with 5 items, where 2 items have texts, the table might look like this:
00010 First line of text for item 10.
00010 Second line of text for item 10.
00040 Only line of text for item 40.
2. In the context of the form, I put this table 'under' the existing 'ITEM' entry. In other words, for every item, the texts must be displayed. Obviously I then put in an entry under the WHERE CONDITIONS to say that EBELP = ITEM-EBELP, otherwise it would repeat every line of text for every item.
The problem is that it does not behave quite as I expected. It currently prints:
Item 10 information
First line of text for item 10.
Second line of text for item 10.
Item 20 information
Only line of text for item 40.
Item 30 information
Item 40 information
Item 50 information
Where it should print:
Item 10 information
First line of text for item 10.
Second line of text for item 10.
Item 20 information
Item 30 information
Item 40 information
Only line of text for item 40.
Item 50 information
In other words, it simply 'breaks' on change of EBELP, and moves the text to the next line, as opposed to the correct line.
I tried debugging, and it does appear to be doing things in the right order, but it is still doing the output incorrectly. I also searched the forums for similar problems, but I could not find a solution to the problem I am experiencing.
I also put 'dummy' (empty) rows into the table - that fixes it, but then it messes with my layout and I get something like:
Item 10 information
First line of text for item 10.
Second line of text for item 10.
Item 20 information
Item 30 information
Item 40 information
Only line of text for item 40.
Item 50 information
In the above, I don't want the gaps where the empty rows are.
Please advise?
Thanks and kind regards
Casper -
Detect purchase requisition item text changes
Hi Abap Gurus,
During a PR modification (ME52N), I need to read the purchase requisition item text at runtime to compare with the stored item text (read text) and detect if it have changes.
Actually, I am using the badi ME_REQ_POSTED.
How could I detect the PR item text changes? or How could I read the item text at runtime.
Somebody could help me with this....
Other ideas will be welcome.....
Regards,
Jaya Sankar.MHi,
But can you change the purchase requisition item text using the badi? -
Hai friends,
In my invoice i have 7 line items and some materials are "Duty Paid". For this they are maintaining a text in "Item Text" tab in VF01 transaction for each materials.
I have to print the text one by one in the footer.
How can i do this. How to display the item text.
Thanks.Hi,
Use the Function module READ_TEXT to read the item texts and print them in the footer.
You need to pass paramters to FM Read_text. Go to VF03. go to item texts. Highlight any item texts and click on the display button below. It will take you to the text editor. On that screen Go to-> Header will show the following details.
Text Name 1203832486000140
Language EN
Text ID 0002 Item note
Text Object VBBP Sales Item texts
Pass the same values to the fields of READ_TEXT FM.
TEXTNAME would be the concatenation of salesorder and line item.
Thanks,
Vamshi. -
Set order hold based on Item Text.
Hi All,
I am receiving an IDoc (ORDERS05) which uses CALL TRANSACTION for order creation. I need to read the Item text (Goto -> Item -> Texts) and set holds based on the text.
I am trying to use the userexit USEREXIT_SAVE_DOCUMENT_PREPARE since it already contains some logic for holds, but can't find the internal table which might be having the text.
Any suggestions on how to go about it?Hi Gaurav,
READ_TEXT will not work because the order has not yet been created.
I found the solution myself and its working fine. Texts are stored in memory id SAPLSTXD. Just imported everything from there. -
How to read Sales order Item Text of item node?
Hi Sap Guru's,
I have urgent requirement, i want to read Sales order item text of item node.
can anybody give detail code.
Thanks in Advance,
Venkathi venkat,
take a look at this code
data:
git_line type standard table of tline.
data:
gwa_head type thead,
gwa_line type tline.
data:
v_first type c.
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
id = '0002'
language = sy-langu
name = '1000000122000010'
object = 'VBBP'
IMPORTING
HEADER = gwa_head
tables
lines = git_line
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
NOT_FOUND = 4
OBJECT = 5
REFERENCE_CHECK = 6
WRONG_ACCESS_TO_ARCHIVE = 7
OTHERS = 8.
loop at git_line into gwa_line.
at first.
move 'X' to v_first.
endat.
if v_first eq 'X'.
write: / gwa_line-tdline+10.
clear v_first.
else.
write: / gwa_line-tdline.
endif.
endloop. -
Reading item text of sales order using READ_TEXT but getting error
Hi Experts,
I want to read the Billing item text which is processed through from delivery.
For that I am using FM READ_TEXT, but getting error.
Text 0090014392 ID 0001 language EN not found
I am providing data in FM...
ID : 0001
LANGUAGE : E
NAME : 0090014392 (Billing Document Number)
OBJECT : VBBP
but still I am getting the error...
Can anyone provide solution?
Regards,
SURYA
Edited by: suryabasu on Mar 10, 2011 5:49 AMhii
try with this,
select single tdtxtlines
from stxh
into v_textline
where tdid = '0001'
and tdname = wa_tname-name
and tdobject = 'VBBP'.
if v_textline ne 0.
call function 'READ_TEXT'
exporting
id = '0001'
language = sy-langu
name = wa_tname-name
object = 'VBBP'
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.
endif.
read table it_tline into wa_tline index 1.
regards,
Sri. -
How to read the text from the item text of the purchase order
i want to extract the text which is maintained in the purchase order item text. i used the function module read_text but it reads only the header text. can anyone help.
u have to chek the following parameters
ID: this textid
language:language u maintained the text,this also important
name: The no in which text-id is maintained
Usually we make mistake here,the no is combination of purchase order no and item no.
Example:420000210000010(Puchase orderno:4200002100 item no:00010)
Object:it change based on the text-id so u can check it the document no.
CALL FUNCTION 'READ_TEXT'
EXPORTING
id = p_var
language = g_f_langu
name = g_f_tdname
object = g_f_obj
TABLES
lines = g_t_lines
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.
Pass the varibles as i have said and let me know if u face any problem.
Regards -
Reading Item texts of a document (PO) while it is not yet saved
Hi Team ABAP,
i´m a little confused about those item texts.
I was searching the Forum on this and found thread
according to this i adopted my Coding, but still it wont, work. Maybe one of you guys has an Idea where i go wrong?
FORM get_article_basic_text
USING ebeln TYPE ebeln
ebelp TYPE ebelp
matnr TYPE matnr.
DATA: ls_header TYPE thead,
lt_lines TYPE TABLE OF tline,
ls_lines TYPE tline,
lv_swap TYPE c LENGTH 3,
lv_line TYPE char20.
FIELD-SYMBOLS: <line> TYPE tline.
DO 30 TIMES.
WRITE sy-index TO lv_swap.
CONDENSE lv_swap.
CONCATENATE 'W_LONG_TXT' lv_swap INTO lv_line.
ASSIGN (lv_line) TO <line>.
IF <line> IS ASSIGNED.
CLEAR <line>.
ENDIF.
ENDDO.
IF ebeln IS INITIAL.
ebeln = 'XXXXXXXXXX'.
ENDIF.
CONCATENATE ebeln ebelp
INTO ls_header-tdname.
ls_header-tdid = 'F03'.
ls_header-tdobject = 'EKPO'.
ls_header-tdspras = nast-spras.
g_tdname = ls_header-tdname.
CALL FUNCTION 'READ_TEXT'
EXPORTING
id = ls_header-tdid
language = ls_header-tdspras
name = ls_header-tdname
object = ls_header-tdobject
TABLES
lines = lt_lines
EXCEPTIONS
id = 1
language = 2
name = 3
not_found = 4
object = 5
reference_check = 6
wrong_access_to_archive = 7
OTHERS = 8.
I created a new PO using ME21N, added the F03 Text on item level for item 10. Then i pushed print preview and debugged right into my coding.
Values for LS_HEADER were:
ls_header-tdname = XXXXXXXXXX00010
ls_header-tdid = F03
ls_header-tdspras = D
ls_header-tdobject = EKPO
and still i got sy-subrc = 4 and no result.
Edited by: Florian Kemmer on Jun 9, 2011 9:36 AMFlorian, Have you checked the possibility of using the BADI "ME_PROCESS_PO_CUST" to achieve this ? Most of the methods in this badi uses the parameters of type IF_PURCHASE_ORDER_MM. May be you can use the methods IF_LONGTEXTS_MMGET_TEXTOBJECT, IF_LONGTEXTS_MMGET_TYPES, IF_LONGTEXTS_MM~GET_TEXT of the interface IF_PURCHASE_ORDER_MM.
I didn't tried this with PO, but simliar kind of BADI worked properly with Purchase requisition. Wiki post [Purchase Requisition Header Long Text using Badi - ME_PROCESS_REQ_CUST|http://wiki.sdn.sap.com/wiki/display/ABAP/PurchaseReq.HeaderLongTextusingBadi-ME_PROCESS_REQ_CUST] may be helpful.
Regards, Vinod -
Item text (BSEG-SGTXT) is not getting updated in Payment document generated
Hi All,
Item text (BSEG-SGTXT) is not getting updated in Payment document generated through F110.
After generating the payment document via Transaction Code u2013 F110, system is not updating the
Text field (BSEG-SGTXT) in the payment document with the text that we have entered in the Invoice (MIRO or FI Invoice).
In case of manual payment (F-53) we can input the text manually hence that will get updated in
payment document but this thing is not possible with F110.
How can I update it?
Is there any configuration for that?
Thanks
Daniel DortaHi All,
I've applied the two notes as recommended. However, when I run FBL3N for payment run items, the Text field is update with wrong data, i.e. not from the Text field in FB60
Thus, I'll like someone to help me with what should exactly be done on the 'Step', 'Pre-requisite' and 'Substitution' side of the Substitution rule (TCode GGB1), I did not fill anything in the Pre-requisite box - is this right?
Thanx in advance. -
Document line item text in Clearing document
Dear All,
Document line item text
My client want the vendor invoice line item text(BSIK-SGTXT) to be captured in the corresponding clearing document line item text field(BSAK-SGTXT).
(i.e) The vendor invoice and its payment clearing document should have the same text in the document line item text filed.
According to me i can use a substition rule and a user exit to assign the values. but here comes a problem* i have one clearing document against 3 to 4 vendor invoice documents* so my programming logic has got stucked here? like which vendor invoice line item text the clearing document should pick up?
is there any other enhancements possible or can some one help me with the programming logic to be applied here.
Thank you
Regards,
Vasanth Dlike which vendor invoice line item text the clearing document should pick up?
is there any other enhancements possible or can some one help me with the programming logic to be applied here
Why don't you discuss the issue with your client? As you said, if you pay 5 invoices in a single run, the payment document item text can't carry all of those texts unless you use the long text. What is the reason for the requirement? Perhaps there's another solution. -
Report for Vendor line item with GL line item text
Hello SDN,
We need to add the GL Line item text to a vendor line item report. I don't think adding a GL field is available option in the FBL1N report. Is there a way to display the Vendor name, Vendor number, Open amount and the GL line item text in a report without ABAP invovlement?
I would really appreciate your help. Thank you.
Edited by: nsap_fico on Aug 10, 2011 6:29 PMSome alternative is in KSB1 (Cost center line item report) - you can change the layout and include offsetting account and its text.
But, in vendor line item report, if you want vendor number, vendor number, GL account number (offsetting) account and its text, then you should go with abap development.
Have a look at the following note, if really serves your purpose.
Note 1504612 - Line items: Offsetting account info (BAdI FI_ITEMS_CH_DATA) -
Item text is not appearing in the print output through IDOC?
Hello ,
I am changing the PO through IDOC. When ever there is change in the quantity ,net price and delivery date the print out put is generated autoamtically and changes are appearing the print output.
when ever there is change in the item text of PO print output is not generatiing but item text is updated in the PO.
If i change manually print out is generating for item text also but through IDOC print output is not generated . please help to slove this isuue.
i am passing the value as :
idoc_data-segnam = 'E1BPMEPOTEXT'.
e1bpmepotext-po_item = Po line item number .
e1bpmepotext-text_id = txtid.
e1bpmepotext-text_form = textform.
e1bpmepotext-text_line = line item text .
idoc_data-sdata = e1bpmepotext.
APPEND idoc_data.
CLEAR idoc_data.
CLEAR e1bpmepotext.
please help me it is urgent
Thanks
VenkateshHi Venkatesh,
Check the condition record in transaction NACE. Whether the print output field is present in the condition record.
Regards,
Gajendra. -
SAP SCRIPT Header text and Item text not printing in customized PO
Hello Experts,
I have copied the standard MEDRUCK to ZMEDRUCK and customized the form according to the requirement.
I want to print the header text and Item text in my form.
For Header text I have used :
/: INCLUDE &EKKO-EBELN& OBJECT EKKO ID F01
Problem 1: The text what I enter in header text is flowing only when I hit on print preview without saving the form. Once I save the SAP SCRIPT and click on print preview the field is appearing blank. I also tried to print the form, but the field is appearing blank even on the print out.
Problem 2: For item text the field is concatenation of EBELN & EBELP. Can anyone suggest me how to concatenate and fetch the text in item text.Hi,
Im getting an error in my subroutine pool for i_xtline which is to fetch ITEM TEXT., It says its not a in any internal table nor defined as data. How can I proceed further. I have pasted my code below. Please check and revert ASAP
PROGRAM ZMEDRUCK_SUBP1.
TABLES: EKPO, EKKO.
FORM fetch_table_data TABLES in_tab STRUCTURE itcsy
out_tab STRUCTURE itcsy.
data xname like THEAD-TDNAME.
data i_xtline like xtline.
clear i_xtline.
refresh i_xtline.
CONCATENATE EKPO-ebeln EKPO-ebelp INTO v_item_text.
MOVE v_item_text to ITEMTXT.
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
id = F01
language = EN
name = ITEMTXT
object = EKPO
ARCHIVE_HANDLE = 0
LOCAL_CAT = ' '
IMPORTING
HEADER =
tables
lines = i_xtline
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.
ENDFORM.
Maybe you are looking for
-
hi i am developing the web application in which i want to put record of in which there is the image and i dont know hove to insrt image in database using jsp or servlet if anyone have anser plz .
-
When I try to Sync my E61 with Ovi.com I get this message: Server does not respond. Can someone help me with this?
-
Hallow I have select statement and if sy-subrc ne to 0 it it dont do the else statement why? how can I solve it? Regards LOOP AT mb_emp_tab INTO wa_mb_emp_tab. SELECT stdaz plans pernr " Employee Numbers & Hours FROM pa2010
-
While my Library is turned on in iTunes, I keep getting the following message from my AppleTV: "Could not connect to Chuck's Library." What am I doing wrong. I am a newbie, just getting started. Ultimately, I'm trying to get everything linked up s
-
My headphone is stuck in the jack of my Mac Pro how can i take headphone mode off
my headphone is stuck in the headphone jack of my mac pro, how can i take it off headphone mode