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

Change Material using IDOC_INPUT_MATMAS01

Former Member
0 Likes
2,235

Hi all,

we have some custom tables and these tables contains material related data. by reading data from these tables

i am creating material using function moudule INBOUND_IDOC_PROCESS .once after material creation i am updating all custom tables with newly created material.

its working fine.

later,if i change data in custom tables i must also change the material master using idoc functions

for this i am using function IDOC_INPUT_MATMAS01.

but its not working...

is anyone worked with this kind of requirement..?

if so, plz respond to this asap.

Thanks in advance.

Hi all,

we have some custom tables and these tables contains material related data. by reading data from these tables

i am creating material using function moudule INBOUND_IDOC_PROCESS .once after material creation i am updating all custom tables with newly created material.

its working fine.

later,if i change data in custom tables i must also change the material master using idoc functions

for this i am using function IDOC_INPUT_MATMAS01.

but its not working...

is anyone worked with this kind of requirement..?

if so, plz respond to this asap.

Thanks in advance.

8 REPLIES 8
Read only

Former Member
0 Likes
1,786

instead of this, u can try with BAPI: BAPI_IDOC_INPUT1.

Read only

former_member194669
Active Contributor
0 Likes
1,786

Within the same box , for creating a material why are you using IDOC_INPUT_MATMAS01. simply use fm MATERIAL_MAINTAIN_DARK or use BAPI_MATERIAL_SAVEDATA

Read only

0 Likes
1,786

we have some custom fields in mm01 transaction which are not available in bapi structures.

i just want to know how can we update material master using idoc functions.

Thanks,

sara

Edited by: sara p on Jan 7, 2008 9:03 PM

Read only

0 Likes
1,786

we have some custom fields in mm01 transaction which are not available in bapi structures.

i just want to know how can we update material master using idoc functions.

Thanks,

sara

Read only

0 Likes
1,786

The function module IDOC_INPUT_MATMAS01 is internally ALSO calls the function module MATERIAL_MAINTAIN_DARK . If you are extended the MARA table using ZMARA (append structure) then this function module taken care the updating custom fields in the MARA table.

other wise if you are maintaining the custom fields in a separate custom table then first call MATERIAL_MAINTAIN_DARK and after that use direct update to custom table after checking the sy-subrc value of function module (retruning from )

Read only

0 Likes
1,786

Thanks to quick reply.

here is small exaple.

i created material using FM INBOUND_IDOC_PROCESS

this material has sales text which i am reading from my custom table and populating to E1MTXHM and E1MTXLM segments.

And now, once after material creation if someone change sales text data in my custom table. i have to update this based on some checks.

i am reading the changed data into the same segments and

this time i am changing MSGFN = '004'. and calling IDOC_INPUT_MATMAS01 FM to update.

But its not.

[i can't use BAPI as i am using extended Idoc]

Read only

0 Likes
1,786

Hi,

Check for the IDOC user exit includes, so that you can write the code to update the customized tables.

Regards,

Satya

Read only

0 Likes
1,786

Hi all,

what Idoc Function Module do we use to update Material...?