METHOD on_user_command. DATA: lv_retc TYPE c, lt_fields TYPE TABLE OF sval, ls_rows TYPE lvc_s_row, lt_rows TYPE lvc_t_row, lv_answer TYPE char1, lt_royriutil TYPE TABLE OF ztsdo_royriutil, ls_royriutil TYPE ztsdo_royriutil, ls_h TYPE ztsdo_condcontrh, ls_d TYPE ztsdo_condcontrd. CASE e_salv_function. WHEN 'NEW'. IF rb_cdc = 'X'. CLEAR gs_condiz. CALL SCREEN 100 STARTING AT 5 5 ENDING AT 80 20. ELSE. APPEND VALUE #( tabname = 'TVKBT' fieldname = 'VKBUR' fieldtext = 'Territory' ) TO lt_fields. APPEND VALUE #( tabname = 'ZTSDO_ROYRIUTIL' fieldname = 'ZINCSTOCKPREC' ) TO lt_fields. APPEND VALUE #( tabname = 'ZTSDO_ROYRIUTIL' fieldname = 'ZINCSTOCKSUCC' ) TO lt_fields. CALL FUNCTION 'POPUP_GET_VALUES' EXPORTING popup_title = 'Nuova riga' IMPORTING returncode = lv_retc TABLES fields = lt_fields EXCEPTIONS error_in_fields = 1 OTHERS = 2. IF sy-subrc <> 0. MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno. ENDIF. CHECK lv_retc <> 'A'. gs_terri-zvkbur = lt_fields[ 1 ]-value. SELECT SINGLE bezei FROM tvkbt INTO gs_terri-bezei WHERE spras = sy-langu AND vkbur = gs_terri-zvkbur. IF sy-subrc <> 0. MESSAGE |Non valido: Territory { gs_terri-zvkbur }| TYPE 'I'. EXIT. ELSE. gs_terri-zincstockprec = lt_fields[ 2 ]-value. gs_terri-zincstocksucc = lt_fields[ 3 ]-value. APPEND gs_terri TO gt_terri. go_alv->refresh( ). ENDIF. ENDIF. WHEN 'ANNU'. [...] WHEN 'SAVE'. [...] WHEN 'CONF'. [...] ENDCASE. ENDMETHOD.
mercoledì 11 agosto 2021
Popup per ottenere valori
Iscriviti a:
Commenti sul post (Atom)
Nessun commento:
Posta un commento