Skip to Content

advise on the DSO lookup code/performance ?

We are looking up on a table which has the below entries/key from another DSO which has a materail/plan/calday as key. We need to get the material prices from this below DSO to another target DSO, through abap code.

Can you please advise on the index to be created on this table ? We have calday and calmonth in the target dso where this is the lookup dso.

pastedImage_0.png (26.5 kB)
Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Posted on Aug 11, 2015 at 06:16 AM

    Few points to be noted:

    Make use of field symbols to improve the performance.

    Try using Hash table instead of standard table for declaring the internal table.

    I am assuming that based on material and plant as key you would be fetching material prices from other dso's.

    If you have the code already in place then try to follow the above guidelines,i am sure you will experience faster data load performance.

    Regards,

    AL

    Add a comment
    10|10000 characters needed characters exceeded

    • Thanks Anshu for the reply. After a long time.

      I have used the same, field symbols but internal tables instead of hash tables. We have declared internal table with mat plan and KF values and reading on this internal table with mat plant and calmonth.....but still its taking huge time.

      Cant we create a secondary index on this DSO with the search criteria in the select condition like this.

      SELECT MATERIAL PLANT CURRENCY PRICE_VAL CALMONTH
      INTO TABLE
      Int_tab1 FROM matmovdso (above dso screenshot)
      FOR ALL ENTRIES IN RESULT_PACKAGE
      WHERE MATERIAL = RESULT_PACKAGE-MATERIAL
      AND PLANT = RESULT_PACKAGE-PLANT
      AND VALUATION = ' '
      AND CURTYPE EQ '10'
      AND CALMONTH = RESULT_PACKAGE-CALMONTH. ( as we dont have calday in the target dso we are passing calmonth to lookup ).


      My question can we create a secondary index on the above dso ( screenshot) with the given select conditions for a faster select or performance. Please advise.


      thanks

      DR

  • Posted on Aug 11, 2015 at 07:09 AM

    Hi,

    Can you post your complete code?

    Regards,

    Loed

    Add a comment
    10|10000 characters needed characters exceeded

    • AL,


      PFB DECLARATION.

      TYPES: begin of st_TAB2,
      DOC_NUM TYPE /BI0/OIDOC_NUM,
      DOC_ITEM TYPE /BI0/OIDOC_ITEM,
      PSTNG_DATE TYPE /BI0/OIPSTNG_DATE,
      MOVETYPE TYPE /BI0/OIMOVETYPE,
      PLANT TYPE /BI0/OIPLANT,
      MATERIAL TYPE /BI0/OIMATERIAL,
      QUANT_B TYPE /BI0/OIQUANT_B,
      END OF st_TAB2.

      DATA: it_TAB2 TYPE STANDARD TABLE OF st_TAB2,
      wa_TAB2 TYPE st_TAB2.

      TYPES: begin of st_TAB1,
      /BIC/YIOLOPRTN type /BIC/OIYIOLOPRTN,
      PLANT type /BI0/OIPLANT,
      MATERIAL type /BI0/OIMATERIAL,
      DOC_DATE TYPE /BI0/OIDOC_DATE,
      ORDER_CURR TYPE /BI0/OIORDER_CURR,
      NETPRICE TYPE /BI0/OINETPRICE,
      LOC_CURRCY TYPE /BI0/OILOC_CURRCY,
      CURRENCY TYPE /BI0/OICURRENCY,
      END OF st_TAB1.

      DATA: it_TAB1 TYPE STANDARD TABLE OF st_TAB1,
      wa_TAB1 TYPE st_TAB1.


      TYPES: begin of st_matprc,
      MATERiAL TYPE /BI0/OIMATERIAL,
      PLANT TYPE /BI0/OIPLANT,
      CURRENCY TYPE /BI0/OICURRENCY,
      PRICE_VAL TYPE /BI0/OIPRICE_VAL,
      CALMONTH TYPE /BI0/OICALMONTH,
      END of st_matprc.

      DATA: IT_MATPRC TYPE STANDARD TABLE OF ST_MATPRC,
      WA_MATPRC TYPE ST_MATPRC.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.