cancel
Showing results for 
Search instead for 
Did you mean: 

output users attributes one below the other

Former Member
0 Kudos

Dear Experts,

I was asked to program a report in which all attributes must be listed line for line like e.g.

Username|BUK|CAT|KNT|CNT|BSA|VENDOR_ACS|PRO|......

Usr1       xxx   xxx xxx  xxx   xxx  xxxx            xx

Usr2       xxx   xxx  xxx xxx   xxx   xxxx           xx     

Usr3       xxx   xxx  xxx  xxx  xxx   xxx             xxx

The problem what I am having is the attribute values are stored in the VLIST instead of directly in et_attr . And I dont how to handle with it to

write the the attributes under the correct columns as above shown.

  LOOP AT gt_usrdat INTO ls_usrdat.

      iv_kid = ls_usrdat-userid.

CALL FUNCTION 'BBP_READ_ATTRIBUTES'

      EXPORTING

        iv_user                 = iv_kid

        IV_SCENARIO             = 'BBP'

        it_attr_list            = it_atr

      IMPORTING

        ET_ATTR                 = et_attr

      EXCEPTIONS

        object_id_not_found     = 1

        no_attributes_requested = 2

        attributes_read_error   = 3

        OTHERS                  = 4.

  LOOP AT et_attr  INTO ls_attr.

    write output -> line for line -> one below the other

  ENDLOOP.

ENDLOOP.

I already have seen this example but this not what I mean since the attributes must be shown line for line/ one below the other in the output list for each user.

Code Sample 2 - Report to display user attributes - Supplier Relationship Management - SCN Wiki


I hope you can give me an input to reflection.


Kind Regards

Alex

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

maybe you can try with a second loop

loop at et_attr into ls_attr

loop at ls_attr-vlist  into ls_value

...

...

...

hope this help

Celeste