Skip to Content
0
Former Member
Jan 15, 2008 at 07:28 AM

bapi

26 Views

Dear Friends

I am writing a bapi having foolowing code it is for authorisation

I hv display following fields

uname agr_name report profile objct field von

problem is that it is rpeating the uname agr_name i don't want duplicate enries of hese fields

Pl suggest me

types: begin of ty_temp,

uname type aguname,

agr_name type agr_name,

report type extdreport,

profile type agprofile,

end of ty_temp.

data: it_temp type standard table of ty_temp.

field-symbols <fs_itab> like line of it_temp.

data: begin of wa.

include structure zautho.

data: end of wa.

select puname pagr_name sreport tprofile

into corresponding fields of table it_temp

from agr_users as p inner join agr_hier as s on sagr_name = pagr_name

inner join agr_1016 as t on tagr_name = pagr_name

where p~uname eq uname.

loop at it_temp assigning <fs_itab>.

concatenate <fs_itab>-profile '00' into <fs_itab>-profile.

condense <fs_itab>-profile no-gaps.

select objct field von into (wa-objct, wa-field, wa-von)

from ust12 where auth = <fs_itab>-profile.

wa-uname = <fs_itab>-uname.

wa-agr_name = <fs_itab>-agr_name.

wa-report = <fs_itab>-report.

wa-profile = <fs_itab>-profile.

append wa to output.

endselect.

endloop.

endfunction.