2015 Nov 10 7:18 PM
Hi,
I am creating a Z-table and have a requirement to add comments against each record of this table. The comments can span multiple lines and can contain bullet points as well ( just as the texts for a header or item in a SAP document). How to achieve this?
I am thinking of creating standard texts or long texts and bind the same against each record. Is this feasible? Has someone done something similar before?
Regards,
Rahul.
Hi,
I am creating a Z-table and have a requirement to add comments against each record of this table. The comments can span multiple lines and can contain bullet points as well ( just as the texts for a header or item in a SAP document). How to achieve this?
I am thinking of creating standard texts or long texts and bind the same against each record. Is this feasible? Has someone done something similar before?
Regards,
Rahul.
2015 Nov 10 7:31 PM
This is the normal way of doing things and if you search SCN you'll find plenty of examples of how to do it.
Rob
2015 Nov 10 8:19 PM
Hello!
Of course, you could also use a string datatype for that field.
That depends on how you intend to get the data input and how to present in output. If you want to use long text editor as well, of course go with that option. If you just want some text, maybe a string is the simplest way?
Best regards
// Jörgen
2015 Nov 10 8:29 PM
Thanks for the replies..I tried searching SDN for some examples as to how to link Standard texts to a z table but could not find any..Do you have an example of how it is used??
2015 Nov 10 8:37 PM
Well, you don't really link them to the table. You use key fields common to both.
Have a look at the documentation for the various TEXT FMs.
Rob
2015 Nov 10 8:40 PM
You don't actually need to store the texts in your z table but can use function modules SAVE_TEXT and READ_TEXT.
I don't have the syntax in front of me but you need an id and an object for the "type of text" and an object key that uniquely identifies the data object to which your text should belong.
They're really simple and straight forward FMs. Try them in SM37.
Best regards
// Jörgen
2015 Nov 11 7:06 AM
Hi Rahul,
Foy your reference, i have used the below code to fetch SAPSCRIPT text lines
data: gw_stxl TYPE stxl,
*Types Declaration
TYPES: BEGIN OF t_line,
tdformat TYPE tdformat,
tdline TYPE tdline,
END OF t_line,
*Tables Declaration
DATA: gt_line TYPE STANDARD TABLE OF t_line, ""Table for TLINE
gw_line TYPE t_line,
gw_header TYPE thead,
CALL FUNCTION 'READ_TEXT'
EXPORTING
* CLIENT = SY-MANDT
id = gw_stxl-tdid
language = gw_stxl-tdspras
name = gw_stxl-tdname
object = gw_stxl-tdobject
IMPORTING
header = gw_header
TABLES
lines = gt_line
or else, goto SE37 ->provide the FM name Read_text , after that utilities -> where used list - u can get list of programs ,as which FM used.
Regards,
Kannan
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |