2007 Jan 26 3:29 PM
When i use FM read_text to get the text of customer in a program for every customer in knvv table i am facing error for some customers text is not found. how to skip the customers who doesnt have text entry and which table can i find the customer is having text or not?.
2007 Jan 26 3:55 PM
I'm not sure if I understand. You are getting an error when the text is not found?
Do you have the Exceptions commented out in your Call to the FM?
If so, please un-comment them.
Sorry if I misunderstood your problem.
When i use FM read_text to get the text of customer in a program for every customer in knvv table i am facing error for some customers text is not found. how to skip the customers who doesnt have text entry and which table can i find the customer is having text or not?.
2007 Jan 26 3:42 PM
Hi,
You can write a Simple select before the READ_TEXT.look at the table KNVT based on the field TXTID.
Select Single TXTID into G_TXTID from KNVT where KUNNR = KUNNR.
if sy-subrc = 0.
write the Read_text.
ENDIF.
In the Above select, you can use the field TEXNR also
Regards
Sudheer
2007 Jan 26 3:48 PM
I am not finiding any entries in knvt table but there is a text for customer in fd32 transaction. i need to find the customer having text in fd32 transaction.
2007 Jan 26 3:51 PM
Hi,
To know customer who have text.
You can select all the customer, and then loop at them, and check the READ_TEXT return code.
Regards,
Erwan
2007 Jan 26 3:51 PM
I think you can get the long texts from table STXH
give your Text number as Text id
but i am not sure, seen in some threads
2007 Jan 26 3:54 PM
2007 Jan 26 3:55 PM
I'm not sure if I understand. You are getting an error when the text is not found?
Do you have the Exceptions commented out in your Call to the FM?
If so, please un-comment them.
Sorry if I misunderstood your problem.
2007 Jan 26 4:04 PM
I have already un-commented the exceptions in FM read_text. but how to skip passing values to function module for the customers doesnt have long text. since the program stops in the middle when it finds there is no text for customers.
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
ID = '0001'
LANGUAGE = sy-langu
NAME = v_name
OBJECT = 'KNKK'
Eg. v_name contains '00000100000070'
1000 is customer 0070 is credit control area.
2007 Jan 26 4:08 PM
Add the exception following the FM ( in order to avoid the dump !) then test the sy-subrc !
(...)
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 ne 0.
* no text
endif.Message was edited by:
Erwan LE BRUN
2007 Jan 26 4:30 PM
TYou can use those same values to check the STXH table before calling the function module. If there is an entry in STXH, then there will be text available to the function module.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |