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: 

MB_MIGO_BADI IMPLEMENTATION

Former Member
0 Kudos

Hi ALL!!!

PLEASE HELP!!!

I have to implement MB_MIGO_BADI .

The problem is HOW to save custom data in MSEG table after POST in MIGO transaction???

1 ACCEPTED SOLUTION

Former Member

This message was moderated.

21 REPLIES 21

Former Member
0 Kudos

Hi Diana,

Relax.

To implement BAdI you will have to use transaction SE19.

Please follow steps -

SE19

Enter ZMB_MIGO_BADI

Select 'Create'

Enter Definition name as MB_MIGO_BADI.

Modify Method POST_DOCUMENT as per your requirement. To get proper coding.

Goto SE18 -> Enter BADI definition as MB_MIGO_BADI

From Menu

GOTO->Sample Code ->Display ( and you will get all methods, double click on any method to get sample code.

Hope this will help.

Regards.

Pras

Former Member
0 Kudos

Diana,

In addition to my previous post, if your MSEG tableis having custom fields, it will be automatically populated in POST_DOCUMENT method.

So don't worry, it is quite easy.

If you need any help, please do let me know.

Warm Regards.

Pras

0 Kudos

Hi Diana,

If you find my suggestions useful, please award few points.

Thanks and Warm Regards.

Pras

0 Kudos

Hi Pras Durafe !!!

Thank you very much for your help!

You said:

"In addition to my previous post, if your MSEG tableis having custom fields, it will be automatically populated in POST_DOCUMENT method."

But I have added this field to MSEG so it's a new field. My question was HOW this field's value is inserted/saved in MSEG table??? May be there is a function module or a structer?

0 Kudos

Hi Diana,

Can you tell me your exact requirement.

May be I will be able you to suggest a function module which updates MSEG.

Thanks and Warm Regards.

Pras

0 Kudos

Yea.

I have added a new field in the tabstrip(which I have created-new subscreen) in transaction MIGO and

I have to SAVE its value in the table MSEG right after the user presses the POST button. I cant insert it directly I have to use an existing SAP object (like structure, function module, method's parametr etc.)

Please write your suggestion.

Thank you very much .

Regards

DIANA

0 Kudos

Pras Durafe !!!

Where are you??????????

0 Kudos

Hi Diana,

I got busy yesterday so could not check this BAdI details.

If you goto SE18 - MB_MIGO_BADI - check its documentation. You will find details related to custom fields. For easier comprehension, an example code has been created for the BAdI MB_MIGO_BADI. The example implementation class is CL_EXM_IM_MB_MIGO_BADI.

To activate the example implementation, use transaction SE19 to create a new implementation and then activate it. Copy the example code with Goto -> Sample Code -> Copy.

The tabstrip controls MIGO BAdI Example are then displayed in MIGO for the header and detail information.

Hope this will help.

Please award few points if it serves your problem.

All the best Diana.

Warm Regards.

Pras Durafe

0 Kudos

Hi Pras Durafe !!!

I already tried this.

No luck.

0 Kudos

Hi,

try this, I hope it will help for you

in the post document interface you insert the code.

CALL FUNCTION 'ZTESTING1_BADI'

EXPORTING

I_MKPF = IS_MKPF

TABLES

T_MSEG = IT_MSEG.

-


In the function module

you process the t_mseg table and use this function module for posting document

CALL FUNCTION 'J_1IEXGM_BADI_POST_DOCUMENT'

EXPORTING

IS_MKPF = I_MKPF

TABLES

IT_MSEG = T_MSEG.

In badi always better to place the coding inside the Function module.

Cheers,

Sasi

0 Kudos

Thank you very much Sasi!!!

It looks like a solution, but function module 'ZTESTING1_BADI' doesnt exist..?(I have checked in SE37)

0 Kudos

Hi,

No. the function module you have to create in SE37, In my case i create a function module like that.

Import parametes is i_MKPF

tables t_mseg

in this function module you write coding as per my previous reply

Cheers,

Sasi

0 Kudos

Hi SASI!!!

I have tried but it doesn't work for me, because I cant chang IT_MSEG table in the function module because its IMPORTING parameter in the BADI method POST_DOCUMENT

May be you have another idea?

I'm tring ASSIGN with FIELD SIMBOL now but there is a problem too.

Regards.

DIANA

0 Kudos

Hi Diana,

I am also facing the same problem as you did. I hope u got the solution. Please let me know the solution. Your quick reply will help me a lot.

Regards

Surendra

0 Kudos

This message was moderated.

Former Member
0 Kudos

Hi Diana,

If have read through all the posts and if you have done and tested all the following steps as stated by Pras and it still doesn't work.

You may need to open an OSS note with SAP on this issue. This might be a bug in the BADI itself.

Regards,

Reuben

0 Kudos

This message was moderated.

Former Member

This message was moderated.

0 Kudos

It works

Thanks Boss

Former Member
0 Kudos

This message was moderated.

0 Kudos

This message was moderated.