suim --->> user information system
pfcg --- >> role maintenance
su21 --- >> maintain authorization objects
se54 --- >> auth group cr.
constants :
gc_app(1) type c value 'Y',
gc_mc(25) type c value 'Message Class For'.
data : gt_bdcdata like bdcdata occurs 0 with header line,
gt_messtab like bdcmsgcoll occurs 0 with header line,
gt_data1 type table of yutbc0002 with header line,
gt_cname type table of yutbc0001 with header line,
gv_record type string,
gv_color,
lt_t100a type table of t100a with header line,
lv_name type string,
ls_opt like ctu_params.
data : begin of gt_messall occurs 0,
message(255),
end of gt_messall.
*--SELECTION-SCREEN
selection-screen : begin of block b1 with frame title text-001.
parameters : p_cntry like yutbc0001-cntry obligatory matchcode object
yubczz01,
p_reqno like ko008-trkorr,
p_mode like ctu_params-dismode obligatory default 'A'.
selection-screen : end of block b1.
start-of-selection.
perform selection.
loop at gt_data1.
concatenate gc_app p_cntry gt_data1-spmdl into gv_record.
perform cname.
perform check.
endloop.
*====================================================================*
* Form : selection *
*====================================================================*
form selection.
select spmdl from yutbc0002
into corresponding fields of table gt_data1.
select * from yutbc0001
into corresponding fields of table gt_cname.
endform. "selection
*====================================================================*
* Form : cname *
*====================================================================*
form cname.
clear lv_name.
read table gt_cname
with key cntry = p_cntry.
if sy-subrc eq 0.
if p_cntry eq gt_cname-cntry.
concatenate gc_mc gt_data1-spmdl gt_cname-descr
into lv_name
separated by space.
endif.
endif.
endform. "cname
*====================================================================*
* Form : fiil *
*====================================================================*
form fill.
perform fill_bdcdata using 'SAPLWBMESSAGES' '0100' 'X' '' ''.
perform fill_bdcdata using '' '' '' 'BDC_CURSOR' 'RSDAG-ARBGB'.
perform fill_bdcdata using '' '' '' 'RSDAG-ARBGB' gv_record.
perform fill_bdcdata using '' '' '' 'BDC_OKCODE' '=WB_CREATE'.
perform fill_bdcdata using '' '' '' 'RSDAG-MSGFLAG' 'X'.
perform fill_bdcdata using 'SAPLWBMESSAGES' '1000' 'X' '' ''.
perform fill_bdcdata using '' '' '' 'BDC_OKCODE' '=MESS'.
perform fill_bdcdata using '' '' '' 'BDC_SUBSCR'
'SAPLWBMESSAGES 0102SUB'.
perform fill_bdcdata using '' '' '' 'BDC_CURSOR' 'T100A-STEXT'.
perform fill_bdcdata using '' '' '' 'T100A-RESPUSER' 'SOZYURT'.
perform fill_bdcdata using '' '' '' 'T100A-STEXT' lv_name.
perform fill_bdcdata using 'SAPLSTRD' '0100' 'X' '' ''.
perform fill_bdcdata using '' '' '' 'BDC_CURSOR' 'KO007-L_DEVCLASS'.
perform fill_bdcdata using '' '' '' 'BDC_OKCODE' '=ADD'.
perform fill_bdcdata using '' '' '' 'KO007-L_DEVCLASS' gv_record.
perform fill_bdcdata using '' '' '' 'KO007-L_AUTHOR' sy-uname.
perform fill_bdcdata using 'SAPLSTRD' '0300' 'X' '' ''.
perform fill_bdcdata using '' '' '' 'BDC_CURSOR' 'KO008-TRKORR'.
perform fill_bdcdata using '' '' '' 'BDC_OKCODE' '=LOCK'.
perform fill_bdcdata using '' '' '' 'KO008-TRKORR' p_reqno.
perform fill_bdcdata using 'SAPLWBMESSAGES' '1000' 'X' '' ''.
perform fill_bdcdata using '' '' '' 'BDC_OKCODE' '=WB_SAVE'.
perform fill_bdcdata using '' '' '' 'BDC_SUBSCR'
'SAPLWBMESSAGES 0101SUB'.
perform fill_bdcdata using '' '' '' 'NUMMER' '000'.
perform fill_bdcdata using '' '' '' 'T100-TEXT(01)' '& & & &'.
perform fill_bdcdata using 'SAPLWBMESSAGES' '1000' 'X' '' ''.
perform fill_bdcdata using '' '' '' 'BDC_OKCODE' '=WB_BACK'.
perform fill_bdcdata using '' '' '' 'BDC_SUBSCR'
'SAPLWBMESSAGES 0101SUB'.
perform fill_bdcdata using '' '' '' 'BDC_CURSOR' 'NUMMER'.
perform fill_bdcdata using '' '' '' 'NUMMER' '000'.
perform fill_bdcdata using 'SAPLWBMESSAGES' '0100' 'X' '' ''.
perform fill_bdcdata using '' '' '' 'BDC_CURSOR' 'RSDAG-ARBGB'.
perform fill_bdcdata using '' '' '' 'BDC_OKCODE' '=WB_BACK'.
perform fill_bdcdata using '' '' '' 'RSDAG-ARBGB' ''.
perform fill_bdcdata using '' '' '' 'RSDAG-MSGFLAG' 'X'.
endform. "fill
*====================================================================*
* Form : fill_bdcdata *
*====================================================================*
form fill_bdcdata using p1 p2 p3 p4 p5.
gt_bdcdata-program = p1.
gt_bdcdata-dynpro = p2.
gt_bdcdata-dynbegin = p3.
gt_bdcdata-fnam = p4.
gt_bdcdata-fval = p5.
append gt_bdcdata.
endform. "fill_bdcdata
*====================================================================*
* Form : call_transaction_se91 *
*====================================================================*
form call_transaction_se91 using prf_record.
ls_opt-dismode = p_mode.
call transaction 'SE91' using gt_bdcdata options from ls_opt
messages into gt_messtab.
clear : gt_bdcdata,gt_bdcdata[].
loop at gt_messtab.
message id gt_messtab-msgid type gt_messtab-msgtyp
number gt_messtab-msgnr
with gt_messtab-msgv1 gt_messtab-msgv2 gt_messtab-msgv3
gt_messtab-msgv4
into gt_messall-message.
at first.
write : / 'For Message Class' color = 1, gv_record color = 1.
uline.
uline.
endat.
write : gt_messall-message.
endloop.
clear gt_messtab[].
uline.
endform. "call_transaction_se91
*====================================================================*
* Form : check *
*====================================================================*
form check.
select * from t100a into corresponding fields of table lt_t100a.
read table lt_t100a with key arbgb = gv_record.
if lt_t100a-arbgb eq gv_record.
write : / 'For Message Class' color = 1 , gv_record color = 1.
write : / 'Message Class Exist' color = 6.
uline.
else.
perform fill.
perform call_transaction_se91 using gv_record.
endif.
endform. "check
No comments:
Post a Comment