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

material classification in selection-option

is it possible to use material classification for selection-option?

e.g. material classification - i got sub-brand, product_year....

how to do that?

coz i just know if that attributes have table ...

it's easy to call directly...

select-options : v_kunnr for kna1-kunnr ..

but how to set the select-options which is in material classification?

select-options: sp_pyear for _________ (what?)

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on May 15, 2009 at 04:54 AM

    Hi Sky ,

    u cn use the following fields to declare the select-option for year

    kna1-UMJAH (numc len = 4)

    mara-saisj (char 4 )

    Regards.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 15, 2009 at 05:02 AM

    Hi,

    Why don't you try to use any field of any table that has same type as what your fields require?

    ex: if product_year require 4 character numerical field then use any field that has same type.

    Try this, may be helpful

    Thanks

    Mudit

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 15, 2009 at 05:47 AM

    Hi,

    Is there is any field associated with material classification?

    For using select options, field should be present in a table.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      actually i'm not sure...i just know when i write the program, i will call this function to get the classification info. of material.

      OBJECT_KEY = MARA-MATNR.

      CALL FUNCTION 'CLAF_CLASSIFICATION_OF_OBJECTS'

      EXPORTING

      CLASS = 'Z9XX'

      CLASSTEXT = 'X'

      CLASSTYPE = '001'

      OBJECT = OBJECT_KEY

      TABLES

      T_CLASS = MYCLASS

      T_OBJECTDATA = T_TLINE

      EXCEPTIONS

      NO_CLASSIFICATION = 1

      NO_CLASSTYPES = 2

      INVALID_CLASS_TYPE = 3

      OTHERS = 4.

      loop at T_TLINE.

      CASE T_TLINE-ATNAM.

      WHEN 'SUB-BRAND'.

      IF T_TLINE-AUSP1 NE '?'.

      IF ITAB-CUST_NO IS INITIAL.

      MOVE: T_TLINE-AUSP1 TO ITAB-SUB_B.

      .......

      ENDIF.

      ENDIF.

      ENDCASE.

      loop.

      ...But I don't know is it possible to use classification in select-options (range)?

      i can just think the solution that ..to filter the data before ALV. (and i still don't know how to do filtering the data by selecting option).

  • author's profile photo Former Member
    Former Member
    Posted on May 15, 2009 at 07:24 AM

    Hi sky,

    you can give material classification in selection Option ,,,

    Please find the logic below.

    first.please define selection option like

    sel options : sel_year type 'some table name and filed' or data element with the char lenght as required for your reqmnt

    ex :

    select-options sel_year type gjhar.

    ok now

    AT SELECTION-SCREEN ON VALUE-REQUEST FOR sel_year .

    fill your internal table that you want to dispaly in help request.

    GT_STATUS

    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

    EXPORTING

    • DDIC_STRUCTURE = ' '

    retfield = 'TXT04'

    • PVALKEY = ' '

    dynpprog = 'Program nae '

    dynpnr = '1000'

    dynprofield = 'SEL_YEAR'

    value_org = 'S'

    • IMPORTING

    • USER_RESET =

    TABLES

    value_tab = GT_STATUS.

    please try this and let me know if it works;

    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.