Listing 7.13  ZPTB00_OBJ_BTA_EDIT  Geschftsvorfall editieren
FUNCTION zptb00_obj_bta_edit.
*"----------------------------------------------------
*"*"Lokale Schnittstelle:
*"  CHANGING
*"     REFERENCE(C_STR_BTA) TYPE  ZPTB00_STR_BTA 
*"       OPTIONAL
*"----------------------------------------------------
DATA:
  l_str_item type ZPTB00_BTAITEM.

  IF c_str_bta IS INITIAL.
* Just add one line to the position by default
    APPEND l_str_item TO c_str_bta-tab_item.
  ENDIF.

* Make manual posting global for dynpro
  MOVE-CORRESPONDING c_str_bta TO g_str_bta.
* Call edit screen
  CALL SCREEN 0100.
* If the user pressed save and everthing is fine,
* then g_str_bta is filled with user input
* otherwise the structure is initial
* move edited data back to our interface variable
    MOVE-CORRESPONDING g_str_bta TO c_str_bta.
ENDFUNCTION.