cancel
Showing results for 
Search instead for 
Did you mean: 

simsession???

hkmaradana
Active Participant
0 Kudos

Hi All,

Can anyone explain why we need to create simsession to fetch order details by using '/SAPAPO/OM_PEGID_GET_ORDERS'

and also why we need to merge created simsession to update in livecache by using

/SAPAPO/TSIM_SIMULATION_MERGE

/SAPAPO/RRP_SIMSESSION_LEAVE

Thanks

Cris

Accepted Solutions (0)

Answers (2)

Answers (2)

keiji_mishima
Active Contributor
0 Kudos

Hi Cris

For FM /SAPAPO/OM_PEGID_GET_ORDERS, simsession is no mandetory.

I guess you get error message due to com error.

If my assumption is correct, please declare simversion (planning version)

before calling FM /SAPAPO/OM_PEGID_GET_ORDERS like following.

CALL FUNCTION '/SAPAPO/RRP_GEN_PARAMS_SET'

EXPORTING

iv_simversion = simversion<variable>.

(SIM version is planning version. So productive use, it become 000).

The reason why you need this is that since /SAPAPO/RRP_LC_PEGID_GET_ORDER

check global constant within this FM. Therefore if simverssion is not declared,

it causes problem and you get COM error during liveCache access.

So if your problem is related to COM error, please decleare above

simversion before FM /SAPAPO/RRP_LC_PEGID_GET_ORDER.

Regarding on simsession, As Dave McLaughlin mentioned,SIMSESSION is kind of work area

(please do not mixed up on simsession and simversion<planning version>).

Simsession is one of the functionality provided by liveCache that enable parallel operation

without having data locking.

If you open simsession and acceeed data is copied to workarea within simsession.

And until you merge the session, the data is really independent from production data

<The data only becomes effective for all users once a merge is carried out>.

Since simsession is kind of workarea, even you change the data, it does not affect other user.

So within simsession, you can change data as you want.

This technique is mainly used for interactive planning of APO like SDP94, DS planning board.

Off course more higher application level, (sim session is really basis level), application

program also check kind of data locking. So in case of SDP94, if 2 user try to open same data in

change mode, application layer does not allow this.

So if you work with simsession, since all the operation like select/delete/change etc are made within

simsession, you have o merge your simsession to production data. If you do not work with simsession,

the change directly reflects to production data.

You can see some kind of information about simsession from following PDF.

https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/72cdbe90-0201-0010-6986-eae36eb6...

P66-P73

PS. As Dave McLaughlin said, different from R/3(ERP), internal logic of APO is very complicated. So

if you are not really sure on these technique, using BAPI might be more easy and safety.

Best Regards

Keiji Mishima

Former Member
0 Kudos

When you work with live cache the OM & DM function modules are used and require a work area and that work area is the sim sessions. Whether you are extracting data or updating data in live cache (using your own code) you have to "prime" the process with a simulation session and attention should be put towards making sure the session is closed (deleted) with the event is finished, you latter question alludes to an issue with session clopen.

You will find that using the BAPI approach eliminates the need for the OM / DM level FM but it also has some limitations. What we have found is that when you want to update a piece of data in LC that can't be accessed via the BAPI the best thing to do is to find the open exec statement in the BAPI, then copy the code and change the code to include the field. Certainly this is one of the more complex and riskier elements of the SCM environment.