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

Using MB_MIGO_BADI

stefan_kolev4
Participant
0 Likes
2,443

I'm using method LINE_MODIFY in MB_MIGO_BADI in order to concatenate material description and size after material number choosing. Below is my code !

select single groes into p_groes

from mara

where matnr = cs_goitem-matnr.

select single maktx into p_maktx

from makt

where matnr = cs_goitem-matnr

and spras = sy-langu.

concatenate p_maktx p_groes into p_all SEPARATED BY space.

cs_goitem-maktx = p_all.

The field which I want to fill is goitem-maktx.

How to transfer value of cs_goitem-maktx to goitem-maktx ?

Stefan

I'm using method LINE_MODIFY in MB_MIGO_BADI in order to concatenate material description and size after material number choosing. Below is my code !

select single groes into p_groes

from mara

where matnr = cs_goitem-matnr.

select single maktx into p_maktx

from makt

where matnr = cs_goitem-matnr

and spras = sy-langu.

concatenate p_maktx p_groes into p_all SEPARATED BY space.

cs_goitem-maktx = p_all.

The field which I want to fill is goitem-maktx.

How to transfer value of cs_goitem-maktx to goitem-maktx ?

Stefan

12 REPLIES 12
Read only

Former Member
0 Likes
2,087

Hi,

If you have passed the description in cs_goitem-maktx that is enough. It will reflect in the goitem-maktx.

Read only

0 Likes
2,087

Acctualy I did it, but it don't fill the field.

As you can see in my code I'm concatenating two variables in variable p_all. Afterwards I give that value to cs_goitem-maktx.

Stefan

Read only

former_member376453
Contributor
0 Likes
2,087

If check the BADI defination CS_GOITEM actually holds the ref of GOITEM and this is a changing parameter in the BADi, so as Avinash said, just passed your data to cs_goitem structure, it will reflect in go item.

Kuntal

Read only

0 Likes
2,087

Hi,

cs_goitem holds type ref. to GOITEM and its type is "changing", but nothing happens.

When I push the button 'Signature' I can see 'Parameter CS_GOITEM' 'Type spec. TYPE GOITEM'.

Stefan

Read only

0 Likes
2,087

Hi again,

I did some debugging and mentioned that when IF_EX_MB_MIGO_BADI~LINE_MODIFY method ends the field cs_goitem-maktx returns its previous value ???

Stefan

Read only

0 Likes
2,087

I have no idea why its not happening to you. Please check whether your implementation is active or not. Are are getting some value in Goitem, or its just balnk.

Read only

0 Likes
2,087

Its a changing parameter, so if you change the value correctly, then it will not return the previous value.

One standard implementation of this BADI is there : OIB_MIGO_BADI_TST you can check this for your reference.

Kuntal

Edited by: Kuntal Nandi on Mar 10, 2009 9:41 AM

Read only

0 Likes
2,087

In debugging mode I can't check GOITEM, only cs_goitem. ???

Stefan

Read only

0 Likes
2,087

Dear Kuntal,

Please have a look on my code !

method IF_EX_MB_MIGO_BADI~LINE_MODIFY.

break skolev.

data: p_groes type mara-groes.

data: p_maktx type makt-maktx.

data: p_all type goitem-maktx.

data: p_len type p.

select single groes into p_groes

from mara

where matnr = cs_goitem-matnr.

select single maktx into p_maktx

from makt

where matnr = cs_goitem-matnr

and spras = sy-langu.

concatenate p_maktx p_groes into p_all SEPARATED BY space.

p_len = strlen( p_all ).

cs_goitem-maktx = p_all.

    • CALL METHOD cs_GOITEM->HOLD_DATA_SAVE( ).

*

*

break skolev.

endmethod.

Read only

stefan_kolev4
Participant
0 Likes
2,087

Solved

Read only

0 Likes
2,087

Hi, please tell me how did you solve this problem.

Best Regards

Read only

0 Likes
2,087

Dear Stefan,

i am from Sri Lanka,

and also failing with same issue, update cs_goitem

but it says "BADI: you are not allowed to change the field content of GOITEM-ZZADDFIELD

how can i solved this issue?