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

VB_BATCH_DETERMINATION - select batch with a specific characteristic

Former Member
0 Likes
6,031

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,

11 REPLIES 11
Read only

Former Member
0 Likes
4,028

Hi Florina,

I don't think so any documentation is released for this FM..

Read only

0 Likes
4,028

There is another FM to determine the batch characteristics? Or could you suggest a work around for this requirement?

Regards,

Read only

0 Likes
4,028

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

Read only

0 Likes
4,028

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

Read only

0 Likes
4,028

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

Read only

0 Likes
4,028

I don't know about the FM's but you could simply query the MCHB table for the inventory data.

Craig

Read only

0 Likes
4,028

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

Read only

Prasoon
Active Contributor
0 Likes
4,028

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

Read only

Former Member
0 Likes
4,028

Thanks. Already read it.

Read only

0 Likes
4,028

Did you try with where used list of the FM to get an idea of how tp fill data?

Read only

Former Member
0 Likes
4,028

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.