Application Development and Automation 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 only

Buffer not refresh?

Former Member
0 Likes
2,522

Hi Guys,

Im using FM MD_STOCK_REQUIREMENTS_LIST_API to display MRP element's information and report display without any problem.

I have a Refresh button available on report screen where user can click on it to get the latest MRP info. For the refresh functionality i coded like this, when it is click then i will call back the same FM MD_STOCK_REQUIREMENTS_LIST_API to extract the MRP info and display again.

Problem hits when the MRP info being extracted during the click on Refresh button, because the returning structure is not containing the latest result.

In order for me to get the latest result, i have to exit my program and then execute again.

Could you please comment on how can i get the latest result from FM MD_STOCK_REQUIREMENTS_LIST_API when REFRESH button trigger.

Thanks in advance.

11 REPLIES 11
Read only

Former Member
0 Likes
1,708

Hi,

when u click on refresh do an <b>refresh on the internal table</b> so that all old values will be cleared and then pass this to the FM so that it will contain the latest result check this way

ravi

Read only

0 Likes
1,708

Hi Ravi,

This is what i did, and i thought after i refreshed all the internal table during the Refresh button click the FM will return me the latest data. But unfortunately no, the returned data still contain the old data.

Please comment.

Read only

Former Member
0 Likes
1,708

Hi,

Fisrt u watch the code in Deburge mode and find that Before calling the FM how the Process is going.

After Refresh call the Performs which returns the MRP element's information (internal Table) and follows all other code before using the FM MD_STOCK_REQUIREMENTS_LIST_API .

so that when ever u Refresh the output that will Hits the Perform of MRP element's information and gives the Latest information.

    • Reward if Helpfull.

Thanks,

Anil.

Read only

0 Likes
1,708

Hi Anil,

FYI, i used back the code to extract MRP list for Refresh button. The additional code is to refresh all the internal table before using FM MD_STOCK_REQUIREMENTS_LIST_API.

I did Refresh for so many time for other reports(but not for FM MD_STOCK_REQUIREMENTS_LIST_API ), it didn't give me problem previously. Where i do believe there is something in addition i need to take care in order for me to get the latest result when i execute FM MD_STOCK_REQUIREMENTS_LIST_API <b>more than once on the same SESSION</b>.

Please comment.

Read only

0 Likes
1,708

Hi,

I have seen this problem occur with HR function modules, where the buffer does not refresh unless the transaction is exited.

To confirm that that its a problem with the specific FM, you could try executing BAPI_MATERIAL_STOCK_REQ_LIST in your program to check if it works? Both FMs have similar parameters, and if the BAPI works on refresh, you could consider using it instead of the MD function module.

Hope this helps.

Sudha

Read only

0 Likes
1,708

Hi Sudha,

Thanks for your info, but unfortunately 4.6c do not have such FM BAPI_MATERIAL_STOCK_REQ_LIST.

Please comment.

Read only

0 Likes
1,708

Hi,

Sorry, I do not have any other suggestions except that you could maybe look for other function modules that could help solve your problem. I do not have a 46C system to check on.

Maybe the OSS has something to help you as well?

Sudha

Message was edited by:

Sudha Mohan

Read only

Former Member
0 Likes
1,708

Hi..,

execute one of these reports to clear the BUFFER.. in between by using submit !!

BCALV_BUFFER_DELETE

BCALV_BUFFER_DEL_SHARED

regards,

sai ramesh

Read only

0 Likes
1,708

Hi Sai,

Thanks for your reply. I did tested both of the program but it did not work.

For BCALV_BUFFER_DEL_SHARED , since it doesn't has any selection thus i just submit the program before the execute of FM MD_STOCK_REQUIREMENTS_LIST_API. But im still getting the OLD data.

While for BCALV_BUFFER_DELETE , i pass the value to the program's paramter as follow:

REPID = 'My program name'

TYPE = 'L'

LANGU = 'E'

ALL = 'x'

List = 'x'

after i submit the above, then come to FM MD_STOCK_REQUIREMENTS_LIST_API, but im still getting the OLD data.

Please comment if i did something wrong.

Thanks in advance.

Read only

Former Member
0 Likes
1,708

Just pass an 'X' to the parameter NOBUF when you cal lthe FM

MD_STOCK_REQUIREMENTS_LIST_API

Regards,

Ravi

Read only

0 Likes
1,708

Hi Ravi,

Thanks for your reply. But sorry to inform you that i'm working in 4.6C where i can not find the parameter NOBUF that you mentioned.

Please comment.