Genil Class Web UI Code
Genil Class Web UI Code
Genil Class Web UI Code
Attributes:
DESIGNTIME_MODE Constant Public Type CHAR1 SingleC!a"acte" In#icato" $D$
R%NTIME_MODE Constant Public Type CHAR1 SingleC!a"acte" In#icato" $R$
SHM_MODE&_&OAD_MODE Constant Public Type CHAR1 SingleC!a"acte" In#icato" $S$
GC_HEADER Constant Public Type CRMT_E'T_O()_NAME E*te"nal Na+e o, Ob-ect
$RA)A_CAT_H$
GC_ITEM Constant Public Type CRMT_E'T_O()_NAME E*te"nal Na+e o, Ob-ect
$RA)A_CAT_ITEM$
GC_SEARCH Constant Public Type CRMT_E'T_O()_NAME E*te"nal Na+e o, Ob-ect
$RA)A_SEARCH$
GC_HEADER_ITEM_R Constant Public Type CRMT_RE&ATION_NAME E*te"nal Na+e o, Ob-ect
$RA)A_HEADER_ITEM$
GC_SEARCH_R Constant Public Type CRMT_RE&ATION_NAME E*te"nal Na+e o, Ob-ect
$RA)A_SEARCH_H$
GT_HEADER Instance Att"ibute Public Type TT_HEADER
GT_ITEM Instance Att"ibute Public Type TT_ITEM
GC_DE&TA_CHANGED Constant Public Type CRMT_DE&TA Delta .lag $M$
GC_DE&TA_CREATED Constant Public Type CRMT_DE&TA Delta .lag $N$
GC_DE&TA_DE&ETED Constant Public Type CRMT_DE&TA Delta .lag $D$
Methods:
1/
IF_GENIL_APPL_MODEL~GET_OBECT_P!OP":#
Retu"ning0 1A&%E2 RT_O()_PROPS 3 T4PE CRMT_O()_PROPERTIES_TA( Table o, (usiness
Ob-ect Att"ibutes
+et!o# I._GENI&_APP&_MODE&5GET_O()ECT_PROPS/
select 6 .ROM 7"a-a_ob- into CORRESPONDING .IE&DS O. TA(&E "t_ob-_p"ops/
en#+et!o#/
8/
IF_GENIL_APPL_MODEL~GET_MODEL:
1A&%E2 RT_RE&ATION_DET 3 T4PE CRMT_RE&ATION_DETAI&_TA(
+et!o# I._GENI&_APP&_MODE&5GET_MODE&/
select 6 .ROM 7"a-a_+o#el into CORRESPONDING .IE&DS O. TA(&E "t_"elation_#et/
en#+et!o#/
9/
IF_GENIL_APPL_INTLA$~GET_D$NAMIC_%&E!$_!E"<:#
0:;<=I+po"ting0 I1_=%ER4_NAME T4PE CRMT_E'T_O()_NAME E*te"nal Na+e o, Ob-ect
IS_=%ER4_PARAMETERS T4PE GENI&T_=%ER4_PARAMETERS
IT_SE&ECTION_PARAMETERS T4PE GENI&T_SE&ECTION_PARAMETER_TA( Co+ple* Sea"c!
Con#ition
I1_ROOT_&IST T4PE RE. TO I._GENI&_CONT_ROOT_O()ECT&IST Data Containe" Root
Ob-ect &ist Inte",ace
+et!o# I._GENI&_APP&_INT&A45GET_D4NAMIC_=%ER4_RES%&T/
DATA> lt_"e?uest_ob- T4PE c"+t_"e?uest_ob-_tab@
ls_selection_pa"a+ete"s T4PE c"+t_genil_o"#e"_sea"c!@
l"_selection_pa"a+ete"s T4PE RE. TO c"+t_genil_o"#e"_sea"c!/
DATA lA_st" T4PE st"ing/
#ata lA_an# T4PE st"ing 1A&%E $ $/
DATA ls_pa"a+ &IBE &INE O. IT_SE&ECTION_PARAMETERS/
DATA lt_!ea#e" T4PE TA(&E O. CST_PC_HEADER/
DATA ls_!ea#e" T4PE CST_PC_HEADER/
DATA &T_PROD%CT_CAT_ID T4PE RANGE O. CST_PC_HEADERCATA&OG%E_ID/
#ata ls_PROD%CT_CAT_ID liDe line o, &T_PROD%CT_CAT_ID/
DATA &T_PROD%CT_CAT_DESC T4PE RANGE O. CST_PC_HEADERDESCRIPTION/
#ata ls_PROD%CT_CAT_DESC liDe line o, &T_PROD%CT_CAT_DESC/
DATA &T_CATEGOR4 T4PE RANGE O. CST_PC_HEADERcatego"y_i#/
#ata ls_CATEGOR4 liDe line o, &T_CATEGOR4/
DATA &T_S%(_CATEGOR4 T4PE RANGE O. CST_PC_HEADERsubcatego"y_i#/
#ata ls_S%(_CATEGOR4 liDe line o, &T_S%(_CATEGOR4/
DATA &T_STAT%S T4PE RANGE O. CST_PC_HEADERstatus/
#ata ls_STAT%S liDe line o, &T_STAT%S/
DATA &T_CREATED_ON T4PE RANGE O. CST_PC_HEADERc"eate#_on/
#ata ls_CREATED_ON liDe line o, &T_CREATED_ON/
DATA &T_CREATED_(4 T4PE RANGE O. CST_PC_HEADERc"eate#_by/
#ata ls_CREATED_(4 liDe line o, &T_CREATED_(4/
DATA &R_O()ECT T4PE RE. TO I._GENI&_CONT_ROOT_O()ECT/
CASE iA_?ue"y_na+e/
EHEN gc_sea"c!/
loop at it_selection_pa"a+ete"s into ls_pa"a+/
case ls_pa"a+ATTR_NAME/
F!en $PROD%CT_CAT_ID$/
MO1ECORRESPONDING &S_PARAM TO ls_PROD%CT_CAT_ID/
APPEND ls_PROD%CT_CAT_ID TO lt_PROD%CT_CAT_ID/
F!en $DESCRIPTION$/
MO1ECORRESPONDING ls_pa"a+ to &S_PROD%CT_CAT_DESC/
appen# &S_PROD%CT_CAT_DESC to &T_PROD%CT_CAT_DESC/
F!en $CATEGOR4_ID$/
MO1ECORRESPONDING ls_pa"a+ to ls_CATEGOR4/
appen# ls_CATEGOR4 to lT_CATEGOR4/
F!en $S%(CATEGOR4_ID$/
MO1ECORRESPONDING ls_pa"a+ to ls_S%(_CATEGOR4/
appen# ls_S%(_CATEGOR4 to lt_S%(_CATEGOR4/
F!en $STAT%S$/
MO1ECORRESPONDING ls_pa"a+ to ls_status/
appen# ls_status to lt_status/
F!en $CREATED_ON$/
MO1ECORRESPONDING &S_PARAM TO &S_c"eate#_on/
APPEND &S_c"eate#_on TO &T_c"eate#_on/
F!en $CREATED_(4$/
MO1ECORRESPONDING &S_PARAM TO ls_c"eate#_by/
APPEND ls_c"eate#_by TO &t_c"eate#_by/
en#case/
en#loop/
I. &T_p"o#uct_cat_i# IS NOT INITIA&/
CONCATENATE &1_STR $ CRA)A_CAT_H5CATA&OG%E_ID IN &T_PROD%CT_CAT_ID$ INTO &1_ST
R SEPARATED (4 SPACE/
lA_an# G $ AND $/
ENDI./
I. &T_PROD%CT_CAT_DESC IS NOT INITIA&/
CONCATENATE &1_STR lA_an# $ CRA)A_CAT_H5DESCRIPTION IN &T_PROD%CT_CAT_DESC$ INTO
&1_STR SEPARATED (4 SPACE/
lA_an# G $ AND $/
ENDI./
I. &T_catego"y IS NOT INITIA&/
CONCATENATE &1_STR lA_an# $ CRA)A_CAT_H5CATEGOR4_ID IN &T_CATEGOR4$ INTO &1_STR S
EPARATED (4 SPACE/
lA_an# G $ AND $/
ENDI./
I. &T_sub_catego"y IS NOT INITIA&/
CONCATENATE &1_STR lA_an# $ CRA)A_CAT_H5S%(_CATEGOR4_ID IN &T_S%(_CATEGOR4$ INT
O &1_STR SEPARATED (4 SPACE/
lA_an# G $ AND $/
ENDI./
I. &T_status IS NOT INITIA&/
CONCATENATE &1_STR lA_an# $ CRA)A_CAT_H5STAT%S IN &T_STAT%S$ INTO &1_STR SEPARATED
(4 SPACE/
lA_an# G $ AND $/
ENDI./
I. &T_c"eate#_on IS NOT INITIA&/
CONCATENATE &1_STR lA_an# $ CRA)A_CAT_H5CREATED_ON IN &T_CREATED_ON$ INTO &1_STR
SEPARATED (4 SPACE/
lA_an# G $ AND $/
ENDI./
I. &T_c"eate#_(4 IS NOT INITIA&/
CONCATENATE &1_STR lA_an# $ CRA)A_CAT_H5CREATED_(4 IN &T_CREATED_(4$ INTO &1_STR
SEPARATED (4 SPACE/
lA_an# G $ AND $/
ENDI./
SE&ECT 6 ,"o+ CRA)A_CAT_H INTO CORRESPONDING .IE&DS O. TA(&E gt_!ea#e" EHERE 2lA_st"3/
i, gt_!ea#e" is not initial/
loop at gt_!ea#e" into ls_!ea#e"/
t"y/
CA&& METHOD I1_ROOT_&ISTHADD_O()ECT
E'PORTING
I1_O()ECT_NAME G gc_!ea#e"
IS_O()ECT_BE4 G ls_!ea#e"CATA&OG%E_ID
RECEI1ING
R1_RES%&T G l"_ob-ect/
CA&& METHOD +eHSET_ATTR_PROPS
E'PORTING
I1_ROOT G l"_ob-ect
* IS_HEADER = ls_header
* IS_ITEM =
/
l"_ob-ectHset_att"ibutes2 ls_!ea#e" 3/
l"_ob-ectHset_Dey2 ls_!ea#e"CATA&OG%E_ID 3/
catc! C'_CRM_GENI&_D%P&ICATE_RE& C'_CRM_GENI&_MODE&_ERROR/
en#t"y/
en#loop/
ENDI./
EHEN OTHERS/
RET%RN/
ENDCASE/
en#+et!o#/
I/
IF_GENIL_APPL_ALTE!NATI'E_D"IL~LOC(_OBECT":
0:;<=I+po"ting0 I1_MSG_SER1ICE_ACCESS T4PE RE. TO
I._GENI&_MSG_SER1ICE_ACCESS Inte",ace ,o" Si+ple Access to Gene"ic I& Message Se"Aice
CT_O()ECT_&IST T4PE CRMT_GENI&_O()_INST_&INE_TA(
+et!o# I._GENI&_APP&_A&TERNATI1E_DSI&5&OCB_O()ECTS/
.IE&DS4M(O&S Jls_ob-ectH &IBE &INE O. ct_ob-ect_list/
&OOP AT ct_ob-ect_list ASSIGNING Jls_ob-ectH/
Jls_ob-ectHsuccess G abap_t"ue/
END&OOP/
en#+et!o#/
K/
IF_GENIL_APPL_INTLA$~C!EATE_OBECT">
0:;<=I+po"ting0 I1_O()ECT_NAME T4PE CRMT_E'T_O()_NAME Type o, Ob-ect to (e
C"eate#
I1_N%M(ER T4PE INTI DE.A%&T 1 Nu+be" o, Ob-ects to (e C"eate#
IT_PARAMETERS T4PE CRMT_NAME_1A&%E_PAIR_TA(Pa"a+ete" Table o, Na+e1alue
Pai"s
I1_ROOT_&IST T4PE RE. TO I._GENI&_CONT_ROOT_O()ECT&IST Data Containe" Root
Ob-ect &ist Inte",ace
+et!o# I._GENI&_APP&_INT&A45CREATE_O()ECTS/
#ata &S_PARAMETERS &IBE &INE O. gt_!ea#e"/
#ata &T_RE=%EST_O() type CRMT_RE=%EST_O()_TA(/
#ata l"_ob-ect T4PE RE. TO i,_genil_cont_"oot_ob-ect/
#ata> &1_G%ID type CRMT_GENI&_O()ECT_G%ID/
,iel#sy+bols J&INEH type CRMT_NAME_1A&%E_PAIR/
,iel#sy+bols J1A&%EH type DATA/
case I1_O()ECT_NAME/
F!en gc_!ea#e"/ "#EC NOTEXT
* fill parameter str!tre fr"m #ame $ale pair ta%le
call +et!o# .I&&_STR%CT_.ROM_N1P_TA(
E'PORTING
IT_PARAMETERS G IT_PARAMETERS
CHANGING
CS_PARAMETER G &S_PARAMETERS/
* !reate I&_N'M(ER "rders
#o I1_N%M(ER ti+es/
call ,unction $G%ID_CREATE$
IMPORTING
E1_G%ID_1L G &1_G%ID/
&S_PARAMETERSCATA&OG%E_ID G &1_G%ID/
&S_PARAMETERSCREATED_ON G sy#atu+/
&S_PARAMETERSCREATED_(4 G syuna+e/
inse"t &S_PARAMETERS into table gt_!ea#e"/
* add the #e) "%*e!t t" the !"#tai#er
t"y/
l"_ob-ect G I1_ROOT_&ISTHADD_O()ECT2 I1_O()ECT_NAME G gc_!ea#e" "#EC NOTEXT
IS_O()ECT_BE4 G &1_G%ID 3/
l"_ob-ectHset_att"ibutes2 &S_PARAMETERS 3/
l"_ob-ectHset_Dey2 &1_G%ID 3/
catc! C'_CRM_GENI&_D%P&ICATE_RE& C'_CRM_GENI&_MODE&_ERROR/
en#t"y/
en##o/
en#case/
en#+et!o#/
L/
IF_GENIL_APPL_ALTE!NATI'E_D"IL~DELETE_OBECT":#
0:;<=I+po"ting0 I1_MSG_SER1ICE_ACCESS T4PE RE. TO
I._GENI&_MSG_SER1ICE_ACCESS Inte",ace ,o" Si+ple Access to Gene"ic I& Message Se"Aice
CT_O()ECT_&IST T4PE CRMT_GENI&_O()_INST_&INE_TA(
+et!o# I._GENI&_APP&_A&TERNATI1E_DSI&5DE&ETE_O()ECTS/
,iel#sy+bols> Jls_O()ectH liDe &INE O. CT_O()ECT_&IST/
#ata lA_Dey_! type CCATE&O%GE_ID/
DATA ls_!ea#e" &IBE &INE O. gt_!ea#e"/
*
loop at CT_O()ECT_&IST assigning Jls_O()ectH/
case Jls_O()ectHO()ECT_NAME/
F!en gc_!ea#e"/
C&EAR lA_Dey_!/
CA&& METHOD cl_c"+_genil_containe"_toolsGHget_Dey_,"o+_ob-ect_i#
E'PORTING
iA_ob-ect_na+e G Jls_ob-ectHob-ect_na+e
iA_ob-ect_i# G Jls_ob-ectHob-ect_i#
IMPORTING
es_Dey G lA_Dey_!/
I. lA_Dey_! IS NOT INITIA&/
#elete gt_!ea#e" EHERE catalogue_i# G lA_Dey_!/
#elete gt_ite+ EHERE catalogue_i# G lA_Dey_!/
DE&ETE .ROM 7"a-a_cat_! F!e"e CATA&OG%E_ID G lA_Dey_! /
i, sysub"c G M/
DE&ETE .ROM 7"a-a_ite+ EHERE CATA&OG%E_ID G lA_Dey_!/
Jls_ob-ectHsuccess G A(AP_TR%E/
ENDI./
en#i,/
en#case/
en#loop/
en#+et!o#/
:/
IF_GENIL_APPL_INTLA$~GET_OBECT">
IT_RE=%EST_O()ECTST4PE CRMT_RE=%EST_O()_TA( Table o, Ob-ect Re?uest Speci,ications
I1_ROOT_&IST T4PE RE. TO I._GENI&_CONT_ROOT_O()ECT&IST Data Containe" Root Ob-ect &ist
Inte",ace
+et!o# I._GENI&_APP&_INT&A45GET_O()ECTS/
"R""t De!larati"#s
#ata &R_ROOT type "e, to I._GENI&_CONTAINER_O()ECT/
#ata &1_ROOT_NAME type CRMT_E'T_O()_NAME/
#ata &1_cat_i# type CCATE&O%GE_ID/
#ata &1_ATTRI(%TES type CST_PC_HEADER/
#ata ls_!ea#e" liDe &INE O. gt_!ea#e"/
,iel#sy+bols> JRE=_O()H type CRMT_RE=%EST_O()/
"Child De!larati"#s
#ata &R_CHI&DREN type "e, to I._GENI&_CONTAINER_O()ECT&IST/
#ata &R_CHI&D type "e, to I._GENI&_CONTAINER_O()ECT/
#ata &1_CHI&D_NAME type CRMT_E'T_O()_NAME/
#ata &1_BE4_ITEM type CDE_ITEM_G%ID/
#ata &S_RE=%EST_O()ECT type CRMT_RE=%EST_O()/
#ata ls_ite+ liDe &INE O. gt_ite+/
,iel#sy+bols> JRE&H type CRMT_RE&ATION_NAME/
&R_ROOT G I1_ROOT_&ISTHGET_.IRST2 3/
c!ecD &R_ROOT is boun#/
&1_ROOT_NAME G &R_ROOTHGET_NAME2 3/
case &1_ROOT_NAME/
F!en GC_HEADER/
call +et!o# &R_ROOTHGET_BE4
IMPORTING
ES_BE4 G &1_cat_i#/
F!ile &R_ROOT is boun#/
i, &R_ROOTHCHECB_ATTR_RE=%ESTED2 3 G A(AP_TR%E/
"ea# table IT_RE=%EST_O()ECTS assigning JRE=_O()H Fit! Dey O()ECT_NAME G gc_!ea#e"/
"ea# table gt_!ea#e" Fit! Dey CATA&OG%E_ID G lA_cat_i# into ls_!ea#e"/
i, S4S%(RC ne M/
SE&ECT 6 .ROM CRA)A_CAT_H INTO CORRESPONDING .IE&DS O. ls_!ea#e" EHERE CATA&O
G%E_ID G lA_cat_i#/
ENDSE&ECT/
i, S4S%(RC G M/
inse"t ls_!ea#e" into table gt_!ea#e"/
en#i,/
en#i,/
&R_ROOTHSET_ATTRI(%TES2 &s_!ea#e" 3/
&R_ROOTHSET_BE42 &s_!ea#e"CATA&OG%E_ID 3/
SET_ATTR_PROPs2 I1_ROOT G &R_ROOT 3/
en#i,/
" !he!+ if depe#de#t "%*e!ts ,items- sh"ld %e read
i, &R_ROOTHCHECB_RE&S_RE=%ESTED2 3 G A(AP_TR%E/
&R_CHI&DREN G &R_ROOTHGET_CHI&DREN2 I1_AS_COP4 G A(AP_.A&SE 3/
&R_CHI&D G &R_CHI&DRENHGET_.IRST2 3/
F!ile &R_CHI&D is boun#/
&1_CHI&D_NAME G &R_CHI&DHGET_NAME2 3/
case &1_CHI&D_NAME /
F!en gc_ite+/
i, &R_CHI&DHCHECB_ATTR_RE=%ESTED2 3 G A(AP_TR%E/
READ TA(&E gt_ite+ EITH Dey CATA&OG%E_ID G &1_cat_i# INTO ls_ite+ /
i, S4S%(RC ne M/
SE&ECT 6 .ROM CRA)A_ITEM INTO CORRESPONDING .IE&DS O. TA(&E gt_ite+ F!e"e CAT
A&OG%E_ID G &1_cat_i#/
en#i,/
&OOP AT gt_ite+ INTO ls_ite+ EHERE CATA&OG%E_ID G &1_cat_i# /
TR4/
CA&& METHOD &R_ROOTHa##_c!il#
E'PORTING
iA_"elation_na+e G GC_HEADER_ITEM_R
is_c!il#_Dey G ls_ite+ITEM_G%ID
RECEI1ING
"A_"esult G l"_c!il#/
**
SET_ATTR_PROPS2 I1_ROOT G l"_c!il# 3/
l"_c!il#Hset_att"ibutes2 ls_ite+ 3/
l"_c!il#Hset_Dey2 ls_ite+ITEM_G%ID 3/
CATCH c*_c"+_genil_#uplicate_"el /
CATCH c*_c"+_genil_+o#el_e""o" /
ENDTR4/
END&OOP/
en#i,/
en#case/
&R_CHI&D G &R_CHI&DRENHGET_NE'T2 3/
en#F!ile/
en#i,/
&R_ROOT G I1_ROOT_&ISTHGET_NE'T2 3/
en#F!ile/
en#case/
en#+et!o#/
;/
IF_GENIL_APPL_INTLA$~MODIF$_OBECT">
0:;<=I+po"ting0 I1_ROOT_&IST T4PE RE. TO
I._GENI&_CONT_ROOT_O()ECT&IST Data Containe" Root Ob-ect &ist Inte",ace
I1_RET%RN_ROOT_&IST T4PE RE. TO I._GENI&_CONT_ROOT_O()ECT&IST
Data Containe" Root Ob-ect &ist Inte",ace
ET_CHANGED_O()ECTS T4PE CRMT_GENI&_O()_INSTANCE_TA( Ob-ect Table
Fit! Ob-ect Type an# ID
+et!o# I._GENI&_APP&_INT&A45MODI.4_O()ECTS/
"R""t.Header De!larati"#s
#ata> l"_"oot type "e, to I._GENI&_CONTAINER_O()ECT@
lA_"oot_na+e type CRMT_E'T_O()_NAME/
#ata lA_cat_i# T4PE CCATE&O%GE_ID/
#ata> &R_PROPS_O() type "e, to I._GENI&_O()_ATTR_PROPERTIES@
&T_CHANGED_ATTR type CRMT_ATTR_NAME_TA(@
&S_ATTRI(%TES type STR_HEADER@
&1_G%ID type CRMT_GENI&_O()ECT_G%ID@
&1_HEADER type "e, to I._GENI&_CONT_ROOT_O()ECT@
ls_c!ange#_ob-ect &IBE &INE O. ET_CHANGED_O()ECTS/
,iel#sy+bols> JHEADER_&INEH liDe &INE O. gt_!ea#e"@
JHEADER_O&DH type SIMP&E@
JHEADER_NEEH type SIMP&E@
JHEADER_NAMEH type NAME_BOMP/
clea" ET_CHANGED_O()ECTS/
l"_!ea#e" G I1_ROOT_&ISTHGET_.IRST2 3/
c!ecD l"_!ea#e" is boun#/
lA_!ea#e"_na+e G l"_!ea#e"HGET_NAME2 3/
case lA_!ea#e"_na+e/
F!en GC_HEADER/
&1_HEADER G I1_ROOT_&ISTHGET_.IRST2 3/
F!ile &1_HEADER is boun#/
i, &1_HEADERHGET_DE&TA_.&AG2 3 G GC_DE&TA_CHANGED/
&1_PROPS_O() G &1_HEADERHGET_ATTR_PROPS_O()2 3/
call +et!o# &1_PROPS_O()HGET_NAME_TA(_I_PROPERT4
E'PORTING
I1_PROPERT4 G I._GENI&_O()_ATTR_PROPERTIESGHMODI.IED
IMPORTING
ET_NAMES G &T_CHANGED_ATTR/
call +et!o# &1_HEADERHGET_BE4
IMPORTING
ES_BE4 G lA_cat_i#/
call +et!o# &1_HEADERHGET_ATTRI(%TES
IMPORTING
ES_ATTRI(%TES G &S_ATTRI(%TES/
"ea# table gt_!ea#e" assigning JHEADER_&INEH Fit! Dey CATA&OG%E_ID G lA_cat_i# /
i, S4S%(RC G M/
loop at &T_CHANGED_ATTR assigning JHEADER_NAMEH/
assign co+ponent JHEADER_NAMEH o, st"uctu"e JHEADER_&INEH to JHEADER_O&DH/
c!ecD S4S%(RC G M/
assign co+ponent JHEADER_NAMEH o, st"uctu"e &S_ATTRI(%TES to JHEADER_NEEH/
c!ecD S4S%(RC G M/
JHEADER_O&DH G JHEADER_NEEH/
en#loop/
en#i,/
ls_c!ange#_ob-ectO()ECT_NAME G GC_HEADER/
ls_c!ange#_ob-ectO()ECT_ID G C&_CRM_GENI&_CONTAINER_TOO&SGH(%I&D_O()ECT_ID2 lA_ca
t_i# 3/
APPEND ls_c!ange#_ob-ect to ET_CHANGED_O()ECTS/
en#i,/
"""""""""""""""""""""""""""""""""""""/!hildre#""""""""""""""""""""""""""""""""""""""
#ata> &1_CHI&DREN_&IST type "e, to I._GENI&_CONTAINER_O()ECT&IST@
&1_CHI&D type "e, to I._GENI&_CONTAINER_O()ECT@
&1_CHI&D_NAME type CRMT_E'T_O()_NAME/
#ata>
"0&_1RO1S_O(2 t3pe ref t" I4_5ENI0_O(2_ATTR_1RO1ERTIES6
&T_CHANGED_ATTR_ITEM type CRMT_ATTR_NAME_TA(@
&S_ATTRI(%TES_ITEM type CRMT_GENI&_PARTNER_ATTR@
&A_BE4_CHI&D type CDE_ITEM_G%ID@
&T_RET%RN type (APIRET8_T@
&1_MSG_CONT type "e, to C&_CRM_GENI&_(API_MESS_CONT@
&S_CHI&D_O()_INST type CRMT_GENI&_O()_INSTANCE@
&1_DE&TA type CRMT_DE&TA@
"0&_CAT_ID t3pe 7CATE0O'5E_ID6
ls_ite+_att" T4PE st"_ite+@
&1_HEADER1 type "e, to I._GENI&_CONTAINER_O()ECT@
ls_ite+ liDe &INE O. gt_ite+/
,iel#sy+bols> JITEM_&INEH liDe &INE O. gt_ite+@
JITEM_O&DH type SIMP&E@
JITEM_NEEH type SIMP&E@
JITEM_NAMEH type NAME_BOMP/
&1_CHI&DREN_&IST G &1_HEADERHGET_CHI&DREN2 I1_AS_COP4 G A(AP_TR%E 3/
&1_CHI&D G &1_CHI&DREN_&ISTHGET_.IRST2 3/
F!ile &1_CHI&D is boun#/
* %ra#!h a!!"rdi#8 the "%*e!t #ame
&1_CHI&D_NAME G &1_CHI&DHGET_NAME2 3/
case &1_CHI&D_NAME/
F!en gc_ite+/
&1_HEADER1 G &1_CHI&DHGET_PARENT2 3/
call +et!o# &1_HEADER1HGET_BE4
IMPORTING
ES_BE4 G &1_CAT_ID/
&1_DE&TA G &1_CHI&DHGET_DE&TA_.&AG2 3/
case &1_DE&TA/
F!en GC_DE&TA_CHANGED/
&1_PROPS_O() G &1_CHI&DHGET_ATTR_PROPS_O()2 3/
call +et!o# &1_PROPS_O()HGET_NAME_TA(_I_PROPERT4
E'PORTING
I1_PROPERT4 G I._GENI&_O()_ATTR_PROPERTIESGHMODI.IED
IMPORTING
ET_NAMES G &T_CHANGED_ATTR_ITEM/
call +et!o# &1_CHI&DHGET_BE4
IMPORTING
ES_BE4 G &A_BE4_CHI&D/
call +et!o# &1_CHI&DHGET_ATTRI(%TES
IMPORTING
ES_ATTRI(%TES G ls_ite+_att"/
"ea# table gt_ite+ assigning JITEM_&INEH Fit! Dey CATA&OG%E_ID G lA_cat_i# /
i, S4S%(RC G M/
loop at &T_CHANGED_ATTR_ITEM assigning JITEM_NAMEH/
assign co+ponent JITEM_NAMEH o, st"uctu"e JITEM_&INEH to JITEM_O&DH/
c!ecD S4S%(RC G M/
assign co+ponent JITEM_NAMEH o, st"uctu"e ls_ite+_att" to JITEM_NEEH/
c!ecD S4S%(RC G M/
JITEM_O&DH G JITEM_NEEH/
en#loop/
en#i,/
&S_CHI&D_O()_INSTO()ECT_NAME G gc_ite+/
&S_CHI&D_O()_INSTO()ECT_ID G C&_CRM_GENI&_CONTAINER_TOO&SGH(%I&D_O()ECT
_ID2 &A_BE4_CHI&D 3/
appen# ls_c!ange#_ob-ect to eT_CHANGED_O()ECTS/
F!en GC_DE&TA_CREATED/
call +et!o# lA_c!il#HGET_ATTRI(%TES
IMPORTING
ES_ATTRI(%TES G ls_ite+_att"/
call ,unction $G%ID_CREATE$
IMPORTING
E1_G%ID_1L G ls_ite+_att"ITEM_G%ID/
ls_ite+_att"CATA&OG%E_ID G &1_CAT_ID/
ls_ite+_att"CREATED_(4 G syuna+e/
ls_ite+_att"CREATED_ON G sy#atu+/
ls_ite+_att"+o#e G $N$/
APPEND ls_ite+_att" to gt_ite+/
t"y/
&1_CHI&DHSET_BE42 &A_BE4_CHI&D 3/
catc! C'_CRM_GENI&_D%P&ICATE_BE4/
en#t"y/
&S_CHI&D_O()_INSTO()ECT_NAME G gc_ite+/
ls_c!ange#_ob-ectO()ECT_ID G C&_CRM_GENI&_CONTAINER_TOO&SGH(%I&D_O()ECT_ID2 l
s_ite+_att"ITEM_G%ID 3/
appen# ls_c!ange#_ob-ect to eT_CHANGED_O()ECTS/
F!en GC_DE&TA_DE&ETED/
* 8et the part#er +e3
call +et!o# lA_c!il#HGET_BE4
IMPORTING
ES_BE4 G &A_BE4_CHI&D/
READ TA(&E gt_ite+ INTO ls_ite+ EITH BE4 ITEM_G%ID G &A_BE4_CHI&D/
ls_ite++o#e G $D$/
MODI.4 gt_ite+ .ROM ls_ite+/
en#case/
ENDCASE/
&1_CHI&D G &1_CHI&DREN_&ISTHGET_NE'T2 3/
en#F!ile/
***
&1_Hea#e" G I1_ROOT_&ISTHGET_NE'T2 3/
en#F!ile/
en#case/
en#+et!o#/
N/
IF_GENIL_APPL_ALTE!NATI'E_D"IL~"A'E_OBECT">
0:A<=C!anging0 CT_O()ECT_&IST T4PE CRMT_GENI&_O()_INST_&INE_TA(
ET_ID_MAPPING T4PE CRMT_GENI&_ID_MAPPING_TA( Table o, ID Mapping
Ent"ies in Gene"ic Inte"action &aye"
I1_MSG_SER1ICE_ACCESS T4PE RE. TO I._GENI&_MSG_SER1ICE_ACCESS Inte",ace
,o" Si+ple Access to Gene"ic I& Message Se"Aice
+et!o# I._GENI&_APP&_A&TERNATI1E_DSI&5SA1E_O()ECTS/
*CA00 METHOD S'1ER9:I4_5ENI0_A110_A0TERNATI&E_DSI0;SA&E_O(2ECTS
* EX1ORTIN5
* I&_MS5_SER&ICE_ACCESS =
** IM1ORTIN5
** ET_ID_MA11IN5 =
* CHAN5IN5
* CT_O(2ECT_0IST =
* <
.IE&DS4M(O&S Jls_ob-ectH liDe line o, ct_ob-ect_list/
DATA lA_cat_i# T4PE CCATE&O%GE_ID/
DATA ls_!ea#e" &IBE &INE O. gt_!ea#e"/
DATA ls_ite+ &IBE &INE O. gt_ite+/
loop at ct_ob-ect_list ASSIGNING Jls_ob-ectH/
case Jls_O()ectHO()ECT_NAME/
F!en gc_!ea#e"/
C&EAR lA_cat_i#/
CA&& METHOD cl_c"+_genil_containe"_toolsGHget_Dey_,"o+_ob-ect_i#
E'PORTING
iA_ob-ect_na+e G Jls_ob-ectHob-ect_na+e
iA_ob-ect_i# G Jls_ob-ectHob-ect_i#
IMPORTING
es_Dey G lA_cat_i#/
&OOP AT gt_!ea#e" INTO ls_!ea#e" EHERE CATA&OG%E_ID G lA_cat_i# /
MODI.4 CRA)A_CAT_H .ROM ls_!ea#e"/
&OOP AT gt_ite+ INTO ls_ite+ EHERE CATA&OG%E_ID G lA_cat_i# /
MODI.4 CRA)A_ITEM .ROM ls_ite+/
END&OOP/
Jls_ob-ectHsuccess G $'$/
END&OOP/
ENDCASE/
END&OOP/
en#+et!o#/
1M/
"ET_ATT!_P!OP">
0:;<=I+po"ting0 I1_ROOT T4PE RE. TO I._GENI&_CONTAINER_O()ECT OPTIONA&
Data Containe" Ob-ect Inte",ace
IS_HEADER T4PE STR_HEADER OPTIONA&
IS_ITEM T4PE STR_ITEM OPTIONA&
+et!o# SET_ATTR_PROPS/
DATA> l"_att"_p"ops T4PE RE. TO i,_genil_ob-_att"_p"ope"ties/
l"_att"_p"ops G iA_"ootHget_att"_p"ops_ob-2 3/
l"_att"_p"opsHset_all_p"ope"ties2 i,_genil_ob-_att"_p"ope"tiesGH"ea#_only 3/
lR_att"_p"opsHset_p"ope"ty_by_na+e2 iA_na+e G $DESCRIPTION$
iA_Aalue G i,_genil_ob-_att"_p"ope"tiesGHc!angeable 3/
lR_att"_p"opsHset_p"ope"ty_by_na+e2 iA_na+e G $CATEGOR4_ID$
iA_Aalue G i,_genil_ob-_att"_p"ope"tiesGHc!angeable 3/
lR_att"_p"opsHset_p"ope"ty_by_na+e2 iA_na+e G $S%(CATEGOR4_ID$
iA_Aalue G i,_genil_ob-_att"_p"ope"tiesGHc!angeable 3/
lR_att"_p"opsHset_p"ope"ty_by_na+e2 iA_na+e G $STAT%S$
iA_Aalue G i,_genil_ob-_att"_p"ope"tiesGHc!angeable 3/
lR_att"_p"opsHset_p"ope"ty_by_na+e2 iA_na+e G $1A&ID_.ROM$
iA_Aalue G i,_genil_ob-_att"_p"ope"tiesGHc!angeable 3/
lR_att"_p"opsHset_p"ope"ty_by_na+e2 iA_na+e G $1A&ID_TO$
iA_Aalue G i,_genil_ob-_att"_p"ope"tiesGHc!angeable 3/
en#+et!o#/
11/
IF_GENIL_APPL_MODEL~GET_OBECT_P!OP">
0:(<=Retu"ning0 1A&%E2 RT_O()_PROPS 3 T4PE CRMT_O()_PROPERTIES_TA( Table o,
(usiness Ob-ect Att"ibutes
+et!o# I._GENI&_APP&_MODE&5GET_O()ECT_PROPS/
select 6 .ROM 7"a-a_ob- into CORRESPONDING .IE&DS O. TA(&E "t_ob-_p"ops/
en#+et!o#/
)eb &i Part:
1/
For Lin*in+ Produ,t Id >
%n#e" Att"ibutes>
0:;<=I+po"ting0 I1_PROPERT4 T4PE STRING .el#eigensc!a,t H Sie!e Inte",aceDonstanten
I1_INDE' T4PE I OPTIONA& Ceilenin#e* bei Tabelle
I1_DISP&A4_MODE T4PE A(AP_(OO& DE.A%&T A(AP_.A&SE Display Mo#eO
1A&%E2 R1_1A&%E 3 T4PE STRING Ee"t
+et!o# GET_P_CAT&OG_ID/
CASE iA_p"ope"ty/
EHEN i,_bsp_F#_+o#el_sette"_gette"GH,p_,iel#type/
"A_Aalue G cl_bsp_#lc_AieF_#esc"ipto"GH,iel#_type_eAent_linD/
EHEN i,_bsp_F#_+o#el_sette"_gette"GH,p_onclicD/
"A_Aalue G $PROCATIN.O$/
ENDCASE/
en#+et!o#/
T!en %n#e" EAent Met!o#>
0:;<=I+po"ting0 HTM&(_E1ENT T4PE RE. TO C&_HTM&(_E1ENT OPTIONA&
HTM&(_E1ENT_E' T4PE RE. TO I._HTM&(_DATA OPTIONA&
+et!o# EH_ONPROCATIN.O/
DATA> lA_in#e* T4PE intI/
DATA> l"_cu""ent T4PE RE. TO i,_bol_bo_p"ope"ty_access/
DATA> l"_col type "e, to cl_c"+_bol_entity_col/
DATA> lA_gui# type c"+t_ob-ect_gui#/
#ata> l"_co"e T4PE RE. TO cl_c"+_bol_co"e/
#ata> l"_ent type "e, to cl_c"+_bol_entity@
l"_p"ope"ty T4PE RE. TO i,_bol_bo_p"ope"ty_access/
DATA> l"_#ata_collection T4PE RE. TO i,_bol_bo_col/
DATA> l"_naA_s"A T4PE RE. TO i,_c"+_ui_naAigation_se"Aice/
cl_t!t+lb_utilGHget_eAent_in,o2
e*po"ting
iA_eAent G !t+lb_eAent_e*
i+po"ting
eA_in#e* G lA_in#e* 3/
* 8et !rre#t e#tit3 a#d pass it t" "t%"#d pl8<
l"_cu""ent G +eHtype#_conte*tHSEARCHRES%&THcollection_F"appe"H,in#2 iA_in#e* G lA_in#e* 3/
CHECB l"_cu""ent is (O%ND/
CREATE O()ECT l"_#ata_collection T4PE cl_c"+_bol_bo_col/
l"_ent OG l"_cu""ent/
l"_#ata_collectionHa##2 l"_ent 3/
OP_TOSEARCHMAINEINDOE2 l"_#ata_collection 3/
en#+et!o#/
8/
For D-na.i, Dro/ Do0n>
I1_PROPERT4 T4PE STRING .el#eigensc!a,t H Sie!e Inte",aceDonstanten
I1_INDE' T4PE I OPTIONA& Ceilenin#e* bei Tabelle
I1_DISP&A4_MODE T4PE A(AP_(OO& DE.A%&T A(AP_.A&SE Display Mo#eO
1A&%E2 R1_1A&%E 3 T4PE STRING Ee"t
+et!o# GET_P_CATEGOR4/
CASE iA_p"ope"ty/
EHEN i,_bsp_F#_+o#el_sette"_gette"GH.P_.IE&DT4PE/
"A_Aalue G i,_bsp_#lc_AieF_#esc"ipto"GH.IE&D_T4PE_PICB&IST/
* =HEN if_%sp_)d_m"del_setter_8etter=:41_SER&ER_E&ENT<
* r$_$ale = /4I00_S'(CATA5OR>_DD0/<
ENDCASE/
en#+et!o#/
T!en %n#e" GET_1_CATEGOR4>
0:;<=I+po"ting0 I1_MODE T4PE CHAR1 DE.A%&T
I._(SP_ED_MODE&_SETTER_GETTERGHR%NTIME_MODE Au,"u,+o#us
I1_INDE' T4PE I OPTIONA& Ceilenin#e* bei Tabelle
1A&%E2 R1_1A&%EHE&P_DESCRIPTOR 3 T4PE RE. TO
I._(SP_ED_1A&%EHE&P_DESCRIPTOR
+et!o# GET_1_CATEGOR4/
#ata l"_##lb type "e, to cl_c"+_uiu_##lb/
#ata lt_select_table type (SP_ED_DROPDOEN_TA(&E/
#ata ls_select_table liDe line o, lt_select_table/
#ata lt_catego"y type table o, CG1P_CATEGOR4/
#ata ls_catego"y liDe line o, lt_catego"y/
"e,"es! lt_select_table/
CREATE O()ECT &R_DD&(
E'PORTING
I1_SO%RCE_T4PE G iA_+o#e/
select CATEGOR4ID CATEGOR4NAME ,"o+ CG1P_CATEGOR4
into CORRESPONDING .IE&DS O. TA(&E lt_catego"y/
i, lt_catego"y is not INITIA&/
inse"t INITIA& &INE INTO lt_select_table in#e* 1/
loop at lt_catego"y into ls_catego"y/
ls_select_tableDey G ls_catego"yCATEGOR4ID/
ls_select_tableAalue G ls_catego"yCATEGOR4NAME/
appen# ls_select_table to lt_select_table/
en#loop/
CA&& METHOD &R_DD&(HSET_SE&ECTION_TA(&E
E'PORTING
IT_SE&ECTION_TA(&E G lt_select_table/
"A_Aalue!elp_#esc"ipto" G l"_##lb/
en#i,/
en#+et!o#/
T!en %n#e" Met!o#
C&_CG1_PCAT_SEARCHRE=%EST_IMP& H GET_D=%ER4_DE.INITIONS >
0:(<=Retu"ning0 1A&%E2 RT_RES%&T 3 T4PE CRMT_THTM&(_SEARCH_.IE&D_IN.O
+et!o# GET_D=%ER4_DE.INITIONS/
*CA00 METHOD S'1ER9:5ET_D?'ER>_DE4INITIONS
* RECEI&IN5
* RT_RES'0T =
* <
.IE&DS4M(O&S> J"t_"esultH T4PE c"+s_t!t+lb_sea"c!_,iel#_in,o/
* data @ lt_ddl T>1E CRMS_THTM0(_SEARCH_DD0(_N&1<
DATA l"_s? T4PE RE. TO cl_c"+_bol_#?ue"y_se"Aice/
DATA l"_sel T4PE RE. TO i,_bol_bo_col/
DATA ls_sel T4PE genilt_selection_pa"a+ete"/
DATA l"_p"op T4PE RE. TO i,_bol_bo_p"ope"ty_access/
#ata > catago"y type st"ing/
#ata l"_##lb type "e, to cl_c"+_uiu_##lb/
#ata lt_select_table type CRMT_THTM&(_SEARCH_DD&(_N1P/
#ata ls_select_table liDe line o, lt_select_table/
#ata lt_S%(catego"y type table o, CG1P_S%(_CAT/
#ata ls_S%(catego"y liDe line o, lt_S%(catego"y/
"e,"es! lt_select_table/
CA&& METHOD supe"Hget_#?ue"y_#e,initions
RECEI1ING
"t_"esult G "t_"esult/
l"_s? OG +eHtype#_conte*tHSEARCHRE=%ESTHcollection_F"appe"Hget_cu""ent2 3/
i, l"_s? is boun#/
CA&& METHOD l"_s?Hget_selection_pa"a+s
RECEI1ING
"A_"esult G l"_sel/
I. l"_sel IS (O%ND/
l"_p"op G l"_selHget_,i"st2 3/
EHI&E l"_p"op IS (O%ND/
CA&& METHOD l"_p"opHget_p"ope"ties
IMPORTING
es_att"ibutes G ls_sel/
CASE ls_selatt"_na+e/
EHEN $CATEGOR4$/
catago"y G ls_selloF/
en#case/
l"_p"op G l"_selHget_ne*t2 3/
en#F!ile/
en#i,/
en#i,/
select S%(_CATID S%(_DESC ,"o+ CG1P_S%(_CAT
into CORRESPONDING .IE&DS O. TA(&E lt_S%(catego"y F!e"e CATEGOR4ID G catago"y/
i, lt_subcatego"y is not INITIA& /
inse"t INITIA& &INE INTO lt_select_table in#e* 1/
loop at lt_subcatego"y into ls_subcatego"y/
ls_select_tableDey G ls_subcatego"yS%(_CATID/
ls_select_tableAalue G ls_subcatego"yS%(_DESC/
appen# ls_select_table to lt_select_table/
en#loop/
elsei, lt_subcatego"y is INITIA& an# catago"y is NOT INITIA&/
inse"t INITIA& &INE INTO lt_select_table in#e* 1/
en#i,/
loop at "t_"esult assigning J"t_"esultH/
CASE J"t_"esultH.IE&D/
F!en $CATEGOR4$/
J"t_"esultHse"Ae"_eAent G $D%MM4_E1ENT$/
EHEN $S%(CATEGOR4$/
i, lt_select_table is not initial/
RE.RESH J"t_"esultH##lb_options/
J"t_"esultH##lb_options G lt_select_table/
en#i,/
ENDCASE/
en#loop/
en#+et!o#/
T!en %n#e" Sub CatI#
+et!o# GET_P_S%(CATEGOR4/
CASE iA_p"ope"ty/
EHEN i,_bsp_F#_+o#el_sette"_gette"GH.P_.IE&DT4PE/
"A_Aalue G i,_bsp_#lc_AieF_#esc"ipto"GH.IE&D_T4PE_PICB&IST/
ENDCASE/
en#+et!o#/
An#
+et!o# GET_1_S%(CATEGOR4/
#ata l"_##lb type "e, to cl_c"+_uiu_##lb/
#ata lt_select_table type (SP_ED_DROPDOEN_TA(&E/
#ata ls_select_table liDe line o, lt_select_table/
#ata lt_catego"y type table o, CG1P_S%(_CAT/
#ata ls_catego"y liDe line o, lt_catego"y/
"e,"es! lt_select_table/
CREATE O()ECT &R_DD&(
E'PORTING
I1_SO%RCE_T4PE G iA_+o#e/
select S%(_CATID S%(_DESC ,"o+ CG1P_S%(_CAT
into CORRESPONDING .IE&DS O. TA(&E lt_catego"y/
i, lt_catego"y is not INITIA&/
inse"t INITIA& &INE INTO lt_select_table in#e* 1/
loop at lt_catego"y into ls_catego"y/
ls_select_tableDey G ls_catego"yS%(_CATID/
ls_select_tableAalue G ls_catego"yS%(_DESC/
appen# ls_select_table to lt_select_table/
en#loop/
CA&& METHOD &R_DD&(HSET_SE&ECTION_TA(&E
E'PORTING
IT_SE&ECTION_TA(&E G lt_select_table/
"A_Aalue!elp_#esc"ipto" G l"_##lb/
en#i,/
en#+et!o#/
In O1er1ie0 Pa+e:
E1ent Methods:
23 E4_ONNE)>
5678%I./ortin+5 4TMLB_E'ENT T$PE !EF TO CL_4TMLB_E'ENT
OPTIONAL
4TMLB_E'ENT_E9 T$PE !EF TO IF_4TMLB_DATA OPTIONAL
+et!o# EH_ONNEE/
DATA &R_CORE T4PE RE. TO C&_CRM_(O&_CORE/
#ata lt_pa"a+ type CRMT_NAME_1A&%E_PAIR_TA(/
DATA &R_ENTIT4_CO& T4PE RE. TO I._(O&_(O_CO&/
DATA &R_CONTRO&&ER T4PE RE. TO C&_CG1_PCAT_(SPEDCOMPONEM_IMP& /
DATA &R_ROOT T4PE RE. TO C&_CRM_(O&_ENTIT4/
&R_CORE G C&_CRM_(O&_COREGHGET_INSTANCE2 3/
CA&& METHOD &R_COREHROOT_CREATE
E'PORTING
I1_O()ECT_NAME G CC&_G1SEARCHGHGC_PROD%CT_RES%&T_G1
I1_CREATE_PARAM G lt_pa"a+
I1_N%M(ER G 1
RECEI1ING
R1_RES%&T G l"_entity_col/
&R_CONTRO&&ER OG COMP_CONTRO&&ER/
&R_CONTRO&&ERHT4PED_CONTE'THPCATHHCO&&ECTION_ERAPPERHC&EAR2 3/
&R_CONTRO&&ERHT4PED_CONTE'THPCATHHCO&&ECTION_ERAPPERHADD_CO&&ECTION2 &R_
ENTIT4_CO& 3/
&R_ROOT OG &R_ENTIT4_CO&HGET_C%RRENT2 3/
I. &R_ROOTH&OCB2 3 E= A(AP_TR%E/
1IEE_GRO%P_CONTE'THSET_A&&_EDITA(&E2 3/
ENDI./
en#+et!o#/
:3 E4_ONEDIT>
+et!o# EH_ONEDIT/
#ata > lo_co+p type "e, to C&_CG1_PCAT_(SPEDCOMPONEM_IMP& @
l"_ent type "e, to cl_c"+_bol_entity@
l"_Agc type "e, to i,_bsp_F#_AieF_g"oup_conte*t/
DATA &R_MSG_CONT T4PE RE. TO C&_CRM_GENI&_G&O(A&_MESS_CONT/
#ata l"_co"e type "e, to cl_C"+_bol_co"e/
gA_button_,lag G $EDIT$/
lo_co+p OG +eHco+p_cont"olle"/
c!ecD lo_co+p is boun#/
l"_ent OG lo_co+pHtype#_conte*tHPCATHHcollection_F"appe"Hget_cu""ent2 3/
CHECB l"_ent IS (O%ND/
i, l"_entHis_locDe#2 3 G abap_t"ue/ else/
l"_entHlocD2 3/
i, l"_entHis_locDe#2 3 G abap_t"ue/
+eHAieF_g"oup_conte*tHset_all_e#itable2 3/
else/
l"_Co"e G cl_c"+_bol_co"eGHget_instance2 3/
l"_+sg_cont G l"_co"eHget_global_+essage_cont2 3/
CA&& METHOD l"_+sg_contHADD_MESSAGE
E'PORTING
I1_MSG_T4PE G $E$
I1_MSG_ID G $CMC_G1_PCAT$
I1_MSG_N%M(ER G $MMM$
* I&_MS5_TEXT =
I1_MSG_11 G syuna+e
* I&_MS5_&A =
* I&_MS5_&B =
* I&_MS5_&C =
I1_SHOE_ON&4_ONCE G abap_t"ue
* I&_MS5_0E&E0 = /D/
/
en#i,/
en#i,/
en#+et!o#/
;3 EH_ONDE&ETE>
+et!o# EH_ONDE&ETE/
DATA> l"_ent T4PE RE. TO cl_c"+_bol_entity@
l"_co"e T4PE RE. TO cl_c"+_bol_co"e@
l"_coco T4PE RE. TO C&_CG1_PCAT_(SPEDCOMPONEM_IMP&/
TR4/
l"_ent OG +eHtype#_conte*tHPCATHHcollection_F"appe"Hget_cu""ent2 3/
I. l"_entHis_locDe#2 3 G abap_t"ue OR l"_entHlocD2 3 G abap_t"ue/
l"_entH#elete2 3/
l"_co"e G cl_c"+_bol_co"eGHget_instance2 3/
I. l"_co"e IS (O%ND/
l"_co"eH+o#i,y2 3/
ENDI./
* refresh the item list "f the !"mp"#e#t !"#tr"ller
l"_coco OG +eHco+p_cont"olle"/
I. l"_coco IS (O%ND/
l"_cocoHtype#_conte*tHPCATHHcollection_F"appe"Hpublis!_cu""ent2 3/
+eHop_#e,ault_bacD2 3/
ENDI./
ENDI./
CATCH c*_sy_+oAe_cast_e""o" c*_sy_"e,_is_initial/
RET%RN/
ENDTR4/
en#+et!o#/
<3 E4_ONCANCEL:
+et!o# EH_ONCANCE&/
#ata l"_co"e type "e, to cl_C"+_bol_co"e/
DATA &R_T' T4PE RE. TO I._(Ol_TRANSACTION_CONTE'T/
l"_Co"e G cl_c"+_bol_co"eGHget_instance2 3/
l"_t* OG l"_co"eHget_t"ansaction2 3/
&R_T'HRE1ERT2 3/
*** me9:"p_defalt_%a!+, -<
en#+et!o#/
K/
E4_ON"A'E:
I./ortin+5 4TMLB_E'ENT T$PE !EF TO CL_4TMLB_E'ENT OPTIONAL
4TMLB_E'ENT_E9 T$PE !EF TO IF_4TMLB_DATA OPTIONAL
+et!o# EH_ONSA1E/
DATA &R_ENTIT4 T4PE RE. TO C&_CRM_(O&_ENTIT4/
DATA &R_CONTRO&&ER T4PE RE. TO C&_CG1_PCAT_(SPEDCOMPONEM_IMP& /
DATA &R_T' T4PE RE. TO I._(Ol_TRANSACTION_CONTE'T/
#ata l"_co"e type "e, to cl_C"+_bol_co"e/
DATA &S_ATTR T4PE CST_G1_CAT&OG_RES%&T/
DATA &R_MSG_CONT T4PE RE. TO C&_CRM_GENI&_G&O(A&_MESS_CONT/
* data lr_!"re t3pe ref t" !l_Crm_%"l_!"re<
l"_Co"e G cl_c"+_bol_co"eGHget_instance2 3/
l"_t* OG l"_co"eHget_t"ansaction2 3/
&R_CONTRO&&ER OG COMP_CONTRO&&ER/
"""""""""""""""""""""""""""""""""""""""""""""
I. &R_T'HCHECB_SA1E_NEEDED2 3 E= A(AP_TR%E/
i, l"_t*HsaAe2 3 e? abap_t"ue/
l"_t*Hco++it2 3/
l"_Co"e G cl_c"+_bol_co"eGHget_instance2 3/
l"_+sg_cont G l"_co"eHget_global_+essage_cont2 3/
CA&& METHOD l"_+sg_contHADD_MESSAGE
E'PORTING
I1_MSG_T4PE G $S$
I1_MSG_ID G $CMC_G1_PCAT$
I1_MSG_N%M(ER G $MM1$
* I&_MS5_TEXT =
* I&_MS5_&D = s39#ame
* I&_MS5_&A =
* I&_MS5_&B =
* I&_MS5_&C =
I1_SHOE_ON&4_ONCE G abap_t"ue
* I&_MS5_0E&E0 = /D/
/
clea" gA_button_,lag/
en#i,/
ENDI./
en#+et!o#/