0% found this document useful (0 votes)
17 views

ZZACDOCA_SET_ROOSFIELD_ATTR

The report ZZACDOCA_SET_ROOSFIELD_ATTR is designed to update attributes in the ROOSFIELD table based on user-defined parameters. It validates the data source and selection options before modifying or inserting records in the ROOSFIELD table. Upon successful completion, it provides a confirmation message to the user.

Uploaded by

2332jssjsina.com
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

ZZACDOCA_SET_ROOSFIELD_ATTR

The report ZZACDOCA_SET_ROOSFIELD_ATTR is designed to update attributes in the ROOSFIELD table based on user-defined parameters. It validates the data source and selection options before modifying or inserting records in the ROOSFIELD table. Upon successful completion, it provides a confirmation message to the user.

Uploaded by

2332jssjsina.com
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

*&---------------------------------------------------------------------*

*& Report ZZACDOCA_SET_ROOSFIELD_ATTR


*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
*& For more info see OSS note 2534522
*&---------------------------------------------------------------------*

report zzacdoca_set_roosfield_attr.

tables: roosfield.

parameters:
p_source like roosfield-oltpsource obligatory default '0FI_ACDOCA_10',
p_select like roosfield-selection.

select-options:
p_field for roosfield-field no intervals obligatory.

data: ls_roosource like roosource,


ls_roosfield like roosfield,
ld_fieldname like dfies-fieldname.

at selection-screen.

if p_source(10) ne '0FI_ACDOCA'
and p_source(10) ne '3FI_ACDOCA'
and p_source(10) ne 'ZFI_ACDOCA'.
message e016(gu) with 'Datasource not allowed'.
else.
select single * from roosource into ls_roosource
where oltpsource = p_source
and objvers = 'A'.
if sy-subrc ne 0.
message e016(gu) with 'Datasource not allowed'.
endif.
endif.

loop at p_field.
if p_field-sign ne 'I'
or p_field-option ne 'EQ'.
message e016(gu) with 'Select-Option not allowed'.
else.
ld_fieldname = p_field-low.
call function 'G_FIELD_READ'
exporting
table = ls_roosource-exstruct
fieldname = ld_fieldname.
endif.
endloop.

start-of-selection.

loop at p_field.
clear ls_roosfield.
select single * from roosfield into ls_roosfield
where oltpsource = p_source
and objvers = 'A'
and field = p_field-low.
if sy-subrc = 0.
ls_roosfield-selection = p_select.
modify roosfield from ls_roosfield.
else.
clear ls_roosfield.
ls_roosfield-oltpsource = p_source.
ls_roosfield-objvers = 'A'.
ls_roosfield-field = p_field-low.
ls_roosfield-selection = p_select.
ls_roosfield-notexrel = 'Y'.
modify roosfield from ls_roosfield.
endif.
endloop.

message s016(gu) with 'Update successful'.

You might also like