‎2008 Oct 03 12:20 PM
Hi all,
I have saved Item level text (VA03-> GOTO-> Item -> Text), using function module SAVE_TEXT.
Object: VBBP
Now in some program i want to check that for an Order line, if there exist some Item text or not....
I checked this with Function Module READ_TEXT, but it Gives an Error Message if Item text does not exists for the inputted order line.....
Is there any way of avoiding this error message?
Or Can you tell me which database table holds records for Item level Text; Object (VBBP)?
Thanks in advance,
Pankaj.
‎2008 Oct 03 12:27 PM
Hi,
While calling FM have u uncommented the code for exceptions?
The DB Table for Item level text is STXL. Enter TDOBJECT, TDNAME & TDID field.
Hope it will be helpful for u.
Regards,
Dushyant
‎2008 Oct 03 12:25 PM
Hi Pankaj,
Use Exceptions form the FM READ_TEXT. Then, validate if sy-subrc = 0. If not, then the FM was not able to retrieve any text.
regards,
Peter
‎2008 Oct 03 12:25 PM
Use -
TDOBJECT - VBBP
TDNAME - sales order number with item
e.g. sales order = 201000169 and item = 10
then TDNAME = 0201000169000010
TDID - 0001.
Pass these values to READ_TEXT and check the output.
All these standard texts are stored in table STXH.
Regards,
Aparna
‎2008 Oct 03 12:27 PM
‎2008 Oct 03 12:27 PM
Hi,
While calling FM have u uncommented the code for exceptions?
The DB Table for Item level text is STXL. Enter TDOBJECT, TDNAME & TDID field.
Hope it will be helpful for u.
Regards,
Dushyant
‎2008 Oct 03 12:28 PM
Hi,
Check the following db table which consist of text details.
STXH - STXD SAPscript text file header
Hope it is helps.
Regards,
T.D.M.
‎2008 Oct 03 12:32 PM
Hi
Please check the part of code and the parameter to pass.
CONCATENATE l_wa_lips-vgbel l_wa_lips-vgpos INTO v_name.
wa_order_text-doc_number = l_wa_lips-vgbel.
wa_order_text-itm_number = l_wa_lips-vgpos.
wa_order_text-text_id = c_id_zl50.
wa_order_text-langu = sy-langu.
wa_order_text-format_col = c_slash.
REFRESH: i_tline, i_order_txt.
CALL FUNCTION 'READ_TEXT'
EXPORTING
client = sy-mandt
id = c_id_zl50
language = sy-langu
name = v_name
object = c_object
TABLES
lines = i_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.............. If it not 0 means no text found
populate the text from I_TLINE
endif.
Add your text.
Then use FM SAVE_TEXT
I think it will help you.