Application Development 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: 

Varient Configuration

Former Member
0 Kudos
142

Hi All,

I have created some, say <b>CHAR1</b> n <b>CHAR2</b> n <b>CHAR3</b> characteristics and assigned them to the class of type 300.

I have assigned this class to a configurable material.

Now what I want is to check if the CHAR2 and CHAR3 are not initial.

And concatenate then into CHAR1 with Hyphen.

Can someone tell me the syntax for that.

Help needed urgently.

Thanks,

Supriya Manik.

1 ACCEPTED SOLUTION

Former Member
0 Kudos
108

I need to do that in the Object dependency editor at CT04 itself.

I dont have program for doing this.

Please help.

4 REPLIES 4

Former Member
0 Kudos
108

Get your class values by using the following FM

BAPI_OBJCL_GETCLASSES

BAPI_CLASS_GETDETAIL

concatenate the valuess and update the class details

BAPI_CLASS_CHANGE

Code snippet

      • Get the characteristics for given material first

CLEAR: lit_alloclist, lit_return, l_objkey.

REFRESH: lit_alloclist, lit_return.

MOVE mara-matnr TO l_objkey.

CALL FUNCTION 'BAPI_OBJCL_GETCLASSES'

EXPORTING

objectkey_imp = l_objkey

objecttable_imp = 'MARA'

classtype_imp = '300'

TABLES

alloclist = lit_alloclist

return = lit_return.

LOOP AT lit_return.

IF lit_return-type EQ ''.

MESSAGE e910(zpp) WITH mara-matnr.

ENDIF.

ENDLOOP.

READ TABLE lit_alloclist INDEX 1.

IF sy-subrc EQ 0.

MOVE lit_alloclist-classnum TO l_classnum.

ELSE.

CLEAR l_classnum.

ENDIF.

      • Get the characteristics from the class of the material

CALL FUNCTION 'BAPI_CLASS_GETDETAIL'

EXPORTING

classtype = '300'

classnum = l_classnum

keydate = sy-datum

TABLES

classcharacteristics = lit_classcharacteristics

classcharvalues = lit_classcharvalues.

Former Member
0 Kudos
109

I need to do that in the Object dependency editor at CT04 itself.

I dont have program for doing this.

Please help.

0 Kudos
108

Please post your query to the functional PP / VC forum, you can get some solution over there.

Former Member
0 Kudos
108

Aniruddha,

I know this can be done in the dependency editor.

I need to know the syntax that can be used.

Thanks for the replies,

Supriya Manik.