Skip to Content
author's profile photo Former Member
Former Member

MB_MIGO_BADI line item refresh

Hello All,

I have created a Z* report in which I'm generating a number against material document & line item.

If the Number is generated against the document & line item, it should not allow user to cancel it.

for this i implemented ZMB_MIGO_BADI~LINE_MODIFY & ZMB_MIGO_BADI~CHECK_ITEM

Below is the code which i've written....

for some line item it is working fine & for some it is not working

I'm not getting where i'm going wrong......

ZMB_MIGO_BADI~LINE_MODIFY


DATA: gs_goitem TYPE goitem.

READ TABLE gt_goitem INTO gs_goitem WITH KEY zeile = i_line_id.

IF sy-subrc = 0.

MODIFY gt_goitem FROM cs_goitem INDEX i_line_id.

ELSE.

APPEND cs_goitem TO gt_goitem.

ENDIF.




ZMB_MIGO_BADI~CHECK_ITEM


zeile = i_line_id.

READ TABLE gt_goitem INTO gs_goitem WITH key zeile = zeile.


select SINGLE * from zdebit_note INTO wa_zdebtab WHERE refbn = gs_goitem-mblnr

AND refbz = gs_goitem-zeile.

if sy-subrc = 0.

wa_return-type = 'E'.

wa_return-id = 'ZREV'.

wa_return-number = '002'.

append wa_return to et_bapiret2.

clear: wa_return.

endif.




Regards,

Hardik B

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Oct 21, 2015 at 08:42 AM

    Anybody ?????

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 21, 2015 at 09:58 AM

    If I use it like this

    import zmblnr to zmblnr from memory id 'MBLNR'.


    select single * from zdebit_note into wa_zdebtab where refbn = zmblnr

    and refbz = zeile.

    if sy-subrc = 0.

    wa_return-type = 'E'.

    wa_return-id = 'ZREV'.

    wa_return-number = '002'.

    append wa_return to et_bapiret2.

    clear: wa_return.

    endif.



    still it it not working



    Please reply....

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.