FM Popup-Window with input field

Include LZPOPUPTOP

function-pool zpopup.                       "MESSAGE-ID ..
 
data: i_title   type char50,
      textline1 type char80,
      textline2 type char80,
      textmenge type i,
      l_antwort type char1,
      txt_wert  type char30.
* INCLUDE LZPOPUPD...                        " Local class definition

function zsd_popup_text_input .
*"----------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*"  IMPORTING
*"     VALUE(IV_TITLE) TYPE  STRING
*"     VALUE(I_TEXT) TYPE  C
*"  EXPORTING
*"     VALUE(E_COUNT) TYPE  INT4
*"     VALUE(ANSWER)
*"  EXCEPTIONS
*"      CANCELLED
*"----------------------------------------------------------------------
 
  i_title = iv_title.
  answer = '2'.
 
  call function 'TEXT_SPLIT'
    exporting
      length = 40
      text   = i_text
    importing
      line   = textline1
      rest   = textline2.
 
  textmenge = 0.
  txt_wert = text-001.
 
  call screen 0500 starting at 5 10.
 
  " Return results:
  answer = l_antwort.
  e_count = textmenge.
 
endfunction.
 
module pbo0500_status output.
 
  set titlebar 'TEXT_INPUT' with i_title.
  set pf-status 'ZPOPUP'.
 
  case sy-ucomm.
    when 'YES'.
      l_antwort = '1'.
      leave to screen 0.
 
    when 'NO'.
      l_antwort = '2'.
      leave to screen 0.
  endcase.
 
endmodule.
 
form pai0500_user_command .
  set screen 0.
  leave screen.
endform.

Добавить комментарий



All fields are required. Your email address will not be published.