cancel
Showing results for 
Search instead for 
Did you mean: 

Report to search Org.-Elements by attribut value

beat_fuchs
Explorer
0 Kudos

Good day

How can i find all org.-elements with a attribute value  = xxxxx?

For exemple: i am looking for all org.-elements using attribut ANR = '600341'.

Thanks for answering

Beat

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Beat,

You can use the function module BBP_READ_ATTRIBUTES and give the user name and the attribute or list of attribute in an internal table as the exporting parameter ( iv_user and it_attr_list), you will get the value of the corresponding attribute in importing table ( et_attr and et_attr_dft).

Now,

You can use the case statement for the attribute id and read the vlist parameter in et_attr with value as the key.


Please find the code snippet below :

***********   Pass Attribute Values   *********************

       ls_attr_list-attr_id = 'CUR'

       APPEND ls_attr_list TO lt_attr_list.

       ls_attr_list-attr_id = 'PRCAT'.

       APPEND ls_attr_list TO lt_attr_list.

       CALL FUNCTION 'BBP_READ_ATTRIBUTES'

         EXPORTING

           iv_user                 = sy-uname

           t_attr_list            = lt_attr_list

         IMPORTING

           et_attr                 = lt_attr

         EXCEPTIONS

           object_id_not_found     = 1

           no_attributes_requested = 2

           attributes_read_error   = 3.


       IF lt_attr[] IS INITIAL.

          ***Error Message*****

       ENDIF.

        SORT lt_attr BY attr_id.

       LOOP AT lt_attr INTO ls_attr

                       WHERE attr_id IS NOT INITIAL.

         CASE ls_attr-attr_id.

***********   Product Category   *****************

           WHEN 'PRCAT'.

             READ TABLE ls_attr-vlist INTO ls_vlist

                           WITH KEY value = **Your Value***

             IF sy-subrc NE 0.

                    ***Error Message*****

                 CONTINUE.

               ENDIF.

             ENDIF.

***********   Company Code Currency   *****************

           WHEN 'CUR'.

             READ TABLE ls_attr-vlist INTO ls_vlist

                                      WITH KEY value = ***Your Value**

             IF sy-subrc NE 0.

             ***Error Message*****

               CONTINUE.

             ENDIF.

           WHEN OTHERS.

         ENDCASE.

         CLEAR ls_vlist.

       ENDLOOP.

Please reward points, if the answer is helpful.


Thanks & Regards,

Aakash Awasthi

beat_fuchs
Explorer
0 Kudos

Hello Aakash

Thanks for your message.

What i am looking for is a report or the possibility to find all organization elements with attribut and the value of the attribut. I am not looking for the attribut values of a specified user.

Any ideas?

Regards

Beat

Former Member
0 Kudos

Hi Beat,

I dont think so you can get the details of all the org elements with attributes and values.

Please go through the below link

Also you can check the table BBPD_APPL_ATL.

Please reward points, if the answer is helpful.


Thanks & Regards,

Aakash Awasthi

Answers (0)