Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Creating my own custom a report from t-code rsusr200

bryanjacobs
Participant
0 Kudos

hi

I want to make changes to this output of this transaction rsusr200 by inserting a name column on the report shown below.It already has a a username field as you can see so i was need someone to give me the best and easiest way of creating my own similar report but with the name column.

regards

Bryan

1 REPLY 1

raymond_giuseppi
Active Contributor
0 Kudos

You could define your custom report with a selection-screen similar to USMM, using cl_salv_bs_runtime_info you call the standard report and get the internal table back, then you map those data to your internal table, fill your own informations and display the final table.

Sample:


CALL METHOD cl_salv_bs_runtime_info=>set

  EXPORTING

    display = abap_false

    metadata = abap_false

    data    = abap_true.

SUBMIT rsusr200

  WITH bname    IN bnameclass

  WITH class    IN class

  WITH dbcda1   EQ dbcda1

  WITH dtrdat   EQ dtrdat

  WITH locked   EQ locked

  WITH notvalid EQ notvalid

  WITH unlocked EQ unlocked

  WITH valid    EQ valid

  WITH faillog  EQ faillog

  WITH succlog  EQ succlog

  WITH diaguser EQ diaguser

  WITH sysuser  EQ sysuser

  WITH servuser EQ servuser

  WITH refuser  EQ refuser

  WITH commuser EQ commuser

  WITH initpass EQ initpass

  WITH defpass  EQ defpass

  WITH nopass   EQ nopass

  AND RETURN.

TRY.

    CALL METHOD cl_salv_bs_runtime_info=>get_data_ref

      IMPORTING

        r_data = lr_data.

    ASSIGN lr_data->* TO <inttab>.

  CATCH cx_salv_bs_sc_runtime_info.

ENDTRY.

IF  <inttab> IS NOT ASSIGNED.

  MESSAGE s002(wusl) DISPLAY LIKE 'E'.

  IF uname IS INITIAL.

    LEAVE PROGRAM.

  ELSE.

    EXIT.

  ENDIF.

ENDIF.

cl_salv_bs_runtime_info=>clear_all( ).

Regards,

Raymond