0

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.

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
  • You already indicate in the title the possible solution ("loop at screen" to change the properties of screen fields, like read-only). You're on the right track. I think you are confusing a "PBO" and the method `PBO_DETAIL` in your post. The PBO (Process Before Output) is part of the "Flow Logic" of a screen (i.e. 9001 or 9002 in your case), during which you can execute a "Module" which will execute `loop at screen`. Please try again, and revert back if you can't succeed. Please ask a precise question/title. Don't refer to external content, all must be described inside Stack Overflow. – Sandra Rossi Jul 13 '23 at 16:03

0 Answers0