2010 May 18 6:38 AM
Hi Gurus,
For adding additional tab strip in the details data of MIGO Transaction i have created zmb_migo_badi
but in the method LINE_MODIFY the data structure GOITEM is appearing as empty.And my condition below is not working
method IF_EX_MB_MIGO_BADI~LINE_MODIFY.
if cs_goitem-mblnr is NOT INITIAL.
flag = 'X'.
ENDIF.
endmethod.
Thanks in Advance,
Please help me.
Regards,
Archana
Hi Gurus,
For adding additional tab strip in the details data of MIGO Transaction i have created zmb_migo_badi
but in the method LINE_MODIFY the data structure GOITEM is appearing as empty.And my condition below is not working
method IF_EX_MB_MIGO_BADI~LINE_MODIFY.
if cs_goitem-mblnr is NOT INITIAL.
flag = 'X'.
ENDIF.
endmethod.
Thanks in Advance,
Please help me.
Regards,
Archana
2010 May 18 6:50 AM
Hi Archana,
See the documentation of the method LINE_MODIFY and sample code. Check whether you have missed any step there.
--
Reddy
2010 May 18 7:14 AM
Hi,
This is the code there in documentation.
DATA: ls_extdata_old TYPE zsmigo, "structure for user defined table
ls_extdata_new TYPE zsmigo, " structure for user defined table
ls_migo_badi_exampl TYPE zmigo_badi, " user defined table
GT_EXTDATA type ty_tmigo, "table type of user defined table
l_subrc TYPE sy-subrc.
Get external data from internal table:
READ TABLE gt_extdata INTO ls_extdata_old
WITH TABLE KEY line_id = i_line_id.
l_subrc = sy-subrc.
Update data in internal table:
IF l_subrc <> 0.
Line is new: If GOITEM has a reference to a material document,
the already existing external data can be read.
IF NOT cs_goitem-mblnr IS INITIAL AND NOT cs_goitem-mjahr IS INITIAL
AND NOT cs_goitem-zeile IS INITIAL.
SELECT SINGLE * FROM zmigo_badil INTO ls_migo_badi_exampl
WHERE mblnr = cs_goitem-mblnr
AND mjahr = cs_goitem-mjahr
AND zeile = cs_goitem-zeile.
IF sy-subrc = 0.
MOVE-CORRESPONDING ls_migo_badi_exampl TO ls_extdata_new.
ENDIF.
ENDIF.
ls_extdata_new-sgtxt = cs_goitem-sgtxt.
ls_extdata_new-line_id = i_line_id.
INSERT ls_extdata_new INTO TABLE gt_extdata.
ELSE.
Line exists: Get external data entered on BAdI-subscreeen, but only
if line_modify was called for the item displayed in the
'detail tabstrip'.
check g_line_id = i_line_id.
CALL FUNCTION 'MIGO_BADI_EXAMPLE_GET_DATA'
IMPORTING
es_migo_badi_screen_fields = ls_extdata_new.
ls_extdata_new-line_id = i_line_id.
if ls_extdata_new-sgtxt <> ls_extdata_old-sgtxt.
Field was changed on external screen
cs_goitem-sgtxt = ls_extdata_new-sgtxt.
else.
Take data from GOITEM
ls_extdata_new-sgtxt = cs_goitem-sgtxt.
endif.
MODIFY TABLE gt_extdata FROM ls_extdata_new.
ENDIF.
but i require all this.
i'm not getting GOITEM Structure details in all methods of this implementation
i dont no y im not getting GOITEM detials
i want to display the user field in display of migo material doocument thats y i written the above code
of flag = 'x'.
and its not working
Regards,
Archana.
2010 May 18 7:24 AM
2010 May 18 8:07 AM
Thanks For your reply,
i tried this code
can you please tell me im_item is of which type here.
data: ls_MSEG type TY_T_MSEG.
ls_MSEG = im_item->get_data( ).
Regards,
Archana
2010 May 18 8:17 AM
Hi,
Actually the problem is similar to me
*************************************
As u asked me, to use line_modify method, bt cs_goitem attribute doesnt contain any data when i clicked on OK_ITEM field so how to fech material for that line item. if i use check_item method, I get line item id which i clicked bt how to get material for that which is in Purchase order.
*********************************
As mentioned in the above link:
Anyway your reply is helpfull to me
Thanks
2010 May 18 8:35 AM
2010 May 19 11:06 AM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |