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.
cancel
Showing results for 
Search instead for 
Did you mean: 

Read_Text FM not giving updated text

Former Member
0 Kudos

Hi,

We are fetching PO Header text data using Read_Text FM , it is showing correct data when i am checking with tcode SE37 but in my program it is not showing updated data , it is giving old data.

IN Detail : When we create PO then we save Header text but after some time we changed Text from tcode ME22N and Release PO , now when we check from tcode SE37 it is showing same data which is in PO Header but in our program it is fetching OLD Data.

Please Help.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

issue resolved by my self .

Thanks for all your reply.

6 REPLIES 6

Sandra_Rossi
Active Contributor

You probably call the FM before the text is actually stored in database. Now you should give more détails about the moment you call the FM than you currently provide "IN Detail".

raymond_giuseppi
Active Contributor

If your program execute before the end of the update task, so before db commit, read from database will return old values.

When do you execute the READ_TEXT, if during the transaction execution either use READ_TEXT but set the LOCAL_CAT parameter to read from memory, or, if you use BAdI ME_PROCESS_PO_CUST, use methods of interface IF_LONGTEXTS_MM on IM_HEADER parameter.

Alternative for program executed in POST method or similar, wrap execution in a RFC enabled FM and call it IN BACKGROUND TASK.

Regards,
Raymond

Former Member
0 Kudos

Hi , Sandra,

Thanks For Fast Response.

First we created a PO with Header Text from Tcode ME21N.

Then we changed Header Text from Tcode ME22N and release PO From Tcode ME28 .

Now when we check Header Text from Tcode SE37 then it is showing output as we changed from Tcode ME22N that is correct but in our program it showing text that we filled at the time of PO Creation that is Wrong it should show Text that we changed from ME22N.

Dear Raymond ,

Thanks For Fast Response.

As per my understanding this is not related with DB Update because PO is saved and after this we are running our report .

Thanks

Nilesh

Then bypass any buffer generated from your program or from standard transaction, clear the local text catalog with FM FREE_TEXT_MEMORY. So READ_TEXT will always read from database.

Regards,
Raymond

former_member216215
Participant
0 Kudos

Hello,

'READ_TEXT' instead you can try 'SET_TEXT'.

Regards.

Former Member
0 Kudos

issue resolved by my self .

Thanks for all your reply.