mirror of
https://github.com/abapGit/abapGit.git
synced 2025-05-01 12:20:51 +08:00
parent
942361be6e
commit
532a71de79
|
@ -119,6 +119,52 @@ FORM branch_popup TABLES tt_fields TYPE ty_sval_tt
|
||||||
|
|
||||||
ENDFORM. "branch_popup
|
ENDFORM. "branch_popup
|
||||||
|
|
||||||
|
FORM package_popup TABLES tt_fields TYPE ty_sval_tt
|
||||||
|
USING pv_code TYPE clike
|
||||||
|
CHANGING cs_error TYPE svale
|
||||||
|
cv_show_popup TYPE c
|
||||||
|
RAISING lcx_exception ##called ##needed.
|
||||||
|
* called dynamically from function module POPUP_GET_VALUES_USER_BUTTONS
|
||||||
|
|
||||||
|
DATA: ls_package_data TYPE scompkdtln.
|
||||||
|
|
||||||
|
FIELD-SYMBOLS: <ls_fbranch> LIKE LINE OF tt_fields.
|
||||||
|
|
||||||
|
CLEAR cs_error.
|
||||||
|
|
||||||
|
IF pv_code = 'COD1'.
|
||||||
|
cv_show_popup = abap_true.
|
||||||
|
|
||||||
|
CALL FUNCTION 'FUNCTION_EXISTS'
|
||||||
|
EXPORTING
|
||||||
|
funcname = 'PB_POPUP_PACKAGE_CREATE'
|
||||||
|
EXCEPTIONS
|
||||||
|
function_not_exist = 1
|
||||||
|
OTHERS = 2.
|
||||||
|
IF sy-subrc = 1.
|
||||||
|
* looks like the function module used does not exist on all
|
||||||
|
* versions since 702, so show an error
|
||||||
|
lcx_exception=>raise( 'Function module PB_POPUP_PACKAGE_CREATE does not exist' ).
|
||||||
|
ENDIF.
|
||||||
|
|
||||||
|
CALL FUNCTION 'PB_POPUP_PACKAGE_CREATE'
|
||||||
|
CHANGING
|
||||||
|
p_object_data = ls_package_data
|
||||||
|
EXCEPTIONS
|
||||||
|
action_cancelled = 1.
|
||||||
|
IF sy-subrc = 1.
|
||||||
|
RETURN.
|
||||||
|
ENDIF.
|
||||||
|
|
||||||
|
lcl_sap_package=>create( ls_package_data ).
|
||||||
|
COMMIT WORK.
|
||||||
|
|
||||||
|
READ TABLE tt_fields ASSIGNING <ls_fbranch> WITH KEY tabname = 'TDEVC'.
|
||||||
|
ASSERT sy-subrc = 0.
|
||||||
|
<ls_fbranch>-value = ls_package_data-devclass.
|
||||||
|
ENDIF.
|
||||||
|
ENDFORM. "package_popup
|
||||||
|
|
||||||
FORM output.
|
FORM output.
|
||||||
DATA: lt_ucomm TYPE TABLE OF sy-ucomm.
|
DATA: lt_ucomm TYPE TABLE OF sy-ucomm.
|
||||||
PERFORM set_pf_status IN PROGRAM rsdbrunt IF FOUND.
|
PERFORM set_pf_status IN PROGRAM rsdbrunt IF FOUND.
|
||||||
|
|
|
@ -241,7 +241,10 @@ CLASS lcl_popups IMPLEMENTATION.
|
||||||
METHOD repo_new_offline.
|
METHOD repo_new_offline.
|
||||||
|
|
||||||
DATA: lv_returncode TYPE c,
|
DATA: lv_returncode TYPE c,
|
||||||
lt_fields TYPE TABLE OF sval.
|
lt_fields TYPE TABLE OF sval,
|
||||||
|
lv_icon_ok TYPE icon-name,
|
||||||
|
lv_button1 TYPE svalbutton-buttontext,
|
||||||
|
lv_icon1 TYPE icon-name.
|
||||||
|
|
||||||
FIELD-SYMBOLS: <ls_field> LIKE LINE OF lt_fields.
|
FIELD-SYMBOLS: <ls_field> LIKE LINE OF lt_fields.
|
||||||
|
|
||||||
|
@ -250,17 +253,28 @@ CLASS lcl_popups IMPLEMENTATION.
|
||||||
_add_dialog_fld 'ABAPTXT255' 'LINE' 'Name' '' ''.
|
_add_dialog_fld 'ABAPTXT255' 'LINE' 'Name' '' ''.
|
||||||
_add_dialog_fld 'TDEVC' 'DEVCLASS' 'Package' '' ''.
|
_add_dialog_fld 'TDEVC' 'DEVCLASS' 'Package' '' ''.
|
||||||
|
|
||||||
CALL FUNCTION 'POPUP_GET_VALUES'
|
lv_icon_ok = icon_okay.
|
||||||
|
lv_button1 = 'Create package' ##NO_TEXT.
|
||||||
|
lv_icon1 = icon_folder.
|
||||||
|
|
||||||
|
CALL FUNCTION 'POPUP_GET_VALUES_USER_BUTTONS'
|
||||||
EXPORTING
|
EXPORTING
|
||||||
no_value_check = abap_true
|
popup_title = 'New Offline Project'
|
||||||
popup_title = 'New Offline Project' "#EC NOTEXT
|
programname = sy-repid
|
||||||
|
formname = 'PACKAGE_POPUP'
|
||||||
|
ok_pushbuttontext = ''
|
||||||
|
icon_ok_push = lv_icon_ok
|
||||||
|
first_pushbutton = lv_button1
|
||||||
|
icon_button_1 = lv_icon1
|
||||||
|
second_pushbutton = ''
|
||||||
|
icon_button_2 = ''
|
||||||
IMPORTING
|
IMPORTING
|
||||||
returncode = lv_returncode
|
returncode = lv_returncode
|
||||||
TABLES
|
TABLES
|
||||||
fields = lt_fields
|
fields = lt_fields
|
||||||
EXCEPTIONS
|
EXCEPTIONS
|
||||||
error_in_fields = 1
|
error_in_fields = 1
|
||||||
OTHERS = 2.
|
OTHERS = 2.
|
||||||
IF sy-subrc <> 0.
|
IF sy-subrc <> 0.
|
||||||
lcx_exception=>raise( 'Error from POPUP_GET_VALUES' ).
|
lcx_exception=>raise( 'Error from POPUP_GET_VALUES' ).
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user