cancel
Showing results for 
Search instead for 
Did you mean: 

How to get Category 1 Values in selection screen?

Former Member
0 Kudos

Hi All

Good day

I had a custom report where i need to show in selection screen with category 1 values with drop down.

how can i get those category 1 values which are visible in webui incident page in report selection screen?

As per my requirement Currently i having 6 values in webui under Category 1 ,in feature they may assign some more values through category schema

how can i show dynamically if they add some more values in feature in the selection screen of custom report?

Please suggest your comments to get Category 1 values from which tables i can get those 6 values to display in report selection screen?

please find attached screen shot where category 1 having 6 values.

Thanks

Shaik

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Subhani,

If only category 1 needs to be displayed, then refer QPCT table to display values on selection screen.

Thanks,

Ritu

Former Member
0 Kudos

Hi Ritu

Good day

Using above provided table i am not getting Category 1 values.

I try to get the category 1 values in drop down by below code but i am not getting in selection screen

PARAMETERS : p_scm TYPE crm_erms_cat_ca_id," Provide ASP ID

              p_cat AS LISTBOX VISIBLE LENGTH 40.

DATA : ls_crmc_erms_cat_as TYPE crmc_erms_cat_as,

        ls_crmc_erms_cat_hi TYPE crmc_erms_cat_hi,

        ls_crmc_erms_cat_ca TYPE crmc_erms_cat_ca,

        ls_crmc_erms_cat_ct TYPE crmc_erms_cat_ct,

        lt_crmc_erms_cat_as TYPE TABLE OF crmc_erms_cat_as,

        lt_crmc_erms_cat_hi TYPE TABLE OF crmc_erms_cat_hi,

        lt_crmc_erms_cat_ca TYPE TABLE OF crmc_erms_cat_ca,

        lt_crmc_erms_cat_ct TYPE TABLE OF crmc_erms_cat_ct,

        ls_vrm_values       TYPE vrm_value,

        lt_vrm_values       TYPE vrm_values.

TYPE-POOLS: vrm.

**-- First Level....

AT SELECTION-SCREEN .

   SELECT DISTINCT * FROM crmc_erms_cat_as INTO TABLE lt_crmc_erms_cat_as WHERE asp_id EQ p_scm  AND asp_state EQ 'R'.

   IF sy-subrc EQ 0.

     SELECT DISTINCT * FROM crmc_erms_cat_hi INTO TABLE lt_crmc_erms_cat_hi FOR ALL ENTRIES IN lt_crmc_erms_cat_as WHERE pare_guid = lt_crmc_erms_cat_as-asp_guid.

     IF sy-subrc EQ 0.

       SELECT DISTINCT * FROM crmc_erms_cat_ca INTO TABLE lt_crmc_erms_cat_ca FOR ALL ENTRIES IN lt_crmc_erms_cat_hi WHERE cat_guid = lt_crmc_erms_cat_hi-node_guid.

       IF sy-subrc EQ 0.

         LOOP AT lt_crmc_erms_cat_ca INTO ls_crmc_erms_cat_ca.

           WRITE:/ ls_crmc_erms_cat_ca-cat_id.

         ENDLOOP.

       ENDIF.

       SELECT DISTINCT * FROM crmc_erms_cat_ct INTO TABLE lt_crmc_erms_cat_ct FOR ALL ENTRIES IN lt_crmc_erms_cat_ca WHERE cat_guid = lt_crmc_erms_cat_ca-cat_guid.

     ENDIF.

   ENDIF.

   SORT lt_crmc_erms_cat_ct BY cat_guid.

   SORT lt_crmc_erms_cat_ca BY cat_guid.

   LOOP AT lt_crmc_erms_cat_ca INTO ls_crmc_erms_cat_ca.

     READ TABLE lt_crmc_erms_cat_ct INTO ls_crmc_erms_cat_ct WITH KEY cat_guid = ls_crmc_erms_cat_ca-cat_guid.

     IF sy-subrc EQ 0 .

       ls_vrm_values-key   = ls_crmc_erms_cat_ca-cat_id.

       ls_vrm_values-text  = ls_crmc_erms_cat_ct-cat_desc.

       APPEND ls_vrm_values TO lt_vrm_values.

       CLEAR : ls_crmc_erms_cat_ca,ls_crmc_erms_cat_ct,ls_vrm_values.

     ENDIF.

   ENDLOOP.

   CALL FUNCTION 'VRM_SET_VALUES'

     EXPORTING

       id              = 'P_CAT'

       values          = lt_vrm_values

     EXCEPTIONS

       id_illegal_name = 1

       OTHERS          = 2.

   IF sy-subrc <> 0.

* Implement suitable error handling here

   ENDIF.

   REFRESH : lt_vrm_values.

   CLEAR : ls_vrm_values.



LT_VRM_VALUES Having 15 values where in selection screen i am unable to get those values

please suggest