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: 

MM01 is not creating material via bdc but with mm01 transaction

Former Member
0 Kudos
534

Hi,

I have a situation where material (specific type )created via bdc using 'MM01' transaction is not working properly (earlier it was), however material created via transaction 'MM01' directly is working.

I didn't understand the issue for specific type material.

Please Help me out.

Regards,

Ravi Pratap Singh

1 ACCEPTED SOLUTION

Former Member
0 Kudos
216

Thanks for your reply.

the code is.

PERFORM BDC_DYNPRO      USING 'SAPLMGMM' '0060'.

          PERFORM BDC_FIELD       USING 'BDC_CURSOR'

                                 'RMMG1-MATNR'.

          PERFORM BDC_FIELD       USING 'RMMG1-MATNR'

                                         YGENERATOR-GENRATOR_ID.  "Material Code

          PERFORM BDC_FIELD       USING 'BDC_CURSOR'

                                 'RMMG1-MTART'.

          CALL TRANSACTION 'MM01' USING BDCDATA MODE 'A'.

          COMMIT WORK AND WAIT.

          WAIT UP TO 5 SECONDS.

          REFRESH : BDCDATA.

          CLEAR BDCDATA.

through BDC program we pass Material Number rest exercise done manually, entry exist with user. After Entrer all the details when user 'SAVE' it will not save in MARA Table. Program Exit without any message. This activity is happening for few type of materials only, few created by same process.

I checked message during BDC run, no creation message exist. But material directly created via 'MM01' and save.


Kindly suggest.

11 REPLIES 11

former_member196331
Active Contributor
0 Kudos
216

hi, You said. however material created via transaction 'MM01' directly is working.

But That specific type is working or not you had not mentioned.

Shubham1
Advisor
Advisor
0 Kudos
216

Hello

What error / issue you are encountering in MM01 BDC?

Please share some details with screen shots.

Shubham

former_member196331
Active Contributor
0 Kudos
216

You have to track error message log And Check it any views are added Recently.

In development run it in Foreground then you can know what is the problem.

sanjeev_mishra_15aug
Active Participant
0 Kudos
216

While debugging Put a breakpoint just before using Call Transaction statement in your program.

And compare the internal table of BDCDATA with the recording done using SHDB tcode.

You will find the source of your problem can resolve.

Former Member
0 Kudos
216

Hi Ravi,

Please specify the Error message.

and the method of BDC call transaction or Session ??

Regards

Sunil

0 Kudos
216

Hi Sunil,

No error message received only success & warning message received,


Material creation message also not received.

Regards,

Ravi Pratap Singh

0 Kudos
216

Hi,

Go to SM35 and execute the BTCI in foreground mode for see where is the problem and analyse with protocol tab.

Then modify your BTCI in consequence.

The screens are probably different depending on the specific type .

In this case it is necessary that you write different BTCI by specific type.


Cordially,

Former Member
0 Kudos
217

Thanks for your reply.

the code is.

PERFORM BDC_DYNPRO      USING 'SAPLMGMM' '0060'.

          PERFORM BDC_FIELD       USING 'BDC_CURSOR'

                                 'RMMG1-MATNR'.

          PERFORM BDC_FIELD       USING 'RMMG1-MATNR'

                                         YGENERATOR-GENRATOR_ID.  "Material Code

          PERFORM BDC_FIELD       USING 'BDC_CURSOR'

                                 'RMMG1-MTART'.

          CALL TRANSACTION 'MM01' USING BDCDATA MODE 'A'.

          COMMIT WORK AND WAIT.

          WAIT UP TO 5 SECONDS.

          REFRESH : BDCDATA.

          CLEAR BDCDATA.

through BDC program we pass Material Number rest exercise done manually, entry exist with user. After Entrer all the details when user 'SAVE' it will not save in MARA Table. Program Exit without any message. This activity is happening for few type of materials only, few created by same process.

I checked message during BDC run, no creation message exist. But material directly created via 'MM01' and save.


Kindly suggest.

0 Kudos
216

I agree with Nikhil, COMMIT WORK does nothing related to the CALL TRANSACTION. If you want to wait, do call the transaction with "update mode" (see abap documentation) set to 'S' or 'L' (synchronous/local execution).

Anyway, the COMMIT WORK is not related to your issue, which is maybe due that by default a BDC stops at any COMMIT WORK executed inside the call transaction (not related to your commit work), without message. To continue the bdc, you need to call transaction with OPTIONS FROM, with field NOBIEND='X' (no batch input end (in case of commit work)).

0 Kudos
216

Thanks to All.

I used RACOMMIT = 'X' options to resolve my issue.

Thanks.

Ravi Pratap Singh

nikhil_kalawade
Explorer
0 Kudos
216

Hi Ravi,

Remove below part and try.


          COMMIT WORK AND WAIT.

          WAIT UP TO 5 SECONDS.

In BDC commit work will not work I tried once that you can try this out.

Hope this will work for you.

Regards,

Nikhil