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

Check existing views for a specific Material

Hi!

Does anybody know a way to check which views (basic, mrp, purchase...) exist for a specific material. With SAP 4.7 there is the function BAPI_MATERIAL_GETALL to check this but within older versions this function is not available...

Thanks,

Konrad

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

7 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Oct 12, 2005 at 08:59 PM

    Hi Konrad

    see the field PSTAT and/or VPSTA of MARA: the value of these field should be a sequence of letters, each letter should indicate an active view:

    A Work scheduling

    B Accounting

    C Classification

    D MRP

    E Purchasing

    F Production resources/tools

    G Costing

    K Basic data

    L Storage

    P Forecasting

    Q Quality management

    S Warehouse management

    V Sales

    X Plant stocks

    Z Storage location stocks

    Max

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 04, 2005 at 03:25 PM

    Check the following link.

    You can check what are the views available for a material based on the maintanence status field in mara table.

    Then check the order of those views defined by using the tcode OMT3R and you can select that view dynamically. Doesnt matter if it is 13th position for one material and 15th for other.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 12, 2005 at 09:22 PM

    Check out this function module 'SELECTION_VIEWS_FIND'. It uses PSTAT to give an ITAB with very specific information on views selected for a Material.

    PSTAT alone may not sufficient in some cases.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 13, 2005 at 02:27 AM

    Konrad,

    try the FM 'SELECTION_VIEWS_FIND'.

    Cheers,

    Pat.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 04, 2005 at 03:12 PM

    There is a field in MARA which has a bunch of letters in it. Each letter stands for a specific view that exists for the material. This is field is PSTAT.

    <i>

    Maintenance status

    Use

    The maintenance status records:

    Which user departments may maintain a material master record of a particular material type

    Which user departments have already maintained the material master record at a particular hierarchy level

    The overall maintenance status is made up of the individual maintenance statuses. The individual maintenance statuses have the following meaning:

    User department Maintenance status

    Work scheduling A

    Accounting B

    Classification C

    MRP D

    Purchasing E

    Production resources/tools F

    Costing G

    Basic data K

    Storage L

    Forecasting P

    Quality management Q

    Warehouse management S

    Sales V

    Plant stocks X

    Storage location stocks Z

    </i>

    Regards,

    Rich Heilman

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 04, 2005 at 04:04 PM

    Hi Konrad

    Try with next functions:

    (In this example the class is 'CAR_REF', then only set your variable class name)

    • I. Check if Material has assigned class 'CAR_REF'

    • ---------------------------------------------------

    mafid = 'O'. " Object Type

    klart = c_clasn. " Id.Num 'CAR_REF' = '001'

    l_objnr = p_material. " Object

    kreuz = 'X'. " Visualize

    datuv1 = sy-datum. " Date

    refresh l_ikssk_v0. " CLINT for Material-CAR_REF Table

    call function 'CLSE_SELECT_KSSK'

    exporting

    mafid = mafid

    klart = klart

    objek = l_objnr

    view = kreuz

    refresh = kreuz

    key_date = datuv1

    tables

    exp_kssk = l_ikssk_v0

    exceptions

    no_entry_found = 1.

    check not l_ikssk_v0[] is initial.

    check not l_ikssk_v0-clint is initial.

    • II. Get Features List for Class-Material

    • ---------------------------------------------

    clear aennr1.

    refresh iksml.

    clear iksml.

    iksml-clint = l_ikssk_v0-clint. " Set Mat-Class KLINT

    append iksml.

    call function 'CLSE_SELECT_KSML'

    exporting

    key_date = datuv1

    i_aennr = aennr1

    tables

    imp_exp_ksml = iksml

    exceptions

    no_entry_found = 04.

    • III. Get Features (Views) that Material has filled

    • -----------------------------------------------------

    clear change_subsc_act.

    refresh l_iausp.

    call function 'CLFM_SELECT_AUSP'

    exporting

    mafid = mafid

    classtype = klart

    object = l_objnr

    key_date = datuv1

    with_change_number = change_subsc_act

    i_aennr = aennr1

    i_atzhl_same_ini = kreuz

    tables

    exp_ausp = l_iausp

    exceptions

    no_values = 01.

    In l_iausp you get the views filled to Material-Class.

    Cheers.

    Frank

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 12, 2005 at 08:29 PM

    Hi Konrad

    Please give the points if you found the answer or close your topic.

    Regards

    Frank

    Add a comment
    10|10000 characters needed characters exceeded

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.