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

mb_migo_badi not working in display mode

Hello Friends,

I have used mb_migo_badi to add custom fields at item level and its working fine for creation and calncelation process but after doing migo when i check the created mat doc in display mode my custom fields are showing null values and its showing correct values in cancellation mode.

By analysing the code i came to knw in display mode its not triggering line_modify method.

pls suggest what can be the reason.

Regards,

Sunny

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

6 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Mar 13, 2009 at 07:19 AM

    Hi Sunny,

    There is another method PUBLISH_MATERIAL_ITEM

    This is to check and display the data that has been modified by LINE_MODIFY method previously.

    If this method is getting called I guess it would display the details. You may need to implement this method also. Please check.

    Line_modify is for Add/Change line item( see the documentation for this )

    Regds,

    Gaurav

    Edited by: Gaurav P Fadnis on Mar 13, 2009 8:19 AM

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 13, 2009 at 07:40 AM

    Hi,

    Add new Tab to MIGO...Create a BADI implementation for MB_MIGO_BADI ..

    Create a program with the screen type sub-screen in SE80 and design the layout for the custom fields.

    Declare the custom fields in a Z**TOP include.

    Under the PBO method declare the program name and screen number ....

    Under PAI method declare the field to u2018Xu2019.

    Under the line modify method declare a flag and set to u2018Xu2019 checking for material document number by which we can set the fields to be in display mode when we open MIGO for display of material document created after doing goods receipt

    Under the POST_DOCUMENT method write the code for appending the value to Z table along with the values of the line item (In this case production order number, material, u2026u2026.). For these values to be available here in this method use the memory concept u201CExport to memory idu201D in the method LINE_MODIFY.

    In order to do any validations to the custom fields, go to transaction SE80 and mention the program Name created and in PROCESS ON VALUE_REQUEST create a module and provide the validations required for those custom Fields.

    In order to make the fields to be in display mode during the display of material document, create a module under PBO and import the flag value and the production order number details in the method LINE_MODIFY and if that flag = u2018Xu2019, use

    loop at screen.

    if screen name = ' '.

    screen-input = '0'.

    modify screen.

    endif.

    endloop.

    Edited by: Shailaja Ainala on Mar 13, 2009 8:41 AM

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 19, 2009 at 12:59 PM

    solved by my own

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 22, 2009 at 06:28 AM

    Can you please tell me, how did you get solution. Even I am facing the same problem. I can post data from migo customised tab into Z table while saving MIGO.But while displaying I am not able to display data in customised tab(subscreen). To fetch data from my z table I am not getting material doc.no. which is key field in my z table.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 22, 2009 at 06:30 AM

    Can you please tell me, how did you get solution. Even I am facing the same problem. I can post data from migo customised tab into Z table while saving MIGO.But while displaying I am not able to display data in customised tab(subscreen). To fetch data from my z table I am not getting material doc.no. which is key field in my z table.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Sunny

      I too have same problem i am creating and tab and a input field in migo_tr transaction in my case the data is getting saved in MSEG table but when i display the material document the zfield whcihc ihave created is not getting displayed. please help me.

      Thanks

  • author's profile photo Former Member
    Former Member
    Posted on Oct 11, 2010 at 09:52 PM

    Try this in PBO_DETAIL Method:

    METHOD if_ex_mb_migo_badi~pbo_detail.

    DATA: ls_extdata TYPE zstr_23_badi_val_fob,

    ls_z23_val_fob_migo TYPE z23_val_fob_migo,

    ls_goitem TYPE goitem,

    v_campo TYPE string.

    FIELD-SYMBOLS <fs> TYPE goitem.

    • This check is obligatory, otherwise the program flow is incorrect

    • (If there would be more than one implementation of BAdI MB_MIGO_BADI,

    • only one subscreen would be displayed).

    CHECK i_class_id = gf_class_id.

    • Show screen only if there is an item

    CHECK i_line_id <> 0.

    • External subscreen:

    • The content of global field G_NO_INPUT (set in method MODE_SET) will

    • influence the number of external subsreen:

    IF g_no_input IS INITIAL.

    e_cprog = 'SAPLZMM_VALOR_FOB_MIGO'.

    e_dynnr = '0001'. "External fields: Input

    e_heading = 'Valor FOB'.

    ELSE.

    e_cprog = 'SAPLZMM_VALOR_FOB_MIGO'.

    e_dynnr = '0002'. "External fields: Display

    e_heading = 'Valor FOB'.

    ----


    • Se cargan los datos externos para el display *

    ----


    v_campo = '(SAPLMIGO)GOITEM'.

    ASSIGN (v_campo) TO <fs>.

    ls_goitem = <fs>.

    READ TABLE gt_extdata INTO ls_extdata

    WITH TABLE KEY line_id = i_line_id.

    IF sy-subrc <> 0.

    IF NOT ls_goitem-mblnr IS INITIAL AND

    NOT ls_goitem-mjahr IS INITIAL AND

    NOT ls_goitem-zeile IS INITIAL.

    SELECT SINGLE * FROM z23_val_fob_migo INTO ls_z23_val_fob_migo

    WHERE mblnr = ls_goitem-mblnr

    AND mjahr = ls_goitem-mjahr

    AND zeile = ls_goitem-zeile.

    IF sy-subrc = 0.

    MOVE-CORRESPONDING ls_z23_val_fob_migo TO ls_extdata.

    ls_extdata-line_id = i_line_id.

    INSERT ls_extdata INTO TABLE gt_extdata.

    ENDIF.

    ENDIF.

    ENDIF.

    ----


    ENDIF.

    • Set G_LINE_ID (= line_id of item displayed on detail-tabstrip)

    g_line_id = i_line_id.

    • Read data

    READ TABLE gt_extdata INTO ls_extdata

    WITH TABLE KEY line_id = i_line_id.

    • Export data to function group (for display on subscreen)

    CALL FUNCTION 'Z_MM_VAL_FOB_BADI_02'

    EXPORTING

    data_screen_fields = ls_extdata.

    ENDMETHOD. "IF_EX_MB_MIGO_BADI~PBO_DETAIL

    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.