Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
Showing results for 
Search instead for 
Did you mean: 

Function module (Reports)

Former Member
0 Kudos

Hi all,

I am facing a prob. I made a report program defining a internal table with object id, objectname , language ,date LIKE thead-tdldate,

Time LIKE thead-tdltime,

User LIKE thead-tdfuser,

Version LIKE thead-tdversion,like thead table and

a header LIKE thead.

and t_line like tline with heder line occurs 0.

i made a object, object id, and structure using se75 transaction.

and call READ_TEXT_INLINE function module and pass all value than i call EDIT_TEXT_INLINE function module ,I pass inline_count = 1 and inlines = t_line1 which is like tline table .

I want that ,when save my change on sap script ,that previous should be commented with change time and date .Which function module I have to use it?

Please help me.

Ankur Garg.


Former Member
0 Kudos


You can try one of these two options to see if it gives you what you need:

<u>Option 1:</u>

When you call EDIT_TEXT_INLINE, first move the sy-datum and sy-uzeit values to thead-tdldate and thead-tdltime respectively. Then pass the text header to the EDIT_TEXT_INLINE importing parameter HEADER. Then when the SAVE_TEXT function is called by EDIT_TEXT_INLINE, the date and time will be passed to SAVE_TEXT via its HEADER parameter. Note that the date and time will not be the most current at the time of saving if you use this option.

<u>Option 2:</u>

When you call EDIT_TEXT_INLINE, pass SPACE to the parameter SAVE (notice that the default value is 'X', so simply leaving off the SAVE parameter will <b>not</b> work for this option). This will tell EDIT_TEXT_INLINE to skip its own call of SAVE_TEXT, leaving the task to your program instead. If there are no errors after your call of EDIT_TEXT_INLINE, then you simply move the current date and time as described in Option 1 above and call SAVE_TEXT in your program.

Note: You may also want to consider populating the THEAD-TDFUSER with the user-id (sy-uname) so that the last changed by user will also be saved.

Let me know how (and if) either Option works and which one you decide to use.

Best of luck,

James Gaddis