Skip to Content
avatar image
Former Member

LiveCache in APO

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

6 Answers

  • Best Answer
    avatar image
    Former Member
    May 14, 2007 at 11:01 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • May 10, 2007 at 09:50 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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

  • avatar image
    Former Member
    May 10, 2007 at 06:12 AM

    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

    apo-technical-question

    here is the more details from SAP in this link:

    http://help.sap.com/saphelp_nw04/helpdata/en/f2/0271f49770f0498d32844fc0283645/content.htm

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 10, 2007 at 06:16 AM

    and please check this thread too

    different-planners-in-apo

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 11, 2007 at 12:29 PM

    Hello Sruthy,

    Please let me know the ATP categories types. I can send you the code to calculate the sum of quantities.

    Thanks,

    Siva.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      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

  • avatar image
    Former Member
    May 14, 2007 at 10:28 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Siva,

      Can you provide some documentation links on SIMS sessions, it would make your code easier to understand.

      Thanks,

      Sruthy