2009 May 04 10:22 AM
Hello,
I'm using FM read_text to get the documentation/long text for a characteristic value.
CALL FUNCTION 'READ_TEXT'
EXPORTING
id = c_tdid
language = c_tdspras
name = ????
object = c_tdobject
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.However, I don't know how to retrieve the textname of a specific characteristic value.
In transaction CT04, I go to the documentation and then header...
The textname written there is 00000003770001, but is it possible to get this text name using a FM/BAPI?
Thanks
2009 May 15 7:32 AM
This apparently doesn't work.
When you change the order of the values in CT04, the value CAWN-ATZHL also changes...
Hello,
I'm using FM read_text to get the documentation/long text for a characteristic value.
CALL FUNCTION 'READ_TEXT'
EXPORTING
id = c_tdid
language = c_tdspras
name = ????
object = c_tdobject
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.However, I don't know how to retrieve the textname of a specific characteristic value.
In transaction CT04, I go to the documentation and then header...
The textname written there is 00000003770001, but is it possible to get this text name using a FM/BAPI?
Thanks
2009 May 04 10:29 AM
Hi glenn,
put the characteristic name in cabn table and get atinn field from it. then query cawn table and get atzhl field. concatenate the two fields(atinn and atzhl) and put into name parameter of fm 'READ_TEXT'.
CALL FUNCTION 'READ_TEXT'
EXPORTING
id = 'VALU'
language = 'E'
name = CONCATENATE(ATINN,ATZHL)
object = 'FEATURE'
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.
Hope it helps u.
Regards,
Anil N.
2009 May 04 10:41 AM
I will try your solution.
So there is no FM to get this internal value directly?
2009 May 04 10:56 AM
I'm now using this code:
* Definition
DEFINE _convert_atinn.
call function 'CONVERSION_EXIT_ATINN_INPUT'
exporting
input = &1
importing
output = &2.
END-OF-DEFINITION.
* Get internal value of characteristic
_convert_atinn 'DEVICE_STATUS' lw_attin.
* Get internal value of characteristic value
SELECT SINGLE atzhl
FROM cawn
INTO lw_atzhl
WHERE atinn = lw_attin
AND atwrt = 'AVAILABLE'.
* Concatenate the 2 values
CONCATENATE lw_attin lw_atzhl INTO lw_name.This is working fine.
Thanks
2009 May 04 10:31 AM
hi glen,
The text name is nothing but the document number.
For example you want to read the header text of the PO, then text name will be PO number
and if you wnat to read the item text of the PO, then text name will be concatenation of PO item and PO number.
To see how a text name value is define dfor a particular text object and text id , goto STXH table and input your object and id . so that you can see what is the text names.
Thanks,
vamshi
2009 May 04 10:35 AM
Yes u can use FM to change ur characteristic name into digits which u will pass in name parameter in READ_TEXT.
The FM is
CONVERSION_EXIT_ATINN_INPUT
EXPORTING
INPUT = ' charactername'
IMPORTING
OUTPUT = CHARNUMBER.
This character no. is to be passed to READ_TEXT in NAME parameter.
2009 May 04 10:39 AM
This does not work for characteristic values, only for characteristics.
E.g. I want to know the internal value of characteristic value 'AVAILABLE' of characteristic 'DEVICE_STATUS'
2009 May 04 10:57 AM
u use the first conversion routine which i posted earliner to get the number so eg. 000081
Now if the value is the first value of this character then u have to append 0001 to 00881
i.e. it becomes 00000000000008810001 (16 fields is the length of this).
Now u pass this value to ur read_text u'll get the right value for the characteristic value(if its 1st value and 0002 if its 2nd value and so on).
2009 May 04 10:46 AM
Hello,
What all the inputst u have i.e sales order number, item or material number
use this FM
BAPI_CLASS_GET_CHARACTERISTICS
2009 May 04 10:57 AM
check this table
/SAPHT/MESZPCHAR
HOPE U CAN GET THE TEXT NAME
cheers
s.janagar
2009 May 15 7:32 AM
This apparently doesn't work.
When you change the order of the values in CT04, the value CAWN-ATZHL also changes...
2009 May 18 7:09 AM
Hi Glenn,
I got the solution to ur problem. Instead of concatenating atzhl with characteristic number (ATINN) concatenate (ATINN,TXTNR) and then pass into the name parameter of READ_TEXT. u will get TXTNR from CAWN table.
Hope it will solve ur problem.............
Regards,
Anil N.
2009 May 18 7:14 AM
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |