Application Development 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: 

batch input

Former Member
0 Kudos
148

hi!

i am trying to update MM01 via batch input.

if the matnr doesn't exist it runs ok, but if i want to extend the matnr for example i first created it for one

plant ( it runs ok ) and on the same program i have another bi and i want to extend it.

when it start running it stopped in the first screen because one of the fields is missing.

if i run it separately it runs perfectly fine.

thanks yifat

1 ACCEPTED SOLUTION

Former Member
0 Kudos
103

Couple of reasons.

When you first time create a material you will be filling the basic data along with other org. specific data.When you again try to extend(in MM01) the basic data may not be required.

So try to record the fileds and screen sequences differently in extending a material than in creation.

My advice would be to use the function module BAPI_MATERIAL_SAVEDATA to create and extend the material master

10 REPLIES 10

Former Member
0 Kudos
104

Couple of reasons.

When you first time create a material you will be filling the basic data along with other org. specific data.When you again try to extend(in MM01) the basic data may not be required.

So try to record the fileds and screen sequences differently in extending a material than in creation.

My advice would be to use the function module BAPI_MATERIAL_SAVEDATA to create and extend the material master

Vinod_Chandran
Active Contributor
0 Kudos
103

Can you answer the following.

Are you using LSMW?

How are you calling the second bi from the first?

Vinod

0 Kudos
103

hi!

i am not using lsmw.

i am calling them through call function.

i know which bi to use because i check first of all in

table marc.

if matnr doesnt exist i use create ' if it exist i use extend

infant

0 Kudos
103

The question was how do you create the batch input?

Is it a recording?

Message was edited by: Vinod C

0 Kudos
103

hi!

yes its a recording.

0 Kudos
103

Hi Yifat,

Have you recorded separately for the material extension?

Could you let me know the field name for which the value is missing?

Vinod

0 Kudos
103

hi!

yes i recorded separately for the extended.

i used the same views as in create basic data 1 + 2

classification purchasing accounting 1.

the missing field is in purchasing.

the field name is purchasing group(ekgrp).

thanks a lot

yifat

0 Kudos
103

I have tested and do not have any problem with the purchasing group field. I would suggest you to re-record the transaction for material extension.

0 Kudos
103

hi!

i recorded it but i still getting the same problem,

so i decided to use bapi_material_savedata.

it works fine except two problems:

1.in the CLIENTDATA bapi-mara-BASE_UOM i put 'pc'

but when it runs it updates 'st'.

that's because the field is empty. i couldn't find the relevant table where i can see the iso field for 'pc'.

2. i need to update also classification field and i couldn't find it in the header of the bapi

thanks

0 Kudos
103

Hi,

For some fields SAP store an internal value. In this case for PC, ST is stored. So it will be fine.

If you want to check this, go to the domain of the field and get the convertion routine (for unit it is CUNIT).

Now take SE37 and check for CUNIT. You will get function modules like,

CONVERSION_EXIT_CUNIT_INPUT

CONVERSION_EXIT_CUNIT_OUTPUT

First one is to convert to internal format and second one to convert to external format. You can test this.

I think clasification is not a part of the material master. You need to update using BAPI_OBJCL_CREATE_KEY.

Check the documentation of this fn. module.

Also check this.

Please assign points if your problem is solved.

Vinod

Message was edited by: Vinod C