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

BAPI to determine batch automatically

Former Member
0 Likes
3,405

Hi All,

Is there any way to determine batch of a production order item using a BAPI or FM?

I need to do batch determintion of production order item through program and save the production order.

Please advise me other then doing a BDC is there any BAPI or FM?

Thanks in advance

Your valuable inputs will be appreciated.

Thanks,

Rajesh.

2 REPLIES 2
Read only

Former Member
0 Likes
1,527

Hi,

I am not sure whether a BAPI exists for it.

Better to find an User exit and to fetch/check the Batch data for that material in MCH1,MCHA tables and to save PP order.

Regards,

Anji

Read only

Former Member
0 Likes
1,527

Rajesh,

Look at BAPI <b>'BAPI_MATERIAL_GETBATCHES'</b>. This might help you.....

Here ia sample code:

CALL FUNCTION 'BAPI_MATERIAL_GETBATCHES'

EXPORTING

material = MATERIAL

  • BATCHNUMBER =

plant = PLANT

expirydatefrom = DATE

  • EXPIRYDATETO = 99991231

  • AVAILABLEDATEFROM =

  • AVAILABLEDATETO = 99991231

  • IMPORTING

  • RETURN =

TABLES

batches = it_batches.