Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

material classification in selection-option

Former Member
0 Likes
1,625

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?)

6 REPLIES 6
Read only

Former Member
0 Likes
1,103

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.

Read only

Former Member
0 Likes
1,103

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

Read only

Former Member
0 Likes
1,103

Hi,

Is there is any field associated with material classification?

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

Read only

0 Likes
1,103

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).

Read only

Former Member
0 Likes
1,103

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;

Read only

0 Likes
1,103

thx for your advices...

I've known the way to do this ~

create search help and view ....can do it~