Inicio del área de contenido

Este gráfico es explicado en el texto respectivo Customer-Specific Picklist (Example) Localizar documento en árbol de navegación

You want to add a row for WBS elements to the current picklist, SAP_PICKLIST. You then want to make the modified picklist into a customer-specific picklist, and add a column to it.

Nota

In the source text, the term "picklist" is used for input help. Both terms have the same meaning.

ABAP Source Code

*-----------------------------------------------------------------*
* INCLUDE ZXMYCU01 *
*-----------------------------------------------------------------*
IF sap_fieldname = 'RPROJ'.

DATA: my_wbs_picklist TYPE my_wbs_picklist,
wa_my_wbs_picklist LIKE LINE OF my_wbs_picklist,
sap_wbs_picklist TYPE TABLE OF cats_my_str_picklist_rproj,
wa_sap_wbs_picklist TYPE cats_my_str_picklist_rproj.

* append/modify entries to standard picklist
sap_wbs_picklist = sap_picklist.
wa_sap_wbs_picklist-rproj = '12345'.
wa_sap_wbs_picklist-rproj_txt = 'Stand. txt 12345'.
APPEND wa_sap_wbs_picklist TO sap_wbs_picklist.
sap_picklist = sap_wbs_picklist.

* add a row to the standard picklist
FIELD-SYMBOLS: <my_picklist> TYPE ANY TABLE.
CREATE DATA reference_to_new_picklist TYPE my_wbs_picklist.
ASSIGN reference_to_new_picklist->* TO <my_picklist>.


LOOP AT sap_picklist INTO wa_sap_wbs_picklist.
MOVE-CORRESPONDING wa_sap_wbs_picklist TO wa_my_wbs_picklist.
CONCATENATE 'myText is much longer for wbs-element '
wa_sap_wbs_picklist-rproj
INTO wa_my_wbs_picklist-customer_txt
SEPARATED BY space.
APPEND wa_my_wbs_picklist TO my_wbs_picklist.
ENDLOOP.

<my_picklist> = my_wbs_picklist.

ENDIF.
*-----------------------------------------------------------------*

The introductory query, IF sap_fieldname = "RPROJ" is used to determine the field whose picklist you want to modify. This is the only way of ensuring that you can adjust picklists for different fields separately.

The following lines are used to create the reference to your customer-specific picklist.

Este gráfico es explicado en el texto respectivo

The use of the <my_picklist> field symbol shown here (you can also use another name of your choice) is not restricted to modifying the picklist for the RPROJ field. You can also adopt it unchanged to modify the picklists of other fields.

 

 

Fin del área de contenido