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

refresh using CS_BOM_EXPL_MAT_V2 2 times

Former Member
0 Likes
1,291

Hi,

my problem is:

1. use fm CS_BOM_EXPL_MAT_V2 to get BOM data.

2. I modify the BOM using a Batch Input

3. use fm CS_BOM_EXPL_MAT_V2 to get the BOM updated.

the FM in the 3th step load the old data and not the updated BOM.

Any suggest?

Can i clear the program cache?

Hi,

my problem is:

1. use fm CS_BOM_EXPL_MAT_V2 to get BOM data.

2. I modify the BOM using a Batch Input

3. use fm CS_BOM_EXPL_MAT_V2 to get the BOM updated.

the FM in the 3th step load the old data and not the updated BOM.

Any suggest?

Can i clear the program cache?

3 REPLIES 3
Read only

Former Member
0 Likes
975

Hello,

I'm answering to this threat even though it's 5 years old just in case somebody is looking out for the solution like I was a couple of weeks ago.

The FM CS_BOM_EXPL_MAT_V2 calls internally another FM called GET_STPO.  Inside GET_STPO you will find structure STPOCTL which will contain material's information for the previous run of CS_BOM_EXPL_MAT_V2. Also, FM GET_STPO calls FM GET_STATS which will contain the structure STASCTL; both these structures need to be cleared in order for the Function Module to retrieve fresh data from the database, instead of just returning the same data that was returned in the first run.

In the Function Group CSIO, which contains all these Function Modules, there's a Function Module in charge of clearing these structures plus another internal tables which will contain the material's information, you need to call this FM right after your 1st iteration in order to clear the buffer. The Function Module is CSIO_REFRESH_BUFFER or CS_IO_BOM_BUFFER_SMASH, depending on your SAP implementation.

Hope this helps anyone

Message was edited by: Matthew Billingham - changed formatting to make more readable

Read only

Former Member
0 Likes
975

Hi Salvatore,

Try putting a waite of 2 to 3 sec after the batch input and then try. This might work if you are looking at few BOMs in one execution and not thousads of them. Let us know how it goes.

WAIT UP TO <sec> SECONDS.

Regards

Sachin

Read only

Flavio
Active Contributor
0 Likes
975

Hi Salvatore,

Depending on what you need to modify in the BOM, you could give a look at the following, really interesting note:

488765 - 'Do it yourself EWB programming'.

It comes with a sample program (Z_SIMPLE_EWB), that you can use as a reference for your needs.

If you need further info, feel free to ask me.

I hope this could be of some help.

Ciao,

Flavio