‎2013 Nov 13 2:10 PM
Dear All,
I have for all batches a client characteristic (the batch at the producer). I have to use a function module in order to determine the SAP batch available on stock having a specific batch at the producer (a specific characteristic for the SAP batch). I would like to use FM VB_BATCH_DETERMINATION but I don't know how to use i_chara and e_chara - the FM parameters.
Could you help me? Or give me some others ideas?
Regards,
‎2013 Nov 14 7:45 AM
Hi Florina,
I don't think so any documentation is released for this FM..
‎2013 Nov 14 11:54 AM
There is another FM to determine the batch characteristics? Or could you suggest a work around for this requirement?
Regards,
‎2013 Nov 14 12:01 PM
In order to check whether a batch has this characterstic or not. You can do as follow.
Get CUOBJ_BM from MCHA based on matnr,werks and charg.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = lv_cuobj_bm
IMPORTING
output = lv_cuobj_bm.
CALL FUNCTION 'CONVERSION_EXIT_ATINN_INPUT'
EXPORTING
input = i_atnam-----------------------------> Name of characterstic
IMPORTING
output
= lv_atinn.
SELECT
SINGLE * FROM ausp INTO e_ausp
WHERE objek = lv_cuobj_bm
AND
atinn = lv_atinn.
Or you can use
CLAF_CLASSIFICATION_OF_OBJECTS
‎2013 Nov 14 12:17 PM
Hello,
My requirement is to determine a batch with a specific characteristic if it is available on stock.
I found that VB_BATCH_GET_DETAIL reads the material and batch characteristics - but I should use some FM to determine if the requested quantity is available on this batch...
I have the feeling that VB_BATCH_DETERMINATION could do this....but I lack the knowledge on how to use it...
‎2013 Nov 14 12:26 PM
got it..Basically i will advice you is do a where used list on this FM. you will see many standard/custom(may be in your system) are using the same. Hope it helps
‎2013 Nov 14 5:56 PM
I don't know about the FM's but you could simply query the MCHB table for the inventory data.
Craig
‎2013 Nov 15 5:34 AM
Hi,
Yes, I will agree with Craig Comments. You are only looking for the batch stock, So you can check in MCHB-CLABS.
How ever they are a few function modules which will get the stocks. But these function modules are exclusively using at the time of goods movement. You can check the above function modules for reference.
VB_BATCH_GET_ALL_STOCKS
MG_BATCH_CHECK_STOCK
Thanks,
Kiran
‎2013 Nov 14 12:34 PM
Hi,
I couldnt find standard documentation for the FM. But I found a similar thread. Please check the link below: http://scn.sap.com/message/5781441
Regards,
AKPT
‎2013 Nov 14 1:08 PM
‎2013 Nov 14 1:13 PM
Did you try with where used list of the FM to get an idea of how tp fill data?
‎2013 Nov 15 5:45 AM
I did but I didn't found how to use it for characteristics (i_chara parameter). For solving my problem I selected the information from mchb, mch1, ausp and for the batch with the requested characteristic I called BAPI_MATERIAL_AVAILABILITY.
It is not the solution I wanted, but works..
Thank you.