Program to get user details


report  zanil.

* Job: Retrieving user details.

tablesusr21.

selectoptionss_usr for usr21bname

        default syuname obligatory

                       no intervals.

datai_bapiret2  type table of bapiret2

      with header line,

      wt_address  type table of bapiaddr3,

      wa_address  type bapiaddr3,

      ls_return   type bapiret2.

loop at s_usr.

call function ‘BAPI_USER_GET_DETAIL’

  exporting

    username s_usrlow

  importing

    address  wa_address

  tables

    return   i_bapiret2.

read table i_bapiret2 into ls_return

  with key type ‘E’.

if sysubrc eq 0.

   message ls_returnmessage type ‘W’.

   exit.

else.

   append wa_address to wt_address.

endif.

endloop.

* perform alv “if needed

Leave a comment

Your email address will not be published. Required fields are marked *