on 05-10-2007 6:19 AM
Hi,
I had made a mistake in my previous post. I need information on LiveCache concepts in APO and not "Live Cash" as previously mentioned. Sorry about that..
Thanks,
Sruthy
Hi Sruthy,
Please find my answers for questions:
1) Why have you defaulted the date ranges to '19700101000020' and '20371231235949' respectively?
- This is maximum date range I have given in my friend. So this depends on ur requirement.
2) why have you used the value 'AG' in the range, is it just an example of an ATP category?
- AG is the cateogry I have used in my program. Instead u can use ur own categories there. This function module fetches value for all the categories.
3) Why do we have to create a session if no other session exists?
It's necessary to create the sim session when u read the live cache. If there are any sessions existing we can use that else we need to create it.
This fucntion reads the data from live cache which also be viewed in the table by using the transaction /SAPAPO/OM19.
Thanks,
Siva.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Sruthy,
Use the below code to calculate the qunatities (Assumed that u have prodcut and locatio with u) . Please let me know if you find any issues.
Thanks,
Siva.
DATA : lv_pegid TYPE /sapapo/pegid,
gt_pegarea_lc TYPE /sapapo/om_pegid_tab,
l_safe TYPE /sapapo/boolean,
gv_sims TYPE /sapapo/om_simsession,
gv_params TYPE /sapapo/om_gen_params,
ls_exclude_fields TYPE /sapapo/om_exclude_fields2,
gt_io TYPE /sapapo/om_io_pp_tab,
gt_conti_io TYPE /sapapo/om_io_conti_data_tab,
gs_io LIKE LINE OF gt_io,
gv_mintime TYPE /sapapo/startti VALUE '19700101000020',
gv_end_time TYPE /sapapo/endti VALUE '20371231235949'.
RANGES : r_cat FOR /sapapo/om_io_pp-category.
CLEAR r_cat.
REFRESH r_cat.
Populate the ranges for the category
r_cat-low = 'AG'.
r_cat-sign = 'I'.
r_cat-option = 'EQ'.
APPEND r_cat.
CLEAR r_cat-low.
Populate all ur categories in the range and pass it to the fucntion module
Check if there are any sim session available
CALL FUNCTION '/SAPAPO/RRP_SIMSESSION_GET'
IMPORTING
ev_simsession = gv_sims
es_gen_params = gv_params.
If there is no sim session then create a new one
IF gv_sims IS INITIAL.
CALL FUNCTION '/SAPAPO/RRP_SIMSESSION_CREATE'
IMPORTING
ev_simsession = gv_sims.
CALL FUNCTION '/SAPAPO/RRP_SIMSESSION_GET'
IMPORTING
ev_simsession = gv_sims
es_gen_params = gv_params.
ENDIF.
ls_exclude_fields-get_prim_res = '2'.
CLEAR lv_pegid.
Fetch the Pegid for the location and Product
CALL FUNCTION '/SAPAPO/DM_MATERIAL_GET_PEGID'
EXPORTING
iv_matnr = p_p_matnr
iv_locno = p_p_loc
IMPORTING
ev_pegid = lv_pegid
EXCEPTIONS
material_not_supplied = 1
location_not_supplied = 2
account_not_supplied = 3
matid_not_found = 4
location_not_found = 5
simversion_not_found = 6
material_not_in_location = 7
dont_use_sobkz_plsec_together = 8
lc_connect_failed = 9
lc_com_error = 10
lc_appl_error = 11
version_not_found = 12
account_not_found = 13
material_not_in_model = 14
pegarea_locked = 15
internal_error = 16
OTHERS = 17.
IF sy-subrc = 0.
CLEAR gt_pegarea_lc.
REFRESH gt_pegarea_lc.
APPEND lv_pegid TO gt_pegarea_lc.
REFRESH gt_io.
Get the quantity for the all the categories
CALL FUNCTION '/SAPAPO/RRP_LC_PEGID_GET_IO'
EXPORTING
it_pegarea = gt_pegarea_lc
iv_start_time = gv_mintime
iv_end_time = gv_end_time
iv_use_safety_times = l_safe
is_exclude_fields = ls_exclude_fields
IMPORTING
et_ionodes = gt_io
et_conti_io = gt_conti_io.
ELSE.
RAISE peg_err.
ENDIF.
DELETE gt_io WHERE category NOT IN r_cat.
Now loop at the internal table and calculate the sum
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Siva,
All the sum of the quantities have to be obtained from livecache (according to my requirement) for the ATP Categories specified in accordance with the inventory details for each loaction and corresponding product since the data will be dynamic in nature.
Your code seems to be retrieving the data from the database and not from the livecache, if i am not wrong?
From what i have come to know, Livecache can only be accessed through BAPIs. Please confirm on this.
Thanks,
Sruthy
Hello Sruthy,
Please let me know the ATP categories types. I can send you the code to calculate the sum of quantities.
Thanks,
Siva.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Siva,
The AT categories are as follows:
Inventory CC, CF
Production AA, AB, AI, AJ, EE
Sales BQ, BR, EN, EO
Forecast FA
Dependent Demand AU, AV, AY, AZ, EL, EM
Transfer In BF, EA, EF
Transfer Out BI, EB, EG
If you could provide the code to calculate the sum of quantities from the Livecache, it would be really helpful.
Thanks in advance,
Sruthy
there is another way of doing this but you might need some function help
1. The Categories that you mentioned need to be grouped in a category group in the IMG
2. In the planning book admin, these Category Groups need to be read in a planning book attached to Kfs
3. Read the planning book using BAPI BAPI_PBSRVAPS_GETDETAIL2
I suggest you check with the functional consultants on steps 1 and 2.
Hi Harish,
Thanks for the info, do u know how to distinguish and validate between the different ATP categories?
For ex: how do you know that types, AA and AF are related to inventory?
In IMG the types are provided, but on a very detailed level, in inventory itself there are many sub-types like process order, production order, etc...
How do I differentiate between the different ATP types?
thanks,
Sruthy
Hi Sruthy,
If you are keen on knowing the technical details of liveCache then please check MaxDB Wiki https://www.sdn.sap.com/irj/sdn/wiki?path=/display/maxdb/main
From the functional standpoint liveCache is an Object-Oriented RDBMS used in APO for storing transaction data and some planning/scheduling relevant master data. The primary objective is fast data access and processing. From the technical aspect, data in liveCache is to be accesses only using SAP provided BAPIs. Data is not stored in tables per se and not be directly accessed from ABAP function modules.
Hope this helps.
Thanks,
Somnath
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Somnath,
Thanks for the details. There are some database tables that start with the prefix "/SAPAPO/* which have data such as product or location related data. Is this the master data? There are so many similar fields that it is difficult to distinguish which is the correct field. Ifound some fields here.
Is some data kept in the database and the rest of the data kept in the livecache?
I need to retrieve the inventory details, ie: sum of the quantities for specific ATP categories. Do you know any SAP provided BAPIs that would access these details or atleast do u know the prefix of these "APO Livecache" BAPIs?
I am asking a lot of questions, sorry about that, but I have no idea about ABAP programming in APO so I need help please...
Thanks in advance,
Sruthy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
SAP liveCache technology is an object-based enhancement of the MaxDB database system and was developed to manage complex objects
there are quite a few posts on this subject if you use the search functionality here
here is one that might be most relevant
here is the more details from SAP in this link:
http://help.sap.com/saphelp_nw04/helpdata/en/f2/0271f49770f0498d32844fc0283645/content.htm
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
9 | |
4 | |
3 | |
3 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.