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

Function Module for characteristics

Former Member
0 Likes
8,150

Hi ABAP experts,

i have a requirement to build a remote enabled function module where the user inputs certain characteristics values and returns in a table a list of materials.

is there a standard function module available for this. please help me.....if not has somebody done this before and can you share the code with me please !!!

1 ACCEPTED SOLUTION
Read only

andrea_olivieri
Contributor
5,005

Hi Raul,

try to use the function module BAPI_CLASS_SELECT_OBJECTS.

As described in the function module documentation it allows you to start the "find objects in class" function in the classification system from an external application.

For example if you need to get a list of materials for a given value of characteristic of a class you need to specify as import parameters of :

ClassType = '001' (Material Class Type)

CLASSNUM = <name of your material class>

In the SELECTIONCRITERIONS[ ] table specify:

NAME_CHAR = <name of the characteristic>

Depending on the characteristic's data you have to specify:

SELECTIONCRITERIONS-CHAR_VALUE For character format

SELECTIONCRITERIONSNUM_VAL_FM - SELECTIONCRITERIONS-NUM_VAL_TO for numeric format

SELECTIONCRITERIONS-CURR_VAL_FM - SELECTIONCRITERIONS-CURR_VAL_TO for currency format

The function module returns as result in the SELECTEDOBJECTS[ ] table, for material class type, the list of materials with the description.

Obviously the selection criteria may be extended to more characteristics of the same class.

Regards,

Andrea

16 REPLIES 16
Read only

prasenjit_sharma
Active Contributor
0 Likes
5,005

Hi,

Could you tell us in which system you are looking for the RFC?

Regards

Prasenjit

Read only

0 Likes
5,005

prasenjit,

ECC 6.0 is where i am looking for the FM.

Read only

0 Likes
5,005

Hi,

Check the tables AUSP, CABN. The characteristics values are maintained in the table AUSP with respect to the characteristics name ATINN.

I do not think there is any FM/RFC that can give you the material no for a characteristics. You can create an RFC using these tables.

Regards

Prasenjit

Read only

0 Likes
5,005

Thank you prasenjit....anybody who has written a FM with my above requirement ....please help !!!!

Read only

former_member156446
Active Contributor
0 Likes
5,005

You might have did enough research on it to find a FM, [check this link>>|http://wiki.sdn.sap.com/wiki/display/MDM/Issuesinfetchinginternalcharacteristicsofmaterials] you should find some link between material and its characters..

Read only

0 Likes
5,005

Hello J@Y

Thanks for the link and i am aware of this wiki.....i need to obtain the material numbers based on the characteristic values the user enters. so the import tab in the FM needs to contain characteristic fields so i can enter the values when i execute and the output is a table filled with material numbers...

Read only

former_member156446
Active Contributor
0 Likes
5,005

Table INOB should solve your problem

I got it from FM: /SAPHT/MESZLAUZ_CHAR_VAL_CHECK

Functionality

This function module will return the number of Batch Characteristics that a batch of a material has. It will be the basis for deciding whether or not Batch Characteristics Inheritance should be done.

Read only

0 Likes
5,005

thanks J@Y ...you are very close...but this FM retrieves no of records based on the SKU .....i need it the other way around...enter characteristic field values and obtain INOB-OBJEK ???

Read only

0 Likes
5,005

well it would be a poor performance query but can try :

inob-klart = ausp-klart
objek = objek

ausp-atinn = cawn-atinn
adzhl = adzhl

can join cabn as well..

this should be the base to start working on your query

Read only

0 Likes
5,005

Hi,

Check this link. It might help you.

http://www.sapnet.ru/viewtopic.php?p=259

Regards

Prasenjit

Read only

0 Likes
5,005

thanks Prasenjit....i still dont have the FM for my scenario !!!

anybody please help me ..................

Read only

0 Likes
5,005

Hi Rahul,

enhance your capabilities and do it yourself.

If stuck, ask again.

Regards,

Clemens

Read only

0 Likes
5,005

ok clemens i am stuck !!!

anybody else with a FM for my scenario ???

Read only

andrea_olivieri
Contributor
5,006

Hi Raul,

try to use the function module BAPI_CLASS_SELECT_OBJECTS.

As described in the function module documentation it allows you to start the "find objects in class" function in the classification system from an external application.

For example if you need to get a list of materials for a given value of characteristic of a class you need to specify as import parameters of :

ClassType = '001' (Material Class Type)

CLASSNUM = <name of your material class>

In the SELECTIONCRITERIONS[ ] table specify:

NAME_CHAR = <name of the characteristic>

Depending on the characteristic's data you have to specify:

SELECTIONCRITERIONS-CHAR_VALUE For character format

SELECTIONCRITERIONSNUM_VAL_FM - SELECTIONCRITERIONS-NUM_VAL_TO for numeric format

SELECTIONCRITERIONS-CURR_VAL_FM - SELECTIONCRITERIONS-CURR_VAL_TO for currency format

The function module returns as result in the SELECTEDOBJECTS[ ] table, for material class type, the list of materials with the description.

Obviously the selection criteria may be extended to more characteristics of the same class.

Regards,

Andrea

Read only

0 Likes
5,005

excellent Andrea !! U r the best !!!!

Read only

0 Likes
5,005

Bapi is as well getting it filling RINOB1, the table I suggested in the base table behind it....