Loop at Screen MIGO additional tab

333 Views Asked by At

I'm working on additional bar in transaction MIGO regarding this tutorial: https://blogs.sap.com/2013/06/14/how-to-create-a-custom-tab-for-migo-item-details/

This solution uses two screens to present the data, as shown in the blog post: copy of https://blogs.sap.com/wp-content/uploads/2013/06/6_231309.jpg

Is it possible to present them using one screen? I was thinking of using a loop, but I don't have much idea how to use it.

My PBO:

METHOD if_ex_mb_migo_badi~pbo_detail.
  DATA: wa_extdata  TYPE BAND_SCREEN_FIELD.
  DATA :gf_class_id TYPE migo_class_id.
  gf_class_id = 'CLASS_NAME'.
  CHECK i_class_id = gf_class_id.
  IF g_no_input IS INITIAL.
    e_cprog   = 'SAPLNAME_FG'.
    e_dynnr   = '9001'.
    e_heading = 'HZZZ'(001).
  ELSE.
    e_cprog   = 'SAPLNAME_FG'.
    e_dynnr   = '9002'.
    e_heading = 'HZZZ'(001).
  ENDIF.
  g_line_id = i_line_id.
  READ TABLE gt_extdata INTO wa_extdata WITH KEY line_id = g_line_id.
  IF sy-subrc = 0 AND wa_extdata-mblnr IS NOT INITIAL AND wa_extdata-mjahr IS NOT INITIAL AND wa_extdata-zeile IS NOT INITIAL.
    SELECT SINGLE * FROM Z_TABLE
    CLIENT SPECIFIED INTO CORRESPONDING FIELDS OF wa_extdata
    WHERE mandt = sy-mandt
    AND   mblnr = wa_extdata-mblnr
    AND   mjahr = wa_extdata-mjahr
    AND   zeile = wa_extdata-zeile.

    SET PARAMETER ID:
                  'ZFIELD1' FIELD wa_extdata-ZFIELD1,
                  'ZFIELD2' FIELD wa_extdata-ZFIELD2.
  ELSE.
    SET PARAMETER ID:
                  'ZFIELD1' FIELD space,
                  'ZFIELD2' FIELD space.
  ENDIF.

  ENDMETHOD.

Solution with two screens is working, however I need to try create solution with one screen.

0

There are 0 best solutions below