‎2009 Nov 05 6:27 PM
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 !!!
‎2009 Nov 05 9:58 PM
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
‎2009 Nov 05 6:35 PM
Hi,
Could you tell us in which system you are looking for the RFC?
Regards
Prasenjit
‎2009 Nov 05 6:47 PM
‎2009 Nov 05 7:02 PM
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
‎2009 Nov 05 7:05 PM
Thank you prasenjit....anybody who has written a FM with my above requirement ....please help !!!!
‎2009 Nov 05 6:42 PM
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..
‎2009 Nov 05 6:54 PM
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...
‎2009 Nov 05 7:13 PM
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.
‎2009 Nov 05 7:21 PM
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 ???
‎2009 Nov 05 7:32 PM
well it would be a poor performance query but can try :
inob-klart = ausp-klart
objek = objekausp-atinn = cawn-atinn
adzhl = adzhlcan join cabn as well..
this should be the base to start working on your query
‎2009 Nov 05 8:31 PM
‎2009 Nov 05 9:14 PM
thanks Prasenjit....i still dont have the FM for my scenario !!!
anybody please help me ..................
‎2009 Nov 05 9:31 PM
Hi Rahul,
enhance your capabilities and do it yourself.
If stuck, ask again.
Regards,
Clemens
‎2009 Nov 05 9:32 PM
ok clemens i am stuck !!!
anybody else with a FM for my scenario ???
‎2009 Nov 05 9:58 PM
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
‎2009 Nov 05 10:28 PM
‎2009 Nov 05 10:37 PM
Bapi is as well getting it filling RINOB1, the table I suggested in the base table behind it....