Am besten über die SE80.
Hochnavigieren bis zur Entwicklungsklasse/Paket, Rechtsklick auf die Entwicklungsklasse. Aus dem Kontextmenü auswählen:
"Anlegen -> Weitere -> SET/GET-Parameter-ID"
Hier mal kurz ein Beispiel was den alten obsoleten Bausteinen der SAP genüge tun sollte.
Eventuell hilft das ja weiter. Wichtig ist beim Schreiben ... alle Parameter neu schreiben.
Sap nimmt dazu BAPI's und ich habe mir mal ein kleines Objekt gebastelt. Die BAPI's würden aber
ausreichen!
Gruß Horst
*&---------------------------------------------------------------------*
*& Include ZCL_NEW_USRPARA *
*&---------------------------------------------------------------------*
*----------------------------------------------------------------------*
* CLASS ZCL_NEW_USRPARA DEFINITION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS zcl_new_usrpara DEFINITION.
PUBLIC SECTION.
TYPES : i_self TYPE REF TO zcl_new_usrpara.
TYPES : ty_shortterm TYPE REF TO zcl_new_shortterm.
METHODS constructor.
CLASS-METHODS create RETURNING VALUE(ref) TYPE i_self.
METHODS get_value IMPORTING e_parid TYPE memoryid
EXPORTING i_value TYPE xuvalue
i_error TYPE sysubrc.
METHODS set_value IMPORTING e_parid TYPE memoryid
e_value TYPE xuvalue
EXPORTING i_error TYPE sysubrc.
METHODS free.
PRIVATE SECTION.
DATA : o_tpara TYPE REF TO zcl_new_tpara,
my_perma TYPE c.
TYPES : BEGIN OF ty_slave,
parid TYPE memoryid,
shortterm TYPE ty_shortterm,
utc TYPE tzntstmps,
index TYPE i.
TYPES END OF ty_slave.
DATA : ta_slave TYPE HASHED TABLE OF ty_slave
WITH UNIQUE KEY parid,
wa_slave TYPE ty_slave.
DATA : lines TYPE i,
my_value TYPE xuvalue,
my_maxanz TYPE i,
my_reorgmax TYPE i.
ENDCLASS. "zcl_new_usrpara DEFINITION
*----------------------------------------------------------------------*
* CLASS ZCL_NEW_USRPARA IMPLEMENTATION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS zcl_new_usrpara IMPLEMENTATION.
DATA : lwa_parmx TYPE bapiparamx,
lta_par TYPE STANDARD TABLE OF bapiparam,
lta_par1 TYPE STANDARD TABLE OF bapiparam1,
lwa_return TYPE bapiret2,
lta_return TYPE STANDARD TABLE OF bapiret2,
l_ok TYPE boolean.
FIELD-SYMBOLS : <lfs_par> TYPE bapiparam,
<lfs_par1> TYPE bapiparam1.
i_error = 1.
my_perma = o_tpara->get_data( e_parid ).
CHECK my_perma = 'X'. " Ist Benutzervorgabe/Festwert
CLEAR my_value.
FIELD-SYMBOLS <wa_slave> TYPE ty_slave.
READ TABLE ta_slave WITH TABLE KEY parid = e_parid
ASSIGNING <wa_slave>.
IF sy-subrc = 0.
DELETE TABLE ta_slave WITH TABLE KEY parid = e_parid.
ENDIF.
FREE lta_par.
APPEND INITIAL LINE TO lta_par ASSIGNING <lfs_par>.
<lfs_par>-parid = e_parid.
* CALL FUNCTION 'BWDT_SET_PARAMETER'
* EXPORTING
* parameter = e_parid
* value = e_value.
ENDMETHOD. "set_value
*
METHOD get_value.
DATA : lta_par TYPE STANDARD TABLE OF bapiparam,
lta_par1 TYPE STANDARD TABLE OF bapiparam1,
lta_return TYPE STANDARD TABLE OF bapiret2.
FIELD-SYMBOLS : <lfs_par> TYPE bapiparam,
<lfs_par1> TYPE bapiparam1.
i_error = 1.
CLEAR : i_value, my_value.
my_perma = o_tpara->get_data( e_parid ).
CHECK my_perma = 'X'. " Ist Benutzervorgabe/Festwert
* Ist der Krempel schon mal gelesen und im Kurzzeitgedächtnis
FIELD-SYMBOLS <wa_slave> TYPE ty_slave.
READ TABLE ta_slave WITH TABLE KEY parid = e_parid
ASSIGNING <wa_slave>.
IF sy-subrc = 0.
i_error = 0.
<wa_slave>-utc = zcl_new_utc=>get_utc( ).
<wa_slave>-index = <wa_slave>-index + 1.
ELSE.
my_reorgmax = my_reorgmax + 1.
IF my_reorgmax >= 10.
my_reorgmax = 0.
DESCRIBE TABLE ta_slave LINES lines.
IF lines > my_maxanz.
SORT ta_slave BY utc index.
CALL METHOD zcl_new_sizer=>resize
EXPORTING
e_size = my_maxanz " Kurzeitgedächtnis
CHANGING
c_table = ta_slave.
ENDIF.
ENDIF.
ASSIGN wa_slave TO <wa_slave>.
<wa_slave>-utc = zcl_new_utc=>get_utc( ).
<wa_slave>-index = 1.
<wa_slave>-parid = e_parid.
<wa_slave>-shortterm = zcl_new_shortterm=>create( ).
FREE lta_par.
APPEND INITIAL LINE TO lta_par ASSIGNING <lfs_par>.
<lfs_par>-parid = e_parid.
DELETE lta_par1 WHERE parid <> e_parid.
IF NOT lta_par1[] IS INITIAL.
READ TABLE lta_par1 INDEX 1 ASSIGNING <lfs_par1>.
my_value = <lfs_par1>-parva.
ELSE.
CLEAR my_value.
ENDIF.
* CALL FUNCTION 'BWDT_GET_PARAMETER'
* EXPORTING
* parameter = e_parid
* IMPORTING
* value = my_value.
CALL METHOD <wa_slave>-shortterm->set_data
EXPORTING
e_data = my_value.
IF sy-subrc = 0.
INSERT <wa_slave> INTO TABLE ta_slave.
ENDIF.
ENDIF.
CALL METHOD <wa_slave>-shortterm->get_data
IMPORTING
i_data = i_value.
IF NOT i_value IS INITIAL.
i_error = 0.
ENDIF.
ENDMETHOD. "get_value
METHOD free.
FIELD-SYMBOLS <wa_slave> TYPE ty_slave.
CHECK NOT ta_slave[] IS INITIAL.
LOOP AT ta_slave ASSIGNING <wa_slave>.
CALL METHOD <wa_slave>-shortterm->free.
ENDLOOP.
FREE ta_slave.
* CALL METHOD cl_abap_memory_utilities=>do_garbage_collection.
ENDMETHOD. "free