Skip to Content
author's profile photo Former Member
Former Member

Start routine ABAP


I need some help coding this Abap.

Scenario: I am Loading some data from DSO1 to DSO2. I have to filter out some documents in a start routine looking up a master data table.

My master data table has the following fields


Attributes: K_MINPRC,K_MAXPRC (These are key figures).

Now my logic in the start routine should say,


AND SOURCE_FIELDS-PRICE < K_MINPRC (From the master data table) AND

SOURCE_FIELDS-PRICE > K_MAXPRC (From the master data table).

Delete Data Package.

Can somebody help me code this....



Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Sep 23, 2008 at 05:40 PM

    select single k_minprc k_maxprc from <your master data table> into <some local declared variables based on your master data table fields or a work area>

    where k_minmax eq '100'

    and k_busarea eq '2000'

    and 0prod_hier eq source_fields-<the extact fieldname>.

    if source_fields-price lt <variable containing k_minprc>

    and source_fields-price gt<variable containing k_maxprc>.

    delete data_package.


    logic sounds a bit weird... a price that's smaller than the "minimum" and greater than the "maximum"?

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      change the "into" statement as follows:

      select single /BIC/k_minprc /BIC/k_maxprc from /BIC/PK_MINMAX into ( WA1 , WA2 )

      where /BIC/PK_MINMAX-k_minmax eq '100'

      and /BIC/PK_MINMAX-k_busarea eq '2000'

      and /BIC/PK_MINMAX-0prod_hier eq tab-K_MATERL__0PRODH2.

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.