How to get longtext via function read_text into my business object?

Wiz David yidysap at yahoo.com
Sat Feb 21 08:17:27 EST 2004


Thanks,  David
 
Regards,
Wiz.
 
"Trant, David" <David.Trant at andrew.com> wrote:
Here's code for a virtual multiline attribute we created using reference field TLINE-TDLINE for quality notifications (business object BUS2078).
 
Enjoy,
David
 
* get multi-line attribute SubjectText by reading the passing the
* notification number to 'READ_TEXT' and assigning the resulting table
* to the property
GET_PROPERTY SUBJECTTEXT CHANGING CONTAINER.
data: id like THEAD-TDID value 'LTQM',
name like THEAD-TDNAME,
text_object like THEAD-TDOBJECT value 'QMEL',
lines like tline occurs 0,
line like tline.
name = object-key-number.
refresh lines.
refresh object-subjecttext.
 
CALL FUNCTION 'READ_TEXT'
EXPORTING
* CLIENT = SY-MANDT
ID = id
LANGUAGE = sy-langu
NAME = name
OBJECT = text_object
* ARCHIVE_HANDLE = 0
* LOCAL_CAT = ' '
* IMPORTING
* HEADER =
TABLES
LINES = 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.
exit.
ENDIF.
loop at lines into line.
append line-tdline to object-subjecttext.
endloop.
SWC_SET_TABLE CONTAINER 'SubjectText' OBJECT-SUBJECTTEXT.
END_PROPERTY.
 
-----Original Message-----
From: SAP Workflow [mailto:Owner-SAP-WUG at MITVMA.MIT.EDU] On Behalf Of Wiz David
Sent: Tuesday, February 17, 2004 4:01 AM
To: SAP-WUG at MITVMA.MIT.EDU
Subject: How to get longtext via function read_text into my business object?
 
Hi all,
 
I need to create a virtual attribute (multi line) that will contain the long text that I will get from table stxh via function read_text. How can I do that in my business object?
 
 
 
TIA
 
 
 
Wiz
 
 
 
 
---------------------------------
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online
 
------------------------------------------------------------------------------------------------
This message is for the designated recipient only and may
contain privileged, proprietary, or otherwise private information.
If you have received it in error, please notify the sender
immediately and delete the original. Any unauthorized use of
this email is prohibited.
------------------------------------------------------------------------------------------------
[mf2]
 
 
 
---------------------------------
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
 


More information about the SAP-WUG mailing list