content
stringlengths 4
1.04M
| input_ids
sequencelengths 2
1.02k
| attention_mask
sequencelengths 2
1.02k
|
---|---|---|
TYPES: BEGIN OF t_input,
row TYPE string,
END OF t_input.
* Input declaration
DATA: lv_input TYPE TABLE OF t_input,
wa_input LIKE LINE OF lv_input.
* Assign with the puzzle input.
lv_input = VALUE #(
( row = '33' )
( row = '18' )
( row = '22' )
( row = '44' )
( row = '49' )
( row = '15' )
( row = '12' )
( row = '38' )
( row = '41' )
( row = '46' )
( row = '3' )
( row = '42' )
( row = '37' )
( row = '19' )
( row = '13' )
( row = '7' )
( row = '21' )
( row = '29' )
( row = '34' )
( row = '40' )
( row = '39' )
( row = '35' )
( row = '27' )
( row = '25' )
( row = '48' )
( row = '87' )
( row = '10' )
( row = '16' )
( row = '17' )
( row = '45' )
( row = '18' )
( row = '30' )
( row = '20' )
( row = '22' )
( row = '23' )
( row = '73' )
( row = '24' )
( row = '26' )
( row = '28' )
( row = '53' )
( row = '31' )
( row = '37' )
( row = '51' )
( row = '32' )
( row = '33' )
( row = '34' )
( row = '36' )
( row = '35' )
( row = '54' )
( row = '27' )
( row = '38' )
( row = '39' )
( row = '40' )
( row = '74' )
( row = '70' )
( row = '41' )
( row = '93' )
( row = '144' )
( row = '45' )
( row = '63' )
( row = '87' )
( row = '66' )
( row = '65' )
( row = '55' )
( row = '58' )
( row = '62' )
( row = '72' )
( row = '105' )
( row = '59' )
( row = '76' )
( row = '61' )
( row = '67' )
( row = '68' )
( row = '77' )
( row = '106' )
( row = '78' )
( row = '79' )
( row = '183' )
( row = '86' )
( row = '117' )
( row = '96' )
( row = '100' )
( row = '108' )
( row = '104' )
( row = '123' )
( row = '113' )
( row = '114' )
( row = '116' )
( row = '129' )
( row = '119' )
( row = '178' )
( row = '120' )
( row = '196' )
( row = '126' )
( row = '177' )
( row = '184' )
( row = '135' )
( row = '182' )
( row = '192' )
( row = '201' )
( row = '174' )
( row = '360' )
( row = '186' )
( row = '190' )
( row = '210' )
( row = '248' )
( row = '214' )
( row = '282' )
( row = '217' )
( row = '227' )
( row = '229' )
( row = '304' )
( row = '235' )
( row = '370' )
( row = '308' )
( row = '261' )
( row = '302' )
( row = '300' )
( row = '542' )
( row = '376' )
( row = '309' )
( row = '317' )
( row = '356' )
( row = '364' )
( row = '375' )
( row = '407' )
( row = '396' )
( row = '400' )
( row = '404' )
( row = '585' )
( row = '599' )
( row = '514' )
( row = '444' )
( row = '907' )
( row = '456' )
( row = '633' )
( row = '687' )
( row = '496' )
( row = '665' )
( row = '561' )
( row = '563' )
( row = '832' )
( row = '1056' )
( row = '626' )
( row = '673' )
( row = '681' )
( row = '720' )
( row = '731' )
( row = '840' )
( row = '819' )
( row = '796' )
( row = '800' )
( row = '1033' )
( row = '1117' )
( row = '900' )
( row = '958' )
( row = '940' )
( row = '952' )
( row = '1017' )
( row = '1019' )
( row = '1748' )
( row = '1177' )
( row = '1422' )
( row = '1124' )
( row = '1578' )
( row = '1189' )
( row = '1299' )
( row = '1678' )
( row = '1307' )
( row = '1354' )
( row = '2702' )
( row = '2476' )
( row = '1689' )
( row = '3775' )
( row = '1740' )
( row = '2813' )
( row = '2706' )
( row = '1977' )
( row = '1898' )
( row = '1840' )
( row = '2630' )
( row = '2864' )
( row = '1971' )
( row = '2439' )
( row = '2143' )
( row = '2932' )
( row = '2301' )
( row = '2313' )
( row = '2423' )
( row = '2488' )
( row = '2496' )
( row = '3194' )
( row = '2661' )
( row = '2996' )
( row = '3043' )
( row = '4416' )
( row = '3429' )
( row = '3529' )
( row = '3580' )
( row = '3638' )
( row = '3738' )
( row = '3983' )
( row = '4830' )
( row = '3811' )
( row = '4114' )
( row = '4724' )
( row = '5782' )
( row = '4394' )
( row = '4444' )
( row = '7143' )
( row = '6623' )
( row = '6882' )
( row = '7267' )
( row = '5149' )
( row = '7823' )
( row = '5855' )
( row = '5657' )
( row = '5704' )
( row = '6425' )
( row = '7026' )
( row = '6958' )
( row = '9666' )
( row = '7109' )
( row = '7218' )
( row = '10249' )
( row = '8535' )
( row = '7794' )
( row = '11512' )
( row = '14327' )
( row = '9969' )
( row = '15906' )
( row = '8838' )
( row = '10101' )
( row = '9593' )
( row = '12082' )
( row = '10806' )
( row = '10853' )
( row = '13451' )
( row = '17489' )
( row = '13073' )
( row = '11361' )
( row = '12129' )
( row = '17210' )
( row = '13383' )
( row = '13984' )
( row = '30562' )
( row = '16329' )
( row = '14903' )
( row = '15753' )
( row = '19306' )
( row = '16632' )
( row = '23920' )
( row = '26456' )
( row = '26113' )
( row = '18431' )
( row = '27032' )
( row = '19644' )
( row = '27882' )
( row = '20399' )
( row = '37885' )
( row = '21659' )
( row = '27976' )
( row = '24812' )
( row = '23490' )
( row = '24744' )
( row = '25345' )
( row = '25512' )
( row = '42785' )
( row = '27367' )
( row = '29737' )
( row = '30656' )
( row = '45579' )
( row = '31535' )
( row = '32385' )
( row = '35063' )
( row = '52788' )
( row = '38075' )
( row = '38830' )
( row = '44544' )
( row = '40090' )
( row = '40043' )
( row = '55249' )
( row = '57897' )
( row = '42058' )
( row = '45149' )
( row = '52712' )
( row = '48234' )
( row = '48302' )
( row = '72946' )
( row = '50089' )
( row = '64342' )
( row = '52879' )
( row = '103551' )
( row = '57104' )
( row = '72428' )
( row = '62191' )
( row = '79837' )
( row = '63920' )
( row = '71215' )
( row = '73138' )
( row = '80133' )
( row = '84587' )
( row = '82148' )
( row = '156430' )
( row = '90132' )
( row = '152323' )
( row = '113146' )
( row = '90360' )
( row = '197733' )
( row = '100946' )
( row = '105591' )
( row = '101113' )
( row = '98391' )
( row = '288093' )
( row = '154280' )
( row = '109983' )
( row = '204497' )
( row = '164424' )
( row = '152975' )
( row = '137058' )
( row = '126111' )
( row = '191473' )
( row = '181079' )
( row = '144353' )
( row = '153271' )
( row = '170265' )
( row = '166735' )
( row = '183261' )
( row = '180492' )
( row = '188523' )
( row = '236094' )
( row = '235449' )
( row = '188751' )
( row = '202059' )
( row = '262815' )
( row = '305610' )
( row = '199504' )
( row = '208374' )
( row = '247041' )
( row = '312042' )
( row = '254336' )
( row = '440591' )
( row = '353175' )
( row = '442859' )
( row = '263169' )
( row = '270464' )
( row = '616344' )
( row = '297624' )
( row = '311088' )
( row = '320006' )
( row = '402829' )
( row = '377274' )
( row = '363753' )
( row = '369015' )
( row = '501377' )
( row = '388255' )
( row = '390810' )
( row = '397125' )
( row = '401563' )
( row = '407878' )
( row = '446545' )
( row = '455415' )
( row = '471543' )
( row = '732768' )
( row = '524800' )
( row = '751679' )
( row = '1043856' )
( row = '533633' )
( row = '626922' )
( row = '568088' )
( row = '581552' )
( row = '608712' )
( row = '699343' )
( row = '631094' )
( row = '697280' )
( row = '779065' )
( row = '926958' )
( row = '921925' )
( row = '868668' )
( row = '785380' )
( row = '969651' )
( row = '856978' )
( row = '798688' )
( row = '809441' )
( row = '989430' )
( row = '901960' )
( row = '1036967' )
( row = '996343' )
( row = '1285312' )
( row = '1133512' )
( row = '1101721' )
( row = '1195010' )
( row = '1115185' )
( row = '1149640' )
( row = '1330437' )
( row = '1911355' )
( row = '1239806' )
( row = '1328374' )
( row = '1912577' )
( row = '1476345' )
( row = '3239729' )
( row = '1654048' )
( row = '1655666' )
( row = '1594821' )
( row = '1584068' )
( row = '1608129' )
( row = '1758938' )
( row = '1700648' )
( row = '1711401' )
( row = '2365341' )
( row = '1898303' )
( row = '2895658' )
( row = '2098064' )
( row = '2216906' )
( row = '4654596' )
( row = '3293074' )
( row = '2769233' )
( row = '2354991' )
( row = '3039775' )
( row = '2834627' )
( row = '3238116' )
( row = '3810880' )
( row = '3132011' )
( row = '3060413' )
( row = '3178889' )
( row = '3284716' )
( row = '3192197' )
( row = '3202950' )
( row = '3295469' )
( row = '4253294' )
( row = '3928307' )
( row = '3412049' )
( row = '4720332' )
( row = '4993722' )
( row = '4867297' )
( row = '3996367' )
( row = '4571897' )
( row = '8152013' )
( row = '4986139' )
( row = '5124224' )
( row = '5189618' )
( row = '6472462' )
( row = '5394766' )
( row = '5874402' )
( row = '5895040' )
( row = '7003077' )
( row = '6192424' )
( row = '7385305' )
( row = '8181601' )
( row = '6476913' )
( row = '6395147' )
( row = '6487666' )
( row = '8716699' )
( row = '6707518' )
( row = '7408416' )
( row = '8398188' )
( row = '7983946' )
( row = '8568264' )
( row = '8863664' )
( row = '8982506' )
( row = '9120591' )
( row = '13184431' )
( row = '10860541' )
( row = '10110363' )
( row = '10313842' )
( row = '10584384' )
( row = '11289806' )
( row = '15470172' )
( row = '11769442' )
( row = '12382706' )
( row = '16579789' )
( row = '15056088' )
( row = '12872060' )
( row = '13896082' )
( row = '12964579' )
( row = '13102665' )
( row = '25185888' )
( row = '24474237' )
( row = '14115934' )
( row = '20633106' )
( row = '16382134' )
( row = '16552210' )
( row = '23098440' )
( row = '19092869' )
( row = '18103097' )
( row = '24209924' )
( row = '24392471' )
( row = '27842016' )
( row = '24254385' )
( row = '28687481' )
( row = '24152148' )
( row = '23059248' )
( row = '38150467' )
( row = '24641502' )
( row = '25347285' )
( row = '25836639' )
( row = '42357482' )
( row = '36023827' )
( row = '26067244' )
( row = '27080513' )
( row = '35645079' )
( row = '49033973' )
( row = '30498068' )
( row = '39463219' )
( row = '42619454' )
( row = '32934344' )
( row = '34655307' )
( row = '29221323' )
( row = '37195966' )
( row = '60665329' )
( row = '62725592' )
( row = '47313633' )
( row = '50901264' )
( row = '47211396' )
( row = '82958712' )
( row = '47700750' )
( row = '48406533' )
( row = '49988787' )
( row = '50708746' )
( row = '51183924' )
( row = '51903883' )
( row = '53147757' )
( row = '88497192' )
( row = '77789259' )
( row = '56301836' )
( row = '86546343' )
( row = '67694034' )
( row = '59719391' )
( row = '70130310' )
( row = '81340877' )
( row = '101892670' )
( row = '63876630' )
( row = '66417289' )
( row = '84407362' )
( row = '96107283' )
( row = '94525029' )
( row = '146096070' )
( row = '94912146' )
( row = '95617929' )
( row = '103087807' )
( row = '101554290' )
( row = '180025291' )
( row = '103136544' )
( row = '102612629' )
( row = '110903315' )
( row = '105051640' )
( row = '109449593' )
( row = '116021227' )
( row = '120178466' )
( row = '122719125' )
( row = '178932391' )
( row = '197661573' )
( row = '123596021' )
( row = '167971579' )
( row = '130293919' )
( row = '283113098' )
( row = '199576669' )
( row = '245349680' )
( row = '199243827' )
( row = '189437175' )
( row = '213515944' )
( row = '190530075' )
( row = '196466436' )
( row = '197172219' )
( row = '233045614' )
( row = '390106744' )
( row = '223315010' )
( row = '225331754' )
( row = '207664269' )
( row = '214501233' )
( row = '396748888' )
( row = '225470820' )
( row = '291567600' )
( row = '312156300' )
( row = '478395294' )
( row = '343809863' )
( row = '253889940' )
( row = '298265498' )
( row = '509328519' )
( row = '319731094' )
( row = '472550273' )
( row = '379967250' )
( row = '385903611' )
( row = '386609394' )
( row = '479221694' )
( row = '711440908' )
( row = '545201914' )
( row = '393638655' )
( row = '629794502' )
( row = '422165502' )
( row = '439972053' )
( row = '680214542' )
( row = '461554209' )
( row = '433135089' )
( row = '468391173' )
( row = '1024423608' )
( row = '479360760' )
( row = '545457540' )
( row = '552155438' )
( row = '854294784' )
( row = '573621034' )
( row = '617996592' )
( row = '678232748' )
( row = '705634705' )
( row = '699698344' )
( row = '938840569' )
( row = '773605905' )
( row = '772513005' )
( row = '780248049' )
( row = '815804157' )
( row = '1170152030' )
( row = '826773744' )
( row = '855192864' )
( row = '1418201329' )
( row = '862137555' )
( row = '1794033433' )
( row = '1024818300' )
( row = '894689298' )
( row = '1051131681' )
( row = '1163454132' )
( row = '1031516198' )
( row = '1052981794' )
( row = '1119078574' )
( row = '1125776472' )
( row = '1191617626' )
( row = '1450745753' )
( row = '1485882754' )
( row = '1377931092' )
( row = '1405333049' )
( row = '1472211349' )
( row = '2266130803' )
( row = '1546118910' )
( row = '1552761054' )
( row = '2576522225' )
( row = '1642577901' )
( row = '1717330419' )
( row = '1681966608' )
( row = '1749882162' )
( row = '2300022347' )
( row = '1886955855' )
( row = '2216435926' )
( row = '1919507598' )
( row = '2242749307' )
( row = '2084497992' )
( row = '2150594772' )
( row = '2157292670' )
( row = '2172060368' )
( row = '2244855046' )
( row = '2317394098' )
( row = '2569548718' )
( row = '2891215803' )
( row = '2783264141' )
( row = '2850142441' )
( row = '2877544398' )
( row = '3762554836' )
( row = '3098879964' )
( row = '4533830024' )
( row = '3195338955' )
( row = '4384520339' )
( row = '5066578367' )
( row = '3399297027' )
( row = '3568922463' )
( row = '3636838017' )
( row = '8170668041' )
( row = '6514382415' )
( row = '4373728596' )
( row = '4467988870' )
( row = '4322655140' )
( row = '6446466861' )
( row = '4307887442' )
( row = '5674479944' )
( row = '4416915414' )
( row = '7406767406' )
( row = '5100658239' )
( row = '5352812859' )
( row = '5978603096' )
( row = '7105919281' )
( row = '6498176991' )
( row = '8669580702' )
( row = '6294218919' )
( row = '6735717981' )
( row = '11048212439' )
( row = '8021358356' )
( row = '6968219490' )
( row = '11573908151' )
( row = '7036135044' )
( row = '7205760480' )
( row = '7944725459' )
( row = '9423313379' )
( row = '8630542582' )
( row = '8790644010' )
( row = '17868127070' )
( row = '8724802856' )
( row = '9408545681' )
( row = '9982367386' )
( row = '10453471098' )
( row = '9517573653' )
( row = '11079261335' )
( row = '12792395910' )
( row = '18253972919' )
( row = '12272822015' )
( row = '13400138200' )
( row = '13233894972' )
( row = '13029936900' )
( row = '13262438409' )
( row = '14912944949' )
( row = '14004354534' )
( row = '27677286298' )
( row = '17188127866' )
( row = '20436273244' )
( row = '14241895524' )
( row = '21790395668' )
( row = '20502574714' )
( row = '17421186592' )
( row = '19499941039' )
( row = '17515446866' )
( row = '25912930722' )
( row = '23687366070' )
( row = '18926119334' )
( row = '20435838484' )
( row = '25672960215' )
( row = '24109198235' )
( row = '44865414164' )
( row = '25065217925' )
( row = '25302758915' )
( row = '25506716987' )
( row = '26263831872' )
( row = '30683625001' )
( row = '27034291434' )
( row = '27504333933' )
( row = '28246250058' )
( row = '31192482400' )
( row = '48104811593' )
( row = '36921127631' )
( row = '33168014858' )
( row = '31663082116' )
( row = '42486404517' )
( row = '34936633458' )
( row = '43188407081' )
( row = '50683461724' )
( row = '36441566200' )
( row = '43991337259' )
( row = '81786541795' )
( row = '39361957818' )
( row = '44545036719' )
( row = '49174416160' )
( row = '49411957150' )
( row = '61876107401' )
( row = '50367976840' )
( row = '53549008973' )
( row = '51770548859' )
( row = '53298123306' )
( row = '54538625367' )
( row = '55280541492' )
( row = '59909332174' )
( row = '84348590608' )
( row = '87706640225' )
( row = '64831096974' )
( row = '82346543840' )
( row = '71025039934' )
( row = '66599715574' )
( row = '71378199658' )
( row = '126331578514' )
( row = '75803524018' )
( row = '121746176498' )
( row = '93956993869' )
( row = '115923236377' )
( row = '89729934658' )
( row = '83906994537' )
( row = '93719452879' )
( row = '143131410029' )
( row = '99779933990' )
( row = '102138525699' )
( row = '136119139467' )
( row = '125563665301' )
( row = '106309174226' )
( row = '107836748673' )
( row = '109819166859' )
( row = '115189873666' )
( row = '126509047748' )
( row = '185622690877' )
( row = '147177640814' )
( row = '131430812548' )
( row = '287761216576' )
( row = '137624755508' )
( row = '192931294088' )
( row = '165533458676' )
( row = '159710518555' )
( row = '177626447416' )
( row = '201793742542' )
( row = '173636929195' )
( row = '183449387537' )
( row = '183686928527' )
( row = '186045520236' )
( row = '193499386869' )
( row = '206089108216' )
( row = '217655915532' )
( row = '208447699925' )
( row = '407882850758' )
( row = '423745023748' )
( row = '232818221974' )
( row = '239267561221' )
( row = '300145976943' )
( row = '241698921414' )
( row = '314880200085' )
( row = '269055568056' )
( row = '330627028351' )
( row = '291141331103' )
( row = '353209905424' )
( row = '343159906092' )
( row = '392134628452' )
( row = '325243977231' )
( row = '351263376611' )
( row = '363671967652' )
( row = '357086316732' )
( row = '416505150501' )
( row = '367136316064' )
( row = '399588495085' )
( row = '394493220161' )
( row = '745756596772' )
( row = '414536808141' )
( row = '426103615457' )
( row = '441265921899' )
( row = '472085783195' )
( row = '584858827506' )
( row = '474517143388' )
( row = '592477466645' )
( row = '709373420246' )
( row = '510754489470' )
( row = '783641466565' )
( row = '560196899159' )
( row = '841653459452' )
( row = '616385308334' )
( row = '694423282703' )
( row = '719737197392' )
( row = '676507353842' )
( row = '886622591336' )
( row = '720758284384' )
( row = '724222632796' )
( row = '1071000574003' )
( row = '810998370662' )
( row = '1010962442963' )
( row = '794081715246' )
( row = '1208618523387' )
( row = '1150639342145' )
( row = '1001462821058' )
( row = '867369537356' )
( row = '915783065287' )
( row = '946602926583' )
( row = '985271632858' )
( row = '1034714042547' )
( row = '1176582207493' )
( row = '1070951388629' )
( row = '1127139797804' )
( row = '1587106734748' )
( row = '1812461191720' )
( row = '2502889800035' )
( row = '1292892662176' )
( row = '1370930636545' )
( row = '1396244551234' )
( row = '1607380875720' )
( row = '3537603842582' )
( row = '1444980917180' )
( row = '1795174021425' )
( row = '1938370111359' )
( row = '1661451252602' )
( row = '1709864780533' )
( row = '2086974377422' )
( row = '1950497107834' )
( row = '1813972463939' )
( row = '1783152602643' )
( row = '2105665431176' )
( row = '1986734453916' )
( row = '1931874559441' )
( row = '2019985675405' )
( row = '3108456766934' )
( row = '2198091186433' )
( row = '2788591050406' )
( row = '2420032459980' )
( row = '2689137213410' )
( row = '3769887056559' )
( row = '4136461297792' )
( row = '2663823298721' )
( row = '2767175187779' )
( row = '3003625426954' )
( row = '4056162539010' )
( row = '3106432169782' )
( row = '3228133519823' )
( row = '3371316033135' )
( row = '3733649710477' )
( row = '4887228399843' )
( row = '3493017383176' )
( row = '3597125066582' )
( row = '5109290858130' )
( row = '3803138278048' )
( row = '5917270733233' )
( row = '4125651106581' )
( row = '3951860234846' )
( row = '4129965745874' )
( row = '4218076861838' )
( row = '4618123646413' )
( row = '4861914485154' )
( row = '5109169673390' )
( row = '7773114156851' )
( row = '6156840681897' )
( row = '6840081880259' )
( row = '5430998486500' )
( row = '5667448725675' )
( row = '6500824898256' )
( row = '6110057596736' )
( row = '6721150902999' )
( row = '10235708703317' )
( row = '7446210381661' )
( row = '6968441099717' )
( row = '7090142449758' )
( row = '8743774752994' )
( row = '7296155661224' )
( row = '7400263344630' )
( row = '8912307951438' )
( row = '8665052763202' )
( row = '8077511341427' )
( row = '8081825980720' )
( row = '9079991346992' )
( row = '15069148633335' )
( row = '10374917543735' )
( row = '13510320941366' )
( row = '9971084158544' )
( row = '11219227270126' )
( row = '14917593221686' )
( row = '12271080366759' )
( row = '11098447212175' )
( row = '12168273623931' )
( row = '11777506322411' )
( row = '12610882494992' )
( row = '12831208499735' )
( row = '13689592002716' )
( row = '14058583549475' )
( row = '14264596760941' )
( row = '14368704444347' )
( row = '14386298110982' )
( row = '14696419005854' )
( row = '23369527578934' )
( row = '20231471844365' )
( row = '16159337322147' )
( row = '24824390085349' )
( row = '25915646275980' )
( row = '26997180605974' )
( row = '25678594565297' )
( row = '22242164525303' )
( row = '22802292658279' )
( row = '22139357782475' )
( row = '21069531370719' )
( row = '22317674482301' )
( row = '22875953534586' )
( row = '25442090994727' )
( row = '28961015766795' )
( row = '25836089871886' )
( row = '26042103083352' )
( row = '26300474497708' )
( row = '40284350720327' )
( row = '28755002555329' )
( row = '28323180310416' )
( row = '35334128131660' )
( row = '51203180292098' )
( row = '36525655893457' )
( row = '45044457183582' )
( row = '45193628016887' )
( row = '36390809166512' )
( row = '42074983598127' )
( row = '48153764354187' )
( row = '43311695896022' )
( row = '49176428032294' )
( row = '43208889153194' )
( row = '43387205853020' )
( row = '43871824028998' )
( row = '44457032264776' )
( row = '73989854226073' )
( row = '47759765477028' )
( row = '48318044529313' )
( row = '51278180866613' )
( row = '54591092427215' )
( row = '69044979025080' )
( row = '52342577581060' )
( row = '54623654808124' )
( row = '57078182865745' )
( row = '76082945787444' )
( row = '92610796618963' )
( row = '71724937298172' )
( row = '72916465059969' )
( row = '78465792764639' )
( row = '79599698319706' )
( row = '81584437183399' )
( row = '79702505062534' )
( row = '122092893092263' )
( row = '86596095006214' )
( row = '86520585049216' )
( row = '87080713182192' )
( row = '96799609845836' )
( row = '87259029882018' )
( row = '99080687072900' ) ).
DATA: lv_checked TYPE abap_bool VALUE abap_false,
lv_current_index TYPE i VALUE 0.
LOOP AT lv_input INTO wa_input.
IF lines( lv_input ) GE ( sy-tabix + 25 ).
lv_checked = abap_false.
lv_current_index = sy-tabix + 25.
READ TABLE lv_input INTO DATA(wa_cur_result) INDEX lv_current_index.
" Go through the preamble
DO 25 TIMES.
DATA(lv_cur_index_a) = sy-index.
DO 25 TIMES.
DATA(lv_cur_index_b) = sy-index.
READ TABLE lv_input INTO DATA(lv_number_a) INDEX lv_current_index - lv_cur_index_a.
READ TABLE lv_input INTO DATA(lv_number_b) INDEX lv_current_index - lv_cur_index_b.
DATA(lv_check_result) = lv_number_a-row + lv_number_b-row.
IF lv_check_result EQ wa_cur_result-row.
lv_checked = abap_true.
EXIT.
ENDIF.
ENDDO.
IF lv_checked EQ abap_true.
EXIT.
ENDIF.
ENDDO.
IF lv_checked EQ abap_false.
WRITE: 'Found value: ' && wa_cur_result-row.
EXIT.
ENDIF.
ELSE.
EXIT.
ENDIF.
ENDLOOP.
| [
9936,
47,
1546,
25,
347,
43312,
3963,
256,
62,
15414,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
5752,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
23578,
3963,
256,
62,
15414,
13,
198,
198,
9,
23412,
14305,
198,
26947,
25,
300,
85,
62,
15414,
41876,
43679,
3963,
256,
62,
15414,
11,
198,
220,
220,
220,
220,
220,
2082,
62,
15414,
34178,
48920,
3963,
300,
85,
62,
15414,
13,
198,
198,
9,
2195,
570,
351,
262,
15027,
5128,
13,
198,
6780,
62,
15414,
796,
26173,
8924,
1303,
7,
198,
357,
5752,
796,
705,
2091,
6,
1267,
198,
357,
5752,
796,
705,
1507,
6,
1267,
198,
357,
5752,
796,
705,
1828,
6,
1267,
198,
357,
5752,
796,
705,
2598,
6,
1267,
198,
357,
5752,
796,
705,
2920,
6,
1267,
198,
357,
5752,
796,
705,
1314,
6,
1267,
198,
357,
5752,
796,
705,
1065,
6,
1267,
198,
357,
5752,
796,
705,
2548,
6,
1267,
198,
357,
5752,
796,
705,
3901,
6,
1267,
198,
357,
5752,
796,
705,
3510,
6,
1267,
198,
357,
5752,
796,
705,
18,
6,
1267,
198,
357,
5752,
796,
705,
3682,
6,
1267,
198,
357,
5752,
796,
705,
2718,
6,
1267,
198,
357,
5752,
796,
705,
1129,
6,
1267,
198,
357,
5752,
796,
705,
1485,
6,
1267,
198,
357,
5752,
796,
705,
22,
6,
1267,
198,
357,
5752,
796,
705,
2481,
6,
1267,
198,
357,
5752,
796,
705,
1959,
6,
1267,
198,
357,
5752,
796,
705,
2682,
6,
1267,
198,
357,
5752,
796,
705,
1821,
6,
1267,
198,
357,
5752,
796,
705,
2670,
6,
1267,
198,
357,
5752,
796,
705,
2327,
6,
1267,
198,
357,
5752,
796,
705,
1983,
6,
1267,
198,
357,
5752,
796,
705,
1495,
6,
1267,
198,
357,
5752,
796,
705,
2780,
6,
1267,
198,
357,
5752,
796,
705,
5774,
6,
1267,
198,
357,
5752,
796,
705,
940,
6,
1267,
198,
357,
5752,
796,
705,
1433,
6,
1267,
198,
357,
5752,
796,
705,
1558,
6,
1267,
198,
357,
5752,
796,
705,
2231,
6,
1267,
198,
357,
5752,
796,
705,
1507,
6,
1267,
198,
357,
5752,
796,
705,
1270,
6,
1267,
198,
357,
5752,
796,
705,
1238,
6,
1267,
198,
357,
5752,
796,
705,
1828,
6,
1267,
198,
357,
5752,
796,
705,
1954,
6,
1267,
198,
357,
5752,
796,
705,
4790,
6,
1267,
198,
357,
5752,
796,
705,
1731,
6,
1267,
198,
357,
5752,
796,
705,
2075,
6,
1267,
198,
357,
5752,
796,
705,
2078,
6,
1267,
198,
357,
5752,
796,
705,
4310,
6,
1267,
198,
357,
5752,
796,
705,
3132,
6,
1267,
198,
357,
5752,
796,
705,
2718,
6,
1267,
198,
357,
5752,
796,
705,
4349,
6,
1267,
198,
357,
5752,
796,
705,
2624,
6,
1267,
198,
357,
5752,
796,
705,
2091,
6,
1267,
198,
357,
5752,
796,
705,
2682,
6,
1267,
198,
357,
5752,
796,
705,
2623,
6,
1267,
198,
357,
5752,
796,
705,
2327,
6,
1267,
198,
357,
5752,
796,
705,
4051,
6,
1267,
198,
357,
5752,
796,
705,
1983,
6,
1267,
198,
357,
5752,
796,
705,
2548,
6,
1267,
198,
357,
5752,
796,
705,
2670,
6,
1267,
198,
357,
5752,
796,
705,
1821,
6,
1267,
198,
357,
5752,
796,
705,
4524,
6,
1267,
198,
357,
5752,
796,
705,
2154,
6,
1267,
198,
357,
5752,
796,
705,
3901,
6,
1267,
198,
357,
5752,
796,
705,
6052,
6,
1267,
198,
357,
5752,
796,
705,
18444,
6,
1267,
198,
357,
5752,
796,
705,
2231,
6,
1267,
198,
357,
5752,
796,
705,
5066,
6,
1267,
198,
357,
5752,
796,
705,
5774,
6,
1267,
198,
357,
5752,
796,
705,
2791,
6,
1267,
198,
357,
5752,
796,
705,
2996,
6,
1267,
198,
357,
5752,
796,
705,
2816,
6,
1267,
198,
357,
5752,
796,
705,
3365,
6,
1267,
198,
357,
5752,
796,
705,
5237,
6,
1267,
198,
357,
5752,
796,
705,
4761,
6,
1267,
198,
357,
5752,
796,
705,
13348,
6,
1267,
198,
357,
5752,
796,
705,
3270,
6,
1267,
198,
357,
5752,
796,
705,
4304,
6,
1267,
198,
357,
5752,
796,
705,
5333,
6,
1267,
198,
357,
5752,
796,
705,
3134,
6,
1267,
198,
357,
5752,
796,
705,
3104,
6,
1267,
198,
357,
5752,
796,
705,
3324,
6,
1267,
198,
357,
5752,
796,
705,
15801,
6,
1267,
198,
357,
5752,
796,
705,
3695,
6,
1267,
198,
357,
5752,
796,
705,
3720,
6,
1267,
198,
357,
5752,
796,
705,
24839,
6,
1267,
198,
357,
5752,
796,
705,
4521,
6,
1267,
198,
357,
5752,
796,
705,
17657,
6,
1267,
198,
357,
5752,
796,
705,
4846,
6,
1267,
198,
357,
5752,
796,
705,
3064,
6,
1267,
198,
357,
5752,
796,
705,
15711,
6,
1267,
198,
357,
5752,
796,
705,
13464,
6,
1267,
198,
357,
5752,
796,
705,
10163,
6,
1267,
198,
357,
5752,
796,
705,
16616,
6,
1267,
198,
357,
5752,
796,
705,
16562,
6,
1267,
198,
357,
5752,
796,
705,
18298,
6,
1267,
198,
357,
5752,
796,
705,
18741,
6,
1267,
198,
357,
5752,
796,
705,
16315,
6,
1267,
198,
357,
5752,
796,
705,
23188,
6,
1267,
198,
357,
5752,
796,
705,
10232,
6,
1267,
198,
357,
5752,
796,
705,
25272,
6,
1267,
198,
357,
5752,
796,
705,
19420,
6,
1267,
198,
357,
5752,
796,
705,
22413,
6,
1267,
198,
357,
5752,
796,
705,
22883,
6,
1267,
198,
357,
5752,
796,
705,
17059,
6,
1267,
198,
357,
5752,
796,
705,
24294,
6,
1267,
198,
357,
5752,
796,
705,
17477,
6,
1267,
198,
357,
5752,
796,
705,
1264,
6,
1267,
198,
357,
5752,
796,
705,
22985,
6,
1267,
198,
357,
5752,
796,
705,
15277,
6,
1267,
198,
357,
5752,
796,
705,
25096,
6,
1267,
198,
357,
5752,
796,
705,
19782,
6,
1267,
198,
357,
5752,
796,
705,
21536,
6,
1267,
198,
357,
5752,
796,
705,
23045,
6,
1267,
198,
357,
5752,
796,
705,
22291,
6,
1267,
198,
357,
5752,
796,
705,
32568,
6,
1267,
198,
357,
5752,
796,
705,
24591,
6,
1267,
198,
357,
5752,
796,
705,
24403,
6,
1267,
198,
357,
5752,
796,
705,
23539,
6,
1267,
198,
357,
5752,
796,
705,
21288,
6,
1267,
198,
357,
5752,
796,
705,
22370,
6,
1267,
198,
357,
5752,
796,
705,
20167,
6,
1267,
198,
357,
5752,
796,
705,
21495,
6,
1267,
198,
357,
5752,
796,
705,
30057,
6,
1267,
198,
357,
5752,
796
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS zcl_abapgit_object_pers DEFINITION PUBLIC INHERITING FROM zcl_abapgit_objects_super FINAL.
PUBLIC SECTION.
INTERFACES zif_abapgit_object.
METHODS:
constructor
IMPORTING
is_item TYPE zif_abapgit_definitions=>ty_item
iv_language TYPE spras.
PROTECTED SECTION.
PRIVATE SECTION.
TYPES:
BEGIN OF ty_personalization_object,
pers_reg TYPE spers_reg,
pers_reg_text TYPE spers_regt,
END OF ty_personalization_object.
DATA:
mv_pers_key TYPE spers_key.
METHODS:
get_personalization_object
IMPORTING
iv_create TYPE abap_bool OPTIONAL
iv_view_only TYPE abap_bool OPTIONAL
RETURNING
VALUE(ro_personalization_object) TYPE REF TO cl_pers_reg
RAISING
zcx_abapgit_exception.
ENDCLASS.
CLASS zcl_abapgit_object_pers IMPLEMENTATION.
METHOD constructor.
super->constructor( is_item = is_item
iv_language = iv_language ).
mv_pers_key = ms_item-obj_name.
ENDMETHOD.
METHOD get_personalization_object.
CREATE OBJECT ro_personalization_object
EXPORTING
p_create = iv_create
p_pers_key = mv_pers_key
p_view_only = iv_view_only
EXCEPTIONS
pers_key_already_exists = 1
pers_key_does_not_exist = 2
transport_view_only = 3
transport_canceled = 4
OTHERS = 5.
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise_t100( ).
ENDIF.
ENDMETHOD.
METHOD zif_abapgit_object~changed_by.
rv_user = c_user_unknown.
ENDMETHOD.
METHOD zif_abapgit_object~delete.
DATA: lo_personalization_object TYPE REF TO cl_pers_reg.
lo_personalization_object = get_personalization_object( ).
lo_personalization_object->delete(
EXPORTING
p_no_confirm = abap_true
EXCEPTIONS
deletion_canceled = 1
deletion_failed = 2
transport_canceled = 3
OTHERS = 4 ).
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise_t100( ).
ENDIF.
ENDMETHOD.
METHOD zif_abapgit_object~deserialize.
DATA:
ls_personalization_object TYPE ty_personalization_object,
lo_personalization_object TYPE REF TO cl_pers_reg.
io_xml->read(
EXPORTING
iv_name = 'PERS'
CHANGING
cg_data = ls_personalization_object ).
tadir_insert( iv_package ).
lo_personalization_object = get_personalization_object( iv_create = abap_true ).
lo_personalization_object->set_reg_data(
p_pers_reg = ls_personalization_object-pers_reg
p_pers_reg_text = ls_personalization_object-pers_reg_text ).
lo_personalization_object->save(
EXPORTING
no_check = abap_true
EXCEPTIONS
data_not_saved = 1
transport_canceled = 2
OTHERS = 3 ).
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise_t100( ).
ENDIF.
ENDMETHOD.
METHOD zif_abapgit_object~exists.
cl_pers_reg=>exists(
EXPORTING
p_pers_key = mv_pers_key
EXCEPTIONS
pers_key_does_not_exist = 1
OTHERS = 2 ).
rv_bool = boolc( sy-subrc = 0 ).
ENDMETHOD.
METHOD zif_abapgit_object~get_comparator.
RETURN.
ENDMETHOD.
METHOD zif_abapgit_object~get_deserialize_steps.
APPEND zif_abapgit_object=>gc_step_id-late TO rt_steps.
ENDMETHOD.
METHOD zif_abapgit_object~get_metadata.
rs_metadata = get_metadata( ).
rs_metadata-delete_tadir = abap_true.
ENDMETHOD.
METHOD zif_abapgit_object~is_active.
rv_active = is_active( ).
ENDMETHOD.
METHOD zif_abapgit_object~is_locked.
" There's no object specific locking. Just a global one.
rv_is_locked = exists_a_lock_entry_for( iv_lock_object = 'E_SPERSREG' ).
ENDMETHOD.
METHOD zif_abapgit_object~jump.
DATA: ls_bcdata TYPE bdcdata,
lt_bcdata TYPE STANDARD TABLE OF bdcdata.
ls_bcdata-program = 'SAPLSPERS_REG_DIALOG'.
ls_bcdata-dynpro = '0100'.
ls_bcdata-dynbegin = 'X'.
APPEND ls_bcdata TO lt_bcdata.
CLEAR ls_bcdata.
ls_bcdata-fnam = 'SPERS_REG-PERS_KEY'.
ls_bcdata-fval = ms_item-obj_name.
APPEND ls_bcdata TO lt_bcdata.
CLEAR ls_bcdata.
ls_bcdata-fnam = 'BDC_OKCODE'.
ls_bcdata-fval = '=PERSDISPLAY'.
APPEND ls_bcdata TO lt_bcdata.
zcl_abapgit_ui_factory=>get_gui_jumper( )->jump_batch_input(
iv_tcode = 'PERSREG'
it_bdcdata = lt_bcdata ).
rv_exit = abap_true.
ENDMETHOD.
METHOD zif_abapgit_object~serialize.
DATA:
lo_personalization_object TYPE REF TO cl_pers_reg,
ls_personalization_object TYPE ty_personalization_object.
lo_personalization_object = get_personalization_object( iv_view_only = abap_true ).
lo_personalization_object->get_reg_data(
IMPORTING
p_pers_reg = ls_personalization_object-pers_reg
p_pers_reg_text = ls_personalization_object-pers_reg_text ).
CLEAR:
ls_personalization_object-pers_reg-author,
ls_personalization_object-pers_reg-fdate,
ls_personalization_object-pers_reg-ftime.
io_xml->add( iv_name = 'PERS'
ig_data = ls_personalization_object ).
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
397,
499,
18300,
62,
15252,
62,
19276,
5550,
20032,
17941,
44731,
3268,
16879,
2043,
2751,
16034,
1976,
565,
62,
397,
499,
18300,
62,
48205,
62,
16668,
25261,
13,
628,
220,
44731,
44513,
13,
198,
220,
220,
220,
23255,
37,
2246,
1546,
1976,
361,
62,
397,
499,
18300,
62,
15252,
13,
628,
220,
220,
220,
337,
36252,
50,
25,
198,
220,
220,
220,
220,
220,
23772,
198,
220,
220,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
318,
62,
9186,
220,
220,
220,
220,
41876,
1976,
361,
62,
397,
499,
18300,
62,
4299,
50101,
14804,
774,
62,
9186,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
16129,
41876,
7500,
292,
13,
198,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
4810,
3824,
6158,
44513,
13,
198,
220,
220,
220,
24412,
47,
1546,
25,
198,
220,
220,
220,
220,
220,
347,
43312,
3963,
1259,
62,
22682,
1634,
62,
15252,
11,
198,
220,
220,
220,
220,
220,
220,
220,
2774,
62,
2301,
220,
220,
220,
220,
220,
41876,
599,
364,
62,
2301,
11,
198,
220,
220,
220,
220,
220,
220,
220,
2774,
62,
2301,
62,
5239,
41876,
599,
364,
62,
2301,
83,
11,
198,
220,
220,
220,
220,
220,
23578,
3963,
1259,
62,
22682,
1634,
62,
15252,
13,
628,
220,
220,
220,
42865,
25,
198,
220,
220,
220,
220,
220,
285,
85,
62,
19276,
62,
2539,
41876,
599,
364,
62,
2539,
13,
628,
220,
220,
220,
337,
36252,
50,
25,
198,
220,
220,
220,
220,
220,
651,
62,
22682,
1634,
62,
15252,
198,
220,
220,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
17953,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
450,
499,
62,
30388,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
1177,
62,
8807,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
450,
499,
62,
30388,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
305,
62,
22682,
1634,
62,
15252,
8,
41876,
4526,
37,
5390,
537,
62,
19276,
62,
2301,
198,
220,
220,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
13,
198,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1976,
565,
62,
397,
499,
18300,
62,
15252,
62,
19276,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
23772,
13,
628,
220,
220,
220,
2208,
3784,
41571,
273,
7,
318,
62,
9186,
220,
220,
220,
220,
796,
318,
62,
9186,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
16129,
796,
21628,
62,
16129,
6739,
628,
198,
220,
220,
220,
285,
85,
62,
19276,
62,
2539,
796,
13845,
62,
9186,
12,
26801,
62,
3672,
13,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
651,
62,
22682,
1634,
62,
15252,
13,
628,
220,
220,
220,
29244,
6158,
25334,
23680,
686,
62,
22682,
1634,
62,
15252,
198,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
279,
62,
17953,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
21628,
62,
17953,
198,
220,
220,
220,
220,
220,
220,
220,
279,
62,
19276,
62,
2539,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
285,
85,
62,
19276,
62,
2539,
198,
220,
220,
220,
220,
220,
220,
220,
279,
62,
1177,
62,
8807,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
21628,
62,
1177,
62,
8807,
198,
220,
220,
220,
220,
220,
7788,
42006,
11053,
198,
220,
220,
220,
220,
220,
220,
220,
2774,
62,
2539,
62,
282,
1493,
62,
1069,
1023,
796,
352,
198,
220,
220,
220,
220,
220,
220,
220,
2774,
62,
2539,
62,
22437,
62,
1662,
62,
38476,
796,
362,
198,
220,
220,
220,
220,
220,
220,
220,
4839,
62,
1177,
62,
8807,
220,
220,
220,
220,
796,
513,
198,
220,
220,
220,
220,
220,
220,
220,
4839,
62,
66,
590,
992,
220,
220,
220,
220,
220,
796,
604,
198,
220,
220,
220,
220,
220,
220,
220,
440,
4221,
4877,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
642,
13,
628,
220,
220,
220,
16876,
827,
12,
7266,
6015,
1279,
29,
657,
13,
198,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
14804,
40225,
62,
83,
3064,
7,
6739,
198,
220,
220,
220,
23578,
5064,
13,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
1976,
361,
62,
397,
499,
18300,
62,
15252,
93,
40985,
62,
1525,
13,
198,
220,
220,
220,
374,
85,
62,
7220,
796,
269,
62,
7220,
62,
34680,
13,
198,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
1976,
361,
62,
397,
499,
18300,
62,
15252,
93,
33678,
13,
628,
220,
220,
220,
42865,
25,
2376,
62,
22682,
1634,
62,
15252,
41876,
4526,
37,
5390,
537,
62,
19276,
62,
2301,
13,
628,
220,
220,
220,
2376,
62,
22682,
1634,
62,
15252,
796,
651,
62,
22682,
1634,
62,
15252,
7,
6739,
628,
220,
220,
220,
2376,
62,
22682,
1634,
62,
15252,
3784,
33678,
7,
198,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
279,
62,
3919,
62,
10414,
2533,
220,
220,
220,
220,
220,
220,
796,
450,
499,
62,
7942,
198,
220,
220,
220,
220,
220,
7788,
42006,
11053,
198,
220,
220,
220,
220,
220,
220,
220,
39948,
62,
66,
590,
992,
220,
796,
352,
198,
220,
220,
220,
220,
220,
220,
220,
39948,
62,
47904,
220,
220,
220,
796,
362,
198,
220
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS zcl_odata_service_dpc_ext DEFINITION
PUBLIC
INHERITING FROM zcl_odata_service_dpc
CREATE PUBLIC .
PUBLIC SECTION.
CONSTANTS gv_refresh_message TYPE string VALUE `{"action": "refresh"}`.
CLASS-METHODS populate_db.
PROTECTED SECTION.
CLASS-METHODS send_refresh.
METHODS categorys_get_entity
REDEFINITION .
METHODS categorys_get_entityset
REDEFINITION .
METHODS currencys_get_entity
REDEFINITION .
METHODS currencys_get_entityset
REDEFINITION .
METHODS products_create_entity
REDEFINITION .
METHODS products_delete_entity
REDEFINITION .
METHODS products_get_entity
REDEFINITION .
METHODS products_get_entityset
REDEFINITION .
METHODS products_update_entity
REDEFINITION .
METHODS weightunits_get_entity
REDEFINITION .
METHODS weightunits_get_entityset
REDEFINITION .
PRIVATE SECTION.
ENDCLASS.
CLASS zcl_odata_service_DPC_EXT IMPLEMENTATION.
METHOD categorys_get_entity.
DATA: ls_converted_keys LIKE er_entity,
ls_source_keys TYPE zcl_odata_service_mpc=>ts_product.
IF io_tech_request_context->get_source_entity_set_name( ) = 'Products'.
io_tech_request_context->get_converted_source_keys(
IMPORTING
es_key_values = ls_source_keys
).
SELECT SINGLE * FROM zdemo_epm_ws_prd AS prd
INNER JOIN zdemo_epm_ws_cat AS cat ON prd~category = cat~id
INTO CORRESPONDING FIELDS OF @er_entity WHERE prd~id = @ls_source_keys-id.
ELSE.
io_tech_request_context->get_converted_keys(
IMPORTING
es_key_values = ls_converted_keys
).
SELECT SINGLE * FROM zdemo_epm_ws_cat INTO
CORRESPONDING FIELDS OF @er_entity WHERE
id = @ls_converted_keys-id.
ENDIF.
IF sy-subrc <> 0.
me->/iwbep/if_sb_dpc_comm_services~rfc_exception_handling(
EXPORTING
iv_subrc = sy-subrc
iv_exp_message_text = 'Entity not found.'(001) ).
ENDIF.
ENDMETHOD.
METHOD categorys_get_entityset.
IF line_exists( it_filter_select_options[ property = `NAME` ] ).
DATA(lt_select_opts) = it_filter_select_options[ property = `NAME` ]-select_options.
SELECT * FROM zdemo_epm_ws_cat INTO CORRESPONDING FIELDS OF TABLE @et_entityset
WHERE name IN @lt_select_opts.
ELSE.
SELECT * FROM zdemo_epm_ws_cat INTO CORRESPONDING FIELDS OF TABLE @et_entityset.
ENDIF.
ENDMETHOD.
METHOD currencys_get_entity.
DATA: ls_converted_keys LIKE er_entity,
ls_source_keys TYPE zcl_odata_service_mpc=>ts_product.
IF io_tech_request_context->get_source_entity_set_name( ) = 'Products'.
io_tech_request_context->get_converted_source_keys(
IMPORTING
es_key_values = ls_source_keys
).
SELECT SINGLE * FROM zdemo_epm_ws_prd AS prd
INNER JOIN zdemo_epm_ws_crr AS crr ON prd~currency = crr~code
INTO CORRESPONDING FIELDS OF @er_entity WHERE prd~id = @ls_source_keys-id.
ELSE.
io_tech_request_context->get_converted_keys(
IMPORTING
es_key_values = ls_converted_keys
).
SELECT SINGLE * FROM zdemo_epm_ws_crr INTO
CORRESPONDING FIELDS OF @er_entity WHERE
code = @ls_converted_keys-code.
ENDIF.
IF sy-subrc <> 0.
me->/iwbep/if_sb_dpc_comm_services~rfc_exception_handling(
EXPORTING
iv_subrc = sy-subrc
iv_exp_message_text = 'Entity not found.'(001) ).
ENDIF.
ENDMETHOD.
METHOD currencys_get_entityset.
IF line_exists( it_filter_select_options[ property = `CODE` ] ).
DATA(lt_select_opts) = it_filter_select_options[ property = `CODE` ]-select_options.
SELECT * FROM zdemo_epm_ws_crr INTO CORRESPONDING FIELDS OF TABLE @et_entityset
WHERE code IN @lt_select_opts.
ELSE.
SELECT * FROM zdemo_epm_ws_crr INTO CORRESPONDING FIELDS OF TABLE @et_entityset.
ENDIF.
ENDMETHOD.
METHOD populate_db.
DATA: lt_cat TYPE STANDARD TABLE OF zdemo_epm_ws_cat WITH EMPTY KEY,
lt_crr TYPE STANDARD TABLE OF zdemo_epm_ws_crr WITH EMPTY KEY,
lt_wgu TYPE STANDARD TABLE OF zdemo_epm_ws_wgu WITH EMPTY KEY,
lt_prd TYPE STANDARD TABLE OF zdemo_epm_ws_prd WITH EMPTY KEY.
lt_crr = VALUE #(
( code = 'AED' description = 'United Arab Emirates Dirham' )
( code = 'AFN' description = 'Afghanistan Afghani' )
( code = 'ALL' description = 'Albania Lek' )
( code = 'AMD' description = 'Armenia Dram' )
( code = 'ANG' description = 'Netherlands Antilles Guilder' )
( code = 'AOA' description = 'Angola Kwanza' )
( code = 'ARS' description = 'Argentina Peso' )
( code = 'AUD' description = 'Australia Dollar' )
( code = 'AWG' description = 'Aruba Guilder' )
( code = 'AZN' description = 'Azerbaijan New Manat' )
( code = 'BAM' description = 'Bosnia and Herzegovina Convertible Marka' )
( code = 'BBD' description = 'Barbados Dollar' )
( code = 'BDT' description = 'Bangladesh Taka' )
( code = 'BGN' description = 'Bulgaria Lev' )
( code = 'BHD' description = 'Bahrain Dinar' )
( code = 'BIF' description = 'Burundi Franc' )
( code = 'BMD' description = 'Bermuda Dollar' )
( code = 'BND' description = 'Brunei Darussalam Dollar' )
( code = 'BOB' description = 'Bolivia Boliviano' )
( code = 'BRL' description = 'Brazil Real' )
( code = 'BSD' description = 'Bahamas Dollar' )
( code = 'BTN' description = 'Bhutan Ngultrum' )
( code = 'BWP' description = 'Botswana Pula' )
( code = 'BYR' description = 'Belarus Ruble' )
( code = 'BZD' description = 'Belize Dollar' )
( code = 'CAD' description = 'Canada Dollar' )
( code = 'CDF' description = 'Congo/Kinshasa Franc' )
( code = 'CHF' description = 'Switzerland Franc' )
( code = 'CLP' description = 'Chile Peso' )
( code = 'CNY' description = 'China Yuan Renminbi' )
( code = 'COP' description = 'Colombia Peso' )
( code = 'CRC' description = 'Costa Rica Colon' )
( code = 'CUC' description = 'Cuba Convertible Peso' )
( code = 'CUP' description = 'Cuba Peso' )
( code = 'CVE' description = 'Cape Verde Escudo' )
( code = 'CZK' description = 'Czech Republic Koruna' )
( code = 'DJF' description = 'Djibouti Franc' )
( code = 'DKK' description = 'Denmark Krone' )
( code = 'DOP' description = 'Dominican Republic Peso' )
( code = 'DZD' description = 'Algeria Dinar' )
( code = 'EGP' description = 'Egypt Pound' )
( code = 'ERN' description = 'Eritrea Nakfa' )
( code = 'ETB' description = 'Ethiopia Birr' )
( code = 'EUR' description = 'Euro Member Countries' )
( code = 'FJD' description = 'Fiji Dollar' )
( code = 'FKP' description = 'Falkland Islands (Malvinas) Pound' )
( code = 'GBP' description = 'United Kingdom Pound' )
( code = 'GEL' description = 'Georgia Lari' )
( code = 'GGP' description = 'Guernsey Pound' )
( code = 'GHS' description = 'Ghana Cedi' )
( code = 'GIP' description = 'Gibraltar Pound' )
( code = 'GMD' description = 'Gambia Dalasi' )
( code = 'GNF' description = 'Guinea Franc' )
( code = 'GTQ' description = 'Guatemala Quetzal' )
( code = 'GYD' description = 'Guyana Dollar' )
( code = 'HKD' description = 'Hong Kong Dollar' )
( code = 'HNL' description = 'Honduras Lempira' )
( code = 'HRK' description = 'Croatia Kuna' )
( code = 'HTG' description = 'Haiti Gourde' )
( code = 'HUF' description = 'Hungary Forint' )
( code = 'IDR' description = 'Indonesia Rupiah' )
( code = 'ILS' description = 'Israel Shekel' )
( code = 'IMP' description = 'Isle of Man Pound' )
( code = 'INR' description = 'India Rupee' )
( code = 'IQD' description = 'Iraq Dinar' )
( code = 'IRR' description = 'Iran Rial' )
( code = 'ISK' description = 'Iceland Krona' )
( code = 'JEP' description = 'Jersey Pound' )
( code = 'JMD' description = 'Jamaica Dollar' )
( code = 'JOD' description = 'Jordan Dinar' )
( code = 'JPY' description = 'Japan Yen' )
( code = 'KES' description = 'Kenya Shilling' )
( code = 'KGS' description = 'Kyrgyzstan Som' )
( code = 'KHR' description = 'Cambodia Riel' )
( code = 'KMF' description = 'Comoros Franc' )
( code = 'KPW' description = 'Korea (North) Won' )
( code = 'KRW' description = 'Korea (South) Won' )
( code = 'KWD' description = 'Kuwait Dinar' )
( code = 'KYD' description = 'Cayman Islands Dollar' )
( code = 'KZT' description = 'Kazakhstan Tenge' )
( code = 'LAK' description = 'Laos Kip' )
( code = 'LBP' description = 'Lebanon Pound' )
( code = 'LKR' description = 'Sri Lanka Rupee' )
( code = 'LRD' description = 'Liberia Dollar' )
( code = 'LSL' description = 'Lesotho Loti' )
( code = 'LYD' description = 'Libya Dinar' )
( code = 'MAD' description = 'Morocco Dirham' )
( code = 'MDL' description = 'Moldova Leu' )
( code = 'MGA' description = 'Madagascar Ariary' )
( code = 'MKD' description = 'Macedonia Denar' )
( code = 'MMK' description = 'Myanmar (Burma) Kyat' )
( code = 'MNT' description = 'Mongolia Tughrik' )
( code = 'MOP' description = 'Macau Pataca' )
( code = 'MRO' description = 'Mauritania Ouguiya' )
( code = 'MUR' description = 'Mauritius Rupee' )
( code = 'MVR' description = 'Maldives (Maldive Islands) Rufiyaa' )
( code = 'MWK' description = 'Malawi Kwacha' )
( code = 'MXN' description = 'Mexico Peso' )
( code = 'MYR' description = 'Malaysia Ringgit' )
( code = 'MZN' description = 'Mozambique Metical' )
( code = 'NAD' description = 'Namibia Dollar' )
( code = 'NGN' description = 'Nigeria Naira' )
( code = 'NIO' description = 'Nicaragua Cordoba' )
( code = 'NOK' description = 'Norway Krone' )
( code = 'NPR' description = 'Nepal Rupee' )
( code = 'NZD' description = 'New Zealand Dollar' )
( code = 'OMR' description = 'Oman Rial' )
( code = 'PAB' description = 'Panama Balboa' )
( code = 'PEN' description = 'Peru Nuevo Sol' )
( code = 'PGK' description = 'Papua New Guinea Kina' )
( code = 'PHP' description = 'Philippines Peso' )
( code = 'PKR' description = 'Pakistan Rupee' )
( code = 'PLN' description = 'Poland Zloty' )
( code = 'PYG' description = 'Paraguay Guarani' )
( code = 'QAR' description = 'Qatar Riyal' )
( code = 'RON' description = 'Romania New Leu' )
( code = 'RSD' description = 'Serbia Dinar' )
( code = 'RUB' description = 'Russia Ruble' )
( code = 'RWF' description = 'Rwanda Franc' )
( code = 'SAR' description = 'Saudi Arabia Riyal' )
( code = 'SBD' description = 'Solomon Islands Dollar' )
( code = 'SCR' description = 'Seychelles Rupee' )
( code = 'SDG' description = 'Sudan Pound' )
( code = 'SEK' description = 'Sweden Krona' )
( code = 'SGD' description = 'Singapore Dollar' )
( code = 'SHP' description = 'Saint Helena Pound' )
( code = 'SLL' description = 'Sierra Leone Leone' )
( code = 'SOS' description = 'Somalia Shilling' )
( code = 'SPL' description = 'Seborga Luigino' )
( code = 'SRD' description = 'Suriname Dollar' )
( code = 'STD' description = 'São Tomé and Príncipe Dobra' )
( code = 'SVC' description = 'El Salvador Colon' )
( code = 'SYP' description = 'Syria Pound' )
( code = 'SZL' description = 'Swaziland Lilangeni' )
( code = 'THB' description = 'Thailand Baht' )
( code = 'TJS' description = 'Tajikistan Somoni' )
( code = 'TMT' description = 'Turkmenistan Manat' )
( code = 'TND' description = 'Tunisia Dinar' )
( code = 'TOP' description = 'Tonga Pa`anga' )
( code = 'TRY' description = 'Turkey Lira' )
( code = 'TTD' description = 'Trinidad and Tobago Dollar' )
( code = 'TVD' description = 'Tuvalu Dollar' )
( code = 'TWD' description = 'Taiwan New Dollar' )
( code = 'TZS' description = 'Tanzania Shilling' )
( code = 'UAH' description = 'Ukraine Hryvnia' )
( code = 'UGX' description = 'Uganda Shilling' )
( code = 'USD' description = 'United States Dollar' )
( code = 'UYU' description = 'Uruguay Peso' )
( code = 'UZS' description = 'Uzbekistan Som' )
( code = 'VEF' description = 'Venezuela Bolivar' )
( code = 'VND' description = 'Viet Nam Dong' )
( code = 'VUV' description = 'Vanuatu Vatu' )
( code = 'WST' description = 'Samoa Tala' )
( code = 'XAF' description = 'CFA Franc BEAC' )
( code = 'XCD' description = 'East Caribbean Dollar' )
( code = 'XDR' description = 'International Monetary Fund Special Drawing Rights' )
( code = 'XOF' description = 'BCEAO Franc' )
( code = 'XPF' description = 'CFP Franc' )
( code = 'YER' description = 'Yemen Rial' )
( code = 'ZAR' description = 'South Africa Rand' )
( code = 'ZMW' description = 'Zambia Kwacha' )
( code = 'ZWD' description = 'Zimbabwe Dollar' )
).
DELETE FROM zdemo_epm_ws_crr.
INSERT zdemo_epm_ws_crr FROM TABLE lt_crr.
lt_wgu = VALUE #(
( symbol = 't' description = 'tonne' )
( symbol = 'kg' description = 'kilogram' )
( symbol = 'hg' description = 'hectogram' )
( symbol = 'g ' description = 'gram' )
( symbol = 'dg' description = 'decigram' )
( symbol = 'cg' description = 'centigram' )
( symbol = 'mg' description = 'milligram' )
( symbol = 'µg' description = 'microgram' )
( symbol = 'carat' description = 'carat' )
( symbol = 'grain' description = 'grain' )
( symbol = 'oz' description = 'ounce' )
( symbol = 'lb' description = 'pound' )
).
DELETE FROM zdemo_epm_ws_wgu.
INSERT zdemo_epm_ws_wgu FROM TABLE lt_wgu.
lt_cat = VALUE #(
( id = 1 name = 'Projector' )
( id = 2 name = 'Graphics Card' )
( id = 3 name = 'Accessory' )
( id = 4 name = 'Printer' )
( id = 5 name = 'Monitor' )
( id = 6 name = 'Laptop' )
( id = 7 name = 'Keyboard ' )
).
DELETE FROM zdemo_epm_ws_cat.
INSERT zdemo_epm_ws_cat FROM TABLE lt_cat.
lt_prd = VALUE #(
( id = 1 name = 'Power Projector 4713' category = 1 description = 'A very powerful projector with special features for Internet usability, USB 1467'
weight = '1467' price = '856.49' pictureurl = 'HT-6100.jpg' currency = 'USD' weightunit = 'g' )
( id = 2 name = 'Gladiator MX' category = 2 description = 'Gladiator MX: DDR2 RoHS 128MB Supporting 512MB Clock rate: 350 MHz Memory Clock: 533 MHz, Bus Type: PCI-Express, Memory Type: DDR2 Memory Bus: 32-bit'
weight = '4234' price = '343.39' pictureurl = 'HT-6100.jpg' currency = 'USD' weightunit = 'g' )
( id = 3 name = 'Hurricane GX' category = 2 description = 'Hurricane GX: DDR2 RoHS 512MB Supporting 1024MB Clock rate: 550 MHz Memory Clock: 933 MHz, Bus Type: PCI-Express, Memory Type: DDR2 Memory Bus: 64-bit'
weight = '35' price = '645.49' pictureurl = 'HT-6100.jpg' currency = 'EUR' weightunit = 'g' )
( id = 4 name = 'Webcam' category = 3 description = 'Web camera, color, High-Speed USB'
weight = '464' price = '756.49' pictureurl = 'HT-6100.jpg' currency = 'USD' weightunit = 'cg' )
( id = 5 name = 'Monitor Locking Cable' category = 3 description = 'Lock for Monitor'
weight = '567' price = '86.49' pictureurl = 'HT-6100.jpg' currency = 'USD' weightunit = 'kg' )
( id = 6 name = 'Laptop Case' category = 3 description = 'Laptop Case with room for pencils and other items'
weight = '686' price = '55.49' pictureurl = 'HT-6100.jpg' currency = 'USD' weightunit = 'g' )
( id = 7 name = 'USB Stick 16 GByte' category = 3 description = 'USB 2.0 HighSpeed 16GB'
weight = '353' price = '46.99' pictureurl = 'HT-6100.jpg' currency = 'EUR' weightunit = 'g' )
( id = 8 name = 'Deskjet Super Highspeed' category = 4 description = '1200 dpi x 1200 dpi - up to 25 ppm (mono) / up to 24 ppm (colour)'
weight = '234' price = '46.49' pictureurl = 'HT-6100.jpg' currency = 'USD' weightunit = 'g' )
( id = 9 name = 'Laser Allround Pro' category = 4 description = ' up to 25 ppm letter and 24 ppm A4 color or monochrome, with a first-page-out-time of less than 13 seconds for monochrome and less than 15 seconds for color'
weight = '131' price = '26.49' pictureurl = 'HT-6100.jpg' currency = 'USD' weightunit = 'kg' )
).
DELETE FROM zdemo_epm_ws_prd.
INSERT zdemo_epm_ws_prd FROM TABLE lt_prd.
COMMIT WORK.
send_refresh( ).
ENDMETHOD.
METHOD products_create_entity.
DATA ls_data LIKE er_entity.
io_data_provider->read_entry_data(
IMPORTING
es_data = ls_data
).
DATA(ls_record) = CORRESPONDING zdemo_epm_ws_prd( ls_data ).
SELECT MAX( id ) FROM zdemo_epm_ws_prd INTO @ls_record-id.
ADD 1 TO ls_record-id.
INSERT INTO zdemo_epm_ws_prd VALUES @ls_record.
ENDMETHOD.
METHOD products_delete_entity.
DATA ls_converted_keys TYPE zcl_odata_service_mpc=>ts_product.
io_tech_request_context->get_converted_keys(
IMPORTING
es_key_values = ls_converted_keys
).
DELETE FROM zdemo_epm_ws_prd WHERE id = @ls_converted_keys-id.
IF sy-subrc <> 0.
me->/iwbep/if_sb_dpc_comm_services~rfc_exception_handling(
EXPORTING
iv_subrc = sy-subrc
iv_exp_message_text = 'Entity not found.'(001) ).
ELSE.
COMMIT WORK.
send_refresh( ).
ENDIF.
ENDMETHOD.
METHOD products_get_entity.
DATA ls_converted_keys LIKE er_entity.
io_tech_request_context->get_converted_keys(
IMPORTING
es_key_values = ls_converted_keys
).
SELECT SINGLE * FROM zdemo_epm_ws_prd INTO
CORRESPONDING FIELDS OF @er_entity WHERE
id = @ls_converted_keys-id.
IF sy-subrc <> 0.
me->/iwbep/if_sb_dpc_comm_services~rfc_exception_handling(
EXPORTING
iv_subrc = sy-subrc
iv_exp_message_text = 'Entity not found.'(001) ).
ENDIF.
ENDMETHOD.
METHOD products_get_entityset.
IF line_exists( it_filter_select_options[ property = `NAME` ] ).
DATA(lt_select_opts) = it_filter_select_options[ property = `NAME` ]-select_options.
SELECT * FROM zdemo_epm_ws_prd INTO CORRESPONDING FIELDS OF TABLE @et_entityset
WHERE name IN @lt_select_opts.
ELSE.
SELECT * FROM zdemo_epm_ws_prd INTO CORRESPONDING FIELDS OF TABLE @et_entityset.
ENDIF.
ENDMETHOD.
METHOD products_update_entity.
DATA: ls_converted_keys LIKE er_entity,
ls_data LIKE er_entity.
io_tech_request_context->get_converted_keys(
IMPORTING
es_key_values = ls_converted_keys
).
io_data_provider->read_entry_data(
IMPORTING
es_data = ls_data
).
UPDATE zdemo_epm_ws_prd SET
description = @ls_data-description,
price = @ls_data-price,
pictureurl = @ls_data-pictureurl,
weight = @ls_data-weight
WHERE id = @ls_converted_keys-id.
IF sy-subrc <> 0.
me->/iwbep/if_sb_dpc_comm_services~rfc_exception_handling(
EXPORTING
iv_subrc = sy-subrc
iv_exp_message_text = 'Entity not found.'(001) ).
ENDIF.
ENDMETHOD.
METHOD send_refresh.
DATA: lo_producer TYPE REF TO if_amc_message_producer_text.
TRY.
lo_producer ?= cl_amc_channel_manager=>create_message_producer( i_application_id = 'Zdemo_EPM_WS_MC' i_channel_id = '/epm' ).
lo_producer->send( i_message = gv_refresh_message ).
CATCH cx_amc_error INTO DATA(lx_amc_error).
MESSAGE lx_amc_error->get_text( ) TYPE 'E'.
CATCH cx_apc_error INTO DATA(lx_apc_error).
MESSAGE lx_apc_error->get_text( ) TYPE 'E'.
ENDTRY.
ENDMETHOD.
METHOD weightunits_get_entity.
DATA: ls_converted_keys LIKE er_entity,
ls_source_keys TYPE zcl_odata_service_mpc=>ts_product.
IF io_tech_request_context->get_source_entity_set_name( ) = 'Products'.
io_tech_request_context->get_converted_source_keys(
IMPORTING
es_key_values = ls_source_keys
).
SELECT SINGLE * FROM zdemo_epm_ws_prd AS prd
INNER JOIN zdemo_epm_ws_wgu AS wgu ON prd~weightunit = wgu~symbol
INTO CORRESPONDING FIELDS OF @er_entity WHERE prd~id = @ls_source_keys-id.
ELSE.
io_tech_request_context->get_converted_keys(
IMPORTING
es_key_values = ls_converted_keys
).
SELECT SINGLE * FROM zdemo_epm_ws_wgu INTO
CORRESPONDING FIELDS OF @er_entity WHERE
symbol = @ls_converted_keys-symbol.
ENDIF.
IF sy-subrc <> 0.
me->/iwbep/if_sb_dpc_comm_services~rfc_exception_handling(
EXPORTING
iv_subrc = sy-subrc
iv_exp_message_text = 'Entity not found.'(001) ).
ENDIF.
ENDMETHOD.
METHOD weightunits_get_entityset.
IF line_exists( it_filter_select_options[ property = `SYMBOL` ] ).
DATA(lt_select_opts) = it_filter_select_options[ property = `SYMBOL` ]-select_options.
SELECT * FROM zdemo_epm_ws_wgu INTO CORRESPONDING FIELDS OF TABLE @et_entityset
WHERE symbol IN @lt_select_opts.
ELSE.
SELECT * FROM zdemo_epm_ws_wgu INTO CORRESPONDING FIELDS OF TABLE @et_entityset.
ENDIF.
ENDMETHOD.
ENDCLASS. | [
31631,
1976,
565,
62,
375,
1045,
62,
15271,
62,
67,
14751,
62,
2302,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
3268,
16879,
2043,
2751,
16034,
1976,
565,
62,
375,
1045,
62,
15271,
62,
67,
14751,
198,
220,
29244,
6158,
44731,
764,
628,
220,
44731,
44513,
13,
198,
220,
220,
220,
7102,
2257,
1565,
4694,
308,
85,
62,
5420,
3447,
62,
20500,
41876,
4731,
26173,
8924,
4600,
4895,
2673,
1298,
366,
5420,
3447,
20662,
44646,
198,
220,
220,
220,
42715,
12,
49273,
50,
48040,
62,
9945,
13,
198,
220,
48006,
9782,
1961,
44513,
13,
628,
220,
220,
220,
42715,
12,
49273,
50,
3758,
62,
5420,
3447,
13,
198,
220,
220,
220,
337,
36252,
50,
6536,
82,
62,
1136,
62,
26858,
198,
220,
220,
220,
220,
220,
220,
220,
220,
23848,
36,
20032,
17941,
764,
198,
220,
220,
220,
337,
36252,
50,
6536,
82,
62,
1136,
62,
26858,
2617,
198,
220,
220,
220,
220,
220,
220,
220,
220,
23848,
36,
20032,
17941,
764,
198,
220,
220,
220,
337,
36252,
50,
1090,
918,
66,
893,
62,
1136,
62,
26858,
198,
220,
220,
220,
220,
220,
220,
220,
220,
23848,
36,
20032,
17941,
764,
198,
220,
220,
220,
337,
36252,
50,
1090,
918,
66,
893,
62,
1136,
62,
26858,
2617,
198,
220,
220,
220,
220,
220,
220,
220,
220,
23848,
36,
20032,
17941,
764,
198,
220,
220,
220,
337,
36252,
50,
3186,
62,
17953,
62,
26858,
198,
220,
220,
220,
220,
220,
220,
220,
220,
23848,
36,
20032,
17941,
764,
198,
220,
220,
220,
337,
36252,
50,
3186,
62,
33678,
62,
26858,
198,
220,
220,
220,
220,
220,
220,
220,
220,
23848,
36,
20032,
17941,
764,
198,
220,
220,
220,
337,
36252,
50,
3186,
62,
1136,
62,
26858,
198,
220,
220,
220,
220,
220,
220,
220,
220,
23848,
36,
20032,
17941,
764,
198,
220,
220,
220,
337,
36252,
50,
3186,
62,
1136,
62,
26858,
2617,
198,
220,
220,
220,
220,
220,
220,
220,
220,
23848,
36,
20032,
17941,
764,
198,
220,
220,
220,
337,
36252,
50,
3186,
62,
19119,
62,
26858,
198,
220,
220,
220,
220,
220,
220,
220,
220,
23848,
36,
20032,
17941,
764,
198,
220,
220,
220,
337,
36252,
50,
3463,
41667,
62,
1136,
62,
26858,
198,
220,
220,
220,
220,
220,
220,
220,
220,
23848,
36,
20032,
17941,
764,
198,
220,
220,
220,
337,
36252,
50,
3463,
41667,
62,
1136,
62,
26858,
2617,
198,
220,
220,
220,
220,
220,
220,
220,
220,
23848,
36,
20032,
17941,
764,
198,
220,
4810,
3824,
6158,
44513,
13,
628,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1976,
565,
62,
375,
1045,
62,
15271,
62,
35,
5662,
62,
13918,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
6536,
82,
62,
1136,
62,
26858,
13,
198,
220,
220,
220,
42865,
25,
43979,
62,
1102,
13658,
62,
13083,
34178,
1931,
62,
26858,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
43979,
62,
10459,
62,
13083,
220,
220,
220,
41876,
1976,
565,
62,
375,
1045,
62,
15271,
62,
3149,
66,
14804,
912,
62,
11167,
13,
628,
220,
220,
220,
16876,
33245,
62,
13670,
62,
25927,
62,
22866,
3784,
1136,
62,
10459,
62,
26858,
62,
2617,
62,
3672,
7,
1267,
796,
705,
48650,
4458,
628,
220,
220,
220,
220,
220,
33245,
62,
13670,
62,
25927,
62,
22866,
3784,
1136,
62,
1102,
13658,
62,
10459,
62,
13083,
7,
198,
220,
220,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1658,
62,
2539,
62,
27160,
220,
796,
43979,
62,
10459,
62,
13083,
198,
220,
220,
220,
220,
220,
6739,
198,
220,
220,
220,
220,
220,
33493,
311,
2751,
2538,
1635,
16034,
1976,
9536,
78,
62,
538,
76,
62,
18504,
62,
1050,
67,
7054,
778,
67,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3268,
21479,
32357,
1268,
1976,
9536,
78,
62,
538,
76,
62,
18504,
62,
9246,
7054,
3797,
6177,
778,
67,
93,
22872,
796,
3797,
93,
312,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
39319,
23929,
19535,
47,
18672,
2751,
18930,
3698,
5258,
3963,
2488,
263,
62,
26858,
33411,
778,
67,
93,
312,
796,
2488,
7278,
62,
10459,
62,
13083,
12,
312,
13,
198,
220,
220,
220,
17852,
5188,
13,
198,
220,
220,
220,
220,
220,
33245,
62,
13670,
62,
25927,
62,
22866,
3784,
1136,
62,
1102,
13658,
62,
13083,
7,
198,
220,
220,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1658,
62,
2539,
62,
27160,
220,
796,
43979,
62,
1102,
13658,
62,
13083,
198,
220,
220,
220,
220,
220,
6739,
628,
220,
220,
220,
220,
220,
33493,
311,
2751,
2538,
1635,
16034,
1976,
9536,
78,
62,
538,
76,
62,
18504,
62,
9246,
39319,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
23929,
19535,
47,
18672,
2751,
18930,
3698,
5258,
3963,
2488,
263,
62,
26858,
33411,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4686,
796,
2488,
7278,
62,
1102,
13658,
62,
13083,
12,
312,
13,
198,
220,
220,
220,
23578,
5064,
13,
198,
220,
220,
220,
16876,
827,
12,
7266,
6015,
1279,
29,
657,
13,
198,
220,
220,
220,
220,
220,
502,
3784,
14,
14246,
65,
538,
14,
361,
62,
36299,
62,
67,
14751,
62,
9503,
62,
30416,
93,
81,
16072,
62,
1069,
4516,
62,
4993,
1359,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
7266,
6015,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
827,
12,
7266,
6015,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
11201,
62,
20500,
62,
5239,
796,
705,
32398,
407,
1043,
2637,
7,
8298,
8,
6739,
198,
220,
220,
220,
23578,
5064,
13,
198,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
6536,
82,
62,
1136,
62,
26858,
2617,
13,
198,
220,
220,
220,
16876,
1627,
62,
1069,
1023,
7,
340,
62,
24455,
62,
19738,
62,
25811,
58,
3119,
796,
4600,
20608,
63,
2361,
6739,
198,
220,
220,
220,
220,
220,
42865,
7,
2528,
62,
19738,
62,
404,
912,
8,
796
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS zcl_excel_converter_result DEFINITION
PUBLIC
INHERITING FROM zcl_excel_converter_alv
ABSTRACT
CREATE PUBLIC .
*"* public components of class ZCL_EXCEL_CONVERTER_RESULT
*"* do not include other source files here!!!
PUBLIC SECTION.
*"* protected components of class ZCL_EXCEL_CONVERTER_RESULT
*"* do not include other source files here!!!
PROTECTED SECTION.
METHODS get_table
IMPORTING
!io_object TYPE REF TO object
RETURNING
VALUE(ro_data) TYPE REF TO data .
*"* private components of class ZCL_EXCEL_CONVERTER_RESULT
*"* do not include other source files here!!!
*"* private components of class ZCL_EXCEL_CONVERTER_RESULT
*"* do not include other source files here!!!
PRIVATE SECTION.
ENDCLASS.
CLASS zcl_excel_converter_result IMPLEMENTATION.
METHOD get_table.
DATA: lo_object TYPE REF TO object,
ls_seoclass TYPE seoclass,
l_method TYPE string.
SELECT SINGLE * INTO ls_seoclass
FROM seoclass
WHERE clsname = 'IF_SALV_BS_DATA_SOURCE'.
IF sy-subrc = 0.
l_method = 'GET_TABLE_REF'.
lo_object ?= io_object.
CALL METHOD lo_object->(l_method)
RECEIVING
value = ro_data.
ELSE.
l_method = 'GET_REF_TO_TABLE'.
lo_object ?= io_object.
CALL METHOD lo_object->(l_method)
RECEIVING
value = ro_data.
ENDIF.
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
1069,
5276,
62,
1102,
332,
353,
62,
20274,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
3268,
16879,
2043,
2751,
16034,
1976,
565,
62,
1069,
5276,
62,
1102,
332,
353,
62,
282,
85,
198,
220,
9564,
18601,
10659,
198,
220,
29244,
6158,
44731,
764,
198,
198,
9,
1,
9,
1171,
6805,
286,
1398,
1168,
5097,
62,
6369,
34,
3698,
62,
10943,
5959,
5781,
62,
19535,
16724,
198,
9,
1,
9,
466,
407,
2291,
584,
2723,
3696,
994,
10185,
198,
220,
44731,
44513,
13,
198,
9,
1,
9,
6861,
6805,
286,
1398,
1168,
5097,
62,
6369,
34,
3698,
62,
10943,
5959,
5781,
62,
19535,
16724,
198,
9,
1,
9,
466,
407,
2291,
584,
2723,
3696,
994,
10185,
198,
220,
48006,
9782,
1961,
44513,
13,
628,
220,
220,
220,
337,
36252,
50,
651,
62,
11487,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
952,
62,
15252,
220,
220,
220,
220,
41876,
4526,
37,
5390,
2134,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
305,
62,
7890,
8,
41876,
4526,
37,
5390,
1366,
764,
198,
9,
1,
9,
2839,
6805,
286,
1398,
1168,
5097,
62,
6369,
34,
3698,
62,
10943,
5959,
5781,
62,
19535,
16724,
198,
9,
1,
9,
466,
407,
2291,
584,
2723,
3696,
994,
10185,
198,
9,
1,
9,
2839,
6805,
286,
1398,
1168,
5097,
62,
6369,
34,
3698,
62,
10943,
5959,
5781,
62,
19535,
16724,
198,
9,
1,
9,
466,
407,
2291,
584,
2723,
3696,
994,
10185,
198,
220,
4810,
3824,
6158,
44513,
13,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1976,
565,
62,
1069,
5276,
62,
1102,
332,
353,
62,
20274,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
651,
62,
11487,
13,
198,
220,
220,
220,
42865,
25,
2376,
62,
15252,
220,
220,
41876,
4526,
37,
5390,
2134,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
43979,
62,
325,
420,
31172,
41876,
384,
420,
31172,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
62,
24396,
220,
220,
220,
41876,
4731,
13,
628,
220,
220,
220,
33493,
311,
2751,
2538,
1635,
39319,
43979,
62,
325,
420,
31172,
198,
220,
220,
220,
220,
220,
16034,
384,
420,
31172,
198,
220,
220,
220,
220,
220,
33411,
537,
82,
3672,
796,
705,
5064,
62,
50,
1847,
53,
62,
4462,
62,
26947,
62,
47690,
4458,
628,
220,
220,
220,
16876,
827,
12,
7266,
6015,
796,
657,
13,
198,
220,
220,
220,
220,
220,
300,
62,
24396,
796,
705,
18851,
62,
38148,
62,
31688,
4458,
198,
220,
220,
220,
220,
220,
2376,
62,
15252,
5633,
28,
33245,
62,
15252,
13,
198,
220,
220,
220,
220,
220,
42815,
337,
36252,
2376,
62,
15252,
3784,
7,
75,
62,
24396,
8,
198,
220,
220,
220,
220,
220,
220,
220,
19644,
36,
3824,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1988,
796,
686,
62,
7890,
13,
198,
220,
220,
220,
17852,
5188,
13,
198,
220,
220,
220,
220,
220,
300,
62,
24396,
796,
705,
18851,
62,
31688,
62,
10468,
62,
38148,
4458,
198,
220,
220,
220,
220,
220,
2376,
62,
15252,
5633,
28,
33245,
62,
15252,
13,
198,
220,
220,
220,
220,
220,
42815,
337,
36252,
2376,
62,
15252,
3784,
7,
75,
62,
24396,
8,
198,
220,
220,
220,
220,
220,
220,
220,
19644,
36,
3824,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1988,
796,
686,
62,
7890,
13,
198,
220,
220,
220,
23578,
5064,
13,
628,
220,
23578,
49273,
13,
198,
10619,
31631,
13,
198
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
*&---------------------------------------------------------------------*
*& Report ZGP003N8S45LS1FG375G2BN69Q4G
*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
REPORT ZGP003N8S45LS1FG375G2BN69Q4G.
data test_class_a TYPE REF TO Z2MSE_TEST_CL_A.
test_class_a = new #( ).
test_class_a->method_a( ).
| [
9,
5,
10097,
30934,
9,
198,
9,
5,
6358,
1168,
16960,
11245,
45,
23,
50,
2231,
6561,
16,
30386,
22318,
38,
17,
15766,
3388,
48,
19,
38,
198,
9,
5,
10097,
30934,
9,
198,
9,
5,
198,
9,
5,
10097,
30934,
9,
198,
2200,
15490,
1168,
16960,
11245,
45,
23,
50,
2231,
6561,
16,
30386,
22318,
38,
17,
15766,
3388,
48,
19,
38,
13,
198,
198,
7890,
1332,
62,
4871,
62,
64,
41876,
4526,
37,
5390,
1168,
17,
44,
5188,
62,
51,
6465,
62,
5097,
62,
32,
13,
198,
198,
9288,
62,
4871,
62,
64,
796,
649,
1303,
7,
6739,
198,
9288,
62,
4871,
62,
64,
3784,
24396,
62,
64,
7,
6739,
198
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
"! <p class="shorttext synchronized" lang="en">CDS View</p>
CLASS zcl_sat_cds_view DEFINITION
PUBLIC
FINAL
CREATE PUBLIC
GLOBAL FRIENDS zcl_sat_cds_view_factory .
PUBLIC SECTION.
"! <p class="shorttext synchronized" lang="en">Name of CDS view</p>
DATA mv_view_name TYPE zsat_cds_view_name READ-ONLY .
DATA mv_association_count TYPE i READ-ONLY .
DATA mv_select_table_count TYPE i READ-ONLY .
"! <p class="shorttext synchronized" lang="en">Requests annotations for CDS View</p>
EVENTS request_annotations
EXPORTING
VALUE(et_anno_name_range) TYPE zif_sat_ty_global=>ty_t_cds_anno_name_range.
"! <p class="shorttext synchronized" lang="en">Requests API States</p>
EVENTS request_api_states .
"! <p class="shorttext synchronized" lang="en">Requests author of CDS View</p>
EVENTS request_tadir_info.
"! <p class="shorttext synchronized" lang="en">Requests Base Tables</p>
EVENTS request_base_tables .
"! <p class="shorttext synchronized" lang="en">Requests Description</p>
EVENTS request_description.
METHODS constructor
IMPORTING
!is_header TYPE zsat_cds_view_header
!it_columns TYPE dd03ndvtab
!it_parameters TYPE zif_sat_ty_global=>ty_t_cds_parameter
!it_association TYPE zif_sat_ty_global=>ty_t_cds_association OPTIONAL
!it_api_states TYPE zif_sat_ty_global=>ty_t_cds_api_state OPTIONAL
!it_base_tables TYPE zsat_cds_view_base_table_t OPTIONAL .
"! <p class="shorttext synchronized" lang="en">Get Annotation of CDS View</p>
"!
METHODS get_annotations
IMPORTING
it_annotation_name TYPE zif_sat_ty_global=>ty_t_cds_anno_name_range
RETURNING
VALUE(rt_annotation) TYPE zif_sat_ty_global=>ty_t_cds_annotation.
"! <p class="shorttext synchronized" lang="en">Retrieve API States of CDS View</p>
"!
"! @parameter rt_api_states | <p class="shorttext synchronized" lang="en"></p>
METHODS get_api_states
RETURNING
VALUE(rt_api_states) TYPE zif_sat_ty_global=>ty_t_cds_api_state .
"! <p class="shorttext synchronized" lang="en">Returns associations</p>
METHODS get_associations
RETURNING
VALUE(result) TYPE zif_sat_ty_global=>ty_t_cds_association .
"! <p class="shorttext synchronized" lang="en">Get author of CDS view</p>
"!
METHODS get_tadir_info
RETURNING
VALUE(rs_tadir_info) TYPE zif_sat_ty_global=>ty_s_cds_tadir.
"! <p class="shorttext synchronized" lang="en">Returns base tables for CDS View</p>
METHODS get_base_tables
RETURNING
VALUE(result) TYPE zsat_cds_view_base_table_t .
"! <p class="shorttext synchronized" lang="en">Returns columns information</p>
METHODS get_columns
IMPORTING
if_key_only TYPE abap_bool OPTIONAL
RETURNING
VALUE(result) TYPE dd03ndvtab .
"! <p class="shorttext synchronized" lang="en">Retrieve description of cds view</p>
"!
"! @parameter rv_description | <p class="shorttext synchronized" lang="en"></p>
METHODS get_description
RETURNING
VALUE(rv_description) TYPE ddtext.
"! <p class="shorttext synchronized" lang="en">Returns header information</p>
METHODS get_header
RETURNING
VALUE(result) TYPE zsat_cds_view_header .
"! <p class="shorttext synchronized" lang="en">Returns parameter information</p>
METHODS get_parameters
IMPORTING
!if_exclude_system_params TYPE abap_bool OPTIONAL
RETURNING
VALUE(result) TYPE zif_sat_ty_global=>ty_t_cds_parameter.
"! <p class="shorttext synchronized" lang="en">Returns 'X' if cds view has associations</p>
METHODS has_associations
RETURNING
VALUE(result) TYPE abap_bool .
"! <p class="shorttext synchronized" lang="en">Checks if this cds view has parameters</p>
METHODS has_parameters
IMPORTING
if_exclude_system_params TYPE abap_bool OPTIONAL
RETURNING
VALUE(result) TYPE abap_bool .
"! <p class="shorttext synchronized" lang="en">Returns 'X' if this CDS is of type Analytics.query = true</p>
METHODS is_analytics_query
RETURNING
VALUE(rf_is_query) TYPE abap_bool.
PROTECTED SECTION.
PRIVATE SECTION.
"! <p class="shorttext synchronized" lang="en">Header for CDS View</p>
DATA ms_header TYPE zsat_cds_view_header .
"! <p class="shorttext synchronized" lang="en">Parameters for cds view</p>
DATA mt_parameters TYPE zif_sat_ty_global=>ty_t_cds_parameter .
"! <p class="shorttext synchronized" lang="en">DD: Table for Node Attributes</p>
DATA mt_columns TYPE dd03ndvtab .
DATA mt_api_states TYPE zif_sat_ty_global=>ty_t_cds_api_state.
DATA mt_association_header TYPE dd08bvtab .
DATA mt_association_field TYPE dd05bvtab .
DATA mf_has_associations TYPE abap_bool .
"! <p class="shorttext synchronized" lang="en">Associations for CDS View</p>
DATA mt_association TYPE zif_sat_ty_global=>ty_t_cds_association.
"! <p class="shorttext synchronized" lang="en">List Base tables of CDS View</p>
DATA mt_base_tables TYPE zsat_cds_view_base_table_t .
DATA mf_base_tables_loaded TYPE abap_bool .
DATA mf_api_states_loaded TYPE abap_bool.
DATA mf_tadir_info_loaded TYPE abap_bool.
DATA ms_tadir_info TYPE zif_sat_ty_global=>ty_s_cds_tadir.
DATA mt_annotations TYPE zif_sat_ty_global=>ty_t_cds_annotation.
DATA mv_description TYPE ddtext.
DATA mf_description_loaded TYPE abap_bool.
ENDCLASS.
CLASS zcl_sat_cds_view IMPLEMENTATION.
METHOD constructor.
ms_header = is_header.
mv_view_name = is_header-entityname.
mt_parameters = it_parameters.
mt_columns = it_columns.
mt_association = it_association.
IF it_base_tables IS SUPPLIED.
mf_base_tables_loaded = abap_true.
mt_base_tables = it_base_tables.
ENDIF.
IF it_api_states IS SUPPLIED.
mf_api_states_loaded = abap_true.
mt_api_states = it_api_states.
ENDIF.
mf_has_associations = xsdbool( mt_association IS NOT INITIAL ).
mv_association_count = lines( it_association ).
mv_select_table_count = lines( it_base_tables ).
ENDMETHOD.
METHOD get_annotations.
*.. Check if the requested annotations were already read
LOOP AT mt_annotations ASSIGNING FIELD-SYMBOL(<ls_annotation>) WHERE name IN it_annotation_name.
ENDLOOP.
IF sy-subrc <> 0.
RAISE EVENT request_annotations
EXPORTING
et_anno_name_range = it_annotation_name.
ENDIF.
LOOP AT mt_annotations ASSIGNING <ls_annotation> WHERE name IN it_annotation_name.
rt_annotation = VALUE #( BASE rt_annotation ( <ls_annotation> ) ).
ENDLOOP.
ENDMETHOD.
METHOD get_api_states.
IF mf_api_states_loaded = abap_false.
RAISE EVENT request_api_states.
mf_api_states_loaded = abap_true.
ENDIF.
rt_api_states = mt_api_states.
ENDMETHOD.
METHOD get_associations.
result = mt_association.
ENDMETHOD.
METHOD get_base_tables.
*... were the base tables already loaded?
IF mf_base_tables_loaded = abap_false.
RAISE EVENT request_base_tables.
mf_base_tables_loaded = abap_true.
ENDIF.
result = mt_base_tables.
ENDMETHOD.
METHOD get_columns.
IF if_key_only = abap_true.
result = VALUE #( FOR key IN mt_columns WHERE ( keyflag = abap_true ) ( key ) ).
ELSE.
result = mt_columns.
ENDIF.
ENDMETHOD.
METHOD get_description.
IF mf_description_loaded = abap_false.
RAISE EVENT request_description.
mf_description_loaded = abap_true.
ENDIF.
rv_description = mv_description.
ENDMETHOD.
METHOD get_header.
result = ms_header.
ENDMETHOD.
METHOD get_parameters.
result = mt_parameters.
IF if_exclude_system_params = abap_true.
DELETE result WHERE has_system_anno = abap_true.
ENDIF.
ENDMETHOD.
METHOD get_tadir_info.
IF mf_tadir_info_loaded = abap_false.
RAISE EVENT request_tadir_info.
mf_tadir_info_loaded = abap_true.
ENDIF.
rs_tadir_info = ms_tadir_info.
ENDMETHOD.
METHOD has_associations.
result = mf_has_associations.
ENDMETHOD.
METHOD has_parameters.
IF if_exclude_system_params = abap_true.
result = xsdbool( line_exists( mt_parameters[ has_system_anno = abap_false ] ) ).
ELSE.
result = xsdbool( mt_parameters IS NOT INITIAL ).
ENDIF.
ENDMETHOD.
METHOD is_analytics_query.
DATA(lt_anno) = get_annotations( VALUE #( ( sign = 'I' option = 'EQ' low = 'ANALYTICS.QUERY' ) ) ).
IF lt_anno IS NOT INITIAL.
DATA(lv_query_anno_val) = VALUE #( lt_anno[ 1 ]-value DEFAULT 'FALSE' ).
rf_is_query = xsdbool( lv_query_anno_val = 'TRUE' ).
ENDIF.
ENDMETHOD.
ENDCLASS.
| [
40484,
1279,
79,
1398,
2625,
19509,
5239,
47192,
1,
42392,
2625,
268,
5320,
34,
5258,
3582,
3556,
79,
29,
198,
31631,
1976,
565,
62,
49720,
62,
66,
9310,
62,
1177,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
25261,
198,
220,
29244,
6158,
44731,
628,
220,
10188,
9864,
1847,
48167,
1677,
5258,
1976,
565,
62,
49720,
62,
66,
9310,
62,
1177,
62,
69,
9548,
764,
628,
220,
44731,
44513,
13,
628,
220,
220,
220,
366,
0,
1279,
79,
1398,
2625,
19509,
5239,
47192,
1,
42392,
2625,
268,
5320,
5376,
286,
327,
5258,
1570,
3556,
79,
29,
198,
220,
220,
220,
42865,
285,
85,
62,
1177,
62,
3672,
41876,
1976,
49720,
62,
66,
9310,
62,
1177,
62,
3672,
20832,
12,
1340,
11319,
764,
198,
220,
220,
220,
42865,
285,
85,
62,
562,
41003,
62,
9127,
41876,
1312,
20832,
12,
1340,
11319,
764,
198,
220,
220,
220,
42865,
285,
85,
62,
19738,
62,
11487,
62,
9127,
41876,
1312,
20832,
12,
1340,
11319,
764,
198,
220,
220,
220,
366,
0,
1279,
79,
1398,
2625,
19509,
5239,
47192,
1,
42392,
2625,
268,
5320,
16844,
3558,
37647,
329,
327,
5258,
3582,
3556,
79,
29,
198,
220,
220,
220,
22399,
2581,
62,
34574,
602,
198,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
316,
62,
1236,
78,
62,
3672,
62,
9521,
8,
41876,
1976,
361,
62,
49720,
62,
774,
62,
20541,
14804,
774,
62,
83,
62,
66,
9310,
62,
1236,
78,
62,
3672,
62,
9521,
13,
198,
220,
220,
220,
366,
0,
1279,
79,
1398,
2625,
19509,
5239,
47192,
1,
42392,
2625,
268,
5320,
16844,
3558,
7824,
1829,
3556,
79,
29,
198,
220,
220,
220,
22399,
2581,
62,
15042,
62,
27219,
764,
198,
220,
220,
220,
366,
0,
1279,
79,
1398,
2625,
19509,
5239,
47192,
1,
42392,
2625,
268,
5320,
16844,
3558,
1772,
286,
327,
5258,
3582,
3556,
79,
29,
198,
220,
220,
220,
22399,
2581,
62,
83,
324,
343,
62,
10951,
13,
198,
220,
220,
220,
366,
0,
1279,
79,
1398,
2625,
19509,
5239,
47192,
1,
42392,
2625,
268,
5320,
16844,
3558,
7308,
33220,
3556,
79,
29,
198,
220,
220,
220,
22399,
2581,
62,
8692,
62,
83,
2977,
764,
198,
220,
220,
220,
366,
0,
1279,
79,
1398,
2625,
19509,
5239,
47192,
1,
42392,
2625,
268,
5320,
16844,
3558,
12489,
3556,
79,
29,
198,
220,
220,
220,
22399,
2581,
62,
11213,
13,
628,
220,
220,
220,
337,
36252,
50,
23772,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
271,
62,
25677,
220,
220,
220,
220,
220,
41876,
1976,
49720,
62,
66,
9310,
62,
1177,
62,
25677,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
270,
62,
28665,
82,
220,
220,
220,
220,
41876,
49427,
3070,
358,
85,
8658,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
270,
62,
17143,
7307,
220,
41876,
1976,
361,
62,
49720,
62,
774,
62,
20541,
14804,
774,
62,
83,
62,
66,
9310,
62,
17143,
2357,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
270,
62,
562,
41003,
41876,
1976,
361,
62,
49720,
62,
774,
62,
20541,
14804,
774,
62,
83,
62,
66,
9310,
62,
562,
41003,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
270,
62,
15042,
62,
27219,
220,
41876,
1976,
361,
62,
49720,
62,
774,
62,
20541,
14804,
774,
62,
83,
62,
66,
9310,
62,
15042,
62,
5219,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
270,
62,
8692,
62,
83,
2977,
41876,
1976,
49720,
62,
66,
9310,
62,
1177,
62,
8692,
62,
11487,
62,
83,
39852,
2849,
1847,
764,
198,
220,
220,
220,
366,
0,
1279,
79,
1398,
2625,
19509,
5239,
47192,
1,
42392,
2625,
268,
5320,
3855,
1052,
38983,
286,
327,
5258,
3582,
3556,
79,
29,
198,
220,
220,
220,
366,
0,
198,
220,
220,
220,
337,
36252,
50,
651,
62,
34574,
602,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
340,
62,
1236,
14221,
62,
3672,
220,
220,
41876,
1976,
361,
62,
49720,
62,
774,
62,
20541,
14804,
774,
62,
83,
62,
66,
9310,
62,
1236,
78,
62,
3672,
62,
9521,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
17034,
62,
1236,
14221,
8,
41876,
1976,
361,
62,
49720,
62,
774,
62,
20541,
14804,
774,
62,
83,
62,
66,
9310,
62,
1236,
14221,
13,
628,
220,
220,
220,
366,
0,
1279,
79,
1398,
2625,
19509,
5239,
47192,
1,
42392,
2625,
268,
5320,
9781,
30227,
7824,
1829,
286,
327,
5258,
3582,
3556,
79,
29,
198,
220,
220,
220,
366,
0,
198,
220,
220,
220,
366,
0,
2488,
17143,
2357,
374,
83,
62,
15042,
62,
27219,
930,
1279,
79,
1398,
2625,
19509,
5239,
47192,
1,
42392,
2625,
268,
23984,
79,
29,
198,
220,
220,
220,
337,
36252,
50,
651,
62,
15042,
62,
27219,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
17034,
62,
15042,
62,
27219,
8,
41876,
1976,
361,
62,
49720,
62,
774,
62,
20541,
14804,
774,
62,
83,
62,
66,
9310,
62,
15042,
62,
5219,
764,
198,
220,
220,
220,
366,
0,
1279,
79,
1398,
2625,
19509,
5239,
47192,
1,
42392,
2625,
268,
5320,
35561,
15814,
3556,
79,
29,
198,
220,
220,
220,
337,
36252,
50,
651,
62,
562,
1733,
602,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
20274,
8,
41876,
1976,
361,
62,
49720,
62,
774,
62,
20541,
14804,
774,
62,
83,
62,
66,
9310,
62,
562,
41003,
764,
198,
220,
220,
220,
366,
0,
1279,
79,
1398,
2625,
19509,
5239,
47192,
1,
42392,
2625,
268,
5320,
3855,
1772,
286,
327,
5258,
1570,
3556,
79,
29,
198,
220,
220,
220,
366,
0,
198,
220,
220,
220,
337,
36252,
50,
651,
62,
83,
324,
343,
62,
10951,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
3808,
62,
83,
324,
343,
62,
10951,
8,
41876,
1976,
361,
62,
49720,
62
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
"! <p class="shorttext synchronized" lang="en">Demo Implementation</p>
CLASS zdsagcl_business_func_multi1 DEFINITION
PUBLIC
FINAL
CREATE PUBLIC .
PUBLIC SECTION.
INTERFACES zif_business_function_multiple.
PROTECTED SECTION.
PRIVATE SECTION.
ENDCLASS.
CLASS zdsagcl_business_func_multi1 IMPLEMENTATION.
METHOD zif_business_function_multiple~doit.
ENDMETHOD.
ENDCLASS.
| [
40484,
1279,
79,
1398,
2625,
19509,
5239,
47192,
1,
42392,
2625,
268,
5320,
11522,
78,
46333,
3556,
79,
29,
198,
31631,
1976,
9310,
363,
565,
62,
22680,
62,
20786,
62,
41684,
16,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
25261,
198,
220,
29244,
6158,
44731,
764,
628,
220,
44731,
44513,
13,
198,
220,
220,
220,
23255,
37,
2246,
1546,
1976,
361,
62,
22680,
62,
8818,
62,
48101,
13,
198,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
4810,
3824,
6158,
44513,
13,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1976,
9310,
363,
565,
62,
22680,
62,
20786,
62,
41684,
16,
30023,
2538,
10979,
6234,
13,
198,
220,
337,
36252,
1976,
361,
62,
22680,
62,
8818,
62,
48101,
93,
4598,
270,
13,
628,
220,
23578,
49273,
13,
198,
198,
10619,
31631,
13,
198
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
report ZTEST message-id id.
*---------------------------------------------------------------------*
* Type pools
*---------------------------------------------------------------------*
type-pools : slis.
*---------------------------------------------------------------------*
* Tables
*---------------------------------------------------------------------*
tables: t616u ,
vbpa ,
vbap ,
vbak ,
mara ,
t005t ,
t604t .
*---------------------------------------------------------------------*
* Internal Tables
*---------------------------------------------------------------------*
* To store first line contents of report
data : begin of it_output occurs 0,
vbeln like vbap-vbeln, " Sales order number
posnr like vbap-posnr, " Sales order line
matnr like vbap-matnr, " Material Number
arktx like vbap-arktx, " Description of material
herkl like vbap-zzherkl, " Country of origin
landx like t005t-landx, " Country Description
stawn like vbap-zzstawn, " HTS Commodity code
text1 like t604t-text1, " HTS Description
check, " Check box for selection
line_color(4), " Line color
vbpos(17), " Key for Hier List
end of it_output.
* To store second line contents of report
data: begin of it_output2 occurs 0,
herkl like vbap-zzherkl, " Country of origin
stawn like vbap-zzstawn, " HTS Commodity code
vbpos(17), " Key for Hier List
end of it_output2.
* Internal table to store details of sales order
data : begin of it_material occurs 0,
vbeln like vbap-vbeln, " Sales order number
posnr like vbap-posnr, " Sales order line
matnr like vbap-matnr, " Material Number
werks like vbap-werks, " Plant
arktx like vbap-arktx, " Description of material
herkl like vbap-zzherkl, " Country of origin
stawn like vbap-zzstawn, " HTS Commodity code
end of it_material.
* Internal table to store error messages
data : begin of it_errmsgs occurs 0,
vbeln like vbap-vbeln, " Sales order number
posnr like vbap-posnr, " Sales order line
message(100) type c, " Error Message
end of it_errmsgs.
* WORKING STORAGE FOR BAPI INTERFACE
data: begin of it_bapiparex occurs 0.
include structure bapiparex. "1710
data: end of it_bapiparex.
data: begin of it_bape.
data: structure like bapiparex-structure. "len 30
include structure bape_vbap. "len 261
data: filler(1419) type c. "len 1419
data: end of it_bape.
data: begin of it_bapex.
data: structure like bapiparex-structure. "len 30
include structure bape_vbapx. "len 22
data: filler(1658) type c.
data: end of it_bapex.
*Internal Tables to capture BapirETURN messages
data: it_bapireturn1 like bapiret2 occurs 0 with header line,
it_bapireturn2 like bapiret2 occurs 0 with header line.
data: x_orderitemx like bapisdh1x.
data: v_export type c.
data: begin of itmupd occurs 0.
include structure bapisditmx.
data: end of itmupd.
data: begin of itmfld occurs 0.
include structure bapisditm.
data: end of itmfld.
* Internal table for field catalog
data : it_fieldcat type slis_t_fieldcat_alv with header line,
* Internal table for Events
it_events type slis_t_event with header line.
*---------------------------------------------------------------------*
* Global Variables
*---------------------------------------------------------------------*
data: v_tabix like sy-tabix, " Line index
v_repid like sy-repid, " Program name
x_layout type slis_layout_alv, " Output layout
v_herkl(6),
v_stawn(34).
*---------------------------------------------------------------------*
* Selection Screen
*---------------------------------------------------------------------*
selection-screen : begin of block blk1
with frame title text-001. " Geography-Receipt
select-options :
* Country
s_land1 for vbpa-land1,
* Ship-to-Party
s_kunnr for vbpa-kunnr.
selection-screen : end of block blk1.
selection-screen : begin of block blk2
with frame title text-002 . " Geography-Export
select-options :
* Sales Organization
s_vkorg for vbak-vkorg,
* Shipping Point / Receiving Point
s_vstel for vbap-vstel,
* Plant
s_werks for vbap-werks.
selection-screen : end of block blk2.
selection-screen : begin of block blk3
with frame title text-003." Further Doc.Data
select-options :
* Created on
s_erdat for vbak-erdat.
selection-screen :begin of line.
*-Sales document Radiobutton - Select-Option
parameters : r_select radiobutton group grp1 .
selection-screen comment 4(25) text-015 for field r_select.
*-Select Option for Sales Order
select-options : s_vbeln for vbap-vbeln.
selection-screen :end of line.
selection-screen :begin of line.
*-Sales document Radiobutton - Parameter
parameters : r_parmtr radiobutton group grp1 .
selection-screen comment 4(28) text-015 for field r_parmtr.
parameters: p_vbeln like vbak-vbeln.
selection-screen :end of line.
selection-screen :begin of line.
*-Item
selection-screen comment 3(26) text-016 for field s_posnr.
select-options: s_posnr for vbap-posnr.
selection-screen :end of line.
select-options :
* Created By
s_ernam for vbak-ernam,
* Sales Order Type
s_auart for vbak-auart,
* Material
s_matnr for vbap-matnr,
* Material Group
s_matkl for vbap-matkl.
selection-screen : end of block blk3.
selection-screen begin of block blk4 with frame .
*To Display error record only
parameters p_errors as checkbox .
selection-screen end of block blk4.
*---------------------------------------------------------------------*
* Start of Selection
*---------------------------------------------------------------------*
start-of-selection.
* Selecting data depending on selection criteria
perform select_data.
*---------------------------------------------------------------------*
* End of Selection
*---------------------------------------------------------------------*
end-of-selection.
*Display report output
perform display_output.
*&---------------------------------------------------------------------*
*& Form SELECT_DATA
*&---------------------------------------------------------------------*
* Select data based on selection criteria
*----------------------------------------------------------------------*
form select_data.
*Refresh & clear internal tables before populating data
refresh : it_output ,
it_output2,
it_material.
clear : it_output,
it_material,
it_output2.
*Fetching data from VBAP
*-Sales Order - Select-Option
if r_select = 'X'.
select vbap~vbeln
vbap~posnr
vbap~matnr
vbap~werks
vbap~arktx
vbap~zzherkl
vbap~zzstawn into table it_material
from vbap
inner join vbak
on vbap~vbeln = vbak~vbeln
where vbak~vkorg in s_vkorg
and vbap~vstel in s_vstel
and vbap~werks in s_werks
and vbak~erdat in s_erdat
and vbak~vbeln in s_vbeln
and vbak~ernam in s_ernam
and vbak~auart in s_auart
and vbap~matnr in s_matnr
and vbap~matkl in s_matkl.
*-Sales Order - Parameter & Item - Select-Option
elseif r_parmtr = 'X'.
select vbap~vbeln
vbap~posnr
vbap~matnr
vbap~werks
vbap~arktx
vbap~zzherkl
vbap~zzstawn into table it_material
from vbap
inner join vbak
on vbap~vbeln = vbak~vbeln
where vbak~vkorg in s_vkorg
and vbap~vstel in s_vstel
and vbap~werks in s_werks
and vbak~erdat in s_erdat
and vbak~vbeln = p_vbeln
and vbak~ernam in s_ernam
and vbak~auart in s_auart
and vbap~posnr in s_posnr
and vbap~matnr in s_matnr
and vbap~matkl in s_matkl.
endif.
* If sy-subrc is not equal to zero exit
if sy-subrc <> 0 .
exit.
endif.
* Else Excluding records
loop at it_material.
v_tabix = sy-tabix.
select single kunnr
from vbpa
into vbpa-vbeln
where vbeln = it_material-vbeln and
posnr = it_material-posnr and
parvw = 'WE' and
kunnr in s_kunnr and
land1 in s_land1.
if sy-subrc <> 0.
select single kunnr
from vbpa
into vbpa-vbeln
where vbeln = it_material-vbeln and
posnr = '000000' and
parvw = 'WE' and
kunnr in s_kunnr and
land1 in s_land1.
if sy-subrc <> 0.
delete it_material index v_tabix.
continue.
endif.
endif.
* Delete recods that are not export relevant.
call function 'Z_DETER_EXPORT_REL'
exporting
salesorder = it_material-vbeln
lineitem = it_material-posnr
importing
flag = v_export.
if v_export = ' '.
delete it_material index v_tabix.
continue.
endif.
* Populating IT_OUTPUT from IT_MATERIAL.
move-corresponding it_material to it_output.
*Populating SecondLine In the Output
select single herkl
stawn
from marc
into (it_output2-herkl,
it_output2-stawn)
where matnr = it_material-matnr and
werks = it_material-werks .
if sy-subrc = 0.
shift it_material-vbeln left deleting leading '0'.
concatenate it_material-vbeln
it_material-posnr
into it_output2-vbpos
separated by '/'.
append it_output2.
endif.
* If Errors Only Check Box is checked.
if p_errors = 'X'.
clear : v_herkl, v_stawn.
concatenate : it_output2-herkl it_material-herkl into v_herkl,
it_output2-stawn it_material-stawn into v_stawn.
condense : v_herkl, v_stawn.
if v_herkl is initial or v_stawn is initial.
else.
delete it_material index v_tabix.
continue.
endif.
endif.
* Country Description
select single landx
from t005t
into it_output-landx
where spras = 'EN' and
land1 = it_material-herkl.
* HTS Description
select single text1
from t604t
into it_output-text1
where spras = 'EN' and
land1 = it_material-herkl and
stawn = it_material-stawn.
*VBELN/POSNR
shift it_material-vbeln left deleting leading '0'.
concatenate it_material-vbeln
it_material-posnr
into it_output-vbpos
separated by '/'.
append it_output.
clear it_output.
endloop.
endform. " SELECT_DATA
*&---------------------------------------------------------------------*
*& Form DISPLAY_OUTPUT
*&---------------------------------------------------------------------*
* Display Report
*----------------------------------------------------------------------*
form display_output.
data : l_pf_formname type slis_formname value 'PF_STATUS',
l_user_formname type slis_formname value 'USER_COMMAND',
keyinfo type slis_keyinfo_alv.
v_repid = sy-repid.
* populate fieldcatalog
perform build_fieldcatalog.
* Populate events internal table
perform build_events.
* Layout initialization.
perform layout using x_layout.
x_layout-info_fieldname = 'LINE_COLOR'.
* Specifying KeyFields for List.
keyinfo-header01 = 'VBPOS'.
keyinfo-item01 = 'VBPOS'.
call function 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
exporting
i_callback_program = v_repid
i_callback_pf_status_set = l_pf_formname
i_callback_user_command = l_user_formname
is_layout = x_layout
it_fieldcat = it_fieldcat[]
it_events = it_events[]
i_tabname_header = 'IT_OUTPUT'
i_tabname_item = 'IT_OUTPUT2'
is_keyinfo = keyinfo
tables
t_outtab_header = it_output
t_outtab_item = it_output2
exceptions
program_error = 1
others = 2.
endform. " DISPLAY_OUTPUT
*&---------------------------------------------------------------------*
*& Form TOP-OF-LIST
*&---------------------------------------------------------------------*
* For Top of list
*----------------------------------------------------------------------*
form top-of-list.
* Display Steelcase header
call function 'Z_HEADER'.
endform. " TOP-OF-LIST
*---------------------------------------------------------------------*
* FORM LAYOUT *
*---------------------------------------------------------------------*
form layout using l_layout type slis_layout_alv.
l_layout-box_fieldname = 'CHECK'.
l_layout-box_tabname = 'IT_OUTPUT'.
l_layout-colwidth_optimize = 'X'.
endform.
*---------------------------------------------------------------------*
*& Form USER_COMMAND
*&---------------------------------------------------------------------*
* Processing User command
*----------------------------------------------------------------------*
* -->P_UCOMM Screens, function code triggered by PAI
* -->P_SELFIELD information cursor position ALV
*----------------------------------------------------------------------*
form user_command using p_ucomm like sy-ucomm
p_selfield type slis_selfield.
data : l_index like sy-tabix.
l_index = p_selfield-tabindex.
case p_ucomm.
when 'SAVE'.
perform validate_input.
perform save_sales_docu.
p_selfield-refresh = 'X'.
*Display Messages
if it_errmsgs[] is initial.
message s899 with 'Record(s) Successfully Updated'.
else.
perform display_errors.
endif.
when '&IC1'.
* On Double click display the sales order.
read table it_output index l_index.
set parameter id 'AUN' field it_output-vbeln.
call transaction 'VA03' and skip first screen.
endcase.
endform. " USER_COMMAND
*---------------------------------------------------------------------*
* FORM pf_status *
*---------------------------------------------------------------------*
* Set pf status
*----------------------------------------------------------------------*
* --> p_extab excluding Fcode table
*---------------------------------------------------------------------*
form pf_status using p_extab type slis_t_extab.
data : l_extab type slis_extab.
set pf-status 'STANDARD' excluding p_extab.
endform. " PF_STATUS_SET
*&---------------------------------------------------------------------*
*& Form SAVE_SALES_DOCU
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
form save_sales_docu.
data v_tabix like sy-tabix.
refresh it_errmsgs.
clear it_errmsgs.
*Setting the flag field as update
x_orderitemx-updateflag = 'U'.
loop at it_output.
v_tabix = sy-tabix.
refresh : it_bapireturn1,
it_bapireturn2,
it_bapiparex,
itmfld,
itmupd.
clear : it_bapireturn1,
it_bapireturn2,
it_bapiparex,
itmfld,
itmupd,
it_bape,
it_bapex.
if it_output-check = ' '.
continue.
endif.
* if the sales order is checked populate IT_BAPIREX.
it_bape-structure = 'BAPE_VBAP'.
it_bape-vbeln = it_output-vbeln.
it_bape-posnr = it_output-posnr.
it_bape-zzherkl = it_output-herkl.
it_bape-zzstawn = it_output-stawn.
append it_bape to it_bapiparex.
it_bapex-structure = 'BAPE_VBAPX'.
it_bapex-vbeln = it_output-vbeln.
it_bapex-posnr = it_output-posnr.
it_bapex-zzherkl = 'X'.
it_bapex-zzstawn = 'X'.
append it_bapex to it_bapiparex.
itmfld-itm_number = it_output-posnr.
append itmfld.
itmupd-itm_number = it_output-posnr.
itmupd-updateflag = 'U'.
append itmupd.
call function 'BAPI_SALESORDER_CHANGE'
exporting
salesdocument = it_output-vbeln
order_header_inx = x_orderitemx
tables
return = it_bapireturn1
order_item_in = itmfld
order_item_inx = itmupd
extensionin = it_bapiparex.
*Store the error messages in internal table
loop at it_bapireturn1 where type = 'E'.
it_errmsgs-vbeln = it_output-vbeln.
it_errmsgs-posnr = it_output-posnr.
it_errmsgs-message = it_bapireturn1-message.
append it_errmsgs.
clear it_errmsgs.
it_output-line_color = 'C600'.
endloop.
*Commit the bapi transaction if no error messages are there.
if sy-subrc <> 0.
refresh it_bapireturn2.
clear it_bapireturn2.
call function 'BAPI_TRANSACTION_COMMIT'
exporting
wait = 'X'
importing
return = it_bapireturn2.
*If commit is not succesful capture the error messages.
if not it_bapireturn2 is initial.
it_errmsgs-vbeln = it_output-vbeln.
it_errmsgs-posnr = it_output-posnr.
it_errmsgs-message = it_bapireturn2-message.
append it_errmsgs.
clear it_errmsgs.
it_output-line_color = 'C600'.
else.
*If salesOrder is updated refresh the data from the database.
it_output-line_color = ' '.
select single zzherkl
zzstawn
from vbap
into (it_output-herkl ,
it_output-stawn)
where vbeln = it_output-vbeln and
posnr = it_output-posnr.
endif.
endif.
* Make the checkboxes unchecked after updating the salesorder.
it_output-check = ' '.
modify it_output index v_tabix.
endloop.
endform. " SAVE_SALES_DOCU
*&---------------------------------------------------------------------*
*& Form VALIDATE_INPUT
*&---------------------------------------------------------------------*
* To Validate Input Fields
*----------------------------------------------------------------------*
form validate_input.
loop at it_output.
v_tabix = sy-tabix.
* check if the Country of origin exists.
if not it_output-herkl is initial.
select single landx
from t005t
into t005t-landx
where spras = 'EN' and
land1 = it_output-herkl.
if sy-subrc <> 0.
message e899 with it_output-herkl text-011 .
exit.
endif.
* Move country description to display field
move t005t-landx to it_output-landx.
else.
move space to it_output-landx.
endif.
* check if the Commodity code exists.
if not it_output-stawn is initial.
select single text1
from t604t
into t604t-text1
where spras = 'EN' and
land1 = it_output-herkl and
stawn = it_output-stawn.
if sy-subrc <> 0.
message e899 with it_output-stawn text-012 .
exit.
endif.
* Move commodity description to display field
move t604t-text1 to it_output-text1.
else .
move space to it_output-text1.
endif.
modify it_output index v_tabix.
endloop.
endform. " VALIDATE_INPUT
*&---------------------------------------------------------------------*
*& Form DISPLAY_ERRORS
*&---------------------------------------------------------------------*
* Display PopUp Messages
*----------------------------------------------------------------------*
form display_errors.
*variables
data : l_pos(1) type n value 1. " Field pos
* Fieldcatalog for popup
data : it_fieldcat_pop type slis_t_fieldcat_alv with header line.
* Sales Order #
it_fieldcat_pop-fieldname = 'VBELN'.
it_fieldcat_pop-tabname = 'IT_ERRMSGS'.
it_fieldcat_pop-col_pos = l_pos.
it_fieldcat_pop-seltext_m = 'Sales Order# '.
it_fieldcat_pop-ddictxt = 'M'.
it_fieldcat_pop-outputlen = 10.
it_fieldcat_pop-no_zero = 'X'.
append it_fieldcat_pop.
clear it_fieldcat_pop.
l_pos = l_pos + 1.
* Message
it_fieldcat_pop-fieldname = 'MESSAGE'.
it_fieldcat_pop-tabname = 'IT_ERRMSGS'.
it_fieldcat_pop-col_pos = l_pos.
it_fieldcat_pop-seltext_m = 'Message'.
it_fieldcat_pop-ddictxt = 'M'.
it_fieldcat_pop-outputlen = 255.
it_fieldcat_pop-no_zero = 'X'.
append it_fieldcat_pop.
clear it_fieldcat_pop.
call function 'REUSE_ALV_POPUP_TO_SELECT'
exporting
i_title = 'Errors'
i_tabname = 'IT_ERRMSGS'
it_fieldcat = it_fieldcat_pop[]
tables
t_outtab = it_errmsgs
exceptions
program_error = 1
others = 2.
endform. " DISPLAY_ERRORS
*&---------------------------------------------------------------------*
*& Form BUILD_FIELDCATALOG
*&---------------------------------------------------------------------*
* Builds FieldCatalog
*----------------------------------------------------------------------*
form build_fieldcatalog.
data : l_pos(2) type n value 1.
refresh it_fieldcat.
clear it_fieldcat.
* Field Catalog for first line in Output.
* Order/Line
it_fieldcat-fieldname = 'VBPOS'.
it_fieldcat-tabname = 'IT_OUTPUT'.
it_fieldcat-col_pos = l_pos.
it_fieldcat-outputlen = 17.
it_fieldcat-seltext_m = text-013. "Order/Line
append it_fieldcat.
clear it_fieldcat.
l_pos = l_pos + 1.
* Material#
it_fieldcat-fieldname = 'MATNR'.
it_fieldcat-tabname = 'IT_OUTPUT'.
it_fieldcat-col_pos = l_pos.
it_fieldcat-outputlen = 18.
it_fieldcat-seltext_m = text-006. "Material#
append it_fieldcat.
clear it_fieldcat.
l_pos = l_pos + 1.
* Material Desc
it_fieldcat-fieldname = 'ARKTX'.
it_fieldcat-tabname = 'IT_OUTPUT'.
it_fieldcat-col_pos = l_pos.
it_fieldcat-outputlen = 40.
it_fieldcat-seltext_m = text-007. "Material Desc
append it_fieldcat.
clear it_fieldcat.
l_pos = l_pos + 1.
* Cnty of Origin
it_fieldcat-fieldname = 'HERKL'.
it_fieldcat-tabname = 'IT_OUTPUT'.
it_fieldcat-input = 'X'.
it_fieldcat-col_pos = l_pos.
it_fieldcat-outputlen = 3.
it_fieldcat-seltext_m = text-008. "Cnty of Origin
append it_fieldcat.
clear it_fieldcat.
l_pos = l_pos + 1.
* Country Description
it_fieldcat-fieldname = 'LANDX'.
it_fieldcat-tabname = 'IT_OUTPUT'.
it_fieldcat-col_pos = l_pos.
it_fieldcat-outputlen = 15.
it_fieldcat-seltext_m = text-009. "Description
append it_fieldcat.
clear it_fieldcat.
l_pos = l_pos + 1.
* HTS Code
it_fieldcat-fieldname = 'STAWN'.
it_fieldcat-tabname = 'IT_OUTPUT'.
it_fieldcat-input = 'X'.
it_fieldcat-col_pos = l_pos.
it_fieldcat-outputlen = 17.
it_fieldcat-seltext_m = text-010. "HTS Code
append it_fieldcat.
clear it_fieldcat.
l_pos = l_pos + 1.
* HTS Description
it_fieldcat-fieldname = 'TEXT1'.
it_fieldcat-tabname = 'IT_OUTPUT'.
it_fieldcat-col_pos = l_pos.
it_fieldcat-outputlen = 15.
it_fieldcat-seltext_m = text-009. "Description
append it_fieldcat.
clear it_fieldcat.
* Field Catalog for second line in Output.
* Cnty of Origin
l_pos = 1.
it_fieldcat-fieldname = 'HERKL'.
it_fieldcat-tabname = 'IT_OUTPUT2'.
it_fieldcat-col_pos = '1'.
it_fieldcat-outputlen = 18.
it_fieldcat-seltext_m = text-014. "Cnty of Origin
append it_fieldcat.
clear it_fieldcat.
l_pos = l_pos + 1.
* HTS Code
it_fieldcat-fieldname = 'STAWN'.
it_fieldcat-tabname = 'IT_OUTPUT2'.
it_fieldcat-col_pos = '2'.
it_fieldcat-outputlen = 17.
it_fieldcat-seltext_m = text-010. "HTS Code
append it_fieldcat.
clear it_fieldcat.
endform. " BUILD_FIELDCATALOG
*&---------------------------------------------------------------------*
*& Form BUILD_EVENTS
*&---------------------------------------------------------------------*
* Populate Events Table
*----------------------------------------------------------------------*
form build_events.
refresh it_events.
clear it_events.
*ADD Top of Page event.
it_events-name = 'TOP_OF_PAGE'.
it_events-form = 'TOP_OF_PAGE'.
append it_events.
clear it_events.
*ADD Top of LIST event.
it_events-name = 'TOP_OF_LIST'.
it_events-form = 'TOP-OF-LIST'.
append it_events.
clear it_events.
endform. " BUILD_EVENTS
| [
13116,
1168,
51,
6465,
3275,
12,
312,
4686,
13,
198,
220,
198,
9,
10097,
30934,
9,
198,
9,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5994,
20354,
198,
9,
10097,
30934,
9,
198,
4906,
12,
7742,
82,
1058,
1017,
271,
13,
198,
9,
10097,
30934,
9,
198,
9,
220,
220,
220,
220,
220,
220,
220,
220,
220,
33220,
198,
9,
10097,
30934,
9,
198,
83,
2977,
25,
256,
44214,
84,
837,
198,
220,
220,
220,
220,
220,
220,
220,
410,
65,
8957,
220,
837,
198,
220,
220,
220,
220,
220,
220,
220,
410,
65,
499,
220,
837,
198,
220,
220,
220,
220,
220,
220,
220,
410,
65,
461,
220,
837,
198,
220,
220,
220,
220,
220,
220,
220,
1667,
64,
220,
837,
198,
220,
220,
220,
220,
220,
220,
220,
256,
22544,
83,
837,
198,
220,
220,
220,
220,
220,
220,
220,
256,
31916,
83,
764,
198,
9,
10097,
30934,
9,
198,
9,
220,
220,
220,
220,
220,
220,
220,
220,
220,
18628,
33220,
198,
9,
10097,
30934,
9,
198,
9,
1675,
3650,
717,
1627,
10154,
286,
989,
198,
7890,
1058,
2221,
286,
340,
62,
22915,
8833,
657,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
410,
6667,
77,
220,
220,
220,
220,
220,
588,
410,
65,
499,
12,
85,
6667,
77,
11,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
17329,
1502,
1271,
198,
220,
220,
220,
220,
220,
220,
220,
220,
1426,
48624,
220,
220,
220,
220,
220,
588,
410,
65,
499,
12,
1930,
48624,
11,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
17329,
1502,
1627,
198,
220,
220,
220,
220,
220,
220,
220,
220,
2603,
48624,
220,
220,
220,
220,
220,
588,
410,
65,
499,
12,
6759,
48624,
11,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
14633,
7913,
198,
220,
220,
220,
220,
220,
220,
220,
220,
610,
74,
17602,
220,
220,
220,
220,
220,
588,
410,
65,
499,
12,
668,
17602,
11,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
12489,
286,
2587,
198,
220,
220,
220,
220,
220,
220,
220,
220,
607,
41582,
220,
220,
220,
220,
220,
588,
410,
65,
499,
12,
3019,
372,
41582,
11,
220,
220,
220,
220,
220,
220,
220,
220,
366,
12946,
286,
8159,
198,
220,
220,
220,
220,
220,
220,
220,
220,
1956,
87,
220,
220,
220,
220,
220,
588,
256,
22544,
83,
12,
1044,
87,
11,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
12946,
12489,
198,
220,
220,
220,
220,
220,
220,
220,
220,
336,
3832,
220,
220,
220,
220,
220,
588,
410,
65,
499,
12,
3019,
301,
3832,
11,
220,
220,
220,
220,
220,
220,
220,
220,
366,
367,
4694,
1520,
375,
414,
2438,
198,
220,
220,
220,
220,
220,
220,
220,
220,
2420,
16,
220,
220,
220,
220,
220,
588,
256,
31916,
83,
12,
5239,
16,
11,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
367,
4694,
12489,
198,
220,
220,
220,
220,
220,
220,
220,
220,
2198,
11,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
6822,
3091,
329,
6356,
198,
220,
220,
220,
220,
220,
220,
220,
220,
1627,
62,
8043,
7,
19,
828,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
6910,
3124,
198,
220,
220,
220,
220,
220,
220,
220,
220,
410,
65,
1930,
7,
1558,
828,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
7383,
329,
36496,
7343,
198,
220,
220,
220,
220,
220,
220,
886,
286,
340,
62,
22915,
13,
198,
9,
1675,
3650,
1218,
1627,
10154,
286,
989,
198,
7890,
25,
2221,
286,
340,
62,
22915,
17,
8833,
657,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
607,
41582,
220,
220,
220,
220,
220,
588,
410,
65,
499,
12,
3019,
372,
41582,
11,
220,
220,
220,
220,
220,
220,
220,
220,
366,
12946,
286,
8159,
198,
220,
220,
220,
220,
220,
220,
220,
220,
336,
3832,
220,
220,
220,
220,
220,
588,
410,
65,
499,
12,
3019,
301,
3832,
11,
220,
220,
220,
220,
220,
220,
220,
220,
366,
367,
4694,
1520,
375,
414,
2438,
198,
220,
220,
220,
220,
220,
220,
220,
220,
410,
65,
1930,
7,
1558,
828,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
7383,
329,
36496,
7343,
198,
220,
220,
220,
220,
220,
886,
286,
340,
62,
22915,
17,
13,
198,
9,
18628,
3084,
284,
3650,
3307,
286,
4200,
1502,
198,
7890,
1058,
2221,
286,
340,
62,
33665,
8833,
657,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
410,
6667,
77,
220,
220,
220,
220,
220,
588,
410,
65,
499,
12,
85,
6667,
77,
11,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
17329,
1502,
1271,
198,
220,
220,
220,
220,
220,
220,
220,
220,
1426,
48624,
220,
220,
220,
220,
220,
588,
410,
65,
499,
12,
1930,
48624,
11,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
17329,
1502,
1627,
198,
220,
220,
220,
220,
220,
220,
220,
220,
2603,
48624,
220,
220,
220,
220,
220,
588,
410,
65,
499,
12,
6759,
48624,
11,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
14633,
7913,
198,
220,
220,
220,
220,
220,
220,
220,
220,
266,
263,
591,
220,
220,
220,
220,
220,
588,
410,
65,
499,
12,
15448,
591,
11,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
16561,
198,
220,
220,
220,
220,
220,
220,
220,
220,
610,
74,
17602,
220,
220,
220,
220,
220,
588,
410,
65,
499,
12,
668,
17602,
11,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
12489,
286,
2587,
198,
220,
220,
220,
220,
220,
220,
220,
220,
607,
41582
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
INTERFACE zif_excel_sheet_protection
PUBLIC .
DATA auto_filter TYPE zexcel_sheet_protection_bool .
CONSTANTS c_active TYPE zexcel_sheet_protection_bool VALUE '1'. "#EC NOTEXT
CONSTANTS c_noactive TYPE zexcel_sheet_protection_bool VALUE '0'. "#EC NOTEXT
CONSTANTS c_protected TYPE zexcel_sheet_protection VALUE 'X'. "#EC NOTEXT
CONSTANTS c_unprotected TYPE zexcel_sheet_protection VALUE ''. "#EC NOTEXT
DATA delete_columns TYPE zexcel_sheet_protection_bool .
DATA delete_rows TYPE zexcel_sheet_protection_bool .
DATA format_cells TYPE zexcel_sheet_protection_bool .
DATA format_columns TYPE zexcel_sheet_protection_bool .
DATA format_rows TYPE zexcel_sheet_protection_bool .
DATA insert_columns TYPE zexcel_sheet_protection_bool .
DATA insert_hyperlinks TYPE zexcel_sheet_protection_bool .
DATA insert_rows TYPE zexcel_sheet_protection_bool .
DATA objects TYPE zexcel_sheet_protection_bool .
DATA password TYPE zexcel_aes_password .
DATA pivot_tables TYPE zexcel_sheet_protection_bool .
DATA protected TYPE zexcel_sheet_protection .
DATA scenarios TYPE zexcel_sheet_protection_bool .
DATA select_locked_cells TYPE zexcel_sheet_protection_bool .
DATA select_unlocked_cells TYPE zexcel_sheet_protection_bool .
DATA sheet TYPE zexcel_sheet_protection_bool .
DATA sort TYPE zexcel_sheet_protection_bool .
METHODS initialize .
ENDINTERFACE.
| [
41358,
49836,
1976,
361,
62,
1069,
5276,
62,
21760,
62,
42846,
198,
220,
44731,
764,
628,
198,
220,
42865,
8295,
62,
24455,
41876,
1976,
1069,
5276,
62,
21760,
62,
42846,
62,
30388,
764,
198,
220,
7102,
2257,
1565,
4694,
269,
62,
5275,
41876,
1976,
1069,
5276,
62,
21760,
62,
42846,
62,
30388,
26173,
8924,
705,
16,
4458,
25113,
2943,
5626,
13918,
198,
220,
7102,
2257,
1565,
4694,
269,
62,
3919,
5275,
41876,
1976,
1069,
5276,
62,
21760,
62,
42846,
62,
30388,
26173,
8924,
705,
15,
4458,
25113,
2943,
5626,
13918,
198,
220,
7102,
2257,
1565,
4694,
269,
62,
24326,
41876,
1976,
1069,
5276,
62,
21760,
62,
42846,
26173,
8924,
705,
55,
4458,
25113,
2943,
5626,
13918,
198,
220,
7102,
2257,
1565,
4694,
269,
62,
403,
24326,
41876,
1976,
1069,
5276,
62,
21760,
62,
42846,
26173,
8924,
705,
4458,
25113,
2943,
5626,
13918,
198,
220,
42865,
12233,
62,
28665,
82,
41876,
1976,
1069,
5276,
62,
21760,
62,
42846,
62,
30388,
764,
198,
220,
42865,
12233,
62,
8516,
41876,
1976,
1069,
5276,
62,
21760,
62,
42846,
62,
30388,
764,
198,
220,
42865,
5794,
62,
46342,
41876,
1976,
1069,
5276,
62,
21760,
62,
42846,
62,
30388,
764,
198,
220,
42865,
5794,
62,
28665,
82,
41876,
1976,
1069,
5276,
62,
21760,
62,
42846,
62,
30388,
764,
198,
220,
42865,
5794,
62,
8516,
41876,
1976,
1069,
5276,
62,
21760,
62,
42846,
62,
30388,
764,
198,
220,
42865,
7550,
62,
28665,
82,
41876,
1976,
1069,
5276,
62,
21760,
62,
42846,
62,
30388,
764,
198,
220,
42865,
7550,
62,
49229,
28751,
41876,
1976,
1069,
5276,
62,
21760,
62,
42846,
62,
30388,
764,
198,
220,
42865,
7550,
62,
8516,
41876,
1976,
1069,
5276,
62,
21760,
62,
42846,
62,
30388,
764,
198,
220,
42865,
5563,
41876,
1976,
1069,
5276,
62,
21760,
62,
42846,
62,
30388,
764,
198,
220,
42865,
9206,
41876,
1976,
1069,
5276,
62,
64,
274,
62,
28712,
764,
198,
220,
42865,
30355,
62,
83,
2977,
41876,
1976,
1069,
5276,
62,
21760,
62,
42846,
62,
30388,
764,
198,
220,
42865,
6861,
41876,
1976,
1069,
5276,
62,
21760,
62,
42846,
764,
198,
220,
42865,
13858,
41876,
1976,
1069,
5276,
62,
21760,
62,
42846,
62,
30388,
764,
198,
220,
42865,
2922,
62,
24162,
62,
46342,
41876,
1976,
1069,
5276,
62,
21760,
62,
42846,
62,
30388,
764,
198,
220,
42865,
2922,
62,
403,
24162,
62,
46342,
41876,
1976,
1069,
5276,
62,
21760,
62,
42846,
62,
30388,
764,
198,
220,
42865,
9629,
41876,
1976,
1069,
5276,
62,
21760,
62,
42846,
62,
30388,
764,
198,
220,
42865,
3297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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS zcl_abapgit_object_ddlx DEFINITION PUBLIC INHERITING FROM zcl_abapgit_objects_super FINAL.
PUBLIC SECTION.
INTERFACES zif_abapgit_object.
ALIASES mo_files FOR zif_abapgit_object~mo_files.
PRIVATE SECTION.
DATA mi_persistence TYPE REF TO if_wb_object_persist .
METHODS get_persistence
RETURNING
VALUE(ri_persistence) TYPE REF TO if_wb_object_persist
RAISING
zcx_abapgit_exception .
METHODS clear_fields
CHANGING
!cg_data TYPE any .
METHODS clear_field
IMPORTING
!iv_fieldname TYPE csequence
CHANGING
!cg_metadata TYPE any .
ENDCLASS.
CLASS zcl_abapgit_object_ddlx IMPLEMENTATION.
METHOD clear_field.
FIELD-SYMBOLS: <lg_field> TYPE data.
ASSIGN COMPONENT iv_fieldname
OF STRUCTURE cg_metadata
TO <lg_field>.
ASSERT sy-subrc = 0.
CLEAR: <lg_field>.
ENDMETHOD.
METHOD clear_fields.
FIELD-SYMBOLS: <lg_metadata> TYPE any.
ASSIGN COMPONENT 'METADATA'
OF STRUCTURE cg_data
TO <lg_metadata>.
ASSERT sy-subrc = 0.
clear_field( EXPORTING iv_fieldname = 'CHANGED_AT'
CHANGING cg_metadata = <lg_metadata> ).
clear_field( EXPORTING iv_fieldname = 'CHANGED_BY'
CHANGING cg_metadata = <lg_metadata> ).
clear_field( EXPORTING iv_fieldname = 'CREATED_AT'
CHANGING cg_metadata = <lg_metadata> ).
clear_field( EXPORTING iv_fieldname = 'CREATED_BY'
CHANGING cg_metadata = <lg_metadata> ).
clear_field( EXPORTING iv_fieldname = 'RESPONSIBLE'
CHANGING cg_metadata = <lg_metadata> ).
clear_field( EXPORTING iv_fieldname = 'PACKAGE_REF-NAME'
CHANGING cg_metadata = <lg_metadata> ).
clear_field( EXPORTING iv_fieldname = 'CONTAINER_REF-PACKAGE_NAME'
CHANGING cg_metadata = <lg_metadata> ).
clear_field( EXPORTING iv_fieldname = 'VERSION'
CHANGING cg_metadata = <lg_metadata> ).
clear_field( EXPORTING iv_fieldname = 'RESPONSIBLE'
CHANGING cg_metadata = <lg_metadata> ).
clear_field( EXPORTING iv_fieldname = 'MASTER_SYSTEM'
CHANGING cg_metadata = <lg_metadata> ).
ENDMETHOD.
METHOD get_persistence.
DATA: lx_error TYPE REF TO cx_root.
TRY.
IF mi_persistence IS NOT BOUND.
CREATE OBJECT mi_persistence
TYPE ('CL_DDLX_ADT_OBJECT_PERSIST').
ENDIF.
CATCH cx_root INTO lx_error.
zcx_abapgit_exception=>raise( iv_text = lx_error->get_text( )
ix_previous = lx_error ).
ENDTRY.
ri_persistence = mi_persistence.
ENDMETHOD.
METHOD zif_abapgit_object~changed_by.
rv_user = c_user_unknown.
ENDMETHOD.
METHOD zif_abapgit_object~delete.
DATA: lv_object_key TYPE seu_objkey,
lx_error TYPE REF TO cx_root.
lv_object_key = ms_item-obj_name.
TRY.
get_persistence( )->delete( p_object_key = lv_object_key
p_version = swbm_version_active ).
CATCH cx_root INTO lx_error.
zcx_abapgit_exception=>raise( iv_text = lx_error->get_text( )
ix_previous = lx_error->previous ).
ENDTRY.
ENDMETHOD.
METHOD zif_abapgit_object~deserialize.
DATA: li_data_model TYPE REF TO if_wb_object_data_model,
lr_data TYPE REF TO data,
lx_error TYPE REF TO cx_root.
FIELD-SYMBOLS: <lg_data> TYPE any,
<lg_source> TYPE data,
<lg_version> TYPE data,
<lg_package> TYPE data.
TRY.
CREATE DATA lr_data
TYPE ('CL_DDLX_WB_OBJECT_DATA=>TY_OBJECT_DATA').
ASSIGN lr_data->* TO <lg_data>.
io_xml->read(
EXPORTING
iv_name = 'DDLX'
CHANGING
cg_data = <lg_data> ).
ASSIGN COMPONENT 'CONTENT-SOURCE' OF STRUCTURE <lg_data> TO <lg_source>.
ASSERT sy-subrc = 0.
TRY.
" If the file doesn't exist that's ok, because previously
" the source code was stored in the xml. We are downward compatible.
<lg_source> = mo_files->read_string( 'asddlxs' ) ##no_text.
CATCH zcx_abapgit_exception ##NO_HANDLER.
ENDTRY.
CREATE OBJECT li_data_model
TYPE ('CL_DDLX_WB_OBJECT_DATA').
ASSIGN COMPONENT 'METADATA-VERSION' OF STRUCTURE <lg_data> TO <lg_version>.
ASSERT sy-subrc = 0.
" We have to always save as inactive. Standard activation below activates then
" and also creates transport request entry if necessary
<lg_version> = 'inactive'.
"package needed to be able to determine ABAP language version
ASSIGN COMPONENT 'METADATA-PACKAGE_REF-NAME' OF STRUCTURE <lg_data> TO <lg_package>.
IF <lg_package> IS ASSIGNED.
<lg_package> = iv_package.
ENDIF.
li_data_model->set_data( <lg_data> ).
get_persistence( )->save( li_data_model ).
tadir_insert( iv_package ).
CATCH cx_root INTO lx_error.
zcx_abapgit_exception=>raise( iv_text = lx_error->get_text( )
ix_previous = lx_error->previous ).
ENDTRY.
zcl_abapgit_objects_activation=>add_item( ms_item ).
ENDMETHOD.
METHOD zif_abapgit_object~exists.
DATA: lv_object_key TYPE seu_objkey.
lv_object_key = ms_item-obj_name.
rv_bool = abap_true.
TRY.
get_persistence( )->get( p_object_key = lv_object_key
p_version = swbm_version_active
p_existence_check_only = abap_true ).
CATCH cx_swb_exception.
rv_bool = abap_false.
ENDTRY.
ENDMETHOD.
METHOD zif_abapgit_object~get_comparator.
RETURN.
ENDMETHOD.
METHOD zif_abapgit_object~get_deserialize_steps.
APPEND zif_abapgit_object=>gc_step_id-abap TO rt_steps.
ENDMETHOD.
METHOD zif_abapgit_object~get_metadata.
rs_metadata = get_metadata( ).
rs_metadata-delete_tadir = abap_true.
ENDMETHOD.
METHOD zif_abapgit_object~is_active.
rv_active = is_active( ).
ENDMETHOD.
METHOD zif_abapgit_object~is_locked.
rv_is_locked = exists_a_lock_entry_for( iv_lock_object = 'ESWB_EO'
iv_argument = |{ ms_item-obj_type }{ ms_item-obj_name }| ).
ENDMETHOD.
METHOD zif_abapgit_object~jump.
TRY.
jump_adt( iv_obj_name = ms_item-obj_name
iv_obj_type = ms_item-obj_type ).
CATCH zcx_abapgit_exception.
zcx_abapgit_exception=>raise( 'DDLX Jump Error' ).
ENDTRY.
ENDMETHOD.
METHOD zif_abapgit_object~serialize.
DATA: lv_object_key TYPE seu_objkey,
li_data_model TYPE REF TO if_wb_object_data_model,
li_persistence TYPE REF TO if_wb_object_persist,
lr_data TYPE REF TO data,
lx_error TYPE REF TO cx_root.
FIELD-SYMBOLS: <lg_data> TYPE any,
<lg_field> TYPE data.
lv_object_key = ms_item-obj_name.
TRY.
CREATE DATA lr_data
TYPE ('CL_DDLX_WB_OBJECT_DATA=>TY_OBJECT_DATA').
ASSIGN lr_data->* TO <lg_data>.
CREATE OBJECT li_data_model
TYPE ('CL_DDLX_WB_OBJECT_DATA').
li_persistence = get_persistence( ).
IF zcl_abapgit_factory=>get_environment( )->compare_with_inactive( ) = abap_true.
"Retrieve inactive version
li_persistence->get(
EXPORTING
p_object_key = lv_object_key
p_version = swbm_version_inactive
CHANGING
p_object_data = li_data_model ).
IF li_data_model->get_object_name( ) IS INITIAL.
"Fallback: retrieve active version
li_persistence->get(
EXPORTING
p_object_key = lv_object_key
p_version = swbm_version_active
CHANGING
p_object_data = li_data_model ).
ENDIF.
ELSE.
"Retrieve active version
li_persistence->get(
EXPORTING
p_object_key = lv_object_key
p_version = swbm_version_active
CHANGING
p_object_data = li_data_model ).
ENDIF.
li_data_model->get_data( IMPORTING p_data = <lg_data> ).
clear_fields( CHANGING cg_data = <lg_data> ).
ASSIGN COMPONENT 'CONTENT-SOURCE' OF STRUCTURE <lg_data> TO <lg_field>.
ASSERT sy-subrc = 0.
mo_files->add_string( iv_ext = 'asddlxs'
iv_string = <lg_field> ).
CLEAR <lg_field>.
io_xml->add( iv_name = 'DDLX'
ig_data = <lg_data> ).
CATCH cx_root INTO lx_error.
zcx_abapgit_exception=>raise( iv_text = lx_error->get_text( )
ix_previous = lx_error->previous ).
ENDTRY.
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
397,
499,
18300,
62,
15252,
62,
1860,
75,
87,
5550,
20032,
17941,
44731,
3268,
16879,
2043,
2751,
16034,
1976,
565,
62,
397,
499,
18300,
62,
48205,
62,
16668,
25261,
13,
628,
220,
44731,
44513,
13,
198,
220,
220,
220,
23255,
37,
2246,
1546,
1976,
361,
62,
397,
499,
18300,
62,
15252,
13,
198,
220,
220,
220,
8355,
43429,
1546,
6941,
62,
16624,
7473,
1976,
361,
62,
397,
499,
18300,
62,
15252,
93,
5908,
62,
16624,
13,
198,
220,
4810,
3824,
6158,
44513,
13,
198,
220,
220,
220,
42865,
21504,
62,
19276,
13274,
41876,
4526,
37,
5390,
611,
62,
39346,
62,
15252,
62,
19276,
396,
764,
198,
220,
220,
220,
337,
36252,
50,
651,
62,
19276,
13274,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
380,
62,
19276,
13274,
8,
41876,
4526,
37,
5390,
611,
62,
39346,
62,
15252,
62,
19276,
396,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
764,
198,
220,
220,
220,
337,
36252,
50,
1598,
62,
25747,
198,
220,
220,
220,
220,
220,
5870,
15567,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
66,
70,
62,
7890,
41876,
597,
764,
198,
220,
220,
220,
337,
36252,
50,
1598,
62,
3245,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
3245,
3672,
41876,
269,
43167,
198,
220,
220,
220,
220,
220,
5870,
15567,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
66,
70,
62,
38993,
220,
41876,
597,
764,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1976,
565,
62,
397,
499,
18300,
62,
15252,
62,
1860,
75,
87,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
1598,
62,
3245,
13,
628,
220,
220,
220,
18930,
24639,
12,
23060,
10744,
3535,
50,
25,
1279,
75,
70,
62,
3245,
29,
41876,
1366,
13,
628,
220,
220,
220,
24994,
16284,
24301,
1340,
3525,
21628,
62,
3245,
3672,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3963,
19269,
18415,
11335,
269,
70,
62,
38993,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5390,
1279,
75,
70,
62,
3245,
28401,
198,
220,
220,
220,
24994,
17395,
827,
12,
7266,
6015,
796,
657,
13,
628,
220,
220,
220,
30301,
1503,
25,
1279,
75,
70,
62,
3245,
28401,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
1598,
62,
25747,
13,
628,
220,
220,
220,
18930,
24639,
12,
23060,
10744,
3535,
50,
25,
1279,
75,
70,
62,
38993,
29,
41876,
597,
13,
628,
220,
220,
220,
24994,
16284,
24301,
1340,
3525,
705,
47123,
2885,
13563,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3963,
19269,
18415,
11335,
269,
70,
62,
7890,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5390,
1279,
75,
70,
62,
38993,
28401,
198,
220,
220,
220,
24994,
17395,
827,
12,
7266,
6015,
796,
657,
13,
628,
220,
220,
220,
1598,
62,
3245,
7,
7788,
15490,
2751,
21628,
62,
3245,
3672,
796,
705,
3398,
15567,
1961,
62,
1404,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5870,
15567,
2751,
220,
269,
70,
62,
38993,
220,
796,
1279,
75,
70,
62,
38993,
29,
6739,
628,
220,
220,
220,
1598,
62,
3245,
7,
7788,
15490,
2751,
21628,
62,
3245,
3672,
796,
705,
3398,
15567,
1961,
62,
17513,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5870,
15567,
2751,
220,
269,
70,
62,
38993,
220,
796,
1279,
75,
70,
62,
38993,
29,
6739,
628,
220,
220,
220,
1598,
62,
3245,
7,
7788,
15490,
2751,
21628,
62,
3245,
3672,
796,
705,
43387,
11617,
62,
1404,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5870,
15567,
2751,
220,
269,
70,
62,
38993,
220,
796,
1279,
75,
70,
62,
38993,
29,
6739,
628,
220,
220,
220,
1598,
62,
3245,
7,
7788,
15490,
2751,
21628,
62,
3245,
3672,
796,
705,
43387,
11617,
62,
17513,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5870,
15567,
2751,
220,
269,
70,
62,
38993,
220,
796,
1279,
75,
70,
62,
38993,
29,
6739,
628,
220,
220,
220,
1598,
62,
3245,
7,
7788,
15490,
2751,
21628,
62,
3245,
3672,
796,
705,
19535,
47,
19213,
34563,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5870,
15567,
2751,
220,
269,
70,
62,
38993,
220,
796,
1279,
75,
70,
62,
38993,
29,
6739,
628,
220,
220,
220,
1598,
62,
3245,
7,
7788,
15490,
2751,
21628,
62,
3245,
3672,
796,
705,
47,
8120,
11879,
62,
31688,
12,
20608,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5870,
15567,
2751,
220,
269,
70,
62,
38993,
220,
796,
1279,
75,
70,
62,
38993,
29,
6739,
628,
220,
220,
220,
1598,
62,
3245,
7,
7788,
15490,
2751,
21628,
62,
3245,
3672,
796,
705,
10943,
30339,
1137,
62,
31688,
12,
47,
8120,
11879,
62,
20608,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5870,
15567,
2751,
220,
269,
70,
62,
38993,
220,
796,
1279,
75,
70,
62,
38993,
29,
6739,
628,
220,
220,
220,
1598,
62,
3245,
7,
7788,
15490,
2751,
21628,
62,
3245,
3672,
796,
705,
43717,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5870,
15567,
2751,
220,
269,
70,
62,
38993,
220,
796,
1279,
75,
70,
62,
38993,
29,
6739,
628,
220,
220,
220,
1598,
62,
3245,
7,
7788,
15490,
2751,
21628,
62,
3245,
3672,
796,
705,
19535,
47,
19213,
34563,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5870,
15567,
2751,
220,
269,
70,
62,
38993,
220,
796,
1279,
75,
70,
62,
38993,
29,
6739
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
*----------------------------------------------------------------------*
* CLASS lcl_Test DEFINITION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS ltcl_test DEFINITION FOR TESTING
DURATION SHORT
RISK LEVEL HARMLESS
FINAL.
PRIVATE SECTION.
* ================
DATA: mt_code TYPE string_table,
ms_result TYPE scirest_ad,
mo_check TYPE REF TO zcl_aoc_check_23.
METHODS:
setup,
export_import FOR TESTING,
test001_01 FOR TESTING,
test001_02 FOR TESTING,
test001_03 FOR TESTING,
test002_01 FOR TESTING,
test002_02 FOR TESTING,
test003_01 FOR TESTING.
ENDCLASS. "lcl_Test
*----------------------------------------------------------------------*
* CLASS lcl_Test IMPLEMENTATION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS ltcl_test IMPLEMENTATION.
* ==============================
DEFINE _code.
APPEND &1 TO mt_code.
END-OF-DEFINITION.
METHOD setup.
CREATE OBJECT mo_check.
zcl_aoc_unit_test=>set_check( mo_check ).
ENDMETHOD. "setup
METHOD export_import.
zcl_aoc_unit_test=>export_import( mo_check ).
ENDMETHOD.
METHOD test001_01.
* ===========
_code 'IF: 1 = 2. '.
_code ' WRITE ''foo''.'.
_code 'ENDIF. '.
ms_result = zcl_aoc_unit_test=>check( mt_code ).
cl_abap_unit_assert=>assert_equals( exp = '001'
act = ms_result-code ).
ENDMETHOD. "test1
METHOD test001_02.
* ===========
_code 'DATA: lv_char TYPE c LENGTH 10.'.
ms_result = zcl_aoc_unit_test=>check( mt_code ).
cl_abap_unit_assert=>assert_initial( ms_result ).
ENDMETHOD. "test001_02
METHOD test001_03.
* ===========
_code 'CATCH: cx_root.'.
ms_result = zcl_aoc_unit_test=>check( mt_code ).
cl_abap_unit_assert=>assert_equals( exp = '001'
act = ms_result-code ).
ENDMETHOD. "test1
METHOD test002_01.
* ===========
_code 'DATA : lv_char TYPE c LENGTH 10.'.
ms_result = zcl_aoc_unit_test=>check( mt_code ).
cl_abap_unit_assert=>assert_equals( exp = '002'
act = ms_result-code ).
ENDMETHOD. "test002_01
METHOD test002_02.
* ===========
_code 'DATA:'.
_code ' lv_sel_rep_langu TYPE sylangu,'.
_code ' ls_t002 TYPE t002.'.
ms_result = zcl_aoc_unit_test=>check( mt_code ).
cl_abap_unit_assert=>assert_initial( ms_result ).
ENDMETHOD. "test002_02
METHOD test003_01.
* ===========
_code 'DATA:lv_char TYPE c LENGTH 10.'.
ms_result = zcl_aoc_unit_test=>check( mt_code ).
cl_abap_unit_assert=>assert_equals( exp = '003'
act = ms_result-code ).
ENDMETHOD. "test003_01
ENDCLASS. "lcl_Test
| [
9,
10097,
23031,
9,
198,
9,
220,
220,
220,
220,
220,
220,
42715,
300,
565,
62,
14402,
5550,
20032,
17941,
198,
9,
10097,
23031,
9,
198,
9,
198,
9,
10097,
23031,
9,
198,
31631,
300,
83,
565,
62,
9288,
5550,
20032,
17941,
7473,
43001,
2751,
198,
220,
360,
4261,
6234,
6006,
9863,
198,
220,
45698,
42,
49277,
43638,
5805,
7597,
198,
220,
25261,
13,
628,
220,
4810,
3824,
6158,
44513,
13,
198,
9,
796,
25609,
18604,
628,
220,
220,
220,
42865,
25,
45079,
62,
8189,
220,
220,
41876,
4731,
62,
11487,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
13845,
62,
20274,
41876,
629,
557,
301,
62,
324,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6941,
62,
9122,
220,
41876,
4526,
37,
5390,
1976,
565,
62,
64,
420,
62,
9122,
62,
1954,
13,
628,
220,
220,
220,
337,
36252,
50,
25,
198,
220,
220,
220,
220,
220,
9058,
11,
198,
220,
220,
220,
220,
220,
10784,
62,
11748,
7473,
43001,
2751,
11,
198,
220,
220,
220,
220,
220,
1332,
8298,
62,
486,
7473,
43001,
2751,
11,
198,
220,
220,
220,
220,
220,
1332,
8298,
62,
2999,
7473,
43001,
2751,
11,
198,
220,
220,
220,
220,
220,
1332,
8298,
62,
3070,
7473,
43001,
2751,
11,
198,
220,
220,
220,
220,
220,
1332,
21601,
62,
486,
7473,
43001,
2751,
11,
198,
220,
220,
220,
220,
220,
1332,
21601,
62,
2999,
7473,
43001,
2751,
11,
198,
220,
220,
220,
220,
220,
1332,
11245,
62,
486,
7473,
43001,
2751,
13,
198,
198,
10619,
31631,
13,
220,
220,
220,
220,
220,
220,
366,
75,
565,
62,
14402,
198,
198,
9,
10097,
23031,
9,
198,
9,
220,
220,
220,
220,
220,
220,
42715,
300,
565,
62,
14402,
30023,
2538,
10979,
6234,
198,
9,
10097,
23031,
9,
198,
9,
198,
9,
10097,
23031,
9,
198,
31631,
300,
83,
565,
62,
9288,
30023,
2538,
10979,
6234,
13,
198,
9,
36658,
25609,
28,
628,
220,
23449,
8881,
4808,
8189,
13,
198,
220,
220,
220,
43504,
10619,
1222,
16,
5390,
45079,
62,
8189,
13,
198,
220,
23578,
12,
19238,
12,
7206,
20032,
17941,
13,
628,
220,
337,
36252,
9058,
13,
198,
220,
220,
220,
29244,
6158,
25334,
23680,
6941,
62,
9122,
13,
198,
220,
220,
220,
1976,
565,
62,
64,
420,
62,
20850,
62,
9288,
14804,
2617,
62,
9122,
7,
6941,
62,
9122,
6739,
198,
220,
23578,
49273,
13,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
40406,
628,
220,
337,
36252,
10784,
62,
11748,
13,
198,
220,
220,
220,
1976,
565,
62,
64,
420,
62,
20850,
62,
9288,
14804,
39344,
62,
11748,
7,
6941,
62,
9122,
6739,
198,
220,
23578,
49273,
13,
628,
220,
337,
36252,
1332,
8298,
62,
486,
13,
198,
9,
796,
2559,
855,
628,
220,
220,
220,
4808,
8189,
705,
5064,
25,
352,
796,
362,
13,
220,
220,
220,
220,
220,
45302,
198,
220,
220,
220,
4808,
8189,
705,
220,
44423,
10148,
21943,
7061,
2637,
13,
198,
220,
220,
220,
4808,
8189,
705,
10619,
5064,
13,
220,
220,
220,
220,
220,
220,
220,
220,
220,
45302,
628,
220,
220,
220,
13845,
62,
20274,
796,
1976,
565,
62,
64,
420,
62,
20850,
62,
9288,
14804,
9122,
7,
45079,
62,
8189,
6739,
628,
220,
220,
220,
537,
62,
397,
499,
62,
20850,
62,
30493,
14804,
30493,
62,
4853,
874,
7,
1033,
796,
705,
8298,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
719,
796,
13845,
62,
20274,
12,
8189,
6739,
628,
220,
23578,
49273,
13,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
9288,
16,
628,
220,
337,
36252,
1332,
8298,
62,
2999,
13,
198,
9,
796,
2559,
855,
628,
220,
220,
220,
4808,
8189,
705,
26947,
25,
300,
85,
62,
10641,
41876,
269,
406,
49494,
838,
2637,
13,
628,
220,
220,
220,
13845,
62,
20274,
796,
1976,
565,
62,
64,
420,
62,
20850,
62,
9288,
14804,
9122,
7,
45079,
62,
8189,
6739,
628,
220,
220,
220,
537,
62,
397,
499,
62,
20850,
62,
30493,
14804,
30493,
62,
36733,
7,
13845,
62,
20274,
6739,
628,
220,
23578,
49273,
13,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
9288,
8298,
62,
2999,
628,
220,
337,
36252,
1332,
8298,
62,
3070,
13,
198,
9,
796,
2559,
855,
628,
220,
220,
220,
4808,
8189,
705,
34,
11417,
25,
43213,
62,
15763,
2637,
13,
628,
220,
220,
220,
13845,
62,
20274,
796,
1976,
565,
62,
64,
420,
62,
20850,
62,
9288,
14804,
9122,
7,
45079,
62,
8189,
6739,
628,
220,
220,
220,
537,
62,
397,
499,
62,
20850,
62,
30493,
14804,
30493,
62,
4853,
874,
7,
1033,
796,
705,
8298,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
719,
796,
13845,
62,
20274,
12,
8189,
6739,
628,
220,
23578,
49273,
13,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
9288,
16,
628,
220,
337,
36252,
1332,
21601,
62,
486,
13,
198,
9,
796,
2559,
855,
628,
220,
220,
220,
4808,
8189,
705,
26947,
1058,
300,
85,
62,
10641,
41876,
269,
406,
49494,
838,
2637,
13,
628,
220,
220,
220,
13845,
62,
20274,
796,
1976,
565,
62,
64,
420,
62,
20850,
62,
9288,
14804,
9122,
7,
45079,
62,
8189,
6739,
628,
220,
220,
220,
537,
62,
397,
499,
62,
20850,
62,
30493,
14804,
30493,
62,
4853,
874,
7,
1033,
796,
705,
21601,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
719,
796,
13845
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
"! <p class="shorttext synchronized" lang="en">String Builder for Formula Comments</p>
CLASS zcl_dbbr_fe_comment_stb DEFINITION
PUBLIC
FINAL
CREATE PUBLIC .
PUBLIC SECTION.
INTERFACES zif_dbbr_stmnt_string_builder .
PROTECTED SECTION.
PRIVATE SECTION.
ENDCLASS.
CLASS zcl_dbbr_fe_comment_stb IMPLEMENTATION.
METHOD zif_dbbr_stmnt_string_builder~build_string.
LOOP AT cs_statement-tokens ASSIGNING FIELD-SYMBOL(<ls_token>).
cs_statement-stringform = |{ cs_statement-stringform }{ <ls_token>-str }|.
IF sy-tabix <> lines( cs_statement-tokens ).
cs_statement-stringform = |{ cs_statement-stringform }{ cl_abap_char_utilities=>cr_lf }|.
ENDIF.
ENDLOOP.
ENDMETHOD.
ENDCLASS.
| [
40484,
1279,
79,
1398,
2625,
19509,
5239,
47192,
1,
42392,
2625,
268,
5320,
10100,
35869,
329,
19639,
19502,
3556,
79,
29,
198,
31631,
1976,
565,
62,
9945,
1671,
62,
5036,
62,
23893,
62,
301,
65,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
25261,
198,
220,
29244,
6158,
44731,
764,
628,
220,
44731,
44513,
13,
198,
220,
220,
220,
23255,
37,
2246,
1546,
1976,
361,
62,
9945,
1671,
62,
301,
76,
429,
62,
8841,
62,
38272,
764,
198,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
4810,
3824,
6158,
44513,
13,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1976,
565,
62,
9945,
1671,
62,
5036,
62,
23893,
62,
301,
65,
30023,
2538,
10979,
6234,
13,
198,
220,
337,
36252,
1976,
361,
62,
9945,
1671,
62,
301,
76,
429,
62,
8841,
62,
38272,
93,
11249,
62,
8841,
13,
198,
220,
220,
220,
17579,
3185,
5161,
50115,
62,
26090,
12,
83,
482,
641,
24994,
3528,
15871,
18930,
24639,
12,
23060,
10744,
3535,
7,
27,
7278,
62,
30001,
29,
737,
198,
220,
220,
220,
220,
220,
50115,
62,
26090,
12,
8841,
687,
796,
930,
90,
50115,
62,
26090,
12,
8841,
687,
1782,
90,
1279,
7278,
62,
30001,
29,
12,
2536,
1782,
91,
13,
198,
220,
220,
220,
220,
220,
16876,
827,
12,
8658,
844,
1279,
29,
3951,
7,
50115,
62,
26090,
12,
83,
482,
641,
6739,
198,
220,
220,
220,
220,
220,
220,
220,
50115,
62,
26090,
12,
8841,
687,
796,
930,
90,
50115,
62,
26090,
12,
8841,
687,
1782,
90,
537,
62,
397,
499,
62,
10641,
62,
315,
2410,
14804,
6098,
62,
1652,
1782,
91,
13,
198,
220,
220,
220,
220,
220,
23578,
5064,
13,
198,
220,
220,
220,
23578,
21982,
3185,
13,
198,
220,
23578,
49273,
13,
198,
198,
10619,
31631,
13,
198
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS zcl_aoc_check_14 DEFINITION
PUBLIC
INHERITING FROM zcl_aoc_super
CREATE PUBLIC .
PUBLIC SECTION.
METHODS constructor .
METHODS check
REDEFINITION .
METHODS get_attributes
REDEFINITION .
METHODS get_message_text
REDEFINITION .
METHODS put_attributes
REDEFINITION .
METHODS if_ci_test~query_attributes
REDEFINITION .
PROTECTED SECTION.
DATA mv_one_per_include TYPE sap_bool .
PRIVATE SECTION.
METHODS parse
IMPORTING
!it_commented TYPE string_table
!is_level TYPE slevel
!iv_line TYPE token_row
RETURNING
VALUE(rv_informed) TYPE abap_bool .
ENDCLASS.
CLASS ZCL_AOC_CHECK_14 IMPLEMENTATION.
METHOD check.
* abapOpenChecks
* https://github.com/larshp/abapOpenChecks
* MIT License
DATA: lt_code TYPE string_table,
lt_commented TYPE string_table,
lv_informed TYPE abap_bool,
lv_line TYPE token_row.
FIELD-SYMBOLS: <ls_level> LIKE LINE OF it_levels,
<lv_code> LIKE LINE OF lt_code.
LOOP AT it_levels ASSIGNING <ls_level> WHERE type = scan_level_type-program.
lt_code = get_source( <ls_level> ).
LOOP AT lt_code ASSIGNING <lv_code>.
IF strlen( <lv_code> ) > 1 AND <lv_code>(1) = '*'.
IF lines( lt_commented ) = 0.
lv_line = sy-tabix.
ENDIF.
APPEND <lv_code>+1 TO lt_commented.
ELSE.
lv_informed = parse( it_commented = lt_commented
is_level = <ls_level>
iv_line = lv_line ).
CLEAR lt_commented.
IF lv_informed = abap_true AND mv_one_per_include = abap_true.
EXIT. " current loop
ENDIF.
ENDIF.
ENDLOOP.
IF lv_informed = abap_true AND mv_one_per_include = abap_true.
CONTINUE.
ENDIF.
parse( it_commented = lt_commented
is_level = <ls_level>
iv_line = lv_line ).
CLEAR lt_commented.
ENDLOOP.
ENDMETHOD.
METHOD constructor.
super->constructor( ).
version = '001'.
position = '014'.
has_attributes = abap_true.
attributes_ok = abap_true.
mv_errty = c_error.
mv_one_per_include = abap_false.
ENDMETHOD. "CONSTRUCTOR
METHOD get_attributes.
EXPORT
mv_errty = mv_errty
mv_one_per_include = mv_one_per_include
TO DATA BUFFER p_attributes.
ENDMETHOD.
METHOD get_message_text.
CLEAR p_text.
CASE p_code.
WHEN '001'.
p_text = 'Commented code'. "#EC NOTEXT
WHEN OTHERS.
super->get_message_text( EXPORTING p_test = p_test
p_code = p_code
IMPORTING p_text = p_text ).
ENDCASE.
ENDMETHOD. "GET_MESSAGE_TEXT
METHOD if_ci_test~query_attributes.
zzaoc_top.
zzaoc_fill_att mv_errty 'Error Type' ''. "#EC NOTEXT
zzaoc_fill_att mv_one_per_include 'One finding per include' 'C'. "#EC NOTEXT
zzaoc_popup.
ENDMETHOD.
METHOD parse.
DATA: lv_code LIKE LINE OF it_commented.
FIELD-SYMBOLS: <lv_commented> LIKE LINE OF it_commented.
IF lines( it_commented ) = 0.
RETURN.
ENDIF.
* skip auto generated INCLUDEs in function group top include
IF ( is_level-name CP 'LY*TOP' OR is_level-name CP 'LZ*TOP' )
AND lines( it_commented ) = 1.
READ TABLE it_commented INDEX 1 INTO lv_code.
ASSERT sy-subrc = 0.
IF lv_code CS 'INCLUDE L'.
RETURN.
ENDIF.
ENDIF.
LOOP AT it_commented ASSIGNING <lv_commented>.
IF strlen( <lv_commented> ) > 1 AND <lv_commented>(2) = '"*'.
RETURN.
ENDIF.
IF strlen( <lv_commented> ) > 0 AND <lv_commented>(1) = '*'.
RETURN.
ENDIF.
IF strlen( <lv_commented> ) > 4 AND <lv_commented>(5) = '-----'.
RETURN.
ENDIF.
IF strlen( <lv_commented> ) > 4 AND <lv_commented>(5) = ' ===='.
RETURN.
ENDIF.
IF strlen( <lv_commented> ) > 4 AND <lv_commented>(5) = '*****'.
RETURN.
ENDIF.
IF lines( it_commented ) = 1 AND <lv_commented> CO '. '.
RETURN.
ENDIF.
ENDLOOP.
IF zcl_aoc_parser=>run( it_commented )-match = abap_true.
inform( p_sub_obj_type = c_type_include
p_sub_obj_name = is_level-name
p_line = iv_line
p_kind = mv_errty
p_test = myname
p_code = '001' ).
rv_informed = abap_true.
ENDIF.
ENDMETHOD.
METHOD put_attributes.
IMPORT
mv_errty = mv_errty
mv_one_per_include = mv_one_per_include
FROM DATA BUFFER p_attributes. "#EC CI_USE_WANTED
ASSERT sy-subrc = 0.
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
64,
420,
62,
9122,
62,
1415,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
3268,
16879,
2043,
2751,
16034,
1976,
565,
62,
64,
420,
62,
16668,
198,
220,
29244,
6158,
44731,
764,
628,
220,
44731,
44513,
13,
628,
220,
220,
220,
337,
36252,
50,
23772,
764,
628,
220,
220,
220,
337,
36252,
50,
2198,
198,
220,
220,
220,
220,
220,
220,
220,
23848,
36,
20032,
17941,
764,
198,
220,
220,
220,
337,
36252,
50,
651,
62,
1078,
7657,
198,
220,
220,
220,
220,
220,
220,
220,
23848,
36,
20032,
17941,
764,
198,
220,
220,
220,
337,
36252,
50,
651,
62,
20500,
62,
5239,
198,
220,
220,
220,
220,
220,
220,
220,
23848,
36,
20032,
17941,
764,
198,
220,
220,
220,
337,
36252,
50,
1234,
62,
1078,
7657,
198,
220,
220,
220,
220,
220,
220,
220,
23848,
36,
20032,
17941,
764,
198,
220,
220,
220,
337,
36252,
50,
611,
62,
979,
62,
9288,
93,
22766,
62,
1078,
7657,
198,
220,
220,
220,
220,
220,
220,
220,
23848,
36,
20032,
17941,
764,
198,
220,
48006,
9782,
1961,
44513,
13,
628,
220,
220,
220,
42865,
285,
85,
62,
505,
62,
525,
62,
17256,
41876,
31841,
62,
30388,
764,
198,
220,
4810,
3824,
6158,
44513,
13,
628,
220,
220,
220,
337,
36252,
50,
21136,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
270,
62,
785,
12061,
220,
220,
220,
220,
220,
41876,
4731,
62,
11487,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
271,
62,
5715,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
3133,
626,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
1370,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
11241,
62,
808,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
81,
85,
62,
35698,
8,
41876,
450,
499,
62,
30388,
764,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1168,
5097,
62,
32,
4503,
62,
50084,
62,
1415,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
2198,
13,
198,
198,
9,
450,
499,
11505,
7376,
4657,
198,
9,
3740,
1378,
12567,
13,
785,
14,
75,
5406,
79,
14,
397,
499,
11505,
7376,
4657,
198,
9,
17168,
13789,
628,
220,
220,
220,
42865,
25,
300,
83,
62,
8189,
220,
220,
220,
220,
220,
41876,
4731,
62,
11487,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
83,
62,
785,
12061,
41876,
4731,
62,
11487,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
35698,
220,
41876,
450,
499,
62,
30388,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
1370,
220,
220,
220,
220,
220,
41876,
11241,
62,
808,
13,
628,
220,
220,
220,
18930,
24639,
12,
23060,
10744,
3535,
50,
25,
1279,
7278,
62,
5715,
29,
34178,
48920,
3963,
340,
62,
46170,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1279,
6780,
62,
8189,
29,
220,
34178,
48920,
3963,
300,
83,
62,
8189,
13,
628,
198,
220,
220,
220,
17579,
3185,
5161,
340,
62,
46170,
24994,
3528,
15871,
1279,
7278,
62,
5715,
29,
33411,
2099,
796,
9367,
62,
5715,
62,
4906,
12,
23065,
13,
198,
220,
220,
220,
220,
220,
300,
83,
62,
8189,
796,
651,
62,
10459,
7,
1279,
7278,
62,
5715,
29,
6739,
628,
220,
220,
220,
220,
220,
17579,
3185,
5161,
300,
83,
62,
8189,
24994,
3528,
15871,
1279,
6780,
62,
8189,
28401,
628,
220,
220,
220,
220,
220,
220,
220,
16876,
965,
11925,
7,
1279,
6780,
62,
8189,
29,
1267,
1875,
352,
5357,
1279,
6780,
62,
8189,
33994,
16,
8,
796,
705,
9,
4458,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
16876,
3951,
7,
300,
83,
62,
785,
12061,
1267,
796,
657,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
1370,
796,
827,
12,
8658,
844,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
23578,
5064,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
43504,
10619,
1279,
6780,
62,
8189,
29,
10,
16,
5390,
300,
83,
62,
785,
12061,
13,
198,
220,
220,
220,
220,
220,
220,
220,
17852,
5188,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
35698,
796,
21136,
7,
340,
62,
785,
12061,
796,
300,
83,
62,
785,
12061,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
318,
62,
5715,
220,
220,
220,
220,
796,
1279,
7278,
62,
5715,
29,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
1370,
220,
220,
220,
220,
220,
796,
300,
85,
62,
1370,
6739,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
30301,
1503,
300,
83,
62,
785,
12061,
13,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
16876,
300,
85,
62,
35698,
796,
450,
499,
62,
7942,
5357,
285,
85,
62,
505,
62,
525,
62,
17256,
796,
450,
499,
62,
7942,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7788,
2043,
13,
366,
1459,
9052,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
23578,
5064,
13,
198,
220,
220,
220,
220,
220,
220,
220,
23578,
5064,
13,
628,
220,
220,
220,
220,
220,
23578,
21982,
3185,
13,
628,
220,
220,
220,
220,
220,
16876,
300,
85,
62,
35698,
796,
450,
499,
62,
7942,
5357,
285,
85,
62,
505,
62,
525,
62,
17256,
796,
450,
499,
62,
7942,
13,
198,
220,
220,
220,
220,
220,
220,
220,
43659,
8924,
13,
198,
220,
220,
220,
220,
220,
23578,
5064,
13,
628,
220,
220,
220,
220,
220,
21136,
7,
340,
62,
785,
12061,
796,
300,
83,
62,
785,
12061,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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CE(ET_MERGE_REQUESTS) TYPE ZAOR_MERGE_REQ_URL_TT
*" RAISING
*" CX_STATIC_CHECK
*"----------------------------------------------------------------------
DATA: lt_pull_requests TYPE zcl_abapgit_review=>tt_pull_urls.
NEW zcl_abapgit_review( )->find_pull_request_urls(
EXPORTING
iv_trkorr = iv_trkorr
IMPORTING
et_pull_requests = lt_pull_requests ).
MOVE-CORRESPONDING lt_pull_requests TO et_merge_requests.
ENDFUNCTION.
| [
42296,
4177,
2849,
1168,
4760,
62,
2200,
28206,
62,
15675,
62,
29296,
8264,
62,
2200,
10917,
1546,
4694,
13,
198,
9,
1,
10097,
23031,
198,
9,
1,
9,
1,
14565,
26491,
25,
198,
9,
1,
220,
30023,
9863,
2751,
198,
9,
1,
220,
220,
220,
220,
4526,
24302,
18310,
7,
3824,
62,
5446,
42,
1581,
49,
8,
41876,
220,
7579,
42,
1581,
49,
198,
9,
1,
220,
7788,
15490,
2751,
198,
9,
1,
220,
220,
220,
220,
4526,
24302,
18310,
7,
2767,
62,
29296,
8264,
62,
2200,
10917,
1546,
4694,
8,
41876,
220,
1168,
32,
1581,
62,
29296,
8264,
62,
2200,
48,
62,
21886,
62,
15751,
198,
9,
1,
220,
17926,
1797,
2751,
198,
9,
1,
220,
220,
220,
220,
220,
327,
55,
62,
35744,
2149,
62,
50084,
198,
9,
1,
10097,
23031,
198,
220,
42865,
25,
300,
83,
62,
31216,
62,
8897,
3558,
41876,
1976,
565,
62,
397,
499,
18300,
62,
19023,
14804,
926,
62,
31216,
62,
6371,
82,
13,
628,
220,
12682,
1976,
565,
62,
397,
499,
18300,
62,
19023,
7,
1267,
3784,
19796,
62,
31216,
62,
25927,
62,
6371,
82,
7,
198,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
21628,
62,
2213,
74,
38890,
796,
21628,
62,
2213,
74,
38890,
198,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
2123,
62,
31216,
62,
8897,
3558,
796,
300,
83,
62,
31216,
62,
8897,
3558,
6739,
198,
220,
13070,
6089,
12,
44879,
19535,
47,
18672,
2751,
300,
83,
62,
31216,
62,
8897,
3558,
5390,
2123,
62,
647,
469,
62,
8897,
3558,
13,
198,
198,
1677,
8068,
4944,
4177,
2849,
13,
198
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS zcl_abapgit_objects_saxx_super DEFINITION
PUBLIC
INHERITING FROM zcl_abapgit_objects_super
ABSTRACT
CREATE PUBLIC .
* common class for SAPC and SAMC objects
PUBLIC SECTION.
INTERFACES zif_abapgit_object .
PROTECTED SECTION.
METHODS get_persistence_class_name
ABSTRACT
RETURNING
VALUE(rv_persistence_class_name) TYPE seoclsname .
METHODS get_data_class_name
ABSTRACT
RETURNING
VALUE(rv_data_class_name) TYPE seoclsname .
METHODS get_data_structure_name
ABSTRACT
RETURNING
VALUE(rv_data_structure_name) TYPE string .
PRIVATE SECTION.
DATA mo_persistence TYPE REF TO if_wb_object_persist .
DATA mo_appl_obj_data TYPE REF TO if_wb_object_data_model .
DATA mv_data_structure_name TYPE string .
DATA mv_appl_obj_cls_name TYPE seoclsname .
DATA mv_persistence_cls_name TYPE seoclsname .
METHODS create_channel_objects
RAISING
zcx_abapgit_exception .
METHODS get_data
EXPORTING
!eg_data TYPE any
RAISING
zcx_abapgit_exception .
METHODS lock
RAISING
zcx_abapgit_exception .
METHODS unlock
RAISING
zcx_abapgit_exception .
METHODS get_names .
ENDCLASS.
CLASS ZCL_ABAPGIT_OBJECTS_SAXX_SUPER IMPLEMENTATION.
METHOD create_channel_objects.
get_names( ).
TRY.
IF mo_appl_obj_data IS NOT BOUND.
CREATE OBJECT mo_appl_obj_data TYPE (mv_appl_obj_cls_name).
ENDIF.
IF mo_persistence IS NOT BOUND.
CREATE OBJECT mo_persistence TYPE (mv_persistence_cls_name).
ENDIF.
CATCH cx_root.
zcx_abapgit_exception=>raise( |{ ms_item-obj_type } not supported| ).
ENDTRY.
ENDMETHOD.
METHOD get_data.
DATA: lv_object_key TYPE seu_objkey.
lv_object_key = ms_item-obj_name.
TRY.
mo_persistence->get(
EXPORTING
p_object_key = lv_object_key
p_version = 'A'
CHANGING
p_object_data = mo_appl_obj_data ).
CATCH cx_root.
zcx_abapgit_exception=>raise( |{ ms_item-obj_type } not supported| ).
ENDTRY.
mo_appl_obj_data->get_data( IMPORTING p_data = eg_data ).
ENDMETHOD.
METHOD get_names.
IF mv_data_structure_name IS INITIAL.
mv_data_structure_name = get_data_structure_name( ).
ENDIF.
IF mv_appl_obj_cls_name IS INITIAL.
mv_appl_obj_cls_name = get_data_class_name( ).
ENDIF.
IF mv_persistence_cls_name IS INITIAL.
mv_persistence_cls_name = get_persistence_class_name( ).
ENDIF.
ENDMETHOD.
METHOD lock.
DATA: lv_objname TYPE trobj_name,
lv_object_key TYPE seu_objkey,
lv_objtype TYPE trobjtype.
lv_objname = ms_item-obj_name.
lv_object_key = ms_item-obj_name.
lv_objtype = ms_item-obj_type.
mo_persistence->lock(
EXPORTING
p_objname_tr = lv_objname
p_object_key = lv_object_key
p_objtype_tr = lv_objtype
EXCEPTIONS
foreign_lock = 1
error_occurred = 2
OTHERS = 3 ).
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( |Error occured while locking { ms_item-obj_type } | && lv_objname ).
ENDIF.
ENDMETHOD.
METHOD unlock.
DATA: lv_objname TYPE trobj_name,
lv_object_key TYPE seu_objkey,
lv_objtype TYPE trobjtype.
lv_objname = ms_item-obj_name.
lv_object_key = ms_item-obj_name.
lv_objtype = ms_item-obj_type.
mo_persistence->unlock( p_objname_tr = lv_objname
p_object_key = lv_object_key
p_objtype_tr = lv_objtype ).
ENDMETHOD.
METHOD zif_abapgit_object~changed_by.
DATA: lr_data TYPE REF TO data.
FIELD-SYMBOLS: <lg_data> TYPE any,
<lg_header> TYPE any,
<lg_changed_by> TYPE any.
create_channel_objects( ).
TRY.
CREATE DATA lr_data TYPE (mv_data_structure_name).
ASSIGN lr_data->* TO <lg_data>.
CATCH cx_root.
zcx_abapgit_exception=>raise( |{ ms_item-obj_name } not supported| ).
ENDTRY.
get_data( IMPORTING eg_data = <lg_data> ).
ASSIGN COMPONENT 'HEADER' OF STRUCTURE <lg_data> TO <lg_header>.
ASSERT sy-subrc = 0.
ASSIGN COMPONENT 'CHANGED_BY' OF STRUCTURE <lg_header> TO <lg_changed_by>.
ASSERT sy-subrc = 0.
IF <lg_changed_by> IS NOT INITIAL.
rv_user = <lg_changed_by>.
ELSE.
rv_user = c_user_unknown.
ENDIF.
ENDMETHOD.
METHOD zif_abapgit_object~delete.
DATA: lv_object_key TYPE seu_objkey.
create_channel_objects( ).
lv_object_key = ms_item-obj_name.
TRY.
lock( ).
mo_persistence->delete( lv_object_key ).
unlock( ).
CATCH cx_swb_exception.
zcx_abapgit_exception=>raise( |Error occured while deleting { ms_item-obj_type }| ).
ENDTRY.
ENDMETHOD.
METHOD zif_abapgit_object~deserialize.
DATA: lr_data TYPE REF TO data.
FIELD-SYMBOLS: <lg_data> TYPE any.
create_channel_objects( ).
TRY.
CREATE DATA lr_data TYPE (mv_data_structure_name).
ASSIGN lr_data->* TO <lg_data>.
CATCH cx_root.
zcx_abapgit_exception=>raise( |{ ms_item-obj_type } not supported| ).
ENDTRY.
io_xml->read(
EXPORTING
iv_name = ms_item-obj_type
CHANGING
cg_data = <lg_data> ).
IF zif_abapgit_object~exists( ) = abap_true.
zif_abapgit_object~delete( iv_package ).
ENDIF.
TRY.
lock( ).
CALL FUNCTION 'RS_CORR_INSERT'
EXPORTING
object = ms_item-obj_name
object_class = ms_item-obj_type
mode = 'I'
global_lock = abap_true
devclass = iv_package
master_language = mv_language
suppress_dialog = abap_true
EXCEPTIONS
cancelled = 1
permission_failure = 2
unknown_objectclass = 3
OTHERS = 4.
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( |Error occured while creating { ms_item-obj_type }| ).
ENDIF.
mo_appl_obj_data->set_data( <lg_data> ).
mo_persistence->save( mo_appl_obj_data ).
unlock( ).
CATCH cx_swb_exception.
zcx_abapgit_exception=>raise( |Error occured while creating { ms_item-obj_type }| ).
ENDTRY.
ENDMETHOD.
METHOD zif_abapgit_object~exists.
DATA: lv_object_key TYPE seu_objkey.
create_channel_objects( ).
lv_object_key = ms_item-obj_name.
TRY.
mo_persistence->get( p_object_key = lv_object_key
p_version = 'A'
p_existence_check_only = abap_true ).
CATCH cx_swb_object_does_not_exist cx_swb_exception.
rv_bool = abap_false.
RETURN.
ENDTRY.
rv_bool = abap_true.
ENDMETHOD.
METHOD zif_abapgit_object~get_comparator.
RETURN.
ENDMETHOD.
METHOD zif_abapgit_object~get_deserialize_steps.
DATA: ls_meta TYPE zif_abapgit_definitions=>ty_metadata.
ls_meta = zif_abapgit_object~get_metadata( ).
IF ls_meta-late_deser = abap_true.
APPEND zif_abapgit_object=>gc_step_id-late TO rt_steps.
ELSEIF ls_meta-ddic = abap_true.
APPEND zif_abapgit_object=>gc_step_id-ddic TO rt_steps.
ELSE.
APPEND zif_abapgit_object=>gc_step_id-abap TO rt_steps.
ENDIF.
ENDMETHOD.
METHOD zif_abapgit_object~get_metadata.
rs_metadata = get_metadata( ).
rs_metadata-delete_tadir = abap_true.
ENDMETHOD.
METHOD zif_abapgit_object~is_active.
rv_active = is_active( ).
ENDMETHOD.
METHOD zif_abapgit_object~is_locked.
rv_is_locked = abap_false.
ENDMETHOD.
METHOD zif_abapgit_object~jump.
CALL FUNCTION 'RS_TOOL_ACCESS'
EXPORTING
operation = 'SHOW'
object_name = ms_item-obj_name
object_type = ms_item-obj_type.
ENDMETHOD.
METHOD zif_abapgit_object~serialize.
DATA: lr_data TYPE REF TO data.
FIELD-SYMBOLS: <lg_data> TYPE any,
<lg_header> TYPE any,
<lg_field> TYPE any.
create_channel_objects( ).
TRY.
CREATE DATA lr_data TYPE (mv_data_structure_name).
ASSIGN lr_data->* TO <lg_data>.
CATCH cx_root.
zcx_abapgit_exception=>raise( |{ ms_item-obj_type } not supported| ).
ENDTRY.
get_data( IMPORTING eg_data = <lg_data> ).
ASSIGN COMPONENT 'HEADER' OF STRUCTURE <lg_data> TO <lg_header>.
ASSERT sy-subrc = 0.
ASSIGN COMPONENT 'CHANGED_ON' OF STRUCTURE <lg_header> TO <lg_field>.
ASSERT sy-subrc = 0.
CLEAR <lg_field>.
ASSIGN COMPONENT 'CHANGED_BY' OF STRUCTURE <lg_header> TO <lg_field>.
ASSERT sy-subrc = 0.
CLEAR <lg_field>.
ASSIGN COMPONENT 'CHANGED_AT' OF STRUCTURE <lg_header> TO <lg_field>.
ASSERT sy-subrc = 0.
CLEAR <lg_field>.
ASSIGN COMPONENT 'CHANGED_CLNT' OF STRUCTURE <lg_header> TO <lg_field>.
ASSERT sy-subrc = 0.
CLEAR <lg_field>.
ASSIGN COMPONENT 'CREATED_ON' OF STRUCTURE <lg_header> TO <lg_field>.
ASSERT sy-subrc = 0.
CLEAR <lg_field>.
ASSIGN COMPONENT 'CREATED_BY' OF STRUCTURE <lg_header> TO <lg_field>.
ASSERT sy-subrc = 0.
CLEAR <lg_field>.
ASSIGN COMPONENT 'CREATED_AT' OF STRUCTURE <lg_header> TO <lg_field>.
ASSERT sy-subrc = 0.
CLEAR <lg_field>.
ASSIGN COMPONENT 'CREATED_CLNT' OF STRUCTURE <lg_header> TO <lg_field>.
ASSERT sy-subrc = 0.
CLEAR <lg_field>.
io_xml->add( iv_name = ms_item-obj_type
ig_data = <lg_data> ).
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
397,
499,
18300,
62,
48205,
62,
82,
897,
87,
62,
16668,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
3268,
16879,
2043,
2751,
16034,
1976,
565,
62,
397,
499,
18300,
62,
48205,
62,
16668,
198,
220,
9564,
18601,
10659,
198,
220,
29244,
6158,
44731,
764,
198,
198,
9,
2219,
1398,
329,
48323,
34,
290,
28844,
34,
5563,
198,
220,
44731,
44513,
13,
628,
220,
220,
220,
23255,
37,
2246,
1546,
1976,
361,
62,
397,
499,
18300,
62,
15252,
764,
198,
220,
48006,
9782,
1961,
44513,
13,
628,
220,
220,
220,
337,
36252,
50,
651,
62,
19276,
13274,
62,
4871,
62,
3672,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
9564,
18601,
10659,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
81,
85,
62,
19276,
13274,
62,
4871,
62,
3672,
8,
41876,
384,
420,
7278,
3672,
764,
198,
220,
220,
220,
337,
36252,
50,
651,
62,
7890,
62,
4871,
62,
3672,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
9564,
18601,
10659,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
81,
85,
62,
7890,
62,
4871,
62,
3672,
8,
41876,
384,
420,
7278,
3672,
764,
198,
220,
220,
220,
337,
36252,
50,
651,
62,
7890,
62,
301,
5620,
62,
3672,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
9564,
18601,
10659,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
81,
85,
62,
7890,
62,
301,
5620,
62,
3672,
8,
41876,
4731,
764,
198,
220,
4810,
3824,
6158,
44513,
13,
628,
220,
220,
220,
42865,
6941,
62,
19276,
13274,
41876,
4526,
37,
5390,
611,
62,
39346,
62,
15252,
62,
19276,
396,
764,
198,
220,
220,
220,
42865,
6941,
62,
1324,
75,
62,
26801,
62,
7890,
41876,
4526,
37,
5390,
611,
62,
39346,
62,
15252,
62,
7890,
62,
19849,
764,
198,
220,
220,
220,
42865,
285,
85,
62,
7890,
62,
301,
5620,
62,
3672,
41876,
4731,
764,
198,
220,
220,
220,
42865,
285,
85,
62,
1324,
75,
62,
26801,
62,
565,
82,
62,
3672,
41876,
384,
420,
7278,
3672,
764,
198,
220,
220,
220,
42865,
285,
85,
62,
19276,
13274,
62,
565,
82,
62,
3672,
41876,
384,
420,
7278,
3672,
764,
628,
220,
220,
220,
337,
36252,
50,
2251,
62,
17620,
62,
48205,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
764,
198,
220,
220,
220,
337,
36252,
50,
651,
62,
7890,
198,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
1533,
62,
7890,
41876,
597,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
764,
198,
220,
220,
220,
337,
36252,
50,
5793,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
764,
198,
220,
220,
220,
337,
36252,
50,
12116,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
764,
198,
220,
220,
220,
337,
36252,
50,
651,
62,
14933,
764,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1168,
5097,
62,
6242,
2969,
38,
2043,
62,
9864,
41,
2943,
4694,
62,
4090,
8051,
62,
40331,
1137,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
2251,
62,
17620,
62,
48205,
13,
628,
220,
220,
220,
651,
62,
14933,
7,
6739,
628,
220,
220,
220,
7579,
56,
13,
198,
220,
220,
220,
220,
220,
220,
220,
16876,
6941,
62,
1324,
75,
62,
26801,
62,
7890,
3180,
5626,
347,
15919,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
29244,
6158,
25334,
23680,
6941,
62,
1324,
75,
62,
26801,
62,
7890,
41876,
357,
76,
85,
62,
1324,
75,
62,
26801,
62,
565,
82,
62,
3672,
737,
198,
220,
220,
220,
220,
220,
220,
220,
23578,
5064,
13,
628,
220,
220,
220,
220,
220,
220,
220,
16876,
6941,
62,
19276,
13274,
3180,
5626,
347,
15919,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
29244,
6158,
25334,
23680,
6941,
62,
19276,
13274,
41876,
357,
76,
85,
62,
19276,
13274,
62,
565,
82,
62,
3672,
737,
198,
220,
220,
220,
220,
220,
220,
220,
23578,
5064,
13,
628,
220,
220,
220,
220,
220,
327,
11417,
43213,
62,
15763,
13,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
14804,
40225,
7,
930,
90,
13845,
62,
9186,
12,
26801,
62,
4906,
1782,
407,
4855,
91,
6739,
198,
220,
220,
220,
23578,
40405,
13,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
651,
62,
7890,
13,
628,
220,
220,
220,
42865,
25,
300,
85,
62,
15252,
62,
2539,
41876,
384,
84,
62,
26801,
2539,
13,
628,
220,
220,
220,
300,
85,
62,
15252,
62,
2539,
796,
13845,
62,
9186,
12,
26801,
62,
3672,
13,
628,
220,
220,
220,
7579,
56,
13,
198,
220,
220,
220,
220,
220,
220,
220,
6941,
62,
19276,
13274,
3784,
1136,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
279,
62,
15252,
62,
2539,
220,
796,
300,
85,
62,
15252,
62,
2539,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
279,
62,
9641,
220,
220,
220,
220,
796,
705,
32,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5870,
15567,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
279,
62,
15252,
62,
7890,
796,
6941,
62,
1324,
75,
62,
26801,
62,
7890,
6739,
628,
220,
220,
220,
220,
220,
327,
11417,
43213,
62,
15763,
13,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
"! Application log logger
"! <p>
"! Logger that uses BC-SRV-BAL for logging (transaction SLG1, SLG0, ...).
"! </p>
CLASS zcl_alog_bal_logger DEFINITION
PUBLIC
INHERITING FROM zcl_alog_msg_logger_base
CREATE PUBLIC.
PUBLIC SECTION.
METHODS:
"! @parameter iv_object | BAL object
"! @parameter iv_subobject | BAL suboject
"! @parameter iv_ext_id | External id for the logs
"! @raising zcx_alog_illegal_argument | Object or subobject do not exist
constructor IMPORTING iv_object TYPE balobj_d OPTIONAL
iv_subobject TYPE balsubobj OPTIONAL
iv_ext_id TYPE balnrext OPTIONAL
RAISING zcx_alog_illegal_argument,
exception REDEFINITION,
"! Save log to db
"! <p>
"! Only possible if object / subobject were specified correctly in the constructor.
"! </p>
"! @parameter iv_in_update_task | Use update task for saving
"! @parameter iv_in_secondary_conn | Use secondary database connection
"! @raising zcx_alog_bal_error | BAL error
save IMPORTING iv_in_update_task TYPE abap_bool DEFAULT abap_false
iv_in_secondary_conn TYPE abap_bool DEFAULT abap_true
RAISING zcx_alog_bal_error,
"! Show log entries
"! @parameter is_profile | Display profile
"! @parameter iv_amodal | Amodal dialog
"! @raising zcx_alog_bal_error | BAL error
show_log_entries IMPORTING is_profile TYPE bal_s_prof OPTIONAL
iv_amodal TYPE abap_bool OPTIONAL
RAISING zcx_alog_bal_error,
"! Get docking container instance
"! @parameter ro_container | Docking container
"! @raising zcx_alog_bal_error | BAL error
get_docking_container RETURNING VALUE(ro_container) TYPE REF TO cl_gui_docking_container
RAISING zcx_alog_bal_error,
"! Prepare context for the next entry
"! @parameter is_context | Context
prepare_context IMPORTING is_context TYPE bal_s_cont,
"! Get the log handle of this logger instance
"! @parameter rv_handle | Log handle
get_log_handle RETURNING VALUE(rv_handle) TYPE balloghndl.
PROTECTED SECTION.
METHODS:
entry_internal REDEFINITION,
entry_msg_internal REDEFINITION.
PRIVATE SECTION.
DATA:
mv_log_handle TYPE balloghndl,
ms_context TYPE bal_s_cont.
ENDCLASS.
CLASS zcl_alog_bal_logger IMPLEMENTATION.
METHOD constructor.
super->constructor( ).
DATA(ls_log) = VALUE bal_s_log(
extnumber = iv_ext_id
object = iv_object
subobject = iv_subobject
).
CALL FUNCTION 'BAL_LOG_CREATE'
EXPORTING
i_s_log = ls_log
IMPORTING
e_log_handle = mv_log_handle
EXCEPTIONS
log_header_inconsistent = 1
OTHERS = 2.
IF sy-subrc <> 0.
DATA(lx_ex) = NEW zcx_alog_bal_error( ).
RAISE EXCEPTION TYPE zcx_alog_illegal_argument
EXPORTING
ix_previous = lx_ex
iv_reason = lx_ex->get_text( ).
ENDIF.
ENDMETHOD.
METHOD entry_internal.
CALL FUNCTION 'BAL_LOG_MSG_ADD_FREE_TEXT'
EXPORTING
i_log_handle = mv_log_handle
i_msgty = io_type->mv_message_type
i_probclass = io_type->mv_bal_probclass
i_text = CONV char200( iv_text )
i_s_context = ms_context
EXCEPTIONS
log_not_found = 1
msg_inconsistent = 2
log_is_full = 3
OTHERS = 4.
IF sy-subrc <> 0.
DATA(lx_bal) = NEW zcx_alog_bal_error( ).
CLEAR ms_context.
RAISE EXCEPTION TYPE zcx_alog_logging_failed
EXPORTING
ix_previous = lx_bal
iv_reason = lx_bal->get_text( ).
ENDIF.
CLEAR ms_context.
ENDMETHOD.
METHOD entry_msg_internal.
DATA(ls_msg) = VALUE bal_s_msg(
msgty = iv_msgty
msgid = iv_msgid
msgno = iv_msgno
msgv1 = iv_msgv1
msgv2 = iv_msgv2
msgv3 = iv_msgv3
msgv4 = iv_msgv4
context = ms_context
probclass = zcl_alog_entry_type=>from_msgty( iv_msgty )->mv_bal_probclass
).
CLEAR ms_context.
CALL FUNCTION 'BAL_LOG_MSG_ADD'
EXPORTING
i_log_handle = mv_log_handle
i_s_msg = ls_msg
EXCEPTIONS
log_not_found = 1
msg_inconsistent = 2
log_is_full = 3
OTHERS = 4.
IF sy-subrc <> 0.
DATA(lx_bal) = NEW zcx_alog_bal_error( ).
RAISE EXCEPTION TYPE zcx_alog_logging_failed
EXPORTING
ix_previous = lx_bal
iv_reason = lx_bal->get_text( ).
ENDIF.
ENDMETHOD.
METHOD get_docking_container.
ro_container = NEW cl_gui_docking_container( side = cl_gui_docking_container=>dock_at_bottom ).
CALL FUNCTION 'BAL_CNTL_CREATE'
EXPORTING
i_container = ro_container
i_t_log_handle = VALUE bal_t_logh( ( mv_log_handle ) )
EXCEPTIONS
profile_inconsistent = 1
internal_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
RAISE EXCEPTION TYPE zcx_alog_bal_error.
ENDIF.
ENDMETHOD.
METHOD get_log_handle.
rv_handle = mv_log_handle.
ENDMETHOD.
METHOD prepare_context.
ms_context = is_context.
ENDMETHOD.
METHOD save.
CALL FUNCTION 'BAL_DB_SAVE'
EXPORTING
i_in_update_task = iv_in_update_task
i_t_log_handle = VALUE bal_t_logh( ( mv_log_handle ) )
i_2th_connection = iv_in_secondary_conn
EXCEPTIONS
log_not_found = 1
save_not_allowed = 2
numbering_error = 3
OTHERS = 4.
IF sy-subrc <> 0.
RAISE EXCEPTION TYPE zcx_alog_bal_error.
ENDIF.
ENDMETHOD.
METHOD show_log_entries.
DATA: ls_profile TYPE bal_s_prof.
IF sy-batch IS NOT INITIAL.
RETURN.
ENDIF.
IF is_profile IS INITIAL.
CALL FUNCTION 'BAL_DSP_PROFILE_SINGLE_LOG_GET'
IMPORTING
e_s_display_profile = ls_profile.
ELSE.
ls_profile = is_profile.
ENDIF.
CALL FUNCTION 'BAL_DSP_LOG_DISPLAY'
EXPORTING
i_s_display_profile = ls_profile
i_t_log_handle = VALUE bal_t_logh( ( mv_log_handle ) )
i_amodal = iv_amodal
EXCEPTIONS
profile_inconsistent = 1
internal_error = 2
no_data_available = 3
no_authority = 4
OTHERS = 5.
IF sy-subrc <> 0.
RAISE EXCEPTION TYPE zcx_alog_bal_error.
ENDIF.
ENDMETHOD.
METHOD exception.
inform_attached_loggers( iv_text = ix_ex->get_text( ) io_type = zcl_alog_entry_type=>go_error ).
CALL FUNCTION 'BAL_LOG_EXC_ADD'
EXPORTING
i_log_handle = mv_log_handle
i_msgty = zcl_alog_entry_type=>go_error->mv_message_type
i_probclass = zcl_alog_entry_type=>go_error->mv_bal_probclass
i_exception = ix_ex
EXCEPTIONS
log_not_found = 1
msg_inconsistent = 2
log_is_full = 3
OTHERS = 4.
IF sy-subrc <> 0.
DATA(lx_bal) = NEW zcx_alog_bal_error( ).
RAISE EXCEPTION TYPE zcx_alog_logging_failed
EXPORTING
ix_previous = lx_bal
iv_reason = lx_bal->get_text( ).
ENDIF.
ENDMETHOD.
ENDCLASS.
| [
40484,
15678,
2604,
49706,
198,
40484,
1279,
79,
29,
198,
40484,
5972,
1362,
326,
3544,
11843,
12,
12562,
53,
12,
33,
1847,
329,
18931,
357,
7645,
2673,
12419,
38,
16,
11,
12419,
38,
15,
11,
2644,
737,
198,
40484,
7359,
79,
29,
198,
31631,
1976,
565,
62,
11794,
62,
6893,
62,
6404,
1362,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
3268,
16879,
2043,
2751,
16034,
1976,
565,
62,
11794,
62,
19662,
62,
6404,
1362,
62,
8692,
198,
220,
29244,
6158,
44731,
13,
628,
220,
44731,
44513,
13,
198,
220,
220,
220,
337,
36252,
50,
25,
198,
220,
220,
220,
220,
220,
366,
0,
2488,
17143,
2357,
21628,
62,
15252,
930,
48091,
2134,
198,
220,
220,
220,
220,
220,
366,
0,
2488,
17143,
2357,
21628,
62,
7266,
15252,
930,
48091,
850,
78,
752,
198,
220,
220,
220,
220,
220,
366,
0,
2488,
17143,
2357,
21628,
62,
2302,
62,
312,
930,
34579,
4686,
329,
262,
17259,
198,
220,
220,
220,
220,
220,
366,
0,
2488,
32741,
1976,
66,
87,
62,
11794,
62,
47749,
62,
49140,
930,
9515,
393,
850,
15252,
466,
407,
2152,
198,
220,
220,
220,
220,
220,
23772,
30023,
9863,
2751,
21628,
62,
15252,
220,
220,
220,
41876,
3652,
26801,
62,
67,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
7266,
15252,
41876,
275,
874,
549,
26801,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
2302,
62,
312,
220,
220,
220,
41876,
3652,
77,
260,
742,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
17926,
1797,
2751,
220,
220,
1976,
66,
87,
62,
11794,
62,
47749,
62,
49140,
11,
198,
220,
220,
220,
220,
220,
6631,
23848,
36,
20032,
17941,
11,
198,
220,
220,
220,
220,
220,
366,
0,
12793,
2604,
284,
20613,
198,
220,
220,
220,
220,
220,
366,
0,
1279,
79,
29,
198,
220,
220,
220,
220,
220,
366,
0,
5514,
1744,
611,
2134,
1220,
850,
15252,
547,
7368,
9380,
287,
262,
23772,
13,
198,
220,
220,
220,
220,
220,
366,
0,
7359,
79,
29,
198,
220,
220,
220,
220,
220,
366,
0,
2488,
17143,
2357,
21628,
62,
259,
62,
19119,
62,
35943,
930,
5765,
4296,
4876,
329,
8914,
198,
220,
220,
220,
220,
220,
366,
0,
2488,
17143,
2357,
21628,
62,
259,
62,
38238,
62,
37043,
930,
5765,
9233,
6831,
4637,
198,
220,
220,
220,
220,
220,
366,
0,
2488,
32741,
1976,
66,
87,
62,
11794,
62,
6893,
62,
18224,
930,
48091,
4049,
198,
220,
220,
220,
220,
220,
3613,
30023,
9863,
2751,
21628,
62,
259,
62,
19119,
62,
35943,
220,
220,
220,
41876,
450,
499,
62,
30388,
5550,
38865,
450,
499,
62,
9562,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
259,
62,
38238,
62,
37043,
41876,
450,
499,
62,
30388,
5550,
38865,
450,
499,
62,
7942,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
17926,
1797,
2751,
220,
220,
1976,
66,
87,
62,
11794,
62,
6893,
62,
18224,
11,
198,
220,
220,
220,
220,
220,
366,
0,
5438,
2604,
12784,
198,
220,
220,
220,
220,
220,
366,
0,
2488,
17143,
2357,
318,
62,
13317,
930,
16531,
7034,
198,
220,
220,
220,
220,
220,
366,
0,
2488,
17143,
2357,
21628,
62,
321,
375,
282,
930,
1703,
375,
282,
17310,
198,
220,
220,
220,
220,
220,
366,
0,
2488,
32741,
1976,
66,
87,
62,
11794,
62,
6893,
62,
18224,
930,
48091,
4049,
198,
220,
220,
220,
220,
220,
905,
62,
6404,
62,
298,
1678,
30023,
9863,
2751,
318,
62,
13317,
41876,
3652,
62,
82,
62,
5577,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
321,
375,
282,
220,
41876,
450,
499,
62,
30388,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
17926,
1797,
2751,
220,
220,
1976,
66,
87,
62,
11794,
62,
6893,
62,
18224,
11,
198,
220,
220,
220,
220,
220,
366,
0,
3497,
45441,
9290,
4554,
198,
220,
220,
220,
220,
220,
366,
0,
2488,
17143,
2357,
686,
62,
34924,
930,
360,
8629,
9290,
198,
220,
220,
220,
220,
220,
366,
0,
2488,
32741,
1976,
66,
87,
62,
11794,
62,
6893,
62,
18224,
930,
48091,
4049,
198,
220,
220,
220,
220,
220,
651,
62,
67,
8629,
62,
34924,
30826,
4261,
15871,
26173,
8924,
7,
305,
62,
34924,
8,
41876,
4526,
37,
5390,
537,
62,
48317,
62,
67,
8629,
62,
34924,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
17926,
1797,
2751,
220,
220,
1976,
66,
87,
62,
11794,
62,
6893,
62,
18224,
11,
198,
220,
220,
220,
220,
220,
366,
0,
43426,
4732,
329,
262,
1306,
5726,
198,
220,
220,
220,
220,
220,
366,
0,
2488,
17143,
2357,
318,
62,
22866,
930,
30532,
198,
220,
220,
220,
220,
220,
8335,
62,
22866,
30023,
9863,
2751,
318,
62,
22866,
41876,
3652,
62,
82,
62,
3642,
11,
198,
220,
220,
220,
220,
220,
366,
0,
3497,
262,
2604,
5412,
286,
428,
49706,
4554,
198,
220,
220,
220,
220,
220,
366,
0,
2488,
17143,
2357,
374,
85,
62,
28144,
930,
5972,
5412,
198,
220,
220,
220,
220,
220,
651,
62,
6404,
62,
28144,
30826,
4261,
15871,
26173,
8924,
7,
81,
85,
62,
28144,
8,
41876,
2613,
46664,
358,
75,
13,
198,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
220,
220,
337,
36252,
50,
25,
198,
220,
220,
220,
220,
220,
5726,
62,
32538,
23848,
36,
20032,
17941,
11,
198,
220,
220,
220,
220,
220,
5726,
62,
19662,
62,
32538,
23848,
36
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS zcl_aoc_check_12 DEFINITION
PUBLIC
INHERITING FROM zcl_aoc_super
CREATE PUBLIC.
PUBLIC SECTION.
METHODS constructor.
METHODS check
REDEFINITION.
METHODS get_message_text
REDEFINITION.
PROTECTED SECTION.
PRIVATE SECTION.
ENDCLASS.
CLASS ZCL_AOC_CHECK_12 IMPLEMENTATION.
METHOD check.
* abapOpenChecks
* https://github.com/larshp/abapOpenChecks
* MIT License
DATA: lv_include TYPE program,
lv_lines TYPE i,
lv_statement_sort TYPE string,
lv_error TYPE abap_bool,
lt_results TYPE TABLE OF string,
lv_statement LIKE LINE OF lt_results.
FIELD-SYMBOLS: <ls_statement> LIKE LINE OF io_scan->statements,
<ls_token> LIKE LINE OF io_scan->tokens.
LOOP AT io_scan->statements ASSIGNING <ls_statement> WHERE type = io_scan->gc_statement-standard.
READ TABLE io_scan->tokens ASSIGNING <ls_token> INDEX <ls_statement>-from.
CHECK sy-subrc = 0 AND <ls_token>-str = 'SORT'.
CLEAR lv_statement.
LOOP AT io_scan->tokens ASSIGNING <ls_token>
FROM <ls_statement>-from TO <ls_statement>-to.
IF lv_statement IS INITIAL.
lv_statement = <ls_token>-str.
ELSE.
CONCATENATE lv_statement <ls_token>-str
INTO lv_statement SEPARATED BY space.
ENDIF.
ENDLOOP.
* parsing, derpy derp
SPLIT lv_statement AT ' BY ' INTO lv_statement_sort lv_statement.
IF lv_statement IS INITIAL OR lv_statement CA '()'.
CONTINUE. " current loop
ENDIF.
"check priority before by
SPLIT lv_statement_sort AT space INTO TABLE lt_results.
lv_lines = lines( lt_results ).
IF lv_lines >= 3.
READ TABLE lt_results INTO lv_statement_sort INDEX lv_lines. "#EC CI_SUBRC
IF lv_statement_sort = 'ASCENDING' OR lv_statement_sort = 'DESCENDING'.
CONTINUE.
ENDIF.
ENDIF.
"check priority after each component
REPLACE ALL OCCURRENCES OF ' AS TEXT' IN lv_statement WITH ''.
SPLIT lv_statement AT space INTO TABLE lt_results.
lv_error = abap_false.
IF lines( lt_results ) MOD 2 <> 0.
lv_error = abap_true.
ENDIF.
LOOP AT lt_results INTO lv_statement.
IF sy-tabix MOD 2 = 0
AND lv_statement <> 'ASCENDING'
AND lv_statement <> 'DESCENDING'.
lv_error = abap_true.
ENDIF.
ENDLOOP.
IF lv_error = abap_true.
lv_include = io_scan->get_include( <ls_statement>-level ).
inform( p_sub_obj_name = lv_include
p_line = <ls_token>-row
p_kind = mv_errty
p_test = myname
p_code = '001' ).
ENDIF.
ENDLOOP.
ENDMETHOD.
METHOD constructor.
super->constructor( ).
version = '001'.
position = '012'.
has_attributes = abap_true.
attributes_ok = abap_true.
enable_rfc( ).
ENDMETHOD.
METHOD get_message_text.
CLEAR p_text.
CASE p_code.
WHEN '001'.
p_text = 'Specify SORT order'. "#EC NOTEXT
WHEN OTHERS.
super->get_message_text( EXPORTING p_test = p_test
p_code = p_code
IMPORTING p_text = p_text ).
ENDCASE.
ENDMETHOD. "GET_MESSAGE_TEXT
ENDCLASS.
| [
31631,
1976,
565,
62,
64,
420,
62,
9122,
62,
1065,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
3268,
16879,
2043,
2751,
16034,
1976,
565,
62,
64,
420,
62,
16668,
198,
220,
29244,
6158,
44731,
13,
628,
220,
44731,
44513,
13,
198,
220,
220,
220,
337,
36252,
50,
23772,
13,
628,
220,
220,
220,
337,
36252,
50,
2198,
198,
220,
220,
220,
220,
220,
220,
220,
23848,
36,
20032,
17941,
13,
198,
220,
220,
220,
337,
36252,
50,
651,
62,
20500,
62,
5239,
198,
220,
220,
220,
220,
220,
220,
220,
23848,
36,
20032,
17941,
13,
198,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
4810,
3824,
6158,
44513,
13,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1168,
5097,
62,
32,
4503,
62,
50084,
62,
1065,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
2198,
13,
198,
198,
9,
450,
499,
11505,
7376,
4657,
198,
9,
3740,
1378,
12567,
13,
785,
14,
75,
5406,
79,
14,
397,
499,
11505,
7376,
4657,
198,
9,
17168,
13789,
628,
220,
220,
220,
42865,
25,
300,
85,
62,
17256,
220,
220,
220,
220,
220,
220,
220,
41876,
1430,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
6615,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
1312,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
26090,
62,
30619,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
18224,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
450,
499,
62,
30388,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
83,
62,
43420,
220,
220,
220,
220,
220,
220,
220,
41876,
43679,
3963,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
26090,
220,
220,
220,
220,
220,
34178,
48920,
3963,
300,
83,
62,
43420,
13,
628,
220,
220,
220,
18930,
24639,
12,
23060,
10744,
3535,
50,
25,
1279,
7278,
62,
26090,
29,
34178,
48920,
3963,
33245,
62,
35836,
3784,
14269,
3196,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1279,
7278,
62,
30001,
29,
220,
220,
220,
220,
34178,
48920,
3963,
33245,
62,
35836,
3784,
83,
482,
641,
13,
628,
198,
220,
220,
220,
17579,
3185,
5161,
33245,
62,
35836,
3784,
14269,
3196,
24994,
3528,
15871,
1279,
7278,
62,
26090,
29,
33411,
2099,
796,
33245,
62,
35836,
3784,
36484,
62,
26090,
12,
20307,
13,
628,
220,
220,
220,
220,
220,
20832,
43679,
33245,
62,
35836,
3784,
83,
482,
641,
24994,
3528,
15871,
1279,
7278,
62,
30001,
29,
24413,
6369,
1279,
7278,
62,
26090,
29,
12,
6738,
13,
198,
220,
220,
220,
220,
220,
5870,
25171,
827,
12,
7266,
6015,
796,
657,
5357,
1279,
7278,
62,
30001,
29,
12,
2536,
796,
705,
50,
9863,
4458,
628,
220,
220,
220,
220,
220,
30301,
1503,
300,
85,
62,
26090,
13,
198,
220,
220,
220,
220,
220,
17579,
3185,
5161,
33245,
62,
35836,
3784,
83,
482,
641,
24994,
3528,
15871,
1279,
7278,
62,
30001,
29,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
16034,
1279,
7278,
62,
26090,
29,
12,
6738,
5390,
1279,
7278,
62,
26090,
29,
12,
1462,
13,
198,
220,
220,
220,
220,
220,
220,
220,
16876,
300,
85,
62,
26090,
3180,
3268,
2043,
12576,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
26090,
796,
1279,
7278,
62,
30001,
29,
12,
2536,
13,
198,
220,
220,
220,
220,
220,
220,
220,
17852,
5188,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
39962,
1404,
1677,
6158,
300,
85,
62,
26090,
1279,
7278,
62,
30001,
29,
12,
2536,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
39319,
300,
85,
62,
26090,
7946,
27082,
11617,
11050,
2272,
13,
198,
220,
220,
220,
220,
220,
220,
220,
23578,
5064,
13,
198,
220,
220,
220,
220,
220,
23578,
21982,
3185,
13,
198,
198,
9,
32096,
11,
4587,
9078,
4587,
79,
198,
220,
220,
220,
220,
220,
46341,
2043,
300,
85,
62,
26090,
5161,
705,
11050,
705,
39319,
300,
85,
62,
26090,
62,
30619,
300,
85,
62,
26090,
13,
198,
220,
220,
220,
220,
220,
16876,
300,
85,
62,
26090,
3180,
3268,
2043,
12576,
6375,
300,
85,
62,
26090,
7257,
705,
3419,
4458,
198,
220,
220,
220,
220,
220,
220,
220,
43659,
8924,
13,
366,
1459,
9052,
198,
220,
220,
220,
220,
220,
23578,
5064,
13,
628,
220,
220,
220,
220,
220,
366,
9122,
8475,
878,
416,
198,
220,
220,
220,
220,
220,
46341,
2043,
300,
85,
62,
26090,
62,
30619,
5161,
2272,
39319,
43679,
300,
83,
62,
43420,
13,
198,
220,
220,
220,
220,
220,
300,
85,
62,
6615,
796,
3951,
7,
300,
83,
62,
43420,
6739,
198,
220,
220,
220,
220,
220,
16876,
300,
85,
62,
6615,
18189,
513,
13,
198,
220,
220,
220,
220,
220,
220,
220,
20832,
43679,
300,
83,
62,
43420,
39319,
300,
85,
62,
26090,
62,
30619,
24413,
6369,
300,
85,
62,
6615,
13,
25113,
2943,
14514,
62,
50,
10526,
7397,
198,
220,
220,
220,
220,
220,
220,
220,
16876,
300,
85,
62,
26090,
62,
30619,
796,
705,
42643,
10619,
2751,
6,
6375,
300,
85,
62,
26090,
62,
30619,
796,
705,
30910,
34,
10619,
2751,
4458,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
43659,
8924,
13,
198,
220,
220,
220,
220,
220,
220,
220,
23578,
5064,
13,
198,
220,
220,
220,
220,
220,
23578,
5064,
13,
628,
220,
220,
220,
220,
220,
366,
9122,
8475,
706,
1123,
7515,
198,
220,
220,
220,
220,
220,
45285,
11598,
11096,
440,
4093,
31302,
24181,
1546,
3963,
705,
7054,
40383,
6,
3268,
300,
85,
62,
26090,
13315,
705,
4458,
198,
220,
220,
220,
220,
220,
46341,
2043,
300,
85,
62,
26090,
5161,
2272,
39319,
43679,
300,
83,
62,
43420,
13,
628,
220,
220,
220,
220,
220,
300,
85,
62,
18224,
796,
450,
499,
62,
9562,
13,
198,
220,
220,
220,
220,
220,
16876,
3951,
7,
300,
83,
62,
43420,
1267,
19164,
362,
1279,
29,
657,
13,
198,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
18224,
796,
450
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS lth_object_pdxx DEFINITION INHERITING FROM zcl_abapgit_object_pdxx_super
FINAL
FOR TESTING
DURATION SHORT
RISK LEVEL HARMLESS.
PUBLIC SECTION.
METHODS get_objkey RETURNING VALUE(rv_result) TYPE hrsobject.
ENDCLASS.
CLASS lth_object_pdxx IMPLEMENTATION.
METHOD get_objkey.
rv_result = ms_objkey.
ENDMETHOD.
ENDCLASS.
CLASS ltc_lock DEFINITION
FINAL
FOR TESTING
DURATION MEDIUM
RISK LEVEL HARMLESS.
PRIVATE SECTION.
CONSTANTS c_dummy_otype TYPE hr_sotype VALUE 'XX'.
METHODS enqueue_is_detected FOR TESTING RAISING cx_static_check.
METHODS lock_object IMPORTING iv_taskid TYPE hrobjid.
ENDCLASS.
CLASS ltc_lock IMPLEMENTATION.
METHOD enqueue_is_detected.
CONSTANTS lc_dummy TYPE hrobjid VALUE '99999999'.
DATA: lo_cut TYPE REF TO zif_abapgit_object,
ls_item TYPE zif_abapgit_definitions=>ty_item.
lock_object( lc_dummy ).
ls_item-obj_type = 'PDXX'.
ls_item-obj_name = 'XX' && lc_dummy.
lo_cut = NEW lth_object_pdxx( is_item = ls_item
iv_language = sy-langu ).
cl_abap_unit_assert=>assert_equals( act = lo_cut->is_locked( )
exp = abap_true ).
CALL FUNCTION 'DEQUEUE_HRSOBJECT'
EXPORTING
objid = lc_dummy
otype = c_dummy_otype
x_objid = ' '
x_otype = ' '
_scope = '2'.
ENDMETHOD.
METHOD lock_object.
CALL FUNCTION 'ENQUEUE_HRSOBJECT'
EXPORTING
objid = iv_taskid
otype = c_dummy_otype
x_objid = ' '
x_otype = ' '
_scope = '2'
_wait = ' '
EXCEPTIONS
foreign_lock = 01
system_failure = 02.
cl_abap_unit_assert=>assert_subrc( exp = 0
act = sy-subrc ).
ENDMETHOD.
ENDCLASS.
CLASS ltc_general_tests DEFINITION FINAL FOR TESTING
DURATION SHORT
RISK LEVEL HARMLESS.
PRIVATE SECTION.
METHODS:
hrobj_derived_from_otype FOR TESTING RAISING cx_static_check.
ENDCLASS.
CLASS ltc_general_tests IMPLEMENTATION.
METHOD hrobj_derived_from_otype.
DATA: lo_cut TYPE REF TO lth_object_pdxx,
ls_item TYPE zif_abapgit_definitions=>ty_item.
ls_item-obj_type = 'PDZZ'.
ls_item-obj_name = 'ZZ99999999'.
lo_cut = NEW lth_object_pdxx( is_item = ls_item
iv_language = sy-langu ).
cl_abap_unit_assert=>assert_equals( act = lo_cut->get_objkey( )-otype
exp = 'ZZ' ).
ENDMETHOD.
ENDCLASS.
| [
31631,
300,
400,
62,
15252,
62,
30094,
5324,
5550,
20032,
17941,
3268,
16879,
2043,
2751,
16034,
1976,
565,
62,
397,
499,
18300,
62,
15252,
62,
30094,
5324,
62,
16668,
198,
220,
25261,
198,
220,
7473,
43001,
2751,
198,
220,
360,
4261,
6234,
6006,
9863,
198,
220,
45698,
42,
49277,
43638,
5805,
7597,
13,
628,
220,
44731,
44513,
13,
198,
220,
220,
220,
337,
36252,
50,
651,
62,
26801,
2539,
30826,
4261,
15871,
26173,
8924,
7,
81,
85,
62,
20274,
8,
41876,
39436,
568,
65,
752,
13,
198,
10619,
31631,
13,
198,
198,
31631,
300,
400,
62,
15252,
62,
30094,
5324,
30023,
2538,
10979,
6234,
13,
628,
220,
337,
36252,
651,
62,
26801,
2539,
13,
198,
220,
220,
220,
374,
85,
62,
20274,
796,
13845,
62,
26801,
2539,
13,
198,
220,
23578,
49273,
13,
198,
198,
10619,
31631,
13,
198,
198,
31631,
300,
23047,
62,
5354,
5550,
20032,
17941,
198,
220,
25261,
198,
220,
7473,
43001,
2751,
198,
220,
360,
4261,
6234,
26112,
41796,
198,
220,
45698,
42,
49277,
43638,
5805,
7597,
13,
628,
220,
4810,
3824,
6158,
44513,
13,
628,
220,
220,
220,
7102,
2257,
1565,
4694,
269,
62,
67,
13513,
62,
8690,
41876,
39436,
62,
82,
8690,
26173,
8924,
705,
8051,
4458,
628,
220,
220,
220,
337,
36252,
50,
551,
36560,
62,
271,
62,
15255,
11197,
7473,
43001,
2751,
17926,
1797,
2751,
43213,
62,
12708,
62,
9122,
13,
198,
220,
220,
220,
337,
36252,
50,
5793,
62,
15252,
30023,
9863,
2751,
21628,
62,
35943,
312,
41876,
289,
22609,
73,
312,
13,
198,
198,
10619,
31631,
13,
628,
198,
31631,
300,
23047,
62,
5354,
30023,
2538,
10979,
6234,
13,
628,
220,
337,
36252,
551,
36560,
62,
271,
62,
15255,
11197,
13,
628,
220,
220,
220,
7102,
2257,
1565,
4694,
300,
66,
62,
67,
13513,
41876,
289,
22609,
73,
312,
26173,
8924,
705,
24214,
24214,
4458,
628,
220,
220,
220,
42865,
25,
2376,
62,
8968,
220,
41876,
4526,
37,
5390,
1976,
361,
62,
397,
499,
18300,
62,
15252,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
43979,
62,
9186,
41876,
1976,
361,
62,
397,
499,
18300,
62,
4299,
50101,
14804,
774,
62,
9186,
13,
628,
220,
220,
220,
5793,
62,
15252,
7,
300,
66,
62,
67,
13513,
6739,
628,
220,
220,
220,
43979,
62,
9186,
12,
26801,
62,
4906,
796,
705,
5760,
8051,
4458,
198,
220,
220,
220,
43979,
62,
9186,
12,
26801,
62,
3672,
796,
705,
8051,
6,
11405,
300,
66,
62,
67,
13513,
13,
628,
220,
220,
220,
2376,
62,
8968,
796,
12682,
300,
400,
62,
15252,
62,
30094,
5324,
7,
318,
62,
9186,
796,
43979,
62,
9186,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
16129,
796,
827,
12,
75,
2303,
6739,
628,
220,
220,
220,
537,
62,
397,
499,
62,
20850,
62,
30493,
14804,
30493,
62,
4853,
874,
7,
719,
796,
2376,
62,
8968,
3784,
271,
62,
24162,
7,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1033,
796,
450,
499,
62,
7942,
6739,
628,
220,
220,
220,
42815,
29397,
4177,
2849,
705,
7206,
48,
8924,
8924,
62,
39,
6998,
9864,
23680,
6,
198,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
26181,
312,
220,
220,
796,
300,
66,
62,
67,
13513,
198,
220,
220,
220,
220,
220,
220,
220,
267,
4906,
220,
220,
796,
269,
62,
67,
13513,
62,
8690,
198,
220,
220,
220,
220,
220,
220,
220,
2124,
62,
26801,
312,
796,
705,
705,
198,
220,
220,
220,
220,
220,
220,
220,
2124,
62,
8690,
796,
705,
705,
198,
220,
220,
220,
220,
220,
220,
220,
4808,
29982,
220,
796,
705,
17,
4458,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
5793,
62,
15252,
13,
628,
220,
220,
220,
42815,
29397,
4177,
2849,
705,
1677,
48,
8924,
8924,
62,
39,
6998,
9864,
23680,
6,
198,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
26181,
312,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
21628,
62,
35943,
312,
198,
220,
220,
220,
220,
220,
220,
220,
267,
4906,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
269,
62,
67,
13513,
62,
8690,
198,
220,
220,
220,
220,
220,
220,
220,
2124,
62,
26801,
312,
220,
220,
220,
220,
220,
220,
220,
796,
705,
705,
198,
220,
220,
220,
220,
220,
220,
220,
2124,
62,
8690,
220,
220,
220,
220,
220,
220,
220,
796,
705,
705,
198,
220,
220,
220,
220,
220,
220,
220,
4808,
29982,
220,
220,
220,
220,
220,
220,
220,
220,
796,
705,
17,
6,
198,
220,
220,
220,
220,
220,
220,
220,
4808,
17077,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
705,
705,
198,
220,
220,
220,
220,
220,
7788,
42006,
11053,
198,
220,
220,
220,
220,
220,
220,
220,
3215,
62,
5354,
220,
220,
796,
5534,
198,
220,
220,
220,
220,
220,
220,
220,
1080,
62,
32165,
495,
796,
7816,
13,
628,
220,
220,
220,
537,
62,
397,
499,
62,
20850,
62,
30493,
14804,
30493,
62,
7266,
6015,
7,
1033,
796,
657,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
719,
796,
827,
12,
7266,
6015,
6739,
628,
220,
23578,
49273,
13,
198,
198,
10619,
31631,
13,
198,
198,
31631,
300,
23047,
62,
24622,
62,
41989,
5550,
20032,
17941,
25261,
7473,
43001,
2751,
198,
220,
360,
4261,
6234,
6006,
9863,
198,
220,
45698,
42,
49277,
43638,
5805,
7597,
13,
628,
220,
4810,
3824,
6158,
44513,
13,
198,
220,
220,
220,
337,
36252,
50,
25,
198,
220,
220,
220,
220,
220,
289,
22609,
73,
62,
34631,
62,
6738,
62,
8690,
7473,
43001,
2751,
17926,
1797,
2751,
43213
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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DATA gv_agency_id_1 TYPE /dmo/agency_id21.
CLASS-DATA gv_agency_id_2 TYPE /dmo/agency_id21.
CLASS-DATA gv_agency_id_unknown TYPE /dmo/agency_id21.
CLASS-DATA gv_customer_id_1 TYPE /dmo/customer_id21.
CLASS-DATA gv_customer_id_2 TYPE /dmo/customer_id21.
CLASS-DATA gv_customer_id_unknown TYPE /dmo/customer_id21.
CLASS-METHODS class_setup.
ENDCLASS.
CLASS /dmo/tc_flight_travel_api21 IMPLEMENTATION.
METHOD class_setup.
DATA lt_agency_id TYPE SORTED TABLE OF /dmo/agency_id21 WITH UNIQUE KEY table_line.
SELECT DISTINCT agency_id FROM /dmo/agency21 ORDER BY agency_id DESCENDING INTO TABLE @lt_agency_id .
DATA lt_customer_id TYPE SORTED TABLE OF /dmo/customer_id21 WITH UNIQUE KEY table_line.
SELECT DISTINCT customer_id FROM /dmo/customer21 ORDER BY customer_id DESCENDING INTO TABLE @lt_customer_id .
" Select 2 known agency IDs
IF lines( lt_agency_id ) < 2.
cl_abap_unit_assert=>abort( msg = 'No agency data!' ).
ENDIF.
gv_agency_id_1 = lt_agency_id[ 1 ].
gv_agency_id_2 = lt_agency_id[ 2 ].
cl_abap_unit_assert=>assert_differs( act = gv_agency_id_1 exp = gv_agency_id_2 )." To be totally sure
" Select 2 known customer IDs
IF lines( lt_customer_id ) < 2.
cl_abap_unit_assert=>abort( msg = 'No customer data!' ).
ENDIF.
gv_customer_id_1 = lt_customer_id[ 1 ].
gv_customer_id_2 = lt_customer_id[ 2 ].
cl_abap_unit_assert=>assert_differs( act = gv_customer_id_1 exp = gv_customer_id_2 )." To be totally sure
" Determine an unknown agency ID
gv_agency_id_unknown = lt_agency_id[ 1 ].
DO.
gv_agency_id_unknown = gv_agency_id_unknown + 1.
READ TABLE lt_agency_id TRANSPORTING NO FIELDS WITH TABLE KEY table_line = gv_agency_id_unknown.
IF sy-subrc <> 0.
EXIT.
ENDIF.
ENDDO.
" Determine an unknown customer ID
gv_customer_id_unknown = lt_customer_id[ 1 ].
DO.
gv_customer_id_unknown = gv_customer_id_unknown + 1.
READ TABLE lt_customer_id TRANSPORTING NO FIELDS WITH TABLE KEY table_line = gv_customer_id_unknown.
IF sy-subrc <> 0.
EXIT.
ENDIF.
ENDDO.
ENDMETHOD.
METHOD cuerd_travel.
DATA ls_travel_in TYPE /dmo/if_flight_legacy21=>ts_travel_in.
DATA ls_travel_inx TYPE /dmo/if_flight_legacy21=>ts_travel_inx.
DATA ls_travel TYPE /dmo/travel21.
DATA lt_messages TYPE /dmo/if_flight_legacy21=>tt_message.
" Create Travel and Commit
ls_travel_in-agency_id = gv_agency_id_1.
ls_travel_in-customer_id = gv_customer_id_1.
ls_travel_in-begin_date = '20180101'.
ls_travel_in-end_date = '20180201'.
ls_travel_in-description = 'My Test'.
CALL FUNCTION '/DMO/FLIGHT_TRAVEL_CREATE21'
EXPORTING
is_travel = ls_travel_in
IMPORTING
es_travel = ls_travel
et_messages = lt_messages.
cl_abap_unit_assert=>assert_initial( lt_messages ).
DATA(lv_travel_id) = ls_travel-travel_id.
cl_abap_unit_assert=>assert_not_initial( lv_travel_id ).
CALL FUNCTION '/DMO/FLIGHT_TRAVEL_SAVE21'.
" DB Check
SELECT SINGLE agency_id, customer_id, description FROM /dmo/travel21 WHERE travel_id = @lv_travel_id INTO ( @DATA(lv_agency_id), @DATA(lv_customer_id), @DATA(lv_description) ).
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals( act = lv_agency_id exp = gv_agency_id_1 ).
cl_abap_unit_assert=>assert_equals( act = lv_customer_id exp = gv_customer_id_1 ).
cl_abap_unit_assert=>assert_equals( act = lv_description exp = 'My Test' ).
" Update
CLEAR ls_travel_in.
ls_travel_in-travel_id = lv_travel_id.
ls_travel_in-agency_id = gv_agency_id_2.
ls_travel_in-customer_id = gv_customer_id_2.
ls_travel_in-description = 'My New Test'.
ls_travel_inx-travel_id = lv_travel_id.
ls_travel_inx-agency_id = abap_true.
ls_travel_inx-customer_id = abap_true.
ls_travel_inx-description = abap_true.
CALL FUNCTION '/DMO/FLIGHT_TRAVEL_UPDATE21'
EXPORTING
is_travel = ls_travel_in
is_travelx = ls_travel_inx
IMPORTING
et_messages = lt_messages.
cl_abap_unit_assert=>assert_initial( lt_messages ).
" Action
CALL FUNCTION '/DMO/FLIGHT_TRAVEL_SET_BOOK_21'
EXPORTING
iv_travel_id = lv_travel_id
IMPORTING
et_messages = lt_messages.
cl_abap_unit_assert=>assert_initial( lt_messages ).
" Faulty Update - All or Nothing -> Nothing
CLEAR ls_travel_in.
ls_travel_in-travel_id = lv_travel_id.
ls_travel_in-agency_id = gv_agency_id_unknown.
ls_travel_in-customer_id = gv_customer_id_1.
ls_travel_inx-travel_id = lv_travel_id.
ls_travel_inx-agency_id = abap_true.
ls_travel_inx-customer_id = abap_true.
CALL FUNCTION '/DMO/FLIGHT_TRAVEL_UPDATE21'
EXPORTING
is_travel = ls_travel_in
is_travelx = ls_travel_inx
IMPORTING
et_messages = lt_messages.
cl_abap_unit_assert=>assert_not_initial( lt_messages ).
" Faulty Update - All or Nothing -> Nothing
CLEAR lt_messages.
CLEAR ls_travel_in.
ls_travel_in-travel_id = lv_travel_id.
ls_travel_in-agency_id = gv_agency_id_1.
ls_travel_in-customer_id = gv_customer_id_unknown.
ls_travel_inx-travel_id = lv_travel_id.
ls_travel_inx-agency_id = abap_true.
ls_travel_inx-customer_id = abap_true.
CALL FUNCTION '/DMO/FLIGHT_TRAVEL_UPDATE21'
EXPORTING
is_travel = ls_travel_in
is_travelx = ls_travel_inx
IMPORTING
et_messages = lt_messages.
cl_abap_unit_assert=>assert_not_initial( lt_messages ).
" Read DB only
CLEAR ls_travel.
CALL FUNCTION '/DMO/FLIGHT_TRAVEL_READ21'
EXPORTING
iv_travel_id = lv_travel_id
iv_include_buffer = abap_false
IMPORTING
es_travel = ls_travel
et_messages = lt_messages.
cl_abap_unit_assert=>assert_initial( lt_messages ).
cl_abap_unit_assert=>assert_equals( act = ls_travel-travel_id exp = lv_travel_id ).
cl_abap_unit_assert=>assert_equals( act = ls_travel-agency_id exp = gv_agency_id_1 ).
cl_abap_unit_assert=>assert_equals( act = ls_travel-customer_id exp = gv_customer_id_1 ).
cl_abap_unit_assert=>assert_equals( act = ls_travel-status exp = CONV /dmo/travel_status21( /dmo/if_flight_legacy21=>travel_status-new ) ).
cl_abap_unit_assert=>assert_equals( act = ls_travel-description exp = 'My Test' ).
" Read with buffer
CLEAR ls_travel.
CALL FUNCTION '/DMO/FLIGHT_TRAVEL_READ21'
EXPORTING
iv_travel_id = lv_travel_id
iv_include_buffer = abap_true
IMPORTING
es_travel = ls_travel
et_messages = lt_messages.
cl_abap_unit_assert=>assert_initial( lt_messages ).
cl_abap_unit_assert=>assert_equals( act = ls_travel-travel_id exp = lv_travel_id ).
cl_abap_unit_assert=>assert_equals( act = ls_travel-agency_id exp = gv_agency_id_2 ).
cl_abap_unit_assert=>assert_equals( act = ls_travel-customer_id exp = gv_customer_id_2 ).
cl_abap_unit_assert=>assert_equals( act = ls_travel-status exp = CONV /dmo/travel_status21( /dmo/if_flight_legacy21=>travel_status-booked ) ).
cl_abap_unit_assert=>assert_equals( act = ls_travel-description exp = 'My New Test' ).
" Delete
CALL FUNCTION '/DMO/FLIGHT_TRAVEL_DELETE21'
EXPORTING
iv_travel_id = lv_travel_id
IMPORTING
et_messages = lt_messages.
cl_abap_unit_assert=>assert_initial( lt_messages ).
" Delete again -> Error
CALL FUNCTION '/DMO/FLIGHT_TRAVEL_DELETE21'
EXPORTING
iv_travel_id = lv_travel_id
IMPORTING
et_messages = lt_messages.
cl_abap_unit_assert=>assert_not_initial( lt_messages ).
CALL FUNCTION '/DMO/FLIGHT_TRAVEL_SAVE21'.
ENDMETHOD.
ENDCLASS.
| [
31631,
1220,
67,
5908,
14,
23047,
62,
22560,
62,
35927,
62,
15042,
2481,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
9564,
18601,
10659,
198,
220,
29244,
6158,
44731,
198,
220,
7473,
43001,
2751,
198,
220,
360,
4261,
6234,
26112,
41796,
198,
220,
45698,
42,
49277,
43638,
5805,
7597,
764,
628,
220,
44731,
44513,
13,
198,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
220,
220,
337,
36252,
50,
269,
15573,
67,
62,
35927,
7473,
43001,
2751,
17926,
1797,
2751,
43213,
62,
12708,
62,
9122,
13,
198,
220,
4810,
3824,
6158,
44513,
13,
198,
220,
220,
220,
42715,
12,
26947,
308,
85,
62,
40955,
62,
312,
62,
16,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
1220,
67,
5908,
14,
40955,
62,
312,
2481,
13,
198,
220,
220,
220,
42715,
12,
26947,
308,
85,
62,
40955,
62,
312,
62,
17,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
1220,
67,
5908,
14,
40955,
62,
312,
2481,
13,
198,
220,
220,
220,
42715,
12,
26947,
308,
85,
62,
40955,
62,
312,
62,
34680,
220,
220,
41876,
1220,
67,
5908,
14,
40955,
62,
312,
2481,
13,
628,
220,
220,
220,
42715,
12,
26947,
308,
85,
62,
23144,
263,
62,
312,
62,
16,
220,
220,
220,
220,
220,
220,
41876,
1220,
67,
5908,
14,
23144,
263,
62,
312,
2481,
13,
198,
220,
220,
220,
42715,
12,
26947,
308,
85,
62,
23144,
263,
62,
312,
62,
17,
220,
220,
220,
220,
220,
220,
41876,
1220,
67,
5908,
14,
23144,
263,
62,
312,
2481,
13,
198,
220,
220,
220,
42715,
12,
26947,
308,
85,
62,
23144,
263,
62,
312,
62,
34680,
41876,
1220,
67,
5908,
14,
23144,
263,
62,
312,
2481,
13,
628,
220,
220,
220,
42715,
12,
49273,
50,
1398,
62,
40406,
13,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1220,
67,
5908,
14,
23047,
62,
22560,
62,
35927,
62,
15042,
2481,
30023,
2538,
10979,
6234,
13,
198,
220,
337,
36252,
1398,
62,
40406,
13,
198,
220,
220,
220,
42865,
300,
83,
62,
40955,
62,
312,
41876,
311,
9863,
1961,
43679,
3963,
1220,
67,
5908,
14,
40955,
62,
312,
2481,
220,
220,
220,
220,
13315,
4725,
33866,
8924,
35374,
3084,
62,
1370,
13,
198,
220,
220,
220,
33493,
360,
8808,
1268,
4177,
4086,
62,
312,
16034,
1220,
67,
5908,
14,
40955,
2481,
220,
220,
220,
220,
38678,
11050,
4086,
62,
312,
220,
220,
22196,
34,
10619,
2751,
39319,
43679,
2488,
2528,
62,
40955,
62,
312,
764,
628,
220,
220,
220,
42865,
300,
83,
62,
23144,
263,
62,
312,
41876,
311,
9863,
1961,
43679,
3963,
1220,
67,
5908,
14,
23144,
263,
62,
312,
2481,
13315,
4725,
33866,
8924,
35374,
3084,
62,
1370,
13,
198,
220,
220,
220,
33493,
360,
8808,
1268,
4177,
6491,
62,
312,
16034,
1220,
67,
5908,
14,
23144,
263,
2481,
38678,
11050,
6491,
62,
312,
22196,
34,
10619,
2751,
39319,
43679,
2488,
2528,
62,
23144,
263,
62,
312,
764,
628,
220,
220,
220,
366,
9683,
362,
1900,
4086,
32373,
198,
220,
220,
220,
16876,
3951,
7,
300,
83,
62,
40955,
62,
312,
1267,
1279,
362,
13,
198,
220,
220,
220,
220,
220,
537,
62,
397,
499,
62,
20850,
62,
30493,
14804,
397,
419,
7,
31456,
796,
705,
2949,
4086,
1366,
13679,
220,
220,
6739,
198,
220,
220,
220,
23578,
5064,
13,
198,
220,
220,
220,
308,
85,
62,
40955,
62,
312,
62,
16,
796,
300,
83,
62,
40955,
62,
312,
58,
352,
20740,
198,
220,
220,
220,
308,
85,
62,
40955,
62,
312,
62,
17,
796,
300,
83,
62,
40955,
62,
312,
58,
362,
20740,
198,
220,
220,
220,
537,
62,
397,
499,
62,
20850,
62,
30493,
14804,
30493,
62,
26069,
364,
7,
719,
796,
308,
85,
62,
40955,
62,
312,
62,
16,
220,
1033,
796,
308,
85,
62,
40955,
62,
312,
62,
17,
1267,
526,
1675,
307,
6635,
1654,
628,
220,
220,
220,
366,
9683,
362,
1900,
6491,
32373,
198,
220,
220,
220,
16876,
3951,
7,
300,
83,
62,
23144,
263,
62,
312,
1267,
1279,
362,
13,
198,
220,
220,
220,
220,
220,
537,
62,
397,
499,
62,
20850,
62,
30493,
14804,
397,
419,
7,
31456,
796,
705,
2949,
6491,
1366,
13679,
6739,
198,
220,
220,
220,
23578,
5064,
13,
198,
220,
220,
220,
308,
85,
62,
23144,
263,
62,
312,
62,
16,
796,
300,
83,
62,
23144,
263,
62,
312,
58,
352,
20740,
198,
220,
220,
220,
308,
85,
62,
23144,
263,
62,
312,
62,
17,
796,
300,
83,
62,
23144,
263,
62,
312,
58,
362,
20740,
198,
220,
220,
220,
537,
62,
397,
499,
62,
20850,
62,
30493,
14804,
30493,
62,
26069,
364,
7,
719,
796,
308,
85,
62,
23144,
263,
62,
312,
62,
16,
220,
1033,
796,
308,
85,
62,
23144,
263,
62,
312,
62,
17,
1267,
526,
1675,
307,
6635,
1654,
628,
220,
220,
220,
366,
45559,
3810,
281,
6439,
4086,
4522,
198,
220,
220,
220,
308,
85,
62,
40955,
62,
312,
62,
34680,
796,
300,
83,
62,
40955,
62,
312,
58,
352,
20740,
198,
220,
220,
220,
8410,
13,
198,
220,
220,
220,
220,
220,
308,
85,
62,
40955,
62,
312,
62,
34680,
796,
308,
85,
62,
40955,
62,
312,
62,
34680,
1343,
352,
13,
198,
220,
220,
220,
220,
220,
20832,
43679,
300,
83,
62,
40955,
62,
312,
220,
220,
48213,
4303,
9863,
2751,
8005,
18930,
3698,
5258,
13315,
43679,
35374,
3084,
62,
1370,
796,
308,
85,
62,
40955,
62,
312,
62,
34680,
13,
198,
220,
220,
220,
220,
220,
16876,
827,
12,
7266,
6015,
1279,
29,
657,
13,
198,
220,
220,
220,
220,
220,
220,
220,
7788,
2043,
13,
198,
220,
220,
220,
220,
220,
23578,
5064,
13,
198,
220,
220,
220,
23578,
18227,
13,
628,
220,
220,
220,
366,
45559,
3810,
281,
6439,
6491,
4522,
198,
220,
220,
220,
308,
85,
62,
23144,
263,
62,
312,
62,
34680,
796,
300,
83,
62,
23144,
263,
62,
312,
58,
352,
20740,
198,
220,
220,
220,
8410,
13,
198,
220,
220,
220,
220,
220,
308,
85,
62,
23144,
263,
62,
312,
62,
34680,
796,
308,
85,
62,
23144,
263,
62,
312,
62,
34680,
1343,
352,
13,
198,
220,
220,
220,
220,
220,
20832,
43679,
300,
83,
62,
23144,
263,
62,
312,
48213,
4303,
9863,
2751,
8005,
18930
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS zcl_abapgit_dot_abapgit DEFINITION
PUBLIC
CREATE PUBLIC .
PUBLIC SECTION.
CLASS-METHODS build_default
RETURNING
VALUE(ro_dot_abapgit) TYPE REF TO zcl_abapgit_dot_abapgit .
CLASS-METHODS deserialize
IMPORTING
!iv_xstr TYPE xstring
RETURNING
VALUE(ro_dot_abapgit) TYPE REF TO zcl_abapgit_dot_abapgit
RAISING
zcx_abapgit_exception .
METHODS constructor
IMPORTING
!is_data TYPE zif_abapgit_dot_abapgit=>ty_dot_abapgit .
METHODS serialize
RETURNING
VALUE(rv_xstr) TYPE xstring
RAISING
zcx_abapgit_exception .
METHODS get_data
RETURNING
VALUE(rs_data) TYPE zif_abapgit_dot_abapgit=>ty_dot_abapgit .
METHODS add_ignore
IMPORTING
!iv_path TYPE string
!iv_filename TYPE string .
METHODS is_ignored
IMPORTING
!iv_path TYPE string
!iv_filename TYPE string
RETURNING
VALUE(rv_ignored) TYPE abap_bool .
METHODS remove_ignore
IMPORTING
!iv_path TYPE string
!iv_filename TYPE string .
METHODS get_starting_folder
RETURNING
VALUE(rv_path) TYPE string .
METHODS get_folder_logic
RETURNING
VALUE(rv_logic) TYPE string .
METHODS set_folder_logic
IMPORTING
!iv_logic TYPE string .
METHODS set_starting_folder
IMPORTING
!iv_path TYPE string .
METHODS get_master_language
RETURNING
VALUE(rv_language) TYPE spras .
* set_master_language
* IMPORTING iv_language TYPE spras,
METHODS get_signature
RETURNING
VALUE(rs_signature) TYPE zif_abapgit_definitions=>ty_file_signature
RAISING
zcx_abapgit_exception .
METHODS get_requirements
RETURNING
VALUE(rt_requirements) TYPE zif_abapgit_dot_abapgit=>ty_requirement_tt.
METHODS set_requirements
IMPORTING
it_requirements TYPE zif_abapgit_dot_abapgit=>ty_requirement_tt.
PROTECTED SECTION.
PRIVATE SECTION.
DATA: ms_data TYPE zif_abapgit_dot_abapgit=>ty_dot_abapgit.
CLASS-METHODS:
to_xml
IMPORTING is_data TYPE zif_abapgit_dot_abapgit=>ty_dot_abapgit
RETURNING VALUE(rv_xml) TYPE string
RAISING zcx_abapgit_exception,
from_xml
IMPORTING iv_xml TYPE string
RETURNING VALUE(rs_data) TYPE zif_abapgit_dot_abapgit=>ty_dot_abapgit.
ENDCLASS.
CLASS ZCL_ABAPGIT_DOT_ABAPGIT IMPLEMENTATION.
METHOD add_ignore.
DATA: lv_name TYPE string.
FIELD-SYMBOLS: <lv_ignore> LIKE LINE OF ms_data-ignore.
lv_name = iv_path && iv_filename.
READ TABLE ms_data-ignore FROM lv_name TRANSPORTING NO FIELDS.
IF sy-subrc = 0.
RETURN.
ENDIF.
APPEND INITIAL LINE TO ms_data-ignore ASSIGNING <lv_ignore>.
<lv_ignore> = lv_name.
ENDMETHOD.
METHOD build_default.
DATA: ls_data TYPE zif_abapgit_dot_abapgit=>ty_dot_abapgit.
ls_data-master_language = sy-langu.
ls_data-starting_folder = '/src/'.
ls_data-folder_logic = zif_abapgit_dot_abapgit=>c_folder_logic-prefix.
APPEND '/.gitignore' TO ls_data-ignore.
APPEND '/LICENSE' TO ls_data-ignore.
APPEND '/README.md' TO ls_data-ignore.
APPEND '/package.json' TO ls_data-ignore.
APPEND '/.travis.yml' TO ls_data-ignore.
APPEND '/.gitlab-ci.yml' TO ls_data-ignore.
APPEND '/abaplint.json' TO ls_data-ignore.
APPEND '/azure-pipelines.yml' TO ls_data-ignore.
APPEND '/.devcontainer.json' TO ls_data-ignore.
CREATE OBJECT ro_dot_abapgit
EXPORTING
is_data = ls_data.
ENDMETHOD.
METHOD constructor.
ms_data = is_data.
ENDMETHOD.
METHOD deserialize.
DATA: lv_xml TYPE string,
ls_data TYPE zif_abapgit_dot_abapgit=>ty_dot_abapgit.
lv_xml = zcl_abapgit_convert=>xstring_to_string_utf8( iv_xstr ).
ls_data = from_xml( lv_xml ).
CREATE OBJECT ro_dot_abapgit
EXPORTING
is_data = ls_data.
ENDMETHOD.
METHOD from_xml.
DATA: lv_xml TYPE string.
lv_xml = iv_xml.
CALL TRANSFORMATION id
OPTIONS value_handling = 'accept_data_loss'
SOURCE XML lv_xml
RESULT data = rs_data ##NO_TEXT.
* downward compatibility
IF rs_data-folder_logic IS INITIAL.
rs_data-folder_logic = zif_abapgit_dot_abapgit=>c_folder_logic-prefix.
ENDIF.
ENDMETHOD.
METHOD get_data.
rs_data = ms_data.
ENDMETHOD.
METHOD get_folder_logic.
rv_logic = ms_data-folder_logic.
ENDMETHOD.
METHOD get_master_language.
rv_language = ms_data-master_language.
ENDMETHOD.
METHOD get_requirements.
rt_requirements = ms_data-requirements.
ENDMETHOD.
METHOD get_signature.
rs_signature-path = zif_abapgit_definitions=>c_root_dir.
rs_signature-filename = zif_abapgit_definitions=>c_dot_abapgit.
rs_signature-sha1 = zcl_abapgit_hash=>sha1( iv_type = zif_abapgit_definitions=>c_type-blob
iv_data = serialize( ) ).
ENDMETHOD.
METHOD get_starting_folder.
rv_path = ms_data-starting_folder.
ENDMETHOD.
METHOD is_ignored.
DATA: lv_name TYPE string,
lv_starting TYPE string,
lv_dot TYPE string,
lv_count TYPE i,
lv_ignore TYPE string.
lv_name = iv_path && iv_filename.
CONCATENATE ms_data-starting_folder '*' INTO lv_starting.
CONCATENATE '/' zif_abapgit_definitions=>c_dot_abapgit INTO lv_dot.
LOOP AT ms_data-ignore INTO lv_ignore.
FIND ALL OCCURRENCES OF '/' IN lv_name MATCH COUNT lv_count.
IF lv_name CP lv_ignore
OR ( ms_data-starting_folder <> '/'
AND lv_count > 1
AND NOT lv_name CP lv_starting
AND NOT lv_name = lv_dot ).
rv_ignored = abap_true.
RETURN.
ENDIF.
ENDLOOP.
ENDMETHOD.
METHOD remove_ignore.
DATA: lv_name TYPE string.
lv_name = iv_path && iv_filename.
DELETE TABLE ms_data-ignore FROM lv_name.
ENDMETHOD.
METHOD serialize.
DATA: lv_xml TYPE string,
lv_mark TYPE string.
lv_xml = to_xml( ms_data ).
"unicode systems always add the byte order mark to the xml, while non-unicode does not
"this code will always add the byte order mark if it is not in the xml
lv_mark = zcl_abapgit_convert=>xstring_to_string_utf8( cl_abap_char_utilities=>byte_order_mark_utf8 ).
IF lv_xml(1) <> lv_mark.
CONCATENATE lv_mark lv_xml INTO lv_xml.
ENDIF.
rv_xstr = zcl_abapgit_convert=>string_to_xstring_utf8_bom( lv_xml ).
ENDMETHOD.
METHOD set_folder_logic.
ms_data-folder_logic = iv_logic.
ENDMETHOD.
METHOD set_requirements.
ms_data-requirements = it_requirements.
ENDMETHOD.
METHOD set_starting_folder.
ms_data-starting_folder = iv_path.
ENDMETHOD.
METHOD to_xml.
CALL TRANSFORMATION id
OPTIONS initial_components = 'suppress'
SOURCE data = is_data
RESULT XML rv_xml.
rv_xml = zcl_abapgit_xml_pretty=>print( rv_xml ).
REPLACE FIRST OCCURRENCE
OF REGEX '<\?xml version="1\.0" encoding="[\w-]+"\?>'
IN rv_xml
WITH '<?xml version="1.0" encoding="utf-8"?>'.
ASSERT sy-subrc = 0.
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
397,
499,
18300,
62,
26518,
62,
397,
499,
18300,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
29244,
6158,
44731,
764,
628,
220,
44731,
44513,
13,
628,
220,
220,
220,
42715,
12,
49273,
50,
1382,
62,
12286,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
305,
62,
26518,
62,
397,
499,
18300,
8,
41876,
4526,
37,
5390,
1976,
565,
62,
397,
499,
18300,
62,
26518,
62,
397,
499,
18300,
764,
198,
220,
220,
220,
42715,
12,
49273,
50,
748,
48499,
1096,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
87,
2536,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
2124,
8841,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
305,
62,
26518,
62,
397,
499,
18300,
8,
41876,
4526,
37,
5390,
1976,
565,
62,
397,
499,
18300,
62,
26518,
62,
397,
499,
18300,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
764,
198,
220,
220,
220,
337,
36252,
50,
23772,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
271,
62,
7890,
41876,
1976,
361,
62,
397,
499,
18300,
62,
26518,
62,
397,
499,
18300,
14804,
774,
62,
26518,
62,
397,
499,
18300,
764,
198,
220,
220,
220,
337,
36252,
50,
11389,
1096,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
81,
85,
62,
87,
2536,
8,
41876,
2124,
8841,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
764,
198,
220,
220,
220,
337,
36252,
50,
651,
62,
7890,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
3808,
62,
7890,
8,
41876,
1976,
361,
62,
397,
499,
18300,
62,
26518,
62,
397,
499,
18300,
14804,
774,
62,
26518,
62,
397,
499,
18300,
764,
198,
220,
220,
220,
337,
36252,
50,
751,
62,
46430,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
6978,
220,
220,
220,
220,
41876,
4731,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
34345,
41876,
4731,
764,
198,
220,
220,
220,
337,
36252,
50,
318,
62,
570,
1850,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
6978,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4731,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
34345,
220,
220,
220,
220,
220,
41876,
4731,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
81,
85,
62,
570,
1850,
8,
41876,
450,
499,
62,
30388,
764,
198,
220,
220,
220,
337,
36252,
50,
4781,
62,
46430,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
6978,
220,
220,
220,
220,
41876,
4731,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
34345,
41876,
4731,
764,
198,
220,
220,
220,
337,
36252,
50,
651,
62,
38690,
62,
43551,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
81,
85,
62,
6978,
8,
41876,
4731,
764,
628,
220,
220,
220,
337,
36252,
50,
651,
62,
43551,
62,
6404,
291,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
81,
85,
62,
6404,
291,
8,
41876,
4731,
764,
628,
220,
220,
220,
337,
36252,
50,
900,
62,
43551,
62,
6404,
291,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
6404,
291,
41876,
4731,
764,
628,
220,
220,
220,
337,
36252,
50,
900,
62,
38690,
62,
43551,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
6978,
41876,
4731,
764,
628,
220,
220,
220,
337,
36252,
50,
651,
62,
9866,
62,
16129,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
81,
85,
62,
16129,
8,
41876,
7500,
292,
764,
198,
9,
220,
220,
220,
220,
220,
900,
62,
9866,
62,
16129,
198,
9,
220,
220,
220,
220,
220,
220,
220,
30023,
9863,
2751,
21628,
62,
16129,
41876,
7500,
292,
11,
198,
220,
220,
220,
337,
36252,
50,
651,
62,
12683,
1300,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
3808,
62,
12683,
1300,
8,
41876,
1976,
361,
62,
397,
499,
18300,
62,
4299,
50101,
14804,
774,
62,
7753,
62,
12683,
1300,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
764,
198,
220,
220,
220,
337,
36252,
50,
651,
62,
8897,
18883,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
17034,
62,
8897,
18883,
8,
41876,
1976,
361,
62,
397,
499,
18300,
62,
26518,
62,
397,
499,
18300,
14804,
774,
62,
8897,
24615,
62,
926,
13,
198,
220,
220,
220,
337,
36252,
50,
900,
62,
8897,
18883,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
340,
62,
8897,
18883,
41876,
1976,
361,
62,
397,
499,
18300,
62,
26518,
62,
397,
499,
18300,
14804,
774,
62,
8897,
24615,
62,
926,
13,
198,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
4810,
3824,
6158,
44513,
13,
198,
220,
220,
220,
42865,
25,
13845,
62,
7890,
41876,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,
1,
1,
1,
1
] |
*&---------------------------------------------------------------------*
*& Report Z_MONSTER_ATROCITY_DUE_LIST
*&
*&---------------------------------------------------------------------*
* This will show a list of requested atrocities to be committed by
* monsters from a particular mad scientist castle on a given day
* The user will, when the atrocity becomes due, allocate a monster
* This information will be "pushed" by means of the AMC framework
* to any running instances of the Monster Atrocity Monitor which
* have subscribed to this information
* The target Monitor report will then update itself without the user
* who is running it having to do anything (e.g. press 'refresh').
*--------------------------------------------------------------------*
* First, need to set PID of SAPGUI_PUSH_CHANNEL = "X"
* Then need to define the ABAP Messaging Channel
* In SAMC and application ID and a channel have to be defined
* I am using the PCP message type
* Then you "whitelist" programs which can send and receive information
*--------------------------------------------------------------------*
* I will make this a SALV report which will have a user command
* which lets the user choose a monster and then create the delivery and
* fire off an AMC messsage to all subscribers saying the new delivery
* has been created
*--------------------------------------------------------------------*
* Data Declarations
*--------------------------------------------------------------------*
INCLUDE z4_monster_adl_top.
**********************************************************************
* Selection Screen
**********************************************************************
* Monster Header Data
SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS: s_date FOR gs_selections-duedate,
s_cstl FOR gs_selections-castlenumber.
SELECTION-SCREEN END OF BLOCK blk1.
* Display Options
SELECTION-SCREEN BEGIN OF BLOCK blk2 WITH FRAME TITLE TEXT-002.
PARAMETERS: p_vari TYPE disvariant-variant.
PARAMETERS: p_edit AS CHECKBOX. "Open in Edit Mode
SELECTION-SCREEN END OF BLOCK blk2.
* Background Execution - send to email address
SELECTION-SCREEN BEGIN OF BLOCK blk4 WITH FRAME TITLE TEXT-004.
PARAMETERS: p_send AS CHECKBOX.
PARAMETERS: p_email TYPE ad_smtpadr.
SELECTION-SCREEN END OF BLOCK blk4.
**********************************************************************
* Initialisation
**********************************************************************
INITIALIZATION.
PERFORM initalisation.
*--------------------------------------------------------------------*
* Start-of-Selection
*--------------------------------------------------------------------*
START-OF-SELECTION.
"This nonsense is the only way I can avoid getting bogus syntax
"errors when doing a syntax check on the local class implementations
go_selections = NEW #(
is_date = s_date[]
is_cstl = s_cstl[]
ip_vari = p_vari
ip_edit = p_edit
ip_send = p_send
ip_email = p_email ).
IF zcl_bc_system_environment=>is_production( ) = abap_true.
PERFORM production_run.
ELSE.
PERFORM non_production_run.
ENDIF.
*----------------------------------------------------------------------*
* AT SELECTION-SCREEN ON VALUE-REQUEST *
*----------------------------------------------------------------------*
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_vari.
PERFORM f4_layouts USING cl_salv_layout=>restrict_none CHANGING p_vari.
*&---------------------------------------------------------------------*
*& Form F4_LAYOUTS
*&---------------------------------------------------------------------*
FORM f4_layouts USING pud_restrict TYPE salv_de_layout_restriction
CHANGING pcd_layout TYPE disvariant-variant.
DATA: ls_layout TYPE salv_s_layout_info,
ls_key TYPE salv_s_layout_key.
ls_key-report = sy-repid.
ls_layout = cl_salv_layout_service=>f4_layouts( s_key = ls_key
layout = pcd_layout
restrict = pud_restrict ).
pcd_layout = ls_layout-layout.
ENDFORM. " F4_LAYOUTS
**********************************************************************
* Class Implementations
**********************************************************************
INCLUDE z4_monster_adl_io1.
*&---------------------------------------------------------------------*
*& Form INITALISATION
*&---------------------------------------------------------------------*
FORM initalisation ##NEEDED.
ENDFORM. " INITALISATION
*&---------------------------------------------------------------------*
*& Form PRODUCTION_RUN
*&---------------------------------------------------------------------*
* In production we never want a short dump, but the "design by contract"
* things would just confuse the user
*&---------------------------------------------------------------------*
FORM production_run.
TRY.
lcl_application=>main( ).
CATCH cx_sy_no_handler INTO DATA(lo_no_handler).
"An exception was raised that was not caught at any point in the call stack
"Fatal Error concerning Class &1 - Please Call the Helpdesk
MESSAGE i012(z4monsters) WITH lo_no_handler->classname.
CATCH cx_root ##catch_all.
"We do not know what was happened, output a message instead of dumping
"Report in Trouble - please call the Helpdesk
MESSAGE i011(z4monsters).
ENDTRY.
ENDFORM.
*&---------------------------------------------------------------------*
*& Form NON_PRODUCTION_RUN
*&---------------------------------------------------------------------*
* Development / Test / Quality Assurance
* Here we DO want short dumps so we can analyse them, and we want the design by
* contract messages to make it obvious there is a bug and the code should not
* go to production
* Put another the way the two DBC exceptions are "impossible" errors that I
* am expecting to cause a dump. If any other sort of dump occurs then it is something
* I am not expecting and I want to know all about it
*&---------------------------------------------------------------------*
FORM non_production_run.
TRY.
lcl_application=>main( ).
CATCH zcx_violated_precondition INTO DATA(lo_precondition).
"A bug was detected at the start of a subroutine - the caller of the
"subroutine is at fault
lo_precondition->mo_error_log->popup( ).
CATCH zcx_violated_postcondition INTO DATA(lo_postcondition).
"A bug was detected at the end of a subroutine - the subroutine is
"at fault
lo_postcondition->mo_error_log->popup( ).
ENDTRY.
ENDFORM.
| [
9,
5,
10097,
30934,
9,
198,
9,
5,
6358,
220,
1168,
62,
27857,
41809,
62,
1404,
49,
4503,
9050,
62,
35,
8924,
62,
45849,
198,
9,
5,
198,
9,
5,
10097,
30934,
9,
198,
9,
770,
481,
905,
257,
1351,
286,
9167,
27817,
284,
307,
5364,
416,
198,
9,
10963,
422,
257,
1948,
8805,
11444,
16669,
319,
257,
1813,
1110,
198,
9,
383,
2836,
481,
11,
618,
262,
22809,
414,
4329,
2233,
11,
31935,
257,
9234,
198,
9,
770,
1321,
481,
307,
366,
79,
7474,
1,
416,
1724,
286,
262,
36239,
9355,
198,
9,
284,
597,
2491,
10245,
286,
262,
12635,
1629,
12204,
414,
18289,
543,
198,
9,
423,
45794,
284,
428,
1321,
198,
9,
383,
2496,
18289,
989,
481,
788,
4296,
2346,
1231,
262,
2836,
198,
9,
508,
318,
2491,
340,
1719,
284,
466,
1997,
357,
68,
13,
70,
13,
1803,
705,
5420,
3447,
27691,
198,
9,
10097,
650,
9,
198,
9,
3274,
11,
761,
284,
900,
37022,
286,
48323,
40156,
62,
47,
27143,
62,
3398,
22846,
3698,
796,
366,
55,
1,
198,
9,
3244,
761,
284,
8160,
262,
9564,
2969,
10626,
3039,
11102,
198,
9,
554,
28844,
34,
290,
3586,
4522,
290,
257,
6518,
423,
284,
307,
5447,
198,
9,
314,
716,
1262,
262,
4217,
47,
3275,
2099,
198,
9,
3244,
345,
366,
1929,
270,
46331,
1,
4056,
543,
460,
3758,
290,
3328,
1321,
198,
9,
10097,
650,
9,
198,
9,
314,
481,
787,
428,
257,
42475,
53,
989,
543,
481,
423,
257,
2836,
3141,
198,
9,
543,
8781,
262,
2836,
3853,
257,
9234,
290,
788,
2251,
262,
7585,
290,
198,
9,
2046,
572,
281,
36239,
2085,
82,
496,
284,
477,
18327,
2282,
262,
649,
7585,
198,
9,
468,
587,
2727,
198,
9,
10097,
650,
9,
198,
9,
6060,
16691,
24355,
198,
9,
10097,
650,
9,
198,
1268,
5097,
52,
7206,
1976,
19,
62,
39050,
62,
324,
75,
62,
4852,
13,
198,
198,
17174,
17174,
2466,
1174,
198,
9,
29538,
15216,
198,
17174,
17174,
2466,
1174,
198,
9,
12635,
48900,
6060,
198,
46506,
2849,
12,
6173,
2200,
1677,
347,
43312,
3963,
9878,
11290,
698,
74,
16,
13315,
8782,
10067,
37977,
2538,
40383,
12,
8298,
13,
198,
198,
46506,
12,
3185,
51,
11053,
25,
264,
62,
4475,
7473,
308,
82,
62,
19738,
507,
12,
646,
276,
378,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
264,
62,
66,
301,
75,
7473,
308,
82,
62,
19738,
507,
12,
2701,
11925,
4494,
13,
198,
198,
46506,
2849,
12,
6173,
2200,
1677,
23578,
3963,
9878,
11290,
698,
74,
16,
13,
198,
198,
9,
16531,
18634,
198,
46506,
2849,
12,
6173,
2200,
1677,
347,
43312,
3963,
9878,
11290,
698,
74,
17,
13315,
8782,
10067,
37977,
2538,
40383,
12,
21601,
13,
198,
27082,
2390,
2767,
4877,
25,
279,
62,
25641,
41876,
595,
25641,
415,
12,
25641,
415,
13,
198,
27082,
2390,
2767,
4877,
25,
279,
62,
19312,
7054,
5870,
25171,
39758,
13,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
11505,
287,
5312,
10363,
198,
46506,
2849,
12,
6173,
2200,
1677,
23578,
3963,
9878,
11290,
698,
74,
17,
13,
198,
198,
9,
25353,
37497,
532,
3758,
284,
3053,
2209,
198,
46506,
2849,
12,
6173,
2200,
1677,
347,
43312,
3963,
9878,
11290,
698,
74,
19,
13315,
8782,
10067,
37977,
2538,
40383,
12,
22914,
13,
198,
27082,
2390,
2767,
4877,
25,
279,
62,
21280,
220,
7054,
5870,
25171,
39758,
13,
198,
27082,
2390,
2767,
4877,
25,
279,
62,
12888,
41876,
512,
62,
5796,
83,
15636,
81,
13,
198,
46506,
2849,
12,
6173,
2200,
1677,
23578,
3963,
9878,
11290,
698,
74,
19,
13,
198,
198,
17174,
17174,
2466,
1174,
198,
9,
20768,
5612,
198,
17174,
17174,
2466,
1174,
198,
1268,
2043,
12576,
14887,
6234,
13,
198,
220,
19878,
21389,
287,
1287,
5612,
13,
198,
198,
9,
10097,
650,
9,
198,
9,
7253,
12,
1659,
12,
4653,
1564,
198,
9,
10097,
650,
9,
198,
2257,
7227,
12,
19238,
12,
46506,
2849,
13,
198,
220,
366,
1212,
18149,
318,
262,
691,
835,
314,
460,
3368,
1972,
33418,
15582,
198,
220,
366,
48277,
618,
1804,
257,
15582,
2198,
319,
262,
1957,
1398,
25504,
198,
220,
467,
62,
19738,
507,
796,
12682,
1303,
7,
198,
220,
220,
220,
220,
220,
318,
62,
4475,
220,
796,
264,
62,
4475,
21737,
198,
220,
220,
220,
220,
220,
318,
62,
66,
301,
75,
220,
796,
264,
62,
66,
301,
75,
21737,
198,
220,
220,
220,
220,
220,
20966,
62,
25641,
220,
796,
279,
62,
25641,
198,
220,
220,
220,
220,
220,
20966,
62,
19312,
220,
796,
279,
62,
19312,
198,
220,
220,
220,
220,
220,
20966,
62,
21280,
220,
796,
279,
62,
21280,
198,
220,
220,
220,
220,
220,
20966,
62,
12888,
796,
279,
62,
12888,
6739,
628,
220,
16876,
1976,
565,
62,
15630,
62,
10057,
62,
38986,
14804,
271,
62,
25493,
7,
1267,
796,
450,
499,
62,
7942,
13,
198,
220,
220,
220,
19878,
21389,
3227,
62,
5143,
13,
198,
220,
17852,
5188,
13,
198,
220,
220,
220,
19878,
21389,
1729,
62,
25493,
62,
5143,
13,
198,
220,
23578,
5064,
13,
198,
198,
9,
10097,
23031,
9,
198,
9,
5161,
33493,
2849,
12,
6173,
2200,
1677,
6177,
26173,
8924,
12,
2200,
35780,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1635,
198,
9,
10097,
23031,
9,
198,
1404,
33493,
2849,
12,
6173,
2200,
1677,
6177,
26173,
8924,
12,
2200,
35780,
7473,
279,
62,
25641,
13,
198,
220,
19878,
21389,
277,
19,
62,
10724,
5269,
1294,
2751,
537,
62,
21680,
85,
62,
39786,
14804,
2118,
2012,
62,
23108,
5870,
15567,
2751,
279,
62,
25641,
13,
198,
198,
9,
5,
10097,
30934,
9,
198,
9,
5,
220,
220,
220,
220,
220,
5178,
220,
376,
19,
62,
43,
4792,
2606,
4694,
198,
9,
5,
10097,
30934,
9,
198,
21389,
277,
19,
62,
10724,
5269,
1294,
2751,
220,
220,
220,
279,
463,
62,
2118,
2012,
41876,
24143,
62,
2934,
62,
39786,
62,
2118,
46214,
198,
220,
220,
220
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS zcl_aoc_check_35 DEFINITION
PUBLIC
INHERITING FROM zcl_aoc_super_root
CREATE PUBLIC .
PUBLIC SECTION.
METHODS constructor .
METHODS run
REDEFINITION .
PROTECTED SECTION.
PRIVATE SECTION.
TYPES:
ty_t100_tt TYPE STANDARD TABLE OF t100 WITH DEFAULT KEY.
METHODS analyze
IMPORTING
!it_t100 TYPE ty_t100_tt
RETURNING
VALUE(rv_code) TYPE sci_errc.
ENDCLASS.
CLASS ZCL_AOC_CHECK_35 IMPLEMENTATION.
METHOD analyze.
TYPES: BEGIN OF ty_cross,
name TYPE cross-name,
END OF ty_cross.
DATA: lt_cross TYPE TABLE OF ty_cross,
lt_name TYPE TABLE OF cross-name,
lv_name LIKE LINE OF lt_name.
FIELD-SYMBOLS: <ls_t100> LIKE LINE OF it_t100.
LOOP AT it_t100 ASSIGNING <ls_t100>.
CONCATENATE <ls_t100>-arbgb <ls_t100>-msgnr INTO lv_name RESPECTING BLANKS.
APPEND lv_name TO lt_name.
ENDLOOP.
ASSERT lines( lt_name ) > 0.
SELECT name FROM cross INTO TABLE lt_cross
FOR ALL ENTRIES IN lt_name
WHERE ( type = '3' OR type = 'N' )
AND name = lt_name-table_line. "#EC CI_SUBRC
SORT lt_cross BY name ASCENDING.
LOOP AT it_t100 ASSIGNING <ls_t100>.
CONCATENATE <ls_t100>-arbgb <ls_t100>-msgnr
INTO lv_name RESPECTING BLANKS.
READ TABLE lt_cross WITH KEY name = lv_name
BINARY SEARCH TRANSPORTING NO FIELDS.
IF sy-subrc = 0.
CONTINUE.
ENDIF.
SELECT COUNT( * ) FROM dd08l
WHERE arbgb = <ls_t100>-arbgb
AND msgnr = <ls_t100>-msgnr ##WARN_OK.
IF sy-subrc = 0.
CONTINUE.
ENDIF.
rv_code = '001'.
inform( p_sub_obj_type = object_type
p_sub_obj_name = object_name
p_test = myname
p_kind = mv_errty
p_code = rv_code
p_param_1 = <ls_t100>-msgnr ).
ENDLOOP.
ENDMETHOD.
METHOD constructor.
super->constructor( ).
version = '001'.
position = '035'.
has_documentation = abap_true.
has_attributes = abap_true.
attributes_ok = abap_true.
add_obj_type( 'MSAG' ).
insert_scimessage(
iv_code = '001'
iv_text = 'Message not in use, &1'(m01) ).
ENDMETHOD.
METHOD run.
* abapOpenChecks
* https://github.com/larshp/abapOpenChecks
* MIT License
DATA: lt_t100 TYPE ty_t100_tt.
IF object_type <> 'MSAG'.
RETURN.
ENDIF.
SELECT * FROM t100 INTO TABLE lt_t100
WHERE sprsl = sy-langu
AND arbgb = object_name. "#EC CI_GENBUFF
IF sy-subrc <> 0.
RETURN.
ENDIF.
analyze( lt_t100 ).
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
64,
420,
62,
9122,
62,
2327,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
3268,
16879,
2043,
2751,
16034,
1976,
565,
62,
64,
420,
62,
16668,
62,
15763,
198,
220,
29244,
6158,
44731,
764,
628,
220,
44731,
44513,
13,
628,
220,
220,
220,
337,
36252,
50,
23772,
764,
628,
220,
220,
220,
337,
36252,
50,
1057,
198,
220,
220,
220,
220,
220,
220,
220,
23848,
36,
20032,
17941,
764,
198,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
4810,
3824,
6158,
44513,
13,
628,
220,
220,
220,
24412,
47,
1546,
25,
198,
220,
220,
220,
220,
220,
1259,
62,
83,
3064,
62,
926,
41876,
49053,
9795,
43679,
3963,
256,
3064,
13315,
5550,
38865,
35374,
13,
628,
220,
220,
220,
337,
36252,
50,
16602,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
270,
62,
83,
3064,
220,
220,
220,
220,
220,
220,
41876,
1259,
62,
83,
3064,
62,
926,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
81,
85,
62,
8189,
8,
41876,
20681,
62,
263,
6015,
13,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1168,
5097,
62,
32,
4503,
62,
50084,
62,
2327,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
16602,
13,
628,
220,
220,
220,
24412,
47,
1546,
25,
347,
43312,
3963,
1259,
62,
19692,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1438,
41876,
3272,
12,
3672,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
23578,
3963,
1259,
62,
19692,
13,
628,
220,
220,
220,
42865,
25,
300,
83,
62,
19692,
41876,
43679,
3963,
1259,
62,
19692,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
83,
62,
3672,
220,
41876,
43679,
3963,
3272,
12,
3672,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
3672,
220,
34178,
48920,
3963,
300,
83,
62,
3672,
13,
628,
220,
220,
220,
18930,
24639,
12,
23060,
10744,
3535,
50,
25,
1279,
7278,
62,
83,
3064,
29,
34178,
48920,
3963,
340,
62,
83,
3064,
13,
628,
198,
220,
220,
220,
17579,
3185,
5161,
340,
62,
83,
3064,
24994,
3528,
15871,
1279,
7278,
62,
83,
3064,
28401,
198,
220,
220,
220,
220,
220,
39962,
1404,
1677,
6158,
1279,
7278,
62,
83,
3064,
29,
12,
38039,
22296,
1279,
7278,
62,
83,
3064,
29,
12,
907,
4593,
81,
39319,
300,
85,
62,
3672,
47203,
9782,
2751,
9878,
15154,
50,
13,
198,
220,
220,
220,
220,
220,
43504,
10619,
300,
85,
62,
3672,
5390,
300,
83,
62,
3672,
13,
198,
220,
220,
220,
23578,
21982,
3185,
13,
628,
220,
220,
220,
24994,
17395,
3951,
7,
300,
83,
62,
3672,
1267,
1875,
657,
13,
198,
220,
220,
220,
33493,
1438,
16034,
3272,
39319,
43679,
300,
83,
62,
19692,
198,
220,
220,
220,
220,
220,
7473,
11096,
12964,
5446,
11015,
3268,
300,
83,
62,
3672,
198,
220,
220,
220,
220,
220,
33411,
357,
2099,
796,
705,
18,
6,
6375,
2099,
796,
705,
45,
6,
1267,
198,
220,
220,
220,
220,
220,
5357,
1438,
796,
300,
83,
62,
3672,
12,
11487,
62,
1370,
13,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
25113,
2943,
14514,
62,
50,
10526,
7397,
198,
220,
220,
220,
311,
9863,
300,
83,
62,
19692,
11050,
1438,
25400,
10619,
2751,
13,
628,
220,
220,
220,
17579,
3185,
5161,
340,
62,
83,
3064,
24994,
3528,
15871,
1279,
7278,
62,
83,
3064,
28401,
628,
220,
220,
220,
220,
220,
39962,
1404,
1677,
6158,
1279,
7278,
62,
83,
3064,
29,
12,
38039,
22296,
1279,
7278,
62,
83,
3064,
29,
12,
907,
4593,
81,
198,
220,
220,
220,
220,
220,
220,
220,
39319,
300,
85,
62,
3672,
47203,
9782,
2751,
9878,
15154,
50,
13,
198,
220,
220,
220,
220,
220,
20832,
43679,
300,
83,
62,
19692,
13315,
35374,
1438,
796,
300,
85,
62,
3672,
198,
220,
220,
220,
220,
220,
220,
220,
347,
1268,
13153,
7946,
31315,
48213,
4303,
9863,
2751,
8005,
18930,
3698,
5258,
13,
198,
220,
220,
220,
220,
220,
16876,
827,
12,
7266,
6015,
796,
657,
13,
198,
220,
220,
220,
220,
220,
220,
220,
43659,
8924,
13,
198,
220,
220,
220,
220,
220,
23578,
5064,
13,
628,
220,
220,
220,
220,
220,
33493,
327,
28270,
7,
1635,
1267,
16034,
49427,
2919,
75,
198,
220,
220,
220,
220,
220,
220,
220,
33411,
610,
65,
22296,
796,
1279,
7278,
62,
83,
3064,
29,
12,
38039,
22296,
198,
220,
220,
220,
220,
220,
220,
220,
5357,
13845,
4593,
81,
796,
1279,
7278,
62,
83,
3064,
29,
12,
907,
4593,
81,
22492,
37771,
62,
11380,
13,
198,
220,
220,
220,
220,
220,
16876,
827,
12,
7266,
6015,
796,
657,
13,
198,
220,
220,
220,
220,
220,
220,
220,
43659,
8924,
13,
198,
220,
220,
220,
220,
220,
23578,
5064,
13,
628,
220,
220,
220,
220,
220,
374,
85,
62,
8189,
796,
705,
8298,
4458,
198,
220,
220,
220,
220,
220,
4175,
7,
279,
62,
7266,
62,
26801,
62,
4906,
796,
2134,
62,
4906,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
279,
62,
7266,
62,
26801,
62,
3672,
796,
2134,
62,
3672,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
279,
62,
9288,
220,
220,
220,
220,
220,
220,
220,
220,
796,
616,
3672,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
279,
62,
11031,
220,
220,
220,
220,
220,
220,
220,
220,
796,
285,
85,
62,
8056,
774,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
279,
62,
8189,
220,
220,
220,
220,
220,
220,
220,
220,
796,
374,
85,
62,
8189,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
279,
62,
17143,
62,
16,
220,
220,
220,
220,
220,
796,
1279,
7278,
62,
83,
3064,
29,
12,
907,
4593,
81,
6739,
198,
220,
220,
220,
23578,
21982,
3185,
13,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
23772
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
"! <p class="shorttext synchronized" lang="en">Utitlity methods for Tables for Selection Controller</p>
CLASS zcl_dbbr_table_selection_util DEFINITION
PUBLIC
INHERITING FROM zcl_dbbr_selection_util
CREATE PUBLIC .
PUBLIC SECTION.
METHODS execute_function
REDEFINITION .
METHODS get_entity_name
REDEFINITION .
METHODS init
REDEFINITION .
METHODS zif_dbbr_screen_util~get_deactivated_functions
REDEFINITION.
METHODS zif_dbbr_screen_util~handle_ui_function
REDEFINITION .
PROTECTED SECTION.
"! <p class="shorttext synchronized" lang="en">Maintain data for the selection criteria</p>
METHODS edit_data
IMPORTING
if_called_from_output TYPE abap_bool OPTIONAL.
"! <p class="shorttext synchronized" lang="en">Delete data for the given selection criteria</p>
METHODS delete_data .
METHODS read_entity_infos
REDEFINITION .
PRIVATE SECTION.
ENDCLASS.
CLASS zcl_dbbr_table_selection_util IMPLEMENTATION.
METHOD delete_data.
build_full_fieldnames( ).
create_where_clause( ).
create_from_clause( ).
TRY.
select_data( if_count_lines = abap_true ).
CATCH zcx_dbbr_application_exc INTO DATA(lx_appl_exc).
lx_appl_exc->show_message( iv_message_type = 'I' ).
RETURN.
ENDTRY.
" if no selection occurred, prevent screen visibility
IF mv_selected_lines <= 0.
MESSAGE i060(zdbbr_info).
ELSE.
DATA(lv_number_of_lines) = |{ mv_selected_lines NUMBER = USER }|.
DATA(lv_result) = zcl_dbbr_appl_util=>popup_to_confirm(
iv_title = 'Delete Rows?'
iv_query = |Are you sure you want to delete { lv_number_of_lines } from the Table | &&
| { ms_control_info-primary_table }?|
if_display_cancel_button = abap_true
iv_icon_type = 'ICON_WARNING'
).
IF lv_result = '2' OR lv_result = 'A'.
MESSAGE i008(zdbbr_exception).
ELSE.
" delete lines
DELETE FROM (mt_from)
WHERE (mt_where).
IF sy-subrc = 0.
COMMIT WORK AND WAIT.
MESSAGE i061(zdbbr_info) WITH |{ lv_number_of_lines }| ms_control_info-primary_table.
ENDIF.
ENDIF.
ENDIF.
ENDMETHOD.
METHOD edit_data.
DATA: lr_iterator TYPE REF TO zif_uitb_data_ref_iterator,
lr_field TYPE REF TO zdbbr_tabfield_info_ui,
lr_s_output_field TYPE REF TO data.
FIELD-SYMBOLS: <lt_or_selfields> TYPE table,
<lt_output_selfields> TYPE table.
DATA(lo_output_fields_table) = zcl_uitb_data_list=>create_for_table_name( 'SE16N_OUTPUT' ).
DATA(lo_or_selfields_table) = zcl_uitb_data_list=>create_for_table_name( 'SE16N_OR_SELTAB' ).
IF if_called_from_output = abap_true.
mo_alv_grid->get_frontend_fieldcatalog( IMPORTING et_fieldcatalog = DATA(lt_fieldcat2) ).
LOOP AT lt_fieldcat2 ASSIGNING FIELD-SYMBOL(<ls_fieldcat>) WHERE no_out = abap_false
AND tech = abap_false.
lr_s_output_field = lo_output_fields_table->create_new_line( ).
lo_output_fields_table->fill_component(
ir_s_element = lr_s_output_field
iv_comp_name = 'FIELD'
iv_value = <ls_fieldcat>-fieldname
).
ENDLOOP.
ELSE.
mo_tabfields->switch_mode( zif_dbbr_c_global=>c_field_chooser_modes-output ).
lr_iterator = mo_tabfields->get_iterator( if_for_active = abap_true ).
WHILE lr_iterator->has_next( ).
lr_field = CAST zdbbr_tabfield_info_ui( lr_iterator->get_next( ) ).
lr_s_output_field = lo_output_fields_table->create_new_line( ).
lo_output_fields_table->fill_component(
ir_s_element = lr_s_output_field
iv_comp_name = 'FIELD'
iv_value = lr_field->fieldname
).
ENDWHILE.
ENDIF.
IF mt_or IS INITIAL.
create_where_clause( ).
ENDIF.
LOOP AT mt_or ASSIGNING FIELD-SYMBOL(<ls_or>).
DATA(lr_s_or_tuple) = lo_or_selfields_table->create_new_line( ).
lo_or_selfields_table->fill_component(
ir_s_element = lr_s_or_tuple
iv_comp_name = 'POS'
iv_value = <ls_or>-pos
).
lo_or_selfields_table->fill_component(
ir_s_element = lr_s_or_tuple
iv_comp_name = 'SELTAB'
iv_value = <ls_or>-values
if_use_corresponding = abap_true
).
ENDLOOP.
DATA(lr_t_or_selfields) = lo_or_selfields_table->get_all( ).
DATA(lr_t_output_selfields) = lo_output_fields_table->get_all( ).
ASSIGN lr_t_or_selfields->* TO <lt_or_selfields>.
ASSIGN lr_t_output_selfields->* TO <lt_output_selfields>.
CALL FUNCTION 'SE16N_INTERFACE'
EXPORTING
i_tab = ms_control_info-primary_table
i_edit = abap_true
i_sapedit = abap_true
i_max_lines = ms_technical_info-max_lines
i_clnt_dep = ms_control_info-client_dependent
i_tech_names = ms_technical_info-tech_names
i_uname = sy-uname
TABLES
it_or_selfields = <lt_or_selfields>
it_output_fields = <lt_output_selfields>
EXCEPTIONS
no_values = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDMETHOD.
METHOD get_entity_name.
result = mv_entity_id.
ENDMETHOD.
METHOD init.
ENDMETHOD.
METHOD read_entity_infos.
DATA(ls_table_info) = zcl_sat_ddic_repo_access=>get_table_info( ms_control_info-primary_table ).
ms_control_info-primary_table_name = ls_table_info-ddtext.
ms_control_info-client_dependent = ls_table_info-clidep.
ms_control_info-primary_table_tabclass = ls_table_info-tabclass.
ENDMETHOD.
METHOD zif_dbbr_screen_util~get_deactivated_functions.
result = VALUE #(
( LINES OF super->get_deactivated_functions( ) )
( zif_dbbr_c_selection_functions=>navigate_association )
).
IF mf_group_by = abap_false AND
mf_aggregation = abap_false AND
ms_control_info-primary_table_tabclass = 'TRANSP' AND
ms_technical_info-advanced_mode = abap_true AND
zcl_dbbr_dep_feature_util=>is_se16n_available( ).
DELETE result WHERE table_line = zif_dbbr_c_selection_functions=>edit_data.
ENDIF.
ENDMETHOD.
METHOD zif_dbbr_screen_util~handle_ui_function.
CASE cv_function.
WHEN zif_dbbr_c_selection_functions=>edit_data.
CLEAR cv_function.
edit_data( if_called_from_output = abap_true ).
ENDCASE.
IF cv_function IS NOT INITIAL.
super->handle_ui_function( CHANGING cv_function = cv_function ).
ENDIF.
ENDMETHOD.
METHOD execute_function.
CASE iv_function.
WHEN zif_dbbr_c_selection_functions=>edit_data.
edit_data( ).
WHEN zif_dbbr_c_selection_functions=>delete_data.
delete_data( ).
ENDCASE.
ENDMETHOD.
ENDCLASS.
| [
40484,
1279,
79,
1398,
2625,
19509,
5239,
47192,
1,
42392,
2625,
268,
5320,
18274,
270,
75,
414,
5050,
329,
33220,
329,
29538,
22741,
3556,
79,
29,
198,
31631,
1976,
565,
62,
9945,
1671,
62,
11487,
62,
49283,
62,
22602,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
3268,
16879,
2043,
2751,
16034,
1976,
565,
62,
9945,
1671,
62,
49283,
62,
22602,
198,
220,
29244,
6158,
44731,
764,
628,
220,
44731,
44513,
13,
628,
220,
220,
220,
337,
36252,
50,
12260,
62,
8818,
198,
220,
220,
220,
220,
220,
220,
220,
23848,
36,
20032,
17941,
764,
198,
220,
220,
220,
337,
36252,
50,
651,
62,
26858,
62,
3672,
198,
220,
220,
220,
220,
220,
220,
220,
23848,
36,
20032,
17941,
764,
198,
220,
220,
220,
337,
36252,
50,
2315,
198,
220,
220,
220,
220,
220,
220,
220,
23848,
36,
20032,
17941,
764,
198,
220,
220,
220,
337,
36252,
50,
1976,
361,
62,
9945,
1671,
62,
9612,
62,
22602,
93,
1136,
62,
2934,
33106,
62,
12543,
2733,
198,
220,
220,
220,
220,
220,
220,
220,
23848,
36,
20032,
17941,
13,
198,
220,
220,
220,
337,
36252,
50,
1976,
361,
62,
9945,
1671,
62,
9612,
62,
22602,
93,
28144,
62,
9019,
62,
8818,
198,
220,
220,
220,
220,
220,
220,
220,
23848,
36,
20032,
17941,
764,
198,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
220,
220,
366,
0,
1279,
79,
1398,
2625,
19509,
5239,
47192,
1,
42392,
2625,
268,
5320,
44,
32725,
1366,
329,
262,
6356,
9987,
3556,
79,
29,
198,
220,
220,
220,
337,
36252,
50,
4370,
62,
7890,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
611,
62,
7174,
62,
6738,
62,
22915,
41876,
450,
499,
62,
30388,
39852,
2849,
1847,
13,
198,
220,
220,
220,
366,
0,
1279,
79,
1398,
2625,
19509,
5239,
47192,
1,
42392,
2625,
268,
5320,
38727,
1366,
329,
262,
1813,
6356,
9987,
3556,
79,
29,
198,
220,
220,
220,
337,
36252,
50,
12233,
62,
7890,
764,
198,
220,
220,
220,
337,
36252,
50,
1100,
62,
26858,
62,
10745,
418,
198,
220,
220,
220,
220,
220,
220,
220,
23848,
36,
20032,
17941,
764,
198,
220,
4810,
3824,
6158,
44513,
13,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1976,
565,
62,
9945,
1671,
62,
11487,
62,
49283,
62,
22602,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
12233,
62,
7890,
13,
198,
220,
220,
220,
1382,
62,
12853,
62,
3245,
14933,
7,
6739,
198,
220,
220,
220,
2251,
62,
3003,
62,
565,
682,
7,
6739,
198,
220,
220,
220,
2251,
62,
6738,
62,
565,
682,
7,
6739,
628,
220,
220,
220,
7579,
56,
13,
198,
220,
220,
220,
220,
220,
220,
220,
2922,
62,
7890,
7,
611,
62,
9127,
62,
6615,
796,
450,
499,
62,
7942,
6739,
198,
220,
220,
220,
220,
220,
327,
11417,
1976,
66,
87,
62,
9945,
1671,
62,
31438,
62,
41194,
39319,
42865,
7,
75,
87,
62,
1324,
75,
62,
41194,
737,
198,
220,
220,
220,
220,
220,
220,
220,
300,
87,
62,
1324,
75,
62,
41194,
3784,
12860,
62,
20500,
7,
21628,
62,
20500,
62,
4906,
796,
705,
40,
6,
6739,
198,
220,
220,
220,
220,
220,
220,
220,
30826,
27064,
13,
198,
220,
220,
220,
23578,
40405,
13,
628,
220,
220,
220,
366,
611,
645,
6356,
5091,
11,
2948,
3159,
20742,
198,
220,
220,
220,
16876,
285,
85,
62,
34213,
62,
6615,
19841,
657,
13,
198,
220,
220,
220,
220,
220,
337,
1546,
4090,
8264,
1312,
41322,
7,
89,
9945,
1671,
62,
10951,
737,
198,
220,
220,
220,
17852,
5188,
13,
198,
220,
220,
220,
220,
220,
42865,
7,
6780,
62,
17618,
62,
1659,
62,
6615,
8,
796,
930,
90,
285,
85,
62,
34213,
62,
6615,
36871,
13246,
796,
1294,
1137,
1782,
91,
13,
628,
220,
220,
220,
220,
220,
42865,
7,
6780,
62,
20274,
8,
796,
1976,
565,
62,
9945,
1671,
62,
1324,
75,
62,
22602,
14804,
12924,
929,
62,
1462,
62,
10414,
2533,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
7839,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
705,
38727,
371,
1666,
8348,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
22766,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
930,
8491,
345,
1654,
345,
765,
284,
12233,
1391,
300,
85,
62,
17618,
62,
1659,
62,
6615,
1782,
422,
262,
8655,
930,
11405,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
930,
1391,
13845,
62,
13716,
62,
10951,
12,
39754,
62,
11487,
1782,
30,
91,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
611,
62,
13812,
62,
66,
21130,
62,
16539,
796,
450,
499,
62,
7942,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
4749,
62,
4906,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
705,
2149,
1340,
62,
31502,
6,
198,
220,
220,
220,
220,
220,
6739,
628,
220,
220,
220,
220,
220,
16876,
300,
85,
62,
20274,
796,
705,
17,
6,
6375,
300,
85,
62,
20274,
796,
705,
32,
4458,
198,
220,
220,
220,
220,
220,
220,
220,
337,
1546,
4090,
8264,
1312,
25257,
7,
89,
9945,
1671,
62,
1069,
4516,
737,
198,
220,
220,
220,
220,
220,
17852,
5188,
13,
628,
220,
220,
220,
220,
220,
220,
220,
366,
12233,
3951,
198,
220,
220,
220,
220,
220,
220,
220,
5550,
2538,
9328,
16034,
357,
16762,
62,
6738,
8,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
33411,
357,
16762,
62,
3003,
737,
628,
220,
220,
220,
220,
220,
220,
220,
16876,
827,
12,
7266,
6015,
796,
657,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
22240,
2043,
30936,
5357,
16400,
2043,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
337,
1546,
4090,
8264,
1312,
3312,
16,
7,
89,
9945,
1671,
62,
10951,
8,
13315,
930,
90,
300,
85,
62,
17618,
62
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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EMENTATION.
METHOD zif_abapgit_object~changed_by.
rv_user = c_user_unknown.
ENDMETHOD.
METHOD zif_abapgit_object~compare_to_remote_version.
CREATE OBJECT ro_comparison_result TYPE zcl_abapgit_comparison_null.
ENDMETHOD.
METHOD zif_abapgit_object~delete.
DATA: li_srfc_persist TYPE REF TO if_wb_object_persist,
lx_error TYPE REF TO cx_root,
lv_text TYPE string.
TRY.
CREATE OBJECT li_srfc_persist TYPE ('CL_UCONRFC_OBJECT_PERSIST').
li_srfc_persist->delete( p_object_key = |{ ms_item-obj_name }|
p_version = 'A' ).
CATCH cx_root INTO lx_error.
lv_text = lx_error->get_text( ).
zcx_abapgit_exception=>raise( lv_text ).
ENDTRY.
ENDMETHOD.
METHOD zif_abapgit_object~deserialize.
DATA: li_srfc_persist TYPE REF TO if_wb_object_persist,
li_object_data TYPE REF TO if_wb_object_data_model,
lv_text TYPE string,
lr_srfc_data TYPE REF TO data,
lx_error TYPE REF TO cx_root.
FIELD-SYMBOLS: <lg_srfc_data> TYPE any.
TRY.
CREATE DATA lr_srfc_data TYPE ('UCONRFCSERV_COMPLETE').
ASSIGN lr_srfc_data->* TO <lg_srfc_data>.
ASSERT sy-subrc = 0.
io_xml->read(
EXPORTING
iv_name = 'SRFC'
CHANGING
cg_data = <lg_srfc_data> ).
CREATE OBJECT li_srfc_persist TYPE ('CL_UCONRFC_OBJECT_PERSIST').
CREATE OBJECT li_object_data TYPE ('CL_UCONRFC_OBJECT_DATA').
li_object_data->set_data( <lg_srfc_data> ).
li_srfc_persist->save( li_object_data ).
tadir_insert( iv_package ).
CATCH cx_root INTO lx_error.
lv_text = lx_error->get_text( ).
zcx_abapgit_exception=>raise( lv_text ).
ENDTRY.
ENDMETHOD.
METHOD zif_abapgit_object~exists.
DATA: li_object_data TYPE REF TO if_wb_object_data_model,
li_srfc_persist TYPE REF TO if_wb_object_persist.
TRY.
CREATE OBJECT li_srfc_persist TYPE ('CL_UCONRFC_OBJECT_PERSIST').
li_srfc_persist->get(
EXPORTING
p_object_key = |{ ms_item-obj_name }|
p_version = 'A'
CHANGING
p_object_data = li_object_data ).
CATCH cx_root.
rv_bool = abap_false.
RETURN.
ENDTRY.
rv_bool = abap_true.
ENDMETHOD.
METHOD zif_abapgit_object~get_metadata.
rs_metadata = get_metadata( ).
rs_metadata-delete_tadir = abap_true.
ENDMETHOD.
METHOD zif_abapgit_object~has_changed_since.
rv_changed = abap_true.
ENDMETHOD.
METHOD zif_abapgit_object~jump.
CALL FUNCTION 'RS_TOOL_ACCESS'
EXPORTING
operation = 'SHOW'
object_name = ms_item-obj_name " Object Name
object_type = ms_item-obj_type " Object Type
in_new_window = abap_true
EXCEPTIONS
not_executed = 1
invalid_object_type = 2
OTHERS = 3.
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( 'error from RS_TOOL_ACCESS' ).
ENDIF.
ENDMETHOD.
METHOD zif_abapgit_object~serialize.
DATA: li_object_data TYPE REF TO if_wb_object_data_model,
li_srfc_persist TYPE REF TO if_wb_object_persist,
lr_srfc_data TYPE REF TO data,
lx_error TYPE REF TO cx_root,
lv_text TYPE string.
FIELD-SYMBOLS: <lg_srfc_data> TYPE any.
TRY.
CREATE DATA lr_srfc_data TYPE ('UCONRFCSERV_COMPLETE').
ASSIGN lr_srfc_data->* TO <lg_srfc_data>.
ASSERT sy-subrc = 0.
CREATE OBJECT li_srfc_persist TYPE ('CL_UCONRFC_OBJECT_PERSIST').
li_srfc_persist->get(
EXPORTING
p_object_key = |{ ms_item-obj_name }|
p_version = 'A'
CHANGING
p_object_data = li_object_data ).
li_object_data->get_data(
IMPORTING
p_data = <lg_srfc_data> ).
CATCH cx_root INTO lx_error.
lv_text = lx_error->get_text( ).
zcx_abapgit_exception=>raise( lv_text ).
ENDTRY.
io_xml->add( iv_name = 'SRFC'
ig_data = <lg_srfc_data> ).
ENDMETHOD.
METHOD zif_abapgit_object~is_locked.
rv_is_locked = abap_false.
ENDMETHOD.
METHOD zif_abapgit_object~is_active.
rv_active = is_active( ).
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
397,
499,
18300,
62,
15252,
62,
27891,
16072,
5550,
20032,
17941,
44731,
3268,
16879,
2043,
2751,
16034,
1976,
565,
62,
397,
499,
18300,
62,
48205,
62,
16668,
25261,
13,
628,
220,
44731,
44513,
13,
198,
220,
220,
220,
23255,
37,
2246,
1546,
1976,
361,
62,
397,
499,
18300,
62,
15252,
13,
198,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1976,
565,
62,
397,
499,
18300,
62,
15252,
62,
27891,
16072,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
1976,
361,
62,
397,
499,
18300,
62,
15252,
93,
40985,
62,
1525,
13,
628,
220,
220,
220,
374,
85,
62,
7220,
796,
269,
62,
7220,
62,
34680,
13,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
1976,
361,
62,
397,
499,
18300,
62,
15252,
93,
5589,
533,
62,
1462,
62,
47960,
62,
9641,
13,
628,
220,
220,
220,
29244,
6158,
25334,
23680,
686,
62,
785,
1845,
1653,
62,
20274,
41876,
1976,
565,
62,
397,
499,
18300,
62,
785,
1845,
1653,
62,
8423,
13,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
1976,
361,
62,
397,
499,
18300,
62,
15252,
93,
33678,
13,
628,
220,
220,
220,
42865,
25,
7649,
62,
27891,
16072,
62,
19276,
396,
41876,
4526,
37,
5390,
611,
62,
39346,
62,
15252,
62,
19276,
396,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
87,
62,
18224,
220,
220,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
43213,
62,
15763,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
5239,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4731,
13,
628,
220,
220,
220,
7579,
56,
13,
198,
220,
220,
220,
220,
220,
220,
220,
29244,
6158,
25334,
23680,
7649,
62,
27891,
16072,
62,
19276,
396,
41876,
19203,
5097,
62,
9598,
1340,
41150,
62,
9864,
23680,
62,
47,
4877,
8808,
27691,
628,
220,
220,
220,
220,
220,
220,
220,
7649,
62,
27891,
16072,
62,
19276,
396,
3784,
33678,
7,
279,
62,
15252,
62,
2539,
796,
930,
90,
13845,
62,
9186,
12,
26801,
62,
3672,
1782,
91,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
279,
62,
9641,
220,
220,
220,
796,
705,
32,
6,
6739,
628,
220,
220,
220,
220,
220,
327,
11417,
43213,
62,
15763,
39319,
300,
87,
62,
18224,
13,
198,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
5239,
796,
300,
87,
62,
18224,
3784,
1136,
62,
5239,
7,
6739,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
14804,
40225,
7,
300,
85,
62,
5239,
6739,
198,
220,
220,
220,
23578,
40405,
13,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
1976,
361,
62,
397,
499,
18300,
62,
15252,
93,
8906,
48499,
1096,
13,
628,
220,
220,
220,
42865,
25,
7649,
62,
27891,
16072,
62,
19276,
396,
41876,
4526,
37,
5390,
611,
62,
39346,
62,
15252,
62,
19276,
396,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7649,
62,
15252,
62,
7890,
220,
41876,
4526,
37,
5390,
611,
62,
39346,
62,
15252,
62,
7890,
62,
19849,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
5239,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
81,
62,
27891,
16072,
62,
7890,
220,
220,
220,
41876,
4526,
37,
5390,
1366,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
87,
62,
18224,
220,
220,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
43213,
62,
15763,
13,
628,
220,
220,
220,
18930,
24639,
12,
23060,
10744,
3535,
50,
25,
1279,
75,
70,
62,
27891,
16072,
62,
7890,
29,
41876,
597,
13,
628,
198,
220,
220,
220,
7579,
56,
13,
198,
220,
220,
220,
220,
220,
220,
220,
29244,
6158,
42865,
300,
81,
62,
27891,
16072,
62,
7890,
41876,
19203,
9598,
1340,
41150,
35009,
53,
62,
41335,
9328,
27691,
198,
220,
220,
220,
220,
220,
220,
220,
24994,
16284,
300,
81,
62,
27891,
16072,
62,
7890,
3784,
9,
5390,
1279,
75,
70,
62,
27891,
16072,
62,
7890,
28401,
198,
220,
220,
220,
220,
220,
220,
220,
24994,
17395,
827,
12,
7266,
6015,
796,
657,
13,
628,
220,
220,
220,
220,
220,
220,
220,
33245,
62,
19875,
3784,
961,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
3672,
796,
705,
12562,
4851,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5870,
15567,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
269,
70,
62,
7890,
796,
1279,
75,
70,
62,
27891,
16072,
62,
7890,
29,
6739,
628,
220,
220,
220,
220,
220,
220,
220,
29244,
6158,
25334,
23680,
7649,
62,
27891,
16072,
62,
19276,
396,
41876,
19203,
5097,
62,
9598,
1340,
41150,
62,
9864,
23680,
62,
47,
4877,
8808,
27691,
198,
220,
220,
220,
220,
220,
220,
220,
29244,
6158,
25334,
23680,
7649,
62,
15252,
62,
7890,
41876,
19203,
5097,
62,
9598,
1340,
41150,
62,
9864,
23680,
62,
26947,
27691,
628,
220,
220,
220,
220,
220,
220,
220,
7649,
62,
15252,
62,
7890,
3784,
2617,
62,
7890,
7,
1279,
75,
70,
62,
27891,
16072,
62,
7890,
29,
6739,
628,
220,
220,
220,
220,
220,
220,
220,
7649,
62,
27891,
16072,
62,
19276,
396,
3784,
21928,
7,
7649,
62,
15252,
62,
7890,
6739,
628,
220,
220,
220,
220,
220,
220,
220,
36264,
343,
62,
28463,
7,
21628,
62,
26495,
6739,
628,
220,
220,
220,
220,
220,
327,
11417,
43213,
62,
15763,
39319,
300,
87,
62,
18224,
13,
198,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
5239,
796,
300,
87,
62,
18224,
3784,
1136,
62,
5239,
7,
6739,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
14804,
40225,
7,
300,
85,
62,
5239,
6739,
198,
220,
220,
220,
23578,
40405,
13,
628
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
*&---------------------------------------------------------------------*
*& Report ZDEMO_EXCEL2
*& Test Styles for ABAP2XLSX
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT zdemo_excel35.
DATA: lo_excel TYPE REF TO zcl_excel,
lo_excel_writer TYPE REF TO zif_excel_writer,
lo_worksheet TYPE REF TO zcl_excel_worksheet,
lo_style_bold TYPE REF TO zcl_excel_style,
lo_style_underline TYPE REF TO zcl_excel_style,
lo_style_filled TYPE REF TO zcl_excel_style,
lo_style_border TYPE REF TO zcl_excel_style,
lo_style_button TYPE REF TO zcl_excel_style,
lo_border_dark TYPE REF TO zcl_excel_style_border,
lo_border_light TYPE REF TO zcl_excel_style_border.
DATA: lv_style_bold_guid TYPE zexcel_cell_style,
lv_style_underline_guid TYPE zexcel_cell_style,
lv_style_filled_guid TYPE zexcel_cell_style,
lv_style_filled_green_guid TYPE zexcel_cell_style,
lv_style_border_guid TYPE zexcel_cell_style,
lv_style_button_guid TYPE zexcel_cell_style,
lv_style_filled_turquoise_guid TYPE zexcel_cell_style.
DATA: lv_file TYPE xstring,
lv_bytecount TYPE i,
lt_file_tab TYPE solix_tab.
DATA: lv_full_path TYPE string,
lv_workdir TYPE string,
lv_file_separator TYPE c.
CONSTANTS: lv_default_file_name TYPE string VALUE '35_Static_Styles.xlsx'.
PARAMETERS: p_path TYPE zexcel_export_dir.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_path.
lv_workdir = p_path.
cl_gui_frontend_services=>directory_browse( EXPORTING initial_folder = lv_workdir
CHANGING selected_folder = lv_workdir ).
p_path = lv_workdir.
INITIALIZATION.
cl_gui_frontend_services=>get_desktop_directory( CHANGING desktop_directory = lv_workdir ).
cl_gui_cfw=>flush( ).
p_path = lv_workdir.
START-OF-SELECTION.
IF p_path IS INITIAL.
p_path = lv_workdir.
ENDIF.
cl_gui_frontend_services=>get_file_separator( CHANGING file_separator = lv_file_separator ).
CONCATENATE p_path lv_file_separator lv_default_file_name INTO lv_full_path.
" Creates active sheet
CREATE OBJECT lo_excel.
" Create border object
CREATE OBJECT lo_border_dark.
lo_border_dark->border_color-rgb = zcl_excel_style_color=>c_black.
lo_border_dark->border_style = zcl_excel_style_border=>c_border_thin.
CREATE OBJECT lo_border_light.
lo_border_light->border_color-rgb = zcl_excel_style_color=>c_gray.
lo_border_light->border_style = zcl_excel_style_border=>c_border_thin.
" Create a bold / italic style
lo_style_bold = lo_excel->add_new_style( ).
lo_style_bold->font->bold = abap_true.
lo_style_bold->font->italic = abap_true.
lo_style_bold->font->name = zcl_excel_style_font=>c_name_arial.
lo_style_bold->font->scheme = zcl_excel_style_font=>c_scheme_none.
lo_style_bold->font->color-rgb = zcl_excel_style_color=>c_red.
lv_style_bold_guid = lo_style_bold->get_guid( ).
" Create an underline double style
lo_style_underline = lo_excel->add_new_style( ).
lo_style_underline->font->underline = abap_true.
lo_style_underline->font->underline_mode = zcl_excel_style_font=>c_underline_double.
lo_style_underline->font->name = zcl_excel_style_font=>c_name_roman.
lo_style_underline->font->scheme = zcl_excel_style_font=>c_scheme_none.
lo_style_underline->font->family = zcl_excel_style_font=>c_family_roman.
lv_style_underline_guid = lo_style_underline->get_guid( ).
" Create filled style yellow
lo_style_filled = lo_excel->add_new_style( ).
lo_style_filled->fill->filltype = zcl_excel_style_fill=>c_fill_solid.
lo_style_filled->fill->fgcolor-theme = zcl_excel_style_color=>c_theme_accent6.
lv_style_filled_guid = lo_style_filled->get_guid( ).
" Create border with button effects
lo_style_button = lo_excel->add_new_style( ).
lo_style_button->borders->right = lo_border_dark.
lo_style_button->borders->down = lo_border_dark.
lo_style_button->borders->left = lo_border_light.
lo_style_button->borders->top = lo_border_light.
lv_style_button_guid = lo_style_button->get_guid( ).
"Create style with border
lo_style_border = lo_excel->add_new_style( ).
lo_style_border->borders->allborders = lo_border_dark.
lo_style_border->borders->diagonal = lo_border_dark.
lo_style_border->borders->diagonal_mode = zcl_excel_style_borders=>c_diagonal_both.
lv_style_border_guid = lo_style_border->get_guid( ).
" Create filled style green
lo_style_filled = lo_excel->add_new_style( ).
lo_style_filled->fill->filltype = zcl_excel_style_fill=>c_fill_solid.
lo_style_filled->fill->fgcolor-rgb = zcl_excel_style_color=>c_green.
lo_style_filled->font->name = zcl_excel_style_font=>c_name_cambria.
lo_style_filled->font->scheme = zcl_excel_style_font=>c_scheme_major.
lv_style_filled_green_guid = lo_style_filled->get_guid( ).
" Create filled style turquoise using legacy excel ver <= 2003 palette. (https://code.sdn.sap.com/spaces/abap2xlsx/tickets/92)
lo_style_filled = lo_excel->add_new_style( ).
lo_excel->legacy_palette->set_color( "replace built-in color from palette with out custom RGB turquoise
ip_index = 16
ip_color = '0040E0D0' ).
lo_style_filled->fill->filltype = zcl_excel_style_fill=>c_fill_solid.
lo_style_filled->fill->fgcolor-indexed = 16.
lv_style_filled_turquoise_guid = lo_style_filled->get_guid( ).
" Get active sheet
lo_worksheet = lo_excel->get_active_worksheet( ).
lo_worksheet->set_title( ip_title = 'Styles' ).
lo_worksheet->set_cell( ip_column = 'B' ip_row = 2 ip_value = 'Hello world' ).
lo_worksheet->set_cell( ip_column = 'C' ip_row = 3 ip_value = 'Bold text' ip_style = lv_style_bold_guid ).
lo_worksheet->set_cell( ip_column = 'D' ip_row = 4 ip_value = 'Underlined text' ip_style = lv_style_underline_guid ).
lo_worksheet->set_cell( ip_column = 'B' ip_row = 5 ip_value = 'Filled text' ip_style = lv_style_filled_guid ).
lo_worksheet->set_cell( ip_column = 'C' ip_row = 6 ip_value = 'Borders' ip_style = lv_style_border_guid ).
lo_worksheet->set_cell( ip_column = 'D' ip_row = 7 ip_value = 'I''m not a button :)' ip_style = lv_style_button_guid ).
lo_worksheet->set_cell( ip_column = 'B' ip_row = 9 ip_value = 'Modified color for Excel 2003' ip_style = lv_style_filled_turquoise_guid ).
" Fill the cell and apply one style
lo_worksheet->set_cell( ip_column = 'B' ip_row = 6 ip_value = 'Filled text' ip_style = lv_style_filled_guid ).
" Change the style
lo_worksheet->set_cell_style( ip_column = 'B' ip_row = 6 ip_style = lv_style_filled_green_guid ).
" Add Style to an empty cell to test Fix for Issue
"#44 Exception ZCX_EXCEL thrown when style is set for an empty cell
" https://code.sdn.sap.com/spaces/abap2xlsx/tickets/44-exception-zcx_excel-thrown-when-style-is-set-for-an-empty-cell
lo_worksheet->set_cell_style( ip_column = 'E' ip_row = 6 ip_style = lv_style_filled_green_guid ).
* Demonstrate how to retroactivly change the cellstyle
*Filled text and underlinded text
lo_worksheet->change_cell_style( ip_column = 'B'
ip_row = 5
ip_font_bold = abap_true
ip_font_italic = abap_true ).
lo_worksheet->change_cell_style( ip_column = 'D'
ip_row = 4
ip_font_bold = abap_true
ip_font_italic = abap_true ).
CREATE OBJECT lo_excel_writer TYPE zcl_excel_writer_2007.
lv_file = lo_excel_writer->write_file( lo_excel ).
" Convert to binary
CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
EXPORTING
buffer = lv_file
IMPORTING
output_length = lv_bytecount
TABLES
binary_tab = lt_file_tab.
* " This method is only available on AS ABAP > 6.40
* lt_file_tab = cl_bcs_convert=>xstring_to_solix( iv_xstring = lv_file ).
* lv_bytecount = xstrlen( lv_file ).
" Save the file
cl_gui_frontend_services=>gui_download( EXPORTING bin_filesize = lv_bytecount
filename = lv_full_path
filetype = 'BIN'
CHANGING data_tab = lt_file_tab ).
| [
9,
5,
10097,
30934,
9,
198,
9,
5,
6358,
220,
1168,
39429,
46,
62,
6369,
34,
3698,
17,
198,
9,
5,
6208,
44963,
329,
9564,
2969,
17,
55,
6561,
55,
198,
9,
5,
10097,
30934,
9,
198,
9,
5,
198,
9,
5,
198,
9,
5,
10097,
30934,
9,
198,
198,
2200,
15490,
1976,
9536,
78,
62,
1069,
5276,
2327,
13,
198,
198,
26947,
25,
2376,
62,
1069,
5276,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
1976,
565,
62,
1069,
5276,
11,
198,
220,
220,
220,
220,
220,
2376,
62,
1069,
5276,
62,
16002,
220,
220,
220,
41876,
4526,
37,
5390,
1976,
361,
62,
1069,
5276,
62,
16002,
11,
198,
220,
220,
220,
220,
220,
2376,
62,
5225,
25473,
220,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
1976,
565,
62,
1069,
5276,
62,
5225,
25473,
11,
198,
220,
220,
220,
220,
220,
2376,
62,
7635,
62,
36575,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
1976,
565,
62,
1069,
5276,
62,
7635,
11,
198,
220,
220,
220,
220,
220,
2376,
62,
7635,
62,
4625,
1370,
41876,
4526,
37,
5390,
1976,
565,
62,
1069,
5276,
62,
7635,
11,
198,
220,
220,
220,
220,
220,
2376,
62,
7635,
62,
20286,
220,
220,
220,
41876,
4526,
37,
5390,
1976,
565,
62,
1069,
5276,
62,
7635,
11,
198,
220,
220,
220,
220,
220,
2376,
62,
7635,
62,
20192,
220,
220,
220,
41876,
4526,
37,
5390,
1976,
565,
62,
1069,
5276,
62,
7635,
11,
198,
220,
220,
220,
220,
220,
2376,
62,
7635,
62,
16539,
220,
220,
220,
41876,
4526,
37,
5390,
1976,
565,
62,
1069,
5276,
62,
7635,
11,
198,
220,
220,
220,
220,
220,
2376,
62,
20192,
62,
21953,
220,
220,
220,
220,
41876,
4526,
37,
5390,
1976,
565,
62,
1069,
5276,
62,
7635,
62,
20192,
11,
198,
220,
220,
220,
220,
220,
2376,
62,
20192,
62,
2971,
220,
220,
220,
41876,
4526,
37,
5390,
1976,
565,
62,
1069,
5276,
62,
7635,
62,
20192,
13,
198,
198,
26947,
25,
300,
85,
62,
7635,
62,
36575,
62,
5162,
312,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
1976,
1069,
5276,
62,
3846,
62,
7635,
11,
198,
220,
220,
220,
220,
220,
300,
85,
62,
7635,
62,
4625,
1370,
62,
5162,
312,
220,
220,
220,
220,
220,
220,
220,
41876,
1976,
1069,
5276,
62,
3846,
62,
7635,
11,
198,
220,
220,
220,
220,
220,
300,
85,
62,
7635,
62,
20286,
62,
5162,
312,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
1976,
1069,
5276,
62,
3846,
62,
7635,
11,
198,
220,
220,
220,
220,
220,
300,
85,
62,
7635,
62,
20286,
62,
14809,
62,
5162,
312,
220,
220,
220,
220,
41876,
1976,
1069,
5276,
62,
3846,
62,
7635,
11,
198,
220,
220,
220,
220,
220,
300,
85,
62,
7635,
62,
20192,
62,
5162,
312,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
1976,
1069,
5276,
62,
3846,
62,
7635,
11,
198,
220,
220,
220,
220,
220,
300,
85,
62,
7635,
62,
16539,
62,
5162,
312,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
1976,
1069,
5276,
62,
3846,
62,
7635,
11,
198,
220,
220,
220,
220,
220,
300,
85,
62,
7635,
62,
20286,
62,
36590,
421,
25678,
62,
5162,
312,
41876,
1976,
1069,
5276,
62,
3846,
62,
7635,
13,
198,
198,
26947,
25,
300,
85,
62,
7753,
220,
220,
220,
220,
220,
41876,
2124,
8841,
11,
198,
220,
220,
220,
220,
220,
300,
85,
62,
26327,
9127,
41876,
1312,
11,
198,
220,
220,
220,
220,
220,
300,
83,
62,
7753,
62,
8658,
220,
41876,
1540,
844,
62,
8658,
13,
198,
198,
26947,
25,
300,
85,
62,
12853,
62,
6978,
220,
220,
220,
220,
220,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
300,
85,
62,
1818,
15908,
220,
220,
220,
220,
220,
220,
220,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
300,
85,
62,
7753,
62,
25512,
1352,
41876,
269,
13,
198,
198,
10943,
2257,
1565,
4694,
25,
300,
85,
62,
12286,
62,
7753,
62,
3672,
41876,
4731,
26173,
8924,
705,
2327,
62,
45442,
62,
18716,
829,
13,
87,
7278,
87,
4458,
198,
198,
27082,
2390,
2767,
4877,
25,
279,
62,
6978,
41876,
1976,
1069,
5276,
62,
39344,
62,
15908,
13,
198,
198,
1404,
33493,
2849,
12,
6173,
2200,
1677,
6177,
26173,
8924,
12,
2200,
35780,
7473,
279,
62,
6978,
13,
198,
220,
300,
85,
62,
1818,
15908,
796,
279,
62,
6978,
13,
198,
220,
537,
62,
48317,
62,
8534,
437,
62,
30416,
14804,
34945,
62,
25367,
325,
7,
7788,
15490,
2751,
4238,
62,
43551,
220,
796,
300,
85,
62,
1818,
15908,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5870,
15567,
2751,
220,
6163,
62,
43551,
796,
300,
85,
62,
1818,
15908,
6739,
198,
220,
279,
62,
6978,
796,
300,
85,
62,
1818,
15908,
13,
198,
198,
1268,
2043,
12576,
14887,
6234,
13,
198,
220,
537,
62,
48317,
62,
8534,
437,
62,
30416,
14804,
1136,
62,
41375,
62,
34945,
7,
5870,
15567,
2751,
11364,
62,
34945,
796,
300,
85,
62,
1818,
15908,
6739,
198,
220,
537,
62,
48317,
62,
12993,
86,
14804,
25925,
7,
6739,
198,
220,
279,
62,
6978,
796,
300,
85,
62,
1818,
15908,
13,
198,
198,
2257,
7227,
12,
19238,
12,
46506,
2849,
13,
628,
220,
16876,
279,
62,
6978,
3180,
3268,
2043,
12576,
13,
198,
220,
220,
220,
279,
62,
6978,
796,
300,
85,
62,
1818,
15908,
13,
198,
220,
23578,
5064,
13,
198,
220,
537,
62,
48317,
62,
8534,
437,
62,
30416,
14804,
1136,
62,
7753,
62,
25512,
1352,
7,
5870,
15567,
2751,
2393,
62,
25512,
1352,
796,
300,
85,
62,
7753,
62,
25512,
1352,
6739,
198,
220,
39962,
1404,
1677,
6158,
279,
62,
6978,
300,
85,
62,
7753,
62,
25512,
1352,
300,
85,
62,
12286,
62,
7753,
62,
3672,
39319,
300,
85,
62,
12853,
62,
6978,
13,
628,
220,
366,
7921,
274,
4075,
9629,
198,
220,
29244,
6158
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
*"* use this source file for your ABAP unit test classes
CLASS ltcl_sap_package_mock DEFINITION FINAL FOR TESTING
DURATION SHORT
RISK LEVEL HARMLESS.
PUBLIC SECTION.
INTERFACES:
zif_abapgit_sap_package.
CONSTANTS:
BEGIN OF c_package,
existing TYPE devclass VALUE '$EXISTING',
non_existing TYPE devclass VALUE '$NON_EXISTING',
user TYPE devclass VALUE '$USER',
END OF c_package.
METHODS:
constructor
IMPORTING
iv_package TYPE devclass,
was_create_called
RETURNING
VALUE(rv_create_called) TYPE abap_bool.
PRIVATE SECTION.
DATA:
mv_package TYPE devclass,
BEGIN OF ms_called,
create TYPE abap_bool,
END OF ms_called.
ENDCLASS.
CLASS ltcl_popups_mock DEFINITION FINAL FOR TESTING
DURATION SHORT
RISK LEVEL HARMLESS.
PUBLIC SECTION.
TYPES:
ty_user_decision TYPE string.
CONSTANTS:
BEGIN OF c_user_decision,
cancel TYPE ty_user_decision VALUE 'cancel',
confirm TYPE ty_user_decision VALUE 'confirm',
END OF c_user_decision.
INTERFACES:
zif_abapgit_popups.
METHODS:
was_create_package_popup_shown
RETURNING
VALUE(rv_popup_shown) TYPE abap_bool,
set_user_decision
IMPORTING
iv_user_decision TYPE ty_user_decision,
set_package
IMPORTING
iv_package TYPE devclass.
PRIVATE SECTION.
DATA:
BEGIN OF ms_called,
popup_to_create_package TYPE abap_bool,
END OF ms_called,
mv_user_decision TYPE ty_user_decision,
mv_package TYPE devclass.
ENDCLASS.
CLASS ltcl_create_package DEFINITION FINAL FOR TESTING
DURATION SHORT
RISK LEVEL HARMLESS.
PUBLIC SECTION.
PRIVATE SECTION.
DATA:
mv_package TYPE devclass,
mx_error TYPE REF TO zcx_abapgit_exception,
mo_popups_mock TYPE REF TO ltcl_popups_mock,
mo_sap_package_mock TYPE REF TO ltcl_sap_package_mock,
mv_created_package TYPE devclass.
METHODS:
setup,
raise_error_if_package_exists FOR TESTING RAISING cx_static_check,
package_given_in_popup FOR TESTING RAISING cx_static_check,
package_not_created_when_canc FOR TESTING RAISING cx_static_check,
package_created_when_confirm FOR TESTING RAISING cx_static_check,
given_existing_package,
given_non_existing_package,
given_user_cancels_popup,
given_user_confirms_popup,
given_no_package,
given_package_by_user,
when_create_package,
then_error_is_raised,
then_popup_is_shown,
then_no_package_is_created,
then_package_is_created,
then_no_error_is_raised.
ENDCLASS.
CLASS ltcl_create_package IMPLEMENTATION.
METHOD setup.
CREATE OBJECT mo_popups_mock TYPE ltcl_popups_mock.
zcl_abapgit_ui_injector=>set_popups( mo_popups_mock ).
ENDMETHOD.
METHOD raise_error_if_package_exists.
given_existing_package( ).
when_create_package( ).
then_error_is_raised( ).
ENDMETHOD.
METHOD package_given_in_popup.
given_no_package( ).
given_package_by_user( ).
given_user_confirms_popup( ).
when_create_package( ).
then_no_error_is_raised( ).
then_popup_is_shown( ).
then_package_is_created( ).
ENDMETHOD.
METHOD package_not_created_when_canc.
given_non_existing_package( ).
given_user_cancels_popup( ).
when_create_package( ).
then_popup_is_shown( ).
then_no_package_is_created( ).
ENDMETHOD.
METHOD package_created_when_confirm.
given_non_existing_package( ).
given_user_confirms_popup( ).
when_create_package( ).
then_popup_is_shown( ).
then_package_is_created( ).
ENDMETHOD.
METHOD when_create_package.
CREATE OBJECT mo_sap_package_mock EXPORTING iv_package = mv_package.
zcl_abapgit_injector=>set_sap_package(
iv_package = mv_package
ii_sap_package = mo_sap_package_mock ).
TRY.
mv_created_package = zcl_abapgit_services_basis=>create_package( mv_package ).
CATCH zcx_abapgit_exception INTO mx_error.
ENDTRY.
ENDMETHOD.
METHOD given_existing_package.
mv_package = ltcl_sap_package_mock=>c_package-existing.
ENDMETHOD.
METHOD given_non_existing_package.
mv_package = ltcl_sap_package_mock=>c_package-non_existing.
ENDMETHOD.
METHOD then_error_is_raised.
cl_abap_unit_assert=>assert_bound( mx_error ).
ENDMETHOD.
METHOD then_no_error_is_raised.
cl_abap_unit_assert=>assert_not_bound( mx_error ).
ENDMETHOD.
METHOD then_popup_is_shown.
cl_abap_unit_assert=>assert_true( mo_popups_mock->was_create_package_popup_shown( ) ).
ENDMETHOD.
METHOD given_user_cancels_popup.
mo_popups_mock->set_user_decision( ltcl_popups_mock=>c_user_decision-cancel ).
ENDMETHOD.
METHOD then_no_package_is_created.
cl_abap_unit_assert=>assert_false( mo_sap_package_mock->was_create_called( ) ).
ENDMETHOD.
METHOD given_user_confirms_popup.
mo_popups_mock->set_user_decision( ltcl_popups_mock=>c_user_decision-confirm ).
ENDMETHOD.
METHOD then_package_is_created.
cl_abap_unit_assert=>assert_true( mo_sap_package_mock->was_create_called( ) ).
cl_abap_unit_assert=>assert_equals(
exp = mv_package
act = mv_created_package ).
ENDMETHOD.
METHOD given_no_package.
CLEAR: mv_package.
ENDMETHOD.
METHOD given_package_by_user.
mo_popups_mock->set_package( ltcl_sap_package_mock=>c_package-user ).
ENDMETHOD.
ENDCLASS.
CLASS ltcl_sap_package_mock IMPLEMENTATION.
METHOD constructor.
mv_package = iv_package.
ENDMETHOD.
METHOD zif_abapgit_sap_package~are_changes_recorded_in_tr_req.
ENDMETHOD.
METHOD zif_abapgit_sap_package~create.
ms_called-create = abap_true.
ENDMETHOD.
METHOD zif_abapgit_sap_package~create_child.
ENDMETHOD.
METHOD zif_abapgit_sap_package~create_local.
ENDMETHOD.
METHOD zif_abapgit_sap_package~exists.
rv_bool = boolc( c_package-existing = mv_package ).
ENDMETHOD.
METHOD zif_abapgit_sap_package~get_transport_type.
ENDMETHOD.
METHOD zif_abapgit_sap_package~get_transport_layer.
ENDMETHOD.
METHOD zif_abapgit_sap_package~list_subpackages.
ENDMETHOD.
METHOD zif_abapgit_sap_package~list_superpackages.
ENDMETHOD.
METHOD zif_abapgit_sap_package~read_parent.
ENDMETHOD.
METHOD was_create_called.
rv_create_called = ms_called-create.
ENDMETHOD.
ENDCLASS.
CLASS ltcl_popups_mock IMPLEMENTATION.
METHOD zif_abapgit_popups~branch_list_popup.
ENDMETHOD.
METHOD zif_abapgit_popups~branch_popup_callback.
ENDMETHOD.
METHOD zif_abapgit_popups~choose_pr_popup.
ENDMETHOD.
METHOD zif_abapgit_popups~create_branch_popup.
ENDMETHOD.
METHOD zif_abapgit_popups~popup_folder_logic.
ENDMETHOD.
METHOD zif_abapgit_popups~popup_search_help.
ENDMETHOD.
METHOD zif_abapgit_popups~popup_to_confirm.
ENDMETHOD.
METHOD zif_abapgit_popups~popup_to_create_package.
ms_called-popup_to_create_package = abap_true.
CASE mv_user_decision.
WHEN c_user_decision-cancel.
ev_create = abap_false.
WHEN c_user_decision-confirm.
ev_create = abap_true.
WHEN OTHERS.
cl_abap_unit_assert=>fail( ).
ENDCASE.
ENDMETHOD.
METHOD zif_abapgit_popups~popup_to_create_transp_branch.
ENDMETHOD.
METHOD zif_abapgit_popups~popup_to_select_from_list.
ENDMETHOD.
METHOD zif_abapgit_popups~popup_to_select_transports.
ENDMETHOD.
METHOD zif_abapgit_popups~popup_transport_request.
ENDMETHOD.
METHOD was_create_package_popup_shown.
rv_popup_shown = ms_called-popup_to_create_package.
ENDMETHOD.
METHOD set_user_decision.
mv_user_decision = iv_user_decision.
ENDMETHOD.
METHOD set_package.
mv_package = iv_package.
ENDMETHOD.
METHOD zif_abapgit_popups~popup_select_tr_requests.
ENDMETHOD.
METHOD zif_abapgit_popups~popup_select_wb_tc_tr_and_tsk.
ENDMETHOD.
ENDCLASS.
| [
9,
1,
9,
779,
428,
2723,
2393,
329,
534,
9564,
2969,
4326,
1332,
6097,
198,
31631,
300,
83,
565,
62,
82,
499,
62,
26495,
62,
76,
735,
5550,
20032,
17941,
25261,
7473,
43001,
2751,
198,
220,
360,
4261,
6234,
6006,
9863,
198,
220,
45698,
42,
49277,
43638,
5805,
7597,
13,
628,
220,
44731,
44513,
13,
198,
220,
220,
220,
23255,
37,
2246,
1546,
25,
198,
220,
220,
220,
220,
220,
1976,
361,
62,
397,
499,
18300,
62,
82,
499,
62,
26495,
13,
628,
220,
220,
220,
7102,
2257,
1565,
4694,
25,
198,
220,
220,
220,
220,
220,
347,
43312,
3963,
269,
62,
26495,
11,
198,
220,
220,
220,
220,
220,
220,
220,
4683,
220,
220,
220,
220,
41876,
1614,
4871,
26173,
8924,
705,
3,
6369,
8808,
2751,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
1729,
62,
25687,
41876,
1614,
4871,
26173,
8924,
705,
3,
45,
1340,
62,
6369,
8808,
2751,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
2836,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
1614,
4871,
26173,
8924,
705,
3,
29904,
3256,
198,
220,
220,
220,
220,
220,
23578,
3963,
269,
62,
26495,
13,
628,
220,
220,
220,
337,
36252,
50,
25,
198,
220,
220,
220,
220,
220,
23772,
198,
220,
220,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
26495,
41876,
1614,
4871,
11,
628,
220,
220,
220,
220,
220,
373,
62,
17953,
62,
7174,
198,
220,
220,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
81,
85,
62,
17953,
62,
7174,
8,
41876,
450,
499,
62,
30388,
13,
628,
220,
4810,
3824,
6158,
44513,
13,
198,
220,
220,
220,
42865,
25,
198,
220,
220,
220,
220,
220,
285,
85,
62,
26495,
41876,
1614,
4871,
11,
198,
220,
220,
220,
220,
220,
347,
43312,
3963,
13845,
62,
7174,
11,
198,
220,
220,
220,
220,
220,
220,
220,
2251,
41876,
450,
499,
62,
30388,
11,
198,
220,
220,
220,
220,
220,
23578,
3963,
13845,
62,
7174,
13,
198,
198,
10619,
31631,
13,
628,
198,
31631,
300,
83,
565,
62,
12924,
4739,
62,
76,
735,
5550,
20032,
17941,
25261,
7473,
43001,
2751,
198,
220,
360,
4261,
6234,
6006,
9863,
198,
220,
45698,
42,
49277,
43638,
5805,
7597,
13,
628,
220,
44731,
44513,
13,
198,
220,
220,
220,
24412,
47,
1546,
25,
198,
220,
220,
220,
220,
220,
1259,
62,
7220,
62,
12501,
1166,
41876,
4731,
13,
628,
220,
220,
220,
7102,
2257,
1565,
4694,
25,
198,
220,
220,
220,
220,
220,
347,
43312,
3963,
269,
62,
7220,
62,
12501,
1166,
11,
198,
220,
220,
220,
220,
220,
220,
220,
14241,
220,
41876,
1259,
62,
7220,
62,
12501,
1166,
26173,
8924,
705,
66,
21130,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
6216,
41876,
1259,
62,
7220,
62,
12501,
1166,
26173,
8924,
705,
10414,
2533,
3256,
198,
220,
220,
220,
220,
220,
23578,
3963,
269,
62,
7220,
62,
12501,
1166,
13,
628,
220,
220,
220,
23255,
37,
2246,
1546,
25,
198,
220,
220,
220,
220,
220,
1976,
361,
62,
397,
499,
18300,
62,
12924,
4739,
13,
628,
220,
220,
220,
337,
36252,
50,
25,
198,
220,
220,
220,
220,
220,
373,
62,
17953,
62,
26495,
62,
12924,
929,
62,
42579,
198,
220,
220,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
81,
85,
62,
12924,
929,
62,
42579,
8,
41876,
450,
499,
62,
30388,
11,
628,
220,
220,
220,
220,
220,
900,
62,
7220,
62,
12501,
1166,
198,
220,
220,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
7220,
62,
12501,
1166,
41876,
1259,
62,
7220,
62,
12501,
1166,
11,
628,
220,
220,
220,
220,
220,
900,
62,
26495,
198,
220,
220,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
26495,
41876,
1614,
4871,
13,
628,
220,
4810,
3824,
6158,
44513,
13,
198,
220,
220,
220,
42865,
25,
198,
220,
220,
220,
220,
220,
347,
43312,
3963,
13845,
62,
7174,
11,
198,
220,
220,
220,
220,
220,
220,
220,
46207,
62,
1462,
62,
17953,
62,
26495,
41876,
450,
499,
62,
30388,
11,
198,
220,
220,
220,
220,
220,
23578,
3963,
13845,
62,
7174,
11,
198,
220,
220,
220,
220,
220,
285,
85,
62,
7220,
62,
12501,
1166,
41876,
1259,
62,
7220,
62,
12501,
1166,
11,
198,
220,
220,
220,
220,
220,
285,
85,
62,
26495,
220,
220,
220,
220,
220,
220,
41876,
1614,
4871,
13,
198,
198,
10619,
31631,
13,
628,
198,
31631,
300,
83,
565,
62,
17953,
62,
26495,
5550,
20032,
17941,
25261,
7473,
43001,
2751,
198,
220,
360,
4261,
6234,
6006,
9863,
198,
220,
45698,
42,
49277,
43638,
5805,
7597,
13,
198,
220,
44731,
44513,
13,
198,
220,
4810,
3824,
6158,
44513,
13,
198,
220,
220,
220,
42865,
25,
198,
220,
220,
220,
220,
220,
285,
85,
62,
26495,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
1614,
4871,
11,
198,
220,
220,
220,
220,
220,
285,
87,
62,
18224,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
11,
198,
220,
220,
220,
220,
220,
6941,
62,
12924,
4739,
62,
76,
735,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
300,
83,
565,
62,
12924,
4739,
62,
76,
735,
11,
198,
220,
220,
220,
220,
220,
6941,
62,
82,
499,
62,
26495,
62,
76,
735,
41876,
4526,
37,
5390,
300,
83,
565,
62,
82,
499,
62,
26495,
62,
76,
735,
11,
198,
220,
220,
220,
220,
220,
285,
85,
62,
25598,
62,
26495,
220,
41876,
1614,
4871,
13,
628,
220,
220,
220,
337,
36252,
50,
25,
198,
220,
220,
220,
220,
220,
9058,
11,
628,
220,
220,
220,
220,
220,
5298,
62,
18224,
62,
361,
62,
26495,
62,
1069,
1023,
7473,
43001,
2751,
17926,
1797,
2751,
43213,
62,
12708,
62,
9122,
11,
198,
220,
220,
220,
220,
220,
5301,
62,
35569,
62,
259,
62
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS zcl_abapgit_gui_page_debuginfo DEFINITION
PUBLIC
INHERITING FROM zcl_abapgit_gui_page
FINAL
CREATE PUBLIC .
PUBLIC SECTION.
METHODS constructor
RAISING zcx_abapgit_exception.
PROTECTED SECTION.
METHODS:
render_content REDEFINITION.
PRIVATE SECTION.
METHODS get_jump_class
IMPORTING iv_class TYPE seoclsname
RETURNING VALUE(rv_html) TYPE string.
METHODS render_debug_info
RETURNING VALUE(ro_html) TYPE REF TO zcl_abapgit_html
RAISING zcx_abapgit_exception.
METHODS render_supported_object_types
RETURNING VALUE(rv_html) TYPE string.
METHODS render_scripts
RETURNING
VALUE(ro_html) TYPE REF TO zcl_abapgit_html
RAISING
zcx_abapgit_exception.
ENDCLASS.
CLASS zcl_abapgit_gui_page_debuginfo IMPLEMENTATION.
METHOD constructor.
super->constructor( ).
ms_control-page_title = 'DEBUG INFO'.
ENDMETHOD.
METHOD get_jump_class.
DATA: lv_encode TYPE string.
lv_encode = zcl_abapgit_html_action_utils=>jump_encode( iv_obj_type = 'CLAS'
iv_obj_name = |{ iv_class }| ).
rv_html = zcl_abapgit_html=>a( iv_txt = |{ iv_class }|
iv_act = |{ zif_abapgit_definitions=>c_action-jump }?{ lv_encode }| ).
ENDMETHOD.
METHOD render_content.
CREATE OBJECT ri_html TYPE zcl_abapgit_html.
ri_html->add( '<div id="debug_info" class="debug_container">' ).
ri_html->add( render_debug_info( ) ).
ri_html->add( '</div>' ).
ri_html->add( '<div id="supported_objects" class="debug_container">' ).
ri_html->add( render_supported_object_types( ) ).
ri_html->add( '</div>' ).
register_deferred_script( render_scripts( ) ).
ENDMETHOD.
METHOD render_debug_info.
DATA: lt_ver_tab TYPE filetable,
lv_rc TYPE i,
lv_gui_version TYPE string,
ls_version LIKE LINE OF lt_ver_tab,
lv_devclass TYPE devclass.
cl_gui_frontend_services=>get_gui_version(
CHANGING version_table = lt_ver_tab rc = lv_rc
EXCEPTIONS OTHERS = 1 ).
READ TABLE lt_ver_tab INTO ls_version INDEX 1. " gui release
lv_gui_version = ls_version-filename.
READ TABLE lt_ver_tab INTO ls_version INDEX 2. " gui sp
lv_gui_version = |{ lv_gui_version }.{ ls_version-filename }|.
READ TABLE lt_ver_tab INTO ls_version INDEX 3. " gui patch
lv_gui_version = |{ lv_gui_version }.{ ls_version-filename }|.
CREATE OBJECT ro_html.
ro_html->add( |<table>| ).
ro_html->add( |<tr><td>abapGit version:</td><td>{ zif_abapgit_version=>gc_abap_version }</td></tr>| ).
ro_html->add( |<tr><td>XML version: </td><td>{ zif_abapgit_version=>gc_xml_version }</td></tr>| ).
ro_html->add( |<tr><td>GUI version: </td><td>{ lv_gui_version }</td></tr>| ).
ro_html->add( |<tr><td>APACK version: </td><td>{
zcl_abapgit_apack_migration=>c_apack_interface_version }</td></tr>| ).
ro_html->add( |<tr><td>LCL_TIME: </td><td>{ zcl_abapgit_time=>get_unix( ) }</td></tr>| ).
ro_html->add( |<tr><td>SY time: </td><td>{ sy-datum } { sy-uzeit } { sy-tzone }</td></tr>| ).
ro_html->add( |</table>| ).
ro_html->add( |<br>| ).
lv_devclass = zcl_abapgit_services_abapgit=>is_installed( ).
IF NOT lv_devclass IS INITIAL.
ro_html->add( 'abapGit installed in package ' ).
ro_html->add( lv_devclass ).
ELSE.
ro_html->add_a( iv_txt = 'install abapGit repo'
iv_act = zif_abapgit_definitions=>c_action-abapgit_install ).
ro_html->add( ' - To keep abapGit up-to-date (or also to contribute) you need to' ).
ro_html->add( 'install it as a repository.' ).
ENDIF.
ro_html->add( |<br>| ).
ENDMETHOD.
METHOD render_scripts.
CREATE OBJECT ro_html.
ro_html->zif_abapgit_html~set_title( cl_abap_typedescr=>describe_by_object_ref( me )->get_relative_name( ) ).
ro_html->add( 'debugOutput("<table><tr><td>Browser:</td><td>" + navigator.userAgent + ' &&
'"</td></tr><tr><td>Frontend time:</td><td>" + new Date() + "</td></tr></table>", "debug_info");' ).
ENDMETHOD.
METHOD render_supported_object_types.
DATA: lv_list TYPE string,
lt_types TYPE zcl_abapgit_objects=>ty_types_tt,
lv_type LIKE LINE OF lt_types,
lt_obj TYPE STANDARD TABLE OF ko100 WITH DEFAULT KEY,
lv_class TYPE seoclsname,
li_object TYPE REF TO zif_abapgit_object,
ls_item TYPE zif_abapgit_definitions=>ty_item,
lv_language TYPE spras,
ls_metadata TYPE zif_abapgit_definitions=>ty_metadata,
lv_step TYPE zif_abapgit_definitions=>ty_deserialization_step,
lt_steps TYPE zif_abapgit_definitions=>ty_deserialization_step_tt.
FIELD-SYMBOLS: <ls_obj> TYPE ko100.
CALL FUNCTION 'TR_OBJECT_TABLE'
TABLES
wt_object_text = lt_obj.
lt_types = zcl_abapgit_objects=>supported_list( ).
rv_html = |<p>Supported objects: { lv_list }</p>|.
rv_html = rv_html && |<table border="1px"><thead><tr>|.
rv_html = rv_html && |<td>Object</td><td>Description</td><td>Class</td><td>Version</td><td>DDIC</td>|.
rv_html = rv_html && |<td>Delete TADIR</td><td>Steps</td>|.
rv_html = rv_html && |</tr></thead><tbody>|.
LOOP AT lt_types INTO lv_type.
lv_class = 'ZCL_ABAPGIT_OBJECT_' && lv_type.
rv_html = rv_html && |<tr>|.
rv_html = rv_html && |<td>{ lv_type }</td>|.
READ TABLE lt_obj ASSIGNING <ls_obj> WITH KEY pgmid = 'R3TR' object = lv_type.
IF sy-subrc = 0.
rv_html = rv_html && |<td>{ <ls_obj>-text }</td>|.
ELSE.
rv_html = rv_html && |<td class="warning">>No description</td>|.
ENDIF.
TRY.
ls_item-obj_type = lv_type.
ls_item-obj_name = 'TEST'.
CREATE OBJECT li_object TYPE (lv_class)
EXPORTING
is_item = ls_item
iv_language = sy-langu.
rv_html = rv_html && |<td>{ get_jump_class( lv_class ) }</td>|.
CATCH cx_sy_create_object_error.
TRY. " 2nd step, try looking for plugins
CREATE OBJECT li_object TYPE zcl_abapgit_objects_bridge
EXPORTING
is_item = ls_item.
CATCH cx_sy_create_object_error.
rv_html = rv_html && |<td class="error" colspan="5">{ lv_class } - error instantiating class</td>|.
CONTINUE.
ENDTRY.
rv_html = rv_html && |<td>{ get_jump_class( lv_class ) } (Plug-in)</td>|.
ENDTRY.
ls_metadata = li_object->get_metadata( ).
rv_html = rv_html && |<td>{ ls_metadata-version }</td>|.
rv_html = rv_html && |<td>{ ls_metadata-ddic }</td>|.
rv_html = rv_html && |<td>{ ls_metadata-delete_tadir }</td>|.
lt_steps = li_object->get_deserialize_steps( ).
CLEAR lv_list.
LOOP AT lt_steps INTO lv_step.
IF lv_list IS INITIAL.
lv_list = lv_step.
ELSE.
lv_list = lv_list && `, ` && lv_step.
ENDIF.
ENDLOOP.
rv_html = rv_html && |<td>{ lv_list }</td>|.
rv_html = rv_html && |</tr>|.
ENDLOOP.
rv_html = rv_html && |</tbody></table>|.
rv_html = rv_html && |<br>|.
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
397,
499,
18300,
62,
48317,
62,
7700,
62,
24442,
10951,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
3268,
16879,
2043,
2751,
16034,
1976,
565,
62,
397,
499,
18300,
62,
48317,
62,
7700,
198,
220,
25261,
198,
220,
29244,
6158,
44731,
764,
628,
220,
44731,
44513,
13,
628,
220,
220,
220,
337,
36252,
50,
23772,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
13,
628,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
220,
220,
337,
36252,
50,
25,
198,
220,
220,
220,
220,
220,
8543,
62,
11299,
23848,
36,
20032,
17941,
13,
628,
220,
4810,
3824,
6158,
44513,
13,
198,
220,
220,
220,
337,
36252,
50,
651,
62,
43327,
62,
4871,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
21628,
62,
4871,
220,
220,
220,
220,
220,
220,
41876,
384,
420,
7278,
3672,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
26173,
8924,
7,
81,
85,
62,
6494,
8,
41876,
4731,
13,
198,
220,
220,
220,
337,
36252,
50,
8543,
62,
24442,
62,
10951,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
26173,
8924,
7,
305,
62,
6494,
8,
41876,
4526,
37,
5390,
1976,
565,
62,
397,
499,
18300,
62,
6494,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
13,
198,
220,
220,
220,
337,
36252,
50,
8543,
62,
15999,
62,
15252,
62,
19199,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
26173,
8924,
7,
81,
85,
62,
6494,
8,
41876,
4731,
13,
198,
220,
220,
220,
337,
36252,
50,
8543,
62,
46521,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
305,
62,
6494,
8,
41876,
4526,
37,
5390,
1976,
565,
62,
397,
499,
18300,
62,
6494,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
13,
198,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1976,
565,
62,
397,
499,
18300,
62,
48317,
62,
7700,
62,
24442,
10951,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
23772,
13,
198,
220,
220,
220,
2208,
3784,
41571,
273,
7,
6739,
198,
220,
220,
220,
13845,
62,
13716,
12,
7700,
62,
7839,
796,
705,
30531,
24890,
4458,
198,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
651,
62,
43327,
62,
4871,
13,
628,
220,
220,
220,
42865,
25,
300,
85,
62,
268,
8189,
41876,
4731,
13,
628,
220,
220,
220,
300,
85,
62,
268,
8189,
796,
1976,
565,
62,
397,
499,
18300,
62,
6494,
62,
2673,
62,
26791,
14804,
43327,
62,
268,
8189,
7,
21628,
62,
26801,
62,
4906,
796,
705,
5097,
1921,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
26801,
62,
3672,
796,
930,
90,
21628,
62,
4871,
1782,
91,
6739,
628,
220,
220,
220,
374,
85,
62,
6494,
796,
1976,
565,
62,
397,
499,
18300,
62,
6494,
14804,
64,
7,
21628,
62,
14116,
796,
930,
90,
21628,
62,
4871,
1782,
91,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
529,
796,
930,
90,
1976,
361,
62,
397,
499,
18300,
62,
4299,
50101,
14804,
66,
62,
2673,
12,
43327,
1782,
30,
90,
300,
85,
62,
268,
8189,
1782,
91,
6739,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
8543,
62,
11299,
13,
628,
220,
220,
220,
29244,
6158,
25334,
23680,
374,
72,
62,
6494,
41876,
1976,
565,
62,
397,
499,
18300,
62,
6494,
13,
628,
220,
220,
220,
374,
72,
62,
6494,
3784,
2860,
7,
705,
27,
7146,
4686,
2625,
24442,
62,
10951,
1,
1398,
2625,
24442,
62,
34924,
5320,
6,
6739,
198,
220,
220,
220,
374,
72,
62,
6494,
3784,
2860,
7,
8543,
62,
24442,
62,
10951,
7,
1267,
6739,
198,
220,
220,
220,
374,
72,
62,
6494,
3784,
2860,
7,
705,
3556,
7146,
29,
6,
6739,
628,
220,
220,
220,
374,
72,
62,
6494,
3784,
2860,
7,
705,
27,
7146,
4686,
2625,
15999,
62,
48205,
1,
1398,
2625,
24442,
62,
34924,
5320,
6,
6739,
198,
220,
220,
220,
374,
72,
62,
6494,
3784,
2860,
7,
8543,
62,
15999,
62,
15252,
62,
19199,
7,
1267,
6739,
198,
220,
220,
220,
374,
72,
62,
6494,
3784,
2860,
7,
705,
3556,
7146,
29,
6,
6739,
628,
220,
220,
220,
7881,
62,
4299,
17436,
62,
12048,
7,
8543,
62,
46521,
7,
1267,
6739,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
8543,
62,
24442,
62,
10951,
13,
628,
220,
220,
220,
42865,
25,
300,
83,
62,
332,
62,
8658,
220,
220,
220,
220,
41876,
2393,
11487,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
6015,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
1312,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
48317,
62,
9641,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
43979,
62,
9641,
220,
220,
220,
220,
34178,
48920,
3963,
300,
83,
62,
332,
62,
8658,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
7959,
4871,
220,
220,
220,
41876,
1614,
4871,
13,
628,
220,
220,
220,
537,
62,
48317,
62,
8534,
437,
62,
30416,
14804,
1136,
62,
48317,
62,
9641,
7,
198,
220,
220,
220,
220,
220,
5870,
15567,
2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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS /dmo/cl_flight_amdp26 DEFINITION
PUBLIC
FINAL
CREATE PUBLIC .
PUBLIC SECTION.
INTERFACES if_amdp_marker_hdb.
CLASS-METHODS convert_currency IMPORTING VALUE(iv_amount) TYPE /dmo/total_price26
VALUE(iv_currency_code_source) TYPE /dmo/currency_code26
VALUE(iv_currency_code_target) TYPE /dmo/currency_code26
VALUE(iv_exchange_rate_date) TYPE d
EXPORTING VALUE(ev_amount) TYPE /dmo/total_price26.
ENDCLASS.
CLASS /dmo/cl_flight_amdp26 IMPLEMENTATION.
METHOD convert_currency BY DATABASE PROCEDURE FOR HDB LANGUAGE SQLSCRIPT OPTIONS READ-ONLY .
tab = SELECT CONVERT_CURRENCY( amount => :iv_amount,
source_unit => :iv_currency_code_source,
target_unit => :iv_currency_code_target,
reference_date => :iv_exchange_rate_date,
schema => CURRENT_SCHEMA,
error_handling => 'set to null',
steps => 'shift,convert,shift_back',
client => SESSION_CONTEXT( 'CLIENT' )
) AS target_value
FROM dummy ;
ev_amount = :tab.target_value[1];
ENDMETHOD.
ENDCLASS.
| [
31631,
1220,
67,
5908,
14,
565,
62,
22560,
62,
321,
26059,
2075,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
25261,
198,
220,
29244,
6158,
44731,
764,
628,
220,
44731,
44513,
13,
198,
220,
220,
220,
23255,
37,
2246,
1546,
611,
62,
321,
26059,
62,
4102,
263,
62,
71,
9945,
13,
628,
220,
220,
220,
42715,
12,
49273,
50,
10385,
62,
34415,
30023,
9863,
2751,
26173,
8924,
7,
452,
62,
17287,
8,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
1220,
67,
5908,
14,
23350,
62,
20888,
2075,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
452,
62,
34415,
62,
8189,
62,
10459,
8,
41876,
1220,
67,
5908,
14,
34415,
62,
8189,
2075,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
452,
62,
34415,
62,
8189,
62,
16793,
8,
41876,
1220,
67,
5908,
14,
34415,
62,
8189,
2075,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
452,
62,
1069,
3803,
62,
4873,
62,
4475,
8,
220,
220,
41876,
288,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7788,
15490,
2751,
26173,
8924,
7,
1990,
62,
17287,
8,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
1220,
67,
5908,
14,
23350,
62,
20888,
2075,
13,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1220,
67,
5908,
14,
565,
62,
22560,
62,
321,
26059,
2075,
30023,
2538,
10979,
6234,
13,
628,
220,
337,
36252,
10385,
62,
34415,
11050,
360,
1404,
6242,
11159,
41755,
1961,
11335,
7473,
5572,
33,
406,
15567,
52,
11879,
16363,
6173,
46023,
39852,
11053,
20832,
12,
1340,
11319,
764,
198,
220,
220,
220,
7400,
796,
33493,
7102,
15858,
62,
34,
31302,
45155,
7,
2033,
220,
220,
220,
220,
220,
220,
220,
220,
5218,
1058,
452,
62,
17287,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2723,
62,
20850,
220,
220,
220,
5218,
1058,
452,
62,
34415,
62,
8189,
62,
10459,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2496,
62,
20850,
220,
220,
220,
5218,
1058,
452,
62,
34415,
62,
8189,
62,
16793,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4941,
62,
4475,
5218,
1058,
452,
62,
1069,
3803,
62,
4873,
62,
4475,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
32815,
220,
220,
220,
220,
220,
220,
220,
220,
5218,
327,
39237,
62,
50,
3398,
27630,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4049,
62,
4993,
1359,
5218,
705,
2617,
284,
9242,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4831,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5218,
705,
30846,
11,
1102,
1851,
11,
30846,
62,
1891,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5456,
220,
220,
220,
220,
220,
220,
220,
220,
5218,
311,
47621,
62,
10943,
32541,
7,
705,
5097,
28495,
6,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1267,
7054,
2496,
62,
8367,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
16034,
31548,
2162,
198,
220,
220,
220,
819,
62,
17287,
796,
1058,
8658,
13,
16793,
62,
8367,
58,
16,
11208,
198,
220,
23578,
49273,
13,
198,
198,
10619,
31631,
13,
198
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS zcl_abapgit_object_auth DEFINITION PUBLIC INHERITING FROM zcl_abapgit_objects_super FINAL.
PUBLIC SECTION.
INTERFACES zif_abapgit_object.
ALIASES mo_files FOR zif_abapgit_object~mo_files.
METHODS constructor
IMPORTING
is_item TYPE zif_abapgit_definitions=>ty_item
iv_language TYPE spras.
PROTECTED SECTION.
PRIVATE SECTION.
DATA: mv_fieldname TYPE authx-fieldname.
ENDCLASS.
CLASS ZCL_ABAPGIT_OBJECT_AUTH IMPLEMENTATION.
METHOD constructor.
super->constructor( is_item = is_item
iv_language = iv_language ).
mv_fieldname = ms_item-obj_name.
ENDMETHOD.
METHOD zif_abapgit_object~changed_by.
* looks like "changed by user" is not stored in the database
rv_user = c_user_unknown.
ENDMETHOD.
METHOD zif_abapgit_object~delete.
" there is a bug in SAP standard, the TADIR entries are not deleted
" when the AUTH object is deleted in transaction SU20
" FM SUSR_AUTF_DELETE_FIELD calls the UI, therefore we reimplement its logic
DATA:
lt_objlst TYPE susr_t_xuobject,
lo_auth TYPE REF TO cl_auth_tools,
lv_dummy TYPE string.
" authority check
CREATE OBJECT lo_auth.
IF lo_auth->authority_check_suso( actvt = '06'
fieldname = mv_fieldname ) <> 0.
MESSAGE e463(01) WITH mv_fieldname INTO lv_dummy.
zcx_abapgit_exception=>raise_t100( ).
ENDIF.
" if field is used check
lt_objlst = lo_auth->suso_where_used_afield( mv_fieldname ).
IF lt_objlst IS NOT INITIAL.
MESSAGE i453(01) WITH mv_fieldname INTO lv_dummy.
zcx_abapgit_exception=>raise_t100( ).
ENDIF.
" collect fieldname into a transport task
IF lo_auth->add_afield_to_trkorr( mv_fieldname ) <> 0.
"no transport -> no deletion
MESSAGE e507(0m) INTO lv_dummy.
zcx_abapgit_exception=>raise_t100( ).
ENDIF.
DELETE FROM authx WHERE fieldname = mv_fieldname.
IF sy-subrc <> 0.
MESSAGE e507(0m) INTO lv_dummy.
zcx_abapgit_exception=>raise_t100( ).
ENDIF.
ENDMETHOD.
METHOD zif_abapgit_object~deserialize.
* see include LSAUT_FIELDF02
DATA: ls_authx TYPE authx,
lo_auth TYPE REF TO cl_auth_tools.
io_xml->read( EXPORTING iv_name = 'AUTHX'
CHANGING cg_data = ls_authx ).
tadir_insert( iv_package ).
CREATE OBJECT lo_auth.
IF lo_auth->add_afield_to_trkorr( ls_authx-fieldname ) <> 0.
zcx_abapgit_exception=>raise( 'Error deserializing AUTH' ).
ENDIF.
MODIFY authx FROM ls_authx.
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( 'Error deserializing AUTH' ).
ENDIF.
CALL FUNCTION 'DB_COMMIT'.
lo_auth->set_authfld_info_from_db( ls_authx-fieldname ).
ENDMETHOD.
METHOD zif_abapgit_object~exists.
SELECT SINGLE fieldname FROM authx
INTO mv_fieldname
WHERE fieldname = ms_item-obj_name. "#EC CI_GENBUFF
rv_bool = boolc( sy-subrc = 0 ).
ENDMETHOD.
METHOD zif_abapgit_object~get_comparator.
RETURN.
ENDMETHOD.
METHOD zif_abapgit_object~get_metadata.
rs_metadata = get_metadata( ).
rs_metadata-delete_tadir = abap_true.
ENDMETHOD.
METHOD zif_abapgit_object~is_active.
rv_active = is_active( ).
ENDMETHOD.
METHOD zif_abapgit_object~is_locked.
rv_is_locked = abap_false.
ENDMETHOD.
METHOD zif_abapgit_object~jump.
* TODO, this function module does not exist in 702
CALL FUNCTION 'SU20_MAINTAIN_SNGL'
EXPORTING
id_field = mv_fieldname
id_wbo_mode = abap_false.
ENDMETHOD.
METHOD zif_abapgit_object~serialize.
DATA: ls_authx TYPE authx.
SELECT SINGLE * FROM authx INTO ls_authx
WHERE fieldname = ms_item-obj_name. "#EC CI_GENBUFF
IF sy-subrc <> 0.
RETURN.
ENDIF.
io_xml->add( iv_name = 'AUTHX'
ig_data = ls_authx ).
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
397,
499,
18300,
62,
15252,
62,
18439,
5550,
20032,
17941,
44731,
3268,
16879,
2043,
2751,
16034,
1976,
565,
62,
397,
499,
18300,
62,
48205,
62,
16668,
25261,
13,
628,
220,
44731,
44513,
13,
198,
220,
220,
220,
23255,
37,
2246,
1546,
1976,
361,
62,
397,
499,
18300,
62,
15252,
13,
198,
220,
220,
220,
8355,
43429,
1546,
6941,
62,
16624,
7473,
1976,
361,
62,
397,
499,
18300,
62,
15252,
93,
5908,
62,
16624,
13,
198,
220,
220,
220,
337,
36252,
50,
23772,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
318,
62,
9186,
220,
220,
220,
220,
41876,
1976,
361,
62,
397,
499,
18300,
62,
4299,
50101,
14804,
774,
62,
9186,
198,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
16129,
41876,
7500,
292,
13,
198,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
4810,
3824,
6158,
44513,
13,
198,
220,
220,
220,
42865,
25,
285,
85,
62,
3245,
3672,
41876,
6284,
87,
12,
3245,
3672,
13,
198,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1168,
5097,
62,
6242,
2969,
38,
2043,
62,
9864,
23680,
62,
32,
24318,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
23772,
13,
628,
220,
220,
220,
2208,
3784,
41571,
273,
7,
318,
62,
9186,
220,
220,
220,
220,
796,
318,
62,
9186,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
16129,
796,
21628,
62,
16129,
6739,
628,
220,
220,
220,
285,
85,
62,
3245,
3672,
796,
13845,
62,
9186,
12,
26801,
62,
3672,
13,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
1976,
361,
62,
397,
499,
18300,
62,
15252,
93,
40985,
62,
1525,
13,
198,
9,
3073,
588,
366,
40985,
416,
2836,
1,
318,
407,
8574,
287,
262,
6831,
198,
220,
220,
220,
374,
85,
62,
7220,
796,
269,
62,
7220,
62,
34680,
13,
198,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
1976,
361,
62,
397,
499,
18300,
62,
15252,
93,
33678,
13,
628,
220,
220,
220,
366,
612,
318,
257,
5434,
287,
48323,
3210,
11,
262,
309,
2885,
4663,
12784,
389,
407,
13140,
198,
220,
220,
220,
366,
618,
262,
37195,
2134,
318,
13140,
287,
8611,
13558,
1238,
628,
220,
220,
220,
366,
18695,
311,
2937,
49,
62,
39371,
37,
62,
7206,
2538,
9328,
62,
44603,
3848,
262,
12454,
11,
4361,
356,
21123,
26908,
663,
9156,
628,
220,
220,
220,
42865,
25,
198,
220,
220,
220,
220,
220,
300,
83,
62,
672,
20362,
301,
41876,
2341,
81,
62,
83,
62,
87,
84,
15252,
11,
198,
220,
220,
220,
220,
220,
2376,
62,
18439,
220,
220,
41876,
4526,
37,
5390,
537,
62,
18439,
62,
31391,
11,
198,
220,
220,
220,
220,
220,
300,
85,
62,
67,
13513,
220,
41876,
4731,
13,
628,
220,
220,
220,
366,
4934,
2198,
198,
220,
220,
220,
29244,
6158,
25334,
23680,
2376,
62,
18439,
13,
198,
220,
220,
220,
16876,
2376,
62,
18439,
3784,
9800,
414,
62,
9122,
62,
82,
385,
78,
7,
719,
36540,
220,
220,
220,
220,
796,
705,
3312,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2214,
3672,
796,
285,
85,
62,
3245,
3672,
1267,
1279,
29,
657,
13,
198,
220,
220,
220,
220,
220,
337,
1546,
4090,
8264,
304,
38380,
7,
486,
8,
13315,
285,
85,
62,
3245,
3672,
39319,
300,
85,
62,
67,
13513,
13,
198,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
14804,
40225,
62,
83,
3064,
7,
6739,
198,
220,
220,
220,
23578,
5064,
13,
628,
220,
220,
220,
366,
611,
2214,
318,
973,
2198,
198,
220,
220,
220,
300,
83,
62,
672,
20362,
301,
796,
2376,
62,
18439,
3784,
82,
385,
78,
62,
3003,
62,
1484,
62,
1878,
1164,
7,
285,
85,
62,
3245,
3672,
6739,
198,
220,
220,
220,
16876,
300,
83,
62,
672,
20362,
301,
3180,
5626,
3268,
2043,
12576,
13,
198,
220,
220,
220,
220,
220,
337,
1546,
4090,
8264,
1312,
36625,
7,
486,
8,
13315,
285,
85,
62,
3245,
3672,
39319,
300,
85,
62,
67,
13513,
13,
198,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
14804,
40225,
62,
83,
3064,
7,
6739,
198,
220,
220,
220,
23578,
5064,
13,
628,
220,
220,
220,
366,
2824,
2214,
3672,
656,
257,
4839,
4876,
198,
220,
220,
220,
16876,
2376,
62,
18439,
3784,
2860,
62,
1878,
1164,
62,
1462,
62,
2213,
74,
38890,
7,
285,
85,
62,
3245,
3672,
1267,
1279,
29,
657,
13,
198,
220,
220,
220,
220,
220,
366,
3919,
4839,
4613,
645,
39948,
198,
220,
220,
220,
220,
220,
337,
1546,
4090,
8264,
304,
35378,
7,
15,
76,
8,
39319,
300,
85,
62,
67,
13513,
13,
198,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
14804,
40225,
62,
83,
3064,
7,
6739,
198,
220,
220,
220,
23578,
5064,
13,
628,
220,
220,
220,
5550,
2538,
9328,
16034,
6284,
87,
33411,
2214,
3672,
796,
285,
85,
62,
3245,
3672,
13,
198,
220,
220,
220,
16876,
827,
12,
7266,
6015,
1279,
29,
657,
13,
198,
220,
220,
220,
220,
220,
337,
1546,
4090,
8264,
304,
35378,
7,
15,
76,
8,
39319,
300,
85,
62,
67,
13513,
13,
198,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
14804,
40225,
62,
83,
3064,
7,
6739,
198,
220,
220,
220,
23578,
5064,
13,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
1976,
361,
62,
397,
499,
18300,
62,
15252,
93,
8906,
48499,
1096,
13,
198,
9,
766,
2291,
406,
4090,
3843,
62,
11674,
3698,
8068,
2999,
628,
220,
220,
220,
42865,
25,
43979,
62,
18439,
87,
41876,
6284,
87,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2376,
62,
18439,
220,
41876,
4526,
37,
5390,
537,
62,
18439,
62,
31391,
13,
628,
198,
220,
220,
220,
33245,
62,
19875
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
class ZCX_IDOC_VALIDATION_ERROR definition
public
inheriting from CX_STATIC_CHECK
final
create public .
public section.
*"* public components of class ZCX_IDOC_VALIDATION_ERROR
*"* do not include other source files here!!!
constants ZCX_IDOC_VALIDATION_ERROR type SOTR_CONC value '00505697691A1ED98BBA9D681213C51D' ##NO_TEXT.
methods CONSTRUCTOR
importing
!TEXTID like TEXTID optional
!PREVIOUS like PREVIOUS optional .
protected section.
*"* protected components of class ZCX_IDOC_VALIDATION_ERROR
*"* do not include other source files here!!!
private section.
*"* private components of class ZCX_IDOC_VALIDATION_ERROR
*"* do not include other source files here!!!
ENDCLASS.
CLASS ZCX_IDOC_VALIDATION_ERROR IMPLEMENTATION.
method CONSTRUCTOR.
CALL METHOD SUPER->CONSTRUCTOR
EXPORTING
TEXTID = TEXTID
PREVIOUS = PREVIOUS
.
IF textid IS INITIAL.
me->textid = ZCX_IDOC_VALIDATION_ERROR .
ENDIF.
endmethod.
ENDCLASS.
| [
4871,
1168,
34,
55,
62,
2389,
4503,
62,
23428,
2389,
6234,
62,
24908,
6770,
198,
220,
1171,
198,
220,
10639,
1780,
422,
327,
55,
62,
35744,
2149,
62,
50084,
198,
220,
2457,
198,
220,
2251,
1171,
764,
198,
198,
11377,
2665,
13,
198,
198,
9,
1,
9,
1171,
6805,
286,
1398,
1168,
34,
55,
62,
2389,
4503,
62,
23428,
2389,
6234,
62,
24908,
198,
9,
1,
9,
466,
407,
2291,
584,
2723,
3696,
994,
10185,
198,
220,
38491,
1168,
34,
55,
62,
2389,
4503,
62,
23428,
2389,
6234,
62,
24908,
2099,
311,
2394,
49,
62,
10943,
34,
1988,
705,
405,
31654,
40035,
49541,
32,
16,
1961,
4089,
33,
4339,
24,
35,
3104,
1065,
1485,
34,
4349,
35,
6,
22492,
15285,
62,
32541,
13,
628,
220,
5050,
7102,
46126,
1581,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
32541,
2389,
588,
40383,
2389,
11902,
198,
220,
220,
220,
220,
220,
5145,
46437,
12861,
20958,
588,
22814,
12861,
20958,
11902,
764,
198,
24326,
2665,
13,
198,
9,
1,
9,
6861,
6805,
286,
1398,
1168,
34,
55,
62,
2389,
4503,
62,
23428,
2389,
6234,
62,
24908,
198,
9,
1,
9,
466,
407,
2291,
584,
2723,
3696,
994,
10185,
198,
19734,
2665,
13,
198,
9,
1,
9,
2839,
6805,
286,
1398,
1168,
34,
55,
62,
2389,
4503,
62,
23428,
2389,
6234,
62,
24908,
198,
9,
1,
9,
466,
407,
2291,
584,
2723,
3696,
994,
10185,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1168,
34,
55,
62,
2389,
4503,
62,
23428,
2389,
6234,
62,
24908,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
2446,
7102,
46126,
1581,
13,
198,
34,
7036,
337,
36252,
33088,
3784,
10943,
46126,
1581,
198,
6369,
15490,
2751,
198,
32541,
2389,
796,
40383,
2389,
198,
46437,
12861,
20958,
796,
22814,
12861,
20958,
198,
13,
198,
16876,
2420,
312,
3180,
3268,
2043,
12576,
13,
198,
220,
220,
502,
3784,
5239,
312,
796,
1168,
34,
55,
62,
2389,
4503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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
REPORT zabap_test_0053 NO STANDARD PAGE HEADING.
DATA: lv_string TYPE string.
CONCATENATE 'a' 'b' INTO lv_string SEPARATED BY space.
WRITE: / lv_string.
| [
2200,
15490,
1976,
397,
499,
62,
9288,
62,
405,
4310,
8005,
49053,
9795,
48488,
39837,
2751,
13,
198,
198,
26947,
25,
300,
85,
62,
8841,
41876,
4731,
13,
198,
198,
10943,
34,
1404,
1677,
6158,
705,
64,
6,
705,
65,
6,
39319,
300,
85,
62,
8841,
7946,
27082,
11617,
11050,
2272,
13,
198,
18564,
12709,
25,
1220,
300,
85,
62,
8841,
13,
198
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS cl_abap_typedescr DEFINITION PUBLIC.
* todo, this class should be ABSTRACT
PUBLIC SECTION.
CLASS-METHODS
describe_by_data
IMPORTING p_data TYPE any
RETURNING VALUE(type) TYPE REF TO cl_abap_typedescr.
CLASS-METHODS
describe_by_name
IMPORTING p_name TYPE clike
RETURNING VALUE(type) TYPE REF TO cl_abap_typedescr.
CLASS-METHODS
describe_by_data_ref
IMPORTING data TYPE REF TO data
RETURNING VALUE(type) TYPE REF TO cl_abap_typedescr.
CLASS-METHODS
describe_by_object_ref
IMPORTING data TYPE REF TO object
RETURNING VALUE(type) TYPE REF TO cl_abap_typedescr.
METHODS
get_relative_name
RETURNING
VALUE(name) TYPE string.
METHODS
is_ddic_type
RETURNING
VALUE(p_abap_bool) TYPE abap_bool.
DATA type_kind TYPE abap_typekind.
DATA kind TYPE c LENGTH 1.
DATA length TYPE i.
DATA absolute_name TYPE string.
CONSTANTS typekind_any TYPE abap_typekind VALUE '~'.
CONSTANTS typekind_char TYPE abap_typekind VALUE 'C'.
CONSTANTS typekind_class TYPE abap_typekind VALUE '*'.
CONSTANTS typekind_date TYPE abap_typekind VALUE 'D'.
CONSTANTS typekind_decfloat TYPE abap_typekind VALUE '/'.
CONSTANTS typekind_decfloat16 TYPE abap_typekind VALUE 'a'.
CONSTANTS typekind_decfloat34 TYPE abap_typekind VALUE 'e'.
CONSTANTS typekind_dref TYPE abap_typekind VALUE 'l'.
CONSTANTS typekind_float TYPE abap_typekind VALUE 'F'.
CONSTANTS typekind_hex TYPE abap_typekind VALUE 'X'.
CONSTANTS typekind_int TYPE abap_typekind VALUE 'I'.
CONSTANTS typekind_int1 TYPE abap_typekind VALUE 'b'.
CONSTANTS typekind_int2 TYPE abap_typekind VALUE 's'.
CONSTANTS typekind_int8 TYPE abap_typekind VALUE '8'.
CONSTANTS typekind_num TYPE abap_typekind VALUE 'N'.
CONSTANTS typekind_oref TYPE abap_typekind VALUE 'r'.
CONSTANTS typekind_packed TYPE abap_typekind VALUE 'P'.
CONSTANTS typekind_string TYPE abap_typekind VALUE 'g'.
CONSTANTS typekind_struct1 TYPE abap_typekind VALUE 'u'.
CONSTANTS typekind_struct2 TYPE abap_typekind VALUE 'v'.
CONSTANTS typekind_table TYPE abap_typekind VALUE 'h'.
CONSTANTS typekind_time TYPE abap_typekind VALUE 'T'.
CONSTANTS typekind_xstring TYPE abap_typekind VALUE 'y'.
CONSTANTS kind_elem TYPE c LENGTH 1 VALUE 'E'.
CONSTANTS kind_struct TYPE c LENGTH 1 VALUE 'S'.
CONSTANTS kind_table TYPE c LENGTH 1 VALUE 'T'.
CONSTANTS kind_ref TYPE c LENGTH 1 VALUE 'R'.
CONSTANTS kind_class TYPE c LENGTH 1 VALUE 'C'.
ENDCLASS.
CLASS cl_abap_typedescr IMPLEMENTATION.
METHOD describe_by_name.
DATA ref TYPE REF TO data.
CREATE DATA ref TYPE (p_name).
type = describe_by_data_ref( ref ).
ENDMETHOD.
METHOD get_relative_name.
ASSERT 1 = 'todo'.
ENDMETHOD.
METHOD is_ddic_type.
ASSERT 1 = 'todo'.
ENDMETHOD.
METHOD describe_by_data_ref.
FIELD-SYMBOLS <ref> TYPE any.
ASSIGN data->* TO <ref>.
type = describe_by_data( <ref> ).
ENDMETHOD.
METHOD describe_by_object_ref.
CREATE OBJECT type TYPE cl_abap_classdescr.
type->type_kind = typekind_class.
type->kind = kind_class.
type->absolute_name = 'CLASS_NAME_TODO'.
ENDMETHOD.
METHOD describe_by_data.
DATA lv_name TYPE string.
DATA lv_length TYPE i.
WRITE '@KERNEL lv_name.set(p_data.constructor.name);'.
WRITE '@KERNEL lv_length.set(p_data.getLength ? p_data.getLength() : 0);'.
* These are the constructor names from the js runtime
CASE lv_name.
WHEN 'Integer'.
CREATE OBJECT type.
type->type_kind = typekind_int.
type->kind = kind_elem.
type->length = 4.
WHEN 'Numc'.
CREATE OBJECT type.
type->type_kind = typekind_num.
type->kind = kind_elem.
type->length = lv_length * 2.
WHEN 'Hex'.
CREATE OBJECT type.
type->type_kind = typekind_hex.
type->kind = kind_elem.
type->length = lv_length.
WHEN 'Date'.
CREATE OBJECT type.
type->type_kind = typekind_date.
type->kind = kind_elem.
type->length = 16.
WHEN 'Time'.
CREATE OBJECT type.
type->type_kind = typekind_time.
type->kind = kind_elem.
type->length = 12.
WHEN 'Structure'.
CREATE OBJECT type TYPE cl_abap_structdescr
EXPORTING
data = p_data.
type->type_kind = typekind_struct2.
type->kind = kind_struct.
WHEN 'Table'.
CREATE OBJECT type TYPE cl_abap_tabledescr
EXPORTING
data = p_data.
type->type_kind = typekind_table.
type->kind = kind_table.
WHEN 'XString'.
CREATE OBJECT type.
type->type_kind = typekind_xstring.
type->kind = kind_elem.
type->length = 8.
WHEN 'String'.
CREATE OBJECT type.
type->type_kind = typekind_string.
type->kind = kind_elem.
type->length = 8.
WHEN 'Character'.
CREATE OBJECT type TYPE cl_abap_elemdescr.
type->type_kind = typekind_char.
type->kind = kind_elem.
type->length = lv_length * 2.
WHEN 'FieldSymbol'.
WRITE '@KERNEL lv_name = p_data.getPointer();'.
type = describe_by_data( lv_name ).
RETURN.
WHEN 'ABAPObject'.
CREATE OBJECT type TYPE cl_abap_refdescr.
type->type_kind = typekind_oref.
type->kind = kind_ref.
WHEN 'DataReference'.
CREATE OBJECT type TYPE cl_abap_refdescr.
type->type_kind = typekind_dref.
type->kind = kind_ref.
WHEN OTHERS.
WRITE / lv_name.
ASSERT 1 = 'todo_cl_abap_typedescr'.
ENDCASE.
WRITE '@KERNEL if(p_data.getQualifiedName && p_data.getQualifiedName() !== undefined) type.get().absolute_name.set(p_data.getQualifiedName());'.
IF type->absolute_name = 'ABAP_BOOL'.
type->absolute_name = '\TYPE-POOL=ABAP\TYPE=ABAP_BOOL'.
ELSEIF type->absolute_name IS INITIAL.
type->absolute_name = 'ABSOLUTE_NAME_TODO'.
ELSE.
type->absolute_name = '\TYPE=' && type->absolute_name.
ENDIF.
ENDMETHOD.
ENDCLASS. | [
31631,
537,
62,
397,
499,
62,
774,
9124,
3798,
81,
5550,
20032,
17941,
44731,
13,
198,
9,
284,
4598,
11,
428,
1398,
815,
307,
9564,
18601,
10659,
198,
220,
44731,
44513,
13,
198,
220,
220,
220,
42715,
12,
49273,
50,
198,
220,
220,
220,
220,
220,
6901,
62,
1525,
62,
7890,
198,
220,
220,
220,
220,
220,
220,
220,
30023,
9863,
2751,
279,
62,
7890,
41876,
597,
198,
220,
220,
220,
220,
220,
220,
220,
30826,
4261,
15871,
26173,
8924,
7,
4906,
8,
41876,
4526,
37,
5390,
537,
62,
397,
499,
62,
774,
9124,
3798,
81,
13,
198,
220,
220,
220,
42715,
12,
49273,
50,
198,
220,
220,
220,
220,
220,
6901,
62,
1525,
62,
3672,
198,
220,
220,
220,
220,
220,
220,
220,
30023,
9863,
2751,
279,
62,
3672,
41876,
537,
522,
198,
220,
220,
220,
220,
220,
220,
220,
30826,
4261,
15871,
26173,
8924,
7,
4906,
8,
41876,
4526,
37,
5390,
537,
62,
397,
499,
62,
774,
9124,
3798,
81,
13,
198,
220,
220,
220,
42715,
12,
49273,
50,
198,
220,
220,
220,
220,
220,
6901,
62,
1525,
62,
7890,
62,
5420,
198,
220,
220,
220,
220,
220,
220,
220,
30023,
9863,
2751,
1366,
41876,
4526,
37,
5390,
1366,
198,
220,
220,
220,
220,
220,
220,
220,
30826,
4261,
15871,
26173,
8924,
7,
4906,
8,
41876,
4526,
37,
5390,
537,
62,
397,
499,
62,
774,
9124,
3798,
81,
13,
198,
220,
220,
220,
42715,
12,
49273,
50,
198,
220,
220,
220,
220,
220,
6901,
62,
1525,
62,
15252,
62,
5420,
198,
220,
220,
220,
220,
220,
220,
220,
30023,
9863,
2751,
1366,
41876,
4526,
37,
5390,
2134,
198,
220,
220,
220,
220,
220,
220,
220,
30826,
4261,
15871,
26173,
8924,
7,
4906,
8,
41876,
4526,
37,
5390,
537,
62,
397,
499,
62,
774,
9124,
3798,
81,
13,
628,
220,
220,
220,
337,
36252,
50,
198,
220,
220,
220,
220,
220,
651,
62,
43762,
62,
3672,
198,
220,
220,
220,
220,
220,
220,
220,
30826,
4261,
15871,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
3672,
8,
41876,
4731,
13,
198,
220,
220,
220,
337,
36252,
50,
198,
220,
220,
220,
220,
220,
318,
62,
1860,
291,
62,
4906,
198,
220,
220,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
79,
62,
397,
499,
62,
30388,
8,
41876,
450,
499,
62,
30388,
13,
628,
220,
220,
220,
42865,
2099,
62,
11031,
41876,
450,
499,
62,
4906,
11031,
13,
198,
220,
220,
220,
42865,
1611,
41876,
269,
406,
49494,
352,
13,
198,
220,
220,
220,
42865,
4129,
41876,
1312,
13,
198,
220,
220,
220,
42865,
4112,
62,
3672,
41876,
4731,
13,
628,
220,
220,
220,
7102,
2257,
1565,
4694,
2099,
11031,
62,
1092,
41876,
450,
499,
62,
4906,
11031,
26173,
8924,
705,
93,
4458,
198,
220,
220,
220,
7102,
2257,
1565,
4694,
2099,
11031,
62,
10641,
41876,
450,
499,
62,
4906,
11031,
26173,
8924,
705,
34,
4458,
198,
220,
220,
220,
7102,
2257,
1565,
4694,
2099,
11031,
62,
4871,
41876,
450,
499,
62,
4906,
11031,
26173,
8924,
705,
9,
4458,
198,
220,
220,
220,
7102,
2257,
1565,
4694,
2099,
11031,
62,
4475,
41876,
450,
499,
62,
4906,
11031,
26173,
8924,
705,
35,
4458,
198,
220,
220,
220,
7102,
2257,
1565,
4694,
2099,
11031,
62,
12501,
22468,
41876,
450,
499,
62,
4906,
11031,
26173,
8924,
31051,
4458,
198,
220,
220,
220,
7102,
2257,
1565,
4694,
2099,
11031,
62,
12501,
22468,
1433,
41876,
450,
499,
62,
4906,
11031,
26173,
8924,
705,
64,
4458,
198,
220,
220,
220,
7102,
2257,
1565,
4694,
2099,
11031,
62,
12501,
22468,
2682,
41876,
450,
499,
62,
4906,
11031,
26173,
8924,
705,
68,
4458,
198,
220,
220,
220,
7102,
2257,
1565,
4694,
2099,
11031,
62,
67,
5420,
41876,
450,
499,
62,
4906,
11031,
26173,
8924,
705,
75,
4458,
198,
220,
220,
220,
7102,
2257,
1565,
4694,
2099,
11031,
62,
22468,
41876,
450,
499,
62,
4906,
11031,
26173,
8924,
705,
37,
4458,
198,
220,
220,
220,
7102,
2257,
1565,
4694,
2099,
11031,
62,
33095,
41876,
450,
499,
62,
4906,
11031,
26173,
8924,
705,
55,
4458,
198,
220,
220,
220,
7102,
2257,
1565,
4694,
2099,
11031,
62,
600,
41876,
450,
499,
62,
4906,
11031,
26173,
8924,
705,
40,
4458,
198,
220,
220,
220,
7102,
2257,
1565,
4694,
2099,
11031,
62,
600,
16,
41876,
450,
499,
62,
4906,
11031,
26173,
8924,
705,
65,
4458,
198,
220,
220,
220,
7102,
2257,
1565,
4694,
2099,
11031,
62,
600,
17,
41876,
450,
499,
62,
4906,
11031,
26173,
8924,
705,
82,
4458,
198,
220,
220,
220,
7102,
2257,
1565,
4694,
2099,
11031,
62,
600,
23,
41876,
450,
499,
62,
4906,
11031,
26173,
8924,
705,
23,
4458,
198,
220,
220,
220,
7102,
2257,
1565,
4694,
2099,
11031,
62,
22510,
41876,
450,
499,
62,
4906,
11031,
26173,
8924,
705,
45,
4458,
198,
220,
220,
220,
7102,
2257,
1565,
4694,
2099,
11031,
62,
382,
69,
41876,
450,
499,
62,
4906,
11031,
26173,
8924,
705,
81,
4458,
198,
220,
220,
220,
7102,
2257,
1565,
4694,
2099,
11031,
62,
34860,
41876,
450,
499,
62,
4906,
11031,
26173,
8924,
705,
47,
4458,
198,
220,
220,
220,
7102,
2257,
1565,
4694,
2099,
11031,
62,
8841,
41876,
450,
499,
62,
4906,
11031,
26173,
8924,
705,
70,
4458,
198,
220,
220,
220,
7102,
2257,
1565,
4694,
2099,
11031,
62,
7249,
16,
41876,
450,
499,
62,
4906,
11031,
26173,
8924,
705,
84,
4458,
198,
220,
220,
220,
7102,
2257,
1565,
4694,
2099,
11031,
62,
7249,
17,
41876,
450,
499,
62,
4906,
11031,
26173,
8924,
705,
85,
4458,
198,
220,
220,
220,
7102,
2257,
1565,
4694,
2099,
11031,
62,
11487,
41876,
450,
499,
62,
4906,
11031,
26173,
8924,
705,
71,
4458,
198,
220,
220,
220,
7102,
2257,
1565,
4694,
2099,
11031,
62,
2435,
41876,
450,
499,
62,
4906,
11031,
26173,
8924,
705,
51,
4458,
198,
220,
220,
220,
7102,
2257,
1565,
4694,
2099,
11031,
62,
87,
8841,
41876,
450,
499,
62,
4906,
11031,
26173,
8924,
705,
88,
4458,
198,
220,
220,
220,
220,
198,
220,
220,
220,
7102,
2257,
1565,
4694,
1611,
62,
68,
10671,
41876,
269,
406,
49494,
352,
26173,
8924,
705,
36,
4458,
198,
220,
220,
220,
7102,
2257
] |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
] |
REPORT /ctac/alv_template. " <<< DO CHANGE
*Source: Template for an ALV Report, Enhancing the Quality of ABAP Development
*$*$----------------------------------------------------------------*
*$*$ Company : Ctac Nederland
*$*$ Author : Wouter Heuvelmans / Ben Meijs
*$*$ Date : May 2004
*$*$ SAP rel. : 6.20
*$*$ Transport: <NR>
*$*$ Purpose : Template For ALV Reports
*$*$ This template can be used as a basis for ALV Reports.
*$*$ After copying this template, you need to implement the
*$*$ following components:
*$*$ - Copy status STANDARD of function group SALV to the
*$*$ program and adjust the status to your needs
*$*$ - implement the selectionscreen as needed
*$*$ - implement subroutine A001_SELECTION
*$*$ - add the ALV structure with all displayfields to the
*$*$ Dictionary
*$*$ - adjust the TYPE-definition for
*$*$ - ta_list (ALV output table);
*$*$ - adjust the VALUE-declaration for the constants
*$*$ - co_struc = name of the DDIC ALV structure used
*$*$ - implement your own GUI functions in subroutine
*$*$ defined in constant CO_ROUT_UCOMM.
*$*$ - implement the headertexts in subroutine BUILD_COMMENT
*$*$ - if you need a second ALV list which is activated by
*$*$ one of your own GUI functions, you'll have to
*$*$ implement the following subroutines:
*$*$ * BUILD_SEC_LIST
*$*$ * DISPLAY_SEC_LIST
*$*$ * MODIFY_FIELDCAT_SEC
*$*$ * CHANGE_LAYOUT_SEC
*$*$
*$*$----------------------------------------------------------------*
*$*$----------------------------------------------------------------*
*$*$ M O D I F I C A T I O N S *
*$*$----------------------------------------------------------------*
*& Changed By :
*& Date :
*& SAP rel. :
*& Transport :
*& Purpose :
*&------------------------------------------------------------------*
*$*$----------------------------------------------------------------*
*$*$ G L O B A L D A T A D E C L A R A T I O N *
*$*$----------------------------------------------------------------*
*$*$----------------------------------------------------------------*
*$*$ Type pool declarations
*$*$----------------------------------------------------------------*
TYPE-POOLS: slis, "ALV types / constants
sdydo,
abap, "ABAP reporting types / constants
icon. "Possible icons
*$*$----------------------------------------------------------------*
*-- Constants
*$*$----------------------------------------------------------------*
CONSTANTS:
co_background_alv TYPE sdydo_key VALUE 'ALV_WALLPAPER',
co_save TYPE c VALUE 'A',
co_msgty_inf TYPE symsgty VALUE 'I'.
*----------------------------------------------------------------------*
* Constants for interactive functions of an ALV
*----------------------------------------------------------------------*
CONSTANTS:
co_double_click TYPE syucomm VALUE '&IC1', "CHOOSE / F2
*----------------------------------------------------------------------*
* Customer interactive functions for the ALV
*----------------------------------------------------------------------*
co_sec_list
TYPE syucomm VALUE 'SEC_LIST'.
"Secundary list
*----------------------------------------------------------------------*
* Names of the routines to be called dynamically from the ALV function
*----------------------------------------------------------------------*
CONSTANTS:
co_rout_pf_stat TYPE char30 VALUE 'R0_SET_PF_STATUS',
co_rout_ucomm TYPE char30 VALUE 'R1_PROCESS_USER_COMMAND',
co_rout_top_of_page TYPE char30 VALUE 'R2_SET_TOP_OF_PAGE',
co_rout_html_top TYPE char30 VALUE 'R3_SET_HTML_TOP_OF_PAGE',
co_rout_html_end TYPE char30 VALUE 'R4_SET_HTML_END_OF_LIST',
co_rout_pf_stat_sec TYPE char30 VALUE 'R5_SET_PF_STATUS_SEC',
co_rout_ucomm_sec TYPE char30 VALUE 'R6_PROCESS_UCOMM_SEC',
co_rout_top_page_sec TYPE char30 VALUE 'R7_SET_TOP_OF_PAGE_SEC'.
CONSTANTS:
co_struc TYPE tabname VALUE '/CTAC/S_ALV_STRUCTURE',
co_struc_sec TYPE tabname VALUE '/CTAC/S_ALV_STRUC_SEC'.
*$*$----------------------------------------------------------------*
*$*$ Data definitions
*$*$----------------------------------------------------------------*
*TYPES: <type>.
*$*$----------------------------------------------------------------*
*$*$ Data declarations
*-- Internal Tables
*$*$----------------------------------------------------------------*
* TA_LIST is the internal table containing the data to be outputted
* by ALV
*----------------------------------------------------------------------*
DATA: ta_list TYPE TABLE OF /ctac/s_alv_structure.
*----------------------------------------------------------------------*
* Internal tables, needed for ALV formatting
*----------------------------------------------------------------------*
DATA: ta_comment TYPE slis_t_listheader. "Top of page of the ALV
*$*$----------------------------------------------------------------*
*-- Work areas / records
*$*$----------------------------------------------------------------*
DATA:
st_s_variant TYPE disvariant, "Display Variant (Ext. Use)
st_s_var_usr TYPE disvariant.
*$*$----------------------------------------------------------------*
*-- Temporary Fields / Variables
*$*$----------------------------------------------------------------*
DATA: tp_repid_this TYPE syrepid.
*
*$*$----------------------------------------------------------------*
*$*$ S E L E C T I O N S C R E E N *
*$*$----------------------------------------------------------------*
*$*$ Define your selection-criteria here *
*$*$----------------------------------------------------------------*
SELECTION-SCREEN: BEGIN OF BLOCK s01 WITH FRAME TITLE text-s01.
*SELECT-OPTIONS: <so_sel01> FOR <table_field>.
*PARAMETERS: <pa_parm1> TYPE <type>.
SELECTION-SCREEN: END OF BLOCK s01.
*$*$----------------------------------------------------------------*
*$*$ This block is meant for giving the user the possibility to *
*$*$ define whether the output should be printed directly. *
*$*$----------------------------------------------------------------*
SELECTION-SCREEN: BEGIN OF BLOCK immed WITH FRAME TITLE text-imm.
SELECTION-SCREEN: BEGIN OF LINE.
SELECTION-SCREEN: COMMENT 1(31) text-c01. " Output directly to printer?
PARAMETERS: pa_print AS CHECKBOX.
SELECTION-SCREEN: END OF LINE.
SELECTION-SCREEN: END OF BLOCK immed.
*$*$----------------------------------------------------------------*
*$*$ This block is meant for giving the user the possibility to *
*$*$ choose an ALV variant on the selection-screen *
*$*$----------------------------------------------------------------*
SELECTION-SCREEN: BEGIN OF BLOCK variant WITH FRAME TITLE text-var.
PARAMETERS: pa_varia TYPE slis_vari.
SELECTION-SCREEN: END OF BLOCK variant.
*&------------------------------------------------------------------*
*$*$----------------------------------------------------------------*
*$*$ I N I T I A L I Z A T I O N *
*$*$----------------------------------------------------------------*
*INITIALIZATION.
*$*$----------------------------------------------------------------*
*$*$ A T S E L E C T I O N S C R E E N *
*$*$----------------------------------------------------------------*
*-- Selection screen output
*AT SELECTION-SCREEN OUTPUT.
*-- Selection screen processing
AT SELECTION-SCREEN.
PERFORM process_output_variant USING pa_varia
CHANGING st_s_variant
st_s_var_usr.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR pa_varia.
*----------------------------------------------------------------------*
* Handling possible values for the ALV Display Variant
*----------------------------------------------------------------------*
PERFORM get_possible_variants CHANGING pa_varia
st_s_variant
st_s_var_usr.
*$*$----------------------------------------------------------------*
*$*$ M A I N P R O C E S S I N G *
*$*$----------------------------------------------------------------*
START-OF-SELECTION.
PERFORM init_report.
*----------------------------------------------------------------------*
* Select the data that is going to be displayed in the ALV
*----------------------------------------------------------------------*
PERFORM select_data TABLES ta_list.
END-OF-SELECTION.
*----------------------------------------------------------------------*
* Finish the internal table that is going to be displayed in the ALV.
*----------------------------------------------------------------------*
PERFORM process_data TABLES ta_list.
*----------------------------------------------------------------------*
* Call the correct function to display the ALV data.
*----------------------------------------------------------------------*
PERFORM display_data TABLES ta_list.
*$*$----------------------------------------------------------------*
*$*$ F O R M R O U T I N E S *
*$*$----------------------------------------------------------------*
*&---------------------------------------------------------------------*
*& Form init_report
*&---------------------------------------------------------------------*
* One time actions that are required at this moment.
*----------------------------------------------------------------------*
FORM init_report .
tp_repid_this = sy-repid. "or sy-cprog
ENDFORM. " init_report
*&--------------------------------------------------------------------*
*& Form select_data
*&--------------------------------------------------------------------*
* Build internal table TA_LIST
*---------------------------------------------------------------------*
FORM select_data TABLES tta_list STRUCTURE /ctac/s_alv_structure.
*---------------------------------------------------------------------*
* For example, build the internal table from the purchase header database.
*---------------------------------------------------------------------*
* SELECT * FROM ekko
* INTO TABLE tta_list
* WHERE ebeln IN so_ebeln.
ENDFORM. " select_data
*&--------------------------------------------------------------------*
*& Form process_data
*&--------------------------------------------------------------------*
* Process the selected data so that it can be used in the ALV.
*---------------------------------------------------------------------*
FORM process_data TABLES tta_list STRUCTURE /ctac/s_alv_structure.
SORT tta_list.
ENDFORM. " process_data
*&--------------------------------------------------------------------*
*& Form display_data
*&--------------------------------------------------------------------*
* Prepare the ALV output.
* Display output in ALV format.
* If SAPGUI is available, the GRID will be displayed.
* In other situations, the LIST will be displayed.
*---------------------------------------------------------------------*
FORM display_data TABLES tta_list STRUCTURE /ctac/s_alv_structure.
*---------------------------------------------------------------------*
* Comment:
* Define all data locally, except when you explicitly need it globally!
*---------------------------------------------------------------------*
DATA: lta_fcat TYPE slis_t_fieldcat_alv. "Field Catalog
DATA: lta_extab TYPE slis_t_extab. "Excl. Functions
DATA: lta_spec_groups TYPE slis_t_sp_group_alv. "Spec. groups
DATA: lta_sort_alv TYPE slis_t_sortinfo_alv.
DATA: lta_filter TYPE slis_t_filter_alv.
DATA: lta_events TYPE slis_t_event.
DATA: lta_event_exit TYPE slis_t_event_exit.
DATA: lta_alv_graphics TYPE dtc_t_tc.
DATA: lta_add_fieldcat TYPE slis_t_add_fieldcat.
DATA: lta_hyperlink TYPE lvc_t_hype.
DATA: lst_layout TYPE slis_layout_alv, "Layout Settings
lst_is_print TYPE slis_print_alv,
lst_sel_hide TYPE slis_sel_hide_alv,
lst_exit_user TYPE slis_exit_by_user.
DATA: ltp_title TYPE lvc_title,
ltp_gui_active TYPE boolean,
ltp_tdline TYPE tdline,
ltp_reprep_id TYPE slis_reprep_id,
ltp_html_hght_top TYPE i,
ltp_html_hght_end TYPE i,
ltp_exit_caller(1) TYPE c.
*----------------------------------------------------------------------*
* First we build the field catalog.
* This internal table is required to determine which fields of the internal
* table are to be displayed and how they should be displayed.
*----------------------------------------------------------------------*
PERFORM build_fieldcatalog USING co_struc
CHANGING lta_fcat[].
*----------------------------------------------------------------------*
* After building the field catalog (e.g., from a DDIC structure), we can
* modify these settings in the following subroutine.
*----------------------------------------------------------------------*
PERFORM modify_fieldcatalog CHANGING lta_fcat[].
*----------------------------------------------------------------------*
* Also, we can modify the layout settings.
*----------------------------------------------------------------------*
PERFORM change_layout_settings CHANGING lst_layout.
*----------------------------------------------------------------------*
* Set title
*----------------------------------------------------------------------*
ltp_title = sy-title.
*----------------------------------------------------------------------*
* Table ta_comment is used to display header information in the
* top-of-page of the ALV output.
*----------------------------------------------------------------------*
PERFORM build_comment CHANGING ta_comment[].
*----------------------------------------------------------------------*
* Determine whether the report is executed within a SAPGUI environment.
* We need to know whether GUI-controls are accessible.
* If not, we use function module REUSE_ALV_LIST_DISPLAY (without
* controls) instead of function module REUSE_ALV_GRID_DISPLAY.
*----------------------------------------------------------------------*
CALL FUNCTION 'GUI_IS_AVAILABLE'
IMPORTING
return = ltp_gui_active.
*----------------------------------------------------------------------*
* If we send the output directly to the printer, we can
* deactivate the GUI-setting and select the LIST-variant of the ALV.
*----------------------------------------------------------------------*
IF pa_print = abap_true.
lst_is_print-print = 'X'.
CLEAR ltp_gui_active.
ENDIF.
IF ltp_gui_active = abap_true.
*----------------------------------------------------------------------*
* GUI active -> Activate the ALV GRID (control enabled)
*----------------------------------------------------------------------*
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = tp_repid_this
i_callback_pf_status_set = co_rout_pf_stat
i_callback_user_command = co_rout_ucomm
i_callback_top_of_page = co_rout_top_of_page
* i_callback_html_top_of_page = co_rout_html_top "
* i_callback_html_end_of_list = co_rout_html_end "
i_background_id = co_background_alv
* i_structure_name = co_struc "
i_grid_title = ltp_title
is_layout = lst_layout
it_fieldcat = lta_fcat[]
* it_excluding = lta_extab[] "
* it_special_groups = lta_spec_groups[] "
* it_sort = lta_sort_alv[] "
* it_filter = lta_filter[] "
* is_sel_hide = lst_sel_hide "
i_default = abap_true
i_save = co_save
is_variant = st_s_variant
* it_events = lta_events[] "
* it_event_exit = lta_event_exit[] "
is_print = lst_is_print
* is_reprep_id = ltp_reprep_id "
* i_screen_start_column = 0 "
* i_screen_start_line = 0 "
* i_screen_end_column = 0 "
* i_screen_end_line = 0 "
* it_alv_graphics = lta_alv_graphics[] "
* it_add_fieldcat = lta_add_fieldcat[] "
* it_hyperlink = lta_hyperlink[] "
* i_html_height_top = ltp_html_hght_top "
* i_html_height_end = ltp_html_hght_end "
* IMPORTING "
* e_exit_caused_by_caller = ltp_exit_caller "
* es_exit_caused_by_user = lst_exit_user "
TABLES
t_outtab = ta_list
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ELSE.
*----------------------------------------------------------------------*
* GUI not active -> ALV LIST displayed in Background.
* All parameters for interactive processing need not be supplied.
*----------------------------------------------------------------------*
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
* i_interface_check = space "
* i_bypassing_buffer = space "
* i_buffer_active = space "
i_callback_program = tp_repid_this
* i_callback_pf_status_set = co_rout_pf_stat "
* i_callback_user_command = co_rout_ucomm "
* i_structure_name = co_struc "
is_layout = lst_layout
it_fieldcat = lta_fcat[]
* it_excluding = lta_extab[] "
* it_special_groups = lta_spec_groups[] "
* it_sort = lta_sort_alv[] "
* it_filter = lta_filter[] "
* is_sel_hide = lst_sel_hide "
i_default = abap_true
* i_save = co_save "
is_variant = st_s_variant
* it_events = lta_events[] "
* it_event_exit = lta_event_exit[] "
is_print = lst_is_print
* is_reprep_id = ltp_reprep_id "
* i_screen_start_column = 0 "
* i_screen_start_line = 0 "
* i_screen_end_column = 0 "
* i_screen_end_line = 0 "
* IMPORTING
* e_exit_caused_by_caller = ltp_exit_caller "
* es_exit_caused_by_user = lst_exit_user "
TABLES
t_outtab = tta_list
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDIF.
ENDFORM. " display_data
*&--------------------------------------------------------------------*
*& Form get_possible_variants
*&--------------------------------------------------------------------*
* Handle request for possible values on the output variant.
*---------------------------------------------------------------------*
FORM get_possible_variants CHANGING ctp_varia TYPE slis_vari
cst_s_variant TYPE disvariant
cst_s_var_usr TYPE disvariant.
DATA: ltp_exit(1) TYPE c.
PERFORM init_variant USING sy-repid
CHANGING cst_s_variant.
CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
EXPORTING
is_variant = cst_s_variant
i_save = co_save
IMPORTING
e_exit = ltp_exit
es_variant = cst_s_var_usr
EXCEPTIONS
not_found = 1
program_error = 2
OTHERS = 3.
CASE sy-subrc.
WHEN 0.
IF ltp_exit = abap_false.
ctp_varia = st_s_var_usr-variant.
ENDIF.
WHEN 1.
MESSAGE ID sy-msgid TYPE co_msgty_inf NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
WHEN 2.
MESSAGE ID sy-msgid TYPE co_msgty_inf NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
WHEN 3.
MESSAGE ID sy-msgid TYPE co_msgty_inf NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDCASE.
ENDFORM. " get_possible_variants
*&--------------------------------------------------------------------*
*& Form init_variant
*&--------------------------------------------------------------------*
* Initialize the output variant
*---------------------------------------------------------------------*
FORM init_variant USING utp_repid_this TYPE syrepid
CHANGING cst_s_variant TYPE disvariant.
CLEAR cst_s_variant.
cst_s_variant-report = utp_repid_this.
ENDFORM. " init_variant
*&--------------------------------------------------------------------*
*& Form r0_set_pf_status
*&--------------------------------------------------------------------*
* If you need additional GUI functions, copy status STANDARD
* from function group SALV and add your own functions to this status.
* In this routine, you specify that you want to use your own GUI
* status instead of the basic GUI status.
*---------------------------------------------------------------------*
* -->UTA_EXTAB text
*---------------------------------------------------------------------*
FORM r0_set_pf_status USING uta_extab TYPE slis_t_extab. "#EC CALLED
*---------------------------------------------------------------------*
* Copy GUI status 'STANDARD' from functiongroup 'SALV'.
* After copy, reactivate function '&RNT_PREV' and place this function
* in the 1st position of the menu bar.
*---------------------------------------------------------------------*
SET PF-STATUS 'STANDARD'.
ENDFORM. "R0_SET_PF_STATUS
*&--------------------------------------------------------------------*
*& Form r1_process_user_command
*&--------------------------------------------------------------------*
* This routine deals with the "non-standard" GUI-functions.
* It enables you to do the following:
* - Double-click or click on a hotspotted field
* - Implement your own GUI-functions
* You'll find some predefined examples in this routine.
*---------------------------------------------------------------------*
FORM r1_process_user_command "#EC CALLED
USING utp_ucomm TYPE syucomm
utp_selfield TYPE slis_selfield.
DATA: lta_list_sec TYPE TABLE OF /ctac/s_alv_struc_sec.
DATA: ltp_repid TYPE syrepid.
* DATA: ltp_ebeln_num(10) TYPE n.
* DATA: ltp_ebeln TYPE ebeln.
* DATA: ltp_matnr TYPE matnr.
* DATA: ltp_matnr_char(18) TYPE c.
*
*----------------------------------------------------------------------*
* Handle the specific user-commands. *
*----------------------------------------------------------------------*
CASE utp_ucomm.
*----------------------------------------------------------------------*
* Handle double click or hotspot on a specific field. *
* These are some examples *
*----------------------------------------------------------------------*
WHEN co_double_click.
CASE utp_selfield-fieldname.
* WHEN 'EBELN'.
*
* ltp_ebeln_num = utp_selfield-value.
* ltp_ebeln = ltp_ebeln_num.
* CALL FUNCTION 'MR_PO_DISPLAY'
* EXPORTING
* i_ebeln = ltp_ebeln.
*
* WHEN 'LIFNR'.
*
* SET PARAMETER ID 'LIF' FIELD utp_selfield-value.
* CALL TRANSACTION 'MK03' AND SKIP FIRST SCREEN.
* WHEN 'TABNAME'.
*
* REFRESH bdcdata.
* PERFORM bdc_dynpro USING 'SAPMSRD0' '0102'.
* PERFORM bdc_field USING 'BDC_OKCODE' '=SHOW'.
* PERFORM bdc_field USING 'RSRD1-TBMA' abap_true.
* PERFORM bdc_field USING 'RSRD1-TBMA_VAL' utp_selfield-value.
*
* CALL TRANSACTION 'SE11' USING bdcdata MODE 'E'.
*
WHEN OTHERS.
ENDCASE.
*---------------------------------------------------------------------*
* Handle your own GUI functions here *
* For example, handle a secondary ALV List *
*---------------------------------------------------------------------*
WHEN co_sec_list.
PERFORM build_sec_list TABLES lta_list_sec.
PERFORM display_sec_list TABLES lta_list_sec
CHANGING utp_selfield.
*---------------------------------------------------------------------*
* Or some other GUI-functions *
*---------------------------------------------------------------------*
* WHEN 'OKCODE_01'.
* Actions for this okcode
WHEN OTHERS.
ENDCASE.
ENDFORM. "R1_PROCESS_USER_COMMAND
*---------------------------------------------------------------------*
* FORM R2_SET_TOP_OF_PAGE *
*---------------------------------------------------------------------*
* Put the content of table TA_COMMENT on the top of the ALV *
*---------------------------------------------------------------------*
FORM r2_set_top_of_page. "#EC CALLED
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = ta_comment
EXCEPTIONS
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. "R2_SET_TOP_OF_PAGE
*&--------------------------------------------------------------------*
*& Form build_comment
*&--------------------------------------------------------------------*
* Create the internal table that is going to be the TOP-OF-PAGE
* of the ALV grid or list.
*---------------------------------------------------------------------*
FORM build_comment CHANGING cta_top_of_page TYPE slis_t_listheader.
DATA: lwa_line TYPE slis_listheader.
REFRESH cta_top_of_page.
*---------------------------------------------------------------------*
* LIST HEADING LINE: TYPE H
*---------------------------------------------------------------------*
CLEAR lwa_line.
lwa_line-typ = 'H'.
*---------------------------------------------------------------------*
* LLINE-KEY: NOT USED FOR THIS TYPE
*---------------------------------------------------------------------*
lwa_line-info = text-100.
APPEND lwa_line TO cta_top_of_page.
*---------------------------------------------------------------------*
* STATUS LINE: TYPE S
*---------------------------------------------------------------------*
CLEAR lwa_line.
lwa_line-typ = 'S'.
lwa_line-key = text-101.
lwa_line-info = text-102.
APPEND lwa_line TO cta_top_of_page.
lwa_line-key = text-103.
lwa_line-info = text-104.
APPEND lwa_line TO cta_top_of_page.
*---------------------------------------------------------------------*
* ACTION LINE: TYPE A
*---------------------------------------------------------------------*
CLEAR lwa_line.
lwa_line-typ = 'A'.
*---------------------------------------------------------------------*
* LLINE-KEY: NOT USED FOR THIS TYPE
*---------------------------------------------------------------------*
lwa_line-info = text-105.
APPEND lwa_line TO cta_top_of_page.
ENDFORM. " build_comment
*&--------------------------------------------------------------------*
*& Form build_fieldcatalog
*&--------------------------------------------------------------------*
* Build a field catalog from the DDIC structure specified.
*---------------------------------------------------------------------*
FORM build_fieldcatalog USING utp_struc TYPE tabname
CHANGING cta_fcat TYPE slis_t_fieldcat_alv.
*----------------------------------------------------------------------*
* Build a field catalog for ALV, based on a DDIC structure.
*----------------------------------------------------------------------*
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = tp_repid_this
i_structure_name = utp_struc
i_bypassing_buffer = abap_true
CHANGING
ct_fieldcat = cta_fcat[]
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " build_fieldcatalog
*&--------------------------------------------------------------------*
*& Form change_layout_settings
*&--------------------------------------------------------------------*
* Set some layout attributes.
*---------------------------------------------------------------------*
FORM change_layout_settings CHANGING cst_layout TYPE slis_layout_alv.
*----------------------------------------------------------------------*
* Modify layout settings.
*----------------------------------------------------------------------*
cst_layout-zebra = abap_true.
cst_layout-colwidth_optimize = abap_true.
ENDFORM. " change_layout_settings
*&--------------------------------------------------------------------*
*& Form modify_fieldcatalog
*&--------------------------------------------------------------------*
* Modify the field catalog for the primary list, if needed!
* You can set attributes for every column in the ALV output by
* selecting the fieldname belonging to the column.
* For an overview of the attributes available, see the
* online documentation of function module REUSE_ALV_GRID_DISPLAY.
*---------------------------------------------------------------------*
FORM modify_fieldcatalog CHANGING cta_fcat TYPE slis_t_fieldcat_alv.
DATA: lwa_fcat TYPE slis_fieldcat_alv.
*----------------------------------------------------------------------*
* Modify the field catalog according to the requirements.
* Some examples are shown below.
*----------------------------------------------------------------------*
LOOP AT cta_fcat INTO lwa_fcat.
CASE lwa_fcat-fieldname.
* WHEN 'EBELN'.
* lwa_fcat-key = abap_true.
* lwa_fcat-hotspot = abap_true.
* MODIFY cta_fcat FROM lwa_fcat.
* WHEN 'BUKRS' OR 'EKORG' OR 'EKGRP' OR 'EBELP'.
* lwa_fcat-key = abap_true.
* MODIFY cta_fcat FROM lwa_fcat.
* WHEN 'LIFNR' or 'BELNR'.
* lwa_fcat-hotspot = abap_true.
* MODIFY cta_fcat FROM lwa_fcat.
* WHEN 'NETPR' OR 'DMBTR' OR 'MENGE'.
* lwa_fcat-no_zero = abap_true.
* MODIFY cta_fcat FROM lwa_fcat.
* WHEN 'ZGR_REQ' OR 'SHKZG'.
* lwa_fcat-just = 'C'.
* MODIFY cta_fcat FROM lwa_fcat.
WHEN OTHERS.
ENDCASE.
ENDLOOP.
ENDFORM. " modify_fieldcatalog
*&--------------------------------------------------------------------*
*& Form modify_fieldcat_SEC
*&--------------------------------------------------------------------*
* Modify the field catalog for the secondary list, if needed!
* As you could for the field catalog of the primary list, you
* can set attributes for every column by selecting the corresponding
* field name. Look at the examples.
*---------------------------------------------------------------------*
FORM modify_fieldcat_sec CHANGING cta_fcat TYPE slis_t_fieldcat_alv.
DATA: lwa_fcat TYPE slis_fieldcat_alv.
*----------------------------------------------------------------------*
* Modify the field catalog according to the requirements.
* Some examples are shown below.
*----------------------------------------------------------------------*
LOOP AT cta_fcat INTO lwa_fcat.
CASE lwa_fcat-fieldname.
* WHEN 'EBELN'.
* lwa_fcat-key = abap_true.
* lwa_fcat-hotspot = abap_true.
* MODIFY cta_fcat FROM lwa_fcat.
* WHEN 'BUKRS' OR 'EKORG' OR 'EKGRP' OR 'EBELP'.
* lwa_fcat-key = abap_true.
* MODIFY cta_fcat FROM lwa_fcat.
* WHEN 'LIFNR' or 'BELNR'.
* lwa_fcat-hotspot = abap_true.
* MODIFY cta_fcat FROM lwa_fcat.
* WHEN 'NETPR' OR 'DMBTR' OR 'MENGE'.
* lwa_fcat-no_zero = abap_true.
* MODIFY cta_fcat FROM lwa_fcat.
* WHEN 'ZGR_REQ' OR 'SHKZG'.
* lwa_fcat-just = 'C'.
* MODIFY cta_fcat FROM lwa_fcat.
WHEN OTHERS.
ENDCASE.
ENDLOOP.
ENDFORM. " modify_fieldcat_sec
*&--------------------------------------------------------------------*
*& Form build_sec_list
*&--------------------------------------------------------------------*
* Build internal table for second ALV list
*---------------------------------------------------------------------*
FORM build_sec_list TABLES tta_list STRUCTURE /ctac/s_alv_struc_sec.
ENDFORM. " build_sec_list
*&--------------------------------------------------------------------*
*& Form display_sec_list
*&--------------------------------------------------------------------*
* This form builds a second ALV list with another field catalog
* based on a second DDIC-structure (change this name!!!)
* Fill in the right structure name for constant CO_STRUC_SEC!
* .
*---------------------------------------------------------------------*
FORM display_sec_list
TABLES tta_list STRUCTURE /ctac/s_alv_struc_sec
CHANGING ctp_selfield TYPE slis_selfield.
DATA: lta_fcat TYPE slis_t_fieldcat_alv.
DATA: lta_sort_alv TYPE slis_t_sortinfo_alv.
DATA: lst_s_variant TYPE disvariant,
lst_layout TYPE slis_layout_alv,
lst_exit_by_user TYPE slis_exit_by_user.
DATA: lwa_fcat TYPE slis_fieldcat_alv.
PERFORM build_fieldcatalog USING co_struc_sec
CHANGING lta_fcat[].
PERFORM modify_fieldcat_sec CHANGING lta_fcat[].
PERFORM change_layout_settings CHANGING lst_layout.
PERFORM init_variant USING tp_repid_this
CHANGING lst_s_variant.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = tp_repid_this
i_callback_pf_status_set = co_rout_pf_stat_sec
i_callback_user_command = co_rout_ucomm_sec
i_callback_top_of_page = co_rout_top_page_sec
is_layout = lst_layout
it_fieldcat = lta_fcat
i_save = co_save
is_variant = lst_s_variant
it_sort = lta_sort_alv
* is_print = wa_is_print
IMPORTING
es_exit_caused_by_user = lst_exit_by_user
TABLES
t_outtab = tta_list
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
*----------------------------------------------------------------------*
* If field wa_exit_by_user is filled, the user has indicated that he/she wants * to quit.
* In that case, enter value 'X' in field utp_selfield_exit in order to
* cause the ALV function to stop and not return to the first ALV list shown.
*----------------------------------------------------------------------*
IF NOT lst_exit_by_user IS INITIAL.
ctp_selfield-exit = abap_true.
ENDIF.
ENDFORM. " display_sec_list
*&--------------------------------------------------------------------*
*& Form set_sort_criteria
*&--------------------------------------------------------------------*
* Determine the sort order and/or the subtotalling of the basic list.
*---------------------------------------------------------------------*
FORM set_sort_criteria CHANGING cta_sort_alv TYPE slis_t_sortinfo_alv.
ENDFORM. " set_sort_criteria_sec
*&--------------------------------------------------------------------*
*& Form process_output_variant
*&--------------------------------------------------------------------*
* Process the selected output variant
*---------------------------------------------------------------------*
FORM process_output_variant USING utp_varia TYPE slis_vari
CHANGING cst_s_variant TYPE disvariant
cst_s_var_usr TYPE disvariant.
*----------------------------------------------------------------------*
* If display-variant entered on the selection-screen, we need to check
* whether this variant exists.
*----------------------------------------------------------------------*
IF NOT utp_varia IS INITIAL.
MOVE: cst_s_variant TO cst_s_var_usr,
sy-repid TO cst_s_var_usr-report,
utp_varia TO cst_s_var_usr-variant.
CALL FUNCTION 'REUSE_ALV_VARIANT_EXISTENCE'
EXPORTING
i_save = co_save
CHANGING
cs_variant = cst_s_var_usr
EXCEPTIONS
wrong_input = 1
not_found = 2
program_error = 3
OTHERS = 4.
IF sy-subrc <> 0.
CLEAR cst_s_variant.
ELSE.
cst_s_variant = cst_s_var_usr.
ENDIF.
ELSE.
PERFORM init_variant USING sy-repid
CHANGING cst_s_variant.
ENDIF.
ENDFORM. " process_output_variant
| [
2200,
15490,
220,
1220,
310,
330,
14,
282,
85,
62,
28243,
13,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
9959,
27,
8410,
5870,
27746,
201,
198,
9,
7416,
25,
37350,
329,
281,
8355,
53,
6358,
11,
15860,
5077,
262,
14156,
286,
9564,
2969,
7712,
220,
201,
198,
9,
3,
9,
3,
10097,
9,
201,
198,
9,
3,
9,
3,
5834,
220,
1058,
43166,
330,
399,
5702,
1044,
201,
198,
9,
3,
9,
3,
6434,
220,
220,
1058,
370,
39605,
679,
84,
626,
16221,
1220,
3932,
2185,
2926,
82,
201,
198,
9,
3,
9,
3,
7536,
220,
220,
220,
220,
1058,
1737,
5472,
201,
198,
9,
3,
9,
3,
48323,
823,
13,
1058,
718,
13,
1238,
201,
198,
9,
3,
9,
3,
19940,
25,
1279,
24723,
29,
201,
198,
9,
3,
9,
3,
32039,
220,
1058,
37350,
1114,
8355,
53,
17905,
201,
198,
9,
3,
9,
3,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
770,
11055,
460,
307,
973,
355,
257,
4308,
329,
8355,
53,
17905,
13,
201,
198,
9,
3,
9,
3,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2293,
23345,
428,
11055,
11,
345,
761,
284,
3494,
262,
201,
198,
9,
3,
9,
3,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1708,
6805,
25,
201,
198,
9,
3,
9,
3,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
532,
17393,
3722,
49053,
9795,
286,
2163,
1448,
42475,
53,
284,
262,
201,
198,
9,
3,
9,
3,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1430,
290,
4532,
262,
3722,
284,
534,
2476,
201,
198,
9,
3,
9,
3,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
532,
3494,
262,
28224,
32060,
355,
2622,
201,
198,
9,
3,
9,
3,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
532,
3494,
850,
81,
28399,
317,
8298,
62,
46506,
2849,
201,
198,
9,
3,
9,
3,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
532,
751,
262,
8355,
53,
4645,
351,
477,
3359,
25747,
284,
262,
201,
198,
9,
3,
9,
3,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
28261,
201,
198,
9,
3,
9,
3,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
532,
4532,
262,
41876,
12,
46758,
329,
201,
198,
9,
3,
9,
3,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
532,
20486,
62,
4868,
357,
1847,
53,
5072,
3084,
1776,
201,
198,
9,
3,
9,
3,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
532,
4532,
262,
26173,
8924,
12,
32446,
10186,
329,
262,
38491,
201,
198,
9,
3,
9,
3,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
532,
763,
62,
19554,
66,
796,
1438,
286,
262,
20084,
2149,
8355,
53,
4645,
973,
201,
198,
9,
3,
9,
3,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
532,
3494,
534,
898,
25757,
5499,
287,
850,
81,
28399,
201,
198,
9,
3,
9,
3,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5447,
287,
6937,
7375,
62,
49,
12425,
62,
9598,
2662,
44,
13,
201,
198,
9,
3,
9,
3,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
532,
3494,
262,
13639,
5239,
82,
287,
850,
81,
28399,
20571,
26761,
62,
9858,
10979,
201,
198,
9,
3,
9,
3,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
532,
611,
345,
761,
257,
1218,
8355,
53,
1351,
543,
318,
13906,
416,
201,
198,
9,
3,
9,
3,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
530,
286,
534,
898,
25757,
5499,
11,
345,
1183,
423,
284,
201,
198,
9,
3,
9,
3,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3494,
262,
1708,
850,
81,
448,
1127,
25,
201,
198,
9,
3,
9,
3,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1635,
20571,
26761,
62,
23683,
62,
45849,
201,
198,
9,
3,
9,
3,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1635,
13954,
31519,
62,
23683,
62,
45849,
201,
198,
9,
3,
9,
3,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1635,
19164,
5064,
56,
62,
11674,
3698,
9697,
1404,
62,
23683,
201,
198,
9,
3,
9,
3,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1635,
5870,
27746,
62,
43,
4792,
12425,
62,
23683,
201,
198,
9,
3,
9,
3,
201,
198,
9,
3,
9,
3,
10097,
9,
201,
198,
201,
198,
9,
3,
9,
3,
10097,
9,
201,
198,
9,
3,
9,
3,
220,
220,
220,
220,
220,
220,
220,
220,
220,
337,
440,
360,
314,
376,
314,
327,
317,
309,
314,
440,
399,
311,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1635,
201,
198,
9,
3,
9,
3,
10097,
9,
201,
198,
9,
5,
32068,
2750,
220,
1058,
201,
198,
9,
5,
7536,
220,
220,
220,
220,
220,
220,
220,
1058,
201,
198,
9,
5,
48323,
823,
13,
220,
220,
220,
1058,
201,
198,
9,
5,
19940,
220,
220,
1058,
201,
198,
9,
5,
32039,
220,
220,
220,
220,
1058,
201,
198,
9,
5,
10097,
438,
9,
201,
198,
201,
198,
9,
3,
9,
3,
10097,
9,
201,
198,
9,
3,
9,
3,
220,
220,
220,
220,
220,
220,
220,
220,
220,
402,
406,
440,
347,
317,
406,
220,
220,
360,
317,
309,
317,
220,
220,
360,
412,
327,
406,
317,
371,
317,
309,
314,
440,
399,
220,
220,
220,
220,
220,
220,
220,
220,
1635,
201,
198,
9,
3,
9,
3,
10097,
9,
201,
198,
201,
198,
9,
3,
9,
3,
10097,
9,
201,
198,
9,
3,
9,
3,
5994,
5933,
31713,
201,
198,
9,
3,
9,
3,
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
1,
1,
1,
1
] |
"! <p class="shorttext synchronized" lang="en">Common error during selection</p>
CLASS zcx_qdrt_selection_common DEFINITION
PUBLIC
INHERITING FROM zcx_qdrt_appl_error
FINAL
CREATE PUBLIC .
PUBLIC SECTION.
"! <p class="shorttext synchronized" lang="en">CONSTRUCTOR</p>
METHODS constructor
IMPORTING
!text TYPE string OPTIONAL
!textid LIKE if_t100_message=>t100key OPTIONAL
!previous LIKE previous OPTIONAL
!msgv1 TYPE sy-msgv1 OPTIONAL
!msgv2 TYPE sy-msgv2 OPTIONAL
!msgv3 TYPE sy-msgv3 OPTIONAL
!msgv4 TYPE sy-msgv4 OPTIONAL .
PROTECTED SECTION.
PRIVATE SECTION.
ENDCLASS.
CLASS zcx_qdrt_selection_common IMPLEMENTATION.
METHOD constructor ##ADT_SUPPRESS_GENERATION.
CALL METHOD super->constructor
EXPORTING
text = text
previous = previous
msgv1 = msgv1
msgv2 = msgv2
msgv3 = msgv3
msgv4 = msgv4.
CLEAR me->textid.
IF textid IS INITIAL.
if_t100_message~t100key = if_t100_message=>default_textid.
ELSE.
if_t100_message~t100key = textid.
ENDIF.
ENDMETHOD.
ENDCLASS.
| [
40484,
1279,
79,
1398,
2625,
19509,
5239,
47192,
1,
42392,
2625,
268,
5320,
17227,
4049,
1141,
6356,
3556,
79,
29,
198,
31631,
1976,
66,
87,
62,
80,
7109,
83,
62,
49283,
62,
11321,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
3268,
16879,
2043,
2751,
16034,
1976,
66,
87,
62,
80,
7109,
83,
62,
1324,
75,
62,
18224,
198,
220,
25261,
198,
220,
29244,
6158,
44731,
764,
628,
220,
44731,
44513,
13,
628,
220,
220,
220,
366,
0,
1279,
79,
1398,
2625,
19509,
5239,
47192,
1,
42392,
2625,
268,
5320,
10943,
46126,
1581,
3556,
79,
29,
198,
220,
220,
220,
337,
36252,
50,
23772,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
5239,
220,
220,
220,
220,
41876,
4731,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
5239,
312,
220,
220,
34178,
611,
62,
83,
3064,
62,
20500,
14804,
83,
3064,
2539,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
3866,
1442,
34178,
2180,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
19662,
85,
16,
220,
220,
220,
41876,
827,
12,
19662,
85,
16,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
19662,
85,
17,
220,
220,
220,
41876,
827,
12,
19662,
85,
17,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
19662,
85,
18,
220,
220,
220,
41876,
827,
12,
19662,
85,
18,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
19662,
85,
19,
220,
220,
220,
41876,
827,
12,
19662,
85,
19,
39852,
2849,
1847,
764,
198,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
4810,
3824,
6158,
44513,
13,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1976,
66,
87,
62,
80,
7109,
83,
62,
49283,
62,
11321,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
23772,
22492,
2885,
51,
62,
40331,
32761,
62,
35353,
1137,
6234,
13,
198,
220,
220,
220,
42815,
337,
36252,
2208,
3784,
41571,
273,
198,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
2420,
220,
220,
220,
220,
796,
2420,
198,
220,
220,
220,
220,
220,
220,
220,
2180,
796,
2180,
198,
220,
220,
220,
220,
220,
220,
220,
31456,
85,
16,
220,
220,
220,
796,
31456,
85,
16,
198,
220,
220,
220,
220,
220,
220,
220,
31456,
85,
17,
220,
220,
220,
796,
31456,
85,
17,
198,
220,
220,
220,
220,
220,
220,
220,
31456,
85,
18,
220,
220,
220,
796,
31456,
85,
18,
198,
220,
220,
220,
220,
220,
220,
220,
31456,
85,
19,
220,
220,
220,
796,
31456,
85,
19,
13,
198,
220,
220,
220,
30301,
1503,
502,
3784,
5239,
312,
13,
198,
220,
220,
220,
16876,
2420,
312,
3180,
3268,
2043,
12576,
13,
198,
220,
220,
220,
220,
220,
611,
62,
83,
3064,
62,
20500,
93,
83,
3064,
2539,
796,
611,
62,
83,
3064,
62,
20500,
14804,
12286,
62,
5239,
312,
13,
198,
220,
220,
220,
17852,
5188,
13,
198,
220,
220,
220,
220,
220,
611,
62,
83,
3064,
62,
20500,
93,
83,
3064,
2539,
796,
2420,
312,
13,
198,
220,
220,
220,
23578,
5064,
13,
198,
220,
23578,
49273,
13,
628,
198,
10619,
31631,
13,
198
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1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l_abapgit_objects_super FINAL.
PUBLIC SECTION.
INTERFACES zif_abapgit_object.
ALIASES mo_files FOR zif_abapgit_object~mo_files.
METHODS:
constructor
IMPORTING
is_item TYPE zif_abapgit_definitions=>ty_item
iv_language TYPE spras.
PROTECTED SECTION.
PRIVATE SECTION.
DATA:
mv_objectname TYPE tobj-objct.
METHODS:
delete_documentation
RAISING
zcx_abapgit_exception,
pre_check
RAISING
zcx_abapgit_exception,
regenerate_sap_all.
ENDCLASS.
CLASS zcl_abapgit_object_suso IMPLEMENTATION.
METHOD constructor.
super->constructor( is_item = is_item
iv_language = iv_language ).
mv_objectname = ms_item-obj_name.
ENDMETHOD.
METHOD delete_documentation.
DATA:
lv_docu_obj TYPE dokhl-object,
lv_dummy TYPE sy-langu.
lv_docu_obj = mv_objectname.
SELECT SINGLE langu
FROM dokil INTO lv_dummy
WHERE id = 'UO' "#EC CI_GENBUFF
AND object = lv_docu_obj.
IF sy-subrc = 0.
CALL FUNCTION 'DOKU_DELETE_ALL'
EXPORTING
doku_id = 'UO'
doku_object = lv_docu_obj
suppress_transport = space
EXCEPTIONS
header_without_text = 1
index_without_header = 2
no_authority_for_devclass_xxxx = 3
no_docu_found = 4
object_is_already_enqueued = 5
object_is_enqueued_by_corr = 6
techn_enqueue_problem = 7
user_break = 8
OTHERS = 9.
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise_t100( ).
ENDIF.
ENDIF.
ENDMETHOD.
METHOD pre_check.
CONSTANTS:
lc_act_delete TYPE activ_auth VALUE '06'.
DATA:
lv_act_head TYPE activ_auth,
lv_dummy TYPE string,
lo_suso TYPE REF TO object,
lv_failed TYPE abap_bool,
lv_suso_collect_in_cts TYPE i,
ls_clskey TYPE seoclskey.
" Downport: CL_SUSO_GEN doesn't exist in 702
ls_clskey-clsname = |CL_SUSO_GEN|.
CALL FUNCTION 'SEO_CLASS_EXISTENCE_CHECK'
EXPORTING
clskey = ls_clskey
EXCEPTIONS
not_specified = 1
not_existing = 2
is_interface = 3
no_text = 4
inconsistent = 5
OTHERS = 6.
IF sy-subrc = 0.
" so these check are not executed in 702
CREATE OBJECT lo_suso
TYPE
('CL_SUSO_GEN').
CALL METHOD lo_suso->('SUSO_LOAD_FROM_DB')
EXPORTING
id_object = mv_objectname
RECEIVING
ed_failed = lv_failed.
IF lv_failed = abap_true.
" Object & does not exist; choose an existing object
MESSAGE s111(01) WITH mv_objectname INTO lv_dummy.
zcx_abapgit_exception=>raise_t100( ).
ENDIF.
CALL METHOD lo_suso->('GET_SUSO_EDIT_MODE')
EXPORTING
id_object = mv_objectname
id_planed_act = lc_act_delete
IMPORTING
ed_mode_head = lv_act_head.
IF lv_act_head <> lc_act_delete.
zcx_abapgit_exception=>raise( |SUSO { mv_objectname }: Delete not allowed. Check where-used in SU21| ).
ENDIF.
CALL METHOD lo_suso->('SUSO_COLLECT_IN_CTS')
EXPORTING
id_object = mv_objectname
RECEIVING
ed_result = lv_suso_collect_in_cts.
IF lv_suso_collect_in_cts IS NOT INITIAL.
zcx_abapgit_exception=>raise( |SUSO { mv_objectname }: Cannot delete| ).
ENDIF.
ENDIF.
ENDMETHOD.
METHOD regenerate_sap_all.
DATA: ls_e071 TYPE e071,
lt_e071 TYPE STANDARD TABLE OF e071,
lt_e071k TYPE STANDARD TABLE OF e071k.
ls_e071-pgmid = 'R3TR'.
ls_e071-object = ms_item-obj_type.
ls_e071-obj_name = ms_item-obj_name.
INSERT ls_e071 INTO TABLE lt_e071.
CALL FUNCTION 'PRGN_AFTER_IMP_SUSO_SAP_ALL'
EXPORTING
iv_tarclient = '000'
iv_is_upgrade = space
TABLES
tt_e071 = lt_e071
tt_e071k = lt_e071k.
ENDMETHOD.
METHOD zif_abapgit_object~changed_by.
rv_user = c_user_unknown. " todo
ENDMETHOD.
METHOD zif_abapgit_object~delete.
" FM SUSR_DELETE_OBJECT calls the UI. Therefore we reimplement it here.
" As the class CL_SUSO_GEN isn't present in 702, we call dynamically and
" skip the pre checks on 702 system. That seems ok.
pre_check( ).
delete_documentation( ).
DELETE FROM tobj WHERE objct = mv_objectname.
DELETE FROM tobjt WHERE object = mv_objectname.
DELETE FROM tactz WHERE brobj = mv_objectname.
CALL FUNCTION 'SUPV_DELETE_OBJECT_ASSIGNMENTS'
EXPORTING
object_name = mv_objectname
all_releases = abap_true.
CALL FUNCTION 'RS_TREE_OBJECT_PLACEMENT'
EXPORTING
object = mv_objectname
type = 'SUSO'
operation = 'DELETE'.
regenerate_sap_all( ).
ENDMETHOD.
METHOD zif_abapgit_object~deserialize.
* see function group SUSA
DATA: lv_objectname TYPE trobj_name,
ls_tobj TYPE tobj,
ls_tobjt TYPE tobjt,
ls_tobjvorflg TYPE tobjvorflg,
lt_tactz TYPE TABLE OF tactz,
lt_tobjvordat TYPE TABLE OF tobjvordat,
lt_tobjvor TYPE TABLE OF tobjvor.
ASSERT NOT ms_item-obj_name IS INITIAL.
io_xml->read( EXPORTING iv_name = 'TOBJ'
CHANGING cg_data = ls_tobj ).
ls_tobj-bname = sy-uname.
io_xml->read( EXPORTING iv_name = 'TOBJT'
CHANGING cg_data = ls_tobjt ).
io_xml->read( EXPORTING iv_name = 'TOBJVORFLG'
CHANGING cg_data = ls_tobjvorflg ).
io_xml->read( EXPORTING iv_name = 'TACTZ'
CHANGING cg_data = lt_tactz ).
io_xml->read( EXPORTING iv_name = 'TOBJVORDAT'
CHANGING cg_data = lt_tobjvordat ).
io_xml->read( EXPORTING iv_name = 'TOBJVOR'
CHANGING cg_data = lt_tobjvor ).
tadir_insert( iv_package ).
lv_objectname = mv_objectname.
CALL FUNCTION 'SUSR_COMMEDITCHECK'
EXPORTING
objectname = lv_objectname
transobjecttype = 'O'.
MODIFY tobj FROM ls_tobj. "#EC CI_SUBRC
MODIFY tobjt FROM ls_tobjt. "#EC CI_SUBRC
MODIFY tobjvorflg FROM ls_tobjvorflg. "#EC CI_SUBRC
DELETE FROM tactz WHERE brobj = ms_item-obj_name. "#EC CI_SUBRC
INSERT tactz FROM TABLE lt_tactz. "#EC CI_SUBRC
DELETE FROM tobjvordat WHERE objct = ms_item-obj_name. "#EC CI_SUBRC
INSERT tobjvordat FROM TABLE lt_tobjvordat. "#EC CI_SUBRC
DELETE FROM tobjvor WHERE objct = ms_item-obj_name. "#EC CI_SUBRC
INSERT tobjvor FROM TABLE lt_tobjvor. "#EC CI_SUBRC
regenerate_sap_all( ).
ENDMETHOD.
METHOD zif_abapgit_object~exists.
DATA: lv_objct TYPE tobj-objct.
SELECT SINGLE objct FROM tobj INTO lv_objct
WHERE objct = ms_item-obj_name.
rv_bool = boolc( sy-subrc = 0 ).
ENDMETHOD.
METHOD zif_abapgit_object~get_comparator.
RETURN.
ENDMETHOD.
METHOD zif_abapgit_object~get_deserialize_steps.
APPEND zif_abapgit_object=>gc_step_id-abap TO rt_steps.
ENDMETHOD.
METHOD zif_abapgit_object~get_metadata.
rs_metadata = get_metadata( ).
ENDMETHOD.
METHOD zif_abapgit_object~is_active.
rv_active = is_active( ).
ENDMETHOD.
METHOD zif_abapgit_object~is_locked.
rv_is_locked = abap_false.
ENDMETHOD.
METHOD zif_abapgit_object~jump.
CALL FUNCTION 'SUSR_SHOW_OBJECT'
EXPORTING
object = mv_objectname.
rv_exit = abap_true.
ENDMETHOD.
METHOD zif_abapgit_object~serialize.
DATA: ls_tobj TYPE tobj,
ls_tobjt TYPE tobjt,
ls_tobjvorflg TYPE tobjvorflg,
lt_tactz TYPE TABLE OF tactz,
lt_tobjvordat TYPE TABLE OF tobjvordat,
lt_tobjvor TYPE TABLE OF tobjvor.
SELECT SINGLE * FROM tobj INTO ls_tobj
WHERE objct = ms_item-obj_name.
IF sy-subrc <> 0.
RETURN.
ENDIF.
CLEAR ls_tobj-bname.
SELECT SINGLE * FROM tobjt INTO ls_tobjt
WHERE object = ms_item-obj_name
AND langu = mv_language. "#EC CI_GENBUFF
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( 'TOBJT no english description'
&& ' for object (' && ms_item-obj_name && ')' ).
ENDIF.
SELECT SINGLE * FROM tobjvorflg INTO ls_tobjvorflg
WHERE objct = ms_item-obj_name. "#EC CI_SUBRC
SELECT * FROM tactz INTO TABLE lt_tactz
WHERE brobj = ms_item-obj_name
ORDER BY PRIMARY KEY. "#EC CI_SUBRC "#EC CI_GENBUFF
SELECT * FROM tobjvordat INTO TABLE lt_tobjvordat
WHERE objct = ms_item-obj_name
ORDER BY PRIMARY KEY. "#EC CI_SUBRC "#EC CI_GENBUFF
SELECT * FROM tobjvor INTO TABLE lt_tobjvor
WHERE objct = ms_item-obj_name
ORDER BY PRIMARY KEY. "#EC CI_SUBRC
io_xml->add( iv_name = 'TOBJ'
ig_data = ls_tobj ).
io_xml->add( iv_name = 'TOBJT'
ig_data = ls_tobjt ).
io_xml->add( iv_name = 'TOBJVORFLG'
ig_data = ls_tobjvorflg ).
io_xml->add( ig_data = lt_tactz
iv_name = 'TACTZ' ).
io_xml->add( ig_data = lt_tobjvordat
iv_name = 'TOBJVORDAT' ).
io_xml->add( ig_data = lt_tobjvor
iv_name = 'TOBJVOR' ).
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
397,
499,
18300,
62,
15252,
62,
82,
385,
78,
5550,
20032,
17941,
44731,
3268,
16879,
2043,
2751,
16034,
1976,
565,
62,
397,
499,
18300,
62,
48205,
62,
16668,
25261,
13,
628,
220,
44731,
44513,
13,
198,
220,
220,
220,
23255,
37,
2246,
1546,
1976,
361,
62,
397,
499,
18300,
62,
15252,
13,
198,
220,
220,
220,
8355,
43429,
1546,
6941,
62,
16624,
7473,
1976,
361,
62,
397,
499,
18300,
62,
15252,
93,
5908,
62,
16624,
13,
628,
220,
220,
220,
337,
36252,
50,
25,
198,
220,
220,
220,
220,
220,
23772,
198,
220,
220,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
318,
62,
9186,
220,
220,
220,
220,
41876,
1976,
361,
62,
397,
499,
18300,
62,
4299,
50101,
14804,
774,
62,
9186,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
16129,
41876,
7500,
292,
13,
628,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
4810,
3824,
6158,
44513,
13,
198,
220,
220,
220,
42865,
25,
198,
220,
220,
220,
220,
220,
285,
85,
62,
15252,
3672,
41876,
10773,
73,
12,
26801,
310,
13,
628,
220,
220,
220,
337,
36252,
50,
25,
198,
220,
220,
220,
220,
220,
12233,
62,
22897,
341,
198,
220,
220,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
11,
628,
220,
220,
220,
220,
220,
662,
62,
9122,
198,
220,
220,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
11,
628,
220,
220,
220,
220,
220,
43519,
62,
82,
499,
62,
439,
13,
198,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1976,
565,
62,
397,
499,
18300,
62,
15252,
62,
82,
385,
78,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
23772,
13,
628,
220,
220,
220,
2208,
3784,
41571,
273,
7,
318,
62,
9186,
220,
220,
220,
220,
796,
318,
62,
9186,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
16129,
796,
21628,
62,
16129,
6739,
628,
220,
220,
220,
285,
85,
62,
15252,
3672,
796,
13845,
62,
9186,
12,
26801,
62,
3672,
13,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
12233,
62,
22897,
341,
13,
628,
220,
220,
220,
42865,
25,
198,
220,
220,
220,
220,
220,
300,
85,
62,
15390,
84,
62,
26801,
41876,
466,
14636,
75,
12,
15252,
11,
198,
220,
220,
220,
220,
220,
300,
85,
62,
67,
13513,
220,
220,
220,
41876,
827,
12,
75,
2303,
13,
628,
220,
220,
220,
300,
85,
62,
15390,
84,
62,
26801,
220,
796,
285,
85,
62,
15252,
3672,
13,
628,
220,
220,
220,
33493,
311,
2751,
2538,
2786,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
16034,
466,
34553,
39319,
300,
85,
62,
67,
13513,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
33411,
4686,
220,
220,
796,
705,
52,
46,
6,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
25113,
2943,
14514,
62,
35353,
19499,
5777,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5357,
2134,
796,
300,
85,
62,
15390,
84,
62,
26801,
13,
628,
220,
220,
220,
16876,
827,
12,
7266,
6015,
796,
657,
13,
628,
220,
220,
220,
220,
220,
42815,
29397,
4177,
2849,
705,
35,
11380,
52,
62,
7206,
2538,
9328,
62,
7036,
6,
198,
220,
220,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
466,
23063,
62,
312,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
705,
52,
46,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
466,
23063,
62,
15252,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
300,
85,
62,
15390,
84,
62,
26801,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
18175,
62,
7645,
634,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
2272,
198,
220,
220,
220,
220,
220,
220,
220,
7788,
42006,
11053,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
13639,
62,
19419,
62,
5239,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
352,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6376,
62,
19419,
62,
25677,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
362,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
645,
62,
9800,
414,
62,
1640,
62,
7959,
4871,
62,
12343,
796,
513,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
645,
62,
15390,
84,
62,
9275,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
604,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2134,
62,
271,
62,
282,
1493,
62,
268,
4188,
1739,
220,
220,
220,
220,
796,
642,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2134,
62,
271,
62,
268,
4188,
1739,
62,
1525,
62,
10215,
81,
220,
220,
220,
220,
796,
718,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1579,
62,
268,
36560,
62,
45573,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
767,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2836,
62,
9032,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
807,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
440,
4221,
4877,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
860,
13,
628,
220,
220,
220,
220
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
REPORT zaeg_grid_fall_01_sol.
"solution case 01:
" - add semicolon
" - rows/ cols loop switched
CLASS aeg1 DEFINITION.
PUBLIC SECTION.
METHODS go.
PRIVATE SECTION.
METHODS colname
IMPORTING
number TYPE i
RETURNING
VALUE(name) TYPE string.
DATA rdigits TYPE REF TO data.
DATA salv TYPE REF TO cl_salv_table.
METHODS fill
RETURNING VALUE(cols) TYPE i.
METHODS create_table
IMPORTING
width TYPE i
height TYPE i.
METHODS set
IMPORTING
VALUE(x) TYPE i
VALUE(y) TYPE i.
ENDCLASS.
CLASS aeg1 IMPLEMENTATION.
METHOD go.
DATA(cols) = fill( ).
FIELD-SYMBOLS <digits> TYPE STANDARD TABLE.
ASSIGN rdigits->* TO <digits>.
CHECK <digits> IS ASSIGNED.
TRY.
cl_salv_table=>factory(
IMPORTING
r_salv_table = salv
CHANGING
t_table = <digits> ).
DATA(columns) = salv->get_columns( ).
DO cols TIMES.
DATA(col) = CAST cl_salv_column_table( columns->get_column( CONV #( colname( sy-index ) ) ) ).
col->set_output_length( 2 ).
col->set_icon( abap_true ).
col->set_cell_type( if_salv_c_cell_type=>hotspot ).
ENDDO.
salv->get_display_settings( ).
salv->display( ).
CATCH cx_salv_msg.
ENDTRY.
ENDMETHOD.
METHOD colname.
name = |I{ number ALIGN = RIGHT WIDTH = 2 PAD = '0' }|.
ENDMETHOD.
METHOD fill.
DATA(input) =
`21;19;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;` &&
`0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;1;1;0;0;0;1;1;1;1;0;0;0;1;1;1;1;0;0;` &&
`0;0;1;1;1;0;0;1;1;1;1;1;1;0;1;1;1;1;1;1;0;0;1;1;1;1;0;0;1;1;0;0;1;1;0;1;1;0;0;1;1;0;` &&
`0;0;0;1;1;0;0;0;0;0;0;1;1;0;0;0;0;0;1;1;0;0;0;0;1;1;0;0;0;0;0;0;1;1;0;0;0;0;0;1;1;0;` &&
`0;0;0;1;1;0;0;0;0;0;1;1;0;0;0;1;1;1;1;0;0;0;0;0;1;1;0;0;0;0;1;1;0;0;0;0;1;1;1;1;0;0;` &&
`0;0;0;1;1;0;0;0;1;1;0;0;0;0;0;0;0;0;1;1;0;0;0;0;1;1;0;0;1;1;0;0;0;0;0;0;0;0;0;1;1;0;` &&
`0;0;0;1;1;0;0;1;1;0;0;0;0;0;1;1;0;0;1;1;0;0;0;1;1;1;1;0;1;1;1;1;1;1;0;1;1;1;1;1;1;0;` &&
`0;0;1;1;1;1;0;1;1;1;1;1;1;0;0;1;1;1;1;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;` &&
`0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;` &&
`0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0` .
DATA points TYPE STANDARD TABLE OF string WITH DEFAULT KEY.
SPLIT input AT ';' INTO TABLE points.
cols = CONV i( points[ 1 ] ).
DATA(rows) = CONV i( points[ 2 ] ).
create_table( width = cols height = rows ).
DATA(idx) = 3.
DO rows TIMES.
DATA(y) = sy-index.
DO cols TIMES.
DATA(x) = sy-index.
TRY.
IF points[ idx ] = '1'.
set( x = x y = y ).
ENDIF.
CATCH cx_sy_itab_line_not_found.
ENDTRY.
ADD 1 TO idx.
ENDDO.
ENDDO.
ENDMETHOD.
METHOD set.
FIELD-SYMBOLS <digits> TYPE STANDARD TABLE.
ASSIGN rdigits->* TO <digits>.
ASSIGN <digits>[ y ] TO FIELD-SYMBOL(<line>).
IF sy-subrc > 0.
APPEND INITIAL LINE TO <digits> ASSIGNING <line>.
ENDIF.
ASSIGN COMPONENT x OF STRUCTURE <line> TO FIELD-SYMBOL(<point>).
<point> = icon_led_green.
ENDMETHOD.
METHOD create_table.
DATA(comp) = VALUE cl_abap_structdescr=>component_table(
FOR i = 1 WHILE i <= width
( name = colname( i ) type = CAST cl_abap_datadescr( cl_abap_typedescr=>describe_by_name( 'ICON_D' ) ) )
).
TRY.
DATA(digit) = cl_abap_structdescr=>create(
p_components = comp
p_strict = abap_true ).
DATA(digits) = cl_abap_tabledescr=>create(
p_line_type = digit ).
CREATE DATA rdigits TYPE HANDLE digits.
FIELD-SYMBOLS <digits> TYPE STANDARD TABLE. "XXX
ASSIGN rdigits->* TO <digits>. "XXX
DO height TIMES.
APPEND INITIAL LINE TO <digits>.
ENDDO.
CATCH cx_sy_struct_creation cx_sy_table_creation INTO DATA(err_itab).
MESSAGE err_itab TYPE 'I'.
ENDTRY.
ENDMETHOD.
ENDCLASS.
START-OF-SELECTION.
NEW aeg1( )->go( ).
| [
2200,
15490,
1976,
64,
1533,
62,
25928,
62,
7207,
62,
486,
62,
34453,
13,
198,
198,
1,
82,
2122,
1339,
5534,
25,
198,
1,
532,
751,
5026,
27045,
261,
198,
1,
532,
15274,
14,
951,
82,
9052,
15293,
198,
198,
31631,
257,
1533,
16,
5550,
20032,
17941,
13,
198,
220,
44731,
44513,
13,
198,
220,
220,
220,
337,
36252,
50,
467,
13,
198,
220,
4810,
3824,
6158,
44513,
13,
198,
220,
220,
220,
337,
36252,
50,
951,
3672,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1271,
220,
220,
220,
220,
220,
41876,
1312,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
3672,
8,
41876,
4731,
13,
198,
220,
220,
220,
42865,
374,
12894,
896,
41876,
4526,
37,
5390,
1366,
13,
198,
220,
220,
220,
42865,
24143,
41876,
4526,
37,
5390,
537,
62,
21680,
85,
62,
11487,
13,
198,
220,
220,
220,
337,
36252,
50,
6070,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
26173,
8924,
7,
4033,
82,
8,
41876,
1312,
13,
198,
220,
220,
220,
337,
36252,
50,
2251,
62,
11487,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
9647,
220,
41876,
1312,
198,
220,
220,
220,
220,
220,
220,
220,
6001,
41876,
1312,
13,
198,
220,
220,
220,
337,
36252,
50,
900,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
87,
8,
41876,
1312,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
88,
8,
41876,
1312,
13,
198,
10619,
31631,
13,
198,
198,
31631,
257,
1533,
16,
30023,
2538,
10979,
6234,
13,
198,
220,
337,
36252,
467,
13,
628,
220,
220,
220,
42865,
7,
4033,
82,
8,
796,
6070,
7,
6739,
628,
220,
220,
220,
18930,
24639,
12,
23060,
10744,
3535,
50,
1279,
12894,
896,
29,
41876,
49053,
9795,
43679,
13,
198,
220,
220,
220,
24994,
16284,
374,
12894,
896,
3784,
9,
5390,
1279,
12894,
896,
28401,
198,
220,
220,
220,
5870,
25171,
1279,
12894,
896,
29,
3180,
24994,
16284,
1961,
13,
628,
220,
220,
220,
7579,
56,
13,
198,
220,
220,
220,
220,
220,
220,
220,
537,
62,
21680,
85,
62,
11487,
14804,
69,
9548,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
374,
62,
21680,
85,
62,
11487,
220,
220,
796,
24143,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5870,
15567,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
256,
62,
11487,
220,
220,
220,
220,
220,
220,
220,
796,
1279,
12894,
896,
29,
6739,
198,
220,
220,
220,
220,
220,
220,
220,
42865,
7,
28665,
82,
8,
796,
24143,
3784,
1136,
62,
28665,
82,
7,
6739,
198,
220,
220,
220,
220,
220,
220,
220,
8410,
951,
82,
31742,
1546,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
42865,
7,
4033,
8,
796,
327,
11262,
537,
62,
21680,
85,
62,
28665,
62,
11487,
7,
15180,
3784,
1136,
62,
28665,
7,
7102,
53,
1303,
7,
951,
3672,
7,
827,
12,
9630,
1267,
1267,
1267,
6739,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
951,
3784,
2617,
62,
22915,
62,
13664,
7,
362,
6739,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
951,
3784,
2617,
62,
4749,
7,
450,
499,
62,
7942,
6739,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
951,
3784,
2617,
62,
3846,
62,
4906,
7,
611,
62,
21680,
85,
62,
66,
62,
3846,
62,
4906,
14804,
17398,
13059,
6739,
198,
220,
220,
220,
220,
220,
220,
220,
23578,
18227,
13,
198,
220,
220,
220,
220,
220,
220,
220,
24143,
3784,
1136,
62,
13812,
62,
33692,
7,
6739,
198,
220,
220,
220,
220,
220,
220,
220,
24143,
3784,
13812,
7,
6739,
198,
220,
220,
220,
220,
220,
327,
11417,
43213,
62,
21680,
85,
62,
19662,
13,
198,
220,
220,
220,
23578,
40405,
13,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
951,
3672,
13,
198,
220,
220,
220,
1438,
796,
930,
40,
90,
1271,
8355,
16284,
796,
33621,
370,
2389,
4221,
796,
362,
350,
2885,
796,
705,
15,
6,
1782,
91,
13,
198,
220,
23578,
49273,
13,
628,
220,
337,
36252,
6070,
13,
198,
220,
220,
220,
42865,
7,
15414,
8,
796,
198,
220,
220,
220,
220,
220,
220,
4600,
2481,
26,
1129,
26,
15,
26,
15,
26,
15,
26,
15,
26,
15,
26,
15,
26,
15,
26,
15,
26,
15,
26,
15,
26,
15,
26,
15,
26,
15,
26,
15,
26,
15,
26,
15,
26,
15,
26,
15,
26,
15,
26,
15,
26,
15,
26,
15,
26,
15,
26,
15,
26,
15,
26,
15,
26,
15,
26,
15,
26,
15,
26,
15,
26,
15,
26,
15,
26,
15,
26,
15,
26,
15,
26,
15,
26,
15,
26,
15,
26,
15,
26,
15,
26,
15,
26,
15,
26,
63,
11405,
198,
220,
220,
220,
220,
220,
220,
4600,
15,
26,
15,
26,
15,
26,
15,
26,
15,
26,
15,
26,
15,
26,
15,
26,
15,
26,
15,
26,
15,
26,
15,
26,
15,
26,
15,
26,
15,
26,
15,
26,
15,
26,
15,
26,
15,
26,
15,
26,
15,
26,
15,
26,
15,
26,
15,
26,
16,
26,
16,
26,
15,
26,
15,
26,
15,
26,
16,
26,
16,
26,
16,
26,
16,
26,
15,
26,
15,
26,
15,
26,
16,
26,
16,
26,
16,
26,
16,
26,
15,
26,
15,
26,
63,
11405,
198,
220,
220,
220,
220,
220,
220,
4600,
15,
26,
15,
26,
16,
26,
16,
26,
16,
26,
15,
26,
15,
26,
16,
26,
16,
26,
16,
26,
16,
26,
16,
26,
16,
26,
15,
26,
16,
26,
16,
26,
16,
26,
16,
26,
16,
26,
16,
26,
15,
26,
15,
26,
16,
26,
16,
26,
16,
26,
16,
26,
15,
26,
15,
26,
16,
26,
16,
26,
15,
26,
15,
26,
16,
26,
16,
26,
15,
26,
16,
26,
16,
26,
15,
26,
15,
26,
16,
26,
16,
26,
15
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
"! <p class="shorttext synchronized" lang="en">Controlling for editing a single join table</p>
CLASS zcl_dbbr_edit_join_table_ctrl DEFINITION
PUBLIC
FINAL
CREATE PUBLIC .
PUBLIC SECTION.
INTERFACES zif_uitb_screen_controller .
"! <p class="shorttext synchronized" lang="en">Created new join table</p>
EVENTS created
EXPORTING
VALUE(es_join_table) TYPE zdbbr_join_table_ui .
"! <p class="shorttext synchronized" lang="en">CONSTRUCTOR</p>
METHODS constructor
IMPORTING
!is_join_table TYPE zdbbr_joint OPTIONAL
!if_is_new TYPE abap_bool DEFAULT abap_true .
"! <p class="shorttext synchronized" lang="en">Retrieves the updated join table</p>
METHODS get_updated_join_table
RETURNING
VALUE(result) TYPE zdbbr_join_table_ui .
PROTECTED SECTION.
PRIVATE SECTION.
ALIASES get_report_id
FOR zif_uitb_screen_controller~get_report_id .
ALIASES get_screen_id
FOR zif_uitb_screen_controller~get_screen_id .
"! Type - tabname
CONSTANTS c_p_join_table TYPE dynfnam VALUE 'P_JOINTB' ##NO_TEXT.
"! Type - ZSAT_JOINTYPE
CONSTANTS c_p_join_type TYPE dynfnam VALUE 'P_JOINTY' ##NO_TEXT.
"! Type - abap_bool
CONSTANTS c_f_is_virtual_join TYPE dynfnam VALUE 'P_XJVIRT' ##NO_TEXT.
CONSTANTS c_r_edit_join_table_controller TYPE dynfnam VALUE 'GR_EDIT_JOIN_TABLE_CONTROLLER' ##NO_TEXT.
"! Type - zsat_entity_alias
CONSTANTS c_p_alias TYPE dynfnam VALUE 'P_JOINTA' ##no_text.
"! Type - zsat_entity_alias_alv
CONSTANTS c_p_alias_alv TYPE dynfnam VALUE 'P_JONTIA' ##no_text.
DATA mr_join_table TYPE REF TO tabname .
DATA mr_is_virtual_join TYPE REF TO abap_bool .
DATA mr_alias TYPE REF TO zsat_entity_alias.
DATA mr_join_type TYPE REF TO ZSAT_JOINTYPE .
DATA mf_saved TYPE abap_bool .
data ms_entity_temp type ZSAT_ENTITY.
"! <p class="shorttext synchronized" lang="en">Join table</p>
DATA ms_join_table TYPE zdbbr_join_table_ui .
DATA mv_old_alias TYPE zsat_entity_alias.
DATA mf_is_new TYPE abap_bool .
DATA mo_cursor TYPE REF TO zcl_uitb_cursor .
DATA mr_save_func TYPE REF TO smp_dyntxt .
DATA mr_save_new_func TYPE REF TO smp_dyntxt .
"! <p class="shorttext synchronized" lang="en">Sends update value via event and clears screen values</p>
"!
METHODS send_updated_value .
"! <p class="shorttext synchronized" lang="en">Validate screen parameters</p>
"!
METHODS validate .
"! <p class="shorttext synchronized" lang="en">Set function icons/texts</p>
"!
METHODS set_functions .
"! <p class="shorttext synchronized" lang="en">Saves the validated Join Entity</p>
"!
METHODS save_entity
IMPORTING
if_leave_screen TYPE abap_bool.
ENDCLASS.
CLASS zcl_dbbr_edit_join_table_ctrl IMPLEMENTATION.
METHOD constructor.
DEFINE read_cached_field.
&1 = CAST #( lr_data_cache->get_data_ref( |{ &2 }| ) ).
END-OF-DEFINITION.
" init global data references from cache
DATA(lr_data_cache) = zcl_uitb_data_cache=>get_instance( zif_dbbr_c_report_id=>main ).
read_cached_field:
mr_join_table c_p_join_table,
mr_is_virtual_join c_f_is_virtual_join,
mr_alias c_p_alias,
mr_join_type c_p_join_type,
mr_save_func zif_dbbr_main_report_var_ids=>c_s_save_function,
mr_save_new_func zif_dbbr_main_report_var_ids=>c_s_save_and_stay_function.
*... update current screen fields
mf_is_new = if_is_new.
IF mf_is_new = abap_true.
CLEAR: mr_join_table->*,
mr_alias->*,
mr_is_virtual_join->*.
mr_join_type->* = ZIF_SAT_C_JOIN_TYPES=>inner_join.
ELSE.
mr_join_table->* = is_join_table-add_table.
mr_join_type->* = is_join_table-join_type.
mr_is_virtual_join->* = is_join_table-is_virtual.
mr_alias->* = mv_old_alias
= is_join_table-add_table_alias.
ms_entity_temp = value #(
entity_type = is_join_table-entity_type
).
ENDIF.
ENDMETHOD.
METHOD get_updated_join_table.
result = ms_join_table.
ENDMETHOD.
METHOD send_updated_value.
RAISE EVENT created
EXPORTING
es_join_table = ms_join_table.
CLEAR: ms_join_table,
ms_entity_temp,
mr_is_virtual_join->*,
mr_join_table->*,
mr_alias->*,
*......... clear save flag for next saving
mf_saved.
mr_join_type->* = ZIF_SAT_C_JOIN_TYPES=>inner_join.
mf_is_new = abap_true.
mo_cursor->set_field( c_p_join_table ).
mo_cursor->request_update( ).
ENDMETHOD.
METHOD set_functions.
IF mf_is_new = abap_true.
mr_save_func->icon_id = icon_create.
mr_save_func->icon_text = 'Create'.
mr_save_func->text = 'Create and close'.
mr_save_new_func->icon_id = icon_create.
mr_save_new_func->icon_text = 'Create +'.
mr_save_new_func->text = 'Create and continue with another entry'.
ELSE.
mr_save_func->icon_id = icon_system_save.
mr_save_func->icon_text = 'Save'.
ENDIF.
ENDMETHOD.
METHOD validate.
TRANSLATE mr_join_table->* TO UPPER CASE.
TRY.
ms_entity_temp = zcl_sat_ddic_repo_access=>get_entity( mr_join_table->* ).
CATCH zcx_sat_data_read_error INTO DATA(lx_read_error).
RAISE EXCEPTION TYPE ZCX_SAT_VALIDATION_EXCEPTION
EXPORTING
previous = lx_read_error
parameter_name = c_p_join_table.
ENDTRY.
*.. Define Entity alias if the field is still empty and check if it is unique
IF mr_alias->* IS INITIAL.
mr_alias->* = zcl_dbbr_entity_alias_util=>create_entity_alias(
iv_entity = to_upper( mr_join_table->* )
).
ENDIF.
IF mf_is_new = abap_false.
IF mv_old_alias IS NOT INITIAL AND mv_old_alias <> mr_alias->*.
zcl_dbbr_entity_alias_util=>unregister_alias( mv_old_alias ).
CLEAR: mv_old_alias.
ELSE.
DATA(lf_do_not_check_alias) = abap_true.
ENDIF.
ENDIF.
*.. Check the alias for uniqueness
TRY.
IF lf_do_not_check_alias = abap_false.
zcl_dbbr_entity_alias_util=>check_entity_alias( mr_alias->* ).
ENDIF.
CATCH ZCX_SAT_VALIDATION_EXCEPTION INTO DATA(lx_valid_error).
*...... Re raise exception with screen parameter connection
ZCX_SAT_VALIDATION_EXCEPTION=>raise_with_text(
iv_text = lx_valid_error->get_text( )
iv_parameter = c_p_alias
).
ENDTRY.
IF mr_join_type->* = ZIF_SAT_C_JOIN_TYPES=>right_outer_join AND
mr_is_virtual_join->* = abap_true.
ZCX_SAT_VALIDATION_EXCEPTION=>raise_with_text(
iv_text = |Right Outer Join is not possible with Virtual Join|
iv_parameter = c_p_join_type
).
ENDIF.
ENDMETHOD.
METHOD zif_uitb_screen_controller~call_screen.
zcl_uitb_screen_util=>call_screen(
iv_screen_id = get_screen_id( )
iv_report_id = get_report_id( )
if_selscreen = abap_true
it_object_map = VALUE #(
( variable_name = c_r_edit_join_table_controller
global_ref = me )
)
iv_start_column = 10
iv_start_line = 2
).
ENDMETHOD.
METHOD zif_uitb_screen_controller~cancel.
CLEAR mf_saved.
*.. free already registered Entity Alias
IF mr_alias->* IS NOT INITIAL.
zcl_dbbr_entity_alias_util=>unregister_alias( mr_alias->* ).
ENDIF.
zcl_dbbr_screen_helper=>leave_screen( ).
ENDMETHOD.
METHOD zif_uitb_screen_controller~free_screen_resources.
ENDMETHOD.
METHOD zif_uitb_screen_controller~get_report_id.
result = zif_dbbr_c_report_id=>main.
ENDMETHOD.
METHOD zif_uitb_screen_controller~get_screen_id.
result = zif_dbbr_screen_ids=>c_maintain_join_table.
ENDMETHOD.
METHOD zif_uitb_screen_controller~handle_user_command.
DATA(lv_function) = cv_function_code.
CLEAR cv_function_code.
mo_cursor = zcl_uitb_cursor=>get_cursor( ).
TRY.
CASE lv_function.
WHEN 'SAVE' OR 'SAVENEW'.
validate( ).
save_entity( if_leave_screen = xsdbool( lv_function <> 'SAVENEW' ) ).
ENDCASE.
CATCH ZCX_SAT_VALIDATION_EXCEPTION INTO DATA(lx_valid).
IF lx_valid->parameter_name IS NOT INITIAL.
mo_cursor->set_field( lx_valid->parameter_name ).
mo_cursor->refresh( ).
ENDIF.
lx_valid->print_message( iv_msg_type = 'E' ).
ENDTRY.
ENDMETHOD.
METHOD zif_uitb_screen_controller~pbo.
zif_uitb_screen_controller~set_status( ).
IF mo_cursor IS BOUND AND mo_cursor->is_update_requested( ).
mo_cursor->refresh( ).
ENDIF.
LOOP AT SCREEN.
IF screen-name = c_p_join_table.
IF mf_is_new = abap_false.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ELSEIF screen-name = c_p_alias_alv.
screen-input = 0.
MODIFY SCREEN.
ELSEIF screen-name = c_p_alias.
screen-required = '2'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDMETHOD.
METHOD zif_uitb_screen_controller~set_status.
set_functions( ).
zcl_dbbr_screen_helper=>set_selscreen_status(
iv_status = 'EDIT_DIALOG_STATUS'
iv_repid = zif_dbbr_c_report_id=>main
it_excluding_functions = COND #(
WHEN mf_is_new = abap_false THEN
VALUE #( ( 'SAVENEW' ) )
)
).
ENDMETHOD.
METHOD zif_uitb_screen_controller~was_not_cancelled.
rf_not_cancelled = mf_saved.
ENDMETHOD.
METHOD save_entity.
ms_join_table = VALUE #(
add_table = mr_join_table->*
add_table_alias = mr_alias->*
add_table_raw = ms_entity_temp-entity_id_raw
join_type = mr_join_type->*
is_virtual = mr_is_virtual_join->*
entity_type = ms_entity_temp-entity_type
table_name = ms_entity_temp-description
).
zcl_dbbr_entity_alias_util=>add_entity_alias( mr_alias->* ).
mf_saved = abap_true.
IF if_leave_screen = abap_false.
send_updated_value( ).
ELSE.
zcl_dbbr_screen_helper=>leave_screen( ).
ENDIF.
ENDMETHOD.
ENDCLASS.
| [
40484,
1279,
79,
1398,
2625,
19509,
5239,
47192,
1,
42392,
2625,
268,
5320,
4264,
18886,
329,
12857,
257,
2060,
4654,
3084,
3556,
79,
29,
198,
31631,
1976,
565,
62,
9945,
1671,
62,
19312,
62,
22179,
62,
11487,
62,
44755,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
25261,
198,
220,
29244,
6158,
44731,
764,
628,
220,
44731,
44513,
13,
628,
220,
220,
220,
23255,
37,
2246,
1546,
1976,
361,
62,
5013,
65,
62,
9612,
62,
36500,
764,
628,
220,
220,
220,
366,
0,
1279,
79,
1398,
2625,
19509,
5239,
47192,
1,
42392,
2625,
268,
5320,
41972,
649,
4654,
3084,
3556,
79,
29,
198,
220,
220,
220,
22399,
2727,
198,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
274,
62,
22179,
62,
11487,
8,
41876,
1976,
9945,
1671,
62,
22179,
62,
11487,
62,
9019,
764,
628,
220,
220,
220,
366,
0,
1279,
79,
1398,
2625,
19509,
5239,
47192,
1,
42392,
2625,
268,
5320,
10943,
46126,
1581,
3556,
79,
29,
198,
220,
220,
220,
337,
36252,
50,
23772,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
271,
62,
22179,
62,
11487,
41876,
1976,
9945,
1671,
62,
73,
1563,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
361,
62,
271,
62,
3605,
220,
220,
220,
220,
41876,
450,
499,
62,
30388,
5550,
38865,
450,
499,
62,
7942,
764,
198,
220,
220,
220,
366,
0,
1279,
79,
1398,
2625,
19509,
5239,
47192,
1,
42392,
2625,
268,
5320,
9781,
5034,
1158,
262,
6153,
4654,
3084,
3556,
79,
29,
198,
220,
220,
220,
337,
36252,
50,
651,
62,
43162,
62,
22179,
62,
11487,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
20274,
8,
41876,
1976,
9945,
1671,
62,
22179,
62,
11487,
62,
9019,
764,
198,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
4810,
3824,
6158,
44513,
13,
628,
220,
220,
220,
8355,
43429,
1546,
651,
62,
13116,
62,
312,
198,
220,
220,
220,
220,
220,
7473,
1976,
361,
62,
5013,
65,
62,
9612,
62,
36500,
93,
1136,
62,
13116,
62,
312,
764,
198,
220,
220,
220,
8355,
43429,
1546,
651,
62,
9612,
62,
312,
198,
220,
220,
220,
220,
220,
7473,
1976,
361,
62,
5013,
65,
62,
9612,
62,
36500,
93,
1136,
62,
9612,
62,
312,
764,
628,
220,
220,
220,
366,
0,
5994,
532,
7400,
3672,
198,
220,
220,
220,
7102,
2257,
1565,
4694,
269,
62,
79,
62,
22179,
62,
11487,
41876,
37860,
69,
7402,
26173,
8924,
705,
47,
62,
45006,
12394,
33,
6,
22492,
15285,
62,
32541,
13,
198,
220,
220,
220,
366,
0,
5994,
532,
1168,
50,
1404,
62,
45006,
1268,
25216,
198,
220,
220,
220,
7102,
2257,
1565,
4694,
269,
62,
79,
62,
22179,
62,
4906,
41876,
37860,
69,
7402,
26173,
8924,
705,
47,
62,
45006,
1268,
9936,
6,
22492,
15285,
62,
32541,
13,
198,
220,
220,
220,
366,
0,
5994,
532,
450,
499,
62,
30388,
198,
220,
220,
220,
7102,
2257,
1565,
4694,
269,
62,
69,
62,
271,
62,
32844,
62,
22179,
41876,
37860,
69,
7402,
26173,
8924,
705,
47,
62,
55,
41697,
48771,
6,
22492,
15285,
62,
32541,
13,
198,
220,
220,
220,
7102,
2257,
1565,
4694,
269,
62,
81,
62,
19312,
62,
22179,
62,
11487,
62,
36500,
41876,
37860,
69,
7402,
26173,
8924,
705,
10761,
62,
24706,
62,
45006,
1268,
62,
38148,
62,
10943,
5446,
46,
3069,
1137,
6,
22492,
15285,
62,
32541,
13,
198,
220,
220,
220,
366,
0,
5994,
532,
1976,
49720,
62,
26858,
62,
26011,
198,
220,
220,
220,
7102,
2257,
1565,
4694,
269,
62,
79,
62,
26011,
41876,
37860,
69,
7402,
26173,
8924,
705,
47,
62,
45006,
1268,
5603,
6,
22492,
3919,
62,
5239,
13,
198,
220,
220,
220,
366,
0,
5994,
532,
1976,
49720,
62,
26858,
62,
26011,
62,
282,
85,
198,
220,
220,
220,
7102,
2257,
1565,
4694,
269,
62,
79,
62,
26011,
62,
282,
85,
41876,
37860,
69,
7402,
26173,
8924,
705,
47,
62,
41,
35830,
3539,
6,
22492,
3919,
62,
5239,
13,
628,
220,
220,
220,
42865,
285,
81,
62,
22179,
62,
11487,
41876,
4526,
37,
5390,
7400,
3672,
764,
198,
220,
220,
220,
42865,
285,
81,
62,
271,
62,
32844,
62,
22179,
41876,
4526,
37,
5390,
450,
499,
62,
30388,
764,
198,
220,
220,
220,
42865,
285,
81,
62,
26011,
41876,
4526,
37,
5390,
1976,
49720,
62,
26858,
62,
26011,
13,
198,
220,
220,
220,
42865,
285,
81,
62,
22179,
62,
4906,
41876,
4526,
37,
5390,
1168,
50,
1404,
62,
45006,
1268,
25216,
764,
198,
220,
220,
220,
42865,
285,
69,
62,
82,
9586,
41876,
450,
499,
62,
30388,
764,
198,
220,
220,
220,
1366,
13845,
62,
26858,
62,
29510,
2099,
1168,
50,
1404,
62,
3525,
9050,
13,
198,
220,
220,
220,
366,
0,
1279,
79,
1398,
2625,
19509,
5239,
47192,
1,
42392,
2625,
268,
5320,
18234,
3084,
3556,
79,
29,
198,
220,
220,
220,
42865,
13845,
62,
22179,
62,
11487,
41876,
1976,
9945,
1671,
62,
22179,
62,
11487,
62,
9019,
764,
198,
220,
220,
220,
42865,
285,
85,
62,
727,
62,
26011,
41876,
1976,
49720,
62,
26858,
62,
26011,
13,
198,
220,
220,
220,
42865,
285,
69,
62,
271,
62,
3605,
41876,
450,
499,
62,
30388,
764,
198,
220,
220,
220,
42865,
6941,
62,
66,
21471,
41876,
4526,
37,
5390,
1976,
565,
62,
5013,
65,
62,
66,
21471,
764,
198,
220,
220,
220,
42865,
285,
81,
62,
21928,
62,
20786,
41876,
4526,
37,
5390,
895,
79,
62,
9892,
429,
742,
764,
198,
220,
220,
220,
42865,
285,
81,
62,
21928,
62,
3605,
62,
20786,
41876,
4526,
37,
5390,
895,
79,
62,
9892,
429,
742,
764,
628,
220,
220,
220,
366,
0,
1279,
79,
1398,
2625,
19509,
5239,
47192,
1,
42392,
2625,
268,
5320,
50,
2412,
4296,
1988,
2884,
1785,
290,
37526,
3159,
3815,
3556,
79,
29,
198,
220,
220,
220,
366,
0,
198,
220,
220,
220,
337,
36252,
50,
3758,
62,
43162,
62,
8367,
764,
198,
220,
220,
220,
366,
0,
1279,
79,
1398,
2625,
19509,
5239,
47192,
1,
42392,
2625,
268,
5320,
7762,
20540,
3159,
10007,
3556,
79,
29,
198,
220,
220,
220,
366
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS zcl_abappgp_subpacket_10 DEFINITION
PUBLIC
CREATE PUBLIC .
PUBLIC SECTION.
INTERFACES zif_abappgp_subpacket .
ALIASES from_stream
FOR zif_abappgp_subpacket~from_stream .
ALIASES get_name
FOR zif_abappgp_subpacket~get_name .
ALIASES get_type
FOR zif_abappgp_subpacket~get_type .
ALIASES to_stream
FOR zif_abappgp_subpacket~to_stream .
PROTECTED SECTION.
PRIVATE SECTION.
ENDCLASS.
CLASS ZCL_ABAPPGP_SUBPACKET_10 IMPLEMENTATION.
METHOD zif_abappgp_subpacket~dump.
rv_dump = |\tSub - { get_name( ) }(sub { get_type( ) })({ to_stream( )->get_length( ) } bytes)\n\t\ttodo\n|.
ENDMETHOD.
METHOD zif_abappgp_subpacket~from_stream.
* todo
CREATE OBJECT ri_packet
TYPE zcl_abappgp_subpacket_10.
ENDMETHOD.
METHOD zif_abappgp_subpacket~get_name.
rv_name = 'Placeholder for backward compatibility'.
ENDMETHOD.
METHOD zif_abappgp_subpacket~get_type.
rv_type = zif_abappgp_constants=>c_sub_type-placeholder_for_backward.
ENDMETHOD.
METHOD zif_abappgp_subpacket~to_stream.
CREATE OBJECT ro_stream.
* todo
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
397,
1324,
31197,
62,
7266,
8002,
316,
62,
940,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
29244,
6158,
44731,
764,
628,
220,
44731,
44513,
13,
628,
220,
220,
220,
23255,
37,
2246,
1546,
1976,
361,
62,
397,
1324,
31197,
62,
7266,
8002,
316,
764,
628,
220,
220,
220,
8355,
43429,
1546,
422,
62,
5532,
198,
220,
220,
220,
220,
220,
7473,
1976,
361,
62,
397,
1324,
31197,
62,
7266,
8002,
316,
93,
6738,
62,
5532,
764,
198,
220,
220,
220,
8355,
43429,
1546,
651,
62,
3672,
198,
220,
220,
220,
220,
220,
7473,
1976,
361,
62,
397,
1324,
31197,
62,
7266,
8002,
316,
93,
1136,
62,
3672,
764,
198,
220,
220,
220,
8355,
43429,
1546,
651,
62,
4906,
198,
220,
220,
220,
220,
220,
7473,
1976,
361,
62,
397,
1324,
31197,
62,
7266,
8002,
316,
93,
1136,
62,
4906,
764,
198,
220,
220,
220,
8355,
43429,
1546,
284,
62,
5532,
198,
220,
220,
220,
220,
220,
7473,
1976,
361,
62,
397,
1324,
31197,
62,
7266,
8002,
316,
93,
1462,
62,
5532,
764,
198,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
4810,
3824,
6158,
44513,
13,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1168,
5097,
62,
6242,
2969,
6968,
47,
62,
50,
10526,
47,
8120,
2767,
62,
940,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
1976,
361,
62,
397,
1324,
31197,
62,
7266,
8002,
316,
93,
39455,
13,
628,
220,
220,
220,
374,
85,
62,
39455,
796,
930,
59,
83,
7004,
532,
1391,
651,
62,
3672,
7,
1267,
1782,
7,
7266,
1391,
651,
62,
4906,
7,
1267,
1782,
5769,
90,
284,
62,
5532,
7,
1267,
3784,
1136,
62,
13664,
7,
1267,
1782,
9881,
19415,
77,
59,
83,
59,
926,
24313,
59,
77,
91,
13,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
1976,
361,
62,
397,
1324,
31197,
62,
7266,
8002,
316,
93,
6738,
62,
5532,
13,
198,
198,
9,
284,
4598,
628,
220,
220,
220,
29244,
6158,
25334,
23680,
374,
72,
62,
8002,
316,
198,
220,
220,
220,
220,
220,
41876,
1976,
565,
62,
397,
1324,
31197,
62,
7266,
8002,
316,
62,
940,
13,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
1976,
361,
62,
397,
1324,
31197,
62,
7266,
8002,
316,
93,
1136,
62,
3672,
13,
628,
220,
220,
220,
374,
85,
62,
3672,
796,
705,
27271,
13829,
329,
19528,
17764,
4458,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
1976,
361,
62,
397,
1324,
31197,
62,
7266,
8002,
316,
93,
1136,
62,
4906,
13,
628,
220,
220,
220,
374,
85,
62,
4906,
796,
1976,
361,
62,
397,
1324,
31197,
62,
9979,
1187,
14804,
66,
62,
7266,
62,
4906,
12,
5372,
13829,
62,
1640,
62,
1891,
904,
13,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
1976,
361,
62,
397,
1324,
31197,
62,
7266,
8002,
316,
93,
1462,
62,
5532,
13,
628,
220,
220,
220,
29244,
6158,
25334,
23680,
686,
62,
5532,
13,
198,
9,
284,
4598,
628,
220,
23578,
49273,
13,
198,
10619,
31631,
13,
198
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
*&---------------------------------------------------------------------*
*& Report ZDP_INTERPRETER
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT zdp_interpreter.
CLASS context DEFINITION DEFERRED.
CLASS abstract_expression DEFINITION ABSTRACT.
PUBLIC SECTION.
METHODS:
interpret ABSTRACT IMPORTING io_context TYPE REF TO context.
ENDCLASS.
CLASS context DEFINITION.
PUBLIC SECTION.
METHODS: constructor IMPORTING iv_input TYPE string
, get_input RETURNING VALUE(rv_input) TYPE string
, set_input IMPORTING iv_input TYPE string
, get_output RETURNING VALUE(rv_output) TYPE string
, set_output IMPORTING iv_output TYPE string.
PRIVATE SECTION.
DATA: mv_input TYPE string
, mv_output TYPE i.
ENDCLASS.
CLASS context IMPLEMENTATION.
METHOD constructor.
me->mv_input = iv_input.
ENDMETHOD.
METHOD get_input.
rv_input = me->mv_input.
ENDMETHOD.
METHOD set_input.
me->mv_input = iv_input.
ENDMETHOD.
METHOD get_output.
rv_output = me->mv_output.
ENDMETHOD.
METHOD set_output.
me->mv_output = iv_output.
ENDMETHOD.
ENDCLASS.
CLASS plus_expression DEFINITION INHERITING FROM abstract_expression.
PUBLIC SECTION.
METHODS:
interpret REDEFINITION.
ENDCLASS.
CLASS plus_expression IMPLEMENTATION.
METHOD interpret.
WRITE: / 'PlusExpression++'.
DATA: input TYPE string.
input = io_context->get_input( ).
ENDMETHOD.
ENDCLASS.
CLASS minus_expression DEFINITION INHERITING FROM abstract_expression.
PUBLIC SECTION.
METHODS:
interpret REDEFINITION.
ENDCLASS.
CLASS minus_expression IMPLEMENTATION.
METHOD interpret.
WRITE: / 'MinusExpression--'.
DATA: input TYPE string.
input = io_context->get_input( ).
ENDMETHOD.
ENDCLASS.
CLASS mainapp DEFINITION.
PUBLIC SECTION.
CLASS-METHODS:
main.
ENDCLASS.
CLASS mainapp IMPLEMENTATION.
METHOD main.
DATA: inputexpr TYPE string.
inputexpr = '10'.
DATA: context TYPE REF TO context.
CREATE OBJECT context EXPORTING iv_input = inputexpr.
DATA: list TYPE STANDARD TABLE OF REF TO abstract_expression.
APPEND NEW plus_expression( ) TO list.
APPEND NEW plus_expression( ) TO list.
APPEND NEW minus_expression( ) TO list.
APPEND NEW minus_expression( ) TO list.
APPEND NEW minus_expression( ) TO list.
FIELD-SYMBOLS <fs> TYPE REF TO abstract_expression.
LOOP AT list ASSIGNING <fs>.
<fs>->interpret( context ).
ENDLOOP.
ENDMETHOD.
ENDCLASS.
START-OF-SELECTION.
mainapp=>main( ). | [
9,
5,
10097,
30934,
9,
198,
9,
5,
6358,
220,
1168,
6322,
62,
41358,
46437,
5781,
198,
9,
5,
198,
9,
5,
10097,
30934,
9,
198,
9,
5,
198,
9,
5,
198,
9,
5,
10097,
30934,
9,
198,
2200,
15490,
1976,
26059,
62,
3849,
3866,
353,
13,
198,
31631,
4732,
5550,
20032,
17941,
23449,
1137,
22083,
13,
198,
198,
31631,
12531,
62,
38011,
5550,
20032,
17941,
9564,
18601,
10659,
13,
198,
220,
44731,
44513,
13,
198,
220,
220,
220,
337,
36252,
50,
25,
198,
220,
220,
220,
220,
220,
6179,
9564,
18601,
10659,
30023,
9863,
2751,
33245,
62,
22866,
41876,
4526,
37,
5390,
4732,
13,
198,
10619,
31631,
13,
198,
198,
31631,
4732,
5550,
20032,
17941,
13,
198,
220,
44731,
44513,
13,
198,
220,
220,
220,
337,
36252,
50,
25,
23772,
30023,
9863,
2751,
21628,
62,
15414,
41876,
4731,
198,
220,
220,
220,
220,
220,
837,
651,
62,
15414,
30826,
4261,
15871,
26173,
8924,
7,
81,
85,
62,
15414,
8,
41876,
4731,
198,
220,
220,
220,
220,
220,
837,
900,
62,
15414,
30023,
9863,
2751,
21628,
62,
15414,
41876,
4731,
198,
220,
220,
220,
220,
220,
837,
651,
62,
22915,
30826,
4261,
15871,
26173,
8924,
7,
81,
85,
62,
22915,
8,
41876,
4731,
198,
220,
220,
220,
220,
220,
837,
900,
62,
22915,
30023,
9863,
2751,
21628,
62,
22915,
41876,
4731,
13,
198,
220,
4810,
3824,
6158,
44513,
13,
198,
220,
220,
220,
42865,
25,
285,
85,
62,
15414,
41876,
4731,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
837,
285,
85,
62,
22915,
41876,
1312,
13,
198,
10619,
31631,
13,
198,
198,
31631,
4732,
30023,
2538,
10979,
6234,
13,
198,
220,
337,
36252,
23772,
13,
198,
220,
220,
220,
502,
3784,
76,
85,
62,
15414,
796,
21628,
62,
15414,
13,
198,
220,
23578,
49273,
13,
198,
220,
337,
36252,
651,
62,
15414,
13,
198,
220,
220,
220,
374,
85,
62,
15414,
796,
502,
3784,
76,
85,
62,
15414,
13,
198,
220,
23578,
49273,
13,
198,
220,
337,
36252,
900,
62,
15414,
13,
198,
220,
220,
220,
502,
3784,
76,
85,
62,
15414,
796,
21628,
62,
15414,
13,
198,
220,
23578,
49273,
13,
198,
220,
337,
36252,
651,
62,
22915,
13,
198,
220,
220,
220,
374,
85,
62,
22915,
796,
502,
3784,
76,
85,
62,
22915,
13,
198,
220,
23578,
49273,
13,
198,
220,
337,
36252,
900,
62,
22915,
13,
198,
220,
220,
220,
502,
3784,
76,
85,
62,
22915,
796,
21628,
62,
22915,
13,
198,
220,
23578,
49273,
13,
198,
10619,
31631,
13,
198,
198,
31631,
5556,
62,
38011,
5550,
20032,
17941,
3268,
16879,
2043,
2751,
16034,
12531,
62,
38011,
13,
198,
220,
44731,
44513,
13,
198,
220,
220,
220,
337,
36252,
50,
25,
198,
220,
220,
220,
6179,
23848,
36,
20032,
17941,
13,
198,
10619,
31631,
13,
198,
198,
31631,
5556,
62,
38011,
30023,
2538,
10979,
6234,
13,
198,
220,
337,
36252,
6179,
13,
198,
220,
220,
220,
44423,
25,
1220,
705,
17860,
16870,
2234,
4880,
4458,
198,
220,
220,
220,
42865,
25,
5128,
41876,
4731,
13,
198,
220,
220,
220,
5128,
796,
33245,
62,
22866,
3784,
1136,
62,
15414,
7,
6739,
628,
220,
23578,
49273,
13,
198,
10619,
31631,
13,
628,
198,
31631,
20208,
62,
38011,
5550,
20032,
17941,
3268,
16879,
2043,
2751,
16034,
12531,
62,
38011,
13,
198,
220,
44731,
44513,
13,
198,
220,
220,
220,
337,
36252,
50,
25,
198,
220,
220,
220,
6179,
23848,
36,
20032,
17941,
13,
198,
10619,
31631,
13,
198,
198,
31631,
20208,
62,
38011,
30023,
2538,
10979,
6234,
13,
198,
220,
337,
36252,
6179,
13,
198,
220,
220,
220,
44423,
25,
1220,
705,
9452,
385,
16870,
2234,
438,
4458,
198,
220,
220,
220,
42865,
25,
5128,
41876,
4731,
13,
198,
220,
220,
220,
5128,
796,
33245,
62,
22866,
3784,
1136,
62,
15414,
7,
6739,
198,
220,
23578,
49273,
13,
198,
10619,
31631,
13,
198,
198,
31631,
1388,
1324,
5550,
20032,
17941,
13,
198,
220,
44731,
44513,
13,
198,
220,
220,
220,
42715,
12,
49273,
50,
25,
198,
220,
220,
220,
220,
220,
1388,
13,
198,
10619,
31631,
13,
198,
198,
31631,
1388,
1324,
30023,
2538,
10979,
6234,
13,
198,
220,
337,
36252,
1388,
13,
198,
220,
220,
220,
42865,
25,
5128,
31937,
41876,
4731,
13,
198,
220,
220,
220,
5128,
31937,
796,
705,
940,
4458,
628,
220,
220,
220,
42865,
25,
4732,
41876,
4526,
37,
5390,
4732,
13,
198,
220,
220,
220,
29244,
6158,
25334,
23680,
4732,
7788,
15490,
2751,
21628,
62,
15414,
796,
5128,
31937,
13,
628,
220,
220,
220,
42865,
25,
1351,
41876,
49053,
9795,
43679,
3963,
4526,
37,
5390,
12531,
62,
38011,
13,
628,
220,
220,
220,
43504,
10619,
12682,
5556,
62,
38011,
7,
1267,
5390,
1351,
13,
198,
220,
220,
220,
43504,
10619,
12682,
5556,
62,
38011,
7,
1267,
5390,
1351,
13,
628,
220,
220,
220,
43504,
10619,
12682,
20208,
62,
38011,
7,
1267,
5390,
1351,
13,
198,
220,
220,
220,
43504,
10619,
12682,
20208,
62,
38011,
7,
1267,
5390,
1351,
13,
198,
220,
220,
220,
43504,
10619,
12682,
20208,
62,
38011,
7,
1267,
5390,
1351,
13,
628,
220,
220,
220,
18930,
24639,
12,
23060,
10744,
3535,
50,
1279,
9501,
29,
41876,
4526,
37,
5390,
12531,
62,
38011,
13,
628,
220,
220,
220,
17579,
3185,
5161,
1351,
24994,
3528,
15871,
1279,
9501,
28401,
198,
220,
220,
220,
220,
220,
1279,
9501,
29,
3784,
27381,
7,
4732,
6739,
198,
220,
220,
220,
23578,
21982,
3185,
13,
198,
220,
23578,
49273,
13,
198,
10619,
31631,
13,
198,
198,
2257,
7227,
12,
19238,
12,
46506,
2849,
13,
198,
220,
1388,
1324,
14804,
12417,
7,
6739
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
class ZCA_BUGTYPE_PERSIST definition
public
inheriting from ZCB_BUGTYPE_PERSIST
final
create private .
*"* public components of class ZCA_BUGTYPE_PERSIST
*"* do not include other source files here!!!
public section.
class-data AGENT type ref to ZCA_BUGTYPE_PERSIST read-only .
class-methods CLASS_CONSTRUCTOR .
protected section.
*"* protected components of class ZCA_BUGTYPE_PERSIST
*"* do not include other source files here!!!
private section.
*"* private components of class ZCA_BUGTYPE_PERSIST
*"* do not include other source files here!!!
ENDCLASS.
CLASS ZCA_BUGTYPE_PERSIST IMPLEMENTATION.
method CLASS_CONSTRUCTOR.
***BUILD 051401
************************************************************************
* Purpose : Initialize the 'class'.
*
* Version : 2.0
*
* Precondition : -
*
* Postcondition : Singleton is created.
*
* OO Exceptions : -
*
* Implementation : -
*
************************************************************************
* Changelog:
* - 1999-09-20 : (OS) Initial Version
* - 2000-03-06 : (BGR) 2.0 modified REGISTER_CLASS_AGENT
************************************************************************
* GENERATED: Do not modify
************************************************************************
create object AGENT.
call method AGENT->REGISTER_CLASS_AGENT
exporting
I_CLASS_NAME = 'ZCL_BUGTYPE_PERSIST'
I_CLASS_AGENT_NAME = 'ZCA_BUGTYPE_PERSIST'
I_CLASS_GUID = 'DF4294F4DD4F35F19294080027E6C24E'
I_CLASS_AGENT_GUID = 'DF4294F4DD4F41F19294080027E6C24E'
I_AGENT = AGENT
I_STORAGE_LOCATION = 'ZBT_BUG_TYPE'
I_CLASS_AGENT_VERSION = '2.0'.
"CLASS_CONSTRUCTOR
endmethod.
ENDCLASS.
| [
4871,
1168,
8141,
62,
12953,
25216,
62,
47,
4877,
8808,
6770,
198,
220,
1171,
198,
220,
10639,
1780,
422,
1168,
23199,
62,
12953,
25216,
62,
47,
4877,
8808,
198,
220,
2457,
198,
220,
2251,
2839,
764,
198,
198,
9,
1,
9,
1171,
6805,
286,
1398,
1168,
8141,
62,
12953,
25216,
62,
47,
4877,
8808,
198,
9,
1,
9,
466,
407,
2291,
584,
2723,
3696,
994,
10185,
198,
11377,
2665,
13,
628,
220,
1398,
12,
7890,
13077,
3525,
2099,
1006,
284,
1168,
8141,
62,
12953,
25216,
62,
47,
4877,
8808,
1100,
12,
8807,
764,
628,
220,
1398,
12,
24396,
82,
42715,
62,
10943,
46126,
1581,
764,
198,
24326,
2665,
13,
198,
9,
1,
9,
6861,
6805,
286,
1398,
1168,
8141,
62,
12953,
25216,
62,
47,
4877,
8808,
198,
9,
1,
9,
466,
407,
2291,
584,
2723,
3696,
994,
10185,
198,
19734,
2665,
13,
198,
9,
1,
9,
2839,
6805,
286,
1398,
1168,
8141,
62,
12953,
25216,
62,
47,
4877,
8808,
198,
9,
1,
9,
466,
407,
2291,
584,
2723,
3696,
994,
10185,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1168,
8141,
62,
12953,
25216,
62,
47,
4877,
8808,
30023,
2538,
10979,
6234,
13,
628,
198,
24396,
42715,
62,
10943,
46126,
1581,
13,
198,
8162,
19499,
26761,
8870,
1415,
486,
198,
17174,
17174,
4557,
198,
9,
32039,
220,
220,
220,
220,
220,
220,
220,
1058,
20768,
1096,
262,
705,
4871,
4458,
198,
9,
198,
9,
10628,
220,
220,
220,
220,
220,
220,
220,
1058,
362,
13,
15,
198,
9,
198,
9,
3771,
31448,
220,
220,
1058,
532,
198,
9,
198,
9,
2947,
31448,
220,
1058,
5573,
10565,
318,
2727,
13,
198,
9,
198,
9,
440,
46,
1475,
11755,
220,
1058,
532,
198,
9,
198,
9,
46333,
1058,
532,
198,
9,
198,
17174,
17174,
4557,
198,
9,
609,
8368,
519,
25,
198,
9,
532,
7358,
12,
2931,
12,
1238,
220,
220,
1058,
357,
2640,
8,
20768,
10628,
198,
9,
532,
4751,
12,
3070,
12,
3312,
220,
220,
1058,
357,
33,
10761,
8,
362,
13,
15,
9518,
23337,
41517,
62,
31631,
62,
4760,
3525,
198,
17174,
17174,
4557,
198,
9,
24700,
1137,
11617,
25,
2141,
407,
13096,
198,
17174,
17174,
4557,
628,
220,
2251,
2134,
13077,
3525,
13,
628,
220,
869,
2446,
13077,
3525,
3784,
31553,
41517,
62,
31631,
62,
4760,
3525,
198,
220,
220,
220,
39133,
198,
220,
220,
220,
220,
220,
314,
62,
31631,
62,
20608,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
705,
57,
5097,
62,
12953,
25216,
62,
47,
4877,
8808,
6,
198,
220,
220,
220,
220,
220,
314,
62,
31631,
62,
4760,
3525,
62,
20608,
220,
220,
220,
796,
705,
57,
8141,
62,
12953,
25216,
62,
47,
4877,
8808,
6,
198,
220,
220,
220,
220,
220,
314,
62,
31631,
62,
38,
27586,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
705,
8068,
11785,
19,
37,
19,
16458,
19,
37,
2327,
37,
1129,
1959,
1821,
7410,
1983,
36,
21,
34,
1731,
36,
6,
198,
220,
220,
220,
220,
220,
314,
62,
31631,
62,
4760,
3525,
62,
38,
27586,
220,
220,
220,
796,
705,
8068,
11785,
19,
37,
19,
16458,
19,
37,
3901,
37,
1129,
1959,
1821,
7410,
1983,
36,
21,
34,
1731,
36,
6,
198,
220,
220,
220,
220,
220,
314,
62,
4760,
3525,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
13077,
3525,
198,
220,
220,
220,
220,
220,
314,
62,
2257,
1581,
11879,
62,
29701,
6234,
220,
220,
220,
796,
705,
57,
19313,
62,
12953,
62,
25216,
6,
198,
220,
220,
220,
220,
220,
314,
62,
31631,
62,
4760,
3525,
62,
43717,
796,
705,
17,
13,
15,
4458,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
31631,
62,
10943,
46126,
1581,
198,
437,
24396,
13,
198,
10619,
31631,
13,
198
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
*&---------------------------------------------------------------------*
*& Report ZAPP_PRETTY_PRINTER_TEST
*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
REPORT zapp_pretty_printer_test.
*&---------------------------------------------------------------------*
*& Class lcl_logic
*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
CLASS lcl_logic DEFINITION FINAL.
PUBLIC SECTION.
DATA: mr_cc_input TYPE REF TO cl_gui_custom_container,
mr_text_input TYPE REF TO cl_gui_textedit.
DATA: mr_cc_output TYPE REF TO cl_gui_custom_container,
mr_text_output TYPE REF TO cl_gui_textedit.
DATA: mr_cc_input_stm TYPE REF TO cl_gui_custom_container,
mr_text_input_stm TYPE REF TO cl_gui_textedit.
DATA: mr_cc_output_stm TYPE REF TO cl_gui_custom_container,
mr_text_output_stm TYPE REF TO cl_gui_textedit.
METHODS create_controls.
METHODS pretty_print.
ENDCLASS.
CLASS lcl_logic IMPLEMENTATION.
METHOD create_controls.
CHECK mr_cc_input IS INITIAL.
CREATE OBJECT mr_cc_input
EXPORTING
container_name = 'INPUT_TEXT'.
CREATE OBJECT mr_text_input
EXPORTING
parent = mr_cc_input.
CREATE OBJECT mr_cc_output
EXPORTING
container_name = 'OUTPUT_TEXT'.
CREATE OBJECT mr_text_output
EXPORTING
parent = mr_cc_output.
CREATE OBJECT mr_cc_input_stm
EXPORTING
container_name = 'INPUT_TEXT_STATEMENT'.
CREATE OBJECT mr_text_input_stm
EXPORTING
parent = mr_cc_input_stm.
CREATE OBJECT mr_cc_output_stm
EXPORTING
container_name = 'OUTPUT_TEXT_STATEMENT'.
CREATE OBJECT mr_text_output_stm
EXPORTING
parent = mr_cc_output_stm.
mr_text_output->set_readonly_mode(
EXPORTING
readonly_mode = cl_gui_textedit=>true
EXCEPTIONS
error_cntl_call_method = 1
invalid_parameter = 2
OTHERS = 3
).
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
mr_text_input_stm->set_readonly_mode(
EXPORTING
readonly_mode = cl_gui_textedit=>true
EXCEPTIONS
error_cntl_call_method = 1
invalid_parameter = 2
OTHERS = 3
).
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
mr_text_output_stm->set_readonly_mode(
EXPORTING
readonly_mode = cl_gui_textedit=>true
EXCEPTIONS
error_cntl_call_method = 1
invalid_parameter = 2
OTHERS = 3
).
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDMETHOD.
METHOD pretty_print.
DATA lt_source TYPE sourcetable.
DATA lt_source_res TYPE sourcetable.
DATA lt_source_stm TYPE sourcetable.
DATA lt_source_res_stm TYPE sourcetable.
DATA lr_pretty_printer TYPE REF TO zcl_app_pretty_printer.
DATA lr_ex TYPE REF TO zcx_app_exception.
DATA lv_source TYPE string.
DATA lv_source_res TYPE string.
DATA lv_source_stm TYPE string.
DATA lv_source_res_stm TYPE string.
DATA lr_settings TYPE REF TO zif_app_settings.
mr_text_output->delete_text( ).
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
mr_text_input_stm->delete_text( ).
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
mr_text_output_stm->delete_text( ).
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
mr_text_input->get_textstream(
* EXPORTING
* only_when_modified = false " get text only when modified
IMPORTING
text = lv_source " Text as String with Carriage Returns and Linefeeds
* is_modified = " modify status of text
EXCEPTIONS
error_cntl_call_method = 1 " Error while retrieving a property from TextEdit control
not_supported_by_gui = 2 " Method is not supported by installed GUI
OTHERS = 3
).
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
cl_gui_cfw=>flush( ).
SPLIT lv_source AT cl_abap_char_utilities=>cr_lf INTO TABLE lt_source.
lt_source_stm = zcl_app_utilities=>conv_source_to_statement( lt_source ).
lv_source_stm = zcl_app_utilities=>conv_source_tab_to_string( lt_source_stm ).
mr_text_input_stm->set_textstream(
EXPORTING
text = lv_source_stm
).
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
cl_gui_cfw=>flush( ).
CREATE OBJECT lr_pretty_printer.
TRY.
CREATE OBJECT lr_settings TYPE zcl_app_settings.
lt_source_res = lr_pretty_printer->pretty_print(
it_source = lt_source
ir_settings = lr_settings ).
CATCH zcx_app_exception INTO lr_ex.
MESSAGE lr_ex->get_text( ) TYPE 'I' DISPLAY LIKE 'E'.
ENDTRY.
lv_source_res = zcl_app_utilities=>conv_source_tab_to_string( lt_source_res ).
mr_text_output->set_textstream(
EXPORTING
text = lv_source_res
).
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
cl_gui_cfw=>flush( ).
lt_source_res_stm = zcl_app_utilities=>conv_source_to_statement( it_source = lt_source_res iv_var = 'lt_source_res_exp' ).
lv_source_res_stm = zcl_app_utilities=>conv_source_tab_to_string( lt_source_res_stm ).
mr_text_output_stm->set_textstream(
EXPORTING
text = lv_source_res_stm
).
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
cl_gui_cfw=>flush( ).
ENDMETHOD.
ENDCLASS.
INCLUDE zapp_pretty_printer_test_so01.
DATA gr_logic TYPE REF TO lcl_logic.
START-OF-SELECTION.
CREATE OBJECT gr_logic.
CALL SCREEN 0100.
INCLUDE zapp_pretty_printer_test_ui01.
INCLUDE zapp_pretty_printer_test_co01.
| [
9,
5,
10097,
30934,
9,
198,
9,
5,
6358,
1168,
24805,
62,
47,
26087,
9936,
62,
4805,
41358,
62,
51,
6465,
198,
9,
5,
10097,
30934,
9,
198,
9,
5,
198,
9,
5,
10097,
30934,
9,
198,
2200,
15490,
1976,
1324,
62,
37784,
62,
1050,
3849,
62,
9288,
13,
628,
198,
9,
5,
10097,
30934,
9,
198,
9,
5,
5016,
300,
565,
62,
6404,
291,
198,
9,
5,
10097,
30934,
9,
198,
9,
5,
198,
9,
5,
10097,
30934,
9,
198,
31631,
300,
565,
62,
6404,
291,
5550,
20032,
17941,
25261,
13,
198,
220,
44731,
44513,
13,
198,
220,
220,
220,
42865,
25,
285,
81,
62,
535,
62,
15414,
220,
220,
41876,
4526,
37,
5390,
537,
62,
48317,
62,
23144,
62,
34924,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
285,
81,
62,
5239,
62,
15414,
41876,
4526,
37,
5390,
537,
62,
48317,
62,
5239,
19312,
13,
198,
220,
220,
220,
42865,
25,
285,
81,
62,
535,
62,
22915,
220,
220,
41876,
4526,
37,
5390,
537,
62,
48317,
62,
23144,
62,
34924,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
285,
81,
62,
5239,
62,
22915,
41876,
4526,
37,
5390,
537,
62,
48317,
62,
5239,
19312,
13,
198,
220,
220,
220,
42865,
25,
285,
81,
62,
535,
62,
15414,
62,
301,
76,
220,
220,
41876,
4526,
37,
5390,
537,
62,
48317,
62,
23144,
62,
34924,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
285,
81,
62,
5239,
62,
15414,
62,
301,
76,
41876,
4526,
37,
5390,
537,
62,
48317,
62,
5239,
19312,
13,
198,
220,
220,
220,
42865,
25,
285,
81,
62,
535,
62,
22915,
62,
301,
76,
220,
220,
41876,
4526,
37,
5390,
537,
62,
48317,
62,
23144,
62,
34924,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
285,
81,
62,
5239,
62,
22915,
62,
301,
76,
41876,
4526,
37,
5390,
537,
62,
48317,
62,
5239,
19312,
13,
628,
220,
220,
220,
337,
36252,
50,
2251,
62,
13716,
82,
13,
198,
220,
220,
220,
337,
36252,
50,
2495,
62,
4798,
13,
198,
10619,
31631,
13,
198,
198,
31631,
300,
565,
62,
6404,
291,
30023,
2538,
10979,
6234,
13,
628,
220,
337,
36252,
2251,
62,
13716,
82,
13,
628,
220,
220,
220,
5870,
25171,
285,
81,
62,
535,
62,
15414,
3180,
3268,
2043,
12576,
13,
628,
220,
220,
220,
29244,
6158,
25334,
23680,
285,
81,
62,
535,
62,
15414,
198,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
9290,
62,
3672,
796,
705,
1268,
30076,
62,
32541,
4458,
628,
220,
220,
220,
29244,
6158,
25334,
23680,
285,
81,
62,
5239,
62,
15414,
198,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
2560,
796,
285,
81,
62,
535,
62,
15414,
13,
628,
220,
220,
220,
29244,
6158,
25334,
23680,
285,
81,
62,
535,
62,
22915,
198,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
9290,
62,
3672,
796,
705,
2606,
7250,
3843,
62,
32541,
4458,
628,
220,
220,
220,
29244,
6158,
25334,
23680,
285,
81,
62,
5239,
62,
22915,
198,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
2560,
796,
285,
81,
62,
535,
62,
22915,
13,
628,
220,
220,
220,
29244,
6158,
25334,
23680,
285,
81,
62,
535,
62,
15414,
62,
301,
76,
198,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
9290,
62,
3672,
796,
705,
1268,
30076,
62,
32541,
62,
35744,
12529,
4458,
628,
220,
220,
220,
29244,
6158,
25334,
23680,
285,
81,
62,
5239,
62,
15414,
62,
301,
76,
198,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
2560,
796,
285,
81,
62,
535,
62,
15414,
62,
301,
76,
13,
628,
220,
220,
220,
29244,
6158,
25334,
23680,
285,
81,
62,
535,
62,
22915,
62,
301,
76,
198,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
9290,
62,
3672,
796,
705,
2606,
7250,
3843,
62,
32541,
62,
35744,
12529,
4458,
628,
220,
220,
220,
29244,
6158,
25334,
23680,
285,
81,
62,
5239,
62,
22915,
62,
301,
76,
198,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
2560,
796,
285,
81,
62,
535,
62,
22915,
62,
301,
76,
13,
628,
220,
220,
220,
285,
81,
62,
5239,
62,
22915,
3784,
2617,
62,
961,
8807,
62,
14171,
7,
198,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1100,
8807,
62,
14171,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
537,
62,
48317,
62,
5239,
19312,
14804,
7942,
198,
220,
220,
220,
220,
220,
7788,
42006,
11053,
198,
220,
220,
220,
220,
220,
220,
220,
4049,
62,
66,
429,
75,
62,
13345,
62,
24396,
796,
352,
198,
220,
220,
220,
220,
220,
220,
220,
12515,
62,
17143,
2357,
220,
220,
220,
220,
220,
796,
362,
198,
220,
220,
220,
220,
220,
220,
220,
440,
4221,
4877,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
513,
198,
220,
220,
220,
6739,
198,
220,
220,
220,
16876,
827,
12,
7266,
6015,
1279,
29,
657,
13,
198,
220,
220,
220,
220,
220,
337,
1546,
4090,
8264,
4522,
827,
12,
19662,
312,
41876,
827,
12,
19662,
774,
36871,
13246,
827,
12,
19662,
3919,
198,
220,
220,
220,
220,
220,
220,
220,
13315,
827,
12,
19662,
85,
16,
827,
12,
19662,
85,
17,
827,
12,
19662,
85,
18,
827,
12,
19662,
85,
19,
13,
198,
220,
220,
220,
23578,
5064,
13,
628,
220,
220,
220,
285,
81,
62,
5239,
62,
15414,
62,
301,
76,
3784,
2617,
62,
961,
8807,
62,
14171,
7,
198,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1100,
8807,
62,
14171,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
537,
62,
48317,
62,
5239,
19312,
14804,
7942,
198,
220,
220,
220,
220,
220,
7788,
42006,
11053,
198,
220,
220,
220
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
*----------------------------------------------------------------------*
* CLASS abap_Unit_Testclass DEFINITION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS abap_unit_testclass DEFINITION FOR TESTING FINAL "#AU Duration Short
"#AU Risk_Level Harmless
.
*?<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
*?<asx:values>
*?<TESTCLASS_OPTIONS>
*?<TEST_CLASS>abap_Unit_Testclass
*?</TEST_CLASS>
*?<TEST_MEMBER>f_Cut
*?</TEST_MEMBER>
*?<OBJECT_UNDER_TEST>/GAL/STRING
*?</OBJECT_UNDER_TEST>
*?<OBJECT_IS_LOCAL/>
*?<GENERATE_FIXTURE/>
*?<GENERATE_CLASS_FIXTURE/>
*?<GENERATE_INVOCATION/>
*?<GENERATE_ASSERT_EQUAL/>
*?</TESTCLASS_OPTIONS>
*?</asx:values>
*?</asx:abap>
PRIVATE SECTION.
* ================
DATA:
f_cut TYPE REF TO /gal/string. "#EC NEEDED
METHODS: date_to_string FOR TESTING.
METHODS: limit_length FOR TESTING.
METHODS: replace_variables FOR TESTING.
METHODS: stringtable_to_texttable FOR TESTING.
METHODS: texttable_to_stringtable FOR TESTING.
METHODS: timestamp_to_string FOR TESTING.
METHODS: time_to_string FOR TESTING.
ENDCLASS. "abap_Unit_Testclass
*----------------------------------------------------------------------*
* CLASS abap_Unit_Testclass IMPLEMENTATION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS abap_unit_testclass IMPLEMENTATION.
* =========================================
METHOD date_to_string.
* ======================
DATA l_output TYPE string.
l_output = /gal/string=>date_to_string(
input = '00000000'
language = 'D'
).
cl_aunit_assert=>assert_equals(
act = l_output
exp = ``
msg = `Date conversion failed: DATE=Initial, LANGUAGE=D`
).
l_output = /gal/string=>date_to_string(
input = '19000101'
language = 'D'
).
cl_aunit_assert=>assert_equals(
act = l_output
exp = `Montag, 1. Januar 1900`
msg = `Date conversion failed: DATE=1900/01/01, LANGUAGE=D`
).
l_output = /gal/string=>date_to_string(
input = '19000101'
language = 'E'
).
cl_aunit_assert=>assert_equals(
act = l_output
exp = `Monday, January 1, 1900`
msg = `Date conversion failed: DATE=1900/01/01, LANGUAGE=E`
).
l_output = /gal/string=>date_to_string(
input = sy-datum
format = `[PREFIX]`
language = 'D'
).
cl_aunit_assert=>assert_equals(
act = l_output
exp = `Heute, `
msg = `Date conversion failed: DATE=SY-DATUM, FORMAT=[PREFIX], LANGUAGE=D`
).
l_output = /gal/string=>date_to_string(
input = sy-datum
format = `[PREFIX]`
language = 'E'
).
cl_aunit_assert=>assert_equals(
act = l_output
exp = `Today, `
msg = `Date conversion failed: DATE=SY-DATUM, FORMAT=[PREFIX], LANGUAGE=E`
).
ENDMETHOD. "date_To_String
METHOD limit_length.
* ====================
DATA l_output TYPE string.
l_output = /gal/string=>limit_length(
input = `This is a test case.`
length = 10
).
cl_aunit_assert=>assert_equals(
act = l_output
exp = `This is...`
msg = `String length limitation failed (Test case 1).`
).
l_output = /gal/string=>limit_length(
input = `This is a test case.`
length = 11
).
cl_aunit_assert=>assert_equals(
act = l_output
exp = `This is...`
msg = `String length limitation failed (Test case 2).`
).
l_output = /gal/string=>limit_length(
input = `This is a test case.`
suffix = `... `
length = 12
).
cl_aunit_assert=>assert_equals(
act = l_output
exp = `This is a...`
msg = `String length limitation failed (Test case 3).`
).
l_output = /gal/string=>limit_length(
input = `This is a test case.`
suffix = `...very very long suffix...`
length = 19
).
cl_aunit_assert=>assert_equals(
act = l_output
exp = `This is a test case`
msg = `String length limitation failed (Test case 4).`
).
ENDMETHOD. "limit_Length
METHOD replace_variables.
* =========================
DATA: l_output TYPE string,
l_date TYPE d VALUE '20000101',
l_time TYPE t VALUE '135959',
l_numc(10) TYPE n VALUE '0000000123'.
l_output = /gal/string=>replace_variables(
input = `Date: {1} / Time: {2} / Year: {1:[YYYY]} / Hour: {2:[hh24]}`
var01 = l_date
var02 = l_time
language = 'E'
).
cl_aunit_assert=>assert_equals(
act = l_output
exp = `Date: 2000/01/01 / Time: 1:59:59 PM / Year: 2000 / Hour: 13`
msg = `Variable replacement failed (Test case: Date/time formatting - English).`
).
l_output = /gal/string=>replace_variables(
input = `Date: {1} / Time: {2} / Year: {1:[YYYY]} / Hour: {2:[hh24]}`
var01 = l_date
var02 = l_time
language = 'D'
).
cl_aunit_assert=>assert_equals(
act = l_output
exp = `Date: 01.01.2000 / Time: 13:59:59 / Year: 2000 / Hour: 13`
msg = `Variable replacement failed (Test case: Date/time formatting - German).`
).
l_output = /gal/string=>replace_variables(
input = `}}{{0}{\\}{1}{\\}{\1}}{{99}{123}}{ABC}{XYZ}{{`
var01 = l_numc
language = 'D'
).
cl_aunit_assert=>assert_equals(
act = l_output
exp = `}}{{0}{\}0000000123{\}{1}}{{99}{123}}{ABC}{XYZ}{{`
msg = `Variable replacement failed (Test case: Invalid variables, escaping and nesting).`
).
l_output = /gal/string=>replace_variables(
input = `{1}/{1:ConvExit=ALPHA}/{1:NoConvExit}/{2}/{2:EditMask=__-__-__}/{2:NoConvExit}`
var01 = l_numc
var02 = l_time
language = 'E'
).
cl_aunit_assert=>assert_equals(
act = l_output
exp = `0000000123/123/0000000123/1:59:59 PM/13-59-59/135959`
msg = `Variable replacement failed (Test case: Conversion exits and edit masks).`
).
l_output = /gal/string=>replace_variables(
input = 'Locking job {1}'
var01 = '00155D0122031ED3AFDEF4542D595EC6'
language = 'D'
).
cl_aunit_assert=>assert_equals(
act = l_output
exp = `Locking job 00155D0122031ED3AFDEF4542D595EC6`
msg = `Variable replacement failed (Test case: Simple Job ID).`
).
l_output = /gal/string=>replace_variables(
input = 'Text without any variables'
var01 = 'myvar'
language = 'D'
).
cl_aunit_assert=>assert_equals(
act = l_output
exp = `Text without any variables`
msg = `Text case without any variables failed.`
).
ENDMETHOD. "replace_Variables
METHOD stringtable_to_texttable.
* ===========================
DATA: l_input TYPE /gal/stringtable,
l_output TYPE STANDARD TABLE OF text10,
l_expected TYPE STANDARD TABLE OF text10.
INSERT `Line 1` INTO TABLE l_input.
INSERT `Line 2 ` INTO TABLE l_input.
INSERT `Line 3 ` INTO TABLE l_input.
INSERT 'Line 1 ' INTO TABLE l_expected.
INSERT 'Line 2 ' INTO TABLE l_expected.
INSERT 'Line 3 ' INTO TABLE l_expected.
/gal/string=>stringtable_to_texttable( EXPORTING input = l_input
IMPORTING output = l_output ).
cl_aunit_assert=>assert_equals(
act = l_output
exp = l_expected
msg = `Conversion of Stringtable to Test table failed.`
).
ENDMETHOD.
METHOD texttable_to_stringtable.
* ===========================
DATA: l_input TYPE STANDARD TABLE OF text10,
l_output TYPE /gal/stringtable,
l_expected TYPE /gal/stringtable.
INSERT 'Line 1 ' INTO TABLE l_input.
INSERT 'Line 2 ' INTO TABLE l_input.
INSERT 'Line 3 ' INTO TABLE l_input.
INSERT `Line 1` INTO TABLE l_expected.
INSERT `Line 2` INTO TABLE l_expected.
INSERT `Line 3` INTO TABLE l_expected.
l_output = /gal/string=>texttable_to_stringtable( l_input ).
cl_aunit_assert=>assert_equals(
act = l_output
exp = l_expected
msg = `Conversion of Text table to Stringtable failed.`
).
ENDMETHOD.
METHOD timestamp_to_string.
* ===========================
DATA: l_output TYPE string,
l_expected TYPE string.
l_output = /gal/string=>timestamp_to_string(
timestamp = 20001231000000
timezone = 'UTC'
language = 'D'
).
l_expected = `Sonntag, 31. Dezember 2000 - 00:00:00`.
IF sy-zonlo <> 'UTC'.
CONCATENATE l_expected 'UTC' INTO l_expected SEPARATED BY space.
ENDIF.
cl_aunit_assert=>assert_equals(
act = l_output
exp = l_expected
msg = `Timestamp conversion failed: TIMESTAMP=20001231000000, LANGUAGE=D`
).
l_output = /gal/string=>timestamp_to_string(
timestamp = 20001231000000
timezone = 'UTC'
language = 'E'
).
l_expected = `Sunday, December 31, 2000 - 12:00:00 AM`.
IF sy-zonlo <> 'UTC'.
CONCATENATE l_expected 'UTC' INTO l_expected SEPARATED BY space.
ENDIF.
cl_aunit_assert=>assert_equals(
act = l_output
exp = l_expected
msg = `Timestamp conversion failed: TIMESTAMP=20001231000000, LANGUAGE=E`
).
ENDMETHOD. "timestamp_To_String
METHOD time_to_string.
* ======================
DATA l_output TYPE string.
l_output = /gal/string=>time_to_string(
input = '130000'
language = 'D'
).
cl_aunit_assert=>assert_equals(
act = l_output
exp = `13:00:00`
msg = `Time conversion failed: TIME=130000, LANGUAGE=D`
).
l_output = /gal/string=>time_to_string(
input = '130000'
language = 'E'
).
cl_aunit_assert=>assert_equals(
act = l_output
exp = `1:00:00 PM`
msg = `Time conversion failed: TIME=130000, LANGUAGE=E`
).
ENDMETHOD. "time_To_String
ENDCLASS. "abap_Unit_Testclass
| [
198,
9,
10097,
23031,
9,
198,
9,
220,
220,
220,
220,
220,
220,
42715,
450,
499,
62,
26453,
62,
14402,
4871,
5550,
20032,
17941,
198,
9,
10097,
23031,
9,
198,
9,
198,
9,
10097,
23031,
9,
198,
31631,
450,
499,
62,
20850,
62,
9288,
4871,
5550,
20032,
17941,
7473,
43001,
2751,
25261,
25113,
26830,
22920,
10073,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
25113,
26830,
19602,
62,
4971,
17925,
1203,
198,
13,
198,
9,
30,
171,
119,
123,
27,
292,
87,
25,
397,
499,
35555,
5907,
25,
292,
87,
2625,
4023,
1378,
2503,
13,
82,
499,
13,
785,
14,
397,
499,
19875,
1,
2196,
2625,
16,
13,
15,
5320,
198,
9,
30,
27,
292,
87,
25,
27160,
29,
198,
9,
30,
27,
51,
1546,
4825,
43,
10705,
62,
3185,
51,
11053,
29,
198,
9,
30,
27,
51,
6465,
62,
31631,
29,
397,
499,
62,
26453,
62,
14402,
4871,
198,
9,
30,
3556,
51,
6465,
62,
31631,
29,
198,
9,
30,
27,
51,
6465,
62,
44,
28952,
29,
69,
62,
26254,
198,
9,
30,
3556,
51,
6465,
62,
44,
28952,
29,
198,
9,
30,
27,
9864,
23680,
62,
4944,
14418,
62,
51,
6465,
29,
14,
38,
1847,
14,
18601,
2751,
198,
9,
30,
3556,
9864,
23680,
62,
4944,
14418,
62,
51,
6465,
29,
198,
9,
30,
27,
9864,
23680,
62,
1797,
62,
29701,
1847,
15913,
198,
9,
30,
27,
35353,
1137,
6158,
62,
47084,
51,
11335,
15913,
198,
9,
30,
27,
35353,
1137,
6158,
62,
31631,
62,
47084,
51,
11335,
15913,
198,
9,
30,
27,
35353,
1137,
6158,
62,
1268,
53,
4503,
6234,
15913,
198,
9,
30,
27,
35353,
1137,
6158,
62,
10705,
17395,
62,
36,
10917,
1847,
15913,
198,
9,
30,
3556,
51,
1546,
4825,
43,
10705,
62,
3185,
51,
11053,
29,
198,
9,
30,
3556,
292,
87,
25,
27160,
29,
198,
9,
30,
3556,
292,
87,
25,
397,
499,
29,
198,
220,
4810,
3824,
6158,
44513,
13,
198,
9,
796,
25609,
18604,
198,
220,
220,
220,
42865,
25,
198,
220,
220,
220,
220,
220,
277,
62,
8968,
41876,
4526,
37,
5390,
1220,
13528,
14,
8841,
13,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
25113,
2943,
36465,
1961,
628,
220,
220,
220,
337,
36252,
50,
25,
3128,
62,
1462,
62,
8841,
7473,
43001,
2751,
13,
198,
220,
220,
220,
337,
36252,
50,
25,
4179,
62,
13664,
7473,
43001,
2751,
13,
198,
220,
220,
220,
337,
36252,
50,
25,
6330,
62,
25641,
2977,
7473,
43001,
2751,
13,
198,
220,
220,
220,
337,
36252,
50,
25,
4731,
11487,
62,
1462,
62,
5239,
11487,
7473,
43001,
2751,
13,
198,
220,
220,
220,
337,
36252,
50,
25,
2420,
11487,
62,
1462,
62,
8841,
11487,
7473,
43001,
2751,
13,
198,
220,
220,
220,
337,
36252,
50,
25,
41033,
62,
1462,
62,
8841,
7473,
43001,
2751,
13,
198,
220,
220,
220,
337,
36252,
50,
25,
640,
62,
1462,
62,
8841,
7473,
43001,
2751,
13,
198,
10619,
31631,
13,
220,
220,
220,
220,
220,
220,
366,
397,
499,
62,
26453,
62,
14402,
4871,
628,
198,
9,
10097,
23031,
9,
198,
9,
220,
220,
220,
220,
220,
220,
42715,
450,
499,
62,
26453,
62,
14402,
4871,
30023,
2538,
10979,
6234,
198,
9,
10097,
23031,
9,
198,
9,
198,
9,
10097,
23031,
9,
198,
31631,
450,
499,
62,
20850,
62,
9288,
4871,
30023,
2538,
10979,
6234,
13,
198,
9,
46111,
2559,
628,
220,
337,
36252,
3128,
62,
1462,
62,
8841,
13,
198,
9,
36658,
1421,
28,
198,
220,
220,
220,
42865,
300,
62,
22915,
41876,
4731,
13,
628,
220,
220,
220,
300,
62,
22915,
796,
1220,
13528,
14,
8841,
14804,
4475,
62,
1462,
62,
8841,
7,
198,
220,
220,
220,
220,
220,
220,
5128,
220,
220,
220,
796,
705,
8269,
6,
198,
220,
220,
220,
220,
220,
220,
3303,
796,
705,
35,
6,
198,
220,
220,
220,
6739,
628,
220,
220,
220,
537,
62,
1942,
270,
62,
30493,
14804,
30493,
62,
4853,
874,
7,
198,
220,
220,
220,
220,
220,
719,
220,
220,
796,
300,
62,
22915,
198,
220,
220,
220,
220,
220,
1033,
220,
220,
796,
7559,
198,
220,
220,
220,
220,
220,
31456,
220,
220,
796,
4600,
10430,
11315,
4054,
25,
360,
6158,
28,
24243,
11,
406,
15567,
52,
11879,
28,
35,
63,
198,
220,
220,
220,
6739,
628,
220,
220,
220,
300,
62,
22915,
796,
1220,
13528,
14,
8841,
14804,
4475,
62,
1462,
62,
8841,
7,
198,
220,
220,
220,
220,
220,
220,
5128,
220,
220,
220,
796,
705,
1129,
18005,
486,
6,
198,
220,
220,
220,
220,
220,
220,
3303,
796,
705,
35,
6,
198,
220,
220,
220,
6739,
628,
220,
220,
220,
537,
62,
1942,
270,
62,
30493,
14804,
30493,
62,
4853,
874,
7,
198,
220,
220,
220,
220,
220,
719,
220,
220,
796,
300,
62,
22915,
198,
220,
220,
220,
220,
220,
1033,
220,
220,
796,
4600,
26031,
363,
11,
352,
13,
2365,
84,
283,
21489,
63,
198,
220,
220,
220,
220,
220,
31456,
220,
220,
796,
4600,
10430,
11315,
4054,
25,
360,
6158,
28,
48104,
14,
486,
14,
486,
11,
406,
15567,
52,
11879,
28,
35,
63,
198,
220,
220,
220,
6739,
628,
220,
220,
220,
300,
62,
22915,
796,
1220,
13528,
14,
8841,
14804,
4475,
62,
1462,
62,
8841,
7,
198,
220,
220,
220,
220,
220,
220,
5128,
220,
220,
220,
796,
705,
1129,
18005,
486,
6,
198,
220,
220,
220,
220,
220,
220,
3303,
796,
705,
36,
6,
198,
220,
220,
220,
6739,
628,
220,
220,
220,
537,
62,
1942,
270,
62,
30493,
14804,
30493,
62,
4853,
874,
7,
198,
220,
220,
220,
220,
220,
719,
220,
220,
796,
300,
62,
22915,
198,
220,
220,
220,
220,
220,
1033,
220,
220,
796,
4600,
23810,
11,
3269,
352,
11,
21489,
63,
198,
220,
220,
220,
220,
220,
31456,
220,
220,
796,
4600,
10430,
11315,
4054,
25,
360,
6158,
28,
48104,
14,
486,
14,
486,
11,
406,
15567
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS zcl_abapgit_gui_chunk_lib DEFINITION
PUBLIC
FINAL
CREATE PUBLIC .
PUBLIC SECTION.
TYPES:
BEGIN OF ty_event_signature,
method TYPE string,
name TYPE string,
END OF ty_event_signature .
CLASS-METHODS class_constructor .
CLASS-METHODS render_error
IMPORTING
!ix_error TYPE REF TO zcx_abapgit_exception OPTIONAL
!iv_error TYPE string OPTIONAL
!iv_extra_style TYPE string OPTIONAL
RETURNING
VALUE(ri_html) TYPE REF TO zif_abapgit_html .
CLASS-METHODS render_repo_top
IMPORTING
!io_repo TYPE REF TO zcl_abapgit_repo
!iv_show_package TYPE abap_bool DEFAULT abap_true
!iv_show_branch TYPE abap_bool DEFAULT abap_true
!iv_show_commit TYPE abap_bool DEFAULT abap_true
!iv_show_edit TYPE abap_bool DEFAULT abap_false
!iv_interactive_branch TYPE abap_bool DEFAULT abap_false
!io_news TYPE REF TO zcl_abapgit_news OPTIONAL
RETURNING
VALUE(ri_html) TYPE REF TO zif_abapgit_html
RAISING
zcx_abapgit_exception .
CLASS-METHODS render_item_state
IMPORTING
!iv_lstate TYPE char1
!iv_rstate TYPE char1
RETURNING
VALUE(rv_html) TYPE string .
CLASS-METHODS render_js_error_banner
RETURNING
VALUE(ri_html) TYPE REF TO zif_abapgit_html
RAISING
zcx_abapgit_exception .
CLASS-METHODS render_news
IMPORTING
!io_news TYPE REF TO zcl_abapgit_news
RETURNING
VALUE(ri_html) TYPE REF TO zif_abapgit_html
RAISING
zcx_abapgit_exception .
CLASS-METHODS render_commit_popup
IMPORTING
!iv_content TYPE csequence
!iv_id TYPE csequence
RETURNING
VALUE(ri_html) TYPE REF TO zif_abapgit_html
RAISING
zcx_abapgit_exception .
CLASS-METHODS render_error_message_box
IMPORTING
!ix_error TYPE REF TO zcx_abapgit_exception
RETURNING
VALUE(ri_html) TYPE REF TO zif_abapgit_html .
CLASS-METHODS render_order_by_header_cells
IMPORTING
!it_col_spec TYPE zif_abapgit_definitions=>ty_col_spec_tt
!iv_order_by TYPE string
!iv_order_descending TYPE abap_bool
RETURNING
VALUE(ri_html) TYPE REF TO zif_abapgit_html .
CLASS-METHODS render_warning_banner
IMPORTING
!iv_text TYPE string
RETURNING
VALUE(ri_html) TYPE REF TO zif_abapgit_html .
CLASS-METHODS render_infopanel
IMPORTING
!iv_div_id TYPE string
!iv_title TYPE string
!iv_hide TYPE abap_bool DEFAULT abap_true
!iv_hint TYPE string OPTIONAL
!iv_scrollable TYPE abap_bool DEFAULT abap_true
!io_content TYPE REF TO zif_abapgit_html
RETURNING
VALUE(ri_html) TYPE REF TO zif_abapgit_html
RAISING
zcx_abapgit_exception .
CLASS-METHODS render_event_as_form
IMPORTING
!is_event TYPE ty_event_signature
RETURNING
VALUE(ri_html) TYPE REF TO zif_abapgit_html .
CLASS-METHODS render_repo_palette
IMPORTING
iv_action TYPE string
iv_only_favorites TYPE abap_bool
RETURNING
VALUE(ri_html) TYPE REF TO zif_abapgit_html
RAISING
zcx_abapgit_exception .
CLASS-METHODS advanced_submenu
RETURNING
VALUE(ro_menu) TYPE REF TO zcl_abapgit_html_toolbar .
CLASS-METHODS help_submenu
RETURNING
VALUE(ro_menu) TYPE REF TO zcl_abapgit_html_toolbar .
CLASS-METHODS back_toolbar
RETURNING
VALUE(ro_menu) TYPE REF TO zcl_abapgit_html_toolbar .
CLASS-METHODS settings_toolbar
IMPORTING
!iv_act TYPE string
RETURNING
VALUE(ro_menu) TYPE REF TO zcl_abapgit_html_toolbar .
CLASS-METHODS settings_repo_toolbar
IMPORTING
!iv_key TYPE zif_abapgit_persistence=>ty_repo-key
!iv_act TYPE string
RETURNING
VALUE(ro_menu) TYPE REF TO zcl_abapgit_html_toolbar .
CLASS-METHODS render_branch_name
IMPORTING
!iv_branch TYPE string OPTIONAL
!iv_repo_key TYPE zif_abapgit_persistence=>ty_value OPTIONAL
!io_repo TYPE REF TO zcl_abapgit_repo_online OPTIONAL
!iv_interactive TYPE abap_bool DEFAULT abap_true
RETURNING
VALUE(ri_html) TYPE REF TO zif_abapgit_html
RAISING
zcx_abapgit_exception .
CLASS-METHODS render_package_name
IMPORTING
!iv_package TYPE devclass
!iv_interactive TYPE abap_bool DEFAULT abap_true
!iv_suppress_title TYPE abap_bool DEFAULT abap_false
RETURNING
VALUE(ri_html) TYPE REF TO zif_abapgit_html
RAISING
zcx_abapgit_exception .
CLASS-METHODS render_user_name
IMPORTING
!iv_username TYPE syuname
!iv_interactive TYPE abap_bool DEFAULT abap_true
!iv_icon_only TYPE abap_bool DEFAULT abap_false
!iv_suppress_title TYPE abap_bool DEFAULT abap_false
RETURNING
VALUE(ri_html) TYPE REF TO zif_abapgit_html
RAISING
zcx_abapgit_exception .
CLASS-METHODS render_transport
IMPORTING
!iv_transport TYPE trkorr
!iv_interactive TYPE abap_bool DEFAULT abap_true
!iv_icon_only TYPE abap_bool DEFAULT abap_false
RETURNING
VALUE(ri_html) TYPE REF TO zif_abapgit_html
RAISING
zcx_abapgit_exception .
CLASS-METHODS render_sci_result
IMPORTING
ii_html TYPE REF TO zif_abapgit_html
iv_sci_result TYPE zif_abapgit_definitions=>ty_sci_result.
CLASS-METHODS render_path
IMPORTING
!iv_path TYPE string
!iv_interactive TYPE abap_bool DEFAULT abap_true
RETURNING
VALUE(ri_html) TYPE REF TO zif_abapgit_html
RAISING
zcx_abapgit_exception .
PROTECTED SECTION.
CLASS-METHODS render_repo_top_commit_hash
IMPORTING
!ii_html TYPE REF TO zif_abapgit_html
!io_repo_online TYPE REF TO zcl_abapgit_repo_online
RAISING
zcx_abapgit_exception .
PRIVATE SECTION.
CLASS-DATA gv_time_zone TYPE timezone .
CLASS-METHODS get_t100_text
IMPORTING
!iv_msgid TYPE scx_t100key-msgid
!iv_msgno TYPE scx_t100key-msgno
RETURNING
VALUE(rv_text) TYPE string .
CLASS-METHODS normalize_program_name
IMPORTING
!iv_program_name TYPE sy-repid
RETURNING
VALUE(rv_normalized_program_name) TYPE string .
ENDCLASS.
CLASS zcl_abapgit_gui_chunk_lib IMPLEMENTATION.
METHOD advanced_submenu.
DATA lv_supports_ie_devtools TYPE abap_bool.
lv_supports_ie_devtools = zcl_abapgit_ui_factory=>get_frontend_services( )->is_sapgui_for_windows( ).
CREATE OBJECT ro_menu.
ro_menu->add(
iv_txt = 'Database Utility'
iv_act = zif_abapgit_definitions=>c_action-go_db
)->add(
iv_txt = 'Package to ZIP'
iv_act = zif_abapgit_definitions=>c_action-zip_package
)->add(
iv_txt = 'Transport to ZIP'
iv_act = zif_abapgit_definitions=>c_action-zip_transport
)->add(
iv_txt = 'Object to Files'
iv_act = zif_abapgit_definitions=>c_action-zip_object
)->add(
iv_txt = 'Debug Info'
iv_act = zif_abapgit_definitions=>c_action-go_debuginfo ).
IF lv_supports_ie_devtools = abap_true.
ro_menu->add(
iv_txt = 'Open IE DevTools'
iv_act = zif_abapgit_definitions=>c_action-ie_devtools ).
ENDIF.
ENDMETHOD.
METHOD back_toolbar.
CREATE OBJECT ro_menu EXPORTING iv_id = 'toolbar-back'.
ro_menu->add(
iv_txt = 'Back'
iv_act = zif_abapgit_definitions=>c_action-go_back ).
ENDMETHOD.
METHOD class_constructor.
CALL FUNCTION 'GET_SYSTEM_TIMEZONE'
IMPORTING
timezone = gv_time_zone
EXCEPTIONS
customizing_missing = 1
OTHERS = 2.
ASSERT sy-subrc = 0.
ENDMETHOD.
METHOD get_t100_text.
SELECT SINGLE text
FROM t100
INTO rv_text
WHERE arbgb = iv_msgid
AND msgnr = iv_msgno
AND sprsl = sy-langu.
ENDMETHOD.
METHOD help_submenu.
CREATE OBJECT ro_menu.
ro_menu->add(
iv_txt = 'Tutorial'
iv_act = zif_abapgit_definitions=>c_action-go_tutorial
)->add(
iv_txt = 'Documentation'
iv_act = zif_abapgit_definitions=>c_action-documentation
)->add(
iv_txt = 'Explore'
iv_act = zif_abapgit_definitions=>c_action-go_explore
)->add(
iv_txt = 'Changelog'
iv_act = zif_abapgit_definitions=>c_action-changelog ).
ENDMETHOD.
METHOD normalize_program_name.
rv_normalized_program_name = substring_before(
val = iv_program_name
regex = `(=+CP)?$` ).
ENDMETHOD.
METHOD render_branch_name.
DATA:
lv_key TYPE string,
lv_branch TYPE string,
lv_selected_commit TYPE string,
lv_commit_short_sha TYPE string,
lv_text TYPE string,
lv_class TYPE string.
IF iv_repo_key IS NOT INITIAL.
lv_key = iv_repo_key.
ELSEIF io_repo IS BOUND.
lv_key = io_repo->get_key( ).
ELSE.
zcx_abapgit_exception=>raise( 'Either iv_repo_key or io_repo must be supplied' ).
ENDIF.
IF iv_branch IS NOT INITIAL.
lv_branch = iv_branch.
lv_text = zcl_abapgit_git_branch_list=>get_display_name( lv_branch ).
ELSEIF io_repo IS BOUND.
lv_selected_commit = io_repo->get_selected_commit( ).
IF lv_selected_commit IS NOT INITIAL.
"Convert to short commit. Example: (ae623b9...)
lv_commit_short_sha = lv_selected_commit+0(7).
lv_text = |({ lv_commit_short_sha }...)|.
ELSE.
lv_branch = io_repo->get_selected_branch( ).
lv_text = zcl_abapgit_git_branch_list=>get_display_name( lv_branch ).
ENDIF.
ELSE.
zcx_abapgit_exception=>raise( 'Either iv_branch or io_repo must be supplied' ).
ENDIF.
IF zcl_abapgit_git_branch_list=>get_type( lv_branch ) = zif_abapgit_definitions=>c_git_branch_type-branch.
lv_class = 'branch branch_branch'.
ELSE.
lv_class = 'branch'.
ENDIF.
CREATE OBJECT ri_html TYPE zcl_abapgit_html.
ri_html->add( |<span class="{ lv_class }">| ).
ri_html->add_icon( iv_name = 'code-branch/grey70'
iv_hint = 'Current branch' ).
IF iv_interactive = abap_true.
ri_html->add_a( iv_act = |{ zif_abapgit_definitions=>c_action-git_branch_switch }?key={ lv_key }|
iv_txt = lv_text ).
ELSE.
ri_html->add( lv_text ).
ENDIF.
ri_html->add( '</span>' ).
ENDMETHOD.
METHOD render_commit_popup.
CREATE OBJECT ri_html TYPE zcl_abapgit_html.
ri_html->add( '<ul class="hotkeys">' ).
ri_html->add( |<li>| && |<span>{ iv_content }</span>| && |</li>| ).
ri_html->add( '</ul>' ).
ri_html = render_infopanel(
iv_div_id = |{ iv_id }|
iv_title = 'Commit details'
iv_hide = abap_true
iv_scrollable = abap_false
io_content = ri_html ).
ENDMETHOD.
METHOD render_error.
DATA lv_error TYPE string.
DATA lv_class TYPE string VALUE 'panel error center'.
IF iv_extra_style IS NOT INITIAL.
lv_class = lv_class && ` ` && iv_extra_style.
ENDIF.
CREATE OBJECT ri_html TYPE zcl_abapgit_html.
IF ix_error IS BOUND.
lv_error = ix_error->get_text( ).
ELSE.
lv_error = iv_error.
ENDIF.
ri_html->add( |<div class="{ lv_class }">| ).
ri_html->add( |{ ri_html->icon( 'exclamation-circle/red' ) } { lv_error }| ).
ri_html->add( '</div>' ).
ENDMETHOD.
METHOD render_error_message_box.
DATA:
lv_error_text TYPE string,
lv_longtext TYPE string,
lv_program_name TYPE sy-repid,
lv_title TYPE string,
lv_text TYPE string.
CREATE OBJECT ri_html TYPE zcl_abapgit_html.
lv_error_text = ix_error->get_text( ).
lv_longtext = ix_error->if_message~get_longtext( abap_true ).
REPLACE FIRST OCCURRENCE OF REGEX
|({ zcx_abapgit_exception=>c_section_text-cause }{ cl_abap_char_utilities=>newline })|
IN lv_longtext WITH |<h3>$1</h3>|.
REPLACE FIRST OCCURRENCE OF REGEX
|({ zcx_abapgit_exception=>c_section_text-system_response }{ cl_abap_char_utilities=>newline })|
IN lv_longtext WITH |<h3>$1</h3>|.
REPLACE FIRST OCCURRENCE OF REGEX
|({ zcx_abapgit_exception=>c_section_text-what_to_do }{ cl_abap_char_utilities=>newline })|
IN lv_longtext WITH |<h3>$1</h3>|.
REPLACE FIRST OCCURRENCE OF REGEX
|({ zcx_abapgit_exception=>c_section_text-sys_admin }{ cl_abap_char_utilities=>newline })|
IN lv_longtext WITH |<h3>$1</h3>|.
ri_html->add( |<div id="message" class="message-panel">| ).
ri_html->add( |{ ri_html->icon( 'exclamation-circle/red' ) } { lv_error_text }| ).
ri_html->add( |<div class="float-right">| ).
ri_html->add_a(
iv_txt = `❌`
iv_act = `toggleDisplay('message')`
iv_class = `close-btn`
iv_typ = zif_abapgit_html=>c_action_type-onclick ).
ri_html->add( |</div>| ).
ri_html->add( |<div class="float-right message-panel-commands">| ).
IF ix_error->if_t100_message~t100key-msgid IS NOT INITIAL.
lv_title = get_t100_text(
iv_msgid = ix_error->if_t100_message~t100key-msgid
iv_msgno = ix_error->if_t100_message~t100key-msgno ).
lv_text = |Message ({ ix_error->if_t100_message~t100key-msgid }/{ ix_error->if_t100_message~t100key-msgno })|.
ri_html->add_a(
iv_txt = lv_text
iv_typ = zif_abapgit_html=>c_action_type-sapevent
iv_act = zif_abapgit_definitions=>c_action-goto_message
iv_title = lv_title
iv_id = `a_goto_message` ).
ENDIF.
ix_error->get_source_position( IMPORTING program_name = lv_program_name ).
lv_title = normalize_program_name( lv_program_name ).
ri_html->add_a(
iv_txt = `Goto source`
iv_act = zif_abapgit_definitions=>c_action-goto_source
iv_typ = zif_abapgit_html=>c_action_type-sapevent
iv_title = lv_title
iv_id = `a_goto_source` ).
ri_html->add_a(
iv_txt = `Callstack`
iv_act = zif_abapgit_definitions=>c_action-show_callstack
iv_typ = zif_abapgit_html=>c_action_type-sapevent
iv_id = `a_callstack` ).
ri_html->add( |</div>| ).
ri_html->add( |<div class="message-panel-commands">| ).
ri_html->add( |{ lv_longtext }| ).
ri_html->add( |</div>| ).
ri_html->add( |</div>| ).
ENDMETHOD.
METHOD render_event_as_form.
CREATE OBJECT ri_html TYPE zcl_abapgit_html.
ri_html->add(
|<form id='form_{ is_event-name }' method={ is_event-method } action='sapevent:{ is_event-name }'></form>| ).
ENDMETHOD.
METHOD render_infopanel.
DATA lv_display TYPE string.
DATA lv_class TYPE string.
CREATE OBJECT ri_html TYPE zcl_abapgit_html.
IF iv_hide = abap_true. " Initially hide
lv_display = 'display:none'.
ENDIF.
lv_class = 'info-panel'.
IF iv_scrollable = abap_false. " Initially hide
lv_class = lv_class && ' info-panel-fixed'.
ENDIF.
ri_html->add( |<div id="{ iv_div_id }" class="{ lv_class }" style="{ lv_display }">| ).
ri_html->add( |<div class="info-title">{ iv_title }|
&& '<div class="float-right">'
&& ri_html->a(
iv_txt = '❌'
iv_typ = zif_abapgit_html=>c_action_type-onclick
iv_act = |toggleDisplay('{ iv_div_id }')|
iv_class = 'close-btn' )
&& '</div></div>' ).
IF iv_hint IS NOT INITIAL.
ri_html->add( '<div class="info-hint">'
&& ri_html->icon( iv_name = 'exclamation-triangle'
iv_class = 'pad-right' )
&& iv_hint
&& '</div>' ).
ENDIF.
ri_html->add( |<div class="info-list">| ).
ri_html->add( io_content ).
ri_html->add( '</div>' ).
ri_html->add( '</div>' ).
ENDMETHOD.
METHOD render_item_state.
DATA: lv_system TYPE string.
FIELD-SYMBOLS <lv_state> TYPE char1.
rv_html = '<span class="state-block">'.
DO 2 TIMES.
CASE sy-index.
WHEN 1.
ASSIGN iv_lstate TO <lv_state>.
lv_system = 'Local:'.
WHEN 2.
ASSIGN iv_rstate TO <lv_state>.
lv_system = 'Remote:'.
ENDCASE.
CASE <lv_state>.
WHEN zif_abapgit_definitions=>c_state-unchanged. "None or unchanged
IF iv_lstate = zif_abapgit_definitions=>c_state-added OR iv_rstate = zif_abapgit_definitions=>c_state-added.
rv_html = rv_html && |<span class="none" title="{ lv_system } Not exists">X</span>|.
ELSE.
rv_html = rv_html && |<span class="none" title="{ lv_system } No changes"> </span>|.
ENDIF.
WHEN zif_abapgit_definitions=>c_state-modified. "Changed
rv_html = rv_html && |<span class="changed" title="{ lv_system } Modified">M</span>|.
WHEN zif_abapgit_definitions=>c_state-added. "Added new
rv_html = rv_html && |<span class="added" title="{ lv_system } Added new">A</span>|.
WHEN zif_abapgit_definitions=>c_state-mixed. "Multiple changes (multifile)
rv_html = rv_html && |<span class="mixed" title="{ lv_system } Multiple changes">■</span>|.
WHEN zif_abapgit_definitions=>c_state-deleted. "Deleted
rv_html = rv_html && |<span class="deleted" title="{ lv_system } Deleted">D</span>|.
ENDCASE.
ENDDO.
rv_html = rv_html && '</span>'.
ENDMETHOD.
METHOD render_js_error_banner.
CREATE OBJECT ri_html TYPE zcl_abapgit_html.
ri_html->add( '<div id="js-error-banner" class="dummydiv error">' ).
ri_html->add( |{ ri_html->icon( 'exclamation-triangle/red' ) }| &&
' If this does not disappear soon,' &&
' then there is a JS init error, please log an issue' ).
ri_html->add( '</div>' ).
ENDMETHOD.
METHOD render_news.
DATA: lv_text TYPE string,
lv_hint TYPE string,
lv_ul TYPE abap_bool,
lt_log TYPE zcl_abapgit_news=>ty_logs.
FIELD-SYMBOLS: <ls_line> LIKE LINE OF lt_log.
CREATE OBJECT ri_html TYPE zcl_abapgit_html.
IF io_news IS NOT BOUND OR io_news->has_news( ) = abap_false.
RETURN.
ENDIF.
lt_log = io_news->get_log( ).
" Render news
LOOP AT lt_log ASSIGNING <ls_line>.
IF <ls_line>-is_header = abap_true.
IF <ls_line>-pos_to_cur > 0.
lv_text = <ls_line>-text && '<span class="version-marker update">update</span>'.
ELSEIF <ls_line>-pos_to_cur = 0.
lv_text = <ls_line>-text && '<span class="version-marker">current</span>'.
ELSE. " < 0
lv_text = <ls_line>-text.
ENDIF.
IF lv_ul = abap_true.
ri_html->add( |</ul>| ).
ENDIF.
ri_html->add( |<h1>{ lv_text }</h1>| ).
ri_html->add( |<ul>| ).
lv_ul = abap_true.
ELSE.
<ls_line>-text = escape( val = <ls_line>-text
format = cl_abap_format=>e_html_text ).
ri_html->add( |<li>{ <ls_line>-text }</li>| ).
ENDIF.
ENDLOOP.
IF lv_ul = abap_true.
ri_html->add( |</ul>| ).
ENDIF.
" Wrap
IF io_news->has_important( ) = abap_true.
lv_hint = 'Please note changes marked with "!"'.
ENDIF.
ri_html = render_infopanel(
iv_div_id = 'news'
iv_title = 'Announcement of the latest changes'
iv_hint = lv_hint
iv_hide = boolc( io_news->has_unseen( ) = abap_false )
io_content = ri_html ).
ENDMETHOD.
METHOD render_order_by_header_cells.
DATA:
lv_tmp TYPE string,
lv_disp_name TYPE string.
FIELD-SYMBOLS <ls_col> LIKE LINE OF it_col_spec.
CREATE OBJECT ri_html TYPE zcl_abapgit_html.
LOOP AT it_col_spec ASSIGNING <ls_col>.
" e.g. <th class="ro-detail">Created at [{ gv_time_zone }]</th>
lv_tmp = '<th'.
IF <ls_col>-css_class IS NOT INITIAL.
lv_tmp = lv_tmp && | class="{ <ls_col>-css_class }"|.
ENDIF.
lv_tmp = lv_tmp && '>'.
IF <ls_col>-display_name IS NOT INITIAL.
lv_disp_name = <ls_col>-display_name.
IF <ls_col>-add_tz = abap_true.
lv_disp_name = lv_disp_name && | [{ gv_time_zone }]|.
ENDIF.
IF <ls_col>-tech_name = iv_order_by.
IF iv_order_descending = abap_true.
lv_tmp = lv_tmp && ri_html->a(
iv_txt = lv_disp_name
iv_act = |{ zif_abapgit_definitions=>c_action-direction }?direction=ASCENDING|
iv_title = <ls_col>-title ).
ELSE.
lv_tmp = lv_tmp && ri_html->a(
iv_txt = lv_disp_name
iv_act = |{ zif_abapgit_definitions=>c_action-direction }?direction=DESCENDING|
iv_title = <ls_col>-title ).
ENDIF.
ELSEIF <ls_col>-allow_order_by = abap_true.
lv_tmp = lv_tmp && ri_html->a(
iv_txt = lv_disp_name
iv_act = |{ zif_abapgit_definitions=>c_action-change_order_by }?orderBy={ <ls_col>-tech_name }|
iv_title = <ls_col>-title ).
ELSE.
lv_tmp = lv_tmp && lv_disp_name.
ENDIF.
ENDIF.
IF <ls_col>-tech_name = iv_order_by
AND iv_order_by IS NOT INITIAL.
IF iv_order_descending = abap_true.
lv_tmp = lv_tmp && | ▾|. " arrow down
ELSE.
lv_tmp = lv_tmp && | ▴|. " arrow up
ENDIF.
ENDIF.
lv_tmp = lv_tmp && '</th>'.
ri_html->add( lv_tmp ).
ENDLOOP.
ENDMETHOD.
METHOD render_package_name.
DATA:
lv_obj_name TYPE tadir-obj_name,
lv_jump TYPE string,
lv_title TYPE string.
CREATE OBJECT ri_html TYPE zcl_abapgit_html.
IF iv_package IS INITIAL.
RETURN.
ENDIF.
IF iv_suppress_title = abap_false.
SELECT SINGLE ctext FROM tdevct INTO lv_title
WHERE devclass = iv_package AND spras = sy-langu ##SUBRC_OK.
ENDIF.
lv_obj_name = iv_package.
lv_jump = zcl_abapgit_html_action_utils=>jump_encode(
iv_obj_type = 'DEVC'
iv_obj_name = lv_obj_name ).
ri_html->add( |<span class="package-box">| ).
ri_html->add_icon( iv_name = 'box/grey70'
iv_hint = 'SAP package' ).
IF iv_interactive = abap_true.
ri_html->add_a( iv_act = |{ zif_abapgit_definitions=>c_action-jump }?{ lv_jump }|
iv_title = lv_title
iv_txt = |{ iv_package }| ).
ELSE.
ri_html->add( iv_package ).
ENDIF.
ri_html->add( '</span>' ).
ENDMETHOD.
METHOD render_path.
DATA:
lv_path TYPE string,
lv_jump TYPE string,
lv_folder TYPE string,
lt_folders TYPE STANDARD TABLE OF string WITH DEFAULT KEY.
CREATE OBJECT ri_html TYPE zcl_abapgit_html.
IF iv_path IS INITIAL.
RETURN.
ENDIF.
lv_jump = |{ zcl_abapgit_gui_page_repo_view=>c_actions-change_dir }?PATH=|.
ri_html->add( |<span class="path-box">| ).
IF iv_interactive = abap_true.
SPLIT iv_path AT '/' INTO TABLE lt_folders.
LOOP AT lt_folders INTO lv_folder.
IF lv_folder IS INITIAL.
" root
lv_path = '/'.
ELSEIF sy-tabix < lines( lt_folders ).
lv_path = lv_path && lv_folder && '/'.
ri_html->add_a( iv_act = lv_jump && lv_path
iv_txt = lv_folder ).
ELSE.
" no link for current folder
ri_html->add( | <strong>{ lv_folder }</strong> | ).
ENDIF.
ri_html->add( '/' ).
ENDLOOP.
ELSE.
ri_html->add( iv_path ).
ENDIF.
ri_html->add( '</span>' ).
ENDMETHOD.
METHOD render_repo_palette.
DATA lt_repo_obj_list TYPE zif_abapgit_repo_srv=>ty_repo_list.
DATA lt_repo_list TYPE zif_abapgit_persistence=>ty_repos.
DATA lv_repo_json TYPE string.
DATA lv_size TYPE i.
DATA ls_repo_data LIKE LINE OF lt_repo_list.
FIELD-SYMBOLS:
<ls_repo> LIKE LINE OF lt_repo_list,
<lr_repo_obj> LIKE LINE OF lt_repo_obj_list.
IF iv_only_favorites = abap_true.
lt_repo_obj_list = zcl_abapgit_repo_srv=>get_instance( )->list_favorites( ).
ELSE.
lt_repo_obj_list = zcl_abapgit_repo_srv=>get_instance( )->list( ).
ENDIF.
LOOP AT lt_repo_obj_list ASSIGNING <lr_repo_obj>.
ls_repo_data = <lr_repo_obj>->ms_data.
ls_repo_data-local_settings-display_name = <lr_repo_obj>->get_name( ).
APPEND ls_repo_data TO lt_repo_list.
ENDLOOP.
lv_size = lines( lt_repo_list ).
SORT lt_repo_list BY local_settings-display_name AS TEXT.
CREATE OBJECT ri_html TYPE zcl_abapgit_html.
ri_html->add( 'var repoCatalog = [' ). " Maybe separate this into another method if needed in more places
LOOP AT lt_repo_list ASSIGNING <ls_repo>.
lv_repo_json = |\{ key: "{ <ls_repo>-key
}", isOffline: "{ <ls_repo>-offline
}", displayName: "{ <ls_repo>-local_settings-display_name }" \}|.
IF sy-tabix < lv_size.
lv_repo_json = lv_repo_json && ','.
ENDIF.
ri_html->add( lv_repo_json ).
ENDLOOP.
ri_html->add( '];' ).
ri_html->add( |var gGoRepoPalette = new CommandPalette(createRepoCatalogEnumerator(repoCatalog, "{
iv_action }"), \{| ).
ri_html->add( ' toggleKey: "F2",' ).
ri_html->add( ' hotkeyDescription: "Go to repo ..."' ).
ri_html->add( '});' ).
ENDMETHOD.
METHOD render_repo_top.
DATA: lo_repo_online TYPE REF TO zcl_abapgit_repo_online,
lo_pback TYPE REF TO zcl_abapgit_persist_background,
lx_error TYPE REF TO zcx_abapgit_exception,
lv_hint TYPE string,
lv_icon TYPE string.
CREATE OBJECT ri_html TYPE zcl_abapgit_html.
CREATE OBJECT lo_pback.
IF io_repo->is_offline( ) = abap_true.
lv_icon = 'plug/darkgrey'.
lv_hint = 'Offline Repository'.
ELSE.
lv_icon = 'cloud-upload-alt/blue'.
lv_hint = 'On-line Repository'.
ENDIF.
ri_html->add( '<table class="w100"><tr>' ).
ri_html->add( '<td class="repo_name">' ).
" Repo type and name
ri_html->add_icon( iv_name = lv_icon
iv_hint = lv_hint ).
ri_html->add( |<span class="name">{ io_repo->get_name( ) }</span>| ).
IF io_repo->is_offline( ) = abap_false.
lo_repo_online ?= io_repo.
ri_html->add_a( iv_txt = lo_repo_online->get_url( )
iv_act = |{ zif_abapgit_definitions=>c_action-url }?url=|
&& |{ lo_repo_online->get_url( ) }|
iv_class = |url| ).
ENDIF.
IF iv_show_edit = abap_true.
ri_html->add_a( iv_txt = ri_html->icon( iv_name = 'edit-solid'
iv_class = 'pad-sides'
iv_hint = 'Change Remote' )
iv_act = |{ zif_abapgit_definitions=>c_action-repo_remote_settings }?| &&
|key={ io_repo->get_key( ) }|
iv_class = |url| ).
ENDIF.
IF io_repo->is_offline( ) = abap_false.
lo_repo_online ?= io_repo.
ri_html->add_a( iv_txt = ri_html->icon( iv_name = 'copy-solid'
iv_class = 'pad-sides'
iv_hint = 'Copy URL to Clipboard' )
iv_act = |{ zif_abapgit_definitions=>c_action-clipboard }| &&
|?clipboard={ lo_repo_online->get_url( ) }|
iv_class = |url| ).
ENDIF.
IF io_repo->is_offline( ) = abap_false AND iv_show_commit = abap_true.
TRY.
render_repo_top_commit_hash( ii_html = ri_html
io_repo_online = lo_repo_online ).
CATCH zcx_abapgit_exception INTO lx_error.
" In case of missing or wrong credentials, show message in status bar
lv_hint = lx_error->get_text( ).
IF lv_hint CS 'credentials'.
MESSAGE lv_hint TYPE 'S' DISPLAY LIKE 'E'.
ENDIF.
ENDTRY.
ENDIF.
" News
IF io_news IS BOUND AND io_news->has_news( ) = abap_true.
IF io_news->has_updates( ) = abap_true.
lv_icon = 'arrow-circle-up/warning'.
ELSE.
lv_icon = 'arrow-circle-up'.
ENDIF.
ri_html->add_a( iv_act = |toggleDisplay('news')|
iv_typ = zif_abapgit_html=>c_action_type-onclick
iv_txt = ri_html->icon( iv_name = lv_icon
iv_class = 'pad-sides'
iv_hint = 'Display Changelog' )
iv_class = |url| ).
ENDIF.
ri_html->add( '</td>' ).
ri_html->add( '<td class="repo_attr right">' ).
" Fav
IF abap_true = zcl_abapgit_persistence_user=>get_instance( )->is_favorite_repo( io_repo->get_key( ) ).
lv_icon = 'star/blue'.
ELSE.
lv_icon = 'star/grey'.
ENDIF.
ri_html->add_a( iv_act = |{ zif_abapgit_definitions=>c_action-repo_toggle_fav }?key={ io_repo->get_key( ) }|
iv_txt = ri_html->icon( iv_name = lv_icon
iv_class = 'pad-sides'
iv_hint = 'Toggle Favorite' ) ).
" BG
IF lo_pback->exists( io_repo->get_key( ) ) = abap_true.
ri_html->add( '<span class="bg_marker" title="background">BG</span>' ).
ENDIF.
" Write protect
IF io_repo->get_local_settings( )-write_protected = abap_true.
ri_html->add_icon( iv_name = 'lock/grey70'
iv_hint = 'Locked from Pulls' ).
ENDIF.
" Branch
IF io_repo->is_offline( ) = abap_false.
lo_repo_online ?= io_repo.
IF iv_show_branch = abap_true.
ri_html->add( render_branch_name( io_repo = lo_repo_online
iv_interactive = iv_interactive_branch ) ).
ENDIF.
ENDIF.
" Package
IF iv_show_package = abap_true.
ri_html->add( render_package_name( io_repo->get_package( ) ) ).
ENDIF.
ri_html->add( '</td>' ).
ri_html->add( '</tr></table>' ).
ENDMETHOD.
METHOD render_repo_top_commit_hash.
DATA: lv_commit_hash TYPE zif_abapgit_definitions=>ty_sha1,
lv_commit_short_hash TYPE zif_abapgit_definitions=>ty_sha1,
lv_display_url TYPE zif_abapgit_persistence=>ty_repo-url,
lo_url TYPE REF TO zcl_abapgit_git_url,
lv_icon_commit TYPE string.
lv_commit_hash = io_repo_online->get_current_remote( ).
lv_commit_short_hash = lv_commit_hash(7).
lv_icon_commit = ii_html->icon( iv_name = 'code-commit'
iv_class = 'pad-sides'
iv_hint = 'Commit' ).
CREATE OBJECT lo_url.
TRY.
lv_display_url = lo_url->get_commit_display_url( io_repo_online ).
ii_html->add_a( iv_txt = |{ lv_icon_commit }{ lv_commit_short_hash }|
iv_act = |{ zif_abapgit_definitions=>c_action-url }?url={ lv_display_url }|
iv_title = 'Commit'
iv_class = |url| ).
CATCH zcx_abapgit_exception.
ii_html->add( |<span class="url">{ lv_icon_commit }{ lv_commit_short_hash }</span>| ).
ENDTRY.
ENDMETHOD.
METHOD render_sci_result.
DATA lv_icon TYPE string.
lv_icon = ii_html->icon(
iv_name = 'bug-solid'
iv_hint = 'Code inspector result' ).
CASE iv_sci_result.
WHEN zif_abapgit_definitions=>c_sci_result-passed.
ii_html->add( |<span class="boxed green-filled-set">{ lv_icon }PASSED</span>| ).
WHEN zif_abapgit_definitions=>c_sci_result-failed.
ii_html->add( |<span class="boxed red-filled-set">{ lv_icon }FAILED</span>| ).
WHEN zif_abapgit_definitions=>c_sci_result-warning.
ii_html->add( |<span class="boxed yellow-filled-set">{ lv_icon }WARN</span>| ).
WHEN OTHERS. " Including NO_RUN
RETURN.
ENDCASE.
ENDMETHOD.
METHOD render_transport.
DATA:
lv_title TYPE string,
lv_jump TYPE string.
CREATE OBJECT ri_html TYPE zcl_abapgit_html.
IF iv_transport IS INITIAL.
RETURN.
ENDIF.
SELECT SINGLE as4text FROM e07t INTO lv_title
WHERE trkorr = iv_transport AND langu = sy-langu ##SUBRC_OK.
lv_jump = |{ zif_abapgit_definitions=>c_action-jump_transport }?transport={ iv_transport }|.
IF iv_icon_only = abap_true.
ri_html->add_a( iv_act = lv_jump
iv_title = |Transport { iv_transport }|
iv_txt = zcl_abapgit_html=>icon( 'truck-solid/darkgrey' ) ).
ELSE.
ri_html->add( |<span class="transport-box">| ).
ri_html->add_icon( iv_name = 'truck-solid/grey70'
iv_hint = 'Transport' ).
IF iv_interactive = abap_true.
ri_html->add_a( iv_act = lv_jump
iv_title = lv_title
iv_txt = |{ iv_transport }| ).
ELSE.
ri_html->add( iv_transport ).
ENDIF.
ri_html->add( '</span>' ).
ENDIF.
ENDMETHOD.
METHOD render_user_name.
DATA:
ls_user_address TYPE addr3_val,
lv_title TYPE string,
lv_jump TYPE string.
CREATE OBJECT ri_html TYPE zcl_abapgit_html.
IF iv_username IS INITIAL.
RETURN.
ENDIF.
IF iv_username <> zcl_abapgit_objects_super=>c_user_unknown AND iv_suppress_title = abap_false.
CALL FUNCTION 'SUSR_USER_ADDRESS_READ'
EXPORTING
user_name = iv_username
IMPORTING
user_address = ls_user_address
EXCEPTIONS
user_address_not_found = 1
OTHERS = 2.
IF sy-subrc = 0.
lv_title = ls_user_address-name_text.
ENDIF.
ENDIF.
lv_jump = |{ zif_abapgit_definitions=>c_action-jump_user }?user={ iv_username }|.
IF iv_icon_only = abap_true.
ri_html->add_a( iv_act = lv_jump
iv_title = lv_title
iv_txt = zcl_abapgit_html=>icon( 'user-solid/darkgrey' ) ).
ELSE.
ri_html->add( |<span class="user-box">| ).
ri_html->add_icon( iv_name = 'user-solid/grey70'
iv_hint = 'User name' ).
IF iv_interactive = abap_true AND iv_username <> zcl_abapgit_objects_super=>c_user_unknown.
ri_html->add_a( iv_act = lv_jump
iv_title = lv_title
iv_txt = |{ iv_username }| ).
ELSE.
ri_html->add( iv_username ).
ENDIF.
ri_html->add( '</span>' ).
ENDIF.
ENDMETHOD.
METHOD render_warning_banner.
CREATE OBJECT ri_html TYPE zcl_abapgit_html.
ri_html->add( '<div class="dummydiv warning">' ).
ri_html->add( |{ ri_html->icon( 'exclamation-triangle/yellow' ) } { iv_text }| ).
ri_html->add( '</div>' ).
ENDMETHOD.
METHOD settings_repo_toolbar.
CREATE OBJECT ro_menu EXPORTING iv_id = 'toolbar-repo-settings'.
ro_menu->add(
iv_txt = 'Repository'
iv_act = |{ zif_abapgit_definitions=>c_action-repo_settings }?key={ iv_key }|
iv_cur = boolc( iv_act = zif_abapgit_definitions=>c_action-repo_settings )
)->add(
iv_txt = 'Local'
iv_act = |{ zif_abapgit_definitions=>c_action-repo_local_settings }?key={ iv_key }|
iv_cur = boolc( iv_act = zif_abapgit_definitions=>c_action-repo_local_settings )
)->add(
iv_txt = 'Remote'
iv_act = |{ zif_abapgit_definitions=>c_action-repo_remote_settings }?key={ iv_key }|
iv_cur = boolc( iv_act = zif_abapgit_definitions=>c_action-repo_remote_settings )
)->add(
iv_txt = 'Background'
iv_act = |{ zif_abapgit_definitions=>c_action-repo_background }?key={ iv_key }|
iv_cur = boolc( iv_act = zif_abapgit_definitions=>c_action-repo_background )
)->add(
iv_txt = 'Stats'
iv_act = |{ zif_abapgit_definitions=>c_action-repo_infos }?key={ iv_key }|
iv_cur = boolc( iv_act = zif_abapgit_definitions=>c_action-repo_infos ) ).
ENDMETHOD.
METHOD settings_toolbar.
CREATE OBJECT ro_menu EXPORTING iv_id = 'toolbar-settings'.
ro_menu->add(
iv_txt = 'Global'
iv_act = zif_abapgit_definitions=>c_action-go_settings
iv_cur = boolc( iv_act = zif_abapgit_definitions=>c_action-go_settings )
)->add(
iv_txt = 'Personal'
iv_act = zif_abapgit_definitions=>c_action-go_settings_personal
iv_cur = boolc( iv_act = zif_abapgit_definitions=>c_action-go_settings_personal ) ).
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
397,
499,
18300,
62,
48317,
62,
354,
2954,
62,
8019,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
25261,
198,
220,
29244,
6158,
44731,
764,
628,
220,
44731,
44513,
13,
628,
220,
220,
220,
24412,
47,
1546,
25,
198,
220,
220,
220,
220,
220,
347,
43312,
3963,
1259,
62,
15596,
62,
12683,
1300,
11,
198,
220,
220,
220,
220,
220,
220,
220,
2446,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
1438,
220,
220,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
23578,
3963,
220,
1259,
62,
15596,
62,
12683,
1300,
764,
628,
220,
220,
220,
42715,
12,
49273,
50,
1398,
62,
41571,
273,
764,
198,
220,
220,
220,
42715,
12,
49273,
50,
8543,
62,
18224,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
844,
62,
18224,
220,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
18224,
220,
220,
220,
220,
220,
220,
41876,
4731,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
26086,
62,
7635,
41876,
4731,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
380,
62,
6494,
8,
220,
41876,
4526,
37,
5390,
1976,
361,
62,
397,
499,
18300,
62,
6494,
764,
198,
220,
220,
220,
42715,
12,
49273,
50,
8543,
62,
260,
7501,
62,
4852,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
952,
62,
260,
7501,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
1976,
565,
62,
397,
499,
18300,
62,
260,
7501,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
12860,
62,
26495,
220,
220,
220,
220,
220,
220,
41876,
450,
499,
62,
30388,
5550,
38865,
450,
499,
62,
7942,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
12860,
62,
1671,
3702,
220,
220,
220,
220,
220,
220,
220,
41876,
450,
499,
62,
30388,
5550,
38865,
450,
499,
62,
7942,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
12860,
62,
41509,
220,
220,
220,
220,
220,
220,
220,
41876,
450,
499,
62,
30388,
5550,
38865,
450,
499,
62,
7942,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
12860,
62,
19312,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
450,
499,
62,
30388,
5550,
38865,
450,
499,
62,
9562,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
3849,
5275,
62,
1671,
3702,
41876,
450,
499,
62,
30388,
5550,
38865,
450,
499,
62,
9562,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
952,
62,
10827,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
1976,
565,
62,
397,
499,
18300,
62,
10827,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
380,
62,
6494,
8,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
1976,
361,
62,
397,
499,
18300,
62,
6494,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
764,
198,
220,
220,
220,
42715,
12,
49273,
50,
8543,
62,
9186,
62,
5219,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
75,
5219,
220,
220,
220,
220,
41876,
1149,
16,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
81,
5219,
220,
220,
220,
220,
41876,
1149,
16,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
81,
85,
62,
6494,
8,
41876,
4731,
764,
198,
220,
220,
220,
42715,
12,
49273,
50,
8543,
62,
8457,
62,
18224,
62,
3820,
1008,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
380,
62,
6494,
8,
41876,
4526,
37,
5390,
1976,
361,
62,
397,
499,
18300,
62,
6494,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
764,
198,
220,
220,
220,
42715,
12,
49273,
50,
8543,
62,
10827,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
952,
62,
10827,
220,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
1976,
565,
62,
397,
499,
18300,
62,
10827,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
380,
62,
6494,
8,
41876,
4526,
37,
5390,
1976,
361,
62,
397,
499,
18300,
62,
6494,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
764,
198,
220,
220,
220,
42715,
12,
49273,
50,
8543,
62,
41509,
62,
12924,
929,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
11299,
220,
220,
220,
41876,
269,
43167,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
312,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
269,
43167,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
380,
62,
6494,
8,
41876,
4526,
37,
5390,
1976,
361,
62,
397,
499,
18300,
62,
6494,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
764,
198,
220,
220,
220,
42715,
12,
49273,
50,
8543,
62,
18224,
62,
20500,
62,
3524,
198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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
*******************************************************************
* System-defined Include-files. *
*******************************************************************
INCLUDE /DMO/LFLIGHT_TRAVEL_API21TOP. " Global Declarations
INCLUDE /DMO/LFLIGHT_TRAVEL_API21UXX. " Function Modules
*******************************************************************
* User-defined Include-files (if necessary). *
*******************************************************************
* INCLUDE /DMO/LFLIGHT_TRAVEL_API21F... " Subroutines
* INCLUDE /DMO/LFLIGHT_TRAVEL_API21O... " PBO-Modules
* INCLUDE /DMO/LFLIGHT_TRAVEL_API21I... " PAI-Modules
* INCLUDE /DMO/LFLIGHT_TRAVEL_API21E... " Events
* INCLUDE /DMO/LFLIGHT_TRAVEL_API21P... " Local class implement.
| [
17174,
17174,
8162,
198,
9,
220,
220,
4482,
12,
23211,
40348,
12,
16624,
13,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1635,
198,
17174,
17174,
8162,
198,
220,
3268,
5097,
52,
7206,
1220,
35,
11770,
14,
43,
3697,
9947,
62,
51,
3861,
18697,
62,
17614,
2481,
35222,
13,
220,
220,
220,
220,
220,
220,
220,
366,
8060,
16691,
24355,
198,
220,
3268,
5097,
52,
7206,
1220,
35,
11770,
14,
43,
3697,
9947,
62,
51,
3861,
18697,
62,
17614,
2481,
52,
8051,
13,
220,
220,
220,
220,
220,
220,
220,
366,
15553,
3401,
5028,
198,
198,
17174,
17174,
8162,
198,
9,
220,
220,
11787,
12,
23211,
40348,
12,
16624,
357,
361,
3306,
737,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1635,
198,
17174,
17174,
8162,
198,
9,
3268,
5097,
52,
7206,
1220,
35,
11770,
14,
43,
3697,
9947,
62,
51,
3861,
18697,
62,
17614,
2481,
37,
986,
220,
220,
220,
220,
220,
220,
220,
366,
3834,
81,
448,
1127,
198,
9,
3268,
5097,
52,
7206,
1220,
35,
11770,
14,
43,
3697,
9947,
62,
51,
3861,
18697,
62,
17614,
2481,
46,
986,
220,
220,
220,
220,
220,
220,
220,
366,
350,
8202,
12,
5841,
5028,
198,
9,
3268,
5097,
52,
7206,
1220,
35,
11770,
14,
43,
3697,
9947,
62,
51,
3861,
18697,
62,
17614,
2481,
40,
986,
220,
220,
220,
220,
220,
220,
220,
366,
8147,
40,
12,
5841,
5028,
198,
9,
3268,
5097,
52,
7206,
1220,
35,
11770,
14,
43,
3697,
9947,
62,
51,
3861,
18697,
62,
17614,
2481,
36,
986,
220,
220,
220,
220,
220,
220,
220,
366,
18715,
198,
9,
3268,
5097,
52,
7206,
1220,
35,
11770,
14,
43,
3697,
9947,
62,
51,
3861,
18697,
62,
17614,
2481,
47,
986,
220,
220,
220,
220,
220,
220,
220,
366,
10714,
1398,
3494,
13,
198
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS zcl_aoc_check_42 DEFINITION
PUBLIC
INHERITING FROM zcl_aoc_super
CREATE PUBLIC.
PUBLIC SECTION.
METHODS constructor.
METHODS check
REDEFINITION.
METHODS get_message_text
REDEFINITION.
PROTECTED SECTION.
PRIVATE SECTION.
ENDCLASS.
CLASS ZCL_AOC_CHECK_42 IMPLEMENTATION.
METHOD check.
* abapOpenChecks
* https://github.com/larshp/abapOpenChecks
* MIT License
TYPES: BEGIN OF ty_when,
back TYPE stru_back,
code TYPE string,
include TYPE sobj_name,
row TYPE token_row,
END OF ty_when.
DATA: lv_index TYPE i,
lv_from TYPE i,
lt_when TYPE STANDARD TABLE OF ty_when WITH DEFAULT KEY,
ls_when LIKE LINE OF lt_when.
FIELD-SYMBOLS: <ls_when> LIKE LINE OF lt_when,
<ls_statement> LIKE LINE OF it_statements,
<ls_token> LIKE LINE OF it_tokens,
<ls_structure> LIKE LINE OF it_structures.
LOOP AT it_structures ASSIGNING <ls_structure>
WHERE stmnt_type = scan_struc_stmnt_type-when.
APPEND INITIAL LINE TO lt_when ASSIGNING <ls_when>.
<ls_when>-back = <ls_structure>-back.
lv_from = <ls_structure>-stmnt_from + 1.
LOOP AT it_statements ASSIGNING <ls_statement>
FROM lv_from
TO <ls_structure>-stmnt_to
WHERE type <> scan_stmnt_type-empty
AND type <> scan_stmnt_type-comment
AND type <> scan_stmnt_type-comment_in_stmnt
AND type <> scan_stmnt_type-macro_definition
AND type <> scan_stmnt_type-pragma.
IF <ls_when>-include IS INITIAL.
<ls_when>-include = get_include( p_level = <ls_statement>-level ).
ENDIF.
LOOP AT it_tokens ASSIGNING <ls_token>
FROM <ls_statement>-from TO <ls_statement>-to.
IF <ls_when>-row IS INITIAL.
<ls_when>-row = <ls_token>-row.
ENDIF.
IF <ls_when>-code IS INITIAL.
<ls_when>-code = <ls_token>-str.
ELSE.
CONCATENATE <ls_when>-code <ls_token>-str
INTO <ls_when>-code SEPARATED BY space.
ENDIF.
ENDLOOP.
ENDLOOP.
ENDLOOP.
DELETE lt_when WHERE code IS INITIAL.
SORT lt_when BY back ASCENDING code ASCENDING.
LOOP AT lt_when ASSIGNING <ls_when>.
lv_index = sy-tabix + 1.
READ TABLE lt_when INDEX lv_index INTO ls_when.
IF sy-subrc = 0
AND <ls_when>-back = ls_when-back
AND <ls_when>-code = ls_when-code.
inform( p_sub_obj_type = c_type_include
p_sub_obj_name = <ls_when>-include
p_line = <ls_when>-row
p_kind = mv_errty
p_test = myname
p_code = '001' ).
ENDIF.
ENDLOOP.
ENDMETHOD.
METHOD constructor.
super->constructor( ).
version = '001'.
position = '042'.
has_attributes = abap_true.
attributes_ok = abap_true.
enable_rfc( ).
mv_errty = c_error.
ENDMETHOD. "CONSTRUCTOR
METHOD get_message_text.
CLEAR p_text.
CASE p_code.
WHEN '001'.
p_text = 'Identical WHEN code'. "#EC NOTEXT
WHEN OTHERS.
super->get_message_text( EXPORTING p_test = p_test
p_code = p_code
IMPORTING p_text = p_text ).
ENDCASE.
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
64,
420,
62,
9122,
62,
3682,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
3268,
16879,
2043,
2751,
16034,
1976,
565,
62,
64,
420,
62,
16668,
198,
220,
29244,
6158,
44731,
13,
628,
220,
44731,
44513,
13,
628,
220,
220,
220,
337,
36252,
50,
23772,
13,
628,
220,
220,
220,
337,
36252,
50,
2198,
198,
220,
220,
220,
220,
220,
220,
220,
23848,
36,
20032,
17941,
13,
198,
220,
220,
220,
337,
36252,
50,
651,
62,
20500,
62,
5239,
198,
220,
220,
220,
220,
220,
220,
220,
23848,
36,
20032,
17941,
13,
198,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
4810,
3824,
6158,
44513,
13,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1168,
5097,
62,
32,
4503,
62,
50084,
62,
3682,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
2198,
13,
198,
198,
9,
450,
499,
11505,
7376,
4657,
198,
9,
3740,
1378,
12567,
13,
785,
14,
75,
5406,
79,
14,
397,
499,
11505,
7376,
4657,
198,
9,
17168,
13789,
628,
220,
220,
220,
24412,
47,
1546,
25,
347,
43312,
3963,
1259,
62,
12518,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
736,
220,
220,
220,
41876,
2874,
62,
1891,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2438,
220,
220,
220,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2291,
41876,
27355,
73,
62,
3672,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5752,
220,
220,
220,
220,
41876,
11241,
62,
808,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
23578,
3963,
1259,
62,
12518,
13,
628,
220,
220,
220,
42865,
25,
300,
85,
62,
9630,
41876,
1312,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
6738,
220,
41876,
1312,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
83,
62,
12518,
220,
41876,
49053,
9795,
43679,
3963,
1259,
62,
12518,
13315,
5550,
38865,
35374,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
43979,
62,
12518,
220,
34178,
48920,
3963,
300,
83,
62,
12518,
13,
628,
220,
220,
220,
18930,
24639,
12,
23060,
10744,
3535,
50,
25,
1279,
7278,
62,
12518,
29,
220,
220,
220,
220,
220,
34178,
48920,
3963,
300,
83,
62,
12518,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1279,
7278,
62,
26090,
29,
34178,
48920,
3963,
340,
62,
14269,
3196,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1279,
7278,
62,
30001,
29,
220,
220,
220,
220,
34178,
48920,
3963,
340,
62,
83,
482,
641,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1279,
7278,
62,
301,
5620,
29,
34178,
48920,
3963,
340,
62,
7249,
942,
13,
628,
198,
220,
220,
220,
17579,
3185,
5161,
340,
62,
7249,
942,
24994,
3528,
15871,
1279,
7278,
62,
301,
5620,
29,
198,
220,
220,
220,
220,
220,
220,
220,
33411,
336,
76,
429,
62,
4906,
796,
9367,
62,
19554,
66,
62,
301,
76,
429,
62,
4906,
12,
12518,
13,
628,
220,
220,
220,
220,
220,
43504,
10619,
3268,
2043,
12576,
48920,
5390,
300,
83,
62,
12518,
24994,
3528,
15871,
1279,
7278,
62,
12518,
28401,
198,
220,
220,
220,
220,
220,
1279,
7278,
62,
12518,
29,
12,
1891,
796,
1279,
7278,
62,
301,
5620,
29,
12,
1891,
13,
628,
220,
220,
220,
220,
220,
300,
85,
62,
6738,
796,
1279,
7278,
62,
301,
5620,
29,
12,
301,
76,
429,
62,
6738,
1343,
352,
13,
198,
220,
220,
220,
220,
220,
17579,
3185,
5161,
340,
62,
14269,
3196,
24994,
3528,
15871,
1279,
7278,
62,
26090,
29,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
16034,
300,
85,
62,
6738,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5390,
1279,
7278,
62,
301,
5620,
29,
12,
301,
76,
429,
62,
1462,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
33411,
2099,
1279,
29,
9367,
62,
301,
76,
429,
62,
4906,
12,
28920,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5357,
2099,
1279,
29,
9367,
62,
301,
76,
429,
62,
4906,
12,
23893,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5357,
2099,
1279,
29,
9367,
62,
301,
76,
429,
62,
4906,
12,
23893,
62,
259,
62,
301,
76,
429,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5357,
2099,
1279,
29,
9367,
62,
301,
76,
429,
62,
4906,
12,
20285,
305,
62,
46758,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5357,
2099,
1279,
29,
9367,
62,
301,
76,
429,
62,
4906,
12,
1050,
363,
2611,
13,
628,
220,
220,
220,
220,
220,
220,
220,
16876,
1279,
7278,
62,
12518,
29,
12,
17256,
3180,
3268,
2043,
12576,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1279,
7278,
62,
12518,
29,
12,
17256,
796,
651,
62,
17256,
7,
279,
62,
5715,
796,
1279,
7278,
62,
26090,
29,
12,
5715,
6739,
198,
220,
220,
220,
220,
220,
220,
220,
23578,
5064,
13,
628,
220,
220,
220,
220,
220,
220,
220,
17579,
3185,
5161,
340,
62,
83,
482,
641,
24994,
3528,
15871,
1279,
7278,
62,
30001,
29,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
16034,
1279,
7278,
62,
26090,
29,
12,
6738,
5390,
1279,
7278,
62,
26090,
29,
12,
1462,
13,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
16876,
1279,
7278,
62,
12518,
29,
12,
808,
3180,
3268,
2043,
12576,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1279,
7278,
62,
12518,
29,
12,
808,
796,
1279,
7278,
62,
30001,
29,
12,
808,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
23578,
5064,
13,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
16876,
1279,
7278,
62,
12518,
29,
12,
8189,
3180,
3268,
2043,
12576,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS zcl_abapgit_ecatt_script_downl DEFINITION
PUBLIC
INHERITING FROM cl_apl_ecatt_script_download
CREATE PUBLIC .
PUBLIC SECTION.
INTERFACES:
zif_abapgit_ecatt_download.
METHODS:
download REDEFINITION.
PROTECTED SECTION.
METHODS:
download_data REDEFINITION.
PRIVATE SECTION.
DATA:
mv_xml_stream TYPE xstring,
mi_script_node TYPE REF TO if_ixml_element.
METHODS:
set_script_to_template
RAISING
cx_ecatt_apl_util,
set_control_data_for_tcd
IMPORTING
is_param TYPE etpar_gui
io_params TYPE REF TO cl_apl_ecatt_params
RAISING
cx_ecatt_apl,
escape_control_data
IMPORTING
ii_element TYPE REF TO if_ixml_element
iv_tabname TYPE string
iv_node TYPE string
RAISING
cx_ecatt_apl_util,
set_blob_to_template
RAISING
cx_ecatt_apl_util,
set_artmp_to_template
RAISING
cx_ecatt_apl_util.
ENDCLASS.
CLASS ZCL_ABAPGIT_ECATT_SCRIPT_DOWNL IMPLEMENTATION.
METHOD download.
" Downport
load_help = im_load_help.
typ = im_object_type.
TRY.
cl_apl_ecatt_object=>show_object(
EXPORTING
im_obj_type = im_object_type
im_name = im_object_name
im_version = im_object_version
IMPORTING
re_object = ecatt_object ).
CATCH cx_ecatt INTO ex_ecatt.
RETURN.
ENDTRY.
toolname = ecatt_object->attrib->get_tool_name( ).
set_attributes_to_template( ).
IF toolname = cl_apl_ecatt_const=>toolname_ecatt.
ecatt_script ?= ecatt_object.
set_script_to_template( ).
TRY.
get_general_params_data( ecatt_script->params ).
CATCH cx_ecatt_apl. "#EC NO_HANDLER
* proceed with download and report errors later
ENDTRY.
LOOP AT parm INTO wa_parm.
TRY.
IF wa_parm-value = '<INITIAL>'.
CLEAR wa_parm-value.
ENDIF.
set_general_params_data_to_dom( ).
IF NOT wa_parm-pstruc_typ IS INITIAL.
set_deep_stru_to_dom( ecatt_script->params ).
set_deep_data_to_dom( ecatt_script->params ).
IF wa_parm-xmlref_typ = cl_apl_ecatt_const=>ref_type_c_tcd.
set_control_data_for_tcd( is_param = wa_parm
io_params = ecatt_script->params ).
ENDIF.
ENDIF.
CATCH cx_ecatt_apl. "#EC NO_HANDLER
* proceed with download and report errors later
ENDTRY.
ENDLOOP.
ELSE.
set_blob_to_template( ).
set_artmp_to_template( ).
ENDIF.
download_data( ).
ENDMETHOD.
METHOD download_data.
" Downport
mv_xml_stream = zcl_abapgit_ecatt_helper=>download_data( template_over_all ).
ENDMETHOD.
METHOD escape_control_data.
" Downport
DATA: li_iter TYPE REF TO if_ixml_node_iterator,
li_textit TYPE REF TO if_ixml_node_iterator,
li_abapctrl TYPE REF TO if_ixml_node_collection,
li_text TYPE REF TO if_ixml_text,
li_filter TYPE REF TO if_ixml_node_filter,
li_list TYPE REF TO if_ixml_node_list,
lv_value TYPE etdom_name,
li_vars TYPE REF TO if_ixml_element,
li_elem TYPE REF TO if_ixml_element.
li_vars = ii_element->find_from_name_ns( iv_tabname ).
li_filter = ii_element->create_filter_node_type(
if_ixml_node=>co_node_text ).
IF li_vars IS NOT INITIAL.
li_abapctrl = ii_element->get_elements_by_tag_name_ns( iv_node ).
* just for debugging
li_iter = li_abapctrl->create_iterator( ).
li_elem ?= li_iter->get_next( ).
WHILE li_elem IS NOT INITIAL.
li_list = li_elem->get_children( ).
li_textit = li_list->create_rev_iterator_filtered( li_filter ).
li_text ?= li_textit->get_next( ).
IF li_text IS NOT INITIAL.
lv_value = li_text->get_data( ).
IF lv_value(1) = cl_abap_char_utilities=>minchar.
REPLACE SECTION OFFSET 0 LENGTH 1 OF lv_value WITH space.
li_text->set_value( value = lv_value ).
ENDIF.
ENDIF.
CLEAR: li_textit, li_list, li_elem, lv_value.
li_elem ?= li_iter->get_next( ).
ENDWHILE.
CLEAR: li_abapctrl, li_elem, li_iter.
ENDIF.
ENDMETHOD.
METHOD set_artmp_to_template.
" Downport
DATA: li_artmp_node TYPE REF TO if_ixml_element,
lv_rc TYPE sy-subrc,
lv_text TYPE string,
lv_rc_args_tmpl TYPE int4,
lv_errmsg TYPE string.
li_artmp_node = template_over_all->create_simple_element(
name = 'ECET_ARTMP'
parent = root_node ).
ecatt_extprog->get_args_tmpl(
IMPORTING
ex_xml_arg_tmpl = lv_text
ex_rc = lv_rc_args_tmpl
ex_errmsg = lv_errmsg ).
IF li_artmp_node IS INITIAL OR lv_rc_args_tmpl > 0.
me->raise_download_exception(
textid = cx_ecatt_apl_util=>download_processing
previous = ex_ecatt
called_method = 'CL_APL_ECATT_SCRIPT_DOWNLOAD->SET_ARTMP_TO_TEMPLATE'
free_text = lv_errmsg ).
ENDIF.
lv_rc = li_artmp_node->set_value( value = lv_text ).
IF lv_rc <> 0.
me->raise_download_exception(
textid = cx_ecatt_apl_util=>download_processing
previous = ex_ecatt
called_method = 'CL_APL_ECATT_SCRIPT_DOWNLOAD->SET_ARTMP_TO_TEMPLATE' ).
ENDIF.
ENDMETHOD.
METHOD set_blob_to_template.
" Downport
DATA: li_blob_node TYPE REF TO if_ixml_element,
lv_rc TYPE sy-subrc,
lv_text TYPE string.
li_blob_node = template_over_all->create_simple_element(
name = 'ECET_BLOBS'
parent = root_node ).
IF li_blob_node IS INITIAL.
me->raise_download_exception(
textid = cx_ecatt_apl_util=>download_processing
previous = ex_ecatt
called_method = 'CL_APL_ECATT_SCRIPT_DOWNLOAD->SET_BLOB_TO_TEMPLATE' ).
ENDIF.
ecatt_extprog->get_blob(
EXPORTING
im_whole_data = 1
IMPORTING
ex_xml_blob = lv_text ).
lv_rc = li_blob_node->set_value( value = lv_text ).
IF lv_rc <> 0.
me->raise_download_exception(
textid = cx_ecatt_apl_util=>download_processing
previous = ex_ecatt
called_method = 'CL_APL_ECATT_SCRIPT_DOWNLOAD->SET_BLOB_TO_TEMPLATE' ).
ENDIF.
ENDMETHOD.
METHOD set_control_data_for_tcd.
" Downport
DATA: lt_params TYPE ettcd_params_tabtype,
lt_verbs TYPE ettcd_verbs_tabtype,
lt_vars TYPE ettcd_vars_tabtype,
lt_dp_tab TYPE ettcd_dp_tab_tabtype,
lt_dp_for TYPE ettcd_dp_for_tabtype,
lt_dp_pro TYPE ettcd_dp_pro_tabtype,
lt_dp_fld TYPE ettcd_dp_fld_tabtype,
lt_svars TYPE ettcd_svars_tabtype.
DATA: li_element TYPE REF TO if_ixml_element,
li_deep_tcd TYPE REF TO if_ixml_element,
lv_rc TYPE sy-subrc,
lv_name TYPE string,
lv_parname TYPE string,
lo_pval_xml TYPE REF TO cl_apl_ecatt_xml_data,
lo_ctrl_tabs TYPE REF TO cl_apl_ecatt_control_tables.
FIELD-SYMBOLS: <lt_tab> TYPE STANDARD TABLE.
IF is_param-xmlref_typ <> cl_apl_ecatt_const=>ref_type_c_tcd OR io_params IS INITIAL.
RETURN.
ENDIF.
lv_parname = is_param-pname.
io_params->get_param_value( "TCD command interface
EXPORTING
im_var_id = cl_apl_ecatt_const=>varid_default_val
im_pname = lv_parname
im_pindex = is_param-pindex
IMPORTING
ex_pval_xml = lo_pval_xml ).
lo_ctrl_tabs = lo_pval_xml->get_control_tables_ref( ).
IF lo_ctrl_tabs IS INITIAL.
RETURN.
ENDIF.
lo_ctrl_tabs->get_control_tables( "Read 8 control tables
IMPORTING
ex_params = lt_params
ex_verbs = lt_verbs
ex_vars = lt_vars
ex_dp_tab = lt_dp_tab
ex_dp_for = lt_dp_for
ex_dp_pro = lt_dp_pro
ex_dp_fld = lt_dp_fld
ex_svars = lt_svars ).
IF lt_params IS INITIAL OR
lt_verbs IS INITIAL OR
lt_vars IS INITIAL OR
lt_dp_tab IS INITIAL OR
lt_dp_for IS INITIAL OR
lt_dp_pro IS INITIAL OR
lt_dp_fld IS INITIAL OR
lt_svars IS INITIAL.
RETURN.
ENDIF.
li_deep_tcd = template_over_all->create_simple_element_ns(
name = cl_apl_xml_const=>upl_tcd_node
parent = ap_current_param ).
IF li_deep_tcd IS INITIAL.
raise_download_exception(
textid = cx_ecatt_apl_util=>download_processing
previous = ex_ecatt ).
ENDIF.
DO 8 TIMES. "Loop at 8 control tables
CASE sy-index.
WHEN 1.
lv_name = 'ETTCD_PARAMS_TABTYPE'.
ASSIGN lt_params TO <lt_tab>.
WHEN 2.
lv_name = 'ETTCD_VERBS_TABTYPE'.
ASSIGN lt_verbs TO <lt_tab>.
WHEN 3.
lv_name = 'ETTCD_VARS_TABTYPE'.
ASSIGN lt_vars TO <lt_tab>.
WHEN 4.
lv_name = 'ETTCD_DP_TAB_TABTYPE'.
ASSIGN lt_dp_tab TO <lt_tab>.
WHEN 5.
lv_name = 'ETTCD_DP_FOR_TABTYPE'.
ASSIGN lt_dp_for TO <lt_tab>.
WHEN 6.
lv_name = 'ETTCD_DP_PRO_TABTYPE'.
ASSIGN lt_dp_pro TO <lt_tab>.
WHEN 7.
lv_name = 'ETTCD_DP_FLD_TABTYPE'.
ASSIGN lt_dp_fld TO <lt_tab>.
WHEN 8.
lv_name = 'ETTCD_SVARS_TABTYPE'.
ASSIGN lt_svars TO <lt_tab>.
ENDCASE.
CALL FUNCTION 'SDIXML_DATA_TO_DOM' "Ast generieren lassen
EXPORTING
name = lv_name
dataobject = <lt_tab>
IMPORTING
data_as_dom = li_element
EXCEPTIONS
illegal_name = 1
OTHERS = 2.
IF sy-subrc <> 0.
me->raise_download_exception(
textid = cx_ecatt_apl_util=>download_processing
previous = ex_ecatt ).
ENDIF.
* Ast in Hauptbaum haengen
lv_rc = li_deep_tcd->append_child( new_child = li_element ).
IF lv_rc <> 0.
me->raise_download_exception(
textid = cx_ecatt_apl_util=>download_processing
previous = ex_ecatt ).
ENDIF.
FREE li_element.
UNASSIGN <lt_tab>.
ENDDO.
escape_control_data( ii_element = li_deep_tcd
iv_tabname = 'ETTCD_VARS_TABTYPE'
iv_node = 'CB_INDEX' ).
escape_control_data(
ii_element = li_deep_tcd
iv_tabname = 'ETTCD_VERBS_TABTYPE'
iv_node = 'NAME' ).
FREE: lt_dp_tab, lt_dp_for, lt_dp_fld, lt_svars,
lt_params, lt_vars, lt_dp_pro, lt_verbs.
ENDMETHOD.
METHOD set_script_to_template.
" Downport
DATA:
lt_text TYPE etxml_line_tabtype,
li_element TYPE REF TO if_ixml_element,
lv_rc TYPE sy-subrc.
ecatt_script->get_script_text(
CHANGING
scripttext = lt_text ).
mi_script_node = template_over_all->create_simple_element(
name = 'SCRIPT'
parent = root_node ).
IF mi_script_node IS INITIAL.
me->raise_download_exception(
textid = cx_ecatt_apl_util=>download_processing
previous = ex_ecatt
called_method = 'CL_APL_ECATT_SCRIPT_DOWNLOAD->SET_SCRIPT_TO_TEMPLATE' ).
ENDIF.
CALL FUNCTION 'SDIXML_DATA_TO_DOM'
EXPORTING
name = 'ETXML_LINE_TABTYPE'
dataobject = lt_text
IMPORTING
data_as_dom = li_element
CHANGING
document = template_over_all
EXCEPTIONS
illegal_name = 1
OTHERS = 2.
IF sy-subrc <> 0.
me->raise_download_exception(
textid = cx_ecatt_apl_util=>download_processing
previous = ex_ecatt
called_method = 'CL_APL_ECATT_SCRIPT_DOWNLOAD->SET_SCRIPT_TO_TEMPLATE' ).
ENDIF.
lv_rc = mi_script_node->append_child( li_element ).
IF lv_rc <> 0.
me->raise_download_exception(
textid = cx_ecatt_apl_util=>download_processing
previous = ex_ecatt
called_method = 'CL_APL_ECATT_SCRIPT_DOWNLOAD->SET_SCRIPT_TO_TEMPLATE' ).
ENDIF.
ENDMETHOD.
METHOD zif_abapgit_ecatt_download~get_xml_stream.
rv_xml_stream = mv_xml_stream.
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
397,
499,
18300,
62,
721,
1078,
62,
12048,
62,
2902,
75,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
3268,
16879,
2043,
2751,
16034,
537,
62,
64,
489,
62,
721,
1078,
62,
12048,
62,
15002,
198,
220,
29244,
6158,
44731,
764,
628,
220,
44731,
44513,
13,
198,
220,
220,
220,
23255,
37,
2246,
1546,
25,
198,
220,
220,
220,
220,
220,
1976,
361,
62,
397,
499,
18300,
62,
721,
1078,
62,
15002,
13,
628,
220,
220,
220,
337,
36252,
50,
25,
198,
220,
220,
220,
220,
220,
4321,
23848,
36,
20032,
17941,
13,
628,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
220,
220,
337,
36252,
50,
25,
198,
220,
220,
220,
220,
220,
4321,
62,
7890,
23848,
36,
20032,
17941,
13,
628,
220,
4810,
3824,
6158,
44513,
13,
198,
220,
220,
220,
42865,
25,
198,
220,
220,
220,
220,
220,
285,
85,
62,
19875,
62,
5532,
220,
41876,
2124,
8841,
11,
198,
220,
220,
220,
220,
220,
21504,
62,
12048,
62,
17440,
41876,
4526,
37,
5390,
611,
62,
844,
4029,
62,
30854,
13,
628,
220,
220,
220,
337,
36252,
50,
25,
198,
220,
220,
220,
220,
220,
900,
62,
12048,
62,
1462,
62,
28243,
198,
220,
220,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
43213,
62,
721,
1078,
62,
64,
489,
62,
22602,
11,
628,
220,
220,
220,
220,
220,
900,
62,
13716,
62,
7890,
62,
1640,
62,
83,
10210,
198,
220,
220,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
318,
62,
17143,
220,
41876,
2123,
1845,
62,
48317,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
33245,
62,
37266,
41876,
4526,
37,
5390,
537,
62,
64,
489,
62,
721,
1078,
62,
37266,
198,
220,
220,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
43213,
62,
721,
1078,
62,
64,
489,
11,
628,
220,
220,
220,
220,
220,
6654,
62,
13716,
62,
7890,
198,
220,
220,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21065,
62,
30854,
41876,
4526,
37,
5390,
611,
62,
844,
4029,
62,
30854,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
8658,
3672,
41876,
4731,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
17440,
220,
220,
220,
41876,
4731,
198,
220,
220,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
43213,
62,
721,
1078,
62,
64,
489,
62,
22602,
11,
628,
220,
220,
220,
220,
220,
900,
62,
2436,
672,
62,
1462,
62,
28243,
198,
220,
220,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
43213,
62,
721,
1078,
62,
64,
489,
62,
22602,
11,
628,
220,
220,
220,
220,
220,
900,
62,
433,
3149,
62,
1462,
62,
28243,
198,
220,
220,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
43213,
62,
721,
1078,
62,
64,
489,
62,
22602,
13,
198,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1168,
5097,
62,
6242,
2969,
38,
2043,
62,
2943,
17139,
62,
6173,
46023,
62,
41925,
43,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
4321,
13,
628,
220,
220,
220,
366,
5588,
634,
628,
220,
220,
220,
3440,
62,
16794,
796,
545,
62,
2220,
62,
16794,
13,
198,
220,
220,
220,
2170,
796,
545,
62,
15252,
62,
4906,
13,
628,
220,
220,
220,
7579,
56,
13,
198,
220,
220,
220,
220,
220,
220,
220,
537,
62,
64,
489,
62,
721,
1078,
62,
15252,
14804,
12860,
62,
15252,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
545,
62,
26801,
62,
4906,
796,
545,
62,
15252,
62,
4906,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
545,
62,
3672,
220,
220,
220,
220,
796,
545,
62,
15252,
62,
3672,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
545,
62,
9641,
220,
796,
545,
62,
15252,
62,
9641,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
302,
62,
15252,
220,
220,
796,
9940,
1078,
62,
15252,
6739,
198,
220,
220,
220,
220,
220,
327,
11417,
43213,
62,
721,
1078,
39319,
409,
62,
721,
1078,
13,
198,
220,
220,
220,
220,
220,
220,
220,
30826,
27064,
13,
198,
220,
220,
220,
23578,
40405,
13,
628,
220,
220,
220,
2891,
3672,
796,
9940,
1078,
62,
15252,
3784,
1078,
822,
3784,
1136,
62,
25981,
62,
3672,
7,
6739,
198,
220,
220,
220,
900,
62,
1078,
7657,
62,
1462,
62,
28243,
7,
6739,
628,
220,
220,
220,
16876,
2891,
3672,
796,
537,
62,
64,
489,
62,
721,
1078,
62,
9979,
14804,
25981,
3672,
62,
721,
1078,
13,
628,
220,
220,
220,
220,
220,
9940,
1078,
62,
12048,
5633,
28,
9940,
1078,
62,
15252,
13,
628,
220,
220,
220,
220,
220,
900,
62,
12048,
62,
1462,
62,
28243,
7,
6739,
628,
220,
220,
220,
220,
220,
7579,
56,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
651,
62,
24622,
62,
37266,
62,
7890,
7,
9940,
1078,
62,
12048,
3784,
37266,
6739,
198,
220,
220,
220,
220,
220,
220,
220,
327,
11417,
43213,
62,
721,
1078,
62,
64,
489,
13,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
25113,
2943,
8005,
62,
39,
6981,
39878,
198,
9,
220,
220,
220,
220,
220,
220,
220,
220,
5120,
351,
4321,
290,
989,
8563,
1568,
198,
220,
220,
220,
220,
220,
23578,
40405,
13,
628,
220,
220,
220,
220,
220,
17579,
3185,
5161,
1582,
76,
39319,
2082,
62,
79,
1670,
13,
198,
220,
220,
220,
220,
220,
220,
220,
7579,
56,
13,
198,
220,
220,
220,
220
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
"! Defines a two factor authentication authenticator
"! <p>
"! Authenticators support one or multiple services and are able to generate access tokens using the
"! service's API using the users username, password and two factor authentication token
"! (app/sms/tokengenerator). With these access tokens the user can be authenticated to the service's
"! implementation of the git http api, just like the "normal" password would.
"! </p>
"! <p>
"! <em>LCL_2FA_AUTHENTICATOR_REGISTRY</em> can be used to find a suitable implementation for a given
"! repository.
"! </p>
"! <p>
"! Using the <em>begin</em> and <em>end</em> methods an internal session can be started and
"! completed in which internal state necessary for multiple methods will be cached. This can be
"! used to avoid having multiple http sessions between <em>authenticate</em> and
"! <em>delete_access_tokens</em>.
"! </p>
INTERFACE zif_abapgit_2fa_authenticator
PUBLIC .
"! Generate an access token
"! @parameter iv_url | Repository url
"! @parameter iv_username | Username
"! @parameter iv_password | Password
"! @parameter iv_2fa_token | Two factor token
"! @parameter rv_access_token | Generated access token
"! @raising lcx_2fa_auth_failed | Authentication failed
"! @raising lcx_2fa_token_gen_failed | Token generation failed
METHODS authenticate
IMPORTING
!iv_url TYPE string
!iv_username TYPE string
!iv_password TYPE string
!iv_2fa_token TYPE string
RETURNING
VALUE(rv_access_token) TYPE string
RAISING
zcx_abapgit_2fa_auth_failed
zcx_abapgit_2fa_gen_failed
zcx_abapgit_2fa_comm_error .
"! Check if this authenticator instance supports the give repository url
"! @parameter iv_url | Repository url
"! @parameter rv_supported | Is supported
METHODS supports_url
IMPORTING
!iv_url TYPE string
RETURNING
VALUE(rv_supported) TYPE abap_bool .
"! Check if two factor authentication is required
"! @parameter iv_url | Repository url
"! @parameter iv_username | Username
"! @parameter iv_password | Password
"! @parameter rv_required | 2FA is required
METHODS is_2fa_required
IMPORTING
!iv_url TYPE string
!iv_username TYPE string
!iv_password TYPE string
RETURNING
VALUE(rv_required) TYPE abap_bool
RAISING
zcx_abapgit_2fa_comm_error .
"! Delete all previously created access tokens for abapGit
"! @parameter iv_url | Repository url
"! @parameter iv_username | Username
"! @parameter iv_password | Password
"! @parameter iv_2fa_token | Two factor token
"! @raising lcx_2fa_token_del_failed | Token deletion failed
"! @raising lcx_2fa_auth_failed | Authentication failed
METHODS delete_access_tokens
IMPORTING
!iv_url TYPE string
!iv_username TYPE string
!iv_password TYPE string
!iv_2fa_token TYPE string
RAISING
zcx_abapgit_2fa_del_failed
zcx_abapgit_2fa_comm_error
zcx_abapgit_2fa_auth_failed .
"! Begin an authenticator session that uses internal caching for authorizations
"! @raising lcx_2fa_illegal_state | Session already started
METHODS begin
RAISING
zcx_abapgit_2fa_illegal_state .
"! End an authenticator session and clear internal caches
"! @raising lcx_2fa_illegal_state | Session not running
METHODS end
RAISING
zcx_abapgit_2fa_illegal_state .
ENDINTERFACE.
| [
40484,
2896,
1127,
257,
734,
5766,
18239,
16425,
1352,
198,
40484,
1279,
79,
29,
198,
40484,
31885,
44549,
1104,
530,
393,
3294,
2594,
290,
389,
1498,
284,
7716,
1895,
16326,
1262,
262,
198,
40484,
2139,
338,
7824,
1262,
262,
2985,
20579,
11,
9206,
290,
734,
5766,
18239,
11241,
198,
40484,
357,
1324,
14,
82,
907,
14,
83,
482,
1516,
877,
1352,
737,
2080,
777,
1895,
16326,
262,
2836,
460,
307,
44529,
284,
262,
2139,
338,
198,
40484,
7822,
286,
262,
17606,
2638,
40391,
11,
655,
588,
262,
366,
11265,
1,
9206,
561,
13,
198,
40484,
7359,
79,
29,
198,
40484,
1279,
79,
29,
198,
40484,
1279,
368,
29,
43,
5097,
62,
17,
7708,
62,
32,
24318,
3525,
2149,
25633,
62,
31553,
1797,
40405,
3556,
368,
29,
460,
307,
973,
284,
1064,
257,
11080,
7822,
329,
257,
1813,
198,
40484,
16099,
13,
198,
40484,
7359,
79,
29,
198,
40484,
1279,
79,
29,
198,
40484,
8554,
262,
1279,
368,
29,
27471,
3556,
368,
29,
290,
1279,
368,
29,
437,
3556,
368,
29,
5050,
281,
5387,
6246,
460,
307,
2067,
290,
198,
40484,
5668,
287,
543,
5387,
1181,
3306,
329,
3294,
5050,
481,
307,
39986,
13,
770,
460,
307,
198,
40484,
973,
284,
3368,
1719,
3294,
2638,
10991,
1022,
1279,
368,
29,
41299,
5344,
3556,
368,
29,
290,
198,
40484,
1279,
368,
29,
33678,
62,
15526,
62,
83,
482,
641,
3556,
368,
28401,
198,
40484,
7359,
79,
29,
198,
41358,
49836,
1976,
361,
62,
397,
499,
18300,
62,
17,
13331,
62,
41299,
26407,
198,
220,
44731,
764,
628,
198,
220,
366,
0,
2980,
378,
281,
1895,
11241,
198,
220,
366,
0,
2488,
17143,
2357,
21628,
62,
6371,
930,
1432,
13264,
19016,
198,
220,
366,
0,
2488,
17143,
2357,
21628,
62,
29460,
930,
50069,
198,
220,
366,
0,
2488,
17143,
2357,
21628,
62,
28712,
930,
30275,
198,
220,
366,
0,
2488,
17143,
2357,
21628,
62,
17,
13331,
62,
30001,
930,
4930,
5766,
11241,
198,
220,
366,
0,
2488,
17143,
2357,
374,
85,
62,
15526,
62,
30001,
930,
2980,
515,
1895,
11241,
198,
220,
366,
0,
2488,
32741,
300,
66,
87,
62,
17,
13331,
62,
18439,
62,
47904,
930,
48191,
4054,
198,
220,
366,
0,
2488,
32741,
300,
66,
87,
62,
17,
13331,
62,
30001,
62,
5235,
62,
47904,
930,
29130,
5270,
4054,
198,
220,
337,
36252,
50,
8323,
5344,
198,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
5145,
452,
62,
6371,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4731,
198,
220,
220,
220,
220,
220,
5145,
452,
62,
29460,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4731,
198,
220,
220,
220,
220,
220,
5145,
452,
62,
28712,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4731,
198,
220,
220,
220,
220,
220,
5145,
452,
62,
17,
13331,
62,
30001,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4731,
198,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
26173,
8924,
7,
81,
85,
62,
15526,
62,
30001,
8,
41876,
4731,
198,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
17,
13331,
62,
18439,
62,
47904,
198,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
17,
13331,
62,
5235,
62,
47904,
198,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
17,
13331,
62,
9503,
62,
18224,
764,
198,
220,
366,
0,
6822,
611,
428,
16425,
1352,
4554,
6971,
262,
1577,
16099,
19016,
198,
220,
366,
0,
2488,
17143,
2357,
21628,
62,
6371,
930,
1432,
13264,
19016,
198,
220,
366,
0,
2488,
17143,
2357,
374,
85,
62,
15999,
930,
1148,
4855,
198,
220,
337,
36252,
50,
6971,
62,
6371,
198,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
5145,
452,
62,
6371,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4731,
198,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
26173,
8924,
7,
81,
85,
62,
15999,
8,
41876,
450,
499,
62,
30388,
764,
198,
220,
366,
0,
6822,
611,
734,
5766,
18239,
318,
2672,
198,
220,
366,
0,
2488,
17143,
2357,
21628,
62,
6371,
930,
1432,
13264,
19016,
198,
220,
366,
0,
2488,
17143,
2357,
21628,
62,
29460,
930,
50069,
198,
220,
366,
0,
2488,
17143,
2357,
21628,
62,
28712,
930,
30275,
198,
220,
366,
0,
2488,
17143,
2357,
374,
85,
62,
35827,
930,
362,
7708,
318,
2672,
198,
220,
337,
36252,
50,
318,
62,
17,
13331,
62,
35827,
198,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
5145,
452,
62,
6371,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4731,
198,
220,
220,
220,
220,
220,
5145,
452,
62,
29460,
220,
220,
220,
220,
220,
220,
41876,
4731,
198,
220,
220,
220,
220,
220,
5145,
452,
62,
28712,
220,
220,
220,
220,
220,
220,
41876,
4731,
198,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
26173,
8924,
7,
81,
85,
62,
35827,
8,
41876,
450,
499,
62,
30388,
198,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
17,
13331,
62,
9503,
62,
18224,
764,
198,
220,
366,
0,
23520,
477,
4271,
2727,
1895,
16326,
329,
450,
499,
38,
270,
198,
220,
366,
0,
2488,
17143,
2357,
21628,
62,
6371,
930,
1432,
13264,
19016,
198,
220,
366,
0,
2488,
17143,
2357,
21628,
62,
29460,
930,
50069,
198,
220,
366,
0,
2488,
17143,
2357,
21628,
62,
28712,
930,
30275,
198,
220,
366,
0,
2488,
17143,
2357,
21628,
62,
17,
13331,
62,
30001,
930,
4930,
5766,
11241,
198,
220,
366,
0,
2488,
32741,
300,
66,
87,
62,
17,
13331,
62,
30001,
62,
12381,
62,
47904,
930,
29130,
39948,
4054,
198,
220,
366,
0,
2488,
32741,
300,
66,
87,
62,
17,
13331,
62,
18439,
62,
47904,
930,
48191,
4054,
198,
220,
337,
36252,
50,
12233,
62,
15526,
62,
83,
482,
641,
198,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
5145,
452,
62
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1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OPIC type DATA
returning
value(RR_SELF) type ref to ZIF_MQBA_PRODUCER .
methods SET_PAYLOAD
importing
!IV_PAYLOAD type DATA
returning
value(RR_SELF) type ref to ZIF_MQBA_PRODUCER .
methods SET_CONSUMER_ID
importing
!IV_CONSUMER_ID type DATA
returning
value(RR_SELF) type ref to ZIF_MQBA_PRODUCER .
methods SET_EXTERNAL
returning
value(RR_SELF) type ref to ZIF_MQBA_PRODUCER .
methods PUBLISH
returning
value(RV_SUCCESS) type ABAP_BOOL .
methods GET_EXCEPTION
returning
value(RR_EXCEPTION) type ref to CX_ROOT .
methods GET_ERROR_TEXT
returning
value(RV_TEXT) type STRING .
methods IS_FAILED
returning
value(RV_FAILED) type ABAP_BOOL .
methods SET_FIELD
importing
!IV_NAME type DATA
!IV_VALUE type DATA
returning
value(RR_SELF) type ref to ZIF_MQBA_PRODUCER .
methods GET_MESSAGE
returning
value(RR_MSG) type ref to ZIF_MQBA_REQUEST .
methods SET_CONTEXT
importing
!IV_CONTEXT type DATA
returning
value(RR_SELF) type ref to ZIF_MQBA_PRODUCER .
endinterface.
| [
39994,
1168,
5064,
62,
49215,
4339,
62,
4805,
3727,
9598,
1137,
198,
220,
1171,
764,
628,
198,
220,
5050,
25823,
62,
35222,
2149,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
3824,
62,
35222,
2149,
2099,
42865,
198,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
1988,
7,
21095,
62,
50,
37738,
8,
2099,
1006,
284,
1168,
5064,
62,
49215,
4339,
62,
4805,
3727,
9598,
1137,
764,
198,
220,
5050,
25823,
62,
4537,
56,
35613,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
3824,
62,
4537,
56,
35613,
2099,
42865,
198,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
1988,
7,
21095,
62,
50,
37738,
8,
2099,
1006,
284,
1168,
5064,
62,
49215,
4339,
62,
4805,
3727,
9598,
1137,
764,
198,
220,
5050,
25823,
62,
10943,
50,
5883,
1137,
62,
2389,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
3824,
62,
10943,
50,
5883,
1137,
62,
2389,
2099,
42865,
198,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
1988,
7,
21095,
62,
50,
37738,
8,
2099,
1006,
284,
1168,
5064,
62,
49215,
4339,
62,
4805,
3727,
9598,
1137,
764,
198,
220,
5050,
25823,
62,
6369,
31800,
1847,
198,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
1988,
7,
21095,
62,
50,
37738,
8,
2099,
1006,
284,
1168,
5064,
62,
49215,
4339,
62,
4805,
3727,
9598,
1137,
764,
198,
220,
5050,
24676,
9148,
18422,
198,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
1988,
7,
49,
53,
62,
12564,
4093,
7597,
8,
2099,
9564,
2969,
62,
8202,
3535,
764,
198,
220,
5050,
17151,
62,
6369,
42006,
2849,
198,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
1988,
7,
21095,
62,
6369,
42006,
2849,
8,
2099,
1006,
284,
327,
55,
62,
13252,
2394,
764,
198,
220,
5050,
17151,
62,
24908,
62,
32541,
198,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
1988,
7,
49,
53,
62,
32541,
8,
2099,
19269,
2751,
764,
198,
220,
5050,
3180,
62,
7708,
4146,
1961,
198,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
1988,
7,
49,
53,
62,
7708,
4146,
1961,
8,
2099,
9564,
2969,
62,
8202,
3535,
764,
198,
220,
5050,
25823,
62,
44603,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
3824,
62,
20608,
2099,
42865,
198,
220,
220,
220,
220,
220,
5145,
3824,
62,
39488,
2099,
42865,
198,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
1988,
7,
21095,
62,
50,
37738,
8,
2099,
1006,
284,
1168,
5064,
62,
49215,
4339,
62,
4805,
3727,
9598,
1137,
764,
198,
220,
5050,
17151,
62,
44,
1546,
4090,
8264,
198,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
1988,
7,
21095,
62,
5653,
38,
8,
2099,
1006,
284,
1168,
5064,
62,
49215,
4339,
62,
2200,
35780,
764,
198,
220,
5050,
25823,
62,
10943,
32541,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
3824,
62,
10943,
32541,
2099,
42865,
198,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
1988,
7,
21095,
62,
50,
37738,
8,
2099,
1006,
284,
1168,
5064,
62,
49215,
4339,
62,
4805,
3727,
9598,
1137,
764,
198,
437,
39994,
13,
198
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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L
CREATE PUBLIC .
PUBLIC SECTION.
PROTECTED SECTION.
METHODS execute
REDEFINITION .
METHODS execute_tree
REDEFINITION .
PRIVATE SECTION.
DATA mr_act_param TYPE REF TO data .
DATA mr_act_param_phasing TYPE REF TO data .
DATA mr_act_param_tier_ltb TYPE REF TO data .
DATA mr_act_param_lt_amount TYPE REF TO data .
METHODS determine_lt_backup_datacenter
IMPORTING
!is_ctx TYPE /bobf/s_frw_ctx_det
!it_key TYPE /bobf/t_frw_key
!io_read TYPE REF TO /bobf/if_frw_read
!io_modify TYPE REF TO /bobf/if_frw_modify
EXPORTING
!eo_message TYPE REF TO /bobf/if_frw_message
!et_failed_key TYPE /bobf/t_frw_key .
METHODS determine_a_storage_datacenter
IMPORTING
!is_ctx TYPE /bobf/s_frw_ctx_det
!it_key TYPE /bobf/t_frw_key
!io_read TYPE REF TO /bobf/if_frw_read
!io_modify TYPE REF TO /bobf/if_frw_modify
EXPORTING
!eo_message TYPE REF TO /bobf/if_frw_message
!et_failed_key TYPE /bobf/t_frw_key .
METHODS determine_a_storage_dcenter_cr
IMPORTING
!is_ctx TYPE /bobf/s_frw_ctx_det
!it_key TYPE /bobf/t_frw_key
!io_read TYPE REF TO /bobf/if_frw_read
!io_modify TYPE REF TO /bobf/if_frw_modify
EXPORTING
!eo_message TYPE REF TO /bobf/if_frw_message
!et_failed_key TYPE /bobf/t_frw_key .
METHODS determine_a_storage_class
IMPORTING
!is_ctx TYPE /bobf/s_frw_ctx_det
!it_key TYPE /bobf/t_frw_key
!io_read TYPE REF TO /bobf/if_frw_read
!io_modify TYPE REF TO /bobf/if_frw_modify
EXPORTING
!eo_message TYPE REF TO /bobf/if_frw_message
!et_failed_key TYPE /bobf/t_frw_key .
METHODS determine_a_storage_amount
IMPORTING
!is_ctx TYPE /bobf/s_frw_ctx_det
!it_key TYPE /bobf/t_frw_key
!io_read TYPE REF TO /bobf/if_frw_read
!io_modify TYPE REF TO /bobf/if_frw_modify
EXPORTING
!eo_message TYPE REF TO /bobf/if_frw_message
!et_failed_key TYPE /bobf/t_frw_key .
METHODS determine_a_storage_amount_cr
IMPORTING
!is_ctx TYPE /bobf/s_frw_ctx_det
!it_key TYPE /bobf/t_frw_key
!io_read TYPE REF TO /bobf/if_frw_read
!io_modify TYPE REF TO /bobf/if_frw_modify
EXPORTING
!eo_message TYPE REF TO /bobf/if_frw_message
!et_failed_key TYPE /bobf/t_frw_key .
METHODS determine_a_storage_class_cr
IMPORTING
!is_ctx TYPE /bobf/s_frw_ctx_det
!it_key TYPE /bobf/t_frw_key
!io_read TYPE REF TO /bobf/if_frw_read
!io_modify TYPE REF TO /bobf/if_frw_modify
EXPORTING
!eo_message TYPE REF TO /bobf/if_frw_message
!et_failed_key TYPE /bobf/t_frw_key .
METHODS determine_lt_backup_datacen_cr
IMPORTING
!is_ctx TYPE /bobf/s_frw_ctx_det
!it_key TYPE /bobf/t_frw_key
!io_read TYPE REF TO /bobf/if_frw_read
!io_modify TYPE REF TO /bobf/if_frw_modify
EXPORTING
!eo_message TYPE REF TO /bobf/if_frw_message
!et_failed_key TYPE /bobf/t_frw_key .
METHODS determine_lt_backup_class
IMPORTING
!is_ctx TYPE /bobf/s_frw_ctx_det
!it_key TYPE /bobf/t_frw_key
!io_read TYPE REF TO /bobf/if_frw_read
!io_modify TYPE REF TO /bobf/if_frw_modify
EXPORTING
!eo_message TYPE REF TO /bobf/if_frw_message
!et_failed_key TYPE /bobf/t_frw_key .
METHODS determine_lt_backup_class_cr
IMPORTING
!is_ctx TYPE /bobf/s_frw_ctx_det
!it_key TYPE /bobf/t_frw_key
!io_read TYPE REF TO /bobf/if_frw_read
!io_modify TYPE REF TO /bobf/if_frw_modify
EXPORTING
!eo_message TYPE REF TO /bobf/if_frw_message
!et_failed_key TYPE /bobf/t_frw_key .
METHODS determine_lt_backup_amount
IMPORTING
!is_ctx TYPE /bobf/s_frw_ctx_det
!it_key TYPE /bobf/t_frw_key
!io_read TYPE REF TO /bobf/if_frw_read
!io_modify TYPE REF TO /bobf/if_frw_modify
EXPORTING
!eo_message TYPE REF TO /bobf/if_frw_message
!et_failed_key TYPE /bobf/t_frw_key .
METHODS determine_lt_backup_amount_cr
IMPORTING
!is_ctx TYPE /bobf/s_frw_ctx_det
!it_key TYPE /bobf/t_frw_key
!io_read TYPE REF TO /bobf/if_frw_read
!io_modify TYPE REF TO /bobf/if_frw_modify
EXPORTING
!eo_message TYPE REF TO /bobf/if_frw_message
!et_failed_key TYPE /bobf/t_frw_key .
METHODS determine_tier_lt_backup
IMPORTING
!is_ctx TYPE /bobf/s_frw_ctx_det
!it_key TYPE /bobf/t_frw_key
!io_read TYPE REF TO /bobf/if_frw_read
!io_modify TYPE REF TO /bobf/if_frw_modify
EXPORTING
!eo_message TYPE REF TO /bobf/if_frw_message
!et_failed_key TYPE /bobf/t_frw_key
RAISING
/bobf/cx_frw .
METHODS determine_tier_lt_backup_cr
IMPORTING
!is_ctx TYPE /bobf/s_frw_ctx_det
!it_key TYPE /bobf/t_frw_key
!io_read TYPE REF TO /bobf/if_frw_read
!io_modify TYPE REF TO /bobf/if_frw_modify
EXPORTING
!eo_message TYPE REF TO /bobf/if_frw_message
!et_failed_key TYPE /bobf/t_frw_key
RAISING
/bobf/cx_frw .
ENDCLASS.
CLASS /hec1/cl_config_det_a_services IMPLEMENTATION.
METHOD execute.
* CLEAR: eo_message,
* et_failed_key.
DATA(ls_root) = /hec1/cl_config_helper=>get_root_node( iv_node_key = is_ctx-node_key
it_key = it_key
io_read = io_read
io_modify = io_modify ).
TRY.
CASE is_ctx-det_key.
WHEN /hec1/if_configuration_c=>sc_determination-lt_backup_datacenter-create
OR /hec1/if_configuration_c=>sc_determination-lt_backup_datacenter-update.
* " **********************************
* " Determine LT Backup Datacenter
* " **********************************
CASE ls_root-hec_contract_status.
WHEN /hec1/if_config_constants=>gc_contract_status-initial.
" Initial Deal
me->determine_lt_backup_datacenter(
EXPORTING is_ctx = is_ctx " Context Information for Determinations
it_key = it_key " Key Table
io_read = io_read " Interface to Reading Data
io_modify = io_modify " Interface to Change Data
IMPORTING eo_message = eo_message " Message Object
et_failed_key = et_failed_key ). " Key Table
WHEN /hec1/if_config_constants=>gc_contract_status-change_request.
" Change Request
me->determine_lt_backup_datacen_cr(
EXPORTING is_ctx = is_ctx " Context Information for Determinations
it_key = it_key " Key Table
io_read = io_read " Interface to Reading Data
io_modify = io_modify " Interface to Change Data
IMPORTING eo_message = eo_message " Message Object
et_failed_key = et_failed_key ). " Key Table
ENDCASE. "ls_root-hec_contract_status.
WHEN /hec1/if_configuration_c=>sc_determination-lt_backup_class-create
OR /hec1/if_configuration_c=>sc_determination-lt_backup_class-update.
* " **********************************
* " Determine LT Backup Class
* " **********************************
CASE ls_root-hec_contract_status.
WHEN /hec1/if_config_constants=>gc_contract_status-initial.
" Initial Deal
me->determine_lt_backup_class(
EXPORTING is_ctx = is_ctx " Context Information for Determinations
it_key = it_key " Key Table
io_read = io_read " Interface to Reading Data
io_modify = io_modify " Interface to Change Data
IMPORTING eo_message = eo_message " Message Object
et_failed_key = et_failed_key ). " Key Table
WHEN /hec1/if_config_constants=>gc_contract_status-change_request.
" Change Request
me->determine_lt_backup_class_cr(
EXPORTING is_ctx = is_ctx " Context Information for Determinations
it_key = it_key " Key Table
io_read = io_read " Interface to Reading Data
io_modify = io_modify " Interface to Change Data
IMPORTING eo_message = eo_message " Message Object
et_failed_key = et_failed_key ). " Key Table
ENDCASE. "ls_root-hec_contract_status.
WHEN /hec1/if_configuration_c=>sc_determination-lt_backup_amount-create
OR /hec1/if_configuration_c=>sc_determination-lt_backup_amount-update.
* " **********************************
* " Determine LT Backup Quota
* " **********************************
CASE ls_root-hec_contract_status.
WHEN /hec1/if_config_constants=>gc_contract_status-initial.
" Initial Deal
me->determine_lt_backup_amount(
EXPORTING is_ctx = is_ctx " Context Information for Determinations
it_key = it_key " Key Table
io_read = io_read " Interface to Reading Data
io_modify = io_modify " Interface to Change Data
IMPORTING eo_message = eo_message " Message Object
et_failed_key = et_failed_key ). " Key Table
WHEN /hec1/if_config_constants=>gc_contract_status-change_request.
" Change Request
me->determine_lt_backup_amount_cr(
EXPORTING is_ctx = is_ctx " Context Information for Determinations
it_key = it_key " Key Table
io_read = io_read " Interface to Reading Data
io_modify = io_modify " Interface to Change Data
IMPORTING eo_message = eo_message " Message Object
et_failed_key = et_failed_key ). " Key Table
ENDCASE. "ls_root-hec_contract_status.
WHEN /hec1/if_configuration_c=>sc_determination-add_storage_datacenter-create
OR /hec1/if_configuration_c=>sc_determination-add_storage_datacenter-update.
" **********************************
" Determine Additional Storage Datacenter
" **********************************
CASE ls_root-hec_contract_status.
WHEN /hec1/if_config_constants=>gc_contract_status-initial.
" Initial Deal
me->determine_a_storage_datacenter(
EXPORTING is_ctx = is_ctx " Context Information for Determinations
it_key = it_key " Key Table
io_read = io_read " Interface to Reading Data
io_modify = io_modify " Interface to Change Data
IMPORTING eo_message = eo_message " Message Object
et_failed_key = et_failed_key ). " Key Table
WHEN /hec1/if_config_constants=>gc_contract_status-change_request.
" Change Request
me->determine_a_storage_dcenter_cr(
EXPORTING is_ctx = is_ctx " Context Information for Determinations
it_key = it_key " Key Table
io_read = io_read " Interface to Reading Data
io_modify = io_modify " Interface to Change Data
IMPORTING eo_message = eo_message " Message Object
et_failed_key = et_failed_key ). " Key Table
ENDCASE. "ls_root-hec_contract_status.
WHEN /hec1/if_configuration_c=>sc_determination-add_storage_class-create
OR /hec1/if_configuration_c=>sc_determination-add_storage_class-update.
" **********************************
" Determine Additional Storage Class
" **********************************
CASE ls_root-hec_contract_status.
WHEN /hec1/if_config_constants=>gc_contract_status-initial.
" Initial Deal
me->determine_a_storage_class(
EXPORTING is_ctx = is_ctx " Context Information for Determinations
it_key = it_key " Key Table
io_read = io_read " Interface to Reading Data
io_modify = io_modify " Interface to Change Data
IMPORTING eo_message = eo_message " Message Object
et_failed_key = et_failed_key ). " Key Table
WHEN /hec1/if_config_constants=>gc_contract_status-change_request.
" Change Request
me->determine_a_storage_class_cr(
EXPORTING is_ctx = is_ctx " Context Information for Determinations
it_key = it_key " Key Table
io_read = io_read " Interface to Reading Data
io_modify = io_modify " Interface to Change Data
IMPORTING eo_message = eo_message " Message Object
et_failed_key = et_failed_key ). " Key Table
ENDCASE. "ls_root-hec_contract_status.
WHEN /hec1/if_configuration_c=>sc_determination-add_storage_amount-create
OR /hec1/if_configuration_c=>sc_determination-add_storage_amount-update.
" **********************************
" Determine Additional Storage Amount
" **********************************
CASE ls_root-hec_contract_status.
WHEN /hec1/if_config_constants=>gc_contract_status-initial.
" Initial Deal
me->determine_a_storage_amount(
EXPORTING is_ctx = is_ctx " Context Information for Determinations
it_key = it_key " Key Table
io_read = io_read " Interface to Reading Data
io_modify = io_modify " Interface to Change Data
IMPORTING eo_message = eo_message " Message Object
et_failed_key = et_failed_key ). " Key Table
WHEN /hec1/if_config_constants=>gc_contract_status-change_request.
" Change Request
me->determine_a_storage_amount_cr(
EXPORTING is_ctx = is_ctx " Context Information for Determinations
it_key = it_key " Key Table
io_read = io_read " Interface to Reading Data
io_modify = io_modify " Interface to Change Data
IMPORTING eo_message = eo_message " Message Object
et_failed_key = et_failed_key ). " Key Table
ENDCASE. "ls_root-hec_contract_status.
WHEN /hec1/if_configuration_c=>sc_determination-tier_longterm_backup-create OR
/hec1/if_configuration_c=>sc_determination-tier_longterm_backup-update OR
/hec1/if_configuration_c=>sc_determination-tier_longterm_backup-update_after_tier.
* " **********************************
* " Determination tier lt_backup
* " **********************************
CASE ls_root-hec_contract_status.
WHEN /hec1/if_config_constants=>gc_contract_status-initial.
" Initial Deal
me->determine_tier_lt_backup( EXPORTING is_ctx = is_ctx " Context Information for Determinations
it_key = it_key " Key Table
io_read = io_read " Interface to Reading Data
io_modify = io_modify " Interface to Change Data
IMPORTING eo_message = eo_message " Message Object
et_failed_key = et_failed_key ). " Key Table
WHEN /hec1/if_config_constants=>gc_contract_status-change_request.
" Change Request
me->determine_tier_lt_backup_cr( EXPORTING is_ctx = is_ctx " Context Information for Determinations
it_key = it_key " Key Table
io_read = io_read " Interface to Reading Data
io_modify = io_modify " Interface to Change Data
IMPORTING eo_message = eo_message " Message Object
et_failed_key = et_failed_key ). " Key Table
ENDCASE. "ls_root-hec_contract_status.
ENDCASE.
CATCH /bobf/cx_frw. " Exception class
ENDTRY.
ENDMETHOD.
METHOD determine_lt_backup_datacenter.
DATA: lt_longterm_backup_dc TYPE /hec1/t_data_lt_backup_dc_ct,
lt_longterm_backup_dc_before TYPE /hec1/t_data_lt_backup_dc_ct,
lr_longterm_backup_dc TYPE REF TO /hec1/s_data_lt_backup_dc_cs,
lt_phase TYPE /hec1/t_data_phase_ct,
lt_act_param_phasing TYPE TABLE OF /hec1/s_act_phase_inherit.
CLEAR:
eo_message,
et_failed_key.
io_read->retrieve( EXPORTING iv_node = is_ctx-node_key
it_key = it_key
IMPORTING et_data = lt_longterm_backup_dc ).
/hec1/cl_config_helper=>get_general_data( EXPORTING iv_node_key = is_ctx-node_key
it_key = it_key
io_read = io_read
IMPORTING ev_root_key = DATA(lv_root_key)
er_landscape = DATA(lr_landscape)
er_delivery_unit = DATA(lr_dlvy_unit)
et_datacenter = DATA(lt_datacenter) ).
TRY.
CASE is_ctx-det_key.
" ***************************************************************************
" Create mode
" ***************************************************************************
WHEN /hec1/if_configuration_c=>sc_determination-lt_backup_datacenter-create.
LOOP AT lt_longterm_backup_dc REFERENCE INTO lr_longterm_backup_dc.
DATA(lv_inst_status) = COND /hec1/config_instance_status( WHEN lr_longterm_backup_dc->hec_ltb_datacenter_guid IS NOT INITIAL
THEN /hec1/if_config_constants=>gc_instance_status-complete
ELSE /hec1/if_config_constants=>gc_instance_status-incomplete ).
lr_longterm_backup_dc->hec_delete_visible = abap_true.
" Check instance status and switch
IF ( lv_inst_status <> lr_longterm_backup_dc->hec_instance_status ).
lr_longterm_backup_dc->hec_instance_status = lv_inst_status.
DATA(lv_data_changed) = abap_true.
ENDIF.
IF ( lv_data_changed = abap_true ).
io_modify->update( iv_node = is_ctx-node_key
iv_key = lr_longterm_backup_dc->key
is_data = lr_longterm_backup_dc ).
ENDIF.
CLEAR: lv_inst_status,
lv_data_changed.
ENDLOOP.
* " ***************************************************************************
* " update mode
* " ***************************************************************************
WHEN /hec1/if_configuration_c=>sc_determination-lt_backup_datacenter-update.
io_read->retrieve( EXPORTING iv_node = is_ctx-node_key
it_key = it_key
iv_before_image = abap_true
IMPORTING et_data = lt_longterm_backup_dc_before ).
io_read->retrieve_by_association( EXPORTING iv_node = /hec1/if_configuration_c=>sc_node-root
it_key = VALUE #( ( key = lv_root_key ) )
iv_fill_data = abap_true
iv_association = /hec1/if_configuration_c=>sc_association-root-phase
IMPORTING et_data = lt_phase ).
LOOP AT lt_longterm_backup_dc REFERENCE INTO lr_longterm_backup_dc.
ASSIGN lt_longterm_backup_dc_before[ key = lr_longterm_backup_dc->key ] TO FIELD-SYMBOL(<fs_longterm_backup_dc_before>).
IF ( <fs_longterm_backup_dc_before> IS ASSIGNED ).
* " if the infrastructure provider is set and there is datacenter assigned
IF ( lr_dlvy_unit->hec_inf_provider_guid IS NOT INITIAL ).
DATA(ls_datacenter) = VALUE #( lt_datacenter[ hec_node_datacenter = lr_longterm_backup_dc->hec_ltb_datacenter_guid ] OPTIONAL ).
lr_longterm_backup_dc->* = VALUE #( BASE lr_longterm_backup_dc->*
hec_ltb_datacenter_guid = ls_datacenter-hec_node_datacenter
hec_ltb_datacenter_descr = COND #( WHEN ls_datacenter-hec_datacenter_descr IS NOT INITIAL
THEN ls_datacenter-hec_datacenter_descr
ELSE space )
hec_tree_descr = COND #( WHEN ls_datacenter-hec_datacenter_guid IS NOT INITIAL
THEN |{ ls_datacenter-hec_datacenter_descr }|
ELSE |<new datacenter>| )
).
lv_data_changed = abap_true.
ENDIF.
"-----------------------------------
" Phasing has changed
"-----------------------------------
IF ( lr_longterm_backup_dc->hec_phase_guid NE <fs_longterm_backup_dc_before>-hec_phase_guid ).
APPEND VALUE #( hec_node_key = is_ctx-node_key
hec_bopf_key = lr_longterm_backup_dc->key
hec_phase_guid_new = lr_longterm_backup_dc->hec_phase_guid
hec_phase_guid_old = <fs_longterm_backup_dc_before>-hec_phase_guid ) TO lt_act_param_phasing.
lr_longterm_backup_dc->hec_phase_changed = abap_true.
lv_data_changed = abap_true.
ENDIF. "Phase changed
" Reset Datacenter
IF ( <fs_longterm_backup_dc_before>-hec_ltb_datacenter_guid IS NOT INITIAL ) AND ( lr_longterm_backup_dc->hec_ltb_datacenter_guid IS INITIAL ).
CLEAR: lr_longterm_backup_dc->hec_ltb_datacenter_descr.
lv_data_changed = abap_true.
ENDIF.
" Set Datacenter Descr / Tree Descr
IF ( <fs_longterm_backup_dc_before>-hec_ltb_datacenter_descr NE lr_longterm_backup_dc->hec_ltb_datacenter_descr ).
lr_longterm_backup_dc->hec_tree_descr = COND #( WHEN lr_longterm_backup_dc->hec_ltb_datacenter_descr IS INITIAL
THEN ||
ELSE |{ lr_longterm_backup_dc->hec_ltb_datacenter_descr }| ).
lv_data_changed = abap_true.
ENDIF.
ENDIF.
"-----------------------------------
" Check instance status and switch
"-----------------------------------
lv_inst_status = COND /hec1/config_instance_status( WHEN lr_longterm_backup_dc->hec_ltb_datacenter_guid IS NOT INITIAL
THEN /hec1/if_config_constants=>gc_instance_status-complete
ELSE /hec1/if_config_constants=>gc_instance_status-incomplete ).
lr_longterm_backup_dc->hec_delete_visible = abap_true.
IF ( lv_inst_status <> lr_longterm_backup_dc->hec_instance_status ).
lr_longterm_backup_dc->hec_instance_status = lv_inst_status.
lv_data_changed = abap_true.
ENDIF.
IF ( lv_data_changed = abap_true ).
io_modify->update( iv_node = is_ctx-node_key
iv_key = lr_longterm_backup_dc->key
is_data = lr_longterm_backup_dc ).
ENDIF.
CLEAR: lv_inst_status,
lv_data_changed.
UNASSIGN <fs_longterm_backup_dc_before>.
ENDLOOP. "LOOP AT lt_add_service REFERENCE INTO lr_add_service.
"-----------------------------------
" Update Phasing
"-----------------------------------
IF ( lt_act_param_phasing IS NOT INITIAL ).
me->mr_act_param_phasing = NEW /hec1/t_act_phase_inherit( lt_act_param_phasing ).
/hec1/cl_config_det_general=>/hec1/if_config_det_general~set_act_node_keys(
is_ctx = CORRESPONDING #( is_ctx )
it_key = it_key
iv_action = /hec1/cl_config_det_general=>/hec1/if_config_det_general~get_act_key( /hec1/if_config_constant=>gc_act_method-inherit_phase_assignment )
iv_act_exectime = /bobf/if_conf_c=>sc_time_after_validation
ir_act_param = me->mr_act_param_phasing ).
ENDIF.
ENDCASE.
CATCH /bobf/cx_frw. " Exception class
ENDTRY.
ENDMETHOD.
METHOD determine_lt_backup_class.
DATA: lt_longterm_backup_class TYPE /hec1/t_data_lt_backup_cl_ct,
lt_longterm_backup_cl_before TYPE /hec1/t_data_lt_backup_cl_ct,
lr_longterm_backup_cl TYPE REF TO /hec1/s_data_lt_backup_cl_cs,
lt_phase TYPE /hec1/t_data_phase_ct,
ls_act_param_tier_ltb TYPE /hec1/s_act_update_tier_ltb.
CLEAR:
eo_message,
et_failed_key.
io_read->retrieve( EXPORTING iv_node = is_ctx-node_key
it_key = it_key
IMPORTING et_data = lt_longterm_backup_class ).
/hec1/cl_config_helper=>get_general_data( EXPORTING iv_node_key = is_ctx-node_key
it_key = it_key
io_read = io_read
IMPORTING ev_root_key = DATA(lv_root_key)
er_landscape = DATA(lr_landscape)
er_delivery_unit = DATA(lr_dlvy_unit)
et_datacenter = DATA(lt_datacenter) ).
TRY.
CASE is_ctx-det_key.
" ***************************************************************************
" Create mode
" ***************************************************************************
WHEN /hec1/if_configuration_c=>sc_determination-lt_backup_class-create.
LOOP AT lt_longterm_backup_class REFERENCE INTO lr_longterm_backup_cl.
DATA(lv_inst_status) = COND /hec1/config_instance_status( WHEN lr_longterm_backup_cl->hec_ltb_class_guid IS NOT INITIAL AND
lr_longterm_backup_cl->hec_ltb_datacenter_guid IS NOT INITIAL
* lr_longterm_backup_cl->hec_phase_guid IS NOT INITIAL
THEN /hec1/if_config_constants=>gc_instance_status-complete
ELSE /hec1/if_config_constants=>gc_instance_status-incomplete ).
lr_longterm_backup_cl->hec_delete_visible = abap_true.
" Check instance status and switch
IF ( lv_inst_status <> lr_longterm_backup_cl->hec_instance_status ).
lr_longterm_backup_cl->hec_instance_status = lv_inst_status.
DATA(lv_data_changed) = abap_true.
ENDIF.
IF ( lv_data_changed = abap_true ).
io_modify->update( iv_node = is_ctx-node_key
iv_key = lr_longterm_backup_cl->key
is_data = lr_longterm_backup_cl ).
ENDIF.
CLEAR: lv_inst_status,
lv_data_changed.
ENDLOOP.
* " ***************************************************************************
* " update mode
* " ***************************************************************************
WHEN /hec1/if_configuration_c=>sc_determination-lt_backup_class-update.
CLEAR: ls_act_param_tier_ltb.
io_read->retrieve( EXPORTING iv_node = is_ctx-node_key
it_key = it_key
iv_before_image = abap_true
IMPORTING et_data = lt_longterm_backup_cl_before ).
io_read->retrieve_by_association( EXPORTING iv_node = /hec1/if_configuration_c=>sc_node-root
it_key = VALUE #( ( key = lv_root_key ) )
iv_fill_data = abap_true
iv_association = /hec1/if_configuration_c=>sc_association-root-phase
IMPORTING et_data = lt_phase ).
LOOP AT lt_longterm_backup_class REFERENCE INTO lr_longterm_backup_cl.
ASSIGN lt_longterm_backup_cl_before[ key = lr_longterm_backup_cl->key ] TO FIELD-SYMBOL(<fs_longterm_backup_before>).
IF ( <fs_longterm_backup_before> IS ASSIGNED ).
"-----------------------------------
" Longterm backup GUID has changed
"-----------------------------------
" Get service class data
SELECT SINGLE hec_longt_backup_class_descr INTO @DATA(lv_longterm_description)
FROM /hec1/i_longtermbackupbasic
WHERE hec_apm_guid = @lr_landscape->hec_apm_guid
AND hec_longt_backup_class_guid = @lr_longterm_backup_cl->hec_ltb_class_guid.
IF ( sy-subrc = 0 ).
lr_longterm_backup_cl->* = VALUE #( BASE lr_longterm_backup_cl->*
hec_ltb_class_descr = lv_longterm_description
).
"Set longterm backup description in case it is empty
IF ( lr_longterm_backup_cl->hec_ltb_class_guid IS NOT INITIAL ) AND
( lr_longterm_backup_cl->hec_ltb_class_descr IS NOT INITIAL ) AND
( lr_longterm_backup_cl->hec_ltb_class_descr_ext IS INITIAL ).
lr_longterm_backup_cl->hec_ltb_class_descr_ext = lr_longterm_backup_cl->hec_ltb_class_descr.
ENDIF.
lv_data_changed = abap_true.
ENDIF.
"-----------------------------------
" Resets -> TODO move to actions
"-----------------------------------
" Reset Service Description
IF ( lr_longterm_backup_cl->hec_ltb_class_guid IS INITIAL ).
IF ( lr_longterm_backup_cl->hec_ltb_class_descr = lr_longterm_backup_cl->hec_ltb_class_descr_ext ).
CLEAR: lr_longterm_backup_cl->hec_ltb_class_descr_ext.
ENDIF.
CLEAR: lr_longterm_backup_cl->hec_ltb_class_descr.
lv_data_changed = abap_true.
ENDIF.
IF ( <fs_longterm_backup_before>-hec_ltb_class_descr_ext <> lr_longterm_backup_cl->hec_ltb_class_descr_ext ).
lr_longterm_backup_cl->hec_tree_descr = COND #( WHEN lr_longterm_backup_cl->hec_ltb_class_descr IS NOT INITIAL
THEN |{ lr_longterm_backup_cl->hec_ltb_class_descr } : { lr_longterm_backup_cl->hec_ltb_class_descr_ext }|
ELSE |{ lr_longterm_backup_cl->hec_ltb_class_descr_ext }| ).
lv_data_changed = abap_true.
ENDIF.
IF ( <fs_longterm_backup_before>-hec_ltb_class_descr <> lr_longterm_backup_cl->hec_ltb_class_descr ).
lr_longterm_backup_cl->hec_tree_descr = COND #( WHEN lr_longterm_backup_cl->hec_ltb_class_descr IS NOT INITIAL
THEN |{ lr_longterm_backup_cl->hec_ltb_class_descr } : { lr_longterm_backup_cl->hec_ltb_class_descr_ext }|
ELSE |{ lr_longterm_backup_cl->hec_ltb_class_descr_ext }| ).
lv_data_changed = abap_true.
ENDIF.
"-----------------------------------
" Check instance status and switch
"-----------------------------------
lv_inst_status = COND /hec1/config_instance_status( WHEN lr_longterm_backup_cl->hec_ltb_class_guid IS NOT INITIAL AND
lr_longterm_backup_cl->hec_ltb_datacenter_guid IS NOT INITIAL
THEN /hec1/if_config_constants=>gc_instance_status-complete
ELSE /hec1/if_config_constants=>gc_instance_status-incomplete ).
lr_longterm_backup_cl->hec_delete_visible = abap_true.
IF ( lv_inst_status <> lr_longterm_backup_cl->hec_instance_status ).
lr_longterm_backup_cl->hec_instance_status = lv_inst_status.
lv_data_changed = abap_true.
ENDIF.
" check, if assigned tier_lt_backup nodes must be updated
IF ( lr_longterm_backup_cl->hec_ltb_class_guid <> <fs_longterm_backup_before>-hec_ltb_class_guid )
OR ( lr_longterm_backup_cl->hec_ltb_class_descr_ext <> <fs_longterm_backup_before>-hec_ltb_class_descr_ext ).
ls_act_param_tier_ltb = CORRESPONDING /hec1/s_act_update_tier_ltb( lr_longterm_backup_cl->* ).
ENDIF.
""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Update TIER_LT_BACKUP
""""""""""""""""""""""""""""""""""""""""""""""""""""""
IF ( ls_act_param_tier_ltb IS NOT INITIAL ).
me->mr_act_param_tier_ltb = NEW /hec1/s_act_update_tier_ltb( ls_act_param_tier_ltb ).
/hec1/cl_config_det_general=>/hec1/if_config_det_general~set_act_node_keys(
is_ctx = CORRESPONDING #( is_ctx )
it_key = it_key
iv_action = /hec1/cl_config_det_general=>/hec1/if_config_det_general~get_act_key( /hec1/if_config_constant=>gc_act_method-update_tier_lt_backup )
iv_act_exectime = /bobf/if_conf_c=>sc_time_after_validation
ir_act_param = me->mr_act_param_tier_ltb ).
ENDIF.
IF ( lv_data_changed = abap_true ).
io_modify->update( iv_node = is_ctx-node_key
iv_key = lr_longterm_backup_cl->key
is_data = lr_longterm_backup_cl ).
ENDIF.
CLEAR: lv_inst_status,
lv_data_changed.
ENDIF.
UNASSIGN <fs_longterm_backup_before>.
ENDLOOP. "LOOP AT lt_add_service REFERENCE INTO lr_add_service.
"-----------------------------------
" Update Phasing
"-----------------------------------
* IF ( lt_act_param_phasing IS NOT INITIAL ).
* me->mr_act_param_phasing = NEW /hec1/t_act_phase_inherit( lt_act_param_phasing ).
*
* /hec1/cl_config_det_general=>/hec1/if_config_det_general~set_act_node_keys(
* is_ctx = CORRESPONDING #( is_ctx )
* it_key = it_key
* iv_action = /hec1/cl_config_det_general=>/hec1/if_config_det_general~get_act_key( /hec1/if_config_constant=>gc_act_method-inherit_phase_assignment )
* iv_act_exectime = /bobf/if_conf_c=>sc_time_after_validation
* ir_act_param = me->mr_act_param_phasing ).
* ENDIF.
*
ENDCASE.
CATCH /bobf/cx_frw. " Exception class
ENDTRY.
ENDMETHOD.
METHOD determine_lt_backup_amount.
DATA: lt_longterm_backup_amount TYPE /hec1/t_lt_backup_amount_ct,
lt_longterm_backup_bef_amount TYPE /hec1/t_lt_backup_amount_ct,
lr_longterm_backup_amount TYPE REF TO /hec1/s_lt_backup_amount_cs,
lt_phase TYPE /hec1/t_data_phase_ct,
lt_act_param_phasing TYPE TABLE OF /hec1/s_act_phase_inherit.
CLEAR:
eo_message,
et_failed_key.
io_read->retrieve( EXPORTING iv_node = is_ctx-node_key
it_key = it_key
IMPORTING et_data = lt_longterm_backup_amount ).
/hec1/cl_config_helper=>get_general_data( EXPORTING iv_node_key = is_ctx-node_key
it_key = it_key
io_read = io_read
IMPORTING ev_root_key = DATA(lv_root_key)
er_landscape = DATA(lr_landscape)
er_delivery_unit = DATA(lr_dlvy_unit)
et_datacenter = DATA(lt_datacenter) ).
TRY.
CASE is_ctx-det_key.
" ***************************************************************************
" Create mode
" ***************************************************************************
WHEN /hec1/if_configuration_c=>sc_determination-lt_backup_amount-create.
LOOP AT lt_longterm_backup_amount REFERENCE INTO lr_longterm_backup_amount.
DATA(lv_inst_status) = COND /hec1/config_instance_status( WHEN lr_longterm_backup_amount->hec_ltb_class_guid IS NOT INITIAL AND
lr_longterm_backup_amount->hec_ltb_datacenter_guid IS NOT INITIAL AND
lr_longterm_backup_amount->hec_phase_guid IS NOT INITIAL
THEN /hec1/if_config_constants=>gc_instance_status-complete
ELSE /hec1/if_config_constants=>gc_instance_status-incomplete ).
lr_longterm_backup_amount->hec_delete_visible = abap_true.
" Check instance status and switch
IF ( lv_inst_status <> lr_longterm_backup_amount->hec_instance_status ).
lr_longterm_backup_amount->hec_instance_status = lv_inst_status.
DATA(lv_data_changed) = abap_true.
ENDIF.
IF ( lv_data_changed = abap_true ).
io_modify->update( iv_node = is_ctx-node_key
iv_key = lr_longterm_backup_amount->key
is_data = lr_longterm_backup_amount ).
ENDIF.
CLEAR: lv_inst_status,
lv_data_changed.
ENDLOOP.
* " ***************************************************************************
* " update mode
* " ***************************************************************************
WHEN /hec1/if_configuration_c=>sc_determination-lt_backup_amount-update.
io_read->retrieve( EXPORTING iv_node = is_ctx-node_key
it_key = it_key
iv_before_image = abap_true
IMPORTING et_data = lt_longterm_backup_bef_amount ).
io_read->retrieve_by_association( EXPORTING iv_node = /hec1/if_configuration_c=>sc_node-root
it_key = VALUE #( ( key = lv_root_key ) )
iv_fill_data = abap_true
iv_association = /hec1/if_configuration_c=>sc_association-root-phase
IMPORTING et_data = lt_phase ).
LOOP AT lt_longterm_backup_amount REFERENCE INTO lr_longterm_backup_amount.
ASSIGN lt_longterm_backup_bef_amount[ key = lr_longterm_backup_amount->key ] TO FIELD-SYMBOL(<fs_longterm_backup_befor>).
IF ( <fs_longterm_backup_befor> IS ASSIGNED ).
TRY.
" if the infrastructure provider is set and there is datacenter assigned
" get the pricing
IF ( lr_dlvy_unit->hec_inf_provider_guid IS NOT INITIAL ) AND ( lr_longterm_backup_amount->hec_ltb_datacenter_guid IS NOT INITIAL ).
DATA(ls_datacenter) = VALUE #( lt_datacenter[ hec_node_datacenter = lr_longterm_backup_amount->hec_ltb_datacenter_guid ] OPTIONAL ).
SELECT SINGLE hec_cb_pricing_lb_guid INTO @DATA(lv_ltb_legoblock)
FROM /hec1/a_back_lb
WHERE hec_apm_guid = @lr_longterm_backup_amount->hec_apm_guid
AND hec_infra_provider_guid = @lr_dlvy_unit->hec_inf_provider_guid
AND hec_sec_datacenter_guid = @ls_datacenter-hec_datacenter_guid
AND hec_backup_class_guid = @lr_longterm_backup_amount->hec_ltb_class_guid.
" Get pricing
SELECT SINGLE * INTO @DATA(ls_pricing) "#EC CI_ALL_FIELDS_NEEDED
FROM /hec1/c_cbp_lb
WHERE hec_price_lb = @lv_ltb_legoblock.
IF ( sy-subrc = 0 ).
DATA(lv_exchange_rate) = lr_longterm_backup_amount->hec_exchange_rate. "Temp field because the ls_pricing structure overwrites the real exchange_rate
lr_longterm_backup_amount->* = VALUE #( BASE lr_longterm_backup_amount->*
hec_tree_descr = COND #( WHEN lr_longterm_backup_amount->hec_phase_guid IS INITIAL
THEN |{ VALUE #( lt_phase[ hec_node_phase = lr_longterm_backup_amount->hec_phase_guid ]-hec_phase_descr OPTIONAL ) } : { lr_longterm_backup_amount->hec_ltb_amount }|
ELSE |{ lr_longterm_backup_amount->hec_ltb_amount }| )
hec_month_price_fee = lr_longterm_backup_amount->hec_ltb_amount * ls_pricing-hec_month_price_eur
* price = CORRESPONDING #( ls_pricing )
price = CORRESPONDING #( BASE ( lr_longterm_backup_amount->price ) ls_pricing )
hec_exchange_rate = lv_exchange_rate
).
lv_data_changed = abap_true.
ENDIF.
lv_data_changed = abap_true.
ENDIF. " IF lv_infra_provider IS NOT INITIAL.
CATCH cx_sy_itab_line_not_found.
ENDTRY.
"-----------------------------------
" Phasing has changed
"-----------------------------------
IF ( lr_longterm_backup_amount->hec_phase_guid NE <fs_longterm_backup_befor>-hec_phase_guid ).
APPEND VALUE #( hec_node_key = is_ctx-node_key
hec_bopf_key = lr_longterm_backup_amount->key
hec_phase_guid_new = lr_longterm_backup_amount->hec_phase_guid
hec_phase_guid_old = <fs_longterm_backup_befor>-hec_phase_guid ) TO lt_act_param_phasing.
lr_longterm_backup_amount->hec_phase_changed = abap_true.
lv_data_changed = abap_true.
ENDIF. "Phase changed
ENDIF. "<fs_longterm_backup_befor> is assigned
"-----------------------------------
" Check instance status and switch
"-----------------------------------
lv_inst_status = COND /hec1/config_instance_status( WHEN lr_longterm_backup_amount->hec_ltb_class_guid IS NOT INITIAL AND
lr_longterm_backup_amount->hec_ltb_datacenter_guid IS NOT INITIAL AND
lr_longterm_backup_amount->hec_phase_guid IS NOT INITIAL
THEN /hec1/if_config_constants=>gc_instance_status-complete
ELSE /hec1/if_config_constants=>gc_instance_status-incomplete ).
lr_longterm_backup_amount->hec_delete_visible = abap_true.
IF ( lv_inst_status <> lr_longterm_backup_amount->hec_instance_status ).
lr_longterm_backup_amount->hec_instance_status = lv_inst_status.
lv_data_changed = abap_true.
ENDIF.
IF ( lv_data_changed = abap_true ).
io_modify->update( iv_node = is_ctx-node_key
iv_key = lr_longterm_backup_amount->key
is_data = lr_longterm_backup_amount ).
ENDIF.
CLEAR: lv_inst_status,
lv_data_changed.
UNASSIGN <fs_longterm_backup_befor>.
ENDLOOP. "LOOP AT lt_add_service REFERENCE INTO lr_add_service.
"-----------------------------------
" Update Phasing
"-----------------------------------
IF ( lt_act_param_phasing IS NOT INITIAL ).
me->mr_act_param_phasing = NEW /hec1/t_act_phase_inherit( lt_act_param_phasing ).
/hec1/cl_config_det_general=>/hec1/if_config_det_general~set_act_node_keys(
is_ctx = CORRESPONDING #( is_ctx )
it_key = it_key
iv_action = /hec1/cl_config_det_general=>/hec1/if_config_det_general~get_act_key( /hec1/if_config_constant=>gc_act_method-inherit_phase_assignment )
iv_act_exectime = /bobf/if_conf_c=>sc_time_after_validation
ir_act_param = me->mr_act_param_phasing ).
ENDIF.
*
ENDCASE.
*
CATCH /bobf/cx_frw. " Exception class
ENDTRY.
ENDMETHOD.
METHOD determine_tier_lt_backup.
DATA: lt_tier_lt_backup TYPE /hec1/t_data_tier_lt_backup_ct,
lt_tier_lt_backup_before TYPE /hec1/t_data_tier_lt_backup_ct,
lt_tier TYPE /hec1/t_data_tier_ct,
lt_root_key TYPE /bobf/t_frw_key,
lt_landscape_key TYPE /bobf/t_frw_key,
lt_longt_backup_cl TYPE /hec1/t_data_lt_backup_cl_ct,
lt_phase TYPE /hec1/t_data_phase_ct,
lt_act_param_phasing TYPE TABLE OF /hec1/s_act_phase_inherit.
CLEAR: eo_message,
et_failed_key.
io_read->retrieve( EXPORTING iv_node = is_ctx-node_key
it_key = it_key
IMPORTING et_data = lt_tier_lt_backup ).
/hec1/cl_config_helper=>get_general_data( EXPORTING iv_node_key = is_ctx-node_key
it_key = it_key
io_read = io_read
IMPORTING ev_root_key = DATA(lv_root_key)
er_landscape = DATA(lr_landscape)
er_delivery_unit = DATA(lr_delivery_unit) ).
TRY.
CASE is_ctx-det_key.
" ***************************************************************************
" Create mode
" ***************************************************************************
WHEN /hec1/if_configuration_c=>sc_determination-tier_longterm_backup-create.
" Get tier node (parent)
io_read->retrieve_by_association( EXPORTING iv_node = is_ctx-node_key
it_key = it_key
iv_fill_data = abap_true
iv_association = /hec1/if_configuration_c=>sc_association-tier_longterm_backup-to_parent
IMPORTING et_data = lt_tier ).
LOOP AT lt_tier_lt_backup REFERENCE INTO DATA(lr_tier_lt_backup).
ASSIGN lt_tier[ key = lr_tier_lt_backup->parent_key ] TO FIELD-SYMBOL(<fs_tier>).
lr_tier_lt_backup->hec_delete_visible = abap_true.
IF ( <fs_tier> IS ASSIGNED ) AND
( <fs_tier>-hec_tier_descr IS NOT INITIAL ) AND
( <fs_tier>-hec_tier_type_value IS NOT INITIAL ) AND
( <fs_tier>-hec_tier_impl_type_value IS NOT INITIAL ).
DATA(lv_release) = abap_true.
ENDIF.
"-----------------------------------
" Release instance for selection
"-----------------------------------
IF ( lv_release <> lr_tier_lt_backup->hec_row_selectable ).
lr_tier_lt_backup->hec_row_selectable = lv_release.
DATA(lv_data_changed) = abap_true.
ENDIF.
IF ( lv_data_changed = abap_true ).
io_modify->update( iv_node = is_ctx-node_key
iv_key = lr_tier_lt_backup->key
is_data = lr_tier_lt_backup ).
ENDIF.
UNASSIGN <fs_tier>.
CLEAR: lv_data_changed,
lv_release.
ENDLOOP.
" ***************************************************************************
" Update mode
" ***************************************************************************
WHEN /hec1/if_configuration_c=>sc_determination-tier_longterm_backup-update.
" Data before update
io_read->retrieve( EXPORTING iv_node = is_ctx-node_key
it_key = it_key
iv_before_image = abap_true
IMPORTING et_data = lt_tier_lt_backup_before ).
" ROOT -> PHASE
io_read->retrieve_by_association( EXPORTING iv_node = /hec1/if_configuration_c=>sc_node-root
it_key = VALUE #( ( key = lv_root_key ) )
iv_fill_data = abap_true
iv_association = /hec1/if_configuration_c=>sc_association-root-phase
IMPORTING et_data = lt_phase ).
LOOP AT lt_tier_lt_backup REFERENCE INTO lr_tier_lt_backup.
ASSIGN lt_tier_lt_backup_before[ key = lr_tier_lt_backup->key ] TO FIELD-SYMBOL(<fs_lt_backup_before>).
IF ( <fs_lt_backup_before> IS ASSIGNED ).
"-----------------------------------
" Service Class GUID has changed ?
"-----------------------------------
IF ( lr_tier_lt_backup->hec_tlt_backup_cl_node_ref IS NOT INITIAL ) AND
( ( lr_tier_lt_backup->hec_tlt_backup_cl_node_ref <> <fs_lt_backup_before>-hec_tlt_backup_cl_node_ref ) ).
" Get service class data from corresponding longterm backup pool
IF ( lt_root_key IS INITIAL ).
APPEND VALUE #( key = lr_tier_lt_backup->root_key ) TO lt_root_key.
" Get longterm backup datacenter
io_read->retrieve_by_association( EXPORTING iv_node = /hec1/if_configuration_c=>sc_node-root
it_key = lt_root_key
iv_association = /hec1/if_configuration_c=>sc_association-root-lt_backup_datacenter
IMPORTING et_target_key = DATA(lt_longt_backup_dc_key) ).
" Get longterm backup class
io_read->retrieve_by_association( EXPORTING iv_node = /hec1/if_configuration_c=>sc_node-lt_backup_datacenter
it_key = lt_longt_backup_dc_key
iv_fill_data = abap_true
iv_association = /hec1/if_configuration_c=>sc_association-lt_backup_datacenter-lt_backup_class
IMPORTING et_data = lt_longt_backup_cl ).
ENDIF.
" select assigned class node
ASSIGN lt_longt_backup_cl[ hec_node_lt_backup_class = lr_tier_lt_backup->hec_tlt_backup_cl_node_ref ] TO FIELD-SYMBOL(<fs_longterm_backup_cl>).
IF ( <fs_longterm_backup_cl> IS ASSIGNED ).
lr_tier_lt_backup->* = VALUE #( BASE lr_tier_lt_backup->*
hec_tlt_backup_ref_descr = <fs_longterm_backup_cl>-hec_ltb_class_descr
hec_tlt_backup_ref_descr_ext = <fs_longterm_backup_cl>-hec_ltb_class_descr_ext
hec_tree_descr = |{ <fs_longterm_backup_cl>-hec_ltb_class_descr } : { lr_tier_lt_backup->hec_tlt_backup_ref_descr_ext }| ).
lv_data_changed = abap_true.
ENDIF.
ENDIF.
" Reset Service Description
IF ( lr_tier_lt_backup->hec_tlt_backup_cl_node_ref IS INITIAL ).
CLEAR: lr_tier_lt_backup->hec_tlt_backup_ref_descr_ext.
CLEAR: lr_tier_lt_backup->hec_tlt_backup_ref_descr.
lv_data_changed = abap_true.
ENDIF.
IF ( <fs_lt_backup_before>-hec_tlt_backup_ref_descr_ext <> lr_tier_lt_backup->hec_tlt_backup_ref_descr_ext ).
lr_tier_lt_backup->hec_tree_descr = COND #( WHEN lr_tier_lt_backup->hec_tlt_backup_ref_descr IS NOT INITIAL
THEN |{ lr_tier_lt_backup->hec_tlt_backup_ref_descr } : { lr_tier_lt_backup->hec_tlt_backup_ref_descr_ext }|
ELSE |{ lr_tier_lt_backup->hec_tlt_backup_ref_descr_ext }| ).
lv_data_changed = abap_true.
ENDIF.
IF ( <fs_lt_backup_before>-hec_tlt_backup_ref_descr <> lr_tier_lt_backup->hec_tlt_backup_ref_descr ).
lr_tier_lt_backup->hec_tree_descr = COND #( WHEN lr_tier_lt_backup->hec_tlt_backup_ref_descr IS NOT INITIAL
THEN |{ lr_tier_lt_backup->hec_tlt_backup_ref_descr } : { lr_tier_lt_backup->hec_tlt_backup_ref_descr_ext }|
ELSE |{ lr_tier_lt_backup->hec_tlt_backup_ref_descr_ext }| ).
lv_data_changed = abap_true.
ENDIF.
"-----------------------------------
" Phasing has changed
"-----------------------------------
IF ( lr_tier_lt_backup->hec_phase_guid NE <fs_lt_backup_before>-hec_phase_guid ).
APPEND VALUE #( hec_node_key = is_ctx-node_key
hec_bopf_key = lr_tier_lt_backup->key
hec_phase_guid_new = lr_tier_lt_backup->hec_phase_guid
hec_phase_guid_old = <fs_lt_backup_before>-hec_phase_guid ) TO lt_act_param_phasing.
lr_tier_lt_backup->hec_phase_changed = abap_true.
lv_data_changed = abap_true.
ENDIF. "phasing changed
ENDIF. " IF <fs_lt_backup_before> IS ASSIGNED.
"-----------------------------------
" Release instance for selection
"-----------------------------------
DATA(lv_inst_status) = COND /hec1/config_instance_status( WHEN lr_tier_lt_backup->hec_tlt_backup_cl_node_ref IS NOT INITIAL AND
lr_tier_lt_backup->hec_phase_guid IS NOT INITIAL
THEN /hec1/if_config_constants=>gc_instance_status-complete
ELSE /hec1/if_config_constants=>gc_instance_status-incomplete ).
IF ( lv_inst_status <> lr_tier_lt_backup->hec_instance_status ).
lr_tier_lt_backup->hec_instance_status = lv_inst_status.
lv_data_changed = abap_true.
ENDIF.
IF ( lv_data_changed = abap_true ).
io_modify->update( iv_node = is_ctx-node_key
iv_key = lr_tier_lt_backup->key
is_data = lr_tier_lt_backup ).
ENDIF.
CLEAR: lv_inst_status,
lv_data_changed.
UNASSIGN: <fs_lt_backup_before>,
<fs_longterm_backup_cl>.
ENDLOOP.
"-----------------------------------
" Update Phasing
"-----------------------------------
IF ( lt_act_param_phasing IS NOT INITIAL ).
me->mr_act_param_phasing = NEW /hec1/t_act_phase_inherit( lt_act_param_phasing ).
/hec1/cl_config_det_general=>/hec1/if_config_det_general~set_act_node_keys(
is_ctx = CORRESPONDING #( is_ctx )
it_key = it_key
iv_action = /hec1/cl_config_det_general=>/hec1/if_config_det_general~get_act_key( /hec1/if_config_constant=>gc_act_method-inherit_phase_assignment )
iv_act_exectime = /bobf/if_conf_c=>sc_time_after_validation
ir_act_param = me->mr_act_param_phasing ).
ENDIF.
" **********************************
" Update mode after tier update
" **********************************
WHEN /hec1/if_configuration_c=>sc_determination-tier_longterm_backup-update_after_tier.
" Get tier
io_read->retrieve_by_association( EXPORTING iv_node = is_ctx-node_key
it_key = it_key
iv_fill_data = abap_true
iv_association = /hec1/if_configuration_c=>sc_association-tier_longterm_backup-to_parent
IMPORTING et_data = lt_tier ).
LOOP AT lt_tier_lt_backup REFERENCE INTO lr_tier_lt_backup.
lv_inst_status = COND /hec1/config_instance_status( WHEN lr_tier_lt_backup->hec_tlt_backup_cl_node_ref IS NOT INITIAL AND
lr_tier_lt_backup->hec_phase_guid IS NOT INITIAL
THEN /hec1/if_config_constants=>gc_instance_status-complete
ELSE /hec1/if_config_constants=>gc_instance_status-incomplete ).
" Check instance status and switch
IF ( lv_inst_status <> lr_tier_lt_backup->hec_instance_status ).
lr_tier_lt_backup->hec_instance_status = lv_inst_status.
lv_data_changed = abap_true.
ENDIF.
ASSIGN lt_tier[ key = lr_tier_lt_backup->parent_key ] TO <fs_tier>.
IF ( <fs_tier> IS ASSIGNED ).
IF <fs_tier>-hec_tier_descr IS NOT INITIAL AND
<fs_tier>-hec_tier_type_value IS NOT INITIAL AND
<fs_tier>-hec_tier_impl_type_value IS NOT INITIAL.
lv_release = abap_true.
ENDIF.
ENDIF.
" Release instance for selection
IF ( lv_release <> lr_tier_lt_backup->hec_row_selectable ).
lr_tier_lt_backup->hec_row_selectable = lv_release.
lv_data_changed = abap_true.
ENDIF.
IF ( lv_data_changed = abap_true ).
io_modify->update( iv_node = is_ctx-node_key
iv_key = lr_tier_lt_backup->key
is_data = lr_tier_lt_backup ).
ENDIF.
UNASSIGN <fs_tier>.
CLEAR: lv_release,
lv_data_changed.
ENDLOOP.
ENDCASE.
CATCH /bobf/cx_frw. " Exception class
ENDTRY.
ENDMETHOD.
METHOD execute_tree.
" **************************************************************************************************************************************************
" Attention!!!!!!
" This is only a temporary solution, because this is
" a mix between UI logic and BOPF logic. Normally no
" UI logic has to be set into a BOPF object. But at
" the moment there is the problem, that the Application
" is not running with FBI, therefore we can't control
" the tree about the FBI feeder class
" **************************************************************************************************************************************************
DATA lr_data TYPE REF TO data.
FIELD-SYMBOLS <lt_data> TYPE ANY TABLE.
/bobf/cl_frw_factory=>get_configuration( is_ctx-bo_key )->get_node( EXPORTING iv_node_key = is_ctx-node_key IMPORTING es_node = DATA(ls_node) ).
DATA(lo_tabledescr) = CAST cl_abap_tabledescr( cl_abap_tabledescr=>describe_by_name( ls_node-data_table_type ) ).
CREATE DATA lr_data TYPE HANDLE lo_tabledescr.
ASSIGN lr_data->* TO <lt_data>.
IF sy-subrc = 0.
io_read->retrieve(
EXPORTING iv_node = is_ctx-node_key
it_key = it_key
IMPORTING et_data = <lt_data> ).
ENDIF.
IF <lt_data> IS NOT ASSIGNED OR <lt_data> IS INITIAL.
RETURN.
ENDIF.
CASE is_ctx-det_key.
WHEN /hec1/if_configuration_c=>sc_determination-lt_backup_datacenter-create.
/hec1/cl_bopf_config_ui_tree_h=>get_instance( )->/hec1/if_bopf_config_ui_tree_h~insert( VALUE #( FOR wa_lt_backup_dc_ct IN CORRESPONDING /hec1/t_data_lt_backup_dc_ct( <lt_data> )
( VALUE #( parent_node_key = wa_lt_backup_dc_ct-parent_key
node_key = wa_lt_backup_dc_ct-key
hec_instance_status = wa_lt_backup_dc_ct-hec_instance_status
hec_tree_descr = wa_lt_backup_dc_ct-hec_tree_descr
hec_row_selectable = abap_true
hec_obj_type = /hec1/if_config_constants=>gc_tree_child-lt_backup_dc
hec_phase_guid = wa_lt_backup_dc_ct-hec_phase_guid
hec_delete_visible = wa_lt_backup_dc_ct-hec_delete_visible
change_request = wa_lt_backup_dc_ct-change_request ) ) ) ).
WHEN /hec1/if_configuration_c=>sc_determination-lt_backup_datacenter-update.
/hec1/cl_bopf_config_ui_tree_h=>get_instance( )->/hec1/if_bopf_config_ui_tree_h~update( VALUE #( FOR wa_lt_backup_dc_ct IN CORRESPONDING /hec1/t_data_lt_backup_dc_ct( <lt_data> )
( VALUE #( parent_node_key = wa_lt_backup_dc_ct-parent_key
node_key = wa_lt_backup_dc_ct-key
hec_instance_status = wa_lt_backup_dc_ct-hec_instance_status
hec_tree_descr = wa_lt_backup_dc_ct-hec_tree_descr
hec_row_selectable = abap_true
hec_obj_type = /hec1/if_config_constants=>gc_tree_child-lt_backup_dc
hec_phase_guid = wa_lt_backup_dc_ct-hec_phase_guid
hec_delete_visible = wa_lt_backup_dc_ct-hec_delete_visible
change_request = wa_lt_backup_dc_ct-change_request ) ) ) ).
WHEN /hec1/if_configuration_c=>sc_determination-lt_backup_class-create.
/hec1/cl_bopf_config_ui_tree_h=>get_instance( )->/hec1/if_bopf_config_ui_tree_h~insert( VALUE #( FOR wa_longterm_backup_clas IN CORRESPONDING /hec1/t_data_lt_backup_cl_ct( <lt_data> )
( VALUE #( parent_node_key = wa_longterm_backup_clas-parent_key
node_key = wa_longterm_backup_clas-key
hec_instance_status = wa_longterm_backup_clas-hec_instance_status
hec_tree_descr = wa_longterm_backup_clas-hec_tree_descr
hec_row_selectable = abap_true
hec_obj_type = /hec1/if_config_constants=>gc_tree_child-lt_backup_class
hec_phase_guid = wa_longterm_backup_clas-hec_phase_guid
hec_delete_visible = wa_longterm_backup_clas-hec_delete_visible
change_request = wa_longterm_backup_clas-change_request ) ) ) ).
WHEN /hec1/if_configuration_c=>sc_determination-lt_backup_class-update.
/hec1/cl_bopf_config_ui_tree_h=>get_instance( )->/hec1/if_bopf_config_ui_tree_h~update( VALUE #( FOR wa_longterm_backup_clas IN CORRESPONDING /hec1/t_data_lt_backup_cl_ct( <lt_data> )
( VALUE #( parent_node_key = wa_longterm_backup_clas-parent_key
node_key = wa_longterm_backup_clas-key
hec_instance_status = wa_longterm_backup_clas-hec_instance_status
hec_tree_descr = wa_longterm_backup_clas-hec_tree_descr
hec_row_selectable = abap_true
hec_obj_type = /hec1/if_config_constants=>gc_tree_child-lt_backup_class
hec_phase_guid = wa_longterm_backup_clas-hec_phase_guid
hec_delete_visible = wa_longterm_backup_clas-hec_delete_visible
change_request = wa_longterm_backup_clas-change_request ) ) ) ).
WHEN /hec1/if_configuration_c=>sc_determination-lt_backup_amount-create.
/hec1/cl_bopf_config_ui_tree_h=>get_instance( )->/hec1/if_bopf_config_ui_tree_h~insert( VALUE #( FOR wa_longterm_backup_amount IN CORRESPONDING /hec1/s_lt_backup_amount_ct( <lt_data> )
( VALUE #( parent_node_key = wa_longterm_backup_amount-parent_key
node_key = wa_longterm_backup_amount-key
hec_instance_status = wa_longterm_backup_amount-hec_instance_status
hec_tree_descr = wa_longterm_backup_amount-hec_tree_descr
hec_row_selectable = abap_true
hec_obj_type = /hec1/if_config_constants=>gc_tree_child-lt_backup_amount
hec_phase_guid = wa_longterm_backup_amount-hec_phase_guid
hec_delete_visible = wa_longterm_backup_amount-hec_delete_visible
change_request = wa_longterm_backup_amount-change_request ) ) ) ).
WHEN /hec1/if_configuration_c=>sc_determination-lt_backup_amount-update.
/hec1/cl_bopf_config_ui_tree_h=>get_instance( )->/hec1/if_bopf_config_ui_tree_h~update( VALUE #( FOR wa_longterm_backup_amount IN CORRESPONDING /hec1/s_lt_backup_amount_ct( <lt_data> )
( VALUE #( parent_node_key = wa_longterm_backup_amount-parent_key
node_key = wa_longterm_backup_amount-key
hec_instance_status = wa_longterm_backup_amount-hec_instance_status
hec_tree_descr = wa_longterm_backup_amount-hec_tree_descr
hec_row_selectable = abap_true
hec_obj_type = /hec1/if_config_constants=>gc_tree_child-lt_backup_amount
hec_phase_guid = wa_longterm_backup_amount-hec_phase_guid
hec_delete_visible = wa_longterm_backup_amount-hec_delete_visible
change_request = wa_longterm_backup_amount-change_request ) ) ) ).
WHEN /hec1/if_configuration_c=>sc_determination-add_storage_datacenter-create.
/hec1/cl_bopf_config_ui_tree_h=>get_instance( )->/hec1/if_bopf_config_ui_tree_h~insert( VALUE #( FOR wa_add_storage_dc_ct IN CORRESPONDING /hec1/t_add_storage_dc_ct( <lt_data> )
( VALUE #( parent_node_key = wa_add_storage_dc_ct-parent_key
node_key = wa_add_storage_dc_ct-key
hec_instance_status = wa_add_storage_dc_ct-hec_instance_status
hec_tree_descr = wa_add_storage_dc_ct-hec_tree_descr
hec_row_selectable = abap_true
hec_obj_type = /hec1/if_config_constants=>gc_tree_child-astorage_dc
hec_phase_guid = wa_add_storage_dc_ct-hec_phase_guid
hec_delete_visible = wa_add_storage_dc_ct-hec_delete_visible
change_request = wa_add_storage_dc_ct-change_request ) ) ) ).
WHEN /hec1/if_configuration_c=>sc_determination-add_storage_datacenter-update.
/hec1/cl_bopf_config_ui_tree_h=>get_instance( )->/hec1/if_bopf_config_ui_tree_h~update( VALUE #( FOR wa_add_storage_dc_ct IN CORRESPONDING /hec1/t_add_storage_dc_ct( <lt_data> )
( VALUE #( parent_node_key = wa_add_storage_dc_ct-parent_key
node_key = wa_add_storage_dc_ct-key
hec_instance_status = wa_add_storage_dc_ct-hec_instance_status
hec_tree_descr = wa_add_storage_dc_ct-hec_tree_descr
hec_row_selectable = abap_true
hec_obj_type = /hec1/if_config_constants=>gc_tree_child-astorage_dc
hec_phase_guid = wa_add_storage_dc_ct-hec_phase_guid
hec_delete_visible = wa_add_storage_dc_ct-hec_delete_visible
change_request = wa_add_storage_dc_ct-change_request ) ) ) ).
WHEN /hec1/if_configuration_c=>sc_determination-add_storage_class-create.
/hec1/cl_bopf_config_ui_tree_h=>get_instance( )->/hec1/if_bopf_config_ui_tree_h~insert( VALUE #( FOR wa_add_storage_cl_ct IN CORRESPONDING /hec1/t_add_storage_class_ct( <lt_data> )
( VALUE #( parent_node_key = wa_add_storage_cl_ct-parent_key
node_key = wa_add_storage_cl_ct-key
hec_instance_status = wa_add_storage_cl_ct-hec_instance_status
hec_tree_descr = wa_add_storage_cl_ct-hec_tree_descr
hec_row_selectable = abap_true
hec_obj_type = /hec1/if_config_constants=>gc_tree_child-astorage_class
hec_phase_guid = wa_add_storage_cl_ct-hec_phase_guid
hec_delete_visible = wa_add_storage_cl_ct-hec_delete_visible
change_request = wa_add_storage_cl_ct-change_request ) ) ) ).
WHEN /hec1/if_configuration_c=>sc_determination-add_storage_class-update.
/hec1/cl_bopf_config_ui_tree_h=>get_instance( )->/hec1/if_bopf_config_ui_tree_h~update( VALUE #( FOR wa_add_storage_cl_ct IN CORRESPONDING /hec1/t_add_storage_class_ct( <lt_data> )
( VALUE #( parent_node_key = wa_add_storage_cl_ct-parent_key
node_key = wa_add_storage_cl_ct-key
hec_instance_status = wa_add_storage_cl_ct-hec_instance_status
hec_tree_descr = wa_add_storage_cl_ct-hec_tree_descr
hec_row_selectable = abap_true
hec_obj_type = /hec1/if_config_constants=>gc_tree_child-astorage_class
hec_phase_guid = wa_add_storage_cl_ct-hec_phase_guid
hec_delete_visible = wa_add_storage_cl_ct-hec_delete_visible
change_request = wa_add_storage_cl_ct-change_request ) ) ) ).
WHEN /hec1/if_configuration_c=>sc_determination-add_storage_amount-create.
/hec1/cl_bopf_config_ui_tree_h=>get_instance( )->/hec1/if_bopf_config_ui_tree_h~insert( VALUE #( FOR wa_add_storage_am_ct IN CORRESPONDING /hec1/t_add_storage_amount_ct( <lt_data> )
( VALUE #( parent_node_key = wa_add_storage_am_ct-parent_key
node_key = wa_add_storage_am_ct-key
hec_instance_status = wa_add_storage_am_ct-hec_instance_status
hec_tree_descr = wa_add_storage_am_ct-hec_tree_descr
hec_row_selectable = abap_true
hec_obj_type = /hec1/if_config_constants=>gc_tree_child-astorage_amount
hec_phase_guid = wa_add_storage_am_ct-hec_phase_guid
hec_delete_visible = wa_add_storage_am_ct-hec_delete_visible
change_request = wa_add_storage_am_ct-change_request ) ) ) ).
WHEN /hec1/if_configuration_c=>sc_determination-add_storage_amount-update.
/hec1/cl_bopf_config_ui_tree_h=>get_instance( )->/hec1/if_bopf_config_ui_tree_h~update( VALUE #( FOR wa_add_storage_am_ct IN CORRESPONDING /hec1/t_add_storage_amount_ct( <lt_data> )
( VALUE #( parent_node_key = wa_add_storage_am_ct-parent_key
node_key = wa_add_storage_am_ct-key
hec_instance_status = wa_add_storage_am_ct-hec_instance_status
hec_tree_descr = wa_add_storage_am_ct-hec_tree_descr
hec_row_selectable = abap_true
hec_obj_type = /hec1/if_config_constants=>gc_tree_child-astorage_amount
hec_phase_guid = wa_add_storage_am_ct-hec_phase_guid
hec_delete_visible = wa_add_storage_am_ct-hec_delete_visible
change_request = wa_add_storage_am_ct-change_request ) ) ) ).
WHEN /hec1/if_configuration_c=>sc_determination-tier_longterm_backup-create.
/hec1/cl_bopf_config_ui_tree_h=>get_instance( )->/hec1/if_bopf_config_ui_tree_h~insert( VALUE #( FOR wa_tier_lt_backup IN CORRESPONDING /hec1/t_data_tier_lt_backup_ct( <lt_data> )
( VALUE #( parent_node_key = wa_tier_lt_backup-parent_key
node_key = wa_tier_lt_backup-key
hec_instance_status = wa_tier_lt_backup-hec_instance_status
hec_tree_descr = wa_tier_lt_backup-hec_tree_descr
hec_row_selectable = wa_tier_lt_backup-hec_row_selectable
hec_obj_type = /hec1/if_config_constants=>gc_tree_child-tier_ltbup
hec_phase_guid = wa_tier_lt_backup-hec_phase_guid
hec_delete_visible = wa_tier_lt_backup-hec_delete_visible
change_request = wa_tier_lt_backup-change_request ) ) ) ).
WHEN /hec1/if_configuration_c=>sc_determination-tier_longterm_backup-update
OR /hec1/if_configuration_c=>sc_determination-tier_longterm_backup-update_after_tier.
/hec1/cl_bopf_config_ui_tree_h=>get_instance( )->/hec1/if_bopf_config_ui_tree_h~update( VALUE #( FOR wa_tier_lt_backup IN CORRESPONDING /hec1/t_data_tier_lt_backup_ct( <lt_data> )
( VALUE #( parent_node_key = wa_tier_lt_backup-parent_key
node_key = wa_tier_lt_backup-key
hec_instance_status = wa_tier_lt_backup-hec_instance_status
hec_tree_descr = wa_tier_lt_backup-hec_tree_descr
hec_row_selectable = wa_tier_lt_backup-hec_row_selectable
hec_obj_type = /hec1/if_config_constants=>gc_tree_child-tier_ltbup
hec_phase_guid = wa_tier_lt_backup-hec_phase_guid
hec_delete_visible = wa_tier_lt_backup-hec_delete_visible
change_request = wa_tier_lt_backup-change_request ) ) ) ).
ENDCASE.
ENDMETHOD.
METHOD determine_lt_backup_amount_cr.
DATA: lt_longterm_backup_amount TYPE /hec1/t_lt_backup_amount_ct,
lt_longterm_backup_bef_amount TYPE /hec1/t_lt_backup_amount_ct,
lr_longterm_backup_amount TYPE REF TO /hec1/s_lt_backup_amount_cs,
lt_phase TYPE /hec1/t_data_phase_ct,
lt_act_param_phasing TYPE TABLE OF /hec1/s_act_phase_inherit.
CLEAR:
eo_message,
et_failed_key.
io_read->retrieve( EXPORTING iv_node = is_ctx-node_key
it_key = it_key
IMPORTING et_data = lt_longterm_backup_amount ).
/hec1/cl_config_helper=>get_general_data( EXPORTING iv_node_key = is_ctx-node_key
it_key = it_key
io_read = io_read
IMPORTING ev_root_key = DATA(lv_root_key)
er_landscape = DATA(lr_landscape)
er_delivery_unit = DATA(lr_dlvy_unit)
et_datacenter = DATA(lt_datacenter) ).
TRY.
CASE is_ctx-det_key.
" ***************************************************************************
" Create mode
" ***************************************************************************
WHEN /hec1/if_configuration_c=>sc_determination-lt_backup_amount-create.
LOOP AT lt_longterm_backup_amount REFERENCE INTO lr_longterm_backup_amount.
DATA(lv_inst_status) = COND /hec1/config_instance_status( WHEN lr_longterm_backup_amount->hec_ltb_class_guid IS NOT INITIAL AND
lr_longterm_backup_amount->hec_ltb_datacenter_guid IS NOT INITIAL AND
lr_longterm_backup_amount->hec_phase_guid IS NOT INITIAL
THEN /hec1/if_config_constants=>gc_instance_status-complete
ELSE /hec1/if_config_constants=>gc_instance_status-incomplete ).
lr_longterm_backup_amount->hec_delete_visible = abap_true.
" Check instance status and switch
IF ( lv_inst_status <> lr_longterm_backup_amount->hec_instance_status ).
lr_longterm_backup_amount->hec_instance_status = lv_inst_status.
DATA(lv_data_changed) = abap_true.
ENDIF.
IF ( lv_data_changed = abap_true ).
io_modify->update( iv_node = is_ctx-node_key
iv_key = lr_longterm_backup_amount->key
is_data = lr_longterm_backup_amount ).
ENDIF.
CLEAR: lv_inst_status,
lv_data_changed.
ENDLOOP.
* " ***************************************************************************
* " update mode
* " ***************************************************************************
WHEN /hec1/if_configuration_c=>sc_determination-lt_backup_amount-update.
io_read->retrieve( EXPORTING iv_node = is_ctx-node_key
it_key = it_key
iv_before_image = abap_true
IMPORTING et_data = lt_longterm_backup_bef_amount ).
io_read->retrieve_by_association( EXPORTING iv_node = /hec1/if_configuration_c=>sc_node-root
it_key = VALUE #( ( key = lv_root_key ) )
iv_fill_data = abap_true
iv_association = /hec1/if_configuration_c=>sc_association-root-phase
IMPORTING et_data = lt_phase ).
LOOP AT lt_longterm_backup_amount REFERENCE INTO lr_longterm_backup_amount.
ASSIGN lt_longterm_backup_bef_amount[ key = lr_longterm_backup_amount->key ] TO FIELD-SYMBOL(<fs_longterm_backup_befor>).
IF ( <fs_longterm_backup_befor> IS ASSIGNED ).
TRY.
" if the infrastructure provider is set and there is datacenter assigned
" get the pricing
IF ( lr_dlvy_unit->hec_inf_provider_guid IS NOT INITIAL ) AND ( lr_longterm_backup_amount->hec_ltb_datacenter_guid IS NOT INITIAL ).
DATA(ls_datacenter) = VALUE #( lt_datacenter[ hec_node_datacenter = lr_longterm_backup_amount->hec_ltb_datacenter_guid ] OPTIONAL ).
SELECT SINGLE hec_cb_pricing_lb_guid INTO @DATA(lv_ltb_legoblock)
FROM /hec1/a_back_lb
WHERE hec_apm_guid = @lr_longterm_backup_amount->hec_apm_guid
AND hec_infra_provider_guid = @lr_dlvy_unit->hec_inf_provider_guid
AND hec_sec_datacenter_guid = @ls_datacenter-hec_datacenter_guid
AND hec_backup_class_guid = @lr_longterm_backup_amount->hec_ltb_class_guid.
" Get pricing
SELECT SINGLE * INTO @DATA(ls_pricing) "#EC CI_ALL_FIELDS_NEEDED
FROM /hec1/c_cbp_lb
WHERE hec_price_lb = @lv_ltb_legoblock.
IF ( sy-subrc = 0 ).
DATA(lv_exchange_rate) = lr_longterm_backup_amount->hec_exchange_rate. "Temp field because the ls_pricing structure overwrites the real exchange_rate
lr_longterm_backup_amount->* = VALUE #( BASE lr_longterm_backup_amount->*
hec_tree_descr = COND #( WHEN lr_longterm_backup_amount->hec_phase_guid IS INITIAL
THEN |{ VALUE #( lt_phase[ hec_node_phase = lr_longterm_backup_amount->hec_phase_guid ]-hec_phase_descr OPTIONAL ) } : { lr_longterm_backup_amount->hec_ltb_amount }|
ELSE |{ lr_longterm_backup_amount->hec_ltb_amount }| )
hec_month_price_fee = lr_longterm_backup_amount->hec_ltb_amount * ls_pricing-hec_month_price_eur
* price = CORRESPONDING #( ls_pricing )
price = CORRESPONDING #( BASE ( lr_longterm_backup_amount->price ) ls_pricing )
hec_exchange_rate = lv_exchange_rate
).
lv_data_changed = abap_true.
ENDIF.
lv_data_changed = abap_true.
ENDIF. " IF lv_infra_provider IS NOT INITIAL.
CATCH cx_sy_itab_line_not_found.
ENDTRY.
"-----------------------------------
" Phasing has changed
"-----------------------------------
IF ( lr_longterm_backup_amount->hec_phase_guid NE <fs_longterm_backup_befor>-hec_phase_guid ).
APPEND VALUE #( hec_node_key = is_ctx-node_key
hec_bopf_key = lr_longterm_backup_amount->key
hec_phase_guid_new = lr_longterm_backup_amount->hec_phase_guid
hec_phase_guid_old = <fs_longterm_backup_befor>-hec_phase_guid ) TO lt_act_param_phasing.
lr_longterm_backup_amount->hec_phase_changed = abap_true.
lv_data_changed = abap_true.
ENDIF. "Phase changed
ENDIF. "<fs_longterm_backup_befor> is assigned
"-----------------------------------
" Check instance status and switch
"-----------------------------------
lv_inst_status = COND /hec1/config_instance_status( WHEN lr_longterm_backup_amount->hec_ltb_class_guid IS NOT INITIAL AND
lr_longterm_backup_amount->hec_ltb_datacenter_guid IS NOT INITIAL AND
lr_longterm_backup_amount->hec_phase_guid IS NOT INITIAL
THEN /hec1/if_config_constants=>gc_instance_status-complete
ELSE /hec1/if_config_constants=>gc_instance_status-incomplete ).
lr_longterm_backup_amount->hec_delete_visible = abap_true.
IF ( lv_inst_status <> lr_longterm_backup_amount->hec_instance_status ).
lr_longterm_backup_amount->hec_instance_status = lv_inst_status.
lv_data_changed = abap_true.
ENDIF.
IF ( lv_data_changed = abap_true ).
io_modify->update( iv_node = is_ctx-node_key
iv_key = lr_longterm_backup_amount->key
is_data = lr_longterm_backup_amount ).
ENDIF.
CLEAR: lv_inst_status,
lv_data_changed.
UNASSIGN <fs_longterm_backup_befor>.
ENDLOOP. "LOOP AT lt_add_service REFERENCE INTO lr_add_service.
"-----------------------------------
" Update Phasing
"-----------------------------------
IF ( lt_act_param_phasing IS NOT INITIAL ).
me->mr_act_param_phasing = NEW /hec1/t_act_phase_inherit( lt_act_param_phasing ).
/hec1/cl_config_det_general=>/hec1/if_config_det_general~set_act_node_keys(
is_ctx = CORRESPONDING #( is_ctx )
it_key = it_key
iv_action = /hec1/cl_config_det_general=>/hec1/if_config_det_general~get_act_key( /hec1/if_config_constant=>gc_act_method-inherit_phase_assignment )
iv_act_exectime = /bobf/if_conf_c=>sc_time_after_validation
ir_act_param = me->mr_act_param_phasing ).
ENDIF.
*
ENDCASE.
*
CATCH /bobf/cx_frw. " Exception class
ENDTRY.
ENDMETHOD.
METHOD determine_lt_backup_class_cr.
DATA: lt_longterm_backup_class TYPE /hec1/t_data_lt_backup_cl_ct,
lt_longterm_backup_cl_before TYPE /hec1/t_data_lt_backup_cl_ct,
lr_longterm_backup_cl TYPE REF TO /hec1/s_data_lt_backup_cl_cs,
lt_phase TYPE /hec1/t_data_phase_ct,
ls_act_param_tier_ltb TYPE /hec1/s_act_update_tier_ltb.
CLEAR:
eo_message,
et_failed_key.
io_read->retrieve( EXPORTING iv_node = is_ctx-node_key
it_key = it_key
IMPORTING et_data = lt_longterm_backup_class ).
/hec1/cl_config_helper=>get_general_data( EXPORTING iv_node_key = is_ctx-node_key
it_key = it_key
io_read = io_read
IMPORTING ev_root_key = DATA(lv_root_key)
er_landscape = DATA(lr_landscape)
er_delivery_unit = DATA(lr_dlvy_unit)
et_datacenter = DATA(lt_datacenter) ).
TRY.
CASE is_ctx-det_key.
" ***************************************************************************
" Create mode
" ***************************************************************************
WHEN /hec1/if_configuration_c=>sc_determination-lt_backup_class-create.
LOOP AT lt_longterm_backup_class REFERENCE INTO lr_longterm_backup_cl.
DATA(lv_inst_status) = COND /hec1/config_instance_status( WHEN lr_longterm_backup_cl->hec_ltb_class_guid IS NOT INITIAL AND
lr_longterm_backup_cl->hec_ltb_datacenter_guid IS NOT INITIAL
* lr_longterm_backup_cl->hec_phase_guid IS NOT INITIAL
THEN /hec1/if_config_constants=>gc_instance_status-complete
ELSE /hec1/if_config_constants=>gc_instance_status-incomplete ).
lr_longterm_backup_cl->hec_delete_visible = abap_true.
" Check instance status and switch
IF ( lv_inst_status <> lr_longterm_backup_cl->hec_instance_status ).
lr_longterm_backup_cl->hec_instance_status = lv_inst_status.
DATA(lv_data_changed) = abap_true.
ENDIF.
IF ( lv_data_changed = abap_true ).
io_modify->update( iv_node = is_ctx-node_key
iv_key = lr_longterm_backup_cl->key
is_data = lr_longterm_backup_cl ).
ENDIF.
CLEAR: lv_inst_status,
lv_data_changed.
ENDLOOP.
* " ***************************************************************************
* " update mode
* " ***************************************************************************
WHEN /hec1/if_configuration_c=>sc_determination-lt_backup_class-update.
CLEAR: ls_act_param_tier_ltb.
io_read->retrieve( EXPORTING iv_node = is_ctx-node_key
it_key = it_key
iv_before_image = abap_true
IMPORTING et_data = lt_longterm_backup_cl_before ).
io_read->retrieve_by_association( EXPORTING iv_node = /hec1/if_configuration_c=>sc_node-root
it_key = VALUE #( ( key = lv_root_key ) )
iv_fill_data = abap_true
iv_association = /hec1/if_configuration_c=>sc_association-root-phase
IMPORTING et_data = lt_phase ).
LOOP AT lt_longterm_backup_class REFERENCE INTO lr_longterm_backup_cl.
ASSIGN lt_longterm_backup_cl_before[ key = lr_longterm_backup_cl->key ] TO FIELD-SYMBOL(<fs_longterm_backup_before>).
IF ( <fs_longterm_backup_before> IS ASSIGNED ).
"-----------------------------------
" Longterm backup GUID has changed
"-----------------------------------
" Get service class data
SELECT SINGLE hec_longt_backup_class_descr INTO @DATA(lv_longterm_description)
FROM /hec1/i_longtermbackupbasic
WHERE hec_apm_guid = @lr_landscape->hec_apm_guid
AND hec_longt_backup_class_guid = @lr_longterm_backup_cl->hec_ltb_class_guid.
IF ( sy-subrc = 0 ).
lr_longterm_backup_cl->* = VALUE #( BASE lr_longterm_backup_cl->*
hec_ltb_class_descr = lv_longterm_description
).
"Set longterm backup description in case it is empty
IF ( lr_longterm_backup_cl->hec_ltb_class_guid IS NOT INITIAL ) AND
( lr_longterm_backup_cl->hec_ltb_class_descr IS NOT INITIAL ) AND
( lr_longterm_backup_cl->hec_ltb_class_descr_ext IS INITIAL ).
lr_longterm_backup_cl->hec_ltb_class_descr_ext = lr_longterm_backup_cl->hec_ltb_class_descr.
ENDIF.
lv_data_changed = abap_true.
ENDIF.
"-----------------------------------
" Resets -> TODO move to actions
"-----------------------------------
" Reset Service Description
IF ( lr_longterm_backup_cl->hec_ltb_class_guid IS INITIAL ).
IF ( lr_longterm_backup_cl->hec_ltb_class_descr = lr_longterm_backup_cl->hec_ltb_class_descr_ext ).
CLEAR: lr_longterm_backup_cl->hec_ltb_class_descr_ext.
ENDIF.
CLEAR: lr_longterm_backup_cl->hec_ltb_class_descr.
lv_data_changed = abap_true.
ENDIF.
IF ( <fs_longterm_backup_before>-hec_ltb_class_descr_ext <> lr_longterm_backup_cl->hec_ltb_class_descr_ext ).
lr_longterm_backup_cl->hec_tree_descr = COND #( WHEN lr_longterm_backup_cl->hec_ltb_class_descr IS NOT INITIAL
THEN |{ lr_longterm_backup_cl->hec_ltb_class_descr } : { lr_longterm_backup_cl->hec_ltb_class_descr_ext }|
ELSE |{ lr_longterm_backup_cl->hec_ltb_class_descr_ext }| ).
lv_data_changed = abap_true.
ENDIF.
IF ( <fs_longterm_backup_before>-hec_ltb_class_descr <> lr_longterm_backup_cl->hec_ltb_class_descr ).
lr_longterm_backup_cl->hec_tree_descr = COND #( WHEN lr_longterm_backup_cl->hec_ltb_class_descr IS NOT INITIAL
THEN |{ lr_longterm_backup_cl->hec_ltb_class_descr } : { lr_longterm_backup_cl->hec_ltb_class_descr_ext }|
ELSE |{ lr_longterm_backup_cl->hec_ltb_class_descr_ext }| ).
lv_data_changed = abap_true.
ENDIF.
"-----------------------------------
" Check instance status and switch
"-----------------------------------
lv_inst_status = COND /hec1/config_instance_status( WHEN lr_longterm_backup_cl->hec_ltb_class_guid IS NOT INITIAL AND
lr_longterm_backup_cl->hec_ltb_datacenter_guid IS NOT INITIAL
THEN /hec1/if_config_constants=>gc_instance_status-complete
ELSE /hec1/if_config_constants=>gc_instance_status-incomplete ).
lr_longterm_backup_cl->hec_delete_visible = abap_true.
IF ( lv_inst_status <> lr_longterm_backup_cl->hec_instance_status ).
lr_longterm_backup_cl->hec_instance_status = lv_inst_status.
lv_data_changed = abap_true.
ENDIF.
" check, if assigned tier_lt_backup nodes must be updated
IF ( lr_longterm_backup_cl->hec_ltb_class_guid <> <fs_longterm_backup_before>-hec_ltb_class_guid )
OR ( lr_longterm_backup_cl->hec_ltb_class_descr_ext <> <fs_longterm_backup_before>-hec_ltb_class_descr_ext ).
ls_act_param_tier_ltb = CORRESPONDING /hec1/s_act_update_tier_ltb( lr_longterm_backup_cl->* ).
ENDIF.
""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Update TIER_LT_BACKUP
""""""""""""""""""""""""""""""""""""""""""""""""""""""
IF ( ls_act_param_tier_ltb IS NOT INITIAL ).
me->mr_act_param_tier_ltb = NEW /hec1/s_act_update_tier_ltb( ls_act_param_tier_ltb ).
/hec1/cl_config_det_general=>/hec1/if_config_det_general~set_act_node_keys(
is_ctx = CORRESPONDING #( is_ctx )
it_key = it_key
iv_action = /hec1/cl_config_det_general=>/hec1/if_config_det_general~get_act_key( /hec1/if_config_constant=>gc_act_method-update_tier_lt_backup )
iv_act_exectime = /bobf/if_conf_c=>sc_time_after_validation
ir_act_param = me->mr_act_param_tier_ltb ).
ENDIF.
IF ( lv_data_changed = abap_true ).
io_modify->update( iv_node = is_ctx-node_key
iv_key = lr_longterm_backup_cl->key
is_data = lr_longterm_backup_cl ).
ENDIF.
CLEAR: lv_inst_status,
lv_data_changed.
ENDIF.
UNASSIGN <fs_longterm_backup_before>.
ENDLOOP. "LOOP AT lt_add_service REFERENCE INTO lr_add_service.
"-----------------------------------
" Update Phasing
"-----------------------------------
* IF ( lt_act_param_phasing IS NOT INITIAL ).
* me->mr_act_param_phasing = NEW /hec1/t_act_phase_inherit( lt_act_param_phasing ).
*
* /hec1/cl_config_det_general=>/hec1/if_config_det_general~set_act_node_keys(
* is_ctx = CORRESPONDING #( is_ctx )
* it_key = it_key
* iv_action = /hec1/cl_config_det_general=>/hec1/if_config_det_general~get_act_key( /hec1/if_config_constant=>gc_act_method-inherit_phase_assignment )
* iv_act_exectime = /bobf/if_conf_c=>sc_time_after_validation
* ir_act_param = me->mr_act_param_phasing ).
* ENDIF.
*
ENDCASE.
CATCH /bobf/cx_frw. " Exception class
ENDTRY.
ENDMETHOD.
METHOD determine_lt_backup_datacen_cr.
DATA: lt_longterm_backup_dc TYPE /hec1/t_data_lt_backup_dc_ct,
lt_longterm_backup_dc_before TYPE /hec1/t_data_lt_backup_dc_ct,
lr_longterm_backup_dc TYPE REF TO /hec1/s_data_lt_backup_dc_cs,
lt_phase TYPE /hec1/t_data_phase_ct,
lt_act_param_phasing TYPE TABLE OF /hec1/s_act_phase_inherit.
CLEAR:
eo_message,
et_failed_key.
io_read->retrieve( EXPORTING iv_node = is_ctx-node_key
it_key = it_key
IMPORTING et_data = lt_longterm_backup_dc ).
/hec1/cl_config_helper=>get_general_data( EXPORTING iv_node_key = is_ctx-node_key
it_key = it_key
io_read = io_read
IMPORTING ev_root_key = DATA(lv_root_key)
er_landscape = DATA(lr_landscape)
er_delivery_unit = DATA(lr_dlvy_unit)
et_datacenter = DATA(lt_datacenter) ).
TRY.
CASE is_ctx-det_key.
" ***************************************************************************
" Create mode
" ***************************************************************************
WHEN /hec1/if_configuration_c=>sc_determination-lt_backup_datacenter-create.
LOOP AT lt_longterm_backup_dc REFERENCE INTO lr_longterm_backup_dc.
DATA(lv_inst_status) = COND /hec1/config_instance_status( WHEN lr_longterm_backup_dc->hec_ltb_datacenter_guid IS NOT INITIAL
THEN /hec1/if_config_constants=>gc_instance_status-complete
ELSE /hec1/if_config_constants=>gc_instance_status-incomplete ).
lr_longterm_backup_dc->hec_delete_visible = abap_true.
" Check instance status and switch
IF ( lv_inst_status <> lr_longterm_backup_dc->hec_instance_status ).
lr_longterm_backup_dc->hec_instance_status = lv_inst_status.
DATA(lv_data_changed) = abap_true.
ENDIF.
IF ( lv_data_changed = abap_true ).
io_modify->update( iv_node = is_ctx-node_key
iv_key = lr_longterm_backup_dc->key
is_data = lr_longterm_backup_dc ).
ENDIF.
CLEAR: lv_inst_status,
lv_data_changed.
ENDLOOP.
* " ***************************************************************************
* " update mode
* " ***************************************************************************
WHEN /hec1/if_configuration_c=>sc_determination-lt_backup_datacenter-update.
io_read->retrieve( EXPORTING iv_node = is_ctx-node_key
it_key = it_key
iv_before_image = abap_true
IMPORTING et_data = lt_longterm_backup_dc_before ).
io_read->retrieve_by_association( EXPORTING iv_node = /hec1/if_configuration_c=>sc_node-root
it_key = VALUE #( ( key = lv_root_key ) )
iv_fill_data = abap_true
iv_association = /hec1/if_configuration_c=>sc_association-root-phase
IMPORTING et_data = lt_phase ).
LOOP AT lt_longterm_backup_dc REFERENCE INTO lr_longterm_backup_dc.
ASSIGN lt_longterm_backup_dc_before[ key = lr_longterm_backup_dc->key ] TO FIELD-SYMBOL(<fs_longterm_backup_dc_before>).
IF ( <fs_longterm_backup_dc_before> IS ASSIGNED ).
* " if the infrastructure provider is set and there is datacenter assigned
IF ( lr_dlvy_unit->hec_inf_provider_guid IS NOT INITIAL ).
DATA(ls_datacenter) = VALUE #( lt_datacenter[ hec_node_datacenter = lr_longterm_backup_dc->hec_ltb_datacenter_guid ] OPTIONAL ).
lr_longterm_backup_dc->* = VALUE #( BASE lr_longterm_backup_dc->*
hec_ltb_datacenter_guid = ls_datacenter-hec_node_datacenter
hec_ltb_datacenter_descr = COND #( WHEN ls_datacenter-hec_datacenter_descr IS NOT INITIAL
THEN ls_datacenter-hec_datacenter_descr
ELSE space )
hec_tree_descr = COND #( WHEN ls_datacenter-hec_datacenter_guid IS NOT INITIAL
THEN |{ ls_datacenter-hec_datacenter_descr }|
ELSE |<new datacenter>| )
).
lv_data_changed = abap_true.
ENDIF.
* "-----------------------------------
* " Phasing has changed
* "-----------------------------------
* IF ( lr_longterm_backup_dc->hec_phase_guid NE <fs_longterm_backup_dc_before>-hec_phase_guid ).
*
* APPEND VALUE #( hec_node_key = is_ctx-node_key
* hec_bopf_key = lr_longterm_backup_dc->key
* hec_phase_guid_new = lr_longterm_backup_dc->hec_phase_guid
* hec_phase_guid_old = <fs_longterm_backup_dc_before>-hec_phase_guid ) TO lt_act_param_phasing.
*
* lr_longterm_backup_dc->hec_phase_changed = abap_true.
* lv_data_changed = abap_true.
*
* ENDIF. "Phase changed
" Reset Datacenter
IF ( <fs_longterm_backup_dc_before>-hec_ltb_datacenter_guid IS NOT INITIAL ) AND ( lr_longterm_backup_dc->hec_ltb_datacenter_guid IS INITIAL ).
CLEAR: lr_longterm_backup_dc->hec_ltb_datacenter_descr.
lv_data_changed = abap_true.
ENDIF.
" Set Datacenter Descr / Tree Descr
IF ( <fs_longterm_backup_dc_before>-hec_ltb_datacenter_descr NE lr_longterm_backup_dc->hec_ltb_datacenter_descr ).
lr_longterm_backup_dc->hec_tree_descr = COND #( WHEN lr_longterm_backup_dc->hec_ltb_datacenter_descr IS INITIAL
THEN ||
ELSE |{ lr_longterm_backup_dc->hec_ltb_datacenter_descr }| ).
lv_data_changed = abap_true.
ENDIF.
ENDIF.
"-----------------------------------
" Check instance status and switch
"-----------------------------------
lv_inst_status = COND /hec1/config_instance_status( WHEN lr_longterm_backup_dc->hec_ltb_datacenter_guid IS NOT INITIAL
THEN /hec1/if_config_constants=>gc_instance_status-complete
ELSE /hec1/if_config_constants=>gc_instance_status-incomplete ).
lr_longterm_backup_dc->hec_delete_visible = abap_true.
IF ( lv_inst_status <> lr_longterm_backup_dc->hec_instance_status ).
lr_longterm_backup_dc->hec_instance_status = lv_inst_status.
lv_data_changed = abap_true.
ENDIF.
IF ( lv_data_changed = abap_true ).
io_modify->update( iv_node = is_ctx-node_key
iv_key = lr_longterm_backup_dc->key
is_data = lr_longterm_backup_dc ).
ENDIF.
CLEAR: lv_inst_status,
lv_data_changed.
UNASSIGN <fs_longterm_backup_dc_before>.
ENDLOOP. "LOOP AT lt_add_service REFERENCE INTO lr_add_service.
"-----------------------------------
" Update Phasing
"-----------------------------------
* IF ( lt_act_param_phasing IS NOT INITIAL ).
* me->mr_act_param_phasing = NEW /hec1/t_act_phase_inherit( lt_act_param_phasing ).
*
* /hec1/cl_config_det_general=>/hec1/if_config_det_general~set_act_node_keys(
* is_ctx = CORRESPONDING #( is_ctx )
* it_key = it_key
* iv_action = /hec1/cl_config_det_general=>/hec1/if_config_det_general~get_act_key( /hec1/if_config_constant=>gc_act_method-inherit_phase_assignment )
* iv_act_exectime = /bobf/if_conf_c=>sc_time_after_validation
* ir_act_param = me->mr_act_param_phasing ).
* ENDIF.
*
ENDCASE.
CATCH /bobf/cx_frw. " Exception class
ENDTRY.
ENDMETHOD.
METHOD determine_tier_lt_backup_cr.
DATA: lt_tier_lt_backup TYPE /hec1/t_data_tier_lt_backup_ct,
lt_tier_lt_backup_before TYPE /hec1/t_data_tier_lt_backup_ct,
lt_tier TYPE /hec1/t_data_tier_ct,
lt_root_key TYPE /bobf/t_frw_key,
lt_landscape_key TYPE /bobf/t_frw_key,
lt_longt_backup_cl TYPE /hec1/t_data_lt_backup_cl_ct,
lt_phase TYPE /hec1/t_data_phase_ct,
lt_act_param_phasing TYPE TABLE OF /hec1/s_act_phase_inherit.
CLEAR: eo_message,
et_failed_key.
io_read->retrieve( EXPORTING iv_node = is_ctx-node_key
it_key = it_key
IMPORTING et_data = lt_tier_lt_backup ).
/hec1/cl_config_helper=>get_general_data( EXPORTING iv_node_key = is_ctx-node_key
it_key = it_key
io_read = io_read
IMPORTING ev_root_key = DATA(lv_root_key)
er_landscape = DATA(lr_landscape)
er_delivery_unit = DATA(lr_delivery_unit) ).
TRY.
CASE is_ctx-det_key.
" ***************************************************************************
" Create mode
" ***************************************************************************
WHEN /hec1/if_configuration_c=>sc_determination-tier_longterm_backup-create.
" Get tier node (parent)
io_read->retrieve_by_association( EXPORTING iv_node = is_ctx-node_key
it_key = it_key
iv_fill_data = abap_true
iv_association = /hec1/if_configuration_c=>sc_association-tier_longterm_backup-to_parent
IMPORTING et_data = lt_tier ).
LOOP AT lt_tier_lt_backup REFERENCE INTO DATA(lr_tier_lt_backup).
ASSIGN lt_tier[ key = lr_tier_lt_backup->parent_key ] TO FIELD-SYMBOL(<fs_tier>).
lr_tier_lt_backup->hec_delete_visible = abap_true.
IF ( <fs_tier> IS ASSIGNED ) AND
( <fs_tier>-hec_tier_descr IS NOT INITIAL ) AND
( <fs_tier>-hec_tier_type_value IS NOT INITIAL ) AND
( <fs_tier>-hec_tier_impl_type_value IS NOT INITIAL ).
DATA(lv_release) = abap_true.
ENDIF.
"-----------------------------------
" Release instance for selection
"-----------------------------------
IF ( lv_release <> lr_tier_lt_backup->hec_row_selectable ).
lr_tier_lt_backup->hec_row_selectable = lv_release.
DATA(lv_data_changed) = abap_true.
ENDIF.
"------------------------------------------
" Set CR related fields from the ROOT node
"------------------------------------------
DATA(lv_cr_data_changed) = /hec1/cl_config_helper=>SET_CR_RELATED_FIELDS(
EXPORTING
is_ctx = is_ctx
it_key = it_key
io_read = io_read
io_modify = io_modify
iv_mod_type = /hec1/if_config_constants=>gc_comp_mod_type-added
is_node_data = lr_tier_lt_backup
iv_set_apm = abap_true
iv_clear_phase = abap_true
).
IF ( lv_data_changed = abap_true ).
io_modify->update( iv_node = is_ctx-node_key
iv_key = lr_tier_lt_backup->key
is_data = lr_tier_lt_backup ).
ENDIF.
UNASSIGN <fs_tier>.
CLEAR: lv_data_changed,
lv_release.
ENDLOOP.
" ***************************************************************************
" Update mode
" ***************************************************************************
WHEN /hec1/if_configuration_c=>sc_determination-tier_longterm_backup-update.
" Data before update
io_read->retrieve( EXPORTING iv_node = is_ctx-node_key
it_key = it_key
iv_before_image = abap_true
IMPORTING et_data = lt_tier_lt_backup_before ).
" ROOT -> PHASE
io_read->retrieve_by_association( EXPORTING iv_node = /hec1/if_configuration_c=>sc_node-root
it_key = VALUE #( ( key = lv_root_key ) )
iv_fill_data = abap_true
iv_association = /hec1/if_configuration_c=>sc_association-root-phase
IMPORTING et_data = lt_phase ).
LOOP AT lt_tier_lt_backup REFERENCE INTO lr_tier_lt_backup.
ASSIGN lt_tier_lt_backup_before[ key = lr_tier_lt_backup->key ] TO FIELD-SYMBOL(<fs_lt_backup_before>).
IF ( <fs_lt_backup_before> IS ASSIGNED ).
"-----------------------------------
" Service Class GUID has changed ?
"-----------------------------------
IF ( lr_tier_lt_backup->hec_tlt_backup_cl_node_ref IS NOT INITIAL ) AND
( ( lr_tier_lt_backup->hec_tlt_backup_cl_node_ref <> <fs_lt_backup_before>-hec_tlt_backup_cl_node_ref ) ).
" Get service class data from corresponding longterm backup pool
IF ( lt_root_key IS INITIAL ).
APPEND VALUE #( key = lr_tier_lt_backup->root_key ) TO lt_root_key.
" Get longterm backup datacenter
io_read->retrieve_by_association( EXPORTING iv_node = /hec1/if_configuration_c=>sc_node-root
it_key = lt_root_key
iv_association = /hec1/if_configuration_c=>sc_association-root-lt_backup_datacenter
IMPORTING et_target_key = DATA(lt_longt_backup_dc_key) ).
" Get longterm backup class
io_read->retrieve_by_association( EXPORTING iv_node = /hec1/if_configuration_c=>sc_node-lt_backup_datacenter
it_key = lt_longt_backup_dc_key
iv_fill_data = abap_true
iv_association = /hec1/if_configuration_c=>sc_association-lt_backup_datacenter-lt_backup_class
IMPORTING et_data = lt_longt_backup_cl ).
ENDIF.
" select assigned class node
ASSIGN lt_longt_backup_cl[ hec_node_lt_backup_class = lr_tier_lt_backup->hec_tlt_backup_cl_node_ref ] TO FIELD-SYMBOL(<fs_longterm_backup_cl>).
IF ( <fs_longterm_backup_cl> IS ASSIGNED ).
lr_tier_lt_backup->* = VALUE #( BASE lr_tier_lt_backup->*
hec_tlt_backup_ref_descr = <fs_longterm_backup_cl>-hec_ltb_class_descr
hec_tlt_backup_ref_descr_ext = <fs_longterm_backup_cl>-hec_ltb_class_descr_ext
hec_tree_descr = |{ <fs_longterm_backup_cl>-hec_ltb_class_descr } : { lr_tier_lt_backup->hec_tlt_backup_ref_descr_ext }| ).
lv_data_changed = abap_true.
ENDIF.
ENDIF.
" Reset Service Description
IF ( lr_tier_lt_backup->hec_tlt_backup_cl_node_ref IS INITIAL ).
CLEAR: lr_tier_lt_backup->hec_tlt_backup_ref_descr_ext.
CLEAR: lr_tier_lt_backup->hec_tlt_backup_ref_descr.
lv_data_changed = abap_true.
ENDIF.
IF ( <fs_lt_backup_before>-hec_tlt_backup_ref_descr_ext <> lr_tier_lt_backup->hec_tlt_backup_ref_descr_ext ).
lr_tier_lt_backup->hec_tree_descr = COND #( WHEN lr_tier_lt_backup->hec_tlt_backup_ref_descr IS NOT INITIAL
THEN |{ lr_tier_lt_backup->hec_tlt_backup_ref_descr } : { lr_tier_lt_backup->hec_tlt_backup_ref_descr_ext }|
ELSE |{ lr_tier_lt_backup->hec_tlt_backup_ref_descr_ext }| ).
lv_data_changed = abap_true.
ENDIF.
IF ( <fs_lt_backup_before>-hec_tlt_backup_ref_descr <> lr_tier_lt_backup->hec_tlt_backup_ref_descr ).
lr_tier_lt_backup->hec_tree_descr = COND #( WHEN lr_tier_lt_backup->hec_tlt_backup_ref_descr IS NOT INITIAL
THEN |{ lr_tier_lt_backup->hec_tlt_backup_ref_descr } : { lr_tier_lt_backup->hec_tlt_backup_ref_descr_ext }|
ELSE |{ lr_tier_lt_backup->hec_tlt_backup_ref_descr_ext }| ).
lv_data_changed = abap_true.
ENDIF.
"-----------------------------------
" Phasing has changed
"-----------------------------------
IF ( lr_tier_lt_backup->hec_phase_guid NE <fs_lt_backup_before>-hec_phase_guid ).
APPEND VALUE #( hec_node_key = is_ctx-node_key
hec_bopf_key = lr_tier_lt_backup->key
hec_phase_guid_new = lr_tier_lt_backup->hec_phase_guid
hec_phase_guid_old = <fs_lt_backup_before>-hec_phase_guid ) TO lt_act_param_phasing.
lr_tier_lt_backup->hec_phase_changed = abap_true.
lv_data_changed = abap_true.
ENDIF. "phasing changed
ENDIF. " IF <fs_lt_backup_before> IS ASSIGNED.
"-----------------------------------
" Release instance for selection
"-----------------------------------
DATA(lv_inst_status) = COND /hec1/config_instance_status( WHEN lr_tier_lt_backup->hec_tlt_backup_cl_node_ref IS NOT INITIAL AND
lr_tier_lt_backup->hec_phase_guid IS NOT INITIAL
THEN /hec1/if_config_constants=>gc_instance_status-complete
ELSE /hec1/if_config_constants=>gc_instance_status-incomplete ).
IF ( lv_inst_status <> lr_tier_lt_backup->hec_instance_status ).
lr_tier_lt_backup->hec_instance_status = lv_inst_status.
lv_data_changed = abap_true.
ENDIF.
IF ( lv_data_changed = abap_true ).
io_modify->update( iv_node = is_ctx-node_key
iv_key = lr_tier_lt_backup->key
is_data = lr_tier_lt_backup ).
ENDIF.
CLEAR: lv_inst_status,
lv_data_changed.
UNASSIGN: <fs_lt_backup_before>,
<fs_longterm_backup_cl>.
ENDLOOP.
"-----------------------------------
" Update Phasing
"-----------------------------------
IF ( lt_act_param_phasing IS NOT INITIAL ).
me->mr_act_param_phasing = NEW /hec1/t_act_phase_inherit( lt_act_param_phasing ).
/hec1/cl_config_det_general=>/hec1/if_config_det_general~set_act_node_keys(
is_ctx = CORRESPONDING #( is_ctx )
it_key = it_key
iv_action = /hec1/cl_config_det_general=>/hec1/if_config_det_general~get_act_key( /hec1/if_config_constant=>gc_act_method-inherit_phase_assignment )
iv_act_exectime = /bobf/if_conf_c=>sc_time_after_validation
ir_act_param = me->mr_act_param_phasing ).
ENDIF.
" **********************************
" Update mode after tier update
" **********************************
WHEN /hec1/if_configuration_c=>sc_determination-tier_longterm_backup-update_after_tier.
" Get tier
io_read->retrieve_by_association( EXPORTING iv_node = is_ctx-node_key
it_key = it_key
iv_fill_data = abap_true
iv_association = /hec1/if_configuration_c=>sc_association-tier_longterm_backup-to_parent
IMPORTING et_data = lt_tier ).
LOOP AT lt_tier_lt_backup REFERENCE INTO lr_tier_lt_backup.
lv_inst_status = COND /hec1/config_instance_status( WHEN lr_tier_lt_backup->hec_tlt_backup_cl_node_ref IS NOT INITIAL AND
lr_tier_lt_backup->hec_phase_guid IS NOT INITIAL
THEN /hec1/if_config_constants=>gc_instance_status-complete
ELSE /hec1/if_config_constants=>gc_instance_status-incomplete ).
" Check instance status and switch
IF ( lv_inst_status <> lr_tier_lt_backup->hec_instance_status ).
lr_tier_lt_backup->hec_instance_status = lv_inst_status.
lv_data_changed = abap_true.
ENDIF.
ASSIGN lt_tier[ key = lr_tier_lt_backup->parent_key ] TO <fs_tier>.
IF ( <fs_tier> IS ASSIGNED ).
IF <fs_tier>-hec_tier_descr IS NOT INITIAL AND
<fs_tier>-hec_tier_type_value IS NOT INITIAL AND
<fs_tier>-hec_tier_impl_type_value IS NOT INITIAL.
lv_release = abap_true.
ENDIF.
ENDIF.
" Release instance for selection
IF ( lv_release <> lr_tier_lt_backup->hec_row_selectable ).
lr_tier_lt_backup->hec_row_selectable = lv_release.
lv_data_changed = abap_true.
ENDIF.
IF ( lv_data_changed = abap_true ).
io_modify->update( iv_node = is_ctx-node_key
iv_key = lr_tier_lt_backup->key
is_data = lr_tier_lt_backup ).
ENDIF.
UNASSIGN <fs_tier>.
CLEAR: lv_release,
lv_data_changed.
ENDLOOP.
ENDCASE.
CATCH /bobf/cx_frw. " Exception class
ENDTRY.
ENDMETHOD.
METHOD determine_a_storage_datacenter.
DATA: lt_add_storage_dc TYPE /hec1/t_add_storage_dc_ct,
lt_add_storage_dc_before TYPE /hec1/t_add_storage_dc_ct,
lr_add_storage_dc TYPE REF TO /hec1/s_add_storage_dc_cs,
lt_phase TYPE /hec1/t_data_phase_ct,
lt_act_param_phasing TYPE TABLE OF /hec1/s_act_phase_inherit.
CLEAR:
eo_message,
et_failed_key.
io_read->retrieve( EXPORTING iv_node = is_ctx-node_key
it_key = it_key
IMPORTING et_data = lt_add_storage_dc ).
/hec1/cl_config_helper=>get_general_data( EXPORTING iv_node_key = is_ctx-node_key
it_key = it_key
io_read = io_read
IMPORTING ev_root_key = DATA(lv_root_key)
er_landscape = DATA(lr_landscape)
er_delivery_unit = DATA(lr_dlvy_unit)
et_datacenter = DATA(lt_datacenter) ).
TRY.
CASE is_ctx-det_key.
" ***************************************************************************
" Create mode
" ***************************************************************************
WHEN /hec1/if_configuration_c=>sc_determination-add_storage_datacenter-create.
LOOP AT lt_add_storage_dc REFERENCE INTO lr_add_storage_dc.
DATA(lv_inst_status) = COND /hec1/config_instance_status( WHEN lr_add_storage_dc->hec_node_datacenter_ref IS NOT INITIAL
THEN /hec1/if_config_constants=>gc_instance_status-complete
ELSE /hec1/if_config_constants=>gc_instance_status-incomplete ).
lr_add_storage_dc->hec_delete_visible = abap_true.
" Check instance status and switch
IF ( lv_inst_status <> lr_add_storage_dc->hec_instance_status ).
lr_add_storage_dc->hec_instance_status = lv_inst_status.
DATA(lv_data_changed) = abap_true.
ENDIF.
IF ( lv_data_changed = abap_true ).
io_modify->update( iv_node = is_ctx-node_key
iv_key = lr_add_storage_dc->key
is_data = lr_add_storage_dc ).
ENDIF.
CLEAR: lv_inst_status,
lv_data_changed.
ENDLOOP.
* " ***************************************************************************
* " update mode
* " ***************************************************************************
WHEN /hec1/if_configuration_c=>sc_determination-add_storage_datacenter-update.
io_read->retrieve( EXPORTING iv_node = is_ctx-node_key
it_key = it_key
iv_before_image = abap_true
IMPORTING et_data = lt_add_storage_dc_before ).
io_read->retrieve_by_association( EXPORTING iv_node = /hec1/if_configuration_c=>sc_node-root
it_key = VALUE #( ( key = lv_root_key ) )
iv_fill_data = abap_true
iv_association = /hec1/if_configuration_c=>sc_association-root-phase
IMPORTING et_data = lt_phase ).
LOOP AT lt_add_storage_dc REFERENCE INTO lr_add_storage_dc.
ASSIGN lt_add_storage_dc_before[ key = lr_add_storage_dc->key ] TO FIELD-SYMBOL(<fs_add_storage_dc_before>).
IF ( <fs_add_storage_dc_before> IS ASSIGNED ).
* " if the infrastructure provider is set and there is datacenter assigned
IF ( lr_dlvy_unit->hec_inf_provider_guid IS NOT INITIAL ).
DATA(ls_datacenter) = VALUE #( lt_datacenter[ hec_node_datacenter = lr_add_storage_dc->hec_node_datacenter_ref ] OPTIONAL ).
lr_add_storage_dc->* = VALUE #( BASE lr_add_storage_dc->*
hec_node_datacenter_ref = ls_datacenter-hec_node_datacenter
hec_datacenter_descr_ref = COND #( WHEN ls_datacenter-hec_datacenter_descr IS NOT INITIAL
THEN ls_datacenter-hec_datacenter_descr
ELSE space )
hec_tree_descr = COND #( WHEN ls_datacenter-hec_datacenter_guid IS NOT INITIAL
THEN |{ ls_datacenter-hec_datacenter_descr }|
ELSE |<new datacenter>| )
).
lv_data_changed = abap_true.
ENDIF.
"-----------------------------------
" Phasing has changed
"-----------------------------------
IF ( lr_add_storage_dc->hec_phase_guid NE <fs_add_storage_dc_before>-hec_phase_guid ).
APPEND VALUE #( hec_node_key = is_ctx-node_key
hec_bopf_key = lr_add_storage_dc->key
hec_phase_guid_new = lr_add_storage_dc->hec_phase_guid
hec_phase_guid_old = <fs_add_storage_dc_before>-hec_phase_guid ) TO lt_act_param_phasing.
lr_add_storage_dc->hec_phase_changed = abap_true.
lv_data_changed = abap_true.
ENDIF. "Phase changed
" Reset Datacenter
IF ( <fs_add_storage_dc_before>-hec_node_datacenter_ref IS NOT INITIAL ) AND ( lr_add_storage_dc->hec_node_datacenter_ref IS INITIAL ).
CLEAR: lr_add_storage_dc->hec_datacenter_descr_ref.
lv_data_changed = abap_true.
ENDIF.
" Set Datacenter Descr / Tree Descr
IF ( <fs_add_storage_dc_before>-hec_datacenter_descr_ref NE lr_add_storage_dc->hec_datacenter_descr_ref ).
lr_add_storage_dc->hec_tree_descr = COND #( WHEN lr_add_storage_dc->hec_datacenter_descr_ref IS INITIAL
THEN ||
ELSE |{ lr_add_storage_dc->hec_datacenter_descr_ref }| ).
lv_data_changed = abap_true.
ENDIF.
ENDIF.
"-----------------------------------
" Check instance status and switch
"-----------------------------------
lv_inst_status = COND /hec1/config_instance_status( WHEN lr_add_storage_dc->hec_node_datacenter_ref IS NOT INITIAL
THEN /hec1/if_config_constants=>gc_instance_status-complete
ELSE /hec1/if_config_constants=>gc_instance_status-incomplete ).
lr_add_storage_dc->hec_delete_visible = abap_true.
IF ( lv_inst_status <> lr_add_storage_dc->hec_instance_status ).
lr_add_storage_dc->hec_instance_status = lv_inst_status.
lv_data_changed = abap_true.
ENDIF.
IF ( lv_data_changed = abap_true ).
io_modify->update( iv_node = is_ctx-node_key
iv_key = lr_add_storage_dc->key
is_data = lr_add_storage_dc ).
ENDIF.
CLEAR: lv_inst_status,
lv_data_changed.
UNASSIGN <fs_add_storage_dc_before>.
ENDLOOP. "LOOP AT lt_add_service REFERENCE INTO lr_add_service.
"-----------------------------------
" Update Phasing
"-----------------------------------
IF ( lt_act_param_phasing IS NOT INITIAL ).
me->mr_act_param_phasing = NEW /hec1/t_act_phase_inherit( lt_act_param_phasing ).
/hec1/cl_config_det_general=>/hec1/if_config_det_general~set_act_node_keys(
is_ctx = CORRESPONDING #( is_ctx )
it_key = it_key
iv_action = /hec1/cl_config_det_general=>/hec1/if_config_det_general~get_act_key( /hec1/if_config_constant=>gc_act_method-inherit_phase_assignment )
iv_act_exectime = /bobf/if_conf_c=>sc_time_after_validation
ir_act_param = me->mr_act_param_phasing ).
ENDIF.
ENDCASE.
CATCH /bobf/cx_frw. " Exception class
ENDTRY.
ENDMETHOD.
METHOD determine_a_storage_dcenter_cr.
DATA: lt_add_storage_dc TYPE /hec1/t_add_storage_dc_ct,
lt_add_storage_dc_before TYPE /hec1/t_add_storage_dc_ct,
lr_add_storage_dc TYPE REF TO /hec1/s_add_storage_dc_cs,
lt_phase TYPE /hec1/t_data_phase_ct,
lt_act_param_phasing TYPE TABLE OF /hec1/s_act_phase_inherit.
CLEAR:
eo_message,
et_failed_key.
io_read->retrieve( EXPORTING iv_node = is_ctx-node_key
it_key = it_key
IMPORTING et_data = lt_add_storage_dc ).
/hec1/cl_config_helper=>get_general_data( EXPORTING iv_node_key = is_ctx-node_key
it_key = it_key
io_read = io_read
IMPORTING ev_root_key = DATA(lv_root_key)
er_landscape = DATA(lr_landscape)
er_delivery_unit = DATA(lr_dlvy_unit)
et_datacenter = DATA(lt_datacenter) ).
TRY.
CASE is_ctx-det_key.
" ***************************************************************************
" Create mode
" ***************************************************************************
WHEN /hec1/if_configuration_c=>sc_determination-add_storage_datacenter-create.
LOOP AT lt_add_storage_dc REFERENCE INTO lr_add_storage_dc.
DATA(lv_inst_status) = COND /hec1/config_instance_status( WHEN lr_add_storage_dc->hec_node_datacenter_ref IS NOT INITIAL
THEN /hec1/if_config_constants=>gc_instance_status-complete
ELSE /hec1/if_config_constants=>gc_instance_status-incomplete ).
lr_add_storage_dc->hec_delete_visible = abap_true.
" Check instance status and switch
IF ( lv_inst_status <> lr_add_storage_dc->hec_instance_status ).
lr_add_storage_dc->hec_instance_status = lv_inst_status.
DATA(lv_data_changed) = abap_true.
ENDIF.
"------------------------------------------
" Set CR related fields from the ROOT node
"------------------------------------------
DATA(lv_cr_data_changed) = /hec1/cl_config_helper=>SET_CR_RELATED_FIELDS(
EXPORTING
is_ctx = is_ctx
it_key = it_key
io_read = io_read
io_modify = io_modify
iv_mod_type = /hec1/if_config_constants=>gc_comp_mod_type-added
is_node_data = lr_add_storage_dc
iv_set_apm = abap_true
iv_clear_phase = abap_true
).
IF lv_data_changed = abap_false.
lv_data_changed = lv_cr_data_changed.
ENDIF.
IF ( lv_data_changed = abap_true ).
io_modify->update( iv_node = is_ctx-node_key
iv_key = lr_add_storage_dc->key
is_data = lr_add_storage_dc ).
ENDIF.
CLEAR: lv_inst_status,
lv_data_changed.
ENDLOOP.
* " ***************************************************************************
* " update mode
* " ***************************************************************************
WHEN /hec1/if_configuration_c=>sc_determination-add_storage_datacenter-update.
io_read->retrieve( EXPORTING iv_node = is_ctx-node_key
it_key = it_key
iv_before_image = abap_true
IMPORTING et_data = lt_add_storage_dc_before ).
io_read->retrieve_by_association( EXPORTING iv_node = /hec1/if_configuration_c=>sc_node-root
it_key = VALUE #( ( key = lv_root_key ) )
iv_fill_data = abap_true
iv_association = /hec1/if_configuration_c=>sc_association-root-phase
IMPORTING et_data = lt_phase ).
LOOP AT lt_add_storage_dc REFERENCE INTO lr_add_storage_dc.
ASSIGN lt_add_storage_dc_before[ key = lr_add_storage_dc->key ] TO FIELD-SYMBOL(<fs_add_storage_dc_before>).
IF ( <fs_add_storage_dc_before> IS ASSIGNED ).
* " if the infrastructure provider is set and there is datacenter assigned
IF ( lr_dlvy_unit->hec_inf_provider_guid IS NOT INITIAL ).
DATA(ls_datacenter) = VALUE #( lt_datacenter[ hec_node_datacenter = lr_add_storage_dc->hec_node_datacenter_ref ] OPTIONAL ).
lr_add_storage_dc->* = VALUE #( BASE lr_add_storage_dc->*
hec_node_datacenter_ref = ls_datacenter-hec_node_datacenter
hec_datacenter_descr_ref = COND #( WHEN ls_datacenter-hec_datacenter_descr IS NOT INITIAL
THEN ls_datacenter-hec_datacenter_descr
ELSE space )
hec_tree_descr = COND #( WHEN ls_datacenter-hec_datacenter_guid IS NOT INITIAL
THEN |{ ls_datacenter-hec_datacenter_descr }|
ELSE |<new datacenter>| )
).
lv_data_changed = abap_true.
ENDIF.
"-----------------------------------
" Phasing has changed
"-----------------------------------
IF ( lr_add_storage_dc->hec_phase_guid NE <fs_add_storage_dc_before>-hec_phase_guid ).
APPEND VALUE #( hec_node_key = is_ctx-node_key
hec_bopf_key = lr_add_storage_dc->key
hec_phase_guid_new = lr_add_storage_dc->hec_phase_guid
hec_phase_guid_old = <fs_add_storage_dc_before>-hec_phase_guid ) TO lt_act_param_phasing.
lr_add_storage_dc->hec_phase_changed = abap_true.
lv_data_changed = abap_true.
ENDIF. "Phase changed
" Reset Datacenter
IF ( <fs_add_storage_dc_before>-hec_node_datacenter_ref IS NOT INITIAL ) AND ( lr_add_storage_dc->hec_node_datacenter_ref IS INITIAL ).
CLEAR: lr_add_storage_dc->hec_datacenter_descr_ref.
lv_data_changed = abap_true.
ENDIF.
" Set Datacenter Descr / Tree Descr
IF ( <fs_add_storage_dc_before>-hec_datacenter_descr_ref NE lr_add_storage_dc->hec_datacenter_descr_ref ).
lr_add_storage_dc->hec_tree_descr = COND #( WHEN lr_add_storage_dc->hec_datacenter_descr_ref IS INITIAL
THEN ||
ELSE |{ lr_add_storage_dc->hec_datacenter_descr_ref }| ).
lv_data_changed = abap_true.
ENDIF.
ENDIF.
"-----------------------------------
" Check instance status and switch
"-----------------------------------
lv_inst_status = COND /hec1/config_instance_status( WHEN lr_add_storage_dc->hec_node_datacenter_ref IS NOT INITIAL
THEN /hec1/if_config_constants=>gc_instance_status-complete
ELSE /hec1/if_config_constants=>gc_instance_status-incomplete ).
lr_add_storage_dc->hec_delete_visible = abap_true.
IF ( lv_inst_status <> lr_add_storage_dc->hec_instance_status ).
lr_add_storage_dc->hec_instance_status = lv_inst_status.
lv_data_changed = abap_true.
ENDIF.
IF ( lv_data_changed = abap_true ).
io_modify->update( iv_node = is_ctx-node_key
iv_key = lr_add_storage_dc->key
is_data = lr_add_storage_dc ).
ENDIF.
CLEAR: lv_inst_status,
lv_data_changed.
UNASSIGN <fs_add_storage_dc_before>.
ENDLOOP. "LOOP AT lt_add_service REFERENCE INTO lr_add_service.
"-----------------------------------
" Update Phasing
"-----------------------------------
IF ( lt_act_param_phasing IS NOT INITIAL ).
me->mr_act_param_phasing = NEW /hec1/t_act_phase_inherit( lt_act_param_phasing ).
/hec1/cl_config_det_general=>/hec1/if_config_det_general~set_act_node_keys(
is_ctx = CORRESPONDING #( is_ctx )
it_key = it_key
iv_action = /hec1/cl_config_det_general=>/hec1/if_config_det_general~get_act_key( /hec1/if_config_constant=>gc_act_method-inherit_phase_assignment )
iv_act_exectime = /bobf/if_conf_c=>sc_time_after_validation
ir_act_param = me->mr_act_param_phasing ).
ENDIF.
ENDCASE.
CATCH /bobf/cx_frw. " Exception class
ENDTRY.
ENDMETHOD.
METHOD determine_a_storage_class.
DATA: lt_add_storage_class TYPE /hec1/t_add_storage_class_ct,
lt_longterm_backup_cl_before TYPE /hec1/t_add_storage_class_ct,
lr_add_storage_cl TYPE REF TO /hec1/s_add_storage_class_cs,
lt_phase TYPE /hec1/t_data_phase_ct.
* ls_act_param_tier_ltb TYPE /hec1/s_act_update_tier_ltb. "not supported yet
CLEAR:
eo_message,
et_failed_key.
io_read->retrieve( EXPORTING iv_node = is_ctx-node_key
it_key = it_key
IMPORTING et_data = lt_add_storage_class ).
/hec1/cl_config_helper=>get_general_data( EXPORTING iv_node_key = is_ctx-node_key
it_key = it_key
io_read = io_read
IMPORTING ev_root_key = DATA(lv_root_key)
er_landscape = DATA(lr_landscape)
er_delivery_unit = DATA(lr_dlvy_unit)
et_datacenter = DATA(lt_datacenter) ).
TRY.
CASE is_ctx-det_key.
" ***************************************************************************
" Create mode
" ***************************************************************************
WHEN /hec1/if_configuration_c=>sc_determination-add_storage_class-create.
LOOP AT lt_add_storage_class REFERENCE INTO lr_add_storage_cl.
DATA(lv_inst_status) = COND /hec1/config_instance_status( WHEN lr_add_storage_cl->hec_astore_class_guid IS NOT INITIAL AND
lr_add_storage_cl->hec_node_datacenter_ref IS NOT INITIAL
* lr_add_storage_cl->hec_phase_guid IS NOT INITIAL
THEN /hec1/if_config_constants=>gc_instance_status-complete
ELSE /hec1/if_config_constants=>gc_instance_status-incomplete ).
lr_add_storage_cl->hec_delete_visible = abap_true.
" Check instance status and switch
IF ( lv_inst_status <> lr_add_storage_cl->hec_instance_status ).
lr_add_storage_cl->hec_instance_status = lv_inst_status.
DATA(lv_data_changed) = abap_true.
ENDIF.
IF ( lv_data_changed = abap_true ).
io_modify->update( iv_node = is_ctx-node_key
iv_key = lr_add_storage_cl->key
is_data = lr_add_storage_cl ).
ENDIF.
CLEAR: lv_inst_status,
lv_data_changed.
ENDLOOP.
* " ***************************************************************************
* " update mode
* " ***************************************************************************
WHEN /hec1/if_configuration_c=>sc_determination-add_storage_class-update.
* CLEAR: ls_act_param_tier_ltb.
io_read->retrieve( EXPORTING iv_node = is_ctx-node_key
it_key = it_key
iv_before_image = abap_true
IMPORTING et_data = lt_longterm_backup_cl_before ).
io_read->retrieve_by_association( EXPORTING iv_node = /hec1/if_configuration_c=>sc_node-root
it_key = VALUE #( ( key = lv_root_key ) )
iv_fill_data = abap_true
iv_association = /hec1/if_configuration_c=>sc_association-root-phase
IMPORTING et_data = lt_phase ).
LOOP AT lt_add_storage_class REFERENCE INTO lr_add_storage_cl.
ASSIGN lt_longterm_backup_cl_before[ key = lr_add_storage_cl->key ] TO FIELD-SYMBOL(<fs_longterm_backup_before>).
IF ( <fs_longterm_backup_before> IS ASSIGNED ).
DATA(ls_datacenter) = VALUE #( lt_datacenter[ hec_node_datacenter = lr_add_storage_cl->hec_node_datacenter_ref ] OPTIONAL ).
" Get service class data
SELECT SINGLE hec_shared_storage_descr, hec_cb_pricing_lb_guid INTO @DATA(lv_add_storage_descr)
FROM /hec1/a_sha_stor
WHERE hec_apm_guid = @lr_add_storage_cl->hec_apm_guid
AND hec_infra_provider_guid = @lr_dlvy_unit->hec_inf_provider_guid
AND hec_sec_datacenter_guid = @ls_datacenter-hec_datacenter_guid
AND hec_shared_storage_guid = @lr_add_storage_cl->hec_astore_class_guid.
IF ( sy-subrc = 0 ).
lr_add_storage_cl->* = VALUE #( BASE lr_add_storage_cl->*
hec_astore_class_descr = lv_add_storage_descr-hec_shared_storage_descr
).
"Set add storage class description in case it is empty
IF ( lr_add_storage_cl->hec_astore_class_guid IS NOT INITIAL ) AND
( lr_add_storage_cl->hec_astore_class_descr IS NOT INITIAL ) AND
( lr_add_storage_cl->hec_astore_class_descr_ext IS INITIAL ).
lr_add_storage_cl->hec_astore_class_descr_ext = lr_add_storage_cl->hec_astore_class_descr.
ENDIF.
lv_data_changed = abap_true.
ENDIF.
"-----------------------------------
" Resets -> TODO move to actions
"-----------------------------------
" Reset Service Description
IF ( lr_add_storage_cl->hec_astore_class_guid IS INITIAL ).
IF ( lr_add_storage_cl->hec_astore_class_descr = lr_add_storage_cl->hec_astore_class_descr_ext ).
CLEAR: lr_add_storage_cl->hec_astore_class_descr_ext.
ENDIF.
CLEAR: lr_add_storage_cl->hec_astore_class_descr.
lv_data_changed = abap_true.
ENDIF.
IF ( <fs_longterm_backup_before>-hec_astore_class_descr_ext <> lr_add_storage_cl->hec_astore_class_descr_ext ).
lr_add_storage_cl->hec_tree_descr = COND #( WHEN lr_add_storage_cl->hec_astore_class_descr IS NOT INITIAL
THEN |{ lr_add_storage_cl->hec_astore_class_descr } : { lr_add_storage_cl->hec_astore_class_descr_ext }|
ELSE |{ lr_add_storage_cl->hec_astore_class_descr_ext }| ).
lv_data_changed = abap_true.
ENDIF.
IF ( <fs_longterm_backup_before>-hec_astore_class_descr <> lr_add_storage_cl->hec_astore_class_descr ).
lr_add_storage_cl->hec_tree_descr = COND #( WHEN lr_add_storage_cl->hec_astore_class_descr IS NOT INITIAL
THEN |{ lr_add_storage_cl->hec_astore_class_descr } : { lr_add_storage_cl->hec_astore_class_descr_ext }|
ELSE |{ lr_add_storage_cl->hec_astore_class_descr_ext }| ).
lv_data_changed = abap_true.
ENDIF.
"-----------------------------------
" Check instance status and switch
"-----------------------------------
lv_inst_status = COND /hec1/config_instance_status( WHEN lr_add_storage_cl->hec_astore_class_guid IS NOT INITIAL AND
lr_add_storage_cl->hec_node_datacenter_ref IS NOT INITIAL
THEN /hec1/if_config_constants=>gc_instance_status-complete
ELSE /hec1/if_config_constants=>gc_instance_status-incomplete ).
lr_add_storage_cl->hec_delete_visible = abap_true.
IF ( lv_inst_status <> lr_add_storage_cl->hec_instance_status ).
lr_add_storage_cl->hec_instance_status = lv_inst_status.
lv_data_changed = abap_true.
ENDIF.
" check, if assigned tier_lt_backup nodes must be updated
IF ( lr_add_storage_cl->hec_astore_class_guid <> <fs_longterm_backup_before>-hec_astore_class_guid )
OR ( lr_add_storage_cl->hec_astore_class_descr_ext <> <fs_longterm_backup_before>-hec_astore_class_descr_ext ).
* ls_act_param_tier_ltb = CORRESPONDING /hec1/s_act_update_tier_ltb( lr_add_storage_cl->* ). "not supported yet
ENDIF.
""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Update TIER_ADD_STORAGE - not suported yet
""""""""""""""""""""""""""""""""""""""""""""""""""""""
IF ( lv_data_changed = abap_true ).
io_modify->update( iv_node = is_ctx-node_key
iv_key = lr_add_storage_cl->key
is_data = lr_add_storage_cl ).
ENDIF.
CLEAR: lv_inst_status,
lv_data_changed.
ENDIF.
UNASSIGN <fs_longterm_backup_before>.
ENDLOOP. "LOOP AT lt_add_service REFERENCE INTO lr_add_service.
ENDCASE.
CATCH /bobf/cx_frw. " Exception class
ENDTRY.
ENDMETHOD.
METHOD determine_a_storage_class_cr.
DATA: lt_add_storage_class TYPE /hec1/t_add_storage_class_ct,
lt_longterm_backup_cl_before TYPE /hec1/t_add_storage_class_ct,
lr_add_storage_cl TYPE REF TO /hec1/s_add_storage_class_cs,
lt_phase TYPE /hec1/t_data_phase_ct.
* ls_act_param_tier_ltb TYPE /hec1/s_act_update_tier_ltb. "not supported yet
CLEAR:
eo_message,
et_failed_key.
io_read->retrieve( EXPORTING iv_node = is_ctx-node_key
it_key = it_key
IMPORTING et_data = lt_add_storage_class ).
/hec1/cl_config_helper=>get_general_data( EXPORTING iv_node_key = is_ctx-node_key
it_key = it_key
io_read = io_read
IMPORTING ev_root_key = DATA(lv_root_key)
er_landscape = DATA(lr_landscape)
er_delivery_unit = DATA(lr_dlvy_unit)
et_datacenter = DATA(lt_datacenter) ).
TRY.
CASE is_ctx-det_key.
" ***************************************************************************
" Create mode
" ***************************************************************************
WHEN /hec1/if_configuration_c=>sc_determination-lt_backup_class-create.
LOOP AT lt_add_storage_class REFERENCE INTO lr_add_storage_cl.
DATA(lv_inst_status) = COND /hec1/config_instance_status( WHEN lr_add_storage_cl->hec_astore_class_guid IS NOT INITIAL AND
lr_add_storage_cl->hec_node_datacenter_ref IS NOT INITIAL
* lr_add_storage_cl->hec_phase_guid IS NOT INITIAL
THEN /hec1/if_config_constants=>gc_instance_status-complete
ELSE /hec1/if_config_constants=>gc_instance_status-incomplete ).
lr_add_storage_cl->hec_delete_visible = abap_true.
" Check instance status and switch
IF ( lv_inst_status <> lr_add_storage_cl->hec_instance_status ).
lr_add_storage_cl->hec_instance_status = lv_inst_status.
DATA(lv_data_changed) = abap_true.
ENDIF.
"------------------------------------------
" Set CR related fields from the ROOT node
"------------------------------------------
DATA(lv_cr_data_changed) = /hec1/cl_config_helper=>SET_CR_RELATED_FIELDS(
EXPORTING
is_ctx = is_ctx
it_key = it_key
io_read = io_read
io_modify = io_modify
iv_mod_type = /hec1/if_config_constants=>gc_comp_mod_type-added
is_node_data = lr_add_storage_cl
iv_set_apm = abap_true
iv_clear_phase = abap_true
).
IF lv_data_changed = abap_false.
lv_data_changed = lv_cr_data_changed.
ENDIF.
IF ( lv_data_changed = abap_true ).
io_modify->update( iv_node = is_ctx-node_key
iv_key = lr_add_storage_cl->key
is_data = lr_add_storage_cl ).
ENDIF.
CLEAR: lv_inst_status,
lv_data_changed.
ENDLOOP.
* " ***************************************************************************
* " update mode
* " ***************************************************************************
WHEN /hec1/if_configuration_c=>sc_determination-lt_backup_class-update.
* CLEAR: ls_act_param_tier_ltb.
io_read->retrieve( EXPORTING iv_node = is_ctx-node_key
it_key = it_key
iv_before_image = abap_true
IMPORTING et_data = lt_longterm_backup_cl_before ).
io_read->retrieve_by_association( EXPORTING iv_node = /hec1/if_configuration_c=>sc_node-root
it_key = VALUE #( ( key = lv_root_key ) )
iv_fill_data = abap_true
iv_association = /hec1/if_configuration_c=>sc_association-root-phase
IMPORTING et_data = lt_phase ).
LOOP AT lt_add_storage_class REFERENCE INTO lr_add_storage_cl.
ASSIGN lt_longterm_backup_cl_before[ key = lr_add_storage_cl->key ] TO FIELD-SYMBOL(<fs_longterm_backup_before>).
IF ( <fs_longterm_backup_before> IS ASSIGNED ).
DATA(ls_datacenter) = VALUE #( lt_datacenter[ hec_node_datacenter = lr_add_storage_cl->hec_node_datacenter_ref ] OPTIONAL ).
" Get service class data
SELECT SINGLE hec_shared_storage_descr, hec_cb_pricing_lb_guid INTO @DATA(lv_add_storage_descr)
FROM /hec1/a_sha_stor
WHERE hec_apm_guid = @lr_add_storage_cl->hec_apm_guid
AND hec_infra_provider_guid = @lr_dlvy_unit->hec_inf_provider_guid
AND hec_sec_datacenter_guid = @ls_datacenter-hec_datacenter_guid
AND hec_shared_storage_guid = @lr_add_storage_cl->hec_astore_class_guid.
IF ( sy-subrc = 0 ).
lr_add_storage_cl->* = VALUE #( BASE lr_add_storage_cl->*
hec_astore_class_descr = lv_add_storage_descr-hec_shared_storage_descr
).
"Set longterm backup description in case it is empty
IF ( lr_add_storage_cl->hec_astore_class_guid IS NOT INITIAL ) AND
( lr_add_storage_cl->hec_astore_class_descr IS NOT INITIAL ) AND
( lr_add_storage_cl->hec_astore_class_descr_ext IS INITIAL ).
lr_add_storage_cl->hec_astore_class_descr_ext = lr_add_storage_cl->hec_astore_class_descr.
ENDIF.
lv_data_changed = abap_true.
ENDIF.
"-----------------------------------
" Resets -> TODO move to actions
"-----------------------------------
" Reset Service Description
IF ( lr_add_storage_cl->hec_astore_class_guid IS INITIAL ).
IF ( lr_add_storage_cl->hec_astore_class_descr = lr_add_storage_cl->hec_astore_class_descr_ext ).
CLEAR: lr_add_storage_cl->hec_astore_class_descr_ext.
ENDIF.
CLEAR: lr_add_storage_cl->hec_astore_class_descr.
lv_data_changed = abap_true.
ENDIF.
IF ( <fs_longterm_backup_before>-hec_astore_class_descr_ext <> lr_add_storage_cl->hec_astore_class_descr_ext ).
lr_add_storage_cl->hec_tree_descr = COND #( WHEN lr_add_storage_cl->hec_astore_class_descr IS NOT INITIAL
THEN |{ lr_add_storage_cl->hec_astore_class_descr } : { lr_add_storage_cl->hec_astore_class_descr_ext }|
ELSE |{ lr_add_storage_cl->hec_astore_class_descr_ext }| ).
lv_data_changed = abap_true.
ENDIF.
IF ( <fs_longterm_backup_before>-hec_astore_class_descr <> lr_add_storage_cl->hec_astore_class_descr ).
lr_add_storage_cl->hec_tree_descr = COND #( WHEN lr_add_storage_cl->hec_astore_class_descr IS NOT INITIAL
THEN |{ lr_add_storage_cl->hec_astore_class_descr } : { lr_add_storage_cl->hec_astore_class_descr_ext }|
ELSE |{ lr_add_storage_cl->hec_astore_class_descr_ext }| ).
lv_data_changed = abap_true.
ENDIF.
"-----------------------------------
" Check instance status and switch
"-----------------------------------
lv_inst_status = COND /hec1/config_instance_status( WHEN lr_add_storage_cl->hec_astore_class_guid IS NOT INITIAL AND
lr_add_storage_cl->hec_node_datacenter_ref IS NOT INITIAL
THEN /hec1/if_config_constants=>gc_instance_status-complete
ELSE /hec1/if_config_constants=>gc_instance_status-incomplete ).
lr_add_storage_cl->hec_delete_visible = abap_true.
IF ( lv_inst_status <> lr_add_storage_cl->hec_instance_status ).
lr_add_storage_cl->hec_instance_status = lv_inst_status.
lv_data_changed = abap_true.
ENDIF.
" check, if assigned tier_lt_backup nodes must be updated
IF ( lr_add_storage_cl->hec_astore_class_guid <> <fs_longterm_backup_before>-hec_astore_class_guid )
OR ( lr_add_storage_cl->hec_astore_class_descr_ext <> <fs_longterm_backup_before>-hec_astore_class_descr_ext ).
* ls_act_param_tier_ltb = CORRESPONDING /hec1/s_act_update_tier_ltb( lr_add_storage_cl->* ). "not supported yet
ENDIF.
""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Update TIER_LT_BACKUP - not suported yet
""""""""""""""""""""""""""""""""""""""""""""""""""""""
* IF ( ls_act_param_tier_ltb IS NOT INITIAL ).
* me->mr_act_param_tier_ltb = NEW /hec1/s_act_update_tier_ltb( ls_act_param_tier_ltb ).
*
* /hec1/cl_config_det_general=>/hec1/if_config_det_general~set_act_node_keys(
* is_ctx = CORRESPONDING #( is_ctx )
* it_key = it_key
* iv_action = /hec1/cl_config_det_general=>/hec1/if_config_det_general~get_act_key( /hec1/if_config_constant=>gc_act_method-update_tier_lt_backup )
* iv_act_exectime = /bobf/if_conf_c=>sc_time_after_validation
* ir_act_param = me->mr_act_param_tier_ltb ).
* ENDIF.
IF ( lv_data_changed = abap_true ).
io_modify->update( iv_node = is_ctx-node_key
iv_key = lr_add_storage_cl->key
is_data = lr_add_storage_cl ).
ENDIF.
CLEAR: lv_inst_status,
lv_data_changed.
ENDIF.
UNASSIGN <fs_longterm_backup_before>.
ENDLOOP. "LOOP AT lt_add_service REFERENCE INTO lr_add_service.
ENDCASE.
CATCH /bobf/cx_frw. " Exception class
ENDTRY.
ENDMETHOD.
METHOD determine_a_storage_amount.
DATA: lt_add_storage_amount TYPE /hec1/t_add_storage_amount_ct,
lt_add_storage_bef_amount TYPE /hec1/t_add_storage_amount_ct,
lr_add_storage_amount TYPE REF TO /hec1/s_add_storage_amount_cs,
lt_phase TYPE /hec1/t_data_phase_ct,
lt_act_param_phasing TYPE TABLE OF /hec1/s_act_phase_inherit.
CLEAR:
eo_message,
et_failed_key.
io_read->retrieve( EXPORTING iv_node = is_ctx-node_key
it_key = it_key
IMPORTING et_data = lt_add_storage_amount ).
/hec1/cl_config_helper=>get_general_data( EXPORTING iv_node_key = is_ctx-node_key
it_key = it_key
io_read = io_read
IMPORTING ev_root_key = DATA(lv_root_key)
er_landscape = DATA(lr_landscape)
er_delivery_unit = DATA(lr_dlvy_unit)
et_datacenter = DATA(lt_datacenter) ).
TRY.
CASE is_ctx-det_key.
" ***************************************************************************
" Create mode
" ***************************************************************************
WHEN /hec1/if_configuration_c=>sc_determination-add_storage_amount-create.
LOOP AT lt_add_storage_amount REFERENCE INTO lr_add_storage_amount.
DATA(lv_inst_status) = COND /hec1/config_instance_status( WHEN lr_add_storage_amount->hec_astore_class_guid IS NOT INITIAL AND
lr_add_storage_amount->hec_node_datacenter_ref IS NOT INITIAL AND
lr_add_storage_amount->hec_phase_guid IS NOT INITIAL
THEN /hec1/if_config_constants=>gc_instance_status-complete
ELSE /hec1/if_config_constants=>gc_instance_status-incomplete ).
lr_add_storage_amount->hec_delete_visible = abap_true.
" Check instance status and switch
IF ( lv_inst_status <> lr_add_storage_amount->hec_instance_status ).
lr_add_storage_amount->hec_instance_status = lv_inst_status.
DATA(lv_data_changed) = abap_true.
ENDIF.
IF ( lv_data_changed = abap_true ).
io_modify->update( iv_node = is_ctx-node_key
iv_key = lr_add_storage_amount->key
is_data = lr_add_storage_amount ).
ENDIF.
CLEAR: lv_inst_status,
lv_data_changed.
ENDLOOP.
* " ***************************************************************************
* " update mode
* " ***************************************************************************
WHEN /hec1/if_configuration_c=>sc_determination-add_storage_amount-update.
io_read->retrieve( EXPORTING iv_node = is_ctx-node_key
it_key = it_key
iv_before_image = abap_true
IMPORTING et_data = lt_add_storage_bef_amount ).
io_read->retrieve_by_association( EXPORTING iv_node = /hec1/if_configuration_c=>sc_node-root
it_key = VALUE #( ( key = lv_root_key ) )
iv_fill_data = abap_true
iv_association = /hec1/if_configuration_c=>sc_association-root-phase
IMPORTING et_data = lt_phase ).
LOOP AT lt_add_storage_amount REFERENCE INTO lr_add_storage_amount.
ASSIGN lt_add_storage_bef_amount[ key = lr_add_storage_amount->key ] TO FIELD-SYMBOL(<fs_add_storage_befor>).
IF ( <fs_add_storage_befor> IS ASSIGNED ).
TRY.
" if the infrastructure provider is set and there is datacenter assigned
" get the pricing
IF ( lr_dlvy_unit->hec_inf_provider_guid IS NOT INITIAL ) AND ( lr_add_storage_amount->hec_node_datacenter_ref IS NOT INITIAL ).
DATA(ls_datacenter) = VALUE #( lt_datacenter[ hec_node_datacenter = lr_add_storage_amount->hec_node_datacenter_ref ] OPTIONAL ).
SELECT SINGLE hec_cb_pricing_lb_guid INTO @DATA(lv_astore_legoblock)
FROM /hec1/a_sha_stor
WHERE hec_apm_guid = @lr_add_storage_amount->hec_apm_guid
AND hec_infra_provider_guid = @lr_dlvy_unit->hec_inf_provider_guid
AND hec_sec_datacenter_guid = @ls_datacenter-hec_datacenter_guid
AND hec_shared_storage_guid = @lr_add_storage_amount->hec_astore_class_guid.
" Get pricing
SELECT SINGLE * INTO @DATA(ls_pricing) "#EC CI_ALL_FIELDS_NEEDED
FROM /hec1/c_cbp_lb
WHERE hec_price_lb = @lv_astore_legoblock.
IF ( sy-subrc = 0 ).
DATA(lv_exchange_rate) = lr_add_storage_amount->hec_exchange_rate. "Temp field because the ls_pricing structure overwrites the real exchange_rate
lr_add_storage_amount->* = VALUE #( BASE lr_add_storage_amount->*
hec_tree_descr = COND #( WHEN lr_add_storage_amount->hec_phase_guid IS INITIAL
THEN |{ VALUE #( lt_phase[ hec_node_phase = lr_add_storage_amount->hec_phase_guid ]-hec_phase_descr OPTIONAL ) } : { lr_add_storage_amount->hec_ast_amount }|
ELSE |{ lr_add_storage_amount->hec_ast_amount }| )
hec_month_price_fee = lr_add_storage_amount->hec_ast_amount * ls_pricing-hec_month_price_eur
price = CORRESPONDING #( BASE ( lr_add_storage_amount->price ) ls_pricing )
hec_exchange_rate = lv_exchange_rate
).
lv_data_changed = abap_true.
ENDIF.
lv_data_changed = abap_true.
ENDIF. " IF lv_infra_provider IS NOT INITIAL.
CATCH cx_sy_itab_line_not_found.
ENDTRY.
"-----------------------------------
" Phasing has changed
"-----------------------------------
IF ( lr_add_storage_amount->hec_phase_guid NE <fs_add_storage_befor>-hec_phase_guid ).
APPEND VALUE #( hec_node_key = is_ctx-node_key
hec_bopf_key = lr_add_storage_amount->key
hec_phase_guid_new = lr_add_storage_amount->hec_phase_guid
hec_phase_guid_old = <fs_add_storage_befor>-hec_phase_guid ) TO lt_act_param_phasing.
lr_add_storage_amount->hec_phase_changed = abap_true.
lv_data_changed = abap_true.
ENDIF. "Phase changed
ENDIF. "<<fs_add_storage_befor>> is assigned
"-----------------------------------
" Check instance status and switch
"-----------------------------------
lv_inst_status = COND /hec1/config_instance_status( WHEN lr_add_storage_amount->hec_astore_class_guid IS NOT INITIAL AND
lr_add_storage_amount->hec_node_datacenter_ref IS NOT INITIAL AND
lr_add_storage_amount->hec_phase_guid IS NOT INITIAL AND
lr_add_storage_amount->hec_ast_amount > 0
THEN /hec1/if_config_constants=>gc_instance_status-complete
ELSE /hec1/if_config_constants=>gc_instance_status-incomplete ).
lr_add_storage_amount->hec_delete_visible = abap_true.
IF ( lv_inst_status <> lr_add_storage_amount->hec_instance_status ).
lr_add_storage_amount->hec_instance_status = lv_inst_status.
lv_data_changed = abap_true.
ENDIF.
IF ( lv_data_changed = abap_true ).
io_modify->update( iv_node = is_ctx-node_key
iv_key = lr_add_storage_amount->key
is_data = lr_add_storage_amount ).
ENDIF.
CLEAR: lv_inst_status,
lv_data_changed.
UNASSIGN <fs_add_storage_befor>.
ENDLOOP. "LOOP AT lt_add_service REFERENCE INTO lr_add_service.
"-----------------------------------
" Update Phasing
"-----------------------------------
IF ( lt_act_param_phasing IS NOT INITIAL ).
me->mr_act_param_phasing = NEW /hec1/t_act_phase_inherit( lt_act_param_phasing ).
/hec1/cl_config_det_general=>/hec1/if_config_det_general~set_act_node_keys(
is_ctx = CORRESPONDING #( is_ctx )
it_key = it_key
iv_action = /hec1/cl_config_det_general=>/hec1/if_config_det_general~get_act_key( /hec1/if_config_constant=>gc_act_method-inherit_phase_assignment )
iv_act_exectime = /bobf/if_conf_c=>sc_time_after_validation
ir_act_param = me->mr_act_param_phasing ).
ENDIF.
*
ENDCASE.
*
CATCH /bobf/cx_frw. " Exception class
ENDTRY.
ENDMETHOD.
METHOD determine_a_storage_amount_cr.
ENDMETHOD.
ENDCLASS.
| [
31631,
1220,
258,
66,
16,
14,
565,
62,
11250,
62,
15255,
62,
64,
62,
30416,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
3268,
16879,
2043,
2751,
16034,
1220,
258,
66,
16,
14,
565,
62,
8019,
62,
67,
62,
16668,
4871,
198,
220,
25261,
198,
220,
29244,
6158,
44731,
764,
628,
220,
44731,
44513,
13,
198,
220,
48006,
9782,
1961,
44513,
13,
628,
220,
220,
220,
337,
36252,
50,
12260,
198,
220,
220,
220,
220,
220,
220,
220,
23848,
36,
20032,
17941,
764,
198,
220,
220,
220,
337,
36252,
50,
12260,
62,
21048,
198,
220,
220,
220,
220,
220,
220,
220,
23848,
36,
20032,
17941,
764,
198,
220,
4810,
3824,
6158,
44513,
13,
628,
220,
220,
220,
42865,
285,
81,
62,
529,
62,
17143,
41876,
4526,
37,
5390,
1366,
764,
198,
220,
220,
220,
42865,
285,
81,
62,
529,
62,
17143,
62,
746,
2313,
41876,
4526,
37,
5390,
1366,
764,
198,
220,
220,
220,
42865,
285,
81,
62,
529,
62,
17143,
62,
24948,
62,
2528,
65,
41876,
4526,
37,
5390,
1366,
764,
198,
220,
220,
220,
42865,
285,
81,
62,
529,
62,
17143,
62,
2528,
62,
17287,
41876,
4526,
37,
5390,
1366,
764,
628,
220,
220,
220,
337,
36252,
50,
5004,
62,
2528,
62,
1891,
929,
62,
19608,
330,
9255,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
271,
62,
49464,
220,
220,
220,
220,
220,
220,
220,
41876,
1220,
65,
672,
69,
14,
82,
62,
8310,
86,
62,
49464,
62,
15255,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
270,
62,
2539,
220,
220,
220,
220,
220,
220,
220,
41876,
1220,
65,
672,
69,
14,
83,
62,
8310,
86,
62,
2539,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
952,
62,
961,
220,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
1220,
65,
672,
69,
14,
361,
62,
8310,
86,
62,
961,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
952,
62,
4666,
1958,
220,
220,
220,
220,
41876,
4526,
37,
5390,
1220,
65,
672,
69,
14,
361,
62,
8310,
86,
62,
4666,
1958,
198,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
68,
78,
62,
20500,
220,
220,
220,
41876,
4526,
37,
5390,
1220,
65,
672,
69,
14,
361,
62,
8310,
86,
62,
20500,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
316,
62,
47904,
62,
2539,
41876,
1220,
65,
672,
69,
14,
83,
62,
8310,
86,
62,
2539,
764,
198,
220,
220,
220,
337,
36252,
50,
5004,
62,
64,
62,
35350,
62,
19608,
330,
9255,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
271,
62,
49464,
220,
220,
220,
220,
220,
220,
220,
41876,
1220,
65,
672,
69,
14,
82,
62,
8310,
86,
62,
49464,
62,
15255,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
270,
62,
2539,
220,
220,
220,
220,
220,
220,
220,
41876,
1220,
65,
672,
69,
14,
83,
62,
8310,
86,
62,
2539,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
952,
62,
961,
220,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
1220,
65,
672,
69,
14,
361,
62,
8310,
86,
62,
961,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
952,
62,
4666,
1958,
220,
220,
220,
220,
41876,
4526,
37,
5390,
1220,
65,
672,
69,
14,
361,
62,
8310,
86,
62,
4666,
1958,
198,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
68,
78,
62,
20500,
220,
220,
220,
41876,
4526,
37,
5390,
1220,
65,
672,
69,
14,
361,
62,
8310,
86,
62,
20500,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
316,
62,
47904,
62,
2539,
41876,
1220,
65,
672,
69,
14,
83,
62,
8310,
86,
62,
2539,
764,
198,
220,
220,
220,
337,
36252,
50,
5004,
62,
64,
62,
35350,
62,
67,
16159,
62,
6098,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
271,
62,
49464,
220,
220,
220,
220,
220,
220,
220,
41876,
1220,
65,
672,
69,
14,
82,
62,
8310,
86,
62,
49464,
62,
15255,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
270,
62,
2539,
220,
220,
220,
220,
220,
220,
220,
41876,
1220,
65,
672,
69,
14,
83,
62,
8310,
86,
62,
2539,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
952,
62,
961,
220,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
1220,
65,
672,
69,
14,
361,
62,
8310,
86,
62,
961,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
952,
62,
4666,
1958,
220,
220,
220,
220,
41876,
4526,
37,
5390,
1220,
65,
672,
69,
14,
361,
62,
8310,
86,
62,
4666,
1958,
198,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
68,
78,
62,
20500,
220,
220,
220,
41876,
4526,
37,
5390,
1220,
65,
672,
69,
14,
361,
62,
8310,
86,
62,
20500,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
316,
62,
47904,
62,
2539,
41876,
1220,
65,
672,
69,
14,
83,
62,
8310,
86,
62,
2539,
764,
198,
220,
220,
220,
337,
36252,
50,
5004,
62,
64,
62,
35350,
62,
4871,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
271,
62,
49464,
220,
220,
220,
220,
220,
220,
220,
41876,
1220,
65,
672,
69,
14,
82,
62,
8310,
86,
62,
49464,
62,
15255,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
270,
62,
2539,
220,
220,
220,
220,
220,
220,
220,
41876,
1220,
65,
672,
69,
14,
83,
62,
8310,
86,
62,
2539,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
952,
62,
961,
220,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
1220,
65,
672,
69,
14,
361,
62,
8310,
86,
62,
961,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
952,
62,
4666,
1958,
220,
220,
220,
220,
41876,
4526,
37,
5390,
1220,
65,
672,
69,
14,
361,
62,
8310,
86,
62,
4666,
1958,
198,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198
] | [
1,
1,
1,
1,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apgit_background_push_fi DEFINITION
PUBLIC
FINAL
CREATE PUBLIC .
PUBLIC SECTION.
INTERFACES yif_abapgit_background .
PROTECTED SECTION.
CONSTANTS:
BEGIN OF c_settings,
name TYPE string VALUE 'NAME',
email TYPE string VALUE 'EMAIL',
END OF c_settings .
DATA mo_log TYPE REF TO ycl_abapgit_log .
METHODS build_comment
IMPORTING
!is_files TYPE yif_abapgit_definitions=>ty_stage_files
RETURNING
VALUE(rv_comment) TYPE string .
METHODS push_fixed
IMPORTING
!io_repo TYPE REF TO ycl_abapgit_repo_online
!iv_name TYPE string
!iv_email TYPE string
RAISING
ycx_abapgit_exception .
PRIVATE SECTION.
ENDCLASS.
CLASS YCL_ABAPGIT_BACKGROUND_PUSH_FI IMPLEMENTATION.
METHOD build_comment.
DATA: lt_objects TYPE STANDARD TABLE OF string WITH DEFAULT KEY,
lv_str TYPE string.
FIELD-SYMBOLS: <ls_local> LIKE LINE OF is_files-local.
LOOP AT is_files-local ASSIGNING <ls_local>.
lv_str = |{ <ls_local>-item-obj_type } { <ls_local>-item-obj_name }|.
APPEND lv_str TO lt_objects.
ENDLOOP.
SORT lt_objects AS TEXT.
DELETE ADJACENT DUPLICATES FROM lt_objects.
IF lines( lt_objects ) = 1.
rv_comment = |BG: { lv_str }|.
ELSE.
rv_comment = 'BG: Multiple objects' ##NO_TEXT.
LOOP AT lt_objects INTO lv_str.
CONCATENATE rv_comment yif_abapgit_definitions=>c_newline lv_str INTO rv_comment.
ENDLOOP.
ENDIF.
ENDMETHOD.
METHOD push_fixed.
DATA: ls_comment TYPE yif_abapgit_definitions=>ty_comment,
ls_files TYPE yif_abapgit_definitions=>ty_stage_files,
lo_stage TYPE REF TO ycl_abapgit_stage.
FIELD-SYMBOLS: <ls_local> LIKE LINE OF ls_files-local,
<ls_remote> LIKE LINE OF ls_files-remote.
ls_files = ycl_abapgit_factory=>get_stage_logic( )->get( io_repo ).
ASSERT lines( ls_files-local ) > 0
OR lines( ls_files-remote ) > 0.
CREATE OBJECT lo_stage.
LOOP AT ls_files-local ASSIGNING <ls_local>.
mo_log->add_info( |stage: {
<ls_local>-file-path } {
<ls_local>-file-filename }| ).
lo_stage->add( iv_path = <ls_local>-file-path
iv_filename = <ls_local>-file-filename
iv_data = <ls_local>-file-data ).
ENDLOOP.
LOOP AT ls_files-remote ASSIGNING <ls_remote>.
mo_log->add_info( |removed: {
<ls_remote>-path } {
<ls_remote>-filename }| ).
lo_stage->rm( iv_path = <ls_remote>-path
iv_filename = <ls_remote>-filename ).
ENDLOOP.
ls_comment-committer-name = iv_name.
ls_comment-committer-email = iv_email.
ls_comment-comment = build_comment( ls_files ).
io_repo->push( is_comment = ls_comment
io_stage = lo_stage ).
ENDMETHOD.
METHOD yif_abapgit_background~get_description.
rv_description = 'Automatic push, fixed author' ##NO_TEXT.
ENDMETHOD.
METHOD yif_abapgit_background~get_settings.
DATA: ls_setting LIKE LINE OF ct_settings.
READ TABLE ct_settings WITH KEY key = c_settings-name INTO ls_setting.
IF sy-subrc <> 0.
ls_setting-key = c_settings-name.
ls_setting-value = 'foobar'.
APPEND ls_setting TO ct_settings.
ENDIF.
READ TABLE ct_settings WITH KEY key = c_settings-email INTO ls_setting.
IF sy-subrc <> 0.
ls_setting-key = c_settings-email.
ls_setting-value = 'foobar@localhost'.
APPEND ls_setting TO ct_settings.
ENDIF.
ENDMETHOD.
METHOD yif_abapgit_background~run.
DATA: ls_files TYPE yif_abapgit_definitions=>ty_stage_files,
ls_setting LIKE LINE OF it_settings,
lv_name TYPE string,
lv_email TYPE string.
mo_log = io_log.
ls_files = ycl_abapgit_factory=>get_stage_logic( )->get( io_repo ).
IF lines( ls_files-local ) = 0 AND lines( ls_files-remote ) = 0.
io_log->add_info( 'Nothing to stage' ).
RETURN.
ENDIF.
READ TABLE it_settings WITH KEY key = c_settings-name INTO ls_setting. "#EC CI_SUBRC
lv_name = ls_setting-value.
READ TABLE it_settings WITH KEY key = c_settings-email INTO ls_setting. "#EC CI_SUBRC
lv_email = ls_setting-value.
push_fixed(
io_repo = io_repo
iv_name = lv_name
iv_email = lv_email ).
ENDMETHOD.
ENDCLASS.
| [
31631,
331,
565,
62,
397,
499,
18300,
62,
25249,
62,
14689,
62,
12463,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
25261,
198,
220,
29244,
6158,
44731,
764,
628,
220,
44731,
44513,
13,
628,
220,
220,
220,
23255,
37,
2246,
1546,
331,
361,
62,
397,
499,
18300,
62,
25249,
764,
198,
220,
48006,
9782,
1961,
44513,
13,
628,
220,
220,
220,
7102,
2257,
1565,
4694,
25,
198,
220,
220,
220,
220,
220,
347,
43312,
3963,
269,
62,
33692,
11,
198,
220,
220,
220,
220,
220,
220,
220,
1438,
220,
41876,
4731,
26173,
8924,
705,
20608,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
3053,
41876,
4731,
26173,
8924,
705,
27630,
4146,
3256,
198,
220,
220,
220,
220,
220,
23578,
3963,
269,
62,
33692,
764,
198,
220,
220,
220,
42865,
6941,
62,
6404,
41876,
4526,
37,
5390,
331,
565,
62,
397,
499,
18300,
62,
6404,
764,
628,
220,
220,
220,
337,
36252,
50,
1382,
62,
23893,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
271,
62,
16624,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
331,
361,
62,
397,
499,
18300,
62,
4299,
50101,
14804,
774,
62,
14247,
62,
16624,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
81,
85,
62,
23893,
8,
41876,
4731,
764,
198,
220,
220,
220,
337,
36252,
50,
4574,
62,
34021,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
952,
62,
260,
7501,
220,
41876,
4526,
37,
5390,
331,
565,
62,
397,
499,
18300,
62,
260,
7501,
62,
25119,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
3672,
220,
41876,
4731,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
12888,
41876,
4731,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
331,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
764,
198,
220,
4810,
3824,
6158,
44513,
13,
198,
10619,
31631,
13,
628,
198,
198,
31631,
575,
5097,
62,
6242,
2969,
38,
2043,
62,
31098,
46025,
62,
47,
27143,
62,
11674,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
1382,
62,
23893,
13,
628,
220,
220,
220,
42865,
25,
300,
83,
62,
48205,
41876,
49053,
9795,
43679,
3963,
4731,
13315,
5550,
38865,
35374,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
2536,
220,
220,
220,
220,
41876,
4731,
13,
628,
220,
220,
220,
18930,
24639,
12,
23060,
10744,
3535,
50,
25,
1279,
7278,
62,
12001,
29,
34178,
48920,
3963,
318,
62,
16624,
12,
12001,
13,
628,
198,
220,
220,
220,
17579,
3185,
5161,
318,
62,
16624,
12,
12001,
24994,
3528,
15871,
1279,
7278,
62,
12001,
28401,
198,
220,
220,
220,
220,
220,
300,
85,
62,
2536,
796,
930,
90,
1279,
7278,
62,
12001,
29,
12,
9186,
12,
26801,
62,
4906,
1782,
1391,
1279,
7278,
62,
12001,
29,
12,
9186,
12,
26801,
62,
3672,
1782,
91,
13,
198,
220,
220,
220,
220,
220,
43504,
10619,
300,
85,
62,
2536,
5390,
300,
83,
62,
48205,
13,
198,
220,
220,
220,
23578,
21982,
3185,
13,
628,
220,
220,
220,
311,
9863,
300,
83,
62,
48205,
7054,
40383,
13,
198,
220,
220,
220,
5550,
2538,
9328,
5984,
41,
2246,
3525,
35480,
31484,
29462,
16034,
300,
83,
62,
48205,
13,
628,
220,
220,
220,
16876,
3951,
7,
300,
83,
62,
48205,
1267,
796,
352,
13,
198,
220,
220,
220,
220,
220,
374,
85,
62,
23893,
796,
930,
40469,
25,
1391,
300,
85,
62,
2536,
1782,
91,
13,
198,
220,
220,
220,
17852,
5188,
13,
198,
220,
220,
220,
220,
220,
374,
85,
62,
23893,
796,
705,
40469,
25,
20401,
5563,
6,
22492,
15285,
62,
32541,
13,
198,
220,
220,
220,
220,
220,
17579,
3185,
5161,
300,
83,
62,
48205,
39319,
300,
85,
62,
2536,
13,
198,
220,
220,
220,
220,
220,
220,
220,
39962,
1404,
1677,
6158,
374,
85,
62,
23893,
331,
361,
62,
397,
499,
18300,
62,
4299,
50101,
14804,
66,
62,
3605,
1370,
300,
85,
62,
2536,
39319,
374,
85,
62,
23893,
13,
198,
220,
220,
220,
220,
220,
23578,
21982,
3185,
13,
198,
220,
220,
220,
23578,
5064,
13,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
4574,
62,
34021,
13,
628,
220,
220,
220,
42865,
25,
43979,
62,
23893,
41876,
331,
361,
62,
397,
499,
18300,
62,
4299,
50101,
14804,
774,
62,
23893,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
43979,
62,
16624,
220,
220,
41876,
331,
361,
62,
397,
499,
18300,
62,
4299,
50101,
14804,
774,
62,
14247,
62,
16624,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2376,
62,
14247,
220,
220,
41876,
4526,
37,
5390,
331,
565,
62,
397,
499,
18300,
62,
14247,
13,
628,
220,
220,
220,
18930,
24639,
12,
23060,
10744,
3535,
50,
25,
1279,
7278,
62,
12001,
29,
220,
34178,
48920,
3963,
43979,
62,
16624,
12,
12001,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1279,
7278,
62,
47960,
29,
34178,
48920,
3963,
43979,
62,
16624,
12,
47960,
13,
628,
198,
220,
220,
220,
43979,
62,
16624,
796,
331,
565,
62,
397,
499,
18300,
62,
69,
9548,
14804,
1136,
62,
14247,
62,
6404,
291,
7,
1267,
3784,
1136,
7,
33245,
62,
260,
7501,
6739,
198,
220,
220,
220,
24994,
17395,
3951,
7,
43979,
62,
16624,
12,
12001,
1267,
1875,
657,
198,
220,
220,
220,
220,
220,
220,
220,
6375,
3951,
7,
43979,
62,
16624,
12,
47960,
1267,
1875,
657,
13,
628,
220,
220,
220,
29244,
6158,
25334,
23680,
2376,
62,
14247,
13,
628,
220,
220,
220,
17579,
3185,
5161,
43979,
62,
16624,
12,
12001,
24994,
3528,
15871,
1279,
7278,
62,
12001,
28401,
198,
220,
220,
220,
220,
220,
6941,
62,
6404,
3784,
2860,
62,
10951,
7,
930,
14247,
25,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
1279,
7278,
62,
12001,
29,
12,
7753,
12,
6978,
1782,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
1279,
7278,
62,
12001,
29,
12,
7753,
12,
34345,
1782
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS zcl_abapgit_ecatt_data_upload DEFINITION
PUBLIC
INHERITING FROM cl_apl_ecatt_data_upload
FINAL
CREATE PUBLIC .
PUBLIC SECTION.
METHODS:
z_set_stream_for_upload
IMPORTING
iv_xml TYPE xstring.
PROTECTED SECTION.
METHODS:
upload_data_from_stream REDEFINITION.
PRIVATE SECTION.
DATA: mv_external_xml TYPE xstring.
ENDCLASS.
CLASS zcl_abapgit_ecatt_data_upload IMPLEMENTATION.
METHOD upload_data_from_stream.
" Downport
template_over_all = zcl_abapgit_ecatt_helper=>upload_data_from_stream( mv_external_xml ).
ENDMETHOD.
METHOD z_set_stream_for_upload.
" donwnpoort from CL_ABAPGIT_ECATT_DATA_UPLOAD SET_STREAM_FOR_UPLOAD
mv_external_xml = iv_xml.
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
397,
499,
18300,
62,
721,
1078,
62,
7890,
62,
25850,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
3268,
16879,
2043,
2751,
16034,
537,
62,
64,
489,
62,
721,
1078,
62,
7890,
62,
25850,
198,
220,
25261,
198,
220,
29244,
6158,
44731,
764,
628,
220,
44731,
44513,
13,
198,
220,
220,
220,
337,
36252,
50,
25,
198,
220,
220,
220,
220,
220,
1976,
62,
2617,
62,
5532,
62,
1640,
62,
25850,
198,
220,
220,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
19875,
41876,
2124,
8841,
13,
628,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
220,
220,
337,
36252,
50,
25,
198,
220,
220,
220,
220,
220,
9516,
62,
7890,
62,
6738,
62,
5532,
23848,
36,
20032,
17941,
13,
628,
220,
4810,
3824,
6158,
44513,
13,
198,
220,
220,
220,
42865,
25,
285,
85,
62,
22615,
62,
19875,
41876,
2124,
8841,
13,
198,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1976,
565,
62,
397,
499,
18300,
62,
721,
1078,
62,
7890,
62,
25850,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
9516,
62,
7890,
62,
6738,
62,
5532,
13,
628,
220,
220,
220,
366,
5588,
634,
198,
220,
220,
220,
11055,
62,
2502,
62,
439,
796,
1976,
565,
62,
397,
499,
18300,
62,
721,
1078,
62,
2978,
525,
14804,
25850,
62,
7890,
62,
6738,
62,
5532,
7,
285,
85,
62,
22615,
62,
19875,
6739,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
1976,
62,
2617,
62,
5532,
62,
1640,
62,
25850,
13,
628,
220,
220,
220,
366,
836,
675,
7501,
419,
422,
7852,
62,
6242,
2969,
38,
2043,
62,
2943,
17139,
62,
26947,
62,
52,
6489,
41048,
25823,
62,
2257,
32235,
62,
13775,
62,
52,
6489,
41048,
198,
220,
220,
220,
285,
85,
62,
22615,
62,
19875,
796,
21628,
62,
19875,
13,
628,
220,
23578,
49273,
13,
198,
10619,
31631,
13,
198
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
class ZCL_EXCEL_ROW definition
public
final
create public .
*"* public components of class ZCL_EXCEL_ROW
*"* do not include other source files here!!!
public section.
type-pools ABAP .
methods CONSTRUCTOR
importing
!IP_INDEX type INT4 default 0 .
methods GET_COLLAPSED
importing
!IO_WORKSHEET type ref to ZCL_EXCEL_WORKSHEET optional
returning
value(R_COLLAPSED) type abap_bool .
methods GET_OUTLINE_LEVEL
importing
!IO_WORKSHEET type ref to ZCL_EXCEL_WORKSHEET optional
returning
value(R_OUTLINE_LEVEL) type INT4 .
methods GET_ROW_HEIGHT
returning
value(R_ROW_HEIGHT) type FLOAT .
methods GET_ROW_INDEX
returning
value(R_ROW_INDEX) type INT4 .
methods GET_VISIBLE
importing
!IO_WORKSHEET type ref to ZCL_EXCEL_WORKSHEET optional
returning
value(R_VISIBLE) type abap_bool .
methods GET_XF_INDEX
returning
value(R_XF_INDEX) type INT4 .
methods SET_COLLAPSED
importing
!IP_COLLAPSED type BOOLEAN .
methods SET_OUTLINE_LEVEL
importing
!IP_OUTLINE_LEVEL type INT4
raising
ZCX_EXCEL .
methods SET_ROW_HEIGHT
importing
!IP_ROW_HEIGHT type SIMPLE
raising
ZCX_EXCEL .
methods SET_ROW_INDEX
importing
!IP_INDEX type INT4 .
methods SET_VISIBLE
importing
!IP_VISIBLE type BOOLEAN .
methods SET_XF_INDEX
importing
!IP_XF_INDEX type INT4 .
*"* protected components of class ZCL_EXCEL_ROW
*"* do not include other source files here!!!
protected section.
*"* private components of class ZCL_EXCEL_ROW
*"* do not include other source files here!!!
private section.
data ROW_INDEX type INT4 .
data ROW_HEIGHT type FLOAT .
data VISIBLE type BOOLEAN .
data OUTLINE_LEVEL type INT4 value 0. "#EC NOTEXT . . . . . . . . . " .
data COLLAPSED type BOOLEAN .
data XF_INDEX type INT4 .
ENDCLASS.
CLASS ZCL_EXCEL_ROW IMPLEMENTATION.
method CONSTRUCTOR.
" Initialise values
me->row_index = ip_index.
me->row_height = -1.
me->visible = abap_true.
me->outline_level = 0.
me->collapsed = abap_false.
" set row dimension as unformatted by default
me->xf_index = 0.
endmethod.
METHOD GET_COLLAPSED.
DATA: lt_row_outlines TYPE zcl_excel_worksheet=>mty_ts_outlines_row,
lv_previous_row TYPE i,
lv_following_row TYPE i.
r_collapsed = me->collapsed.
CHECK r_collapsed = abap_false. " Maybe new method for outlines is being used
CHECK io_worksheet IS BOUND.
* If an outline is collapsed ( even inside an outer outline ) the line following the last line
* of the group gets the flag "collapsed"
IF io_worksheet->zif_excel_sheet_properties~summarybelow = zif_excel_sheet_properties=>c_below_off.
lv_following_row = me->row_index + 1.
lt_row_outlines = io_worksheet->get_row_outlines( ).
READ TABLE lt_row_outlines TRANSPORTING NO FIELDS WITH KEY row_from = lv_following_row " first line of an outline
collapsed = abap_true. " that is collapsed
ELSE.
lv_previous_row = me->row_index - 1.
lt_row_outlines = io_worksheet->get_row_outlines( ).
READ TABLE lt_row_outlines TRANSPORTING NO FIELDS WITH KEY row_to = lv_previous_row " last line of an outline
collapsed = abap_true. " that is collapsed
ENDIF.
CHECK sy-subrc = 0. " ok - we found it
r_collapsed = abap_true.
ENDMETHOD.
METHOD GET_OUTLINE_LEVEL.
DATA: lt_row_outlines TYPE zcl_excel_worksheet=>mty_ts_outlines_row.
FIELD-SYMBOLS: <ls_row_outline> LIKE LINE OF lt_row_outlines.
* if someone has set the outline level explicitly - just use that
IF me->outline_level IS NOT INITIAL.
r_outline_level = me->outline_level.
RETURN.
ENDIF.
* Maybe we can use the outline information in the worksheet
CHECK io_worksheet IS BOUND.
lt_row_outlines = io_worksheet->get_row_outlines( ).
LOOP AT lt_row_outlines ASSIGNING <ls_row_outline> WHERE row_from <= me->row_index
AND row_to >= me->row_index.
ADD 1 TO r_outline_level.
ENDLOOP.
ENDMETHOD.
method GET_ROW_HEIGHT.
r_row_height = me->row_height.
endmethod.
method GET_ROW_INDEX.
r_row_index = me->row_index.
endmethod.
METHOD GET_VISIBLE.
DATA: lt_row_outlines TYPE zcl_excel_worksheet=>mty_ts_outlines_row.
FIELD-SYMBOLS: <ls_row_outline> LIKE LINE OF lt_row_outlines.
r_visible = me->visible.
CHECK r_visible = 'X'. " Currently visible --> but maybe the new outline methodology will hide it implicitly
CHECK io_worksheet IS BOUND. " But we have to see the worksheet to make sure
lt_row_outlines = io_worksheet->get_row_outlines( ).
LOOP AT lt_row_outlines ASSIGNING <ls_row_outline> WHERE row_from <= me->row_index
AND row_to >= me->row_index
AND collapsed = abap_true. " row is in a collapsed outline --> not visible
CLEAR r_visible.
RETURN. " one hit is enough to ensure invisibility
ENDLOOP.
ENDMETHOD.
method GET_XF_INDEX.
r_xf_index = me->xf_index.
endmethod.
method SET_COLLAPSED.
me->collapsed = ip_collapsed.
endmethod.
method SET_OUTLINE_LEVEL.
IF ip_outline_level < 0
OR ip_outline_level > 7.
zcx_excel=>raise_text( 'Outline level must range between 0 and 7.' ).
ENDIF.
me->outline_level = ip_outline_level.
endmethod.
method SET_ROW_HEIGHT.
TRY.
me->row_height = ip_row_height.
CATCH cx_sy_conversion_no_number.
zcx_excel=>raise_text( 'Unable to interpret ip_row_height as number' ).
ENDTRY.
endmethod.
method SET_ROW_INDEX.
me->row_index = ip_index.
endmethod.
method SET_VISIBLE.
me->visible = ip_visible.
endmethod.
method SET_XF_INDEX.
me->XF_INDEX = ip_XF_INDEX.
endmethod.
ENDCLASS.
| [
4871,
1168,
5097,
62,
6369,
34,
3698,
62,
49,
3913,
6770,
198,
220,
1171,
198,
220,
2457,
198,
220,
2251,
1171,
764,
198,
198,
9,
1,
9,
1171,
6805,
286,
1398,
1168,
5097,
62,
6369,
34,
3698,
62,
49,
3913,
198,
9,
1,
9,
466,
407,
2291,
584,
2723,
3696,
994,
10185,
198,
11377,
2665,
13,
198,
220,
2099,
12,
7742,
82,
9564,
2969,
764,
628,
220,
5050,
7102,
46126,
1581,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
4061,
62,
12115,
6369,
2099,
17828,
19,
4277,
657,
764,
198,
220,
5050,
17151,
62,
8220,
3069,
44580,
1961,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
9399,
62,
33249,
9693,
36,
2767,
2099,
1006,
284,
1168,
5097,
62,
6369,
34,
3698,
62,
33249,
9693,
36,
2767,
11902,
198,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
1988,
7,
49,
62,
8220,
3069,
44580,
1961,
8,
2099,
450,
499,
62,
30388,
764,
198,
220,
5050,
17151,
62,
12425,
24027,
62,
2538,
18697,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
9399,
62,
33249,
9693,
36,
2767,
2099,
1006,
284,
1168,
5097,
62,
6369,
34,
3698,
62,
33249,
9693,
36,
2767,
11902,
198,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
1988,
7,
49,
62,
12425,
24027,
62,
2538,
18697,
8,
2099,
17828,
19,
764,
198,
220,
5050,
17151,
62,
49,
3913,
62,
13909,
9947,
198,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
1988,
7,
49,
62,
49,
3913,
62,
13909,
9947,
8,
2099,
9977,
46,
1404,
764,
198,
220,
5050,
17151,
62,
49,
3913,
62,
12115,
6369,
198,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
1988,
7,
49,
62,
49,
3913,
62,
12115,
6369,
8,
2099,
17828,
19,
764,
198,
220,
5050,
17151,
62,
29817,
34563,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
9399,
62,
33249,
9693,
36,
2767,
2099,
1006,
284,
1168,
5097,
62,
6369,
34,
3698,
62,
33249,
9693,
36,
2767,
11902,
198,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
1988,
7,
49,
62,
29817,
34563,
8,
2099,
450,
499,
62,
30388,
764,
198,
220,
5050,
17151,
62,
55,
37,
62,
12115,
6369,
198,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
1988,
7,
49,
62,
55,
37,
62,
12115,
6369,
8,
2099,
17828,
19,
764,
198,
220,
5050,
25823,
62,
8220,
3069,
44580,
1961,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
4061,
62,
8220,
3069,
44580,
1961,
2099,
347,
6684,
2538,
1565,
764,
198,
220,
5050,
25823,
62,
12425,
24027,
62,
2538,
18697,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
4061,
62,
12425,
24027,
62,
2538,
18697,
2099,
17828,
19,
198,
220,
220,
220,
8620,
198,
220,
220,
220,
220,
220,
1168,
34,
55,
62,
6369,
34,
3698,
764,
198,
220,
5050,
25823,
62,
49,
3913,
62,
13909,
9947,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
4061,
62,
49,
3913,
62,
13909,
9947,
2099,
23749,
16437,
198,
220,
220,
220,
8620,
198,
220,
220,
220,
220,
220,
1168,
34,
55,
62,
6369,
34,
3698,
764,
198,
220,
5050,
25823,
62,
49,
3913,
62,
12115,
6369,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
4061,
62,
12115,
6369,
2099,
17828,
19,
764,
198,
220,
5050,
25823,
62,
29817,
34563,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
4061,
62,
29817,
34563,
2099,
347,
6684,
2538,
1565,
764,
198,
220,
5050,
25823,
62,
55,
37,
62,
12115,
6369,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
4061,
62,
55,
37,
62,
12115,
6369,
2099,
17828,
19,
764,
198,
9,
1,
9,
6861,
6805,
286,
1398,
1168,
5097,
62,
6369,
34,
3698,
62,
49,
3913,
198,
9,
1,
9,
466,
407,
2291,
584,
2723,
3696,
994,
10185,
198,
24326,
2665,
13,
198,
9,
1,
9,
2839,
6805,
286,
1398,
1168,
5097,
62,
6369,
34,
3698,
62,
49,
3913,
198,
9,
1,
9,
466,
407,
2291,
584,
2723,
3696,
994,
10185,
198,
19734,
2665,
13,
628,
220,
1366,
371,
3913,
62,
12115,
6369,
2099,
17828,
19,
764,
198,
220,
1366,
371,
3913,
62,
13909,
9947,
2099,
9977,
46,
1404,
764,
198,
220,
1366,
50035,
34563,
2099,
347,
6684,
2538,
1565,
764,
198,
220,
1366,
16289,
24027,
62,
2538,
18697,
2099,
17828,
19,
1988,
657,
13,
25113,
2943,
5626,
13918,
764,
220,
764,
220,
764,
220,
764,
220,
764,
220,
764,
220,
764,
220,
764,
220,
764,
366,
764,
198,
220,
1366,
7375,
3069,
44580,
1961,
2099,
347,
6684,
2538,
1565,
764,
198,
220,
1366,
1395,
37,
62,
12115,
6369,
2099,
17828,
19,
764,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1168,
5097,
62,
6369,
34,
3698,
62,
49,
3913,
30023,
2538,
10979,
6234,
13,
628,
198,
24396,
7102,
46126,
1581,
13,
198,
220,
366,
20768,
786,
3815,
198,
220,
502,
3784,
808,
62,
9630,
220,
220,
220,
796,
20966,
62,
9630,
13,
198,
220,
502,
3784,
808,
62,
17015,
220,
220,
796,
532,
16,
13,
198,
220,
502,
3784,
23504,
220,
220,
220,
220,
796,
450,
499,
62,
7942,
13,
198,
220,
502,
3784,
448,
1370,
62,
5715,
220,
796,
657,
13,
198,
220,
502,
3784,
26000,
28361,
220,
220,
796,
450,
499,
62,
9562,
13,
628,
220,
366,
900,
5752,
15793,
355,
555,
687,
16898,
416,
4277,
198,
220,
502,
3784,
26152,
62,
9630,
796,
657,
13,
198,
220,
886,
24396,
13,
628,
198,
49273,
17151,
62,
8220,
3069,
44580,
1961,
13,
628,
220,
42865,
25,
300,
83,
62,
808,
62,
448,
6615,
220,
41876,
1976,
565,
62,
1069,
5276,
62,
5225,
25473,
14804,
76,
774,
62,
912,
62,
448,
6615,
62,
808,
11,
198,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
3866,
1442,
62,
808,
220,
41876,
1312,
11,
198,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
27780,
278,
62,
808,
41876,
1312,
13,
628,
220,
374,
62,
26000,
28361,
796,
502,
3784,
26000,
28361,
13,
628,
220,
5870,
25171,
374,
62,
26000,
28361,
796,
450,
499,
62
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1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ods ZIF_GTT_STS_BO_READER~GET_DATA
redefinition .
methods ZIF_GTT_STS_BO_READER~GET_TRACK_ID_DATA
redefinition .
PROTECTED SECTION.
PRIVATE SECTION.
TYPES:
BEGIN OF ts_fo_header,
shipment_type TYPE string,
tor_id TYPE /scmtms/s_em_bo_tor_root-tor_id,
mtr TYPE /scmtms/s_em_bo_tor_root-mtr, "/SAPAPO/TR_MOTSCODE,
gro_vol_val TYPE /scmtms/s_em_bo_tor_root-gro_vol_val,
gro_vol_uni TYPE /scmtms/s_em_bo_tor_root-gro_vol_uni,
gro_wei_val TYPE /scmtms/s_em_bo_tor_root-gro_wei_val,
gro_wei_uni TYPE /scmtms/s_em_bo_tor_root-gro_wei_uni,
qua_pcs_val TYPE /scmtms/s_em_bo_tor_root-qua_pcs_val,
qua_pcs_uni TYPE /scmtms/s_em_bo_tor_root-qua_pcs_uni,
total_distance_km TYPE /scmtms/s_em_bo_tor_root-total_distance_km,
total_distance_km_uom TYPE meins,
dgo_indicator TYPE /scmtms/s_em_bo_tor_root-dgo_indicator,
total_duration_net TYPE /scmtms/s_em_bo_tor_root-total_duration_net,
pln_grs_duration TYPE /scmtms/total_duration,
shipping_type TYPE /scmtms/s_em_bo_tor_root-shipping_type,
traffic_direct TYPE /scmtms/s_em_bo_tor_root-traffic_direct,
trmodcod TYPE /scmtms/s_em_bo_tor_root-trmodcod,
tspid TYPE bu_id_number,
tracked_object_type TYPE tt_tracked_object_type,
tracked_object_id TYPE tt_tracked_object_id,
carrier_ref_value TYPE tt_carrier_ref_value,
carrier_ref_type TYPE tt_carrier_ref_type,
shipper_ref_value TYPE tt_shipper_ref_value,
shipper_ref_type TYPE tt_shipper_ref_type,
inc_class_code TYPE /scmtms/s_em_bo_tor_item-inc_class_code,
inc_transf_loc_n TYPE /scmtms/s_em_bo_tor_item-inc_transf_loc_n,
country TYPE /scmtms/s_em_bo_tor_item-country,
platenumber TYPE /scmtms/s_em_bo_tor_item-platenumber,
res_id TYPE /scmtms/s_em_bo_tor_item-res_id,
pln_dep_loc_id TYPE /scmtms/location_id,
pln_dep_loc_type TYPE /saptrx/loc_id_type,
pln_dep_timest TYPE char16,
pln_dep_timezone TYPE ad_tzone,
pln_arr_loc_id TYPE /scmtms/location_id,
pln_arr_loc_type TYPE /saptrx/loc_id_type,
pln_arr_timest TYPE char16,
pln_arr_timezone TYPE ad_tzone,
stop_id TYPE tt_stop_id,
ordinal_no TYPE tt_ordinal_no,
loc_type TYPE tt_loc_type,
loc_id TYPE tt_loc_id,
req_doc_line_no TYPE tt_req_doc_line_number,
req_doc_no TYPE tt_req_doc_number,
req_doc_first_stop TYPE tt_stop,
req_doc_last_stop TYPE tt_stop,
END OF ts_fo_header .
METHODS get_data_from_root
IMPORTING
!iv_old_data TYPE abap_bool DEFAULT abap_false
!ir_root TYPE REF TO data
CHANGING
!cs_fo_header TYPE ts_fo_header
RAISING
cx_udm_message .
METHODS get_data_from_item
IMPORTING
!iv_old_data TYPE abap_bool DEFAULT abap_false ##NEEDED
!ir_item TYPE REF TO data
CHANGING
!cs_fo_header TYPE ts_fo_header
RAISING
cx_udm_message .
METHODS get_data_from_textcoll
IMPORTING
!iv_old_data TYPE abap_bool DEFAULT abap_false
!ir_root TYPE REF TO data
CHANGING
!cs_fo_header TYPE ts_fo_header
RAISING
cx_udm_message .
METHODS get_maintabref
IMPORTING
!is_app_object TYPE trxas_appobj_ctab_wa
RETURNING
VALUE(rr_maintabref) TYPE REF TO data .
ENDCLASS.
CLASS ZCL_GTT_STS_BO_FO_READER IMPLEMENTATION.
METHOD get_data_from_item.
FIELD-SYMBOLS <lt_item> TYPE /scmtms/t_em_bo_tor_item.
ASSIGN ir_item->* TO <lt_item>.
IF sy-subrc <> 0.
MESSAGE e010(zgtt_sts) INTO DATA(lv_dummy) ##needed.
zcl_gtt_sts_tools=>throw_exception( ).
ENDIF.
ASSIGN <lt_item>[ item_cat = /scmtms/if_tor_const=>sc_tor_item_category-av_item ] TO FIELD-SYMBOL(<ls_item>).
IF sy-subrc <> 0.
MESSAGE e010(zgtt_sts) INTO lv_dummy.
zcl_gtt_sts_tools=>throw_exception( ).
ENDIF.
cs_fo_header-inc_class_code = <ls_item>-inc_class_code.
cs_fo_header-inc_transf_loc_n = <ls_item>-inc_transf_loc_n.
cs_fo_header-country = <ls_item>-country.
cs_fo_header-platenumber = <ls_item>-platenumber.
cs_fo_header-res_id = <ls_item>-res_id.
ENDMETHOD.
METHOD get_data_from_root.
FIELD-SYMBOLS:
<ls_root> TYPE /scmtms/s_em_bo_tor_root,
<lt_root_old> TYPE /scmtms/t_em_bo_tor_root.
ASSIGN ir_root->* TO <ls_root>.
IF sy-subrc <> 0.
MESSAGE e010(zgtt_sts) INTO DATA(lv_dummy) ##needed.
zcl_gtt_sts_tools=>throw_exception( ).
ENDIF.
IF iv_old_data = abap_true.
DATA(lr_root_old) = mo_ef_parameters->get_appl_table( zif_gtt_sts_constants=>cs_tabledef-fo_header_old ).
ASSIGN lr_root_old->* TO <lt_root_old>.
IF sy-subrc = 0.
ASSIGN <lt_root_old>[ tor_id = <ls_root>-tor_id ] TO <ls_root>.
IF sy-subrc <> 0.
" FO is just crerated
RETURN.
ENDIF.
ENDIF.
DATA(lv_before_image) = abap_true.
ENDIF.
MOVE-CORRESPONDING <ls_root> TO cs_fo_header ##ENH_OK.
/scmtms/cl_tor_helper_root=>det_transient_root_fields(
EXPORTING
it_key = VALUE #( ( key = <ls_root>-node_id ) )
iv_get_stop_infos = abap_true
iv_get_mainitem_info = abap_true
iv_before_image = lv_before_image
IMPORTING
et_tor_add_info = DATA(lt_tor_add_info) ).
ASSIGN lt_tor_add_info[ 1 ] TO FIELD-SYMBOL(<ls_tor_additional_info>).
IF sy-subrc = 0.
cs_fo_header-pln_grs_duration = <ls_tor_additional_info>-tot_duration.
ENDIF.
cs_fo_header-shipment_type = zif_gtt_sts_constants=>cs_shipment_type-tor.
cs_fo_header-tspid = get_carrier_name( iv_tspid = cs_fo_header-tspid ).
IF cs_fo_header-total_distance_km IS NOT INITIAL.
cs_fo_header-total_distance_km_uom = zif_gtt_sts_constants=>cs_uom-km.
ENDIF.
SELECT SINGLE motscode
FROM /sapapo/trtype
INTO cs_fo_header-mtr
WHERE ttype = cs_fo_header-mtr.
SHIFT cs_fo_header-mtr LEFT DELETING LEADING '0'.
SHIFT cs_fo_header-tor_id LEFT DELETING LEADING '0'.
cs_fo_header-trmodcod = zcl_gtt_sts_tools=>get_trmodcod( iv_trmodcod = cs_fo_header-trmodcod ).
ENDMETHOD.
METHOD get_data_from_textcoll.
get_container_and_mobile_track(
EXPORTING
ir_data = ir_root
iv_old_data = iv_old_data
CHANGING
ct_tracked_object_type = cs_fo_header-tracked_object_type
ct_tracked_object_id = cs_fo_header-tracked_object_id ).
IF cs_fo_header-tor_id IS NOT INITIAL AND cs_fo_header-res_id IS NOT INITIAL.
APPEND cs_track_id-truck_id TO cs_fo_header-tracked_object_id.
APPEND cs_fo_header-res_id TO cs_fo_header-tracked_object_type.
ENDIF.
IF cs_fo_header-tor_id IS NOT INITIAL AND cs_fo_header-platenumber IS NOT INITIAL AND cs_fo_header-mtr = '31'.
APPEND cs_track_id-license_plate TO cs_fo_header-tracked_object_id.
APPEND cs_fo_header-platenumber TO cs_fo_header-tracked_object_type.
ENDIF.
ENDMETHOD.
METHOD get_maintabref.
FIELD-SYMBOLS <lt_maintabref> TYPE ANY TABLE.
ASSIGN is_app_object-maintabref->* TO FIELD-SYMBOL(<ls_maintabref>).
IF <ls_maintabref> IS ASSIGNED AND zcl_gtt_sts_tools=>is_table( iv_value = <ls_maintabref> ) = abap_true.
ASSIGN <ls_maintabref> TO <lt_maintabref>.
LOOP AT <lt_maintabref> ASSIGNING FIELD-SYMBOL(<ls_line>).
ASSIGN COMPONENT /scmtms/if_tor_c=>sc_node_attribute-root-tor_cat
OF STRUCTURE <ls_line> TO FIELD-SYMBOL(<lv_tor_cat>).
IF sy-subrc = 0 AND <lv_tor_cat> = /scmtms/if_tor_const=>sc_tor_category-active.
GET REFERENCE OF <ls_line> INTO rr_maintabref.
EXIT.
ENDIF.
ENDLOOP.
ELSEIF <ls_maintabref> IS ASSIGNED.
GET REFERENCE OF <ls_maintabref> INTO rr_maintabref.
ENDIF.
ENDMETHOD.
METHOD zif_gtt_sts_bo_reader~get_data.
FIELD-SYMBOLS <ls_freight_order> TYPE ts_fo_header.
DATA(lr_maintabref) = get_maintabref( is_app_object ).
rr_data = NEW ts_fo_header( ).
ASSIGN rr_data->* TO <ls_freight_order>.
IF sy-subrc <> 0.
MESSAGE e010(zgtt_sts) INTO DATA(lv_dummy) ##needed.
zcl_gtt_sts_tools=>throw_exception( ).
ENDIF.
get_data_from_root(
EXPORTING
iv_old_data = iv_old_data
ir_root = lr_maintabref
CHANGING
cs_fo_header = <ls_freight_order> ).
IF <ls_freight_order> IS INITIAL.
RETURN.
ENDIF.
get_data_from_item(
EXPORTING
iv_old_data = iv_old_data
ir_item = mo_ef_parameters->get_appl_table(
SWITCH #( iv_old_data WHEN abap_true THEN zif_gtt_sts_constants=>cs_tabledef-fo_item_old
ELSE zif_gtt_sts_constants=>cs_tabledef-fo_item_new ) )
CHANGING
cs_fo_header = <ls_freight_order> ).
get_data_from_textcoll(
EXPORTING
iv_old_data = iv_old_data
ir_root = lr_maintabref
CHANGING
cs_fo_header = <ls_freight_order> ).
IF <ls_freight_order>-tracked_object_id IS INITIAL.
APPEND '' TO <ls_freight_order>-tracked_object_id.
ENDIF.
get_docref_data(
EXPORTING
iv_old_data = iv_old_data
ir_root = lr_maintabref
CHANGING
ct_carrier_ref_value = <ls_freight_order>-carrier_ref_value
ct_carrier_ref_type = <ls_freight_order>-carrier_ref_type
ct_shipper_ref_value = <ls_freight_order>-shipper_ref_value
ct_shipper_ref_type = <ls_freight_order>-shipper_ref_type ).
IF <ls_freight_order>-carrier_ref_value IS INITIAL.
APPEND '' TO <ls_freight_order>-carrier_ref_value.
ENDIF.
IF <ls_freight_order>-shipper_ref_value IS INITIAL.
APPEND '' TO <ls_freight_order>-shipper_ref_value.
ENDIF.
get_data_from_stop(
EXPORTING
ir_data = lr_maintabref
iv_old_data = iv_old_data
CHANGING
cv_pln_dep_loc_id = <ls_freight_order>-pln_dep_loc_id
cv_pln_dep_loc_type = <ls_freight_order>-pln_dep_loc_type
cv_pln_dep_timest = <ls_freight_order>-pln_dep_timest
cv_pln_dep_timezone = <ls_freight_order>-pln_dep_timezone
cv_pln_arr_loc_id = <ls_freight_order>-pln_arr_loc_id
cv_pln_arr_loc_type = <ls_freight_order>-pln_arr_loc_type
cv_pln_arr_timest = <ls_freight_order>-pln_arr_timest
cv_pln_arr_timezone = <ls_freight_order>-pln_arr_timezone
ct_stop_id = <ls_freight_order>-stop_id
ct_ordinal_no = <ls_freight_order>-ordinal_no
ct_loc_type = <ls_freight_order>-loc_type
ct_loc_id = <ls_freight_order>-loc_id ).
get_requirement_doc_list(
EXPORTING
ir_data = lr_maintabref
iv_old_data = iv_old_data
CHANGING
ct_req_doc_line_no = <ls_freight_order>-req_doc_line_no
ct_req_doc_no = <ls_freight_order>-req_doc_no
ct_req_doc_first_stop = <ls_freight_order>-req_doc_first_stop
ct_req_doc_last_stop = <ls_freight_order>-req_doc_last_stop ).
IF <ls_freight_order>-req_doc_no IS INITIAL.
APPEND '' TO <ls_freight_order>-req_doc_line_no.
ENDIF.
ENDMETHOD.
METHOD zif_gtt_sts_bo_reader~get_track_id_data.
DATA:
lr_item_new TYPE REF TO data,
lr_item_old TYPE REF TO data,
lr_root_old TYPE REF TO data,
lt_track_id_data_new TYPE zif_gtt_sts_ef_types=>tt_enh_track_id_data,
lt_track_id_data_old TYPE zif_gtt_sts_ef_types=>tt_enh_track_id_data.
FIELD-SYMBOLS:
<lt_item_new> TYPE /scmtms/t_em_bo_tor_item,
<lt_item_old> TYPE /scmtms/t_em_bo_tor_item,
<ls_root_new> TYPE /scmtms/s_em_bo_tor_root,
<lt_root_old> TYPE /scmtms/t_em_bo_tor_root,
<lt_tor_req_root_new> TYPE /scmtms/t_em_bo_tor_root,
<lt_tor_req_root_old> TYPE /scmtms/t_em_bo_tor_root.
ASSIGN is_app_object-maintabref->* TO <ls_root_new>.
lr_root_old = mo_ef_parameters->get_appl_table( iv_tabledef = zif_gtt_sts_constants=>cs_tabledef-fo_header_old ).
ASSIGN lr_root_old->* TO <lt_root_old>.
IF <ls_root_new> IS NOT ASSIGNED OR <lt_root_old> IS NOT ASSIGNED.
MESSAGE e010(zgtt_sts) INTO DATA(lv_dummy) ##needed.
zcl_gtt_sts_tools=>throw_exception( ).
ENDIF.
add_track_id_data(
EXPORTING
is_app_object = is_app_object
iv_trxcod = zif_gtt_sts_constants=>cs_trxcod-fo_number
iv_trxid = |{ <ls_root_new>-tor_id }|
CHANGING
ct_track_id = et_track_id_data ).
get_container_mobile_track_id(
EXPORTING
is_app_object = is_app_object
CHANGING
ct_track_id_data = lt_track_id_data_new ).
get_container_mobile_track_id(
EXPORTING
is_app_object = is_app_object
iv_old_data = abap_true
CHANGING
ct_track_id_data = lt_track_id_data_old ).
lr_item_new = mo_ef_parameters->get_appl_table( iv_tabledef = zif_gtt_sts_constants=>cs_tabledef-fo_item_new ).
lr_item_old = mo_ef_parameters->get_appl_table( iv_tabledef = zif_gtt_sts_constants=>cs_tabledef-fo_item_old ).
DATA(lr_tor_req_root_new) = mo_ef_parameters->get_appl_table( /scmtms/cl_scem_int_c=>sc_table_definition-bo_tor-req_root ).
DATA(lr_tor_req_root_old) = mo_ef_parameters->get_appl_table( /scmtms/cl_scem_int_c=>sc_table_definition-bo_tor-req_root_before ).
ASSIGN <lt_root_old>[ node_id = <ls_root_new>-node_id ] TO FIELD-SYMBOL(<ls_root_old>).
IF sy-subrc = 0.
DATA(lv_deleted) = zcl_gtt_sts_tools=>check_is_fo_deleted(
is_root_new = <ls_root_new>
is_root_old = <ls_root_old> ).
IF lv_deleted = zif_gtt_sts_ef_constants=>cs_condition-true.
CLEAR: lt_track_id_data_old, lr_item_old, lr_tor_req_root_old.
ENDIF.
ENDIF.
ASSIGN lr_tor_req_root_new->* TO <lt_tor_req_root_new>.
IF <lt_tor_req_root_new> IS ASSIGNED.
LOOP AT <lt_tor_req_root_new> ASSIGNING FIELD-SYMBOL(<ls_tor_req_root_new>).
IF <ls_tor_req_root_new>-tor_root_node IS ASSIGNED AND <ls_tor_req_root_new>-tor_cat = /scmtms/if_tor_const=>sc_tor_category-freight_unit AND
<ls_tor_req_root_new>-tor_root_node = <ls_root_new>-node_id.
APPEND VALUE #( key = <ls_tor_req_root_new>-tor_id
appsys = mo_ef_parameters->get_appsys( )
appobjtype = is_app_object-appobjtype
appobjid = is_app_object-appobjid
trxcod = zif_gtt_sts_constants=>cs_trxcod-fu_number
trxid = <ls_tor_req_root_new>-tor_id ) TO lt_track_id_data_new.
ENDIF.
ENDLOOP.
ENDIF.
ASSIGN lr_tor_req_root_old->* TO <lt_tor_req_root_old>.
IF sy-subrc = 0 AND lv_deleted = zif_gtt_sts_ef_constants=>cs_condition-false.
LOOP AT <lt_tor_req_root_old> ASSIGNING FIELD-SYMBOL(<ls_tor_req_root_old>).
IF <ls_tor_req_root_old>-tor_root_node IS ASSIGNED AND <ls_tor_req_root_old>-tor_cat = /scmtms/if_tor_const=>sc_tor_category-freight_unit AND
<ls_tor_req_root_old>-tor_root_node = <ls_root_new>-node_id.
APPEND VALUE #( key = <ls_tor_req_root_old>-tor_id
appsys = mo_ef_parameters->get_appsys( )
appobjtype = is_app_object-appobjtype
appobjid = is_app_object-appobjid
trxcod = zif_gtt_sts_constants=>cs_trxcod-fu_number
trxid = <ls_tor_req_root_old>-tor_id ) TO lt_track_id_data_old.
ENDIF.
ENDLOOP.
ENDIF.
ASSIGN lr_item_new->* TO <lt_item_new>.
IF sy-subrc = 0.
zcl_gtt_sts_tools=>get_fo_tracked_item_obj(
EXPORTING
is_app_object = is_app_object
is_root = <ls_root_new>
it_item = <lt_item_new>
iv_appsys = mo_ef_parameters->get_appsys( )
iv_old_data = abap_false
CHANGING
ct_track_id_data = lt_track_id_data_new ).
ELSE.
MESSAGE e010(zgtt_sts) INTO lv_dummy.
zcl_gtt_sts_tools=>throw_exception( ).
ENDIF.
ASSIGN lr_item_old->* TO <lt_item_old>.
IF sy-subrc = 0 AND lv_deleted = zif_gtt_sts_ef_constants=>cs_condition-false.
zcl_gtt_sts_tools=>get_fo_tracked_item_obj(
EXPORTING
is_app_object = is_app_object
is_root = <ls_root_old>
it_item = <lt_item_old>
iv_appsys = mo_ef_parameters->get_appsys( )
iv_old_data = abap_true
CHANGING
ct_track_id_data = lt_track_id_data_old ).
ENDIF.
zcl_gtt_sts_tools=>get_track_obj_changes(
EXPORTING
is_app_object = is_app_object
iv_appsys = mo_ef_parameters->get_appsys( )
it_track_id_data_new = lt_track_id_data_new
it_track_id_data_old = lt_track_id_data_old
CHANGING
ct_track_id_data = et_track_id_data ).
ENDMETHOD.
ENDCLASS.
| [
4871,
1168,
5097,
62,
38,
15751,
62,
2257,
50,
62,
8202,
62,
6080,
62,
15675,
1137,
6770,
198,
220,
1171,
198,
220,
10639,
1780,
422,
1168,
5097,
62,
38,
15751,
62,
2257,
50,
62,
8202,
62,
32961,
62,
15675,
1137,
198,
220,
2251,
1171,
764,
198,
198,
11377,
2665,
13,
628,
220,
5050,
1168,
5064,
62,
38,
15751,
62,
2257,
50,
62,
8202,
62,
15675,
1137,
93,
18851,
62,
26947,
198,
220,
220,
220,
34087,
17750,
764,
198,
220,
5050,
1168,
5064,
62,
38,
15751,
62,
2257,
50,
62,
8202,
62,
15675,
1137,
93,
18851,
62,
5446,
8120,
62,
2389,
62,
26947,
198,
220,
220,
220,
34087,
17750,
764,
198,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
4810,
3824,
6158,
44513,
13,
628,
220,
220,
220,
24412,
47,
1546,
25,
198,
220,
220,
220,
220,
220,
347,
43312,
3963,
40379,
62,
6513,
62,
25677,
11,
198,
220,
220,
220,
220,
220,
220,
220,
28652,
62,
4906,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
7332,
62,
312,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
1220,
1416,
16762,
907,
14,
82,
62,
368,
62,
2127,
62,
13165,
62,
15763,
12,
13165,
62,
312,
11,
198,
220,
220,
220,
220,
220,
220,
220,
285,
2213,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
1220,
1416,
16762,
907,
14,
82,
62,
368,
62,
2127,
62,
13165,
62,
15763,
12,
76,
2213,
11,
220,
12813,
50,
2969,
2969,
46,
14,
5446,
62,
44,
2394,
6173,
16820,
11,
198,
220,
220,
220,
220,
220,
220,
220,
7128,
62,
10396,
62,
2100,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
1220,
1416,
16762,
907,
14,
82,
62,
368,
62,
2127,
62,
13165,
62,
15763,
12,
27333,
62,
10396,
62,
2100,
11,
198,
220,
220,
220,
220,
220,
220,
220,
7128,
62,
10396,
62,
35657,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
1220,
1416,
16762,
907,
14,
82,
62,
368,
62,
2127,
62,
13165,
62,
15763,
12,
27333,
62,
10396,
62,
35657,
11,
198,
220,
220,
220,
220,
220,
220,
220,
7128,
62,
42990,
62,
2100,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
1220,
1416,
16762,
907,
14,
82,
62,
368,
62,
2127,
62,
13165,
62,
15763,
12,
27333,
62,
42990,
62,
2100,
11,
198,
220,
220,
220,
220,
220,
220,
220,
7128,
62,
42990,
62,
35657,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
1220,
1416,
16762,
907,
14,
82,
62,
368,
62,
2127,
62,
13165,
62,
15763,
12,
27333,
62,
42990,
62,
35657,
11,
198,
220,
220,
220,
220,
220,
220,
220,
627,
64,
62,
79,
6359,
62,
2100,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
1220,
1416,
16762,
907,
14,
82,
62,
368,
62,
2127,
62,
13165,
62,
15763,
12,
39566,
62,
79,
6359,
62,
2100,
11,
198,
220,
220,
220,
220,
220,
220,
220,
627,
64,
62,
79,
6359,
62,
35657,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
1220,
1416,
16762,
907,
14,
82,
62,
368,
62,
2127,
62,
13165,
62,
15763,
12,
39566,
62,
79,
6359,
62,
35657,
11,
198,
220,
220,
220,
220,
220,
220,
220,
2472,
62,
30246,
62,
13276,
220,
220,
220,
220,
41876,
1220,
1416,
16762,
907,
14,
82,
62,
368,
62,
2127,
62,
13165,
62,
15763,
12,
23350,
62,
30246,
62,
13276,
11,
198,
220,
220,
220,
220,
220,
220,
220,
2472,
62,
30246,
62,
13276,
62,
84,
296,
41876,
502,
1040,
11,
198,
220,
220,
220,
220,
220,
220,
220,
288,
2188,
62,
521,
26407,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
1220,
1416,
16762,
907,
14,
82,
62,
368,
62,
2127,
62,
13165,
62,
15763,
12,
67,
2188,
62,
521,
26407,
11,
198,
220,
220,
220,
220,
220,
220,
220,
2472,
62,
32257,
62,
3262,
220,
220,
220,
41876,
1220,
1416,
16762,
907,
14,
82,
62,
368,
62,
2127,
62,
13165,
62,
15763,
12,
23350,
62,
32257,
62,
3262,
11,
198,
220,
220,
220,
220,
220,
220,
220,
458,
77,
62,
2164,
82,
62,
32257,
220,
220,
220,
220,
220,
41876,
1220,
1416,
16762,
907,
14,
23350,
62,
32257,
11,
198,
220,
220,
220,
220,
220,
220,
220,
8440,
62,
4906,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
1220,
1416,
16762,
907,
14,
82,
62,
368,
62,
2127,
62,
13165,
62,
15763,
12,
1477,
4501,
62,
4906,
11,
198,
220,
220,
220,
220,
220,
220,
220,
4979,
62,
12942,
220,
220,
220,
220,
220,
220,
220,
41876,
1220,
1416,
16762,
907,
14,
82,
62,
368,
62,
2127,
62,
13165,
62,
15763,
12,
9535,
2108,
62,
12942,
11,
198,
220,
220,
220,
220,
220,
220,
220,
491,
4666,
19815,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
1220,
1416,
16762,
907,
14,
82,
62,
368,
62,
2127,
62,
13165,
62,
15763,
12,
2213,
4666,
19815,
11,
198,
220,
220,
220,
220,
220,
220,
220,
23053,
312,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
809,
62,
312,
62,
17618,
11,
198,
220,
220,
220,
220,
220,
220,
220,
18283,
62,
15252,
62,
4906,
220,
220,
41876,
256,
83,
62,
2213,
6021,
62,
15252,
62,
4906,
11,
198,
220,
220,
220,
220,
220,
220,
220,
18283,
62,
15252,
62,
312,
220,
220,
220,
220,
41876,
256,
83,
62,
2213,
6021,
62,
15252,
62,
312,
11,
198,
220,
220,
220,
220,
220,
220,
220,
11920,
62,
5420,
62,
8367,
220,
220,
220,
220,
41876,
256,
83,
62,
7718,
5277,
62,
5420,
62,
8367,
11,
198,
220,
220,
220,
220,
220,
220,
220,
11920,
62,
5420,
62,
4906,
220,
220,
220,
220,
220,
41876,
256,
83,
62,
7718,
5277,
62,
5420,
62,
4906,
11,
198,
220,
220,
220,
220,
220,
220,
220,
427,
14710,
62,
5420,
62,
8367,
220,
220,
220,
220,
41876,
256,
83,
62,
1477,
14710,
62,
5420,
62,
8367,
11,
198,
220,
220,
220,
220,
220,
220
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS ltd_clean_code_manager DEFINITION FOR TESTING.
PUBLIC SECTION.
INTERFACES: y_if_clean_code_manager.
ENDCLASS.
CLASS ltd_clean_code_manager IMPLEMENTATION.
METHOD y_if_clean_code_manager~read_check_customizing.
result = VALUE #( ( apply_on_testcode = abap_true apply_on_productive_code = abap_true prio = 'N' threshold = 0 )
( apply_on_testcode = abap_true apply_on_productive_code = abap_true prio = 'E' threshold = 0 ) ).
ENDMETHOD.
METHOD y_if_clean_code_manager~calculate_obj_creation_date.
result = '20190101'.
ENDMETHOD.
ENDCLASS.
CLASS ltd_ref_scan_manager DEFINITION INHERITING FROM y_scan_manager_double FOR TESTING.
PUBLIC SECTION.
METHODS set_data_for_ok.
METHODS set_data_for_error.
METHODS set_pseudo_comment_ok.
PRIVATE SECTION.
ENDCLASS.
CLASS ltd_ref_scan_manager IMPLEMENTATION.
METHOD set_data_for_ok.
inject_code( VALUE #(
( 'REPORT y_example. ' )
( ' CLASS y_example_class DEFINITION. ' )
( ' PUBLIC SECTION. ' )
( ' PROTECTED SECTION. ' )
( ' METHODS test. ' )
( ' ENDCLASS. ' )
( ' CLASS y_example_class IMPLEMENTATION. ' )
( ' METHOD test. ' )
( ' DATA(report_name) = sy-repid. ' )
( ' ENDMETHOD. ' )
( ' ENDCLASS. ' )
) ).
ENDMETHOD.
METHOD set_data_for_error.
inject_code( VALUE #(
( 'REPORT y_example. ' )
( ' CLASS y_example_class DEFINITION. ' )
( ' PUBLIC SECTION. ' )
( ' PROTECTED SECTION. ' )
( ' METHODS test. ' )
( ' ENDCLASS. ' )
( ' CLASS y_example_class IMPLEMENTATION. ' )
( ' METHOD test. ' )
( ' TEST-SEAM read_report_name. ' )
( ' DATA(report_name) = sy-repid. ' )
( ' END-TEST-SEAM. ' )
( ' ENDMETHOD. ' )
( ' ENDCLASS. ' )
) ).
ENDMETHOD.
METHOD set_pseudo_comment_ok.
inject_code( VALUE #(
( 'REPORT y_example. ' )
( ' CLASS y_example_class DEFINITION. ' )
( ' PUBLIC SECTION. ' )
( ' PROTECTED SECTION. ' )
( ' METHODS test. ' )
( ' ENDCLASS. ' )
( ' CLASS y_example_class IMPLEMENTATION. ' )
( ' METHOD test. ' )
( ' TEST-SEAM read_report_name. "#EC TEST_SEAM_USAGE ' )
( ' DATA(report_name) = sy-repid. ' )
( ' END-TEST-SEAM. ' )
( ' ENDMETHOD. ' )
( ' ENDCLASS. ' )
) ).
ENDMETHOD.
ENDCLASS.
CLASS ltd_clean_code_exemption_no DEFINITION FOR TESTING
INHERITING FROM y_exemption_handler.
PUBLIC SECTION.
METHODS: is_object_exempted REDEFINITION.
ENDCLASS.
CLASS ltd_clean_code_exemption_no IMPLEMENTATION.
METHOD is_object_exempted.
RETURN.
ENDMETHOD.
ENDCLASS.
CLASS local_test_class DEFINITION FOR TESTING
RISK LEVEL HARMLESS
DURATION SHORT.
PRIVATE SECTION.
DATA: cut TYPE REF TO y_check_test_seam_usage,
ref_scan_manager_double TYPE REF TO ltd_ref_scan_manager.
METHODS:
setup,
assert_errors IMPORTING err_cnt TYPE i,
assert_pseudo_comments IMPORTING pc_cnt TYPE i,
is_bound FOR TESTING,
check_ok FOR TESTING,
check_error FOR TESTING,
check_pseudo_comment_ok FOR TESTING.
ENDCLASS.
CLASS y_check_test_seam_usage DEFINITION LOCAL FRIENDS local_test_class.
CLASS local_test_class IMPLEMENTATION.
METHOD setup.
cut = NEW y_check_test_seam_usage( ).
ref_scan_manager_double = NEW ltd_ref_scan_manager( ).
cut->ref_scan_manager ?= ref_scan_manager_double.
cut->clean_code_manager = NEW ltd_clean_code_manager( ).
cut->clean_code_exemption_handler = NEW ltd_clean_code_exemption_no( ).
cut->attributes_maintained = abap_true.
ENDMETHOD.
METHOD is_bound.
cl_abap_unit_assert=>assert_bound(
EXPORTING
act = cut ).
ENDMETHOD.
METHOD check_ok.
ref_scan_manager_double->set_data_for_ok( ).
cut->run( ).
assert_errors( 0 ).
assert_pseudo_comments( 0 ).
ENDMETHOD.
METHOD check_error.
ref_scan_manager_double->set_data_for_error( ).
cut->run( ).
assert_errors( 1 ).
assert_pseudo_comments( 0 ).
ENDMETHOD.
METHOD check_pseudo_comment_ok.
ref_scan_manager_double->set_pseudo_comment_ok( ).
cut->run( ).
assert_errors( 0 ).
assert_pseudo_comments( 1 ).
ENDMETHOD.
METHOD assert_errors.
cl_abap_unit_assert=>assert_equals(
EXPORTING
act = cut->statistics->get_number_errors( )
exp = err_cnt ).
ENDMETHOD.
METHOD assert_pseudo_comments.
cl_abap_unit_assert=>assert_equals(
EXPORTING
act = cut->statistics->get_number_pseudo_comments( )
exp = pc_cnt ).
ENDMETHOD.
ENDCLASS.
| [
31631,
300,
8671,
62,
27773,
62,
8189,
62,
37153,
5550,
20032,
17941,
7473,
43001,
2751,
13,
198,
220,
44731,
44513,
13,
198,
220,
220,
220,
23255,
37,
2246,
1546,
25,
331,
62,
361,
62,
27773,
62,
8189,
62,
37153,
13,
198,
10619,
31631,
13,
198,
198,
31631,
300,
8671,
62,
27773,
62,
8189,
62,
37153,
30023,
2538,
10979,
6234,
13,
198,
220,
337,
36252,
331,
62,
361,
62,
27773,
62,
8189,
62,
37153,
93,
961,
62,
9122,
62,
23144,
2890,
13,
198,
220,
220,
220,
1255,
796,
26173,
8924,
1303,
7,
357,
4174,
62,
261,
62,
9288,
8189,
796,
450,
499,
62,
7942,
4174,
62,
261,
62,
27781,
62,
8189,
796,
450,
499,
62,
7942,
1293,
78,
796,
705,
45,
6,
11387,
796,
657,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
357,
4174,
62,
261,
62,
9288,
8189,
796,
450,
499,
62,
7942,
4174,
62,
261,
62,
27781,
62,
8189,
796,
450,
499,
62,
7942,
1293,
78,
796,
705,
36,
6,
11387,
796,
657,
1267,
6739,
198,
220,
23578,
49273,
13,
628,
220,
337,
36252,
331,
62,
361,
62,
27773,
62,
8189,
62,
37153,
93,
9948,
3129,
378,
62,
26801,
62,
38793,
62,
4475,
13,
198,
220,
220,
220,
1255,
796,
705,
23344,
486,
486,
4458,
198,
220,
23578,
49273,
13,
198,
10619,
31631,
13,
628,
198,
31631,
300,
8671,
62,
5420,
62,
35836,
62,
37153,
5550,
20032,
17941,
3268,
16879,
2043,
2751,
16034,
331,
62,
35836,
62,
37153,
62,
23352,
7473,
43001,
2751,
13,
198,
220,
44731,
44513,
13,
198,
220,
220,
220,
337,
36252,
50,
900,
62,
7890,
62,
1640,
62,
482,
13,
198,
220,
220,
220,
337,
36252,
50,
900,
62,
7890,
62,
1640,
62,
18224,
13,
198,
220,
220,
220,
337,
36252,
50,
900,
62,
7752,
12003,
62,
23893,
62,
482,
13,
198,
220,
4810,
3824,
6158,
44513,
13,
198,
10619,
31631,
13,
198,
198,
31631,
300,
8671,
62,
5420,
62,
35836,
62,
37153,
30023,
2538,
10979,
6234,
13,
628,
220,
337,
36252,
900,
62,
7890,
62,
1640,
62,
482,
13,
198,
220,
220,
220,
8677,
62,
8189,
7,
26173,
8924,
1303,
7,
198,
220,
220,
220,
220,
220,
357,
705,
2200,
15490,
331,
62,
20688,
13,
705,
1267,
198,
220,
220,
220,
220,
220,
357,
705,
42715,
331,
62,
20688,
62,
4871,
5550,
20032,
17941,
13,
705,
1267,
198,
220,
220,
220,
220,
220,
357,
705,
220,
220,
44731,
44513,
13,
705,
1267,
198,
220,
220,
220,
220,
220,
357,
705,
220,
220,
48006,
9782,
1961,
44513,
13,
705,
1267,
198,
220,
220,
220,
220,
220,
357,
705,
220,
220,
220,
220,
337,
36252,
50,
1332,
13,
705,
1267,
198,
220,
220,
220,
220,
220,
357,
705,
23578,
31631,
13,
705,
1267,
628,
220,
220,
220,
220,
220,
357,
705,
42715,
331,
62,
20688,
62,
4871,
30023,
2538,
10979,
6234,
13,
705,
1267,
198,
220,
220,
220,
220,
220,
357,
705,
220,
220,
337,
36252,
1332,
13,
705,
1267,
198,
220,
220,
220,
220,
220,
357,
705,
220,
220,
220,
220,
42865,
7,
13116,
62,
3672,
8,
796,
827,
12,
7856,
312,
13,
705,
1267,
198,
220,
220,
220,
220,
220,
357,
705,
220,
220,
23578,
49273,
13,
705,
1267,
198,
220,
220,
220,
220,
220,
357,
705,
23578,
31631,
13,
705,
1267,
198,
220,
220,
220,
1267,
6739,
198,
220,
23578,
49273,
13,
628,
220,
337,
36252,
900,
62,
7890,
62,
1640,
62,
18224,
13,
198,
220,
220,
220,
8677,
62,
8189,
7,
26173,
8924,
1303,
7,
198,
220,
220,
220,
220,
220,
357,
705,
2200,
15490,
331,
62,
20688,
13,
705,
1267,
198,
220,
220,
220,
220,
220,
357,
705,
42715,
331,
62,
20688,
62,
4871,
5550,
20032,
17941,
13,
705,
1267,
198,
220,
220,
220,
220,
220,
357,
705,
220,
220,
44731,
44513,
13,
705,
1267,
198,
220,
220,
220,
220,
220,
357,
705,
220,
220,
48006,
9782,
1961,
44513,
13,
705,
1267,
198,
220,
220,
220,
220,
220,
357,
705,
220,
220,
220,
220,
337,
36252,
50,
1332,
13,
705,
1267,
198,
220,
220,
220,
220,
220,
357,
705,
23578,
31631,
13,
705,
1267,
628,
220,
220,
220,
220,
220,
357,
705,
42715,
331,
62,
20688,
62,
4871,
30023,
2538,
10979,
6234,
13,
705,
1267,
198,
220,
220,
220,
220,
220,
357,
705,
220,
220,
337,
36252,
1332,
13,
705,
1267,
198,
220,
220,
220,
220,
220,
357,
705,
220,
220,
220,
220,
43001,
12,
5188,
2390,
1100,
62,
13116,
62,
3672,
13,
705,
1267,
198,
220,
220,
220,
220,
220,
357,
705,
220,
220,
220,
220,
220,
220,
42865,
7,
13116,
62,
3672,
8,
796,
827,
12,
7856,
312,
13,
705,
1267,
198,
220,
220,
220,
220,
220,
357,
705,
220,
220,
220,
220,
23578,
12,
51,
6465,
12,
5188,
2390,
13,
705,
1267,
198,
220,
220,
220,
220,
220,
357,
705,
220,
220,
23578,
49273,
13,
705,
1267,
198,
220,
220,
220,
220,
220,
357,
705,
23578,
31631,
13,
705,
1267,
198,
220,
220,
220,
1267,
6739,
198,
220,
23578,
49273,
13,
628,
220,
337,
36252,
900,
62,
7752,
12003,
62,
23893,
62,
482,
13,
198,
220,
220,
220,
8677,
62,
8189,
7,
26173,
8924,
1303,
7,
198,
220,
220,
220,
220,
220,
357,
705,
2200,
15490,
331,
62,
20688,
13,
705,
1267,
198,
220,
220,
220,
220,
220,
357,
705,
42715,
331,
62,
20688,
62,
4871,
5550,
20032,
17941,
13,
705,
1267,
198,
220,
220,
220,
220,
220,
357,
705,
220,
220,
44731,
44513,
13,
705,
1267,
198,
220,
220,
220,
220,
220,
357,
705,
220,
220,
48006,
9782,
1961,
44513,
13,
705,
1267,
198,
220,
220,
220,
220,
220,
357,
705,
220,
220,
220,
220,
337,
36252,
50,
1332,
13,
705,
1267,
198,
220,
220,
220,
220,
220,
357,
705,
23578,
31631,
13,
705,
1267,
628,
220,
220,
220,
220,
220,
357,
705,
42715,
331,
62,
20688,
62,
4871,
30023,
2538,
10979,
6234,
13,
705,
1267,
198,
220,
220,
220,
220,
220,
357,
705,
220,
220,
337,
36252,
1332,
13,
705,
1267,
198,
220,
220,
220,
220,
220,
357,
705,
220,
220,
220,
220,
43001,
12,
5188,
2390,
1100,
62,
13116,
62,
3672,
13,
25113
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS zcl_abapgit_apack_reader DEFINITION
PUBLIC
FINAL
CREATE PRIVATE .
PUBLIC SECTION.
TYPES ty_package_name TYPE devclass .
CLASS-METHODS create_instance
IMPORTING
!iv_package_name TYPE ty_package_name
RETURNING
VALUE(ro_manifest_reader) TYPE REF TO zcl_abapgit_apack_reader .
METHODS get_manifest_descriptor
RETURNING
VALUE(rs_manifest_descriptor) TYPE zif_abapgit_apack_definitions=>ty_descriptor .
METHODS set_manifest_descriptor
IMPORTING
!is_manifest_descriptor TYPE zif_abapgit_apack_definitions=>ty_descriptor .
METHODS copy_manifest_descriptor
IMPORTING
!io_manifest_provider TYPE REF TO object .
METHODS has_manifest
RETURNING
VALUE(rv_has_manifest) TYPE abap_bool .
METHODS constructor
IMPORTING
!iv_package_name TYPE ty_package_name .
PROTECTED SECTION.
PRIVATE SECTION.
TYPES:
BEGIN OF ty_s_manifest_declaration,
clsname TYPE seometarel-clsname,
devclass TYPE devclass,
END OF ty_s_manifest_declaration .
DATA mv_package_name TYPE ty_package_name .
DATA ms_cached_descriptor TYPE zif_abapgit_apack_definitions=>ty_descriptor .
DATA mv_is_cached TYPE abap_bool .
ENDCLASS.
CLASS zcl_abapgit_apack_reader IMPLEMENTATION.
METHOD constructor.
me->mv_package_name = iv_package_name.
ENDMETHOD.
METHOD create_instance.
CREATE OBJECT ro_manifest_reader EXPORTING iv_package_name = iv_package_name.
ENDMETHOD.
METHOD get_manifest_descriptor.
DATA: lo_manifest_provider TYPE REF TO object,
ls_manifest_implementation TYPE ty_s_manifest_declaration.
IF mv_is_cached IS INITIAL AND mv_package_name IS NOT INITIAL.
SELECT SINGLE seometarel~clsname tadir~devclass FROM seometarel "#EC CI_NOORDER
INNER JOIN tadir ON seometarel~clsname = tadir~obj_name "#EC CI_BUFFJOIN
INTO ls_manifest_implementation
WHERE tadir~pgmid = 'R3TR' AND
tadir~object = 'CLAS' AND
seometarel~version = '1' AND
seometarel~refclsname = 'ZIF_APACK_MANIFEST' AND
tadir~devclass = me->mv_package_name.
IF ls_manifest_implementation IS INITIAL.
SELECT SINGLE seometarel~clsname tadir~devclass FROM seometarel "#EC CI_NOORDER
INNER JOIN tadir ON seometarel~clsname = tadir~obj_name "#EC CI_BUFFJOIN
INTO ls_manifest_implementation
WHERE tadir~pgmid = 'R3TR' AND
tadir~object = 'CLAS' AND
seometarel~version = '1' AND
seometarel~refclsname = 'IF_APACK_MANIFEST' AND
tadir~devclass = me->mv_package_name.
ENDIF.
IF ls_manifest_implementation IS NOT INITIAL.
TRY.
CREATE OBJECT lo_manifest_provider TYPE (ls_manifest_implementation-clsname).
CATCH cx_sy_create_object_error.
CLEAR: rs_manifest_descriptor.
ENDTRY.
IF lo_manifest_provider IS BOUND.
me->copy_manifest_descriptor( io_manifest_provider = lo_manifest_provider ).
ENDIF.
ENDIF.
me->mv_is_cached = abap_true.
ENDIF.
rs_manifest_descriptor = me->ms_cached_descriptor.
ENDMETHOD.
METHOD has_manifest.
DATA: ls_returned_manifest TYPE zif_abapgit_apack_definitions=>ty_descriptor.
ls_returned_manifest = me->get_manifest_descriptor( ).
rv_has_manifest = abap_false.
IF ls_returned_manifest IS NOT INITIAL.
rv_has_manifest = abap_true.
ENDIF.
ENDMETHOD.
METHOD set_manifest_descriptor.
me->mv_is_cached = abap_true.
me->ms_cached_descriptor = is_manifest_descriptor.
ENDMETHOD.
METHOD copy_manifest_descriptor.
DATA: ls_my_manifest_wo_deps TYPE zif_abapgit_apack_definitions=>ty_descriptor_wo_dependencies,
ls_my_dependency TYPE zif_abapgit_apack_definitions=>ty_dependency.
FIELD-SYMBOLS: <lg_descriptor> TYPE any,
<lt_dependencies> TYPE ANY TABLE,
<lg_dependency> TYPE any.
ASSIGN io_manifest_provider->('ZIF_APACK_MANIFEST~DESCRIPTOR') TO <lg_descriptor>.
IF <lg_descriptor> IS NOT ASSIGNED.
ASSIGN io_manifest_provider->('IF_APACK_MANIFEST~DESCRIPTOR') TO <lg_descriptor>.
ENDIF.
IF <lg_descriptor> IS ASSIGNED.
" A little more complex than a normal MOVE-CORRSPONDING
" to avoid dumps in case of future updates to the dependencies table structure
ASSIGN COMPONENT 'DEPENDENCIES' OF STRUCTURE <lg_descriptor> TO <lt_dependencies>.
IF <lt_dependencies> IS ASSIGNED.
LOOP AT <lt_dependencies> ASSIGNING <lg_dependency>.
MOVE-CORRESPONDING <lg_dependency> TO ls_my_dependency.
INSERT ls_my_dependency INTO TABLE me->ms_cached_descriptor-dependencies.
ENDLOOP.
MOVE-CORRESPONDING <lg_descriptor> TO ls_my_manifest_wo_deps.
MOVE-CORRESPONDING ls_my_manifest_wo_deps TO me->ms_cached_descriptor.
ENDIF.
ENDIF.
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
397,
499,
18300,
62,
499,
441,
62,
46862,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
25261,
198,
220,
29244,
6158,
4810,
3824,
6158,
764,
628,
220,
44731,
44513,
13,
628,
220,
220,
220,
24412,
47,
1546,
1259,
62,
26495,
62,
3672,
41876,
1614,
4871,
764,
628,
220,
220,
220,
42715,
12,
49273,
50,
2251,
62,
39098,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
26495,
62,
3672,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
1259,
62,
26495,
62,
3672,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
305,
62,
805,
8409,
62,
46862,
8,
41876,
4526,
37,
5390,
1976,
565,
62,
397,
499,
18300,
62,
499,
441,
62,
46862,
764,
198,
220,
220,
220,
337,
36252,
50,
651,
62,
805,
8409,
62,
20147,
1968,
273,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
3808,
62,
805,
8409,
62,
20147,
1968,
273,
8,
41876,
1976,
361,
62,
397,
499,
18300,
62,
499,
441,
62,
4299,
50101,
14804,
774,
62,
20147,
1968,
273,
764,
198,
220,
220,
220,
337,
36252,
50,
900,
62,
805,
8409,
62,
20147,
1968,
273,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
271,
62,
805,
8409,
62,
20147,
1968,
273,
41876,
1976,
361,
62,
397,
499,
18300,
62,
499,
441,
62,
4299,
50101,
14804,
774,
62,
20147,
1968,
273,
764,
198,
220,
220,
220,
337,
36252,
50,
4866,
62,
805,
8409,
62,
20147,
1968,
273,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
952,
62,
805,
8409,
62,
15234,
1304,
41876,
4526,
37,
5390,
2134,
764,
198,
220,
220,
220,
337,
36252,
50,
468,
62,
805,
8409,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
81,
85,
62,
10134,
62,
805,
8409,
8,
41876,
450,
499,
62,
30388,
764,
198,
220,
220,
220,
337,
36252,
50,
23772,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
26495,
62,
3672,
41876,
1259,
62,
26495,
62,
3672,
764,
198,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
4810,
3824,
6158,
44513,
13,
628,
220,
220,
220,
24412,
47,
1546,
25,
198,
220,
220,
220,
220,
220,
347,
43312,
3963,
1259,
62,
82,
62,
805,
8409,
62,
32446,
10186,
11,
198,
220,
220,
220,
220,
220,
220,
220,
537,
82,
3672,
220,
41876,
384,
908,
20318,
12,
565,
82,
3672,
11,
198,
220,
220,
220,
220,
220,
220,
220,
1614,
4871,
41876,
1614,
4871,
11,
198,
220,
220,
220,
220,
220,
23578,
3963,
1259,
62,
82,
62,
805,
8409,
62,
32446,
10186,
764,
628,
220,
220,
220,
42865,
285,
85,
62,
26495,
62,
3672,
41876,
1259,
62,
26495,
62,
3672,
764,
198,
220,
220,
220,
42865,
13845,
62,
66,
2317,
62,
20147,
1968,
273,
41876,
1976,
361,
62,
397,
499,
18300,
62,
499,
441,
62,
4299,
50101,
14804,
774,
62,
20147,
1968,
273,
764,
198,
220,
220,
220,
42865,
285,
85,
62,
271,
62,
66,
2317,
41876,
450,
499,
62,
30388,
764,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1976,
565,
62,
397,
499,
18300,
62,
499,
441,
62,
46862,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
23772,
13,
198,
220,
220,
220,
502,
3784,
76,
85,
62,
26495,
62,
3672,
796,
21628,
62,
26495,
62,
3672,
13,
198,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
2251,
62,
39098,
13,
198,
220,
220,
220,
29244,
6158,
25334,
23680,
686,
62,
805,
8409,
62,
46862,
7788,
15490,
2751,
21628,
62,
26495,
62,
3672,
796,
21628,
62,
26495,
62,
3672,
13,
198,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
651,
62,
805,
8409,
62,
20147,
1968,
273,
13,
628,
220,
220,
220,
42865,
25,
2376,
62,
805,
8409,
62,
15234,
1304,
220,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
2134,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
43979,
62,
805,
8409,
62,
320,
32851,
41876,
1259,
62,
82,
62,
805,
8409,
62,
32446,
10186,
13,
628,
220,
220,
220,
16876,
285,
85,
62,
271,
62,
66,
2317,
3180,
3268,
2043,
12576,
5357,
285,
85,
62,
26495,
62,
3672,
3180,
5626,
3268,
2043,
12576,
13,
198,
220,
220,
220,
220,
220,
33493,
311,
2751,
2538,
384,
908,
20318,
93,
565,
82,
3672,
36264,
343,
93,
7959,
4871,
16034,
384,
908,
20318,
25113,
2943,
14514,
62,
15285,
12532,
1137,
198,
220,
220,
220,
220,
220,
220,
220,
220,
3268,
21479,
32357,
1268,
36264,
343,
6177,
384,
908,
20318,
93,
565,
82,
3672,
796,
36264,
343,
93,
26801,
62,
3672,
25113,
2943,
14514,
62,
19499,
5777,
45006,
1268,
198,
220,
220,
220,
220,
220,
220,
220,
220,
39319,
43979,
62,
805,
8409,
62,
320,
32851,
198,
220,
220,
220,
220,
220,
220,
220,
220,
33411,
36264,
343,
93,
6024,
13602,
796,
705,
49,
18,
5446,
6,
5357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
36264,
343,
93,
15252,
796,
705,
5097,
1921,
6,
5357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
384,
908,
20318,
93,
9641,
796,
705,
16,
6,
5357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
384,
908,
20318,
93,
5420,
565,
82,
3672,
796,
705,
57,
5064,
62,
2969,
8120,
62,
10725,
5064,
6465,
6,
5357,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
36264,
343,
93,
7959,
4871,
796,
502,
3784,
76,
85,
62,
26495,
62,
3672,
13,
198,
220,
220,
220,
220,
220,
16876,
43979,
62,
805,
8409,
62,
320,
32851,
3180,
3268,
2043,
12576,
13,
198,
220,
220,
220,
220,
220,
220,
220,
33493,
311,
2751,
2538,
384,
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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
*"* use this source file for your ABAP unit test classes
CLASS lcl_unittest DEFINITION FOR TESTING
DURATION SHORT
RISK LEVEL HARMLESS
FINAL.
PRIVATE SECTION.
DATA:
f_cut TYPE REF TO zif_abak_params.
METHODS malformed FOR TESTING.
METHODS no_params FOR TESTING RAISING zcx_abak.
METHODS single_param FOR TESTING RAISING zcx_abak.
METHODS two_params FOR TESTING RAISING zcx_abak.
METHODS obligatory_missing FOR TESTING.
METHODS duplicate FOR TESTING.
METHODS non_obligatory_missing FOR TESTING RAISING zcx_abak.
METHODS invalid_param FOR TESTING.
METHODS length_exceeded FOR TESTING.
METHODS length_not_exceeded FOR TESTING RAISING zcx_abak.
ENDCLASS. "lcl_Unittest
CLASS lcl_unittest IMPLEMENTATION.
METHOD malformed.
TRY.
zcl_abak_params=>create_instance( i_params = 'This is not valid'
i_paramsdef = space ).
cl_abap_unit_assert=>fail( 'Invalid syntax should have been detected' ).
CATCH zcx_abak.
RETURN.
ENDTRY.
ENDMETHOD.
METHOD no_params.
f_cut = zcl_abak_params=>create_instance( i_params = space
i_paramsdef = space ).
ENDMETHOD.
METHOD single_param.
f_cut = zcl_abak_params=>create_instance( i_params = 'PARAM1=123'
i_paramsdef = 'PARAM1' ).
cl_abap_unit_assert=>assert_equals( exp = '123'
act = f_cut->get( 'PARAM1' ) ).
ENDMETHOD.
METHOD two_params.
f_cut = zcl_abak_params=>create_instance( i_params = 'PARAM1=123 PARAM2=456'
i_paramsdef = 'PARAM1 PARAM2' ).
cl_abap_unit_assert=>assert_equals( exp = '123'
act = f_cut->get( 'PARAM1' ) ).
cl_abap_unit_assert=>assert_equals( exp = '456'
act = f_cut->get( 'PARAM2' ) ).
ENDMETHOD.
METHOD invalid_param.
TRY.
f_cut = zcl_abak_params=>create_instance( i_params = 'INVALID=123'
i_paramsdef = 'VALID' ).
cl_abap_unit_assert=>fail( 'Should have failed with INVALID parameter ').
CATCH zcx_abak.
RETURN.
ENDTRY.
ENDMETHOD.
METHOD obligatory_missing.
TRY.
f_cut = zcl_abak_params=>create_instance( i_params ='VALID=123'
i_paramsdef = '+OBLIGATORY VALID' ).
cl_abap_unit_assert=>fail( 'Obligatory parameter should have been detected').
CATCH zcx_abak.
RETURN.
ENDTRY.
ENDMETHOD.
METHOD duplicate.
TRY.
f_cut = zcl_abak_params=>create_instance( i_params ='PARAM1=A PARAM1=B'
i_paramsdef = 'PARAM1' ).
cl_abap_unit_assert=>fail( 'Duplicate parameter should have been detected').
CATCH zcx_abak.
RETURN.
ENDTRY.
ENDMETHOD.
METHOD non_obligatory_missing.
f_cut = zcl_abak_params=>create_instance( i_params = 'VALID=123'
i_paramsdef = 'NON_OBLIGATORY VALID' ).
ENDMETHOD.
METHOD length_exceeded.
TRY.
f_cut = zcl_abak_params=>create_instance( i_params = 'PARAM3=123456'
i_paramsdef = 'PARAM1 PARAM2 PARAM3(5)' ).
cl_abap_unit_assert=>fail( 'Max length of 5 should have been detected').
CATCH zcx_abak.
RETURN.
ENDTRY.
ENDMETHOD.
METHOD length_not_exceeded.
f_cut = zcl_abak_params=>create_instance( i_params = 'PARAM3=12345'
i_paramsdef = 'PARAM1 PARAM2 PARAM3(5)' ).
cl_abap_unit_assert=>assert_equals( exp = '12345'
act = f_cut->get( 'PARAM3' ) ).
ENDMETHOD.
ENDCLASS. "lcl_Unittest
| [
9,
1,
9,
779,
428,
2723,
2393,
329,
534,
9564,
2969,
4326,
1332,
6097,
198,
31631,
300,
565,
62,
403,
715,
395,
5550,
20032,
17941,
7473,
43001,
2751,
198,
220,
360,
4261,
6234,
6006,
9863,
198,
220,
45698,
42,
49277,
43638,
5805,
7597,
198,
220,
25261,
13,
628,
220,
4810,
3824,
6158,
44513,
13,
198,
220,
220,
220,
42865,
25,
198,
220,
220,
220,
220,
220,
277,
62,
8968,
220,
220,
41876,
4526,
37,
5390,
1976,
361,
62,
397,
461,
62,
37266,
13,
628,
220,
220,
220,
337,
36252,
50,
6428,
12214,
7473,
43001,
2751,
13,
198,
220,
220,
220,
337,
36252,
50,
645,
62,
37266,
7473,
43001,
2751,
17926,
1797,
2751,
1976,
66,
87,
62,
397,
461,
13,
198,
220,
220,
220,
337,
36252,
50,
2060,
62,
17143,
7473,
43001,
2751,
17926,
1797,
2751,
1976,
66,
87,
62,
397,
461,
13,
198,
220,
220,
220,
337,
36252,
50,
734,
62,
37266,
7473,
43001,
2751,
17926,
1797,
2751,
1976,
66,
87,
62,
397,
461,
13,
198,
220,
220,
220,
337,
36252,
50,
44609,
62,
45688,
7473,
43001,
2751,
13,
198,
220,
220,
220,
337,
36252,
50,
23418,
7473,
43001,
2751,
13,
198,
220,
220,
220,
337,
36252,
50,
1729,
62,
672,
4604,
2870,
62,
45688,
7473,
43001,
2751,
17926,
1797,
2751,
1976,
66,
87,
62,
397,
461,
13,
198,
220,
220,
220,
337,
36252,
50,
12515,
62,
17143,
7473,
43001,
2751,
13,
198,
220,
220,
220,
337,
36252,
50,
4129,
62,
1069,
2707,
276,
7473,
43001,
2751,
13,
198,
220,
220,
220,
337,
36252,
50,
4129,
62,
1662,
62,
1069,
2707,
276,
7473,
43001,
2751,
17926,
1797,
2751,
1976,
66,
87,
62,
397,
461,
13,
198,
198,
10619,
31631,
13,
220,
220,
220,
220,
220,
220,
366,
75,
565,
62,
3118,
715,
395,
628,
198,
31631,
300,
565,
62,
403,
715,
395,
30023,
2538,
10979,
6234,
13,
628,
220,
337,
36252,
6428,
12214,
13,
198,
220,
220,
220,
7579,
56,
13,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
565,
62,
397,
461,
62,
37266,
14804,
17953,
62,
39098,
7,
1312,
62,
37266,
220,
220,
220,
796,
705,
1212,
318,
407,
4938,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1312,
62,
37266,
4299,
796,
2272,
6739,
628,
220,
220,
220,
220,
220,
220,
220,
537,
62,
397,
499,
62,
20850,
62,
30493,
14804,
32165,
7,
705,
44651,
15582,
815,
423,
587,
12326,
6,
6739,
198,
220,
220,
220,
220,
220,
327,
11417,
1976,
66,
87,
62,
397,
461,
13,
198,
220,
220,
220,
220,
220,
220,
220,
30826,
27064,
13,
198,
220,
220,
220,
23578,
40405,
13,
198,
220,
23578,
49273,
13,
628,
220,
337,
36252,
645,
62,
37266,
13,
198,
220,
220,
220,
277,
62,
8968,
796,
1976,
565,
62,
397,
461,
62,
37266,
14804,
17953,
62,
39098,
7,
1312,
62,
37266,
220,
220,
220,
796,
2272,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1312,
62,
37266,
4299,
796,
2272,
6739,
198,
220,
23578,
49273,
13,
628,
220,
337,
36252,
2060,
62,
17143,
13,
198,
220,
220,
220,
277,
62,
8968,
796,
1976,
565,
62,
397,
461,
62,
37266,
14804,
17953,
62,
39098,
7,
1312,
62,
37266,
220,
220,
220,
796,
705,
27082,
2390,
16,
28,
10163,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1312,
62,
37266,
4299,
796,
705,
27082,
2390,
16,
6,
6739,
628,
220,
220,
220,
537,
62,
397,
499,
62,
20850,
62,
30493,
14804,
30493,
62,
4853,
874,
7,
1033,
796,
705,
10163,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
719,
796,
277,
62,
8968,
3784,
1136,
7,
705,
27082,
2390,
16,
6,
1267,
6739,
198,
220,
23578,
49273,
13,
628,
220,
337,
36252,
734,
62,
37266,
13,
198,
220,
220,
220,
277,
62,
8968,
796,
1976,
565,
62,
397,
461,
62,
37266,
14804,
17953,
62,
39098,
7,
1312,
62,
37266,
220,
220,
220,
796,
705,
27082,
2390,
16,
28,
10163,
29463,
2390,
17,
28,
29228,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1312,
62,
37266,
4299,
796,
705,
27082,
2390,
16,
29463,
2390,
17,
6,
6739,
628,
220,
220,
220,
537,
62,
397,
499,
62,
20850,
62,
30493,
14804,
30493,
62,
4853,
874,
7,
1033,
796,
705,
10163,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
719,
796,
277,
62,
8968,
3784,
1136,
7,
705,
27082,
2390,
16,
6,
1267,
6739,
198,
220,
220,
220,
537,
62,
397,
499,
62,
20850,
62,
30493,
14804,
30493,
62,
4853,
874,
7,
1033,
796,
705,
29228,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
719,
796,
277,
62,
8968,
3784,
1136,
7,
705,
27082,
2390,
17,
6,
1267,
6739,
198,
220,
23578,
49273,
13,
628,
220,
337,
36252,
12515,
62,
17143,
13,
198,
220,
220
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,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public
inheriting from ZCL_MQBA_MESSAGE
create public .
public section.
methods SET_DATA_FROM_EXT_MSG
importing
!IS_MSG type ZMQBA_API_S_EBR_MSG
!IV_BROKER type DATA
returning
value(RV_SUCCESS) type ABAP_BOOL .
protected section.
private section.
ENDCLASS.
CLASS ZCL_MQBA_EXT_MESSAGE IMPLEMENTATION.
METHOD set_data_from_ext_msg.
* init
IF iv_broker IS INITIAL
OR is_msg IS INITIAL
OR is_msg-topic IS INITIAL.
rv_success = abap_false.
RETURN.
ENDIF.
* fill main data
set_sender( iv_broker ).
set_scope( zif_mqba_broker=>c_scope_external ).
set_id( is_msg-msg_id ).
set_topic( is_msg-topic ).
set_payload( is_msg-payload ).
IF is_msg-qos IS NOT INITIAL.
set_property(
iv_name = 'QOS'
iv_value = is_msg-qos
).
ENDIF.
IF is_msg-retain IS NOT INITIAL.
set_property(
iv_name = 'RETAIN'
iv_value = is_msg-retain
).
ENDIF.
rv_success = abap_true.
ENDMETHOD.
ENDCLASS.
| [
4871,
1168,
5097,
62,
49215,
4339,
62,
13918,
62,
44,
1546,
4090,
8264,
6770,
198,
220,
1171,
198,
220,
10639,
1780,
422,
1168,
5097,
62,
49215,
4339,
62,
44,
1546,
4090,
8264,
198,
220,
2251,
1171,
764,
198,
198,
11377,
2665,
13,
628,
220,
5050,
25823,
62,
26947,
62,
10913,
2662,
62,
13918,
62,
5653,
38,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
1797,
62,
5653,
38,
2099,
1168,
49215,
4339,
62,
17614,
62,
50,
62,
36,
11473,
62,
5653,
38,
198,
220,
220,
220,
220,
220,
5145,
3824,
62,
11473,
11380,
1137,
2099,
42865,
198,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
1988,
7,
49,
53,
62,
12564,
4093,
7597,
8,
2099,
9564,
2969,
62,
8202,
3535,
764,
198,
24326,
2665,
13,
198,
19734,
2665,
13,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1168,
5097,
62,
49215,
4339,
62,
13918,
62,
44,
1546,
4090,
8264,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
900,
62,
7890,
62,
6738,
62,
2302,
62,
19662,
13,
198,
198,
9,
2315,
198,
220,
220,
220,
16876,
21628,
62,
7957,
6122,
3180,
3268,
2043,
12576,
198,
220,
220,
220,
220,
220,
6375,
318,
62,
19662,
3180,
3268,
2043,
12576,
198,
220,
220,
220,
220,
220,
6375,
318,
62,
19662,
12,
26652,
3180,
3268,
2043,
12576,
13,
198,
220,
220,
220,
220,
220,
374,
85,
62,
13138,
796,
450,
499,
62,
9562,
13,
198,
220,
220,
220,
220,
220,
30826,
27064,
13,
198,
220,
220,
220,
23578,
5064,
13,
628,
198,
9,
6070,
1388,
1366,
198,
220,
220,
220,
900,
62,
82,
2194,
7,
21628,
62,
7957,
6122,
6739,
198,
220,
220,
220,
900,
62,
29982,
7,
1976,
361,
62,
76,
80,
7012,
62,
7957,
6122,
14804,
66,
62,
29982,
62,
22615,
6739,
198,
220,
220,
220,
900,
62,
312,
7,
318,
62,
19662,
12,
19662,
62,
312,
6739,
198,
220,
220,
220,
900,
62,
26652,
7,
318,
62,
19662,
12,
26652,
6739,
198,
220,
220,
220,
900,
62,
15577,
2220,
7,
318,
62,
19662,
12,
15577,
2220,
6739,
628,
220,
220,
220,
16876,
318,
62,
19662,
12,
80,
418,
3180,
5626,
3268,
2043,
12576,
13,
198,
220,
220,
220,
220,
220,
900,
62,
26745,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
3672,
220,
796,
705,
48,
2640,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
8367,
796,
318,
62,
19662,
12,
80,
418,
198,
220,
220,
220,
220,
220,
6739,
198,
220,
220,
220,
23578,
5064,
13,
628,
220,
220,
220,
16876,
318,
62,
19662,
12,
1186,
391,
3180,
5626,
3268,
2043,
12576,
13,
198,
220,
220,
220,
220,
220,
900,
62,
26745,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
3672,
220,
796,
705,
2200,
30339,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
8367,
796,
318,
62,
19662,
12,
1186,
391,
198,
220,
220,
220,
220,
220,
6739,
198,
220,
220,
220,
23578,
5064,
13,
628,
220,
220,
220,
374,
85,
62,
13138,
796,
450,
499,
62,
7942,
13,
628,
220,
23578,
49273,
13,
198,
10619,
31631,
13,
198
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS ycl_abapgit_popups DEFINITION
PUBLIC
FINAL
CREATE PRIVATE
GLOBAL FRIENDS ycl_abapgit_ui_factory.
PUBLIC SECTION.
INTERFACES: yif_abapgit_popups.
ALIASES:
popup_package_export FOR yif_abapgit_popups~popup_package_export,
popup_folder_logic FOR yif_abapgit_popups~popup_folder_logic,
popup_object FOR yif_abapgit_popups~popup_object,
create_branch_popup FOR yif_abapgit_popups~create_branch_popup,
run_page_class_popup FOR yif_abapgit_popups~run_page_class_popup,
repo_new_offline FOR yif_abapgit_popups~repo_new_offline,
branch_list_popup FOR yif_abapgit_popups~branch_list_popup,
repo_popup FOR yif_abapgit_popups~repo_popup,
popup_to_confirm FOR yif_abapgit_popups~popup_to_confirm,
popup_to_inform FOR yif_abapgit_popups~popup_to_inform,
popup_to_create_package FOR yif_abapgit_popups~popup_to_create_package,
popup_to_create_transp_branch FOR yif_abapgit_popups~popup_to_create_transp_branch,
popup_to_select_transports FOR yif_abapgit_popups~popup_to_select_transports,
popup_to_select_from_list FOR yif_abapgit_popups~popup_to_select_from_list,
branch_popup_callback FOR yif_abapgit_popups~branch_popup_callback,
package_popup_callback FOR yif_abapgit_popups~package_popup_callback,
popup_transport_request FOR yif_abapgit_popups~popup_transport_request.
PRIVATE SECTION.
TYPES:
ty_sval_tt TYPE STANDARD TABLE OF sval WITH DEFAULT KEY.
CONSTANTS c_fieldname_selected TYPE lvc_fname VALUE `SELECTED` ##NO_TEXT.
DATA go_select_list_popup TYPE REF TO cl_salv_table .
DATA gr_table TYPE REF TO data .
DATA gv_cancel TYPE abap_bool .
DATA go_table_descr TYPE REF TO cl_abap_tabledescr .
METHODS add_field
IMPORTING
!iv_tabname TYPE sval-tabname
!iv_fieldname TYPE sval-fieldname
!iv_fieldtext TYPE sval-fieldtext
!iv_value TYPE clike DEFAULT ''
!iv_field_attr TYPE sval-field_attr DEFAULT ''
!iv_obligatory TYPE spo_obl OPTIONAL
CHANGING
!ct_fields TYPE ty_sval_tt .
METHODS create_new_table
IMPORTING
!it_list TYPE STANDARD TABLE .
METHODS get_selected_rows
EXPORTING
!et_list TYPE INDEX TABLE .
METHODS on_select_list_link_click
FOR EVENT link_click OF cl_salv_events_table
IMPORTING
!row
!column .
METHODS on_select_list_function_click
FOR EVENT added_function OF cl_salv_events_table
IMPORTING
!e_salv_function .
METHODS extract_field_values
IMPORTING
it_fields TYPE ty_sval_tt
EXPORTING
ev_url TYPE abaptxt255-line
ev_package TYPE tdevc-devclass
ev_branch TYPE textl-line .
ENDCLASS.
CLASS ycl_abapgit_popups IMPLEMENTATION.
METHOD add_field.
FIELD-SYMBOLS: <ls_field> LIKE LINE OF ct_fields.
APPEND INITIAL LINE TO ct_fields ASSIGNING <ls_field>.
<ls_field>-tabname = iv_tabname.
<ls_field>-fieldname = iv_fieldname.
<ls_field>-fieldtext = iv_fieldtext.
<ls_field>-value = iv_value.
<ls_field>-field_attr = iv_field_attr.
<ls_field>-field_obl = iv_obligatory.
ENDMETHOD.
METHOD yif_abapgit_popups~branch_list_popup.
DATA: lo_branches TYPE REF TO ycl_abapgit_git_branch_list,
lt_branches TYPE yif_abapgit_definitions=>ty_git_branch_list_tt,
lv_answer TYPE c LENGTH 1,
lv_default TYPE i,
lv_head_suffix TYPE string,
lv_head_symref TYPE string,
lt_selection TYPE TABLE OF spopli.
FIELD-SYMBOLS: <ls_sel> LIKE LINE OF lt_selection,
<ls_branch> LIKE LINE OF lt_branches.
lo_branches = ycl_abapgit_git_transport=>branches( iv_url ).
lt_branches = lo_branches->get_branches_only( ).
lv_head_suffix = | ({ yif_abapgit_definitions=>c_head_name })|.
lv_head_symref = lo_branches->get_head_symref( ).
LOOP AT lt_branches ASSIGNING <ls_branch>.
CHECK <ls_branch>-name IS NOT INITIAL. " To ensure some below ifs
IF <ls_branch>-is_head = abap_true.
IF <ls_branch>-name = yif_abapgit_definitions=>c_head_name. " HEAD
IF <ls_branch>-name <> lv_head_symref AND lv_head_symref IS NOT INITIAL.
" HEAD but other HEAD symref exists - ignore
CONTINUE.
ELSE.
INSERT INITIAL LINE INTO lt_selection INDEX 1 ASSIGNING <ls_sel>.
<ls_sel>-varoption = <ls_branch>-name.
ENDIF.
ELSE.
INSERT INITIAL LINE INTO lt_selection INDEX 1 ASSIGNING <ls_sel>.
<ls_sel>-varoption = <ls_branch>-display_name && lv_head_suffix.
ENDIF.
IF lv_default > 0. " Shift down default if set
lv_default = lv_default + 1.
ENDIF.
ELSE.
APPEND INITIAL LINE TO lt_selection ASSIGNING <ls_sel>.
<ls_sel>-varoption = <ls_branch>-display_name.
ENDIF.
IF <ls_branch>-name = iv_default_branch.
IF <ls_branch>-is_head = abap_true.
lv_default = 1.
ELSE.
lv_default = sy-tabix.
ENDIF.
ENDIF.
ENDLOOP.
IF iv_show_new_option = abap_true.
APPEND INITIAL LINE TO lt_selection ASSIGNING <ls_sel>.
<ls_sel>-varoption = yif_abapgit_popups=>c_new_branch_label.
ENDIF.
CALL FUNCTION 'POPUP_TO_DECIDE_LIST'
EXPORTING
textline1 = 'Select branch'
titel = 'Select branch'
start_col = 30
start_row = 5
cursorline = lv_default
IMPORTING
answer = lv_answer
TABLES
t_spopli = lt_selection
EXCEPTIONS
not_enough_answers = 1
too_much_answers = 2
too_much_marks = 3
OTHERS = 4. "#EC NOTEXT
IF sy-subrc <> 0.
ycx_abapgit_exception=>raise( 'Error from POPUP_TO_DECIDE_LIST' ).
ENDIF.
IF lv_answer = 'A'. " cancel
RETURN.
ENDIF.
READ TABLE lt_selection ASSIGNING <ls_sel> WITH KEY selflag = abap_true.
ASSERT sy-subrc = 0.
IF iv_show_new_option = abap_true AND <ls_sel>-varoption = yif_abapgit_popups=>c_new_branch_label.
rs_branch-name = yif_abapgit_popups=>c_new_branch_label.
ELSE.
REPLACE FIRST OCCURRENCE OF lv_head_suffix IN <ls_sel>-varoption WITH ''.
READ TABLE lt_branches WITH KEY display_name = <ls_sel>-varoption ASSIGNING <ls_branch>.
IF sy-subrc <> 0.
* branch name longer than 65 characters
LOOP AT lt_branches ASSIGNING <ls_branch> WHERE display_name CS <ls_sel>-varoption.
EXIT. " current loop
ENDLOOP.
ENDIF.
ASSERT <ls_branch> IS ASSIGNED.
rs_branch = lo_branches->find_by_name( <ls_branch>-name ).
ENDIF.
ENDMETHOD.
METHOD yif_abapgit_popups~branch_popup_callback.
DATA: lv_url TYPE string,
ls_package_data TYPE scompkdtln,
ls_branch TYPE yif_abapgit_definitions=>ty_git_branch,
lv_create TYPE boolean.
FIELD-SYMBOLS: <ls_furl> LIKE LINE OF ct_fields,
<ls_fbranch> LIKE LINE OF ct_fields,
<ls_fpackage> LIKE LINE OF ct_fields.
CLEAR cs_error.
IF iv_code = 'COD1'.
cv_show_popup = abap_true.
READ TABLE ct_fields ASSIGNING <ls_furl> WITH KEY tabname = 'ABAPTXT255'.
IF sy-subrc <> 0 OR <ls_furl>-value IS INITIAL.
MESSAGE 'Fill URL' TYPE 'S' DISPLAY LIKE 'E'. "#EC NOTEXT
RETURN.
ENDIF.
lv_url = <ls_furl>-value.
ls_branch = branch_list_popup( lv_url ).
IF ls_branch IS INITIAL.
RETURN.
ENDIF.
READ TABLE ct_fields ASSIGNING <ls_fbranch> WITH KEY tabname = 'TEXTL'.
ASSERT sy-subrc = 0.
<ls_fbranch>-value = ls_branch-name.
ELSEIF iv_code = 'COD2'.
cv_show_popup = abap_true.
READ TABLE ct_fields ASSIGNING <ls_fpackage> WITH KEY fieldname = 'DEVCLASS'.
ASSERT sy-subrc = 0.
ls_package_data-devclass = <ls_fpackage>-value.
popup_to_create_package(
IMPORTING
es_package_data = ls_package_data
ev_create = lv_create ).
IF lv_create = abap_false.
RETURN.
ENDIF.
ycl_abapgit_factory=>get_sap_package( ls_package_data-devclass )->create( ls_package_data ).
COMMIT WORK.
<ls_fpackage>-value = ls_package_data-devclass.
ENDIF.
ENDMETHOD.
METHOD yif_abapgit_popups~create_branch_popup.
DATA: lv_answer TYPE c LENGTH 1,
lt_fields TYPE TABLE OF sval.
FIELD-SYMBOLS: <ls_field> LIKE LINE OF lt_fields.
CLEAR: ev_name, ev_cancel.
add_field( EXPORTING iv_tabname = 'TEXTL'
iv_fieldname = 'LINE'
iv_fieldtext = 'Name'
iv_value = 'new-branch-name'
CHANGING ct_fields = lt_fields ).
CALL FUNCTION 'POPUP_GET_VALUES'
EXPORTING
popup_title = 'Create branch'
IMPORTING
returncode = lv_answer
TABLES
fields = lt_fields
EXCEPTIONS
error_in_fields = 1
OTHERS = 2 ##NO_TEXT.
IF sy-subrc <> 0.
ycx_abapgit_exception=>raise( 'error from POPUP_GET_VALUES' ).
ENDIF.
IF lv_answer = 'A'.
ev_cancel = abap_true.
ELSE.
READ TABLE lt_fields INDEX 1 ASSIGNING <ls_field>.
ASSERT sy-subrc = 0.
ev_name = ycl_abapgit_git_branch_list=>complete_heads_branch_name(
ycl_abapgit_git_branch_list=>normalize_branch_name( <ls_field>-value ) ).
ENDIF.
ENDMETHOD.
METHOD create_new_table.
" create and populate a table on the fly derived from
" it_data with a select column
DATA: lr_struct TYPE REF TO data,
lt_components TYPE cl_abap_structdescr=>component_table,
lo_struct_descr TYPE REF TO cl_abap_structdescr,
struct_descr TYPE REF TO cl_abap_structdescr.
FIELD-SYMBOLS: <lt_table> TYPE STANDARD TABLE,
<ls_component> TYPE abap_componentdescr,
<lg_line> TYPE data,
<lg_data> TYPE any.
go_table_descr ?= cl_abap_tabledescr=>describe_by_data( it_list ).
lo_struct_descr ?= go_table_descr->get_table_line_type( ).
lt_components = lo_struct_descr->get_components( ).
INSERT INITIAL LINE INTO lt_components ASSIGNING <ls_component> INDEX 1.
ASSERT sy-subrc = 0.
<ls_component>-name = c_fieldname_selected.
<ls_component>-type ?= cl_abap_datadescr=>describe_by_name( 'FLAG' ).
struct_descr = cl_abap_structdescr=>create( lt_components ).
go_table_descr = cl_abap_tabledescr=>create( struct_descr ).
CREATE DATA gr_table TYPE HANDLE go_table_descr.
ASSIGN gr_table->* TO <lt_table>.
ASSERT sy-subrc = 0.
CREATE DATA lr_struct TYPE HANDLE struct_descr.
ASSIGN lr_struct->* TO <lg_line>.
ASSERT sy-subrc = 0.
LOOP AT it_list ASSIGNING <lg_data>.
CLEAR <lg_line>.
MOVE-CORRESPONDING <lg_data> TO <lg_line>.
INSERT <lg_line> INTO TABLE <lt_table>.
ENDLOOP.
ENDMETHOD.
METHOD extract_field_values.
FIELD-SYMBOLS: <ls_field> LIKE LINE OF it_fields.
CLEAR: ev_url,
ev_package,
ev_branch.
READ TABLE it_fields INDEX 1 ASSIGNING <ls_field>.
ASSERT sy-subrc = 0.
ev_url = <ls_field>-value.
READ TABLE it_fields INDEX 2 ASSIGNING <ls_field>.
ASSERT sy-subrc = 0.
ev_package = <ls_field>-value.
TRANSLATE ev_package TO UPPER CASE.
READ TABLE it_fields INDEX 3 ASSIGNING <ls_field>.
ASSERT sy-subrc = 0.
ev_branch = <ls_field>-value.
ENDMETHOD.
METHOD get_selected_rows.
DATA: lv_condition TYPE string,
lr_exporting TYPE REF TO data.
FIELD-SYMBOLS: <lg_exporting> TYPE any,
<lt_table> TYPE STANDARD TABLE,
<lg_line> TYPE any.
lv_condition = |{ c_fieldname_selected } = ABAP_TRUE|.
ASSIGN gr_table->* TO <lt_table>.
ASSERT sy-subrc = 0.
CREATE DATA lr_exporting LIKE LINE OF et_list.
ASSIGN lr_exporting->* TO <lg_exporting>.
LOOP AT <lt_table> ASSIGNING <lg_line> WHERE (lv_condition).
CLEAR <lg_exporting>.
MOVE-CORRESPONDING <lg_line> TO <lg_exporting>.
APPEND <lg_exporting> TO et_list.
ENDLOOP.
ENDMETHOD.
METHOD on_select_list_function_click.
FIELD-SYMBOLS: <lt_table> TYPE STANDARD TABLE,
<lg_line> TYPE any,
<lv_selected> TYPE flag.
ASSIGN gr_table->* TO <lt_table>.
ASSERT sy-subrc = 0.
CASE e_salv_function.
WHEN 'O.K.'.
gv_cancel = abap_false.
go_select_list_popup->close_screen( ).
WHEN 'ABR'.
"Canceled: clear list to overwrite nothing
CLEAR <lt_table>.
gv_cancel = abap_true.
go_select_list_popup->close_screen( ).
WHEN 'SALL'.
LOOP AT <lt_table> ASSIGNING <lg_line>.
ASSIGN COMPONENT c_fieldname_selected
OF STRUCTURE <lg_line>
TO <lv_selected>.
ASSERT sy-subrc = 0.
<lv_selected> = abap_true.
ENDLOOP.
go_select_list_popup->refresh( ).
WHEN 'DSEL'.
LOOP AT <lt_table> ASSIGNING <lg_line>.
ASSIGN COMPONENT c_fieldname_selected
OF STRUCTURE <lg_line>
TO <lv_selected>.
ASSERT sy-subrc = 0.
<lv_selected> = abap_false.
ENDLOOP.
go_select_list_popup->refresh( ).
WHEN OTHERS.
CLEAR <lt_table>.
go_select_list_popup->close_screen( ).
ENDCASE.
ENDMETHOD.
METHOD on_select_list_link_click.
DATA: lv_line TYPE sytabix.
FIELD-SYMBOLS: <lt_table> TYPE STANDARD TABLE,
<lg_line> TYPE any,
<lv_selected> TYPE flag.
ASSIGN gr_table->* TO <lt_table>.
ASSERT sy-subrc = 0.
lv_line = row.
READ TABLE <lt_table> ASSIGNING <lg_line>
INDEX lv_line.
IF sy-subrc = 0.
ASSIGN COMPONENT c_fieldname_selected
OF STRUCTURE <lg_line>
TO <lv_selected>.
ASSERT sy-subrc = 0.
IF <lv_selected> = abap_true.
<lv_selected> = abap_false.
ELSE.
<lv_selected> = abap_true.
ENDIF.
ENDIF.
go_select_list_popup->refresh( ).
ENDMETHOD.
METHOD yif_abapgit_popups~package_popup_callback.
DATA: ls_package_data TYPE scompkdtln,
lv_create TYPE boolean.
FIELD-SYMBOLS: <ls_fpackage> LIKE LINE OF ct_fields.
CLEAR cs_error.
IF iv_code = 'COD1'.
cv_show_popup = abap_true.
READ TABLE ct_fields ASSIGNING <ls_fpackage> WITH KEY fieldname = 'DEVCLASS'.
ASSERT sy-subrc = 0.
ls_package_data-devclass = <ls_fpackage>-value.
popup_to_create_package( IMPORTING es_package_data = ls_package_data
ev_create = lv_create ).
IF lv_create = abap_false.
RETURN.
ENDIF.
ycl_abapgit_factory=>get_sap_package( ls_package_data-devclass )->create( ls_package_data ).
COMMIT WORK.
<ls_fpackage>-value = ls_package_data-devclass.
ENDIF.
ENDMETHOD.
METHOD yif_abapgit_popups~popup_folder_logic.
DATA: lv_returncode TYPE c,
lt_fields TYPE TABLE OF sval.
FIELD-SYMBOLS: <ls_field> LIKE LINE OF lt_fields.
add_field( EXPORTING iv_tabname = 'TDEVC'
iv_fieldname = 'INTSYS'
iv_fieldtext = 'Folder logic'
iv_value = 'PREFIX'
CHANGING ct_fields = lt_fields ).
CALL FUNCTION 'POPUP_GET_VALUES'
EXPORTING
no_value_check = abap_true
popup_title = 'Export package' "#EC NOTEXT
IMPORTING
returncode = lv_returncode
TABLES
fields = lt_fields
EXCEPTIONS
error_in_fields = 1
OTHERS = 2.
IF sy-subrc <> 0.
ycx_abapgit_exception=>raise( 'Error from POPUP_GET_VALUES' ).
ENDIF.
IF lv_returncode = 'A'.
RETURN.
ENDIF.
READ TABLE lt_fields INDEX 1 ASSIGNING <ls_field>.
ASSERT sy-subrc = 0.
TRANSLATE <ls_field>-value TO UPPER CASE.
rv_folder_logic = <ls_field>-value.
ENDMETHOD. "popup_package_export
METHOD yif_abapgit_popups~popup_object.
DATA: lv_returncode TYPE c,
lt_fields TYPE TABLE OF sval.
FIELD-SYMBOLS: <ls_field> LIKE LINE OF lt_fields.
add_field( EXPORTING iv_tabname = 'TADIR'
iv_fieldname = 'OBJECT'
iv_fieldtext = 'Type'
CHANGING ct_fields = lt_fields ).
add_field( EXPORTING iv_tabname = 'TADIR'
iv_fieldname = 'OBJ_NAME'
iv_fieldtext = 'Name'
CHANGING ct_fields = lt_fields ).
CALL FUNCTION 'POPUP_GET_VALUES'
EXPORTING
no_value_check = abap_true
popup_title = 'Object' "#EC NOTEXT
IMPORTING
returncode = lv_returncode
TABLES
fields = lt_fields
EXCEPTIONS
error_in_fields = 1
OTHERS = 2.
IF sy-subrc <> 0.
ycx_abapgit_exception=>raise( 'Error from POPUP_GET_VALUES' ).
ENDIF.
IF lv_returncode = 'A'.
RETURN.
ENDIF.
READ TABLE lt_fields INDEX 1 ASSIGNING <ls_field>.
ASSERT sy-subrc = 0.
TRANSLATE <ls_field>-value TO UPPER CASE.
rs_tadir-object = <ls_field>-value.
READ TABLE lt_fields INDEX 2 ASSIGNING <ls_field>.
ASSERT sy-subrc = 0.
TRANSLATE <ls_field>-value TO UPPER CASE.
rs_tadir-obj_name = <ls_field>-value.
rs_tadir = ycl_abapgit_factory=>get_tadir( )->read_single(
iv_object = rs_tadir-object
iv_obj_name = rs_tadir-obj_name ).
ENDMETHOD.
METHOD yif_abapgit_popups~popup_package_export.
DATA: lv_returncode TYPE c,
lt_fields TYPE TABLE OF sval.
FIELD-SYMBOLS: <ls_field> LIKE LINE OF lt_fields.
add_field( EXPORTING iv_tabname = 'TDEVC'
iv_fieldname = 'DEVCLASS'
iv_fieldtext = 'Package'
CHANGING ct_fields = lt_fields ).
add_field( EXPORTING iv_tabname = 'TDEVC'
iv_fieldname = 'INTSYS'
iv_fieldtext = 'Folder logic'
iv_value = 'PREFIX'
CHANGING ct_fields = lt_fields ).
CALL FUNCTION 'POPUP_GET_VALUES'
EXPORTING
no_value_check = abap_true
popup_title = 'Export package' "#EC NOTEXT
IMPORTING
returncode = lv_returncode
TABLES
fields = lt_fields
EXCEPTIONS
error_in_fields = 1
OTHERS = 2.
IF sy-subrc <> 0.
ycx_abapgit_exception=>raise( 'Error from POPUP_GET_VALUES' ).
ENDIF.
IF lv_returncode = 'A'.
RETURN.
ENDIF.
READ TABLE lt_fields INDEX 1 ASSIGNING <ls_field>.
ASSERT sy-subrc = 0.
TRANSLATE <ls_field>-value TO UPPER CASE.
ev_package = <ls_field>-value.
READ TABLE lt_fields INDEX 2 ASSIGNING <ls_field>.
ASSERT sy-subrc = 0.
TRANSLATE <ls_field>-value TO UPPER CASE.
ev_folder_logic = <ls_field>-value.
ENDMETHOD. "popup_package_export
METHOD yif_abapgit_popups~popup_to_confirm.
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
titlebar = iv_titlebar
text_question = iv_text_question
text_button_1 = iv_text_button_1
icon_button_1 = iv_icon_button_1
text_button_2 = iv_text_button_2
icon_button_2 = iv_icon_button_2
default_button = iv_default_button
display_cancel_button = iv_display_cancel_button
IMPORTING
answer = rv_answer
EXCEPTIONS
text_not_found = 1
OTHERS = 2. "#EC NOTEXT
IF sy-subrc <> 0.
ycx_abapgit_exception=>raise( 'error from POPUP_TO_CONFIRM' ).
ENDIF.
ENDMETHOD. "popup_to_confirm
METHOD yif_abapgit_popups~popup_to_create_package.
CALL FUNCTION 'FUNCTION_EXISTS'
EXPORTING
funcname = 'PB_POPUP_PACKAGE_CREATE'
EXCEPTIONS
function_not_exist = 1
OTHERS = 2.
IF sy-subrc = 1.
* looks like the function module used does not exist on all
* versions since 702, so show an error
ycx_abapgit_exception=>raise( 'Your system does not support automatic creation of packages.' &&
'Please, create the package manually.' ).
ENDIF.
CALL FUNCTION 'PB_POPUP_PACKAGE_CREATE'
CHANGING
p_object_data = es_package_data
EXCEPTIONS
action_cancelled = 1.
IF sy-subrc = 0.
ev_create = abap_true.
ELSE.
ev_create = abap_false.
ENDIF.
ENDMETHOD. " popup_to_create_package
METHOD yif_abapgit_popups~popup_to_create_transp_branch.
DATA: lv_returncode TYPE c,
lt_fields TYPE TABLE OF sval,
lv_transports_as_text TYPE string,
ls_transport_header LIKE LINE OF it_transport_headers.
FIELD-SYMBOLS: <ls_field> LIKE LINE OF lt_fields.
lv_transports_as_text = 'Transport(s)'.
LOOP AT it_transport_headers INTO ls_transport_header.
CONCATENATE lv_transports_as_text '_' ls_transport_header-trkorr INTO lv_transports_as_text.
ENDLOOP.
add_field( EXPORTING iv_tabname = 'TEXTL'
iv_fieldname = 'LINE'
iv_fieldtext = 'Branch name'
iv_value = lv_transports_as_text
CHANGING ct_fields = lt_fields ).
add_field( EXPORTING iv_tabname = 'ABAPTXT255'
iv_fieldname = 'LINE'
iv_fieldtext = 'Commit text'
iv_value = lv_transports_as_text
CHANGING ct_fields = lt_fields ).
CALL FUNCTION 'POPUP_GET_VALUES'
EXPORTING
popup_title = 'Transport to new Branch'
IMPORTING
returncode = lv_returncode
TABLES
fields = lt_fields
EXCEPTIONS
error_in_fields = 1
OTHERS = 2.
IF sy-subrc <> 0.
ycx_abapgit_exception=>raise( 'Error from POPUP_GET_VALUES' ).
ENDIF.
IF lv_returncode = 'A'.
RAISE EXCEPTION TYPE ycx_abapgit_cancel.
ENDIF.
READ TABLE lt_fields INDEX 1 ASSIGNING <ls_field>.
ASSERT sy-subrc = 0.
rs_transport_branch-branch_name = <ls_field>-value.
READ TABLE lt_fields INDEX 2 ASSIGNING <ls_field>.
ASSERT sy-subrc = 0.
rs_transport_branch-commit_text = <ls_field>-value.
ENDMETHOD.
METHOD yif_abapgit_popups~popup_to_inform.
DATA: lv_line1 TYPE char70,
lv_line2 TYPE char70.
lv_line1 = iv_text_message.
IF strlen( iv_text_message ) > 70.
lv_line2 = iv_text_message+70.
ENDIF.
CALL FUNCTION 'POPUP_TO_INFORM'
EXPORTING
titel = iv_titlebar
txt1 = lv_line1
txt2 = lv_line2.
ENDMETHOD. " popup_to_inform.
METHOD yif_abapgit_popups~popup_to_select_from_list.
DATA:
lo_events TYPE REF TO cl_salv_events_table,
lo_columns TYPE REF TO cl_salv_columns_table,
lt_columns TYPE salv_t_column_ref,
ls_column TYPE salv_s_column_ref,
lo_column TYPE REF TO cl_salv_column_list,
lo_table_header TYPE REF TO cl_salv_form_text.
FIELD-SYMBOLS: <lt_table> TYPE STANDARD TABLE.
CLEAR: et_list.
create_new_table( it_list ).
ASSIGN gr_table->* TO <lt_table>.
ASSERT sy-subrc = 0.
TRY.
cl_salv_table=>factory( IMPORTING r_salv_table = go_select_list_popup
CHANGING t_table = <lt_table> ).
go_select_list_popup->set_screen_status( pfstatus = '102'
report = 'SAPMSVIM' ).
go_select_list_popup->set_screen_popup( start_column = 1
end_column = 65
start_line = 1
end_line = 20 ).
lo_events = go_select_list_popup->get_event( ).
SET HANDLER on_select_list_link_click FOR lo_events.
SET HANDLER on_select_list_function_click FOR lo_events.
CREATE OBJECT lo_table_header
EXPORTING
text = iv_header_text.
go_select_list_popup->set_top_of_list( lo_table_header ).
lo_columns = go_select_list_popup->get_columns( ).
lo_columns->set_optimize( abap_true ).
lt_columns = lo_columns->get( ).
LOOP AT lt_columns INTO ls_column.
IF ls_column-columnname = c_fieldname_selected.
lo_column ?= ls_column-r_column.
lo_column->set_cell_type( if_salv_c_cell_type=>checkbox_hotspot ).
lo_column->set_output_length( 20 ).
lo_column->set_short_text( |{ iv_select_column_text }| ).
lo_column->set_medium_text( |{ iv_select_column_text }| ).
lo_column->set_long_text( |{ iv_select_column_text }| ).
CONTINUE.
ENDIF.
READ TABLE it_columns_to_display TRANSPORTING NO FIELDS
WITH KEY table_line = ls_column-columnname.
IF sy-subrc <> 0.
ls_column-r_column->set_technical( abap_true ).
ENDIF.
ENDLOOP.
go_select_list_popup->display( ).
CATCH cx_salv_msg.
ycx_abapgit_exception=>raise( 'Error from POPUP_TO_SELECT_FROM_LIST' ).
ENDTRY.
IF gv_cancel = abap_true.
RAISE EXCEPTION TYPE ycx_abapgit_cancel.
ENDIF.
get_selected_rows(
IMPORTING
et_list = et_list ).
CLEAR: go_select_list_popup,
gr_table,
go_table_descr.
ENDMETHOD.
METHOD yif_abapgit_popups~popup_to_select_transports.
* todo, method to be renamed, it only returns one transport
DATA: lv_trkorr TYPE e070-trkorr,
ls_trkorr LIKE LINE OF rt_trkorr.
CALL FUNCTION 'TR_F4_REQUESTS'
IMPORTING
ev_selected_request = lv_trkorr.
IF NOT lv_trkorr IS INITIAL.
ls_trkorr-trkorr = lv_trkorr.
APPEND ls_trkorr TO rt_trkorr.
ENDIF.
ENDMETHOD.
METHOD yif_abapgit_popups~popup_transport_request.
DATA: lt_e071 TYPE STANDARD TABLE OF e071,
lt_e071k TYPE STANDARD TABLE OF e071k.
CALL FUNCTION 'TRINT_ORDER_CHOICE'
EXPORTING
wi_order_type = is_transport_type-request
wi_task_type = is_transport_type-task
IMPORTING
we_order = rv_transport
TABLES
wt_e071 = lt_e071
wt_e071k = lt_e071k
EXCEPTIONS
no_correction_selected = 1
display_mode = 2
object_append_error = 3
recursive_call = 4
wrong_order_type = 5
OTHERS = 6.
IF sy-subrc = 1.
RAISE EXCEPTION TYPE ycx_abapgit_cancel.
ELSEIF sy-subrc > 1.
ycx_abapgit_exception=>raise( |Error from TRINT_ORDER_CHOICE { sy-subrc }| ).
ENDIF.
ENDMETHOD.
METHOD yif_abapgit_popups~repo_new_offline.
DATA: lv_returncode TYPE c,
lt_fields TYPE TABLE OF sval,
lv_icon_ok TYPE icon-name,
lv_button1 TYPE svalbutton-buttontext,
lv_icon1 TYPE icon-name,
lv_finished TYPE abap_bool,
lx_error TYPE REF TO ycx_abapgit_exception.
FIELD-SYMBOLS: <ls_field> LIKE LINE OF lt_fields.
add_field( EXPORTING iv_tabname = 'ABAPTXT255'
iv_fieldname = 'LINE'
iv_fieldtext = 'Name'
iv_obligatory = abap_true
CHANGING ct_fields = lt_fields ).
add_field( EXPORTING iv_tabname = 'TDEVC'
iv_fieldname = 'DEVCLASS'
iv_fieldtext = 'Package'
iv_obligatory = abap_true
CHANGING ct_fields = lt_fields ).
WHILE lv_finished = abap_false.
lv_icon_ok = icon_okay.
lv_button1 = 'Create package' ##NO_TEXT.
lv_icon1 = icon_folder.
CALL FUNCTION 'POPUP_GET_VALUES_USER_BUTTONS'
EXPORTING
popup_title = 'New Offline Project'
programname = sy-cprog
formname = 'PACKAGE_POPUP'
ok_pushbuttontext = ''
icon_ok_push = lv_icon_ok
first_pushbutton = lv_button1
icon_button_1 = lv_icon1
second_pushbutton = ''
icon_button_2 = ''
IMPORTING
returncode = lv_returncode
TABLES
fields = lt_fields
EXCEPTIONS
error_in_fields = 1
OTHERS = 2.
IF sy-subrc <> 0.
ycx_abapgit_exception=>raise( 'Error from POPUP_GET_VALUES' ).
ENDIF.
IF lv_returncode = 'A'.
rs_popup-cancel = abap_true.
RETURN.
ENDIF.
READ TABLE lt_fields INDEX 1 ASSIGNING <ls_field>.
ASSERT sy-subrc = 0.
rs_popup-url = <ls_field>-value.
READ TABLE lt_fields INDEX 2 ASSIGNING <ls_field>.
ASSERT sy-subrc = 0.
TRANSLATE <ls_field>-value TO UPPER CASE.
rs_popup-package = <ls_field>-value.
lv_finished = abap_true.
TRY.
ycl_abapgit_repo_srv=>get_instance( )->validate_package( rs_popup-package ).
CATCH ycx_abapgit_exception INTO lx_error.
" in case of validation errors we display the popup again
MESSAGE lx_error TYPE 'S' DISPLAY LIKE 'E'.
CLEAR lv_finished.
ENDTRY.
ENDWHILE.
ENDMETHOD. "repo_new_offline
METHOD yif_abapgit_popups~repo_popup.
DATA: lv_returncode TYPE c,
lv_icon_ok TYPE icon-name,
lv_icon_br TYPE icon-name,
lt_fields TYPE TABLE OF sval,
lv_uattr TYPE spo_fattr,
lv_pattr TYPE spo_fattr,
lv_button2 TYPE svalbutton-buttontext,
lv_icon2 TYPE icon-name,
lv_package TYPE tdevc-devclass,
lv_url TYPE abaptxt255-line,
lv_branch TYPE textl-line,
lv_finished TYPE abap_bool,
lx_error TYPE REF TO ycx_abapgit_exception.
IF iv_freeze_url = abap_true.
lv_uattr = '05'.
ENDIF.
IF iv_freeze_package = abap_true.
lv_pattr = '05'.
ENDIF.
IF iv_package IS INITIAL. " Empty package -> can be created
lv_button2 = 'Create package' ##NO_TEXT.
lv_icon2 = icon_folder.
ENDIF.
lv_package = iv_package.
lv_url = iv_url.
lv_branch = iv_branch.
WHILE lv_finished = abap_false.
CLEAR: lt_fields.
add_field( EXPORTING iv_tabname = 'ABAPTXT255'
iv_fieldname = 'LINE'
iv_fieldtext = 'Git clone URL'
iv_value = lv_url
iv_field_attr = lv_uattr
CHANGING ct_fields = lt_fields ).
add_field( EXPORTING iv_tabname = 'TDEVC'
iv_fieldname = 'DEVCLASS'
iv_fieldtext = 'Package'
iv_value = lv_package
iv_field_attr = lv_pattr
CHANGING ct_fields = lt_fields ).
add_field( EXPORTING iv_tabname = 'TEXTL'
iv_fieldname = 'LINE'
iv_fieldtext = 'Branch'
iv_value = lv_branch
iv_field_attr = '05'
CHANGING ct_fields = lt_fields ).
lv_icon_ok = icon_okay.
lv_icon_br = icon_workflow_fork.
CALL FUNCTION 'POPUP_GET_VALUES_USER_BUTTONS'
EXPORTING
popup_title = iv_title
programname = sy-cprog
formname = 'BRANCH_POPUP'
ok_pushbuttontext = 'OK'
icon_ok_push = lv_icon_ok
first_pushbutton = 'Select branch'
icon_button_1 = lv_icon_br
second_pushbutton = lv_button2
icon_button_2 = lv_icon2
IMPORTING
returncode = lv_returncode
TABLES
fields = lt_fields
EXCEPTIONS
error_in_fields = 1
OTHERS = 2. "#EC NOTEXT
IF sy-subrc <> 0.
ycx_abapgit_exception=>raise( 'Error from POPUP_GET_VALUES' ).
ENDIF.
IF lv_returncode = 'A'.
rs_popup-cancel = abap_true.
RETURN.
ENDIF.
extract_field_values(
EXPORTING
it_fields = lt_fields
IMPORTING
ev_url = lv_url
ev_package = lv_package
ev_branch = lv_branch ).
lv_finished = abap_true.
TRY.
ycl_abapgit_url=>validate( |{ lv_url }| ).
IF iv_freeze_package = abap_false.
ycl_abapgit_repo_srv=>get_instance( )->validate_package( lv_package ).
ENDIF.
CATCH ycx_abapgit_exception INTO lx_error.
MESSAGE lx_error TYPE 'S' DISPLAY LIKE 'E'.
" in case of validation errors we display the popup again
CLEAR lv_finished.
ENDTRY.
ENDWHILE.
rs_popup-url = lv_url.
rs_popup-package = lv_package.
rs_popup-branch_name = lv_branch.
ENDMETHOD.
METHOD yif_abapgit_popups~run_page_class_popup.
DATA: lv_answer TYPE c LENGTH 1,
lt_fields TYPE TABLE OF sval.
FIELD-SYMBOLS: <ls_field> LIKE LINE OF lt_fields.
CLEAR: ev_name, ev_cancel.
add_field( EXPORTING iv_tabname = 'TEXTL'
iv_fieldname = 'LINE'
iv_fieldtext = 'Name'
iv_value = 'lcl_gui_page_'
CHANGING ct_fields = lt_fields ).
CALL FUNCTION 'POPUP_GET_VALUES'
EXPORTING
popup_title = 'Run page manually'
IMPORTING
returncode = lv_answer
TABLES
fields = lt_fields
EXCEPTIONS
error_in_fields = 1
OTHERS = 2 ##NO_TEXT.
IF sy-subrc <> 0.
ycx_abapgit_exception=>raise( 'error from POPUP_GET_VALUES' ).
ENDIF.
IF lv_answer = 'A'.
ev_cancel = abap_true.
ELSE.
READ TABLE lt_fields INDEX 1 ASSIGNING <ls_field>.
ASSERT sy-subrc = 0.
ev_name = to_upper( <ls_field>-value ).
ENDIF.
ENDMETHOD. "run_page_class_popup
ENDCLASS.
| [
31631,
331,
565,
62,
397,
499,
18300,
62,
12924,
4739,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
25261,
198,
220,
29244,
6158,
4810,
3824,
6158,
198,
220,
10188,
9864,
1847,
48167,
1677,
5258,
331,
565,
62,
397,
499,
18300,
62,
9019,
62,
69,
9548,
13,
628,
220,
44731,
44513,
13,
628,
220,
220,
220,
23255,
37,
2246,
1546,
25,
331,
361,
62,
397,
499,
18300,
62,
12924,
4739,
13,
198,
220,
220,
220,
8355,
43429,
1546,
25,
198,
220,
220,
220,
220,
220,
46207,
62,
26495,
62,
39344,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7473,
331,
361,
62,
397,
499,
18300,
62,
12924,
4739,
93,
12924,
929,
62,
26495,
62,
39344,
11,
198,
220,
220,
220,
220,
220,
46207,
62,
43551,
62,
6404,
291,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7473,
331,
361,
62,
397,
499,
18300,
62,
12924,
4739,
93,
12924,
929,
62,
43551,
62,
6404,
291,
11,
198,
220,
220,
220,
220,
220,
46207,
62,
15252,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7473,
331,
361,
62,
397,
499,
18300,
62,
12924,
4739,
93,
12924,
929,
62,
15252,
11,
198,
220,
220,
220,
220,
220,
2251,
62,
1671,
3702,
62,
12924,
929,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7473,
331,
361,
62,
397,
499,
18300,
62,
12924,
4739,
93,
17953,
62,
1671,
3702,
62,
12924,
929,
11,
198,
220,
220,
220,
220,
220,
1057,
62,
7700,
62,
4871,
62,
12924,
929,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7473,
331,
361,
62,
397,
499,
18300,
62,
12924,
4739,
93,
5143,
62,
7700,
62,
4871,
62,
12924,
929,
11,
198,
220,
220,
220,
220,
220,
29924,
62,
3605,
62,
2364,
1370,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7473,
331,
361,
62,
397,
499,
18300,
62,
12924,
4739,
93,
260,
7501,
62,
3605,
62,
2364,
1370,
11,
198,
220,
220,
220,
220,
220,
8478,
62,
4868,
62,
12924,
929,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7473,
331,
361,
62,
397,
499,
18300,
62,
12924,
4739,
93,
1671,
3702,
62,
4868,
62,
12924,
929,
11,
198,
220,
220,
220,
220,
220,
29924,
62,
12924,
929,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7473,
331,
361,
62,
397,
499,
18300,
62,
12924,
4739,
93,
260,
7501,
62,
12924,
929,
11,
198,
220,
220,
220,
220,
220,
46207,
62,
1462,
62,
10414,
2533,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7473,
331,
361,
62,
397,
499,
18300,
62,
12924,
4739,
93,
12924,
929,
62,
1462,
62,
10414,
2533,
11,
198,
220,
220,
220,
220,
220,
46207,
62,
1462,
62,
259,
687,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7473,
331,
361,
62,
397,
499,
18300,
62,
12924,
4739,
93,
12924,
929,
62,
1462,
62,
259,
687,
11,
198,
220,
220,
220,
220,
220,
46207,
62,
1462,
62,
17953,
62,
26495,
220,
220,
220,
220,
220,
220,
7473,
331,
361,
62,
397,
499,
18300,
62,
12924,
4739,
93,
12924,
929,
62,
1462,
62,
17953,
62,
26495,
11,
198,
220,
220,
220,
220,
220,
46207,
62,
1462,
62,
17953,
62,
7645,
79,
62,
1671,
3702,
7473,
331,
361,
62,
397,
499,
18300,
62,
12924,
4739,
93,
12924,
929,
62,
1462,
62,
17953,
62,
7645,
79,
62,
1671,
3702,
11,
198,
220,
220,
220,
220,
220,
46207,
62,
1462,
62,
19738,
62,
7645,
3742,
220,
220,
220,
7473,
331,
361,
62,
397,
499,
18300,
62,
12924,
4739,
93,
12924,
929,
62,
1462,
62,
19738,
62,
7645,
3742,
11,
198,
220,
220,
220,
220,
220,
46207,
62,
1462,
62,
19738,
62,
6738,
62,
4868,
220,
220,
220,
220,
7473,
331,
361,
62,
397,
499,
18300,
62,
12924,
4739,
93,
12924,
929,
62,
1462,
62,
19738,
62,
6738,
62,
4868,
11,
198,
220,
220,
220,
220,
220,
8478,
62,
12924,
929,
62,
47423,
220,
220,
220,
220,
220,
220,
220,
220,
7473,
331,
361,
62,
397,
499,
18300,
62,
12924,
4739,
93,
1671,
3702,
62,
12924,
929,
62,
47423,
11,
198,
220,
220,
220,
220,
220,
5301,
62,
12924,
929,
62,
47423,
220,
220,
220,
220,
220,
220,
220,
7473,
331,
361,
62,
397,
499,
18300,
62,
12924,
4739,
93,
26495,
62,
12924,
929,
62,
47423,
11,
198,
220,
220,
220,
220,
220,
46207,
62,
7645,
634,
62,
25927,
220,
220,
220,
220,
220,
220,
7473,
331,
361,
62,
397,
499,
18300,
62,
12924,
4739,
93,
12924,
929,
62,
7645,
634,
62,
25927,
13,
628,
220,
4810,
3824,
6158,
44513,
13,
628,
220,
220,
220,
24412,
47,
1546,
25,
198,
220,
220,
220,
220,
220,
1259,
62,
82,
2100,
62,
926,
41876,
49053,
9795,
43679,
3963,
264,
2100,
13315,
5550,
38865,
35374,
13,
628,
220,
220,
220,
7102,
2257,
1565,
4694,
269,
62,
3245,
3672,
62,
34213,
41876,
300,
28435,
62,
69,
3672,
26173,
8924,
4600,
46506,
1961,
63,
22492,
15285,
62,
32541,
13,
628,
220,
220,
220,
42865,
467,
62,
19738,
62,
4868,
62,
12924,
929,
41876,
4526,
37,
5390,
537,
62,
21680,
85,
62,
11487,
764,
198,
220,
220,
220,
42865,
1036,
62,
11487,
41876,
4526,
37,
5390,
1366,
764,
198,
220,
220,
220,
42865,
308,
85,
62,
66,
21130,
41876,
450,
499,
62,
30388,
764,
198,
220,
220,
220,
42865,
467,
62,
11487,
62,
20147,
81,
41876,
4526,
37,
5390,
537,
62,
397,
499,
62,
83,
4510,
3798,
81,
764,
628,
220,
220,
220,
337,
36252,
50,
751,
62,
3245,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
8658,
3672,
220,
220,
220,
41876,
264,
2100,
12,
8658,
3672,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
3245,
3672,
220,
41876,
264,
2100,
12,
3245,
3672,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
3245,
5239,
220,
41876,
264,
2100,
12,
3245,
5239,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
8367,
220,
220,
220
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
20190925 C_MLICHTINGER
DSAG-Beispiel: für U-Test Pretty Printer Prüfklasse - ok
ZCL_CI_TEST_DSAG_PRETTY_PRINT 201 000
FF060201010280003431303300000000020E0000000008000000740E00000000
000000000000000000000000000000004D0053005F00500050005F0053004500
5400540049004E0047005300AB0E0000000008AA000000000002AA0000000000
02AA000000000002AA000000000002AC0E0000000008BC000000082000200058
002000BD01000000000002000000440E00000000000000000000000000000000
000000004D0056005F004F004E0045005F00460049004E00440049004E004700
BC000000025800BD04
| [
13130,
2931,
1495,
327,
62,
5805,
2149,
6535,
2751,
1137,
198,
35,
4090,
38,
12,
3856,
8802,
8207,
25,
277,
25151,
471,
12,
14402,
20090,
1736,
3849,
1736,
9116,
69,
41582,
21612,
532,
12876,
198,
57,
5097,
62,
25690,
62,
51,
6465,
62,
35,
4090,
38,
62,
47,
26087,
9936,
62,
4805,
12394,
580,
12877,
198,
5777,
41322,
1264,
20943,
2078,
830,
2682,
3132,
1270,
2091,
10535,
830,
1238,
36,
10535,
830,
23,
10535,
45598,
36,
8269,
198,
25645,
25645,
19,
35,
405,
4310,
22544,
37,
22544,
830,
27641,
20,
37,
405,
4310,
405,
2231,
405,
198,
4051,
405,
4051,
405,
2920,
22914,
36,
405,
2857,
405,
4310,
405,
6242,
15,
36,
10535,
830,
23,
3838,
8269,
34215,
3838,
8269,
405,
198,
2999,
3838,
8269,
34215,
3838,
8269,
34215,
2246,
15,
36,
10535,
830,
23,
2749,
24598,
6469,
830,
11024,
3365,
198,
405,
11024,
14529,
486,
8269,
830,
2167,
2388,
25644,
36,
25645,
25645,
198,
8269,
19,
35,
405,
3980,
22544,
37,
22914,
37,
22914,
36,
405,
2231,
22544,
37,
405,
3510,
405,
2920,
22914,
36,
405,
2598,
405,
2920,
22914,
36,
405,
2857,
405,
198,
2749,
24598,
1495,
7410,
14529,
3023,
198
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
class ZCL_JSON_UTIL definition
public
inheriting from ZCL_OBJECT
final
create public .
public section.
type-pools ABAP .
*"* public components of class zCL_JSON_UTIL
*"* do not include other source files here!!!
class-methods NEW_OBJECT_WITH_ARRAY_PAIR
importing
!NAME type STRING
!VALUE type ref to ZCL_JSON_ARRAY
returning
value(RETURNING) type ref to ZCL_JSON_OBJECT .
class-methods NEW_OBJECT_WITH_BOOL_PAIR
importing
!NAME type STRING
!VALUE type ABAP_BOOL
returning
value(RETURNING) type ref to ZCL_JSON_OBJECT .
class-methods NEW_OBJECT_WITH_NULL_PAIR
importing
!NAME type STRING
returning
value(RETURNING) type ref to ZCL_JSON_OBJECT .
class-methods NEW_OBJECT_WITH_NUMBER_PAIR
importing
!NAME type STRING
!VALUE type F
returning
value(RETURNING) type ref to ZCL_JSON_OBJECT .
class-methods NEW_OBJECT_WITH_OBJECT_PAIR
importing
!NAME type STRING
!VALUE type ref to ZCL_JSON_OBJECT
returning
value(RETURNING) type ref to ZCL_JSON_OBJECT .
class-methods NEW_OBJECT_WITH_STRING_PAIR
importing
!NAME type STRING
!VALUE type STRING
returning
value(RETURNING) type ref to ZCL_JSON_OBJECT .
class-methods NEW_PAIR_WITH_ARRAY
importing
!NAME type STRING
!VALUE type ref to ZCL_JSON_ARRAY
returning
value(RETURNING) type ref to ZCL_JSON_PAIR .
class-methods NEW_PAIR_WITH_BOOL
importing
!NAME type STRING
!VALUE type ABAP_BOOL
returning
value(RETURNING) type ref to ZCL_JSON_PAIR .
class-methods NEW_PAIR_WITH_NULL
importing
!NAME type STRING
returning
value(RETURNING) type ref to ZCL_JSON_PAIR .
class-methods NEW_PAIR_WITH_NUMBER
importing
!NAME type STRING
!VALUE type F
returning
value(RETURNING) type ref to ZCL_JSON_PAIR .
class-methods NEW_PAIR_WITH_OBJECT
importing
!NAME type STRING
!VALUE type ref to ZCL_JSON_OBJECT
returning
value(RETURNING) type ref to ZCL_JSON_PAIR .
class-methods NEW_PAIR_WITH_STRING
importing
!NAME type STRING
!VALUE type STRING
returning
value(RETURNING) type ref to ZCL_JSON_PAIR .
protected section.
*"* protected components of class zCL_JSON_UTIL
*"* do not include other source files here!!!
private section.
*"* private components of class zCL_JSON_UTIL
*"* do not include other source files here!!!
ENDCLASS.
CLASS ZCL_JSON_UTIL IMPLEMENTATION.
* <SIGNATURE>---------------------------------------------------------------------------------------+
* | Static Public Method ZCL_JSON_UTIL=>NEW_OBJECT_WITH_ARRAY_PAIR
* +-------------------------------------------------------------------------------------------------+
* | [--->] NAME TYPE STRING
* | [--->] VALUE TYPE REF TO ZCL_JSON_ARRAY
* | [<-()] RETURNING TYPE REF TO ZCL_JSON_OBJECT
* +--------------------------------------------------------------------------------------</SIGNATURE>
method new_object_with_array_pair.
data json_obj type ref to zcl_json_object.
data json_pair type ref to zcl_json_pair.
create object json_obj.
json_pair = new_pair_with_array( name = name value = value ).
json_obj->add( json_pair ).
returning = json_obj.
endmethod.
* <SIGNATURE>---------------------------------------------------------------------------------------+
* | Static Public Method ZCL_JSON_UTIL=>NEW_OBJECT_WITH_BOOL_PAIR
* +-------------------------------------------------------------------------------------------------+
* | [--->] NAME TYPE STRING
* | [--->] VALUE TYPE ABAP_BOOL
* | [<-()] RETURNING TYPE REF TO ZCL_JSON_OBJECT
* +--------------------------------------------------------------------------------------</SIGNATURE>
method new_object_with_bool_pair.
data json_obj type ref to zcl_json_object.
data json_pair type ref to zcl_json_pair.
create object json_obj.
json_pair = new_pair_with_bool( name = name value = value ).
json_obj->add( json_pair ).
returning = json_obj.
endmethod.
* <SIGNATURE>---------------------------------------------------------------------------------------+
* | Static Public Method ZCL_JSON_UTIL=>NEW_OBJECT_WITH_NULL_PAIR
* +-------------------------------------------------------------------------------------------------+
* | [--->] NAME TYPE STRING
* | [<-()] RETURNING TYPE REF TO ZCL_JSON_OBJECT
* +--------------------------------------------------------------------------------------</SIGNATURE>
method new_object_with_null_pair.
data json_obj type ref to zcl_json_object.
data json_pair type ref to zcl_json_pair.
create object json_obj.
json_pair = new_pair_with_null( name = name ).
json_obj->add( json_pair ).
returning = json_obj.
endmethod.
* <SIGNATURE>---------------------------------------------------------------------------------------+
* | Static Public Method ZCL_JSON_UTIL=>NEW_OBJECT_WITH_NUMBER_PAIR
* +-------------------------------------------------------------------------------------------------+
* | [--->] NAME TYPE STRING
* | [--->] VALUE TYPE F
* | [<-()] RETURNING TYPE REF TO ZCL_JSON_OBJECT
* +--------------------------------------------------------------------------------------</SIGNATURE>
method new_object_with_number_pair.
data json_obj type ref to zcl_json_object.
data json_pair type ref to zcl_json_pair.
create object json_obj.
json_pair = new_pair_with_number( name = name value = value ).
json_obj->add( json_pair ).
returning = json_obj.
endmethod.
* <SIGNATURE>---------------------------------------------------------------------------------------+
* | Static Public Method ZCL_JSON_UTIL=>NEW_OBJECT_WITH_OBJECT_PAIR
* +-------------------------------------------------------------------------------------------------+
* | [--->] NAME TYPE STRING
* | [--->] VALUE TYPE REF TO ZCL_JSON_OBJECT
* | [<-()] RETURNING TYPE REF TO ZCL_JSON_OBJECT
* +--------------------------------------------------------------------------------------</SIGNATURE>
method new_object_with_object_pair.
data json_obj type ref to zcl_json_object.
data json_pair type ref to zcl_json_pair.
create object json_obj.
json_pair = new_pair_with_object( name = name value = value ).
json_obj->add( json_pair ).
returning = json_obj.
endmethod.
* <SIGNATURE>---------------------------------------------------------------------------------------+
* | Static Public Method ZCL_JSON_UTIL=>NEW_OBJECT_WITH_STRING_PAIR
* +-------------------------------------------------------------------------------------------------+
* | [--->] NAME TYPE STRING
* | [--->] VALUE TYPE STRING
* | [<-()] RETURNING TYPE REF TO ZCL_JSON_OBJECT
* +--------------------------------------------------------------------------------------</SIGNATURE>
method new_object_with_string_pair.
data json_obj type ref to zcl_json_object.
data json_pair type ref to zcl_json_pair.
create object json_obj.
json_pair = new_pair_with_string( name = name value = value ).
json_obj->add( json_pair ).
returning = json_obj.
endmethod.
* <SIGNATURE>---------------------------------------------------------------------------------------+
* | Static Public Method ZCL_JSON_UTIL=>NEW_PAIR_WITH_ARRAY
* +-------------------------------------------------------------------------------------------------+
* | [--->] NAME TYPE STRING
* | [--->] VALUE TYPE REF TO ZCL_JSON_ARRAY
* | [<-()] RETURNING TYPE REF TO ZCL_JSON_PAIR
* +--------------------------------------------------------------------------------------</SIGNATURE>
method new_pair_with_array.
data pair type ref to zcl_json_pair.
data pair_name type ref to zcl_json_string.
create object pair_name
exporting
value = name.
create object pair
exporting
name = pair_name
value = value.
returning = pair.
endmethod.
* <SIGNATURE>---------------------------------------------------------------------------------------+
* | Static Public Method ZCL_JSON_UTIL=>NEW_PAIR_WITH_BOOL
* +-------------------------------------------------------------------------------------------------+
* | [--->] NAME TYPE STRING
* | [--->] VALUE TYPE ABAP_BOOL
* | [<-()] RETURNING TYPE REF TO ZCL_JSON_PAIR
* +--------------------------------------------------------------------------------------</SIGNATURE>
method new_pair_with_bool.
data pair type ref to zcl_json_pair.
data pair_name type ref to zcl_json_string.
data pair_value type ref to zcl_json_boolean.
create object pair_name
exporting
value = name.
create object pair_value
exporting
value = value.
create object pair
exporting
name = pair_name
value = pair_value.
returning = pair.
endmethod.
* <SIGNATURE>---------------------------------------------------------------------------------------+
* | Static Public Method ZCL_JSON_UTIL=>NEW_PAIR_WITH_NULL
* +-------------------------------------------------------------------------------------------------+
* | [--->] NAME TYPE STRING
* | [<-()] RETURNING TYPE REF TO ZCL_JSON_PAIR
* +--------------------------------------------------------------------------------------</SIGNATURE>
method new_pair_with_null.
data pair type ref to zcl_json_pair.
data pair_name type ref to zcl_json_string.
data pair_value type ref to zcl_json_null.
create object pair_name
exporting
value = name.
create object pair_value.
create object pair
exporting
name = pair_name
value = pair_value.
returning = pair.
endmethod.
* <SIGNATURE>---------------------------------------------------------------------------------------+
* | Static Public Method ZCL_JSON_UTIL=>NEW_PAIR_WITH_NUMBER
* +-------------------------------------------------------------------------------------------------+
* | [--->] NAME TYPE STRING
* | [--->] VALUE TYPE F
* | [<-()] RETURNING TYPE REF TO ZCL_JSON_PAIR
* +--------------------------------------------------------------------------------------</SIGNATURE>
method new_pair_with_number.
data pair type ref to zcl_json_pair.
data pair_name type ref to zcl_json_string.
data pair_value type ref to zcl_json_number.
create object pair_name
exporting
value = name.
create object pair_value
exporting
value = value.
create object pair
exporting
name = pair_name
value = pair_value.
returning = pair.
endmethod.
* <SIGNATURE>---------------------------------------------------------------------------------------+
* | Static Public Method ZCL_JSON_UTIL=>NEW_PAIR_WITH_OBJECT
* +-------------------------------------------------------------------------------------------------+
* | [--->] NAME TYPE STRING
* | [--->] VALUE TYPE REF TO ZCL_JSON_OBJECT
* | [<-()] RETURNING TYPE REF TO ZCL_JSON_PAIR
* +--------------------------------------------------------------------------------------</SIGNATURE>
method new_pair_with_object.
data pair type ref to zcl_json_pair.
data pair_name type ref to zcl_json_string.
create object pair_name
exporting
value = name.
create object pair
exporting
name = pair_name
value = value.
returning = pair.
endmethod.
* <SIGNATURE>---------------------------------------------------------------------------------------+
* | Static Public Method ZCL_JSON_UTIL=>NEW_PAIR_WITH_STRING
* +-------------------------------------------------------------------------------------------------+
* | [--->] NAME TYPE STRING
* | [--->] VALUE TYPE STRING
* | [<-()] RETURNING TYPE REF TO ZCL_JSON_PAIR
* +--------------------------------------------------------------------------------------</SIGNATURE>
method new_pair_with_string.
data pair type ref to zcl_json_pair.
data pair_name type ref to zcl_json_string.
data pair_value type ref to zcl_json_string.
create object pair_name
exporting
value = name.
create object pair_value
exporting
value = value.
create object pair
exporting
name = pair_name
value = pair_value.
returning = pair.
endmethod.
ENDCLASS.
| [
4871,
1168,
5097,
62,
40386,
62,
3843,
4146,
6770,
201,
198,
220,
1171,
201,
198,
220,
10639,
1780,
422,
1168,
5097,
62,
9864,
23680,
201,
198,
220,
2457,
201,
198,
220,
2251,
1171,
764,
201,
198,
201,
198,
11377,
2665,
13,
201,
198,
220,
2099,
12,
7742,
82,
9564,
2969,
764,
201,
198,
201,
198,
9,
1,
9,
1171,
6805,
286,
1398,
1976,
5097,
62,
40386,
62,
3843,
4146,
201,
198,
9,
1,
9,
466,
407,
2291,
584,
2723,
3696,
994,
10185,
201,
198,
220,
1398,
12,
24396,
82,
12682,
62,
9864,
23680,
62,
54,
10554,
62,
1503,
30631,
62,
4537,
4663,
201,
198,
220,
220,
220,
33332,
201,
198,
220,
220,
220,
220,
220,
5145,
20608,
2099,
19269,
2751,
201,
198,
220,
220,
220,
220,
220,
5145,
39488,
2099,
1006,
284,
1168,
5097,
62,
40386,
62,
1503,
30631,
201,
198,
220,
220,
220,
8024,
201,
198,
220,
220,
220,
220,
220,
1988,
7,
26087,
4261,
15871,
8,
2099,
1006,
284,
1168,
5097,
62,
40386,
62,
9864,
23680,
764,
201,
198,
220,
1398,
12,
24396,
82,
12682,
62,
9864,
23680,
62,
54,
10554,
62,
8202,
3535,
62,
4537,
4663,
201,
198,
220,
220,
220,
33332,
201,
198,
220,
220,
220,
220,
220,
5145,
20608,
2099,
19269,
2751,
201,
198,
220,
220,
220,
220,
220,
5145,
39488,
2099,
9564,
2969,
62,
8202,
3535,
201,
198,
220,
220,
220,
8024,
201,
198,
220,
220,
220,
220,
220,
1988,
7,
26087,
4261,
15871,
8,
2099,
1006,
284,
1168,
5097,
62,
40386,
62,
9864,
23680,
764,
201,
198,
220,
1398,
12,
24396,
82,
12682,
62,
9864,
23680,
62,
54,
10554,
62,
33991,
62,
4537,
4663,
201,
198,
220,
220,
220,
33332,
201,
198,
220,
220,
220,
220,
220,
5145,
20608,
2099,
19269,
2751,
201,
198,
220,
220,
220,
8024,
201,
198,
220,
220,
220,
220,
220,
1988,
7,
26087,
4261,
15871,
8,
2099,
1006,
284,
1168,
5097,
62,
40386,
62,
9864,
23680,
764,
201,
198,
220,
1398,
12,
24396,
82,
12682,
62,
9864,
23680,
62,
54,
10554,
62,
41359,
13246,
62,
4537,
4663,
201,
198,
220,
220,
220,
33332,
201,
198,
220,
220,
220,
220,
220,
5145,
20608,
2099,
19269,
2751,
201,
198,
220,
220,
220,
220,
220,
5145,
39488,
2099,
376,
201,
198,
220,
220,
220,
8024,
201,
198,
220,
220,
220,
220,
220,
1988,
7,
26087,
4261,
15871,
8,
2099,
1006,
284,
1168,
5097,
62,
40386,
62,
9864,
23680,
764,
201,
198,
220,
1398,
12,
24396,
82,
12682,
62,
9864,
23680,
62,
54,
10554,
62,
9864,
23680,
62,
4537,
4663,
201,
198,
220,
220,
220,
33332,
201,
198,
220,
220,
220,
220,
220,
5145,
20608,
2099,
19269,
2751,
201,
198,
220,
220,
220,
220,
220,
5145,
39488,
2099,
1006,
284,
1168,
5097,
62,
40386,
62,
9864,
23680,
201,
198,
220,
220,
220,
8024,
201,
198,
220,
220,
220,
220,
220,
1988,
7,
26087,
4261,
15871,
8,
2099,
1006,
284,
1168,
5097,
62,
40386,
62,
9864,
23680,
764,
201,
198,
220,
1398,
12,
24396,
82,
12682,
62,
9864,
23680,
62,
54,
10554,
62,
18601,
2751,
62,
4537,
4663,
201,
198,
220,
220,
220,
33332,
201,
198,
220,
220,
220,
220,
220,
5145,
20608,
2099,
19269,
2751,
201,
198,
220,
220,
220,
220,
220,
5145,
39488,
2099,
19269,
2751,
201,
198,
220,
220,
220,
8024,
201,
198,
220,
220,
220,
220,
220,
1988,
7,
26087,
4261,
15871,
8,
2099,
1006,
284,
1168,
5097,
62,
40386,
62,
9864,
23680,
764,
201,
198,
220,
1398,
12,
24396,
82,
12682,
62,
4537,
4663,
62,
54,
10554,
62,
1503,
30631,
201,
198,
220,
220,
220,
33332,
201,
198,
220,
220,
220,
220,
220,
5145,
20608,
2099,
19269,
2751,
201,
198,
220,
220,
220,
220,
220,
5145,
39488,
2099,
1006,
284,
1168,
5097,
62,
40386,
62,
1503,
30631,
201,
198,
220,
220,
220,
8024,
201,
198,
220,
220,
220,
220,
220,
1988,
7,
26087,
4261,
15871,
8,
2099,
1006,
284,
1168,
5097,
62,
40386,
62,
4537,
4663,
764,
201,
198,
220,
1398,
12,
24396,
82,
12682,
62,
4537,
4663,
62,
54,
10554,
62,
8202,
3535,
201,
198,
220,
220,
220,
33332,
201,
198,
220,
220,
220,
220,
220,
5145,
20608,
2099,
19269,
2751,
201,
198,
220,
220,
220,
220,
220,
5145,
39488,
2099,
9564,
2969,
62,
8202,
3535,
201,
198,
220,
220,
220,
8024,
201,
198,
220,
220,
220,
220,
220,
1988,
7,
26087,
4261,
15871,
8,
2099,
1006,
284,
1168,
5097,
62,
40386,
62,
4537,
4663,
764,
201,
198,
220,
1398,
12,
24396,
82,
12682,
62,
4537,
4663,
62,
54,
10554,
62,
33991,
201,
198,
220,
220,
220,
33332,
201,
198,
220,
220,
220,
220,
220,
5145,
20608,
2099,
19269,
2751,
201,
198,
220,
220,
220,
8024,
201,
198,
220,
220,
220,
220,
220,
1988,
7,
26087,
4261,
15871,
8,
2099,
1006,
284,
1168,
5097,
62,
40386,
62,
4537,
4663,
764,
201,
198,
220,
1398,
12,
24396,
82,
12682,
62,
4537,
4663,
62,
54,
10554,
62,
41359,
13246,
201,
198,
220,
220,
220,
33332,
201,
198,
220,
220,
220,
220,
220,
5145,
20608,
2099,
19269,
2751,
201,
198,
220,
220,
220,
220,
220,
5145,
39488,
2099,
376,
201,
198,
220,
220,
220,
8024,
201,
198,
220,
220,
220,
220,
220,
1988,
7,
26087,
4261,
15871,
8,
2099,
1006,
284,
1168,
5097,
62,
40386,
62,
4537,
4663,
764,
201,
198,
220,
1398,
12,
24396,
82,
12682,
62,
4537,
4663,
62,
54,
10554,
62,
9864,
23680,
201,
198,
220,
220,
220,
33332,
201,
198,
220,
220,
220,
220,
220,
5145,
20608,
2099,
19269,
2751,
201,
198,
220,
220,
220,
220,
220,
5145,
39488,
2099,
1006,
284,
1168,
5097,
62,
40386,
62,
9864,
23680,
201,
198,
220,
220,
220,
8024,
201,
198,
220,
220,
220,
220,
220,
1988,
7,
26087,
4261,
15871,
8,
2099,
1006,
284,
1168,
5097,
62,
40386,
62,
4537,
4663,
764,
201,
198,
220,
1398,
12,
24396,
82,
12682,
62,
4537,
4663,
62,
54,
10554,
62,
18601,
2751,
201,
198,
220,
220,
220,
33332,
201,
198,
220,
220,
220,
220,
220,
5145,
20608,
2099,
19269,
2751,
201,
198,
220,
220,
220,
220,
220,
5145,
39488,
2099,
19269,
2751,
201,
198,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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS zcl_abapgit_default_transport DEFINITION
PUBLIC
CREATE PRIVATE .
PUBLIC SECTION.
CLASS-METHODS:
get_instance
RETURNING
VALUE(ro_instance) TYPE REF TO zcl_abapgit_default_transport
RAISING
zcx_abapgit_exception.
METHODS:
constructor
RAISING
zcx_abapgit_exception,
set
IMPORTING
iv_transport TYPE trkorr
RAISING
zcx_abapgit_exception,
reset
RAISING
zcx_abapgit_exception.
PRIVATE SECTION.
CLASS-DATA go_instance TYPE REF TO zcl_abapgit_default_transport .
DATA mv_is_set_by_abapgit TYPE abap_bool .
DATA ms_save TYPE e070use .
METHODS store
RAISING
zcx_abapgit_exception .
METHODS restore
RAISING
zcx_abapgit_exception .
METHODS get
RETURNING
VALUE(rs_default_task) TYPE e070use
RAISING
zcx_abapgit_exception .
METHODS set_internal
IMPORTING
!iv_transport TYPE trkorr
RAISING
zcx_abapgit_exception .
METHODS clear
IMPORTING
!is_default_task TYPE e070use
RAISING
zcx_abapgit_exception .
ENDCLASS.
CLASS ZCL_ABAPGIT_DEFAULT_TRANSPORT IMPLEMENTATION.
METHOD clear.
CALL FUNCTION 'TR_TASK_RESET'
EXPORTING
iv_username = is_default_task-username
iv_order = is_default_task-ordernum
iv_task = is_default_task-tasknum
iv_dialog = abap_false
EXCEPTIONS
invalid_username = 1
invalid_order = 2
invalid_task = 3
OTHERS = 4.
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( |Error from TR_TASK_RESET { sy-subrc }| ).
ENDIF.
ENDMETHOD.
METHOD constructor.
store( ).
ENDMETHOD.
METHOD get.
DATA: lt_e070use TYPE STANDARD TABLE OF e070use.
CALL FUNCTION 'TR_TASK_GET'
TABLES
tt_e070use = lt_e070use
EXCEPTIONS
invalid_username = 1
invalid_category = 2
invalid_client = 3
OTHERS = 4.
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( |Error from TR_TASK_GET { sy-subrc }| ).
ENDIF.
READ TABLE lt_e070use INTO rs_default_task
INDEX 1.
ENDMETHOD.
METHOD get_instance.
IF go_instance IS NOT BOUND.
CREATE OBJECT go_instance.
ENDIF.
ro_instance = go_instance.
ENDMETHOD.
METHOD reset.
DATA: ls_default_task TYPE e070use.
IF mv_is_set_by_abapgit = abap_false.
" if the default transport request task isn't set
" by us there is nothing to do.
RETURN.
ENDIF.
CLEAR mv_is_set_by_abapgit.
ls_default_task = get( ).
IF ls_default_task IS NOT INITIAL.
clear( ls_default_task ).
ENDIF.
restore( ).
ENDMETHOD.
METHOD restore.
IF ms_save IS INITIAL.
" There wasn't a default transport request before
" so we needn't restore anything.
RETURN.
ENDIF.
CALL FUNCTION 'TR_TASK_SET'
EXPORTING
iv_order = ms_save-ordernum
iv_task = ms_save-tasknum
EXCEPTIONS
invalid_username = 1
invalid_category = 2
invalid_client = 3
invalid_validdays = 4
invalid_order = 5
invalid_task = 6
OTHERS = 7.
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( |Error from TR_TASK_SET { sy-subrc }| ).
ENDIF.
ENDMETHOD.
METHOD set.
" checks whether object changes of the package are rerorded in transport
" requests. If true then we set the default task, so that no annoying
" transport request popups are shown while deserializing.
IF mv_is_set_by_abapgit = abap_true.
" the default transport request task is already set by us
" -> no reason to do it again.
RETURN.
ENDIF.
IF iv_transport IS INITIAL.
zcx_abapgit_exception=>raise( |No transport request was supplied| ).
ENDIF.
set_internal( iv_transport ).
mv_is_set_by_abapgit = abap_true.
ENDMETHOD.
METHOD set_internal.
CALL FUNCTION 'TR_TASK_SET'
EXPORTING
iv_order = iv_transport
* iv_task = iv_task
EXCEPTIONS
invalid_username = 1
invalid_category = 2
invalid_client = 3
invalid_validdays = 4
invalid_order = 5
invalid_task = 6
OTHERS = 7.
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( |Error from TR_TASK_SET { sy-subrc }| ).
ENDIF.
ENDMETHOD.
METHOD store.
ms_save = get( ).
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
397,
499,
18300,
62,
12286,
62,
7645,
634,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
29244,
6158,
4810,
3824,
6158,
764,
628,
220,
44731,
44513,
13,
198,
220,
220,
220,
42715,
12,
49273,
50,
25,
198,
220,
220,
220,
220,
220,
651,
62,
39098,
198,
220,
220,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
305,
62,
39098,
8,
41876,
4526,
37,
5390,
1976,
565,
62,
397,
499,
18300,
62,
12286,
62,
7645,
634,
198,
220,
220,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
13,
628,
220,
220,
220,
337,
36252,
50,
25,
198,
220,
220,
220,
220,
220,
23772,
198,
220,
220,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
11,
628,
220,
220,
220,
220,
220,
900,
198,
220,
220,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
7645,
634,
41876,
491,
74,
38890,
198,
220,
220,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
11,
628,
220,
220,
220,
220,
220,
13259,
198,
220,
220,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
13,
628,
198,
220,
4810,
3824,
6158,
44513,
13,
628,
220,
220,
220,
42715,
12,
26947,
467,
62,
39098,
41876,
4526,
37,
5390,
1976,
565,
62,
397,
499,
18300,
62,
12286,
62,
7645,
634,
764,
198,
220,
220,
220,
42865,
285,
85,
62,
271,
62,
2617,
62,
1525,
62,
397,
499,
18300,
41876,
450,
499,
62,
30388,
764,
198,
220,
220,
220,
42865,
13845,
62,
21928,
41876,
304,
43509,
1904,
764,
628,
220,
220,
220,
337,
36252,
50,
3650,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
764,
198,
220,
220,
220,
337,
36252,
50,
11169,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
764,
198,
220,
220,
220,
337,
36252,
50,
651,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
3808,
62,
12286,
62,
35943,
8,
41876,
304,
43509,
1904,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
764,
198,
220,
220,
220,
337,
36252,
50,
900,
62,
32538,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
7645,
634,
41876,
491,
74,
38890,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
764,
198,
220,
220,
220,
337,
36252,
50,
1598,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
271,
62,
12286,
62,
35943,
41876,
304,
43509,
1904,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
764,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1168,
5097,
62,
6242,
2969,
38,
2043,
62,
7206,
38865,
62,
5446,
1565,
4303,
9863,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
1598,
13,
628,
220,
220,
220,
42815,
29397,
4177,
2849,
705,
5446,
62,
51,
1921,
42,
62,
19535,
2767,
6,
198,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
29460,
220,
220,
220,
220,
220,
796,
318,
62,
12286,
62,
35943,
12,
29460,
198,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
2875,
220,
220,
220,
220,
220,
220,
220,
220,
796,
318,
62,
12286,
62,
35943,
12,
585,
1142,
388,
198,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
35943,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
318,
62,
12286,
62,
35943,
12,
35943,
22510,
198,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
38969,
519,
220,
220,
220,
220,
220,
220,
220,
796,
450,
499,
62,
9562,
198,
220,
220,
220,
220,
220,
7788,
42006,
11053,
198,
220,
220,
220,
220,
220,
220,
220,
12515,
62,
29460,
796,
352,
198,
220,
220,
220,
220,
220,
220,
220,
12515,
62,
2875,
220,
220,
220,
796,
362,
198,
220,
220,
220,
220,
220,
220,
220,
12515,
62,
35943,
220,
220,
220,
220,
796,
513,
198,
220,
220,
220,
220,
220,
220,
220,
440,
4221,
4877,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
604,
13,
628,
220,
220,
220,
16876,
827,
12,
7266,
6015,
1279,
29,
657,
13,
198,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
14804,
40225,
7,
930,
12331,
422,
7579,
62,
51,
1921,
42,
62,
19535,
2767,
1391,
827,
12,
7266,
6015,
1782,
91,
6739,
198,
220,
220,
220,
23578,
5064,
13,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
23772,
13,
628,
220,
220,
220,
3650,
7,
6739,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
651,
13,
628,
220,
220,
220,
42865,
25,
300,
83,
62,
68,
43509,
1904,
41876,
49053,
9795,
43679,
3963,
304,
43509,
1904,
13,
628,
220,
220,
220,
42815,
29397,
4177,
2849,
705,
5446,
62,
51,
1921,
42,
62,
18851,
6,
198,
220,
220,
220,
220,
220,
309,
6242,
28378,
198,
220,
220,
220,
220,
220,
220,
220,
256,
83,
62,
68,
43509,
1904,
220,
220,
220,
220,
220,
220,
796,
300,
83,
62,
68,
43509,
1904,
198
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS zunitdemo_table_no_mock DEFINITION
PUBLIC
CREATE PUBLIC .
PUBLIC SECTION.
TYPES: ty_table TYPE STANDARD TABLE OF zunitdemo_table1 WITH DEFAULT KEY.
METHODS:
constructor,
get_data
RETURNING
VALUE(r_result) TYPE ty_table.
PROTECTED SECTION.
PRIVATE SECTION.
DATA g_is_test TYPE abap_bool.
ENDCLASS.
CLASS ZUNITDEMO_TABLE_NO_MOCK IMPLEMENTATION.
METHOD constructor.
TEST-SEAM is_test.
END-TEST-SEAM.
ENDMETHOD.
METHOD get_data.
" This method is tested with an integration test.
" Here the table has a name range that is exclusively used for unit tests.
" The flag g_is_test is set during tests in the constructor with a test seam.
SELECT * FROM zunitdemo_table1 INTO TABLE r_result WHERE
test = g_is_test.
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
20850,
9536,
78,
62,
11487,
62,
3919,
62,
76,
735,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
29244,
6158,
44731,
764,
628,
220,
44731,
44513,
13,
198,
220,
220,
220,
24412,
47,
1546,
25,
1259,
62,
11487,
41876,
49053,
9795,
43679,
3963,
1976,
20850,
9536,
78,
62,
11487,
16,
13315,
5550,
38865,
35374,
13,
198,
220,
220,
220,
337,
36252,
50,
25,
198,
220,
220,
220,
220,
220,
23772,
11,
198,
220,
220,
220,
220,
220,
651,
62,
7890,
198,
220,
220,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
81,
62,
20274,
8,
41876,
1259,
62,
11487,
13,
198,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
4810,
3824,
6158,
44513,
13,
198,
220,
220,
220,
42865,
308,
62,
271,
62,
9288,
41876,
450,
499,
62,
30388,
13,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1168,
4944,
2043,
39429,
46,
62,
38148,
62,
15285,
62,
44,
11290,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
23772,
13,
628,
220,
220,
220,
43001,
12,
5188,
2390,
318,
62,
9288,
13,
198,
220,
220,
220,
23578,
12,
51,
6465,
12,
5188,
2390,
13,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
651,
62,
7890,
13,
198,
220,
220,
220,
366,
770,
2446,
318,
6789,
351,
281,
11812,
1332,
13,
198,
220,
220,
220,
366,
3423,
262,
3084,
468,
257,
1438,
2837,
326,
318,
11541,
973,
329,
4326,
5254,
13,
198,
220,
220,
220,
366,
383,
6056,
308,
62,
271,
62,
9288,
318,
900,
1141,
5254,
287,
262,
23772,
351,
257,
1332,
15787,
13,
198,
220,
220,
220,
33493,
1635,
16034,
1976,
20850,
9536,
78,
62,
11487,
16,
39319,
43679,
374,
62,
20274,
33411,
198,
220,
220,
220,
220,
220,
1332,
796,
308,
62,
271,
62,
9288,
13,
628,
220,
23578,
49273,
13,
198,
10619,
31631,
13,
198
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS /dmo/cl_flight_data_generat_27 DEFINITION
PUBLIC
FINAL
CREATE PUBLIC .
PUBLIC SECTION.
INTERFACES: if_oo_adt_classrun.
PROTECTED SECTION.
PRIVATE SECTION.
CLASS-METHODS:
"! Calculation of Price <br/>
"! <br/>
"! Propagation to /dmo/cl_flight_legacy27=>calculate_flight_price.<br/>
"! @parameter iv_seats_occupied_percent | occupied seats
"! @parameter iv_flight_distance | flight distance in kilometer
"! @parameter rv_price | calculated flight price
calculate_flight_price
IMPORTING
iv_seats_occupied_percent TYPE /dmo/plane_seats_occupied27
iv_flight_distance TYPE i
RETURNING
VALUE(rv_price) TYPE /dmo/flight_price27.
ENDCLASS.
CLASS /dmo/cl_flight_data_generat_27 IMPLEMENTATION.
METHOD if_oo_adt_classrun~main.
out->write( 'Starting Data Generation' ).
out->write( 'Generate Data: Airport /DMO/AIRPORT27' ).
lcl_airport_data_generator=>lif_data_generator~create( out ).
out->write( 'Generate Data: Carrier /DMO/CARRIER27' ).
lcl_carrier_data_generator=>lif_data_generator~create( out ).
out->write( 'Generate Data: Connection /DMO/CONNECTI_27' ).
lcl_connection_data_generator=>lif_data_generator~create( out ).
out->write( 'Generate Data: Flight /DMO/FLIGHT27' ).
lcl_flight_data_generator=>lif_data_generator~create( out ).
out->write( 'Generate Data: Agency /DMO/AGENCY27' ).
lcl_agency_data_generator=>lif_data_generator~create( out ).
out->write( 'Generate Data: Customer /DMO/CUSTOMER27' ).
lcl_customer_data_generator=>lif_data_generator~create( out ).
out->write( 'Generate Data: Supplement /DMO/SUPPLEME_27' ).
lcl_supplement_data_generator=>lif_data_generator~create( out ).
out->write( 'Generate Data: Travel /DMO/TRAVEL27' ).
out->write( 'Generate Data: Booking /DMO/BOOKING27' ).
out->write( 'Generate Data: Booking Supplement /DMO/BOOK_SUP_27' ).
lcl_travel_data_generator=>lif_data_generator~create( out ).
out->write( 'Finished Data Generation' ).
ENDMETHOD.
METHOD calculate_flight_price.
rv_price = /dmo/cl_flight_legacy27=>calculate_flight_price(
iv_seats_occupied_percent = iv_seats_occupied_percent
iv_flight_distance = iv_flight_distance
).
ENDMETHOD.
ENDCLASS.
| [
31631,
1220,
67,
5908,
14,
565,
62,
22560,
62,
7890,
62,
8612,
265,
62,
1983,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
25261,
198,
220,
29244,
6158,
44731,
764,
628,
220,
44731,
44513,
13,
198,
220,
220,
220,
23255,
37,
2246,
1546,
25,
611,
62,
2238,
62,
324,
83,
62,
4871,
5143,
13,
628,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
4810,
3824,
6158,
44513,
13,
198,
220,
220,
220,
42715,
12,
49273,
50,
25,
198,
220,
220,
220,
220,
220,
366,
0,
2199,
14902,
286,
7886,
1279,
1671,
15913,
198,
220,
220,
220,
220,
220,
366,
0,
220,
1279,
1671,
15913,
198,
220,
220,
220,
220,
220,
366,
0,
8772,
363,
341,
284,
1220,
67,
5908,
14,
565,
62,
22560,
62,
1455,
1590,
1983,
14804,
9948,
3129,
378,
62,
22560,
62,
20888,
29847,
1671,
15913,
198,
220,
220,
220,
220,
220,
366,
0,
2488,
17143,
2357,
21628,
62,
325,
1381,
62,
28756,
62,
25067,
930,
12030,
8632,
198,
220,
220,
220,
220,
220,
366,
0,
2488,
17143,
2357,
21628,
62,
22560,
62,
30246,
930,
5474,
5253,
287,
11866,
263,
198,
220,
220,
220,
220,
220,
366,
0,
2488,
17143,
2357,
374,
85,
62,
20888,
930,
10488,
5474,
2756,
198,
220,
220,
220,
220,
220,
15284,
62,
22560,
62,
20888,
198,
220,
220,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
325,
1381,
62,
28756,
62,
25067,
41876,
1220,
67,
5908,
14,
14382,
62,
325,
1381,
62,
28756,
1983,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
22560,
62,
30246,
220,
220,
220,
220,
220,
220,
220,
41876,
1312,
198,
220,
220,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
81,
85,
62,
20888,
8,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
1220,
67,
5908,
14,
22560,
62,
20888,
1983,
13,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1220,
67,
5908,
14,
565,
62,
22560,
62,
7890,
62,
8612,
265,
62,
1983,
30023,
2538,
10979,
6234,
13,
628,
220,
337,
36252,
611,
62,
2238,
62,
324,
83,
62,
4871,
5143,
93,
12417,
13,
198,
220,
220,
220,
503,
3784,
13564,
7,
705,
22851,
6060,
16588,
6,
6739,
628,
220,
220,
220,
503,
3784,
13564,
7,
705,
8645,
378,
6060,
25,
12690,
220,
220,
220,
220,
220,
1220,
35,
11770,
14,
42149,
15490,
1983,
6,
6739,
198,
220,
220,
220,
300,
565,
62,
958,
634,
62,
7890,
62,
8612,
1352,
14804,
36195,
62,
7890,
62,
8612,
1352,
93,
17953,
7,
503,
6739,
628,
220,
220,
220,
503,
3784,
13564,
7,
705,
8645,
378,
6060,
25,
30252,
220,
220,
220,
220,
220,
1220,
35,
11770,
14,
20034,
7112,
1137,
1983,
6,
6739,
198,
220,
220,
220,
300,
565,
62,
7718,
5277,
62,
7890,
62,
8612,
1352,
14804,
36195,
62,
7890,
62,
8612,
1352,
93,
17953,
7,
503,
6739,
198,
220,
220,
220,
503,
3784,
13564,
7,
705,
8645,
378,
6060,
25,
26923,
220,
220,
1220,
35,
11770,
14,
10943,
48842,
40,
62,
1983,
6,
6739,
198,
220,
220,
220,
300,
565,
62,
38659,
62,
7890,
62,
8612,
1352,
14804,
36195,
62,
7890,
62,
8612,
1352,
93,
17953,
7,
503,
6739,
198,
220,
220,
220,
503,
3784,
13564,
7,
705,
8645,
378,
6060,
25,
13365,
220,
220,
220,
220,
220,
220,
1220,
35,
11770,
14,
3697,
9947,
1983,
6,
6739,
198,
220,
220,
220,
300,
565,
62,
22560,
62,
7890,
62,
8612,
1352,
14804,
36195,
62,
7890,
62,
8612,
1352,
93,
17953,
7,
503,
6739,
628,
198,
220,
220,
220,
503,
3784,
13564,
7,
705,
8645,
378,
6060,
25,
7732,
220,
220,
220,
220,
220,
220,
1220,
35,
11770,
14,
4760,
45155,
1983,
6,
6739,
198,
220,
220,
220,
300,
565,
62,
40955,
62,
7890,
62,
8612,
1352,
14804,
36195,
62,
7890,
62,
8612,
1352,
93,
17953,
7,
503,
6739,
628,
220,
220,
220,
503,
3784,
13564,
7,
705,
8645,
378,
6060,
25,
22092,
220,
220,
220,
220,
220,
1220,
35,
11770,
14,
34,
7759,
2662,
1137,
1983,
6,
6739,
198,
220,
220,
220,
300,
565,
62,
23144,
263,
62,
7890,
62,
8612,
1352,
14804,
36195,
62,
7890,
62,
8612,
1352,
93,
17953,
7,
503,
6739,
628,
220,
220,
220,
503,
3784,
13564,
7,
705,
8645,
378,
6060,
25,
23150,
220,
220,
220,
220,
220,
1220,
35,
11770,
14,
40331,
16437,
11682,
62,
1983,
6,
6739,
198,
220,
220,
220,
300,
565,
62,
18608,
1732,
62,
7890,
62,
8612,
1352,
14804,
36195,
62,
7890,
62,
8612,
1352,
93,
17953,
7,
503,
6739,
628,
220,
220,
220,
503,
3784,
13564,
7,
705,
8645,
378,
6060,
25,
13524,
220,
220,
220,
220,
220,
1220,
35,
11770,
14,
51,
3861,
18697,
1983,
6,
6739,
198,
220,
220,
220,
503,
3784,
13564,
7,
705,
8645,
378,
6060,
25,
4897,
278,
220,
220,
220,
220,
220,
1220,
35,
11770,
14,
39453,
2751,
1983,
6,
6739,
198,
220,
220,
220,
503,
3784,
13564,
7,
705,
8645,
378,
6060,
25,
4897,
278,
23150,
220,
220,
220,
220,
220,
1220,
35,
11770,
14,
39453,
62,
40331,
62,
1983,
6,
6739,
198,
220,
220,
220,
300,
565,
62,
35927,
62,
7890,
62,
8612,
1352,
14804,
36195,
62,
7890,
62,
8612,
1352,
93,
17953,
7,
503,
6739,
628,
220,
220,
220,
503,
3784,
13564,
7,
705,
18467,
1348,
6060,
16588,
6,
6739,
198,
220,
23578,
49273,
13,
198,
220,
337,
36252,
15284,
62,
22560,
62,
20888,
13,
198,
220,
220,
220,
374,
85,
62,
20888,
796,
1220,
67,
5908,
14,
565,
62,
22560,
62,
1455,
1590,
1983,
14804,
9948,
3129,
378,
62,
22560,
62,
20888,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
325,
1381,
62,
28756,
62,
25067,
796,
21628,
62,
325,
1381,
62,
28756,
62,
25067,
198,
220,
220,
220,
220,
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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS ltcl_test DEFINITION DEFERRED.
CLASS zcl_abapgit_branch_overview DEFINITION LOCAL FRIENDS ltcl_test.
CLASS ltcl_test DEFINITION FOR TESTING
DURATION SHORT
RISK LEVEL HARMLESS FINAL.
PRIVATE SECTION.
METHODS:
parse_commits FOR TESTING RAISING zcx_abapgit_exception,
check_author_regex FOR TESTING RAISING zcx_abapgit_exception.
ENDCLASS.
CLASS ltcl_test IMPLEMENTATION.
METHOD parse_commits.
DATA: lt_objects TYPE zif_abapgit_definitions=>ty_objects_tt,
lt_commits TYPE zif_abapgit_definitions=>ty_commit_tt,
ls_commit LIKE LINE OF lt_commits,
ls_object LIKE LINE OF lt_objects.
ls_object-type = zif_abapgit_definitions=>c_type-commit.
ls_object-data = '7472656520396335376238613931336465306539' &&
'3735333630633261306330643638363037306162' &&
'61343965650A706172656E742036393532346462' &&
'3139363263383839366566343364323861616131' &&
'396536366533373263653364620A617574686F72' &&
'206C6172736870203C6C617273687040686F746D' &&
'61696C2E636F6D3E203135333236313133353020' &&
'2B303030300A636F6D6D6974746572206C617273' &&
'6870203C6C617273687040686F746D61696C2E63' &&
'6F6D3E2031353332363131333530202B30303030' &&
'0A0A56494557'.
APPEND ls_object TO lt_objects.
lt_commits = zcl_abapgit_branch_overview=>parse_commits( lt_objects ).
cl_abap_unit_assert=>assert_equals(
act = lines( lt_commits )
exp = 1 ).
READ TABLE lt_commits INTO ls_commit INDEX 1.
cl_abap_unit_assert=>assert_subrc( ).
cl_abap_unit_assert=>assert_equals(
act = ls_commit-message
exp = 'VIEW' ).
ENDMETHOD.
METHOD check_author_regex.
DATA: lt_objects TYPE zif_abapgit_definitions=>ty_objects_tt,
lt_commits TYPE zif_abapgit_definitions=>ty_commit_tt,
ls_object LIKE LINE OF lt_objects,
ls_git_pack_commit TYPE zcl_abapgit_git_pack=>ty_commit.
ls_object-type = zif_abapgit_definitions=>c_type-commit.
ls_git_pack_commit-tree = 'dummy'.
ls_git_pack_commit-committer = 'dummy'.
ls_git_pack_commit-author = 'Lastname, Firstname <[email protected]> 1532611350 +0000'.
ls_object-data = zcl_abapgit_git_pack=>encode_commit( ls_git_pack_commit ).
APPEND ls_object TO lt_objects.
ls_git_pack_commit-author = 'Soeren Mueller <[email protected]> 1532611350 +0000'.
ls_object-data = zcl_abapgit_git_pack=>encode_commit( ls_git_pack_commit ).
APPEND ls_object TO lt_objects.
ls_git_pack_commit-author = 'S#ren M#ller <[email protected]> 1532611350 +0000'.
ls_object-data = zcl_abapgit_git_pack=>encode_commit( ls_git_pack_commit ).
APPEND ls_object TO lt_objects.
ls_git_pack_commit-author = 'Dr. Werner Mueller <[email protected]> 1532611350 +0000'.
ls_object-data = zcl_abapgit_git_pack=>encode_commit( ls_git_pack_commit ).
APPEND ls_object TO lt_objects.
ls_git_pack_commit-author = 'SAP*........ <SAP*........@localhost> 1535375483 +0200'.
ls_object-data = zcl_abapgit_git_pack=>encode_commit( ls_git_pack_commit ).
APPEND ls_object TO lt_objects.
ls_git_pack_commit-author = |Soeren %26 Sascha <[email protected]> 1557574255 +0000|.
ls_object-data = zcl_abapgit_git_pack=>encode_commit( ls_git_pack_commit ).
APPEND ls_object TO lt_objects.
lt_commits = zcl_abapgit_branch_overview=>parse_commits( lt_objects ).
cl_abap_unit_assert=>assert_equals(
act = lines( lt_commits )
exp = 6 ).
ENDMETHOD.
ENDCLASS.
| [
198,
31631,
300,
83,
565,
62,
9288,
5550,
20032,
17941,
23449,
1137,
22083,
13,
198,
31631,
1976,
565,
62,
397,
499,
18300,
62,
1671,
3702,
62,
2502,
1177,
5550,
20032,
17941,
37347,
1847,
48167,
1677,
5258,
300,
83,
565,
62,
9288,
13,
628,
198,
31631,
300,
83,
565,
62,
9288,
5550,
20032,
17941,
7473,
43001,
2751,
198,
220,
360,
4261,
6234,
6006,
9863,
198,
220,
45698,
42,
49277,
43638,
5805,
7597,
25261,
13,
628,
220,
4810,
3824,
6158,
44513,
13,
628,
220,
220,
220,
337,
36252,
50,
25,
198,
220,
220,
220,
220,
220,
21136,
62,
9503,
896,
7473,
43001,
2751,
17926,
1797,
2751,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
11,
198,
220,
220,
220,
220,
220,
2198,
62,
9800,
62,
260,
25636,
7473,
43001,
2751,
17926,
1797,
2751,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
13,
198,
198,
10619,
31631,
13,
628,
198,
31631,
300,
83,
565,
62,
9288,
30023,
2538,
10979,
6234,
13,
628,
220,
337,
36252,
21136,
62,
9503,
896,
13,
628,
220,
220,
220,
42865,
25,
300,
83,
62,
48205,
41876,
1976,
361,
62,
397,
499,
18300,
62,
4299,
50101,
14804,
774,
62,
48205,
62,
926,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
83,
62,
9503,
896,
41876,
1976,
361,
62,
397,
499,
18300,
62,
4299,
50101,
14804,
774,
62,
41509,
62,
926,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
43979,
62,
41509,
220,
34178,
48920,
3963,
300,
83,
62,
9503,
896,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
43979,
62,
15252,
220,
34178,
48920,
3963,
300,
83,
62,
48205,
13,
628,
198,
220,
220,
220,
43979,
62,
15252,
12,
4906,
796,
1976,
361,
62,
397,
499,
18300,
62,
4299,
50101,
14804,
66,
62,
4906,
12,
41509,
13,
198,
220,
220,
220,
43979,
62,
15252,
12,
7890,
796,
705,
48882,
22980,
2996,
1238,
34107,
27326,
32128,
1954,
4521,
1485,
6052,
16945,
2414,
2996,
1270,
2996,
2670,
6,
11405,
198,
220,
220,
220,
220,
220,
705,
2718,
2327,
2091,
2623,
20548,
2091,
2075,
12952,
5066,
1270,
2414,
2623,
2548,
2623,
1270,
2718,
20548,
25061,
6,
11405,
198,
220,
220,
220,
220,
220,
705,
21,
19880,
2670,
2996,
17544,
32,
35402,
1558,
2075,
3980,
36,
4524,
1238,
2623,
2670,
33319,
24409,
2414,
5237,
6,
11405,
198,
220,
220,
220,
220,
220,
705,
18,
20219,
35447,
2075,
28460,
2548,
2670,
2623,
2996,
2791,
2682,
2091,
2414,
32637,
4521,
1433,
1433,
22042,
6,
11405,
198,
220,
220,
220,
220,
220,
705,
2670,
2996,
2623,
2623,
2996,
2091,
34770,
2075,
24760,
2091,
27720,
1238,
32,
47941,
46900,
33808,
37,
4761,
6,
11405,
198,
220,
220,
220,
220,
220,
705,
22136,
34,
47941,
1983,
27412,
2154,
22416,
34,
21,
34,
47941,
1983,
27412,
2154,
1821,
33808,
37,
22,
3510,
35,
6,
11405,
198,
220,
220,
220,
220,
220,
705,
44214,
4846,
34,
17,
36,
21,
2623,
37,
21,
35,
18,
36,
22416,
17059,
20370,
1954,
5066,
1485,
1485,
27326,
1270,
1238,
6,
11405,
198,
220,
220,
220,
220,
220,
705,
17,
33,
1270,
1270,
1270,
6200,
32,
21,
2623,
37,
21,
35,
21,
35,
40035,
38652,
2996,
4761,
22136,
34,
47941,
27367,
6,
11405,
198,
220,
220,
220,
220,
220,
705,
3104,
2154,
22416,
34,
21,
34,
47941,
1983,
27412,
2154,
1821,
33808,
37,
22,
3510,
35,
44214,
4846,
34,
17,
36,
5066,
6,
11405,
198,
220,
220,
220,
220,
220,
705,
21,
37,
21,
35,
18,
36,
22416,
17059,
20370,
1954,
5066,
1485,
1485,
27326,
1270,
19004,
33,
1270,
1270,
1270,
1270,
6,
11405,
198,
220,
220,
220,
220,
220,
705,
15,
32,
15,
32,
20,
33300,
2231,
3553,
4458,
198,
220,
220,
220,
43504,
10619,
43979,
62,
15252,
5390,
300,
83,
62,
48205,
13,
628,
220,
220,
220,
300,
83,
62,
9503,
896,
796,
1976,
565,
62,
397,
499,
18300,
62,
1671,
3702,
62,
2502,
1177,
14804,
29572,
62,
9503,
896,
7,
300,
83,
62,
48205,
6739,
628,
220,
220,
220,
537,
62,
397,
499,
62,
20850,
62,
30493,
14804,
30493,
62,
4853,
874,
7,
198,
220,
220,
220,
220,
220,
719,
796,
3951,
7,
300,
83,
62,
9503,
896,
1267,
198,
220,
220,
220,
220,
220,
1033,
796,
352,
6739,
628,
220,
220,
220,
20832,
43679,
300,
83,
62,
9503,
896,
39319,
43979,
62,
41509,
24413,
6369,
352,
13,
198,
220,
220,
220,
537,
62,
397,
499,
62,
20850,
62,
30493,
14804,
30493,
62,
7266,
6015,
7,
6739,
628,
220,
220,
220,
537,
62,
397,
499,
62,
20850,
62,
30493,
14804,
30493,
62,
4853,
874,
7,
198,
220,
220,
220,
220,
220,
719,
796,
43979,
62,
41509,
12,
20500,
198,
220,
220,
220,
220,
220,
1033,
796,
705,
28206,
6,
6739,
628,
220,
23578,
49273,
13,
628,
220,
337,
36252,
2198,
62,
9800,
62,
260,
25636,
13,
628,
220,
220,
220,
42865,
25,
300,
83,
62,
48205,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
1976,
361,
62,
397,
499,
18300,
62,
4299,
50101,
14804,
774,
62,
48205,
62,
926,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
83,
62,
9503,
896,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
1976,
361,
62,
397,
499,
18300,
62,
4299,
50101,
14804,
774,
62,
41509,
62,
926,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
43979,
62,
15252,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
34178,
48920,
3963,
300,
83,
62,
48205,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
43979,
62,
18300,
62,
8002,
62,
41509,
220,
220,
41876,
1976,
565,
62,
397,
499,
18300,
62,
18300,
62,
8002,
14804,
774,
62,
41509,
13,
628,
198,
220,
220,
220,
43979,
62,
15252,
12,
4906,
796,
1976,
361,
62,
397,
499,
18300,
62,
4299,
50101,
14804,
66,
62,
4906,
12,
41509,
13,
198,
220,
220,
220,
43979,
62,
18300,
62,
8002,
62,
41509,
12,
21048,
220,
220,
220,
220,
220,
796,
705,
67,
13513,
4458,
198,
220,
220,
220,
43979,
62,
18300,
62,
8002,
62,
41509,
12,
9503,
1967,
796,
705,
67,
13513,
4458,
628,
220,
220,
220,
43979,
62,
18300,
62,
8002,
62,
41509
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
REPORT zguidrsail_demo_generic_ctrl.
SELECTION-SCREEN BEGIN OF BLOCK ctrl WITH FRAME TITLE TEXT-ctl.
PARAMETERS p_text RADIOBUTTON GROUP ctrl DEFAULT 'X'.
PARAMETERS p_icon RADIOBUTTON GROUP ctrl.
SELECTION-SCREEN END OF BLOCK ctrl.
SELECTION-SCREEN BEGIN OF BLOCK side WITH FRAME TITLE TEXT-sid.
PARAMETERS p_left RADIOBUTTON GROUP side DEFAULT 'X'.
PARAMETERS p_rigt RADIOBUTTON GROUP side.
PARAMETERS p_botm RADIOBUTTON GROUP side.
SELECTION-SCREEN END OF BLOCK side.
CLASS ctrl_demo DEFINITION.
PUBLIC SECTION.
METHODS add_text
IMPORTING
side TYPE i.
METHODS add_icon
IMPORTING
side TYPE i.
PROTECTED SECTION.
TYPES: BEGIN OF ts_object,
container TYPE REF TO cl_gui_container,
control TYPE REF TO cl_gui_control,
END OF ts_object.
DATA objects TYPE STANDARD TABLE OF ts_object.
METHODS append_control
IMPORTING
container TYPE REF TO cl_gui_container
control TYPE REF TO cl_gui_control.
ENDCLASS.
CLASS ctrl_demo IMPLEMENTATION.
METHOD add_text.
DATA(parent) = NEW cl_gui_docking_container( side = side ratio = 20 ).
DATA(textedit) = NEW cl_gui_textedit( parent = parent ).
textedit->set_text_as_stream( VALUE texttab( ( tdline = `This is a demonstration` ) ) ).
append_control( container = parent control = textedit ).
ENDMETHOD.
METHOD add_icon.
DATA(parent) = NEW cl_gui_docking_container( side = side ratio = 20 ).
DATA(icon) = NEW cl_gui_picture( parent = parent ).
data(clsnam) = cl_abap_typedescr=>describe_by_object_ref( parent )->get_relative_name( ).
icon->load_picture_from_sap_icons( icon_message_question ).
icon->set_display_mode( cl_gui_picture=>display_mode_fit_center ).
append_control( container = parent control = icon ).
ENDMETHOD.
METHOD append_control.
APPEND VALUE #( container = container control = control ) TO objects.
ENDMETHOD.
ENDCLASS.
INITIALIZATION.
DATA(demo) = NEW ctrl_demo( ).
AT SELECTION-SCREEN.
CASE 'X'.
WHEN p_left.
DATA(side) = cl_gui_docking_container=>dock_at_left.
WHEN p_rigt.
side = cl_gui_docking_container=>dock_at_right.
WHEN p_botm.
side = cl_gui_docking_container=>dock_at_bottom.
ENDCASE.
CASE 'X'.
WHEN p_text.
demo->add_text( side = side ).
WHEN p_icon.
demo->add_icon( side = side ).
ENDCASE.
| [
2200,
15490,
1976,
5162,
312,
3808,
603,
62,
9536,
78,
62,
41357,
62,
44755,
13,
198,
198,
46506,
2849,
12,
6173,
2200,
1677,
347,
43312,
3963,
9878,
11290,
269,
14859,
13315,
8782,
10067,
37977,
2538,
40383,
12,
34168,
13,
198,
27082,
2390,
2767,
4877,
279,
62,
5239,
33540,
9399,
47526,
11357,
44441,
269,
14859,
5550,
38865,
705,
55,
4458,
198,
27082,
2390,
2767,
4877,
279,
62,
4749,
33540,
9399,
47526,
11357,
44441,
269,
14859,
13,
198,
46506,
2849,
12,
6173,
2200,
1677,
23578,
3963,
9878,
11290,
269,
14859,
13,
198,
198,
46506,
2849,
12,
6173,
2200,
1677,
347,
43312,
3963,
9878,
11290,
1735,
13315,
8782,
10067,
37977,
2538,
40383,
12,
30255,
13,
198,
27082,
2390,
2767,
4877,
279,
62,
9464,
33540,
9399,
47526,
11357,
44441,
1735,
5550,
38865,
705,
55,
4458,
198,
27082,
2390,
2767,
4877,
279,
62,
4359,
83,
33540,
9399,
47526,
11357,
44441,
1735,
13,
198,
27082,
2390,
2767,
4877,
279,
62,
13645,
76,
33540,
9399,
47526,
11357,
44441,
1735,
13,
198,
46506,
2849,
12,
6173,
2200,
1677,
23578,
3963,
9878,
11290,
1735,
13,
198,
198,
31631,
269,
14859,
62,
9536,
78,
5550,
20032,
17941,
13,
198,
220,
44731,
44513,
13,
198,
220,
220,
220,
337,
36252,
50,
751,
62,
5239,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1735,
41876,
1312,
13,
198,
220,
220,
220,
337,
36252,
50,
751,
62,
4749,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1735,
41876,
1312,
13,
198,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
220,
220,
24412,
47,
1546,
25,
347,
43312,
3963,
40379,
62,
15252,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
9290,
41876,
4526,
37,
5390,
537,
62,
48317,
62,
34924,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1630,
220,
220,
41876,
4526,
37,
5390,
537,
62,
48317,
62,
13716,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
23578,
3963,
40379,
62,
15252,
13,
628,
220,
220,
220,
42865,
5563,
41876,
49053,
9795,
43679,
3963,
40379,
62,
15252,
13,
198,
220,
220,
220,
337,
36252,
50,
24443,
62,
13716,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
9290,
41876,
4526,
37,
5390,
537,
62,
48317,
62,
34924,
198,
220,
220,
220,
220,
220,
220,
220,
1630,
220,
220,
41876,
4526,
37,
5390,
537,
62,
48317,
62,
13716,
13,
198,
198,
10619,
31631,
13,
198,
198,
31631,
269,
14859,
62,
9536,
78,
30023,
2538,
10979,
6234,
13,
198,
220,
337,
36252,
751,
62,
5239,
13,
198,
220,
220,
220,
42865,
7,
8000,
8,
796,
12682,
537,
62,
48317,
62,
67,
8629,
62,
34924,
7,
1735,
796,
1735,
8064,
796,
1160,
6739,
198,
220,
220,
220,
42865,
7,
5239,
19312,
8,
796,
12682,
537,
62,
48317,
62,
5239,
19312,
7,
2560,
796,
2560,
6739,
198,
220,
220,
220,
2420,
19312,
3784,
2617,
62,
5239,
62,
292,
62,
5532,
7,
26173,
8924,
2420,
8658,
7,
357,
41560,
1370,
796,
4600,
1212,
318,
257,
13646,
63,
1267,
1267,
6739,
198,
220,
220,
220,
24443,
62,
13716,
7,
9290,
796,
2560,
1630,
796,
2420,
19312,
6739,
198,
220,
23578,
49273,
13,
198,
220,
337,
36252,
751,
62,
4749,
13,
198,
220,
220,
220,
42865,
7,
8000,
8,
796,
12682,
537,
62,
48317,
62,
67,
8629,
62,
34924,
7,
1735,
796,
1735,
8064,
796,
1160,
6739,
198,
220,
220,
220,
42865,
7,
4749,
8,
796,
12682,
537,
62,
48317,
62,
34053,
7,
2560,
796,
2560,
6739,
198,
220,
220,
220,
1366,
7,
565,
82,
7402,
8,
796,
537,
62,
397,
499,
62,
774,
9124,
3798,
81,
14804,
20147,
4892,
62,
1525,
62,
15252,
62,
5420,
7,
2560,
1267,
3784,
1136,
62,
43762,
62,
3672,
7,
6739,
198,
220,
220,
220,
7196,
3784,
2220,
62,
34053,
62,
6738,
62,
82,
499,
62,
34280,
7,
7196,
62,
20500,
62,
25652,
6739,
198,
220,
220,
220,
7196,
3784,
2617,
62,
13812,
62,
14171,
7,
537,
62,
48317,
62,
34053,
14804,
13812,
62,
14171,
62,
11147,
62,
16159,
6739,
198,
220,
220,
220,
24443,
62,
13716,
7,
9290,
796,
2560,
1630,
796,
7196,
6739,
198,
220,
23578,
49273,
13,
198,
220,
337,
36252,
24443,
62,
13716,
13,
198,
220,
220,
220,
43504,
10619,
26173,
8924,
1303,
7,
9290,
796,
9290,
1630,
796,
1630,
1267,
5390,
5563,
13,
198,
220,
23578,
49273,
13,
198,
10619,
31631,
13,
198,
198,
1268,
2043,
12576,
14887,
6234,
13,
198,
220,
42865,
7,
9536,
78,
8,
796,
12682,
269,
14859,
62,
9536,
78,
7,
6739,
198,
198,
1404,
33493,
2849,
12,
6173,
2200,
1677,
13,
628,
220,
42001,
705,
55,
4458,
198,
220,
220,
220,
42099,
279,
62,
9464,
13,
198,
220,
220,
220,
220,
220,
42865,
7,
1589,
8,
796,
537,
62,
48317,
62,
67,
8629,
62,
34924,
14804,
67,
735,
62,
265,
62,
9464,
13,
198,
220,
220,
220,
42099,
279,
62,
4359,
83,
13,
198,
220,
220,
220,
220,
220,
1735,
796,
537,
62,
48317,
62,
67,
8629,
62,
34924,
14804,
67,
735,
62,
265,
62,
3506,
13,
198,
220,
220,
220,
42099,
279,
62,
13645,
76,
13,
198,
220,
220,
220,
220,
220,
1735,
796,
537,
62,
48317,
62,
67,
8629,
62,
34924,
14804,
67,
735,
62,
265,
62,
22487,
13,
198,
220,
23578,
34,
11159,
13,
628,
220,
42001,
705,
55,
4458,
198,
220,
220,
220,
42099,
279,
62,
5239,
13,
198,
220,
220,
220,
220,
220,
13605,
3784,
2860,
62,
5239,
7,
1735,
796,
1735,
6739,
198,
220,
220,
220,
42099,
279,
62,
4749,
13,
198,
220,
220,
220,
220,
220,
13605,
3784,
2860,
62,
4749,
7,
1735,
796,
1735,
6739,
198,
220,
23578,
34,
11159,
13,
198
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
* regenerated at 22.07.2020 06:08:15
FUNCTION-POOL ZFUGR3 MESSAGE-ID SV.
* INCLUDE LZFUGR3D... " Local class definition
INCLUDE LSVIMDAT . "general data decl.
INCLUDE LZFUGR3T00 . "view rel. data dcl.
| [
9,
16935,
515,
379,
2534,
13,
2998,
13,
42334,
9130,
25,
2919,
25,
1314,
198,
42296,
4177,
2849,
12,
16402,
3535,
1168,
37,
7340,
49,
18,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
337,
1546,
4090,
8264,
12,
2389,
20546,
13,
198,
198,
9,
3268,
5097,
52,
7206,
406,
57,
37,
7340,
49,
18,
35,
986,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
10714,
1398,
6770,
198,
220,
3268,
5097,
52,
7206,
30948,
53,
3955,
35,
1404,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
764,
366,
24622,
1366,
2377,
13,
198,
220,
3268,
5097,
52,
7206,
406,
57,
37,
7340,
49,
18,
51,
405,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
764,
366,
1177,
823,
13,
1366,
288,
565,
13,
198
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
* regenerated at 2020.08.06 19:33:13
*******************************************************************
* System-defined Include-files. *
*******************************************************************
INCLUDE LZAFL_CONFIGTOP. " Global Data
INCLUDE LZAFL_CONFIGUXX. " Function Modules
*******************************************************************
* User-defined Include-files (if necessary). *
*******************************************************************
* INCLUDE LZAFL_CONFIGF... " Subroutines
* INCLUDE LZAFL_CONFIGO... " PBO-Modules
* INCLUDE LZAFL_CONFIGI... " PAI-Modules
* INCLUDE LZAFL_CONFIGE... " Events
* INCLUDE LZAFL_CONFIGP... " Local class implement.
* INCLUDE LZAFL_CONFIGT99. " ABAP Unit tests
INCLUDE LZAFL_CONFIGF00 . " subprograms
INCLUDE LZAFL_CONFIGI00 . " PAI modules
INCLUDE LSVIMFXX . " subprograms
INCLUDE LSVIMOXX . " PBO modules
INCLUDE LSVIMIXX . " PAI modules
| [
9,
16935,
515,
379,
12131,
13,
2919,
13,
3312,
678,
25,
2091,
25,
1485,
198,
17174,
17174,
8162,
198,
9,
220,
220,
4482,
12,
23211,
40348,
12,
16624,
13,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1635,
198,
17174,
17174,
8162,
198,
220,
3268,
5097,
52,
7206,
406,
34892,
3697,
62,
10943,
16254,
35222,
13,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
8060,
6060,
198,
220,
3268,
5097,
52,
7206,
406,
34892,
3697,
62,
10943,
16254,
52,
8051,
13,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
15553,
3401,
5028,
198,
198,
17174,
17174,
8162,
198,
9,
220,
220,
11787,
12,
23211,
40348,
12,
16624,
357,
361,
3306,
737,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1635,
198,
17174,
17174,
8162,
198,
9,
3268,
5097,
52,
7206,
406,
34892,
3697,
62,
10943,
16254,
37,
986,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
3834,
81,
448,
1127,
198,
9,
3268,
5097,
52,
7206,
406,
34892,
3697,
62,
10943,
16254,
46,
986,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
350,
8202,
12,
5841,
5028,
198,
9,
3268,
5097,
52,
7206,
406,
34892,
3697,
62,
10943,
16254,
40,
986,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
8147,
40,
12,
5841,
5028,
198,
9,
3268,
5097,
52,
7206,
406,
34892,
3697,
62,
10943,
16254,
36,
986,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
18715,
198,
9,
3268,
5097,
52,
7206,
406,
34892,
3697,
62,
10943,
16254,
47,
986,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
10714,
1398,
3494,
13,
198,
9,
3268,
5097,
52,
7206,
406,
34892,
3697,
62,
10943,
16254,
51,
2079,
13,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
9564,
2969,
11801,
5254,
198,
220,
3268,
5097,
52,
7206,
406,
34892,
3697,
62,
10943,
16254,
37,
405,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
764,
366,
850,
23065,
82,
198,
220,
3268,
5097,
52,
7206,
406,
34892,
3697,
62,
10943,
16254,
40,
405,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
764,
366,
8147,
40,
13103,
198,
220,
3268,
5097,
52,
7206,
30948,
53,
3955,
37,
8051,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
764,
366,
850,
23065,
82,
198,
220,
3268,
5097,
52,
7206,
30948,
53,
3955,
46,
8051,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
764,
366,
350,
8202,
13103,
198,
220,
3268,
5097,
52,
7206,
30948,
53,
3955,
40,
8051,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
764,
366,
8147,
40,
13103,
198
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
INTERFACE zif_yy_data_descriptor PUBLIC.
TYPES: BEGIN OF ty_struct_element_descriptor,
index TYPE i,
element TYPE REF TO zif_yy_data_descriptor,
END OF ty_struct_element_descriptor,
ty_structure_descriptor TYPE SORTED TABLE OF ty_struct_element_descriptor WITH UNIQUE KEY index.
CONSTANTS: co_unnamed_object TYPE string VALUE 'YY'.
METHODS:
get_name RETURNING VALUE(r_name) TYPE string,
get_type RETURNING VALUE(r_type) TYPE REF TO zif_yy_data_element_type.
ENDINTERFACE.
| [
41358,
49836,
1976,
361,
62,
22556,
62,
7890,
62,
20147,
1968,
273,
44731,
13,
628,
220,
24412,
47,
1546,
25,
347,
43312,
3963,
1259,
62,
7249,
62,
30854,
62,
20147,
1968,
273,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6376,
220,
220,
41876,
1312,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5002,
41876,
4526,
37,
5390,
1976,
361,
62,
22556,
62,
7890,
62,
20147,
1968,
273,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
23578,
3963,
1259,
62,
7249,
62,
30854,
62,
20147,
1968,
273,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
1259,
62,
301,
5620,
62,
20147,
1968,
273,
41876,
311,
9863,
1961,
43679,
3963,
1259,
62,
7249,
62,
30854,
62,
20147,
1968,
273,
13315,
4725,
33866,
8924,
35374,
6376,
13,
628,
198,
220,
7102,
2257,
1565,
4694,
25,
763,
62,
403,
13190,
62,
15252,
41876,
4731,
26173,
8924,
705,
26314,
4458,
628,
220,
337,
36252,
50,
25,
198,
220,
220,
220,
651,
62,
3672,
30826,
4261,
15871,
26173,
8924,
7,
81,
62,
3672,
8,
41876,
4731,
11,
198,
220,
220,
220,
651,
62,
4906,
30826,
4261,
15871,
26173,
8924,
7,
81,
62,
4906,
8,
41876,
4526,
37,
5390,
1976,
361,
62,
22556,
62,
7890,
62,
30854,
62,
4906,
13,
198,
198,
10619,
41358,
49836,
13,
198
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
INTERFACE zif_trs_transport_request
PUBLIC .
METHODS:
add_key_to_request IMPORTING i_e071k TYPE e071k RAISING zcx_trs_no_key zcx_trs_wrong_object_type zcx_trs_no_object_type,
delete_key_from_request IMPORTING e071 TYPE e071 RAISING zcx_trs_wrong_object_type.
ENDINTERFACE.
| [
41358,
49836,
1976,
361,
62,
2213,
82,
62,
7645,
634,
62,
25927,
198,
220,
44731,
764,
628,
220,
337,
36252,
50,
25,
198,
220,
220,
220,
751,
62,
2539,
62,
1462,
62,
25927,
30023,
9863,
2751,
1312,
62,
68,
2998,
16,
74,
41876,
304,
2998,
16,
74,
17926,
1797,
2751,
1976,
66,
87,
62,
2213,
82,
62,
3919,
62,
2539,
1976,
66,
87,
62,
2213,
82,
62,
36460,
62,
15252,
62,
4906,
1976,
66,
87,
62,
2213,
82,
62,
3919,
62,
15252,
62,
4906,
11,
198,
220,
220,
220,
12233,
62,
2539,
62,
6738,
62,
25927,
30023,
9863,
2751,
304,
2998,
16,
41876,
304,
2998,
16,
17926,
1797,
2751,
1976,
66,
87,
62,
2213,
82,
62,
36460,
62,
15252,
62,
4906,
13,
198,
198,
10619,
41358,
49836,
13,
198
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
interface ZIF_GTT_STS_EF_TYPES
public .
types TS_CONTROL_DATA type /SAPTRX/CONTROL_DATA .
types:
tt_control_data TYPE STANDARD TABLE OF ts_control_data .
types:
BEGIN OF ts_enh_track_id_data,
key TYPE char33.
INCLUDE TYPE /saptrx/track_id_data.
TYPES: END OF ts_enh_track_id_data .
types:
tt_enh_track_id_data TYPE STANDARD TABLE OF ts_enh_track_id_data .
types TS_TRACK_ID_DATA type /SAPTRX/TRACK_ID_DATA .
types:
tt_track_id_data TYPE STANDARD TABLE OF ts_track_id_data .
types TS_STRUCDATADEF type /SAPTRX/STRUCDATADEF .
types:
tt_strucdatadef TYPE STANDARD TABLE OF ts_strucdatadef .
types TS_EXPEVENTDATA type /SAPTRX/EXP_EVENTS .
types:
tt_expeventdata TYPE STANDARD TABLE OF ts_expeventdata .
types TS_MEASRMNTDATA type /SAPTRX/MEASR_DATA .
types:
tt_measrmntdata TYPE STANDARD TABLE OF ts_measrmntdata .
types TS_INFODATA type /SAPTRX/INFO_DATA .
types:
tt_infodata TYPE STANDARD TABLE OF ts_infodata .
types:
BEGIN OF ts_definition,
maintab TYPE /saptrx/strucdatadef,
mastertab TYPE /saptrx/strucdatadef,
END OF ts_definition .
types:
tt_tracklocation TYPE STANDARD TABLE OF /saptrx/bapi_evm_locationid .
types:
tt_trackingheader TYPE STANDARD TABLE OF /saptrx/bapi_evm_header .
types TV_CONDITION type SY-BINPT .
types:
BEGIN OF ts_stop_points,
stop_id TYPE string,
log_locid TYPE /scmtms/location_id,
seq_num TYPE /scmtms/seq_num,
END OF ts_stop_points .
types:
tt_stop_points TYPE STANDARD TABLE OF ts_stop_points .
endinterface.
| [
39994,
1168,
5064,
62,
38,
15751,
62,
2257,
50,
62,
25425,
62,
9936,
47,
1546,
198,
220,
1171,
764,
628,
198,
220,
3858,
26136,
62,
10943,
5446,
3535,
62,
26947,
2099,
1220,
50,
2969,
5446,
55,
14,
10943,
5446,
3535,
62,
26947,
764,
198,
220,
3858,
25,
198,
220,
220,
220,
256,
83,
62,
13716,
62,
7890,
41876,
49053,
9795,
43679,
3963,
40379,
62,
13716,
62,
7890,
764,
198,
220,
3858,
25,
198,
220,
220,
220,
347,
43312,
3963,
40379,
62,
16550,
62,
11659,
62,
312,
62,
7890,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1994,
41876,
1149,
2091,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3268,
5097,
52,
7206,
41876,
1220,
82,
2373,
40914,
14,
11659,
62,
312,
62,
7890,
13,
198,
220,
24412,
47,
1546,
25,
23578,
3963,
40379,
62,
16550,
62,
11659,
62,
312,
62,
7890,
764,
198,
220,
3858,
25,
198,
220,
220,
220,
256,
83,
62,
16550,
62,
11659,
62,
312,
62,
7890,
41876,
49053,
9795,
43679,
3963,
40379,
62,
16550,
62,
11659,
62,
312,
62,
7890,
764,
198,
220,
3858,
26136,
62,
5446,
8120,
62,
2389,
62,
26947,
2099,
1220,
50,
2969,
5446,
55,
14,
5446,
8120,
62,
2389,
62,
26947,
764,
198,
220,
3858,
25,
198,
220,
220,
220,
256,
83,
62,
11659,
62,
312,
62,
7890,
41876,
49053,
9795,
43679,
3963,
40379,
62,
11659,
62,
312,
62,
7890,
764,
198,
220,
3858,
26136,
62,
18601,
52,
8610,
1404,
19266,
37,
2099,
1220,
50,
2969,
5446,
55,
14,
18601,
52,
8610,
1404,
19266,
37,
764,
198,
220,
3858,
25,
198,
220,
220,
220,
256,
83,
62,
19554,
10210,
265,
671,
69,
41876,
49053,
9795,
43679,
3963,
40379,
62,
19554,
10210,
265,
671,
69,
764,
198,
220,
3858,
26136,
62,
6369,
11401,
53,
3525,
26947,
2099,
1220,
50,
2969,
5446,
55,
14,
49864,
62,
20114,
15365,
764,
198,
220,
3858,
25,
198,
220,
220,
220,
256,
83,
62,
1069,
431,
1151,
7890,
41876,
49053,
9795,
43679,
3963,
40379,
62,
1069,
431,
1151,
7890,
764,
198,
220,
3858,
26136,
62,
11682,
1921,
29138,
11251,
26947,
2099,
1220,
50,
2969,
5446,
55,
14,
11682,
1921,
49,
62,
26947,
764,
198,
220,
3858,
25,
198,
220,
220,
220,
256,
83,
62,
1326,
292,
26224,
429,
7890,
41876,
49053,
9795,
43679,
3963,
40379,
62,
1326,
292,
26224,
429,
7890,
764,
198,
220,
3858,
26136,
62,
1268,
37,
3727,
13563,
2099,
1220,
50,
2969,
5446,
55,
14,
10778,
62,
26947,
764,
198,
220,
3858,
25,
198,
220,
220,
220,
256,
83,
62,
10745,
375,
1045,
41876,
49053,
9795,
43679,
3963,
40379,
62,
10745,
375,
1045,
764,
198,
220,
3858,
25,
198,
220,
220,
220,
347,
43312,
3963,
40379,
62,
46758,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1388,
8658,
220,
220,
41876,
1220,
82,
2373,
40914,
14,
19554,
10210,
265,
671,
69,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4958,
8658,
41876,
1220,
82,
2373,
40914,
14,
19554,
10210,
265,
671,
69,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
23578,
3963,
40379,
62,
46758,
764,
198,
220,
3858,
25,
198,
220,
220,
220,
256,
83,
62,
11659,
24886,
220,
41876,
49053,
9795,
43679,
3963,
1220,
82,
2373,
40914,
14,
65,
15042,
62,
1990,
76,
62,
24886,
312,
764,
198,
220,
3858,
25,
198,
220,
220,
220,
256,
83,
62,
36280,
25677,
41876,
49053,
9795,
43679,
3963,
1220,
82,
2373,
40914,
14,
65,
15042,
62,
1990,
76,
62,
25677,
764,
198,
220,
3858,
3195,
62,
10943,
35,
17941,
2099,
19704,
12,
33,
1268,
11571,
764,
198,
220,
3858,
25,
198,
220,
220,
220,
347,
43312,
3963,
40379,
62,
11338,
62,
13033,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2245,
62,
312,
220,
220,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2604,
62,
17946,
312,
41876,
1220,
1416,
16762,
907,
14,
24886,
62,
312,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
33756,
62,
22510,
220,
220,
41876,
1220,
1416,
16762,
907,
14,
41068,
62,
22510,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
23578,
3963,
40379,
62,
11338,
62,
13033,
764,
198,
220,
3858,
25,
198,
220,
220,
220,
256,
83,
62,
11338,
62,
13033,
41876,
49053,
9795,
43679,
3963,
40379,
62,
11338,
62,
13033,
764,
198,
437,
39994,
13,
198
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
"! <p class="shorttext synchronized" lang="en">Filters for ALV Columns</p>
CLASS zcl_uitb_alv_filters DEFINITION
PUBLIC
INHERITING FROM zcl_uitb_alv_metadata
FINAL
CREATE PUBLIC
GLOBAL FRIENDS zcl_uitb_alv_grid_adapter
zcl_uitb_alv_metadata_util.
PUBLIC SECTION.
INTERFACES zif_uitb_enumerable.
"! <p class="shorttext synchronized" lang="en">Add filter to column</p>
METHODS add_filter
IMPORTING
iv_columnname TYPE lvc_fname
iv_option TYPE ddoption DEFAULT 'EQ'
iv_sign TYPE ddsign DEFAULT 'I'
iv_low TYPE zuitb_generic_range-low OPTIONAL
iv_high TYPE zuitb_generic_range-high OPTIONAL
RETURNING
VALUE(result) TYPE REF TO zcl_uitb_alv_filter
RAISING
zcx_uitb_alv_not_found
zcx_uitb_alv_existing .
"! <p class="shorttext synchronized" lang="en">Delete all filters</p>
METHODS clear .
METHODS refresh.
"! <p class="shorttext synchronized" lang="en">CONSTRUCTOR</p>
METHODS constructor
IMPORTING
ir_columns TYPE REF TO zcl_uitb_alv_columns
ir_controller TYPE REF TO zif_uitb_alv_metadata_ctrller OPTIONAL .
"! <p class="shorttext synchronized" lang="en">Get filter(s) of given column</p>
METHODS get_filter
IMPORTING
iv_columnname TYPE lvc_fname
RETURNING
VALUE(result) TYPE REF TO zcl_uitb_alv_filter
RAISING
zcx_uitb_alv_not_found.
"! <p class="shorttext synchronized" lang="en">Check if there is any filter defined</p>
METHODS is_filter_defined
RETURNING
VALUE(result) TYPE abap_bool.
"! <p class="shorttext synchronized" lang="en">Delete filter from column</p>
METHODS remove_filter
IMPORTING
iv_columnname TYPE lvc_fname .
"! <p class="shorttext synchronized" lang="en">Retrieve filtered row count</p>
METHODS get_filtered_entry_count
RETURNING
VALUE(rv_filtered_entries) TYPE i.
PROTECTED SECTION.
PRIVATE SECTION.
DATA mr_columns TYPE REF TO zcl_uitb_alv_columns.
DATA mt_filters TYPE zif_uitb_alv_types=>tt_alv_filter.
METHODS raise_filter_exists
IMPORTING
iv_method TYPE any OPTIONAL
iv_columnname TYPE any OPTIONAL
RAISING
zcx_uitb_alv_existing.
"! <p class="shorttext synchronized" lang="en">Repair filter settings</p>
METHODS repair .
METHODS raise_filter_not_found
IMPORTING
iv_method TYPE any OPTIONAL
iv_columnname TYPE any OPTIONAL
RAISING
zcx_uitb_alv_not_found.
ENDCLASS.
CLASS zcl_uitb_alv_filters IMPLEMENTATION.
METHOD add_filter .
DATA: ls_filter TYPE zif_uitb_alv_types=>ty_alv_filter.
CHECK iv_columnname IS NOT INITIAL.
TRY.
DATA(lr_column) = mr_columns->get_column( iv_columnname ).
CATCH cx_sy_itab_line_not_found.
RETURN.
ENDTRY.
IF line_exists( mt_filters[ columnname = iv_columnname ] ).
raise_filter_exists(
iv_method = 'ADD_FILTER'
iv_columnname = iv_columnname ).
ENDIF.
ls_filter-columnname = iv_columnname.
ls_filter-filter_ref = NEW zcl_uitb_alv_filter(
ir_column = lr_column
ir_controller = mr_controller
).
mt_filters = VALUE #( BASE mt_filters ( ls_filter ) ).
IF ( iv_option IS NOT INITIAL AND
iv_sign IS NOT INITIAL AND iv_low IS SUPPLIED ).
ls_filter-filter_ref->add_selopt(
iv_sign = iv_sign
iv_option = iv_option
iv_low = iv_low
iv_high = iv_high ).
ENDIF.
result = ls_filter-filter_ref.
CHECK mr_controller IS BOUND.
mr_controller->set_changed(
iv_name = mv_name
ir_ref = me
iv_flavour = zif_uitb_c_alv_chglist_flavor=>setter
iv_refresh_mode = zif_uitb_c_alv_refresh=>full
iv_method = 'ADD' ).
ENDMETHOD.
METHOD clear.
CLEAR mt_filters.
CHECK mr_controller IS BOUND.
mr_controller->set_changed(
iv_name = mv_name
ir_ref = me
iv_flavour = zif_uitb_c_alv_chglist_flavor=>setter
iv_refresh_mode = zif_uitb_c_alv_refresh=>full
iv_method = 'CLEAR' ).
ENDMETHOD.
METHOD constructor.
super->constructor(
io_controller = ir_controller
iv_name = 'FILTERS' ).
mr_columns = ir_columns.
ENDMETHOD.
METHOD get_filter .
ASSIGN mt_filters[ columnname = iv_columnname ] TO FIELD-SYMBOL(<ls_filter>).
IF sy-subrc = 0.
result = <ls_filter>-filter_ref.
ELSE.
raise_filter_not_found(
iv_method = 'GET_FILTER'
iv_columnname = iv_columnname ).
ENDIF.
ENDMETHOD.
METHOD is_filter_defined.
result = xsdbool( mt_filters IS NOT INITIAL ).
ENDMETHOD.
METHOD raise_filter_exists .
DATA(lv_class) = CAST cl_abap_classdescr( cl_abap_typedescr=>describe_by_object_ref( me ) )->absolute_name.
RAISE EXCEPTION TYPE zcx_uitb_alv_existing
EXPORTING
msgv1 = 'Filter'
msgv2 = |{ iv_columnname }|
msgv3 = |{ lv_class }|
msgv4 = |{ iv_method }|.
ENDMETHOD.
METHOD raise_filter_not_found .
DATA(lv_class) = CAST cl_abap_classdescr( cl_abap_typedescr=>describe_by_object_ref( me ) )->absolute_name.
RAISE EXCEPTION TYPE zcx_uitb_alv_not_found
EXPORTING
msgv1 = 'Filter'
msgv2 = |{ iv_columnname }|
msgv3 = |{ lv_class }|
msgv4 = |{ iv_method }|.
ENDMETHOD.
METHOD remove_filter .
DELETE mt_filters WHERE columnname = iv_columnname.
CHECK mr_controller IS BOUND.
mr_controller->set_changed(
iv_name = mv_name
ir_ref = me
iv_flavour = zif_uitb_c_alv_chglist_flavor=>setter
iv_refresh_mode = zif_uitb_c_alv_refresh=>full
iv_method = 'REMOVE' ).
ENDMETHOD.
METHOD repair.
" repair filters
DATA(lt_filter) = mt_filters.
CLEAR mt_filters.
LOOP AT lt_filter ASSIGNING FIELD-SYMBOL(<ls_filter>).
DATA(lt_selopt) = <ls_filter>-filter_ref->get( ).
LOOP AT lt_selopt ASSIGNING FIELD-SYMBOL(<ls_selopt>).
TRY.
add_filter(
iv_columnname = <ls_filter>-columnname
iv_sign = <ls_selopt>-sign
iv_option = <ls_selopt>-option
iv_low = <ls_selopt>-low
iv_high = <ls_selopt>-high ).
CATCH zcx_uitb_alv_existing
zcx_uitb_alv_not_found.
ENDTRY.
ENDLOOP.
ENDLOOP.
ENDMETHOD.
METHOD zif_uitb_enumerable~get_element.
TRY.
rr_element = mt_filters[ iv_index ]-filter_ref.
CATCH cx_sy_itab_line_not_found.
RAISE EXCEPTION TYPE zcx_uitb_element_not_found
EXPORTING
index = iv_index.
ENDTRY.
ENDMETHOD.
METHOD zif_uitb_enumerable~get_enumerator.
rr_enumerator = zcl_uitb_enumerator=>create( me ).
ENDMETHOD.
METHOD zif_uitb_enumerable~size.
rv_size = lines( mt_filters ).
ENDMETHOD.
METHOD refresh.
mr_controller->set_changed(
iv_name = mv_name
ir_ref = me
iv_flavour = zif_uitb_c_alv_chglist_flavor=>setter
iv_refresh_mode = zif_uitb_c_alv_refresh=>full
iv_method = 'REFRESH' ).
ENDMETHOD.
METHOD get_filtered_entry_count.
TRY.
DATA(lo_adapter) = CAST zcl_uitb_alv_controller( mr_controller )->mo_adapter.
CHECK lo_adapter IS BOUND.
DATA(lo_alv) = lo_adapter->get_grid( ).
CHECK lo_alv IS BOUND.
lo_alv->get_filtered_entries( IMPORTING et_filtered_entries = DATA(lt_filtered_entries) ).
rv_filtered_entries = lines( lt_filtered_entries ).
CATCH cx_sy_move_cast_error.
ENDTRY.
ENDMETHOD.
ENDCLASS.
| [
40484,
1279,
79,
1398,
2625,
19509,
5239,
47192,
1,
42392,
2625,
268,
5320,
11928,
1010,
329,
8355,
53,
29201,
82,
3556,
79,
29,
198,
31631,
1976,
565,
62,
5013,
65,
62,
282,
85,
62,
10379,
1010,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
3268,
16879,
2043,
2751,
16034,
1976,
565,
62,
5013,
65,
62,
282,
85,
62,
38993,
198,
220,
25261,
198,
220,
29244,
6158,
44731,
628,
220,
10188,
9864,
1847,
48167,
1677,
5258,
1976,
565,
62,
5013,
65,
62,
282,
85,
62,
25928,
62,
324,
3429,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1976,
565,
62,
5013,
65,
62,
282,
85,
62,
38993,
62,
22602,
13,
628,
220,
44731,
44513,
13,
198,
220,
220,
220,
23255,
37,
2246,
1546,
1976,
361,
62,
5013,
65,
62,
268,
30831,
13,
198,
220,
220,
220,
366,
0,
1279,
79,
1398,
2625,
19509,
5239,
47192,
1,
42392,
2625,
268,
5320,
4550,
8106,
284,
5721,
3556,
79,
29,
198,
220,
220,
220,
337,
36252,
50,
751,
62,
24455,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
28665,
3672,
41876,
300,
28435,
62,
69,
3672,
198,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
18076,
220,
220,
220,
220,
41876,
49427,
18076,
5550,
38865,
705,
36,
48,
6,
198,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
12683,
220,
220,
220,
220,
220,
220,
41876,
288,
9310,
570,
5550,
38865,
705,
40,
6,
198,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
9319,
220,
220,
220,
220,
220,
220,
220,
41876,
1976,
5013,
65,
62,
41357,
62,
9521,
12,
9319,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
8929,
220,
220,
220,
220,
220,
220,
41876,
1976,
5013,
65,
62,
41357,
62,
9521,
12,
8929,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
20274,
8,
41876,
4526,
37,
5390,
1976,
565,
62,
5013,
65,
62,
282,
85,
62,
24455,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
5013,
65,
62,
282,
85,
62,
1662,
62,
9275,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
5013,
65,
62,
282,
85,
62,
25687,
764,
198,
220,
220,
220,
366,
0,
1279,
79,
1398,
2625,
19509,
5239,
47192,
1,
42392,
2625,
268,
5320,
38727,
477,
16628,
3556,
79,
29,
198,
220,
220,
220,
337,
36252,
50,
1598,
764,
198,
220,
220,
220,
337,
36252,
50,
14976,
13,
198,
220,
220,
220,
366,
0,
1279,
79,
1398,
2625,
19509,
5239,
47192,
1,
42392,
2625,
268,
5320,
10943,
46126,
1581,
3556,
79,
29,
198,
220,
220,
220,
337,
36252,
50,
23772,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
4173,
62,
28665,
82,
220,
220,
220,
41876,
4526,
37,
5390,
1976,
565,
62,
5013,
65,
62,
282,
85,
62,
28665,
82,
198,
220,
220,
220,
220,
220,
220,
220,
4173,
62,
36500,
41876,
4526,
37,
5390,
1976,
361,
62,
5013,
65,
62,
282,
85,
62,
38993,
62,
24087,
6051,
39852,
2849,
1847,
764,
628,
220,
220,
220,
366,
0,
1279,
79,
1398,
2625,
19509,
5239,
47192,
1,
42392,
2625,
268,
5320,
3855,
8106,
7,
82,
8,
286,
1813,
5721,
3556,
79,
29,
198,
220,
220,
220,
337,
36252,
50,
651,
62,
24455,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
28665,
3672,
41876,
300,
28435,
62,
69,
3672,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
20274,
8,
41876,
4526,
37,
5390,
1976,
565,
62,
5013,
65,
62,
282,
85,
62,
24455,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
5013,
65,
62,
282,
85,
62,
1662,
62,
9275,
13,
198,
220,
220,
220,
366,
0,
1279,
79,
1398,
2625,
19509,
5239,
47192,
1,
42392,
2625,
268,
5320,
9787,
611,
612,
318,
597,
8106,
5447,
3556,
79,
29,
198,
220,
220,
220,
337,
36252,
50,
318,
62,
24455,
62,
23211,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
20274,
8,
41876,
450,
499,
62,
30388,
13,
198,
220,
220,
220,
366,
0,
1279,
79,
1398,
2625,
19509,
5239,
47192,
1,
42392,
2625,
268,
5320,
38727,
8106,
422,
5721,
3556,
79,
29,
198,
220,
220,
220,
337,
36252,
50,
4781,
62,
24455,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
28665,
3672,
41876,
300,
28435,
62,
69,
3672,
764,
198,
220,
220,
220,
366,
0,
1279,
79,
1398,
2625,
19509,
5239,
47192,
1,
42392,
2625,
268,
5320,
9781,
30227,
29083,
5752,
954,
3556,
79,
29,
198,
220,
220,
220,
337,
36252,
50,
651,
62,
10379,
4400,
62,
13000,
62,
9127,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
81,
85,
62,
10379,
4400,
62,
298,
1678,
8,
41876,
1312,
13,
198,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
4810,
3824,
6158,
44513,
13,
628,
220,
220,
220,
42865,
285,
81,
62,
28665,
82,
41876,
4526,
37,
5390,
1976,
565,
62,
5013,
65,
62,
282,
85,
62,
28665,
82,
13,
198,
220,
220,
220,
42865,
45079,
62,
10379,
1010,
41876,
1976,
361,
62,
5013,
65,
62,
282,
85,
62,
19199,
14804,
926,
62,
282,
85,
62,
24455,
13,
628,
220,
220,
220,
337,
36252,
50,
5298,
62,
24455,
62,
1069,
1023,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
24396,
220,
220,
220,
220,
41876,
597,
39852,
2849,
1847,
198,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
28665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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS zcl_abapgit_environment DEFINITION
PUBLIC
FINAL
CREATE PRIVATE
GLOBAL FRIENDS zcl_abapgit_factory .
PUBLIC SECTION.
INTERFACES zif_abapgit_environment .
PROTECTED SECTION.
PRIVATE SECTION.
DATA mv_cloud TYPE abap_bool VALUE abap_undefined ##NO_TEXT.
DATA mv_is_merged TYPE abap_bool VALUE abap_undefined ##NO_TEXT.
DATA mv_client_modifiable TYPE abap_bool VALUE abap_undefined ##NO_TEXT.
ENDCLASS.
CLASS ZCL_ABAPGIT_ENVIRONMENT IMPLEMENTATION.
METHOD zif_abapgit_environment~compare_with_inactive.
rv_result = zif_abapgit_environment~is_sap_cloud_platform( ).
ENDMETHOD.
METHOD zif_abapgit_environment~is_merged.
DATA lr_marker TYPE REF TO data ##NEEDED.
IF mv_is_merged = abap_undefined.
TRY.
CREATE DATA lr_marker TYPE REF TO ('LIF_ABAPMERGE_MARKER').
"No exception --> marker found
mv_is_merged = abap_true.
CATCH cx_sy_create_data_error.
mv_is_merged = abap_false.
ENDTRY.
ENDIF.
rv_result = mv_is_merged.
ENDMETHOD.
METHOD zif_abapgit_environment~is_repo_object_changes_allowed.
DATA lv_ind TYPE t000-ccnocliind.
IF mv_client_modifiable = abap_undefined.
SELECT SINGLE ccnocliind FROM t000 INTO lv_ind
WHERE mandt = sy-mandt.
IF sy-subrc = 0
AND ( lv_ind = ' ' OR lv_ind = '1' ). "check changes allowed
mv_client_modifiable = abap_true.
ELSE.
mv_client_modifiable = abap_false.
ENDIF.
ENDIF.
rv_result = mv_client_modifiable.
ENDMETHOD.
METHOD zif_abapgit_environment~is_restart_required.
" This method will be used in the context of SAP Cloud Platform:
" Pull/Push operations are executed in background jobs.
" In case of the respective application server needs to be restarted,
" it is required to terminae the background job and reschedule again.
rv_result = abap_false.
TRY.
CALL METHOD ('CL_APJ_SCP_TOOLS')=>('IS_RESTART_REQUIRED')
RECEIVING
restart_required = rv_result.
CATCH cx_sy_dyn_call_illegal_method cx_sy_dyn_call_illegal_class.
rv_result = abap_false.
ENDTRY.
ENDMETHOD.
METHOD zif_abapgit_environment~is_sap_cloud_platform.
IF mv_cloud = abap_undefined.
TRY.
CALL METHOD ('CL_COS_UTILITIES')=>('IS_SAP_CLOUD_PLATFORM')
RECEIVING
rv_is_sap_cloud_platform = mv_cloud.
CATCH cx_sy_dyn_call_illegal_method.
mv_cloud = abap_false.
ENDTRY.
ENDIF.
rv_result = mv_cloud.
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
397,
499,
18300,
62,
38986,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
25261,
198,
220,
29244,
6158,
4810,
3824,
6158,
198,
220,
10188,
9864,
1847,
48167,
1677,
5258,
1976,
565,
62,
397,
499,
18300,
62,
69,
9548,
764,
628,
220,
44731,
44513,
13,
628,
220,
220,
220,
23255,
37,
2246,
1546,
1976,
361,
62,
397,
499,
18300,
62,
38986,
764,
198,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
4810,
3824,
6158,
44513,
13,
198,
220,
220,
220,
42865,
285,
85,
62,
17721,
41876,
450,
499,
62,
30388,
26173,
8924,
450,
499,
62,
917,
18156,
22492,
15285,
62,
32541,
13,
198,
220,
220,
220,
42865,
285,
85,
62,
271,
62,
647,
2004,
41876,
450,
499,
62,
30388,
26173,
8924,
450,
499,
62,
917,
18156,
22492,
15285,
62,
32541,
13,
198,
220,
220,
220,
42865,
285,
85,
62,
16366,
62,
4666,
16823,
41876,
450,
499,
62,
30388,
26173,
8924,
450,
499,
62,
917,
18156,
22492,
15285,
62,
32541,
13,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1168,
5097,
62,
6242,
2969,
38,
2043,
62,
1677,
53,
4663,
1340,
10979,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
1976,
361,
62,
397,
499,
18300,
62,
38986,
93,
5589,
533,
62,
4480,
62,
259,
5275,
13,
198,
220,
220,
220,
374,
85,
62,
20274,
796,
1976,
361,
62,
397,
499,
18300,
62,
38986,
93,
271,
62,
82,
499,
62,
17721,
62,
24254,
7,
6739,
198,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
1976,
361,
62,
397,
499,
18300,
62,
38986,
93,
271,
62,
647,
2004,
13,
198,
220,
220,
220,
42865,
300,
81,
62,
4102,
263,
41876,
4526,
37,
5390,
1366,
22492,
12161,
1961,
1961,
13,
628,
220,
220,
220,
16876,
285,
85,
62,
271,
62,
647,
2004,
796,
450,
499,
62,
917,
18156,
13,
198,
220,
220,
220,
220,
220,
7579,
56,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
29244,
6158,
42865,
300,
81,
62,
4102,
263,
41876,
4526,
37,
5390,
19203,
43,
5064,
62,
6242,
2969,
29296,
8264,
62,
44,
14175,
1137,
27691,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
2949,
6631,
14610,
18364,
1043,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
285,
85,
62,
271,
62,
647,
2004,
796,
450,
499,
62,
7942,
13,
628,
220,
220,
220,
220,
220,
220,
220,
327,
11417,
43213,
62,
1837,
62,
17953,
62,
7890,
62,
18224,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
285,
85,
62,
271,
62,
647,
2004,
796,
450,
499,
62,
9562,
13,
198,
220,
220,
220,
220,
220,
23578,
40405,
13,
198,
220,
220,
220,
23578,
5064,
13,
198,
220,
220,
220,
374,
85,
62,
20274,
796,
285,
85,
62,
271,
62,
647,
2004,
13,
198,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
1976,
361,
62,
397,
499,
18300,
62,
38986,
93,
271,
62,
260,
7501,
62,
15252,
62,
36653,
62,
40845,
13,
198,
220,
220,
220,
42865,
300,
85,
62,
521,
41876,
256,
830,
12,
535,
77,
420,
4528,
521,
13,
628,
220,
220,
220,
16876,
285,
85,
62,
16366,
62,
4666,
16823,
796,
450,
499,
62,
917,
18156,
13,
198,
220,
220,
220,
220,
220,
33493,
311,
2751,
2538,
269,
31522,
420,
4528,
521,
16034,
256,
830,
39319,
300,
85,
62,
521,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
33411,
6855,
83,
796,
827,
12,
22249,
83,
13,
198,
220,
220,
220,
220,
220,
16876,
827,
12,
7266,
6015,
796,
657,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5357,
357,
300,
85,
62,
521,
796,
705,
705,
6375,
300,
85,
62,
521,
796,
705,
16,
6,
6739,
366,
9122,
2458,
3142,
198,
220,
220,
220,
220,
220,
220,
220,
285,
85,
62,
16366,
62,
4666,
16823,
796,
450,
499,
62,
7942,
13,
198,
220,
220,
220,
220,
220,
17852,
5188,
13,
198,
220,
220,
220,
220,
220,
220,
220,
285,
85,
62,
16366,
62,
4666,
16823,
796,
450,
499,
62,
9562,
13,
198,
220,
220,
220,
220,
220,
23578,
5064,
13,
198,
220,
220,
220,
23578,
5064,
13,
198,
220,
220,
220,
374,
85,
62,
20274,
796,
285,
85,
62,
16366,
62,
4666,
16823,
13,
198,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
1976,
361,
62,
397,
499,
18300,
62,
38986,
93,
271,
62,
2118,
433,
62,
35827,
13,
198,
220,
220,
220,
366,
770,
2446,
481,
307,
973,
287,
262,
4732,
286,
48323,
10130,
19193,
25,
198,
220,
220,
220,
366,
21429,
14,
49222,
4560,
389,
10945,
287,
4469,
3946,
13,
198,
220,
220,
220,
366,
554,
1339,
286,
262,
11756,
3586,
4382,
2476,
284,
307,
15765,
276,
11,
198,
220,
220,
220,
366,
340,
318,
2672,
284,
5651,
3609,
262,
4469,
1693,
290,
581,
2395,
5950,
757,
13,
198,
220,
220,
220,
374,
85,
62,
20274,
796,
450,
499,
62,
9562,
13,
198,
220,
220,
220,
7579,
56,
13,
198,
220,
220,
220,
220,
220,
220,
220,
42815,
337,
36252,
19203,
5097,
62,
2969,
41,
62,
48956,
62,
10468,
3535,
50,
11537,
14804,
10786,
1797,
62,
49,
6465,
7227,
62,
2200,
10917,
37819,
11537,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
19644,
36,
3824,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
15765,
62,
35827,
796,
374,
85,
62,
20274,
13,
198,
220,
220,
220,
220,
220,
327,
11417,
43213,
62,
1837,
62,
67,
2047,
62,
13345,
62,
47749,
62,
24396,
43213,
62,
1837,
62,
67,
2047,
62,
13345,
62,
47749,
62,
4871,
13,
198,
220,
220,
220,
220,
220,
220,
220,
374,
85,
62,
20274,
796,
450,
499,
62,
9562,
13,
198,
220,
220,
220,
23578,
40405,
13,
198,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
1976,
361,
62,
397,
499,
18300,
62,
38986,
93,
271,
62,
82,
499,
62,
17721,
62,
24254,
13,
198,
220,
220,
220,
16876,
285,
85,
62,
17721,
796,
450,
499,
62,
917,
18156,
13,
198,
220,
220,
220,
220,
220,
7579,
56,
13,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
42815,
337,
36252,
19203,
5097,
62,
34,
2640,
62,
3843,
4146
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
class zcl_rulerunner definition
public
create public .
public section.
* types:
types: tyv_version type c length 15,
tyt_version type table of tyv_version.
types: tyv_delta_mode type c length 1.
types: tyv_bw_upd_mode type c length 2.
types: tyv_bw_request type c length 30.
types: tyv_package_size type n length 6.
types: tyt_rulerun_events type standard table of zrulerun_events.
types tyv_selection_mode type c length 2.
types:
tyt_zrulerun_events type standard table of zrulerun_events .
types tyv_application_name type fdt_application_name .
types tyv_function_name type fdt_function_name .
types:
begin of tys_function_list,
application_name type tyv_application_name,
function_name type tyv_function_name,
function_id type zrulerun_functionid,
end of tys_function_list .
types:
tyth_function_list type hashed table of tys_function_list
with unique key application_name function_name .
types:
* begin of tys_resultgroups,
* resultgroup type zrulerun_resultgroup,
* end of tys_resultgroups,
tys_resultgroups type zrulerun_resultgroups_s,
tyts_resultgroups type zrulerun_resultgroups_t.
* tyts_resultgroups type sorted table of tys_resultgroups
* with non-unique key resultgroup."non-unique avoids errors when inserting duplicates
types:
begin of tys_event_id.
include type zrulerun_event_datasource_s .
* eventid type zrulerun_evtid,
* function_id type zrulerun_functionid,
types: end of tys_event_id .
types:
tyt_event_id type standard table of tys_event_id,
tyth_event_id type hashed table of tys_event_id
with unique key eventid .
* Range-Tables
types:
* tyt_range_functionid type range of zrulerun_functionid ,
tyt_range_resultgroups type range of zrulerun_resultgroup.
types:
tyt_range_event_id type range of zrulerun_evtid .
types:
tyt_range_event_types type range of zrulerun_evtyp .
types:
tyt_range_timestamp type range of zrulerun_timestamp_cre .
types:
begin of tys_event_buffer_compare,
eventtype type zrulerun_evtyp,
tst_created type zrulerun_timestamp_cre,
tst_planned type zrulerun_timestamp_pla,
tst_processed type zrulerun_timestamp_pro,
parahash type zrulerun_parahash,
end of tys_event_buffer_compare .
types:
begin of tys_event_buffer,
hashvalue type zrulerun_parahash,
end of tys_event_buffer .
types:
tyt_event_buffer type hashed table of tys_event_buffer
with unique key hashvalue .
types:tyts_processing_log type sorted table of zrulerun_plog
with non-unique key eventid resultgroup,
tyt_processing_log type standard table of zrulerun_plog,
tys_processing_log type zrulerun_plog.
types tys_components type abap_componentdescr .
types tys_fieldmapping type zrulerun_fieldmapping_s .
types tyv_type_kind type abap_typecategory .
types tyt_messages type standard table of smesg.
types: begin of tys_events_key,
client type mandt,
eventid type zrulerun_evtid,
end of tys_events_key,
begin of tys_eventlog_key,
client type mandt,
eventid type zrulerun_evtid,
resultgroup type zrulerun_resultgroup,
functionid type zrulerun_functionid,
end of tys_eventlog_key.
types:
begin of tys_components_extended.
include type abap_componentdescr.
types: subname type string,
end of tys_components_extended .
types tyt_components type abap_component_tab .
types:
tyt_components_extended type standard table of tys_components_extended .
* types:
* begin of tys_fieldmapping ,
* "prefix T: Target-Fields
* t_parent_type type TYV_TYPE_KIND,
* t_name type string,
* t_absolute_name type abap_abstypename,
* t_type_kind type abap_typekind,
* t_length type i,
* t_decimals type i,
* t_output_length type i,
* t_help_id type abap_helpid,
* t_dit_mask type abap_editmask,
* t_position type i, "in target structure
* "prefix S: source-Fields
* s_parent_type TYPE TYV_TYPE_KIND,
* s_name type string,
* s_absolute_name type abap_abstypename,
* s_type_kind type abap_typekind,
* s_length type i,
* s_decimals type i,
* s_output_length type i,
* s_help_id type abap_helpid,
* s_edit_mask type abap_editmask,
* s_position type i, "in source structure
* end of tys_fieldmapping .
types tyt_fieldmapping type zrulerun_fieldmapping_t .
* types:
* begin of tys_context_list,
* id type if_fdt_types=>id,
* name type if_fdt_types=>name,
* data_object_type type if_fdt_types=>data_object_type,
* end of tys_context_list .
* types:
* tyt_context_list type standard table of tys_context_list .
class-data gv_timestamp type zrulerun_timestamp_cre .
class-data gt_meta_eventtype type zrulerun_event_meta_t .
constants const_delta_mode_delta type tyv_delta_mode value 'D'.
constants const_delta_mode_init type tyv_delta_mode value 'C'.
constants const_delta_mode_full type tyv_delta_mode value 'F'.
* constants const_rulerun_brf_function_id type zrulerun_functionid value '02E05A2E017C1EE891DE98788B7D8547' ##NO_TEXT.
constants const_rulerun_brf_functionname type tyv_function_name value 'GET_EVENTTYPE_METADATA' ##NO_TEXT.
constants const_rulerun_brf_applicatname type tyv_application_name value 'RULERUNNER' ##NO_TEXT.
* constants const_rulerun_brf_context_id type zrulerun_functionid value '02E05A2E017C1EE892A5943086BD7DCC' ##NO_TEXT.
constants const_rulerun_brf_context_name type zrulerun_functionid value 'GT_RULERUNNER_CONTEXT' ##NO_TEXT.
class-data gt_event_buffer type tyt_event_buffer .
class-data gv_packetising_is_active type abap_bool.
constants const_bw_simulation_request type rsrequest value 'DTPR_SIMULATION' ##NO_TEXT.
constants const_event_table_json_length type i value 2000.
class-data gt_function_list_buffer type tyth_function_list .
class-data gv_debug_mode type abap_bool .
constants const_db_eventid_package_size type i value 1000 ##NO_TEXT.
class-data gv_db_cursor_events type i.
* dataMover-start
class-data gt_datamover_meta type zrulerun_datamover_meta_t.
* dataMover-end
class-methods class_constructor .
"! Adds an event to the rulerunner Event-table<br/>
"! If parameter iv_suppress_exceptions is set to 'X' no exceptions will be thrown<br/>
"! Exceptions might be thrown in case the list of parameters is to large<br/>
class-methods add_event
importing
!iv_event_type type zrulerun_evtyp
!iv_suppress_exceptions type abap_bool
!it_parameters type zrulerun_key_value_t optional
!iv_parameter_1_key type any optional
!iv_parameter_1_value type any optional
!iv_parameter_2_key type any optional
!iv_parameter_2_value type any optional
!iv_parameter_3_key type any optional
!iv_parameter_3_value type any optional
!iv_planned_execution_timestamp type zrulerun_timestamp_pla optional
!iv_bw_dtp_request type tyv_bw_request optional
!iv_bw_dtp_delta_mode type tyv_bw_upd_mode optional
exporting
!ev_returncode type syst-subrc
!es_event_data type zrulerun_events_extended_s
raising zcx_rulerunner
.
* class-methods PROCESS_MULTIPLE_EVENTIDS
* importing
* !IT_EVENT_ID type TYT_EVENT_ID
* !IT_BRF_FUNCTION_LIST type TYTH_FUNCTION_LIST optional
* !IV_UPDATE_TIMESTAMPS type ABAP_BOOL default 'X'
* exporting
* !EO_RESULT_DATA type ANY .
class-methods process_event_directly
importing
!iv_event_type type zrulerun_evtyp
!it_parameters type zrulerun_key_value_t optional
!iv_parameter_1_key type any optional
!iv_parameter_1_value type any optional
!iv_parameter_2_key type any optional
!iv_parameter_2_value type any optional
!iv_parameter_3_key type any optional
!iv_parameter_3_value type any optional
* !iv_brf_application_name type tyv_application_name optional
* !iv_brf_function_name type tyv_function_name optional
!iv_resultgroup type zrulerun_resultgroup optional
!it_resultgroups type tyts_resultgroups optional
exporting
!ev_returncode type syst-subrc
!eo_result_data type any
raising zcx_rulerunner.
class-methods set_debug_mode
importing
!iv_debug_mode type abap_bool .
class-methods process_stored_events
importing
!iv_package_size type tyv_package_size
!iv_run_packetised type abap_bool
!iv_timestamp_planned_from type zrulerun_timestamp_pla
!iv_timestamp_planned_to type zrulerun_timestamp_pla
* !iv_timestamp_created_from type zrulerun_timestamp_cre
* !iv_timestamp_created_to type zrulerun_timestamp_cre
!iv_event_type type zrulerun_evtyp
!it_event_type_range type tyt_range_event_types optional
* !iv_select_processed_events type abap_bool "done in process_multiple_eventids()
* !iv_brf_application_name1 type tyv_application_name optional
* !iv_brf_function_name1 type tyv_function_name optional
* !iv_brf_application_name2 type tyv_application_name optional
* !iv_brf_function_name2 type tyv_function_name optional
* !iv_brf_application_name3 type tyv_application_name optional
* !iv_brf_function_name3 type tyv_function_name optional
!iv_resultgroup type zrulerun_resultgroup optional
!it_resultgroups type tyts_resultgroups optional
iv_update_processing_log type abap_bool
iv_repeat_processing type abap_bool "already processed events are repeated
iv_update_delta_timestamp type abap_bool
iv_delta_mode type tyv_delta_mode
iv_test_mode type abap_bool
exporting
!et_event_id type tyt_event_id
!eo_result_data type any
!ev_no_more_data type abap_bool
raising zcx_rulerunner.
class-methods process_multiple_eventids
importing
* !it_event_id type tyt_event_id
it_table_with_eventid type any table
* !it_brf_function_list type tyth_function_list optional
iv_update_processing_log type abap_bool default 'X'
iv_repeat_processing type abap_bool
iv_package_size type i
* !iv_brf_application_name1 type tyv_application_name optional
* !iv_brf_function_name1 type tyv_function_name optional
* !iv_brf_application_name2 type tyv_application_name optional
* !iv_brf_function_name2 type tyv_function_name optional
* !iv_brf_application_name3 type tyv_application_name optional
* !iv_brf_function_name3 type tyv_function_name optional
iv_resultgroup type zrulerun_resultgroup optional
it_resultgroups type tyts_resultgroups optional
exporting
eo_result_data type any
* changing
* ct_brf_function_list type tyth_function_list optional
raising zcx_rulerunner.
class-methods check_debug_mode .
class-methods show_rulerunner_customizing
importing
iv_brf_component_id type zrulerun_functionid optional
raising zcx_rulerunner.
class-methods move_data_source_to_target
importing
io_source_data type any
exporting
eo_target_data type any
raising zcx_rulerunner.
class-methods select_for_all_entries_in
importing
iv_select_from_table_name type any
it_for_all_entries_table type any table
iv_for_all_entries_tablename type any
iv_where_field_1_db type any
iv_where_field_1_for_all type any
iv_where_field_2_db type any optional
iv_where_field_2_for_all type any optional
iv_where_field_3_db type any optional
iv_where_field_3_for_all type any optional
iv_where_field_4_db type any optional
iv_where_field_4_for_all type any optional
iv_where_field_5_db type any optional
iv_where_field_5_for_all type any optional
exporting
et_result_data type any table
raising zcx_rulerunner.
class-methods get_rulerunner_version
exporting
et_versions type tyt_version
raising zcx_rulerunner
.
"!<p> Deletes records from Event and Event-Log tables</p>
class-methods delete_events
importing
* iv_database_deletion type abap_bool
iv_delete_unprocessed_events type abap_bool
iv_delete_future_events type abap_bool
iv_test_mode type abap_bool default 'X'
it_range_event_id type tyt_range_event_id
it_range_resultgroups type tyt_range_resultgroups
it_range_event_types type tyt_range_event_types
it_range_timestamp_created type tyt_range_timestamp
iv_timestamp_planned_max type zrulerun_timestamp_pla
it_range_timestamp_processed type tyt_range_timestamp
iv_display_messages type abap_bool default 'X'
exporting
et_messages type tyt_messages
raising zcx_rulerunner
.
protected section.
class-methods create_context_list
importing
!iv_function_id type zrulerun_functionid
exporting
!et_context_list type zrulerun_context_list_ref_t .
class-methods process_single_event
importing
* !iv_resultgroup type zrulerun_resultgroup optional
!it_resultgroups type tyts_resultgroups
* !it_brf_function_id type tyt_range_functionid optional
exporting
!ev_returncode type syst-subrc
!eo_target_data type any
changing
!cs_event_id_data type zrulerun_events_extended_s
!ct_processing_log type tyt_processing_log
* !ct_brf_function_list type tyth_function_list.
.
class-methods get_type_description
importing
!ir_dataref type ref to data
exporting
!ev_absolut_name type zrulerun_abs_name
!et_components type tyt_components_extended
!ev_type_kind type tyv_type_kind .
class-methods set_timestamp .
class-methods check_brf_function_list
changing ct_brf_function_list type tyth_function_list.
class-methods create_metadata_eventtype
importing
* !it_brf_function_list type tyth_function_list
!iv_event_type type zrulerun_evtyp
!ir_target_data type ref to data
!it_resultgroups type tyts_resultgroups
exporting
!ev_returncode type syst-subrc
!es_meta_eventtype type zrulerun_event_meta_s
* changing
* !ct_brf_function_list type tyth_function_list
.
class-methods create_fieldmapping
importing
!ir_source_data type ref to data
!ir_target_data type ref to data
exporting
!et_fieldmapping type tyt_fieldmapping
!ev_type_kind_source type tyv_type_kind
!ev_type_kind_target type tyv_type_kind
!er_source_struc type ref to data
!er_target_struc type ref to data .
class-methods get_metadata_eventtype
importing
* !it_brf_function_list type tyth_function_list
!iv_event_type type zrulerun_evtyp
!ir_target_data type ref to data
* !iv_resultgroup type zrulerun_resultgroup optional
!it_resultgroups type tyts_resultgroups
exporting
!ev_returncode type syst-subrc
* !ES_META_EVENTTYPE type ZRULERUN_EVENT_META_S
!er_meta_eventtype type ref to zrulerun_event_meta_s
* changing
* !ct_brf_function_list type tyth_function_list
.
class-methods move_data_source_to_target_int
importing
!io_source_data type any
!iv_type_kind_source type tyv_type_kind
!iv_type_kind_target type tyv_type_kind
!ir_source_struc type ref to data
!ir_target_struc type ref to data
changing
!ct_fieldmapping type tyt_fieldmapping
!co_target_data type any .
class-methods update_processing_log
importing
it_event_data type tyt_zrulerun_events
* it_functionid_range type tyt_range_functionid
it_resultgroups type tyts_resultgroups
it_processing_log type tyt_processing_log
exporting
ev_returncode type sy-subrc .
"! Method process_multiple_eventids_int
"! processes a list of rulerunner event id's <br/>
"! These events must have been created before using zcl_rulerunner=>add_event()
"!<br/>
"! @parameter it_table_with_eventid | Any table that contains field EVENTID
"! @parameter it_resultgroups |
"! @parameter iv_update_timestamps |
"! @parameter iv_repeat_processing |
"! @parameter iv_package_size |
"! @parameter eo_result_data |
class-methods process_multiple_eventids_int
importing
* !it_event_id type tyt_event_id
it_table_with_eventid type any table
it_resultgroups type tyts_resultgroups
* !it_brf_function_list type tyth_function_list optional
iv_update_processing_log type abap_bool default 'X'
iv_repeat_processing type abap_bool
iv_package_size type i
exporting
eo_result_data type any
* et_processed_events type tyth_event_id
* changing
* ct_brf_function_list type tyth_function_list optional
.
class-methods create_brf_functionid_range.
* importing
* it_brf_function_list type tyth_function_list
* exporting
* et_brf_functionid_range type tyt_range_functionid.
class-methods create_eventid_table
importing
it_any_table type any table
exporting
et_event_id type tyt_event_id.
class-methods create_resultgroup_range
importing
it_resultgroups type tyts_resultgroups
exporting
et_range_resultgroups type tyt_range_resultgroups.
class-methods remove_already_processed_event
importing
it_resultgroups type tyts_resultgroups
changing
ct_event_data type tyt_zrulerun_events .
class-methods update_delta_timestamp
importing
iv_eventtype type zrulerun_evtyp
it_resultgroups type tyts_resultgroups
iv_timestamp_planned type zrulerun_timestamp_pla.
class-methods get_function_id
importing
iv_function_id type fdt_uuid
iv_function_name type fdt_function_name
iv_application_name type fdt_application_name
exporting
ev_function_id type fdt_uuid .
class-methods create_fieldmapping_new
importing
ir_source_data type ref to data
ir_target_data type ref to data
exporting
et_fieldmapping type tyt_fieldmapping
ev_type_kind_source type tyv_type_kind
ev_type_kind_target type tyv_type_kind
er_source_struc type ref to data
er_target_struc type ref to data .
private section.
class-methods get_delta_timestamp
importing
it_resultgroups type tyts_resultgroups
iv_eventtype type zrulerun_evtyp
exporting
ev_delta_timestamp type zrulerun_timestamp_pla.
class-methods message_store
changing
cs_message type smesg.
ENDCLASS.
CLASS ZCL_RULERUNNER IMPLEMENTATION.
method add_event.
************************************************************************
* Add an Event to the rulerunner Framework *
* *
* Programmer: Derk Rösler *
* Date: 23th April 2018 *
* *
************************************************************************
data:
ls_zrulerun_event type zrulerun_events,
lt_parameters type zrulerun_key_value_t,
ls_parameters type zrulerun_key_value_s,
lv_json_string type string,
lv_hash_string type string,
ls_event_buffer type tys_event_buffer,
lv_string type string,
lv_insert_database type abap_bool,
lv_planned_execution_timestamp type zrulerun_timestamp_pla.
*Step 0: Initializations
clear ls_zrulerun_event.
*STep 1: Check Inputs
if iv_event_type is initial.
return.
* ####To Do####: raise exception or return value
else.
ls_zrulerun_event-eventtype = iv_event_type.
endif.
* check Delta mode
* SAP BW only: adding events in a BW transformation
* may only be useful, if DTP is executed in Delta Mode
if iv_bw_dtp_delta_mode is supplied.
if iv_bw_dtp_delta_mode <> const_delta_mode_delta.
ev_returncode = '1'.
return.
endif.
endif.
*Step : process Parameters
try .
* all Parameter-Input Values are optional
* IT_PARAMETERS
if it_parameters is supplied.
append lines of it_parameters to lt_parameters.
endif.
* IV_PARAMETER_1
if iv_parameter_1_key is supplied
and iv_parameter_1_value is supplied.
clear ls_parameters.
ls_parameters-key = iv_parameter_1_key.
ls_parameters-value = iv_parameter_1_value.
append ls_parameters to lt_parameters.
endif.
* IV_PARAMETER_2
if iv_parameter_2_key is supplied
and iv_parameter_2_value is supplied.
clear ls_parameters.
ls_parameters-key = iv_parameter_2_key.
ls_parameters-value = iv_parameter_2_value.
append ls_parameters to lt_parameters.
endif.
* IV_PARAMETER_3
if iv_parameter_3_key is supplied
and iv_parameter_3_value is supplied.
clear ls_parameters.
ls_parameters-key = iv_parameter_3_key.
ls_parameters-value = iv_parameter_3_value.
append ls_parameters to lt_parameters.
endif.
* IV_PLANNED_EXECUTION_TIMESTAMP
if iv_planned_execution_timestamp is supplied and
iv_planned_execution_timestamp is not initial.
lv_planned_execution_timestamp = iv_planned_execution_timestamp.
else.
lv_planned_execution_timestamp = gv_timestamp.
endif.
* IV_BW_DTP_REQUEST
* By default Events are inserted into the Database!
* When IV_BW_DTP_REQUEST is supplied,
* we check wether it equals to DTP_SIMULATION->no insert
if iv_bw_dtp_request is supplied.
if iv_bw_dtp_request = const_bw_simulation_request.
lv_insert_database = abap_false.
else.
lv_insert_database = abap_true.
endif.
else."iv_bw_dtp_request is supplied.
lv_insert_database = abap_true.
endif.
catch cx_root.
* ####To Do####:
ev_returncode = '05'.
raise exception type zcx_rulerunner
exporting
* textid =
* previous =
* mt_message =
iv_message_text = 'Error while processing input-parameters'.
return.
endtry.
* set Creation Timestamp
ls_zrulerun_event-tst_created = gv_timestamp.
* set Planned Execution Timestamp
* We do not check this timestamp, it can be in the past, as well in the future
ls_zrulerun_event-tst_planned = lv_planned_execution_timestamp.
* -------------------------------------------
*next steps are only required for events that are to be stored in the database
if lv_insert_database = abap_true.
*Step : convert Parameters into JSON
.
*####To Do####: sorting? better not, because it might be relevant
try.
call method cl_fdt_json=>data_to_json
exporting
ia_data = lt_parameters
receiving
rv_json = lv_json_string.
ls_zrulerun_event-parajson = lv_json_string.
ls_zrulerun_event-paralength = strlen( lv_json_string ).
catch cx_root .
ev_returncode = '10'.
if iv_suppress_exceptions is initial.
raise exception type zcx_rulerunner
exporting
* textid =
* previous =
* mt_message =
iv_message_text = 'Error while converting parameters into JSON string.'.
endif.
return.
endtry.
* Step : convert Parameters into Hash Value
try.
call method cl_abap_message_digest=>calculate_hash_for_char
exporting
if_data = lv_json_string
importing
ef_hashstring = lv_hash_string.
catch cx_abap_message_digest .
ev_returncode = '20'.
if iv_suppress_exceptions is initial.
raise exception type zcx_rulerunner
exporting
* textid =
* previous =
* mt_message =
iv_message_text = 'Error while converting parameters to hash-value.'.
endif.
return.
endtry.
ls_zrulerun_event-parahash = lv_hash_string.
*-------------------------------------------
*Do we need to insert event data into the database
*-------------------------------------------
*-------------------------------------------
*insert database using buffer lookup
* Step: check buffer table, in order to avoid redundant inserts
* therefore calculate Hashvalue of relevant fields
* ls_zrulerun_event contains only values that are relevant for comparison
* clear ls_event_buffer_compare.
clear ls_event_buffer.
* ls_event_buffer_compare-eventtype = ls_zrulerun_event-eventtype.
* ls_event_buffer_compare-tst_created = ls_zrulerun_event-tst_created.
* ls_event_buffer_compare-tst_planned = ls_zrulerun_event-tst_planned.
* ls_event_buffer_compare-tst_processed = ls_zrulerun_event-tst_processed.
* ls_event_buffer_compare-parahash = ls_zrulerun_event-parahash.
cl_abap_container_utilities=>fill_container_c(
exporting
* im_value = ls_event_buffer_compare
im_value = ls_zrulerun_event
importing
ex_container = lv_string
exceptions
illegal_parameter_type = 1
others = 2
).
if sy-subrc <> 0.
ev_returncode = '30'.
if iv_suppress_exceptions is initial.
raise exception type zcx_rulerunner
exporting
* textid =
* previous =
* mt_message =
iv_message_text = 'Error while converting parameters to hash-value.'.
endif.
return.
endif.
try.
clear lv_hash_string.
call method cl_abap_message_digest=>calculate_hash_for_char
exporting
if_data = lv_string
importing
ef_hashstring = lv_hash_string.
catch cx_abap_message_digest .
ev_returncode = '40'.
if iv_suppress_exceptions is initial.
raise exception type zcx_rulerunner
exporting
* textid =
* previous =
* mt_message =
iv_message_text = 'Error while converting parameters to hash-value.'.
endif.
return.
endtry.
ls_event_buffer-hashvalue = lv_hash_string.
* read buffer table
read table gt_event_buffer with table key
hashvalue = ls_event_buffer-hashvalue
transporting no fields.
if sy-subrc = 0. "insert database?
* data are redundant
* record already has been inserted during this session
* no need to insert data,
else. "insert data
* --------------
* new record
* get event id
call function 'NUMBER_GET_NEXT'
exporting
nr_range_nr = '1'
object = 'ZRULERUNEV'
quantity = '1'
* SUBOBJECT = ' '
* TOYEAR = '0000'
* IGNORE_BUFFER = ' '
importing
number = ls_zrulerun_event-eventid
* QUANTITY =
* RETURNCODE =
exceptions
interval_not_found = 1
number_range_not_intern = 2
object_not_found = 3
quantity_is_0 = 4
quantity_is_not_1 = 5
interval_overflow = 6
buffer_overflow = 7
others = 8.
if sy-subrc <> 0.
ev_returncode = '50'.
if iv_suppress_exceptions is initial.
raise exception type zcx_rulerunner
exporting
* textid =
* previous =
* mt_message =
iv_message_text = 'Error while getting Eventid number.'.
endif.
return.
endif.
* -----------------------
* insert into database
try.
insert zrulerun_events from ls_zrulerun_event.
* ------------------------
* add Hashvalue to event buffer
insert ls_event_buffer into table gt_event_buffer.
catch cx_root.
ev_returncode = '60'.
if iv_suppress_exceptions is initial.
raise exception type zcx_rulerunner
exporting
* textid =
* previous =
* mt_message =
iv_message_text = 'Error while inserting into database.'.
endif.
return.
endtry.
endif."sy-subrc = 0. "insert database?
endif."lv_insert_database = abap_true.
* -------------------------------------------
* return event data
move-corresponding ls_zrulerun_event to es_event_data.
es_event_data-parameters_t = lt_parameters.
* es_event_data = ls_zrulerun_event .
ev_returncode = sy-subrc.
endmethod.
method check_brf_function_list.
data: lt_brf_function_list type tyth_function_list.
field-symbols:
<ls_function_list> type tys_function_list.
loop at ct_brf_function_list assigning <ls_function_list>.
get_function_id(
exporting
iv_function_id = '' " BRFplus: Function ID
iv_function_name = <ls_function_list>-function_name " BRFplus Function Name
iv_application_name = <ls_function_list>-application_name " BRFplus Application name
importing
ev_function_id = <ls_function_list>-function_id " BRFplus: Function ID
).
* only transfer valid records
if <ls_function_list>-function_id is not initial.
insert <ls_function_list> into table lt_brf_function_list.
endif.
endloop.
clear ct_brf_function_list.
ct_brf_function_list = lt_brf_function_list.
endmethod.
method check_debug_mode.
if gv_debug_mode = abap_true.
break-point.
endif.
endmethod.
method class_constructor.
set_timestamp( ).
endmethod.
method create_brf_functionid_range.
* method not relevant any more
raise exception type zcx_rulerunner.
** creates a range table of BRF-functionid's'
* data: ls_range type line of tyt_range_functionid.
* field-symbols: <ls_brf_function_list> type tys_function_list.
*
*
* clear et_brf_functionid_range.
* ls_range-sign = 'I'.
* ls_range-option = 'EQ'.
* loop at it_brf_function_list assigning <ls_brf_function_list>.
* ls_range-low = <ls_brf_function_list>-function_id.
* append ls_range to et_brf_functionid_range.
* endloop.
endmethod.
method create_context_list.
************************************************************************
* *
* Creates a list of context objects of a BRF function *
* includes a dataref DATAREF_INPUT
* of context object w/ initial values
* includes a dataref DATAREF_RESULT
* to be bound after BRf function execution
* *
************************************************************************
data: lt_context_list type standard table of zrulerun_context_list_s,
ls_context_list_ref type zrulerun_context_list_ref_s.
field-symbols:
<ls_context_list> type zrulerun_context_list_s.
* get context list from BRF-Function
try.
call method cl_fdt_function_process=>get_context_list
exporting
iv_function_id = iv_function_id
iv_timestamp = gv_timestamp
iv_trace_generation = ''
importing
et_context_list = lt_context_list.
catch cx_fdt_input .
endtry.
*create a data reference for each context object
loop at lt_context_list assigning <ls_context_list>.
clear ls_context_list_ref.
move-corresponding <ls_context_list> to ls_context_list_ref.
* get object ref of brf function
cl_fdt_function_process=>get_data_object_reference( exporting iv_function_id = iv_function_id
iv_data_object = <ls_context_list>-id
iv_timestamp = gv_timestamp
* iv_trace_generation = abap_false
importing er_data = ls_context_list_ref-dataref_input
).
insert ls_context_list_ref into table et_context_list.
endloop.
endmethod.
method create_eventid_table.
* creates a list of event-id's
data: ls_eventid type tys_event_id.
field-symbols:
<ls_any_table> type any,
<lv_eventid> type zrulerun_evtid.
clear et_event_id.
loop at it_any_table assigning <ls_any_table>.
clear ls_eventid.
assign component 'EVENTID' of structure <ls_any_table> to <lv_eventid>.
if <lv_eventid> is assigned.
* assign component 'FUNCTION_ID' of structure <ls_any_table> to <lv_function_id>.
* if <lv_function_id> is assigned.
ls_eventid-eventid = <lv_eventid>.
* ls_eventid-function_id = <lv_function_id>.
append ls_eventid to et_event_id.
* endif.
endif.
endloop.
endmethod.
method create_fieldmapping.
************************************************************************
* *
* Creates a Field by Field Mapping between Source and Target *
* *
* created: 25th April 2018 *
* 22th May 2018: Performance Enhancement *
* ET_Fieldmapping contains DataRefs to each source&target field
* of structures ER_SOURCE_STRUC & ER_TARGET_STRUC.
* ER_SOURCE_STRUC & ER_TARGET_STRUC (and there corresponding field refs in et_fieldmapping)
* are directly used when transforming data.
* This avoids the much slower "assign component x of structure y to"
************************************************************************
* break-point.
data:
* lo_typedescr type ref to cl_abap_typedescr,
lo_elemdescr type ref to cl_abap_elemdescr,
* lo_structdescr type ref to cl_abap_structdescr,
* lo_tabledescr type ref to cl_abap_tabledescr,
lt_components_source type tyt_components_extended,
lt_components_target type tyt_components_extended,
ls_fieldmapping type tys_fieldmapping,
* lv_typekind_source type tyv_type_kind,
* lv_typekind_target type tyv_type_kind,
lv_position_target type i,
lv_position_source type i,
lv_source_name_memory type string,
lrs_target_data type ref to data,
lrs_source_data type ref to data.
field-symbols:
<ls_components_source> type line of tyt_components_extended,
<ls_components_target> type line of tyt_components_extended,
* <lo_source_data> type any,
<lt_source_data> type any table,
<lt_target_data> type any table,
<ls_source_data> type any,
<ls_target_data> type any,
<lv_source_value> type any,
<lv_target_value> type any.
* break-point.
*Step: checks and inits
clear et_fieldmapping.
if ir_source_data is not bound
or ir_target_data is not bound.
return.
endif.
*Step: get type descriptions Source+Target
* Source
call method zcl_rulerunner=>get_type_description
exporting
ir_dataref = ir_source_data
importing
et_components = lt_components_source
ev_type_kind = ev_type_kind_source.
* create data reference to source structure
case ev_type_kind_source.
when 'S'.
er_source_struc = ir_source_data.
when 'T'.
assign ir_source_data->* to <lt_source_data>.
create data lrs_source_data like line of <lt_source_data>.
er_source_struc = lrs_source_data.
endcase.
* target
call method zcl_rulerunner=>get_type_description
exporting
ir_dataref = ir_target_data
importing
et_components = lt_components_target
ev_type_kind = ev_type_kind_target.
* create data reference to source structure
case ev_type_kind_target.
when 'S'.
er_target_struc = ir_target_data.
when 'T'.
assign ir_target_data->* to <lt_target_data>.
create data lrs_target_data like line of <lt_target_data>.
er_target_struc = lrs_target_data.
endcase.
*STep: check possible combinations
case ev_type_kind_source.
when 'E'.
if ev_type_kind_target <> 'E'.
* ####ToDo####: add a logic that casts data
raise exception type zcx_rulerunner.
endif.
when 'S'.
if ev_type_kind_target = 'E'.
* ####ToDo####: look for target-datatyp in source and assign values
raise exception type zcx_rulerunner.
endif.
when 'T'.
if ev_type_kind_target = 'E'.
* ####ToDo####: look for target-datatyp in source and assign values
raise exception type zcx_rulerunner.
endif.
when others.
* ####ToDo####: add message or replace by method call
raise exception type zcx_rulerunner.
endcase.
*STep: For each target field we need to find a corresponding source field
* break-point.
loop at lt_components_target assigning <ls_components_target>.
clear ls_fieldmapping.
* fill target details
ls_fieldmapping-t_parent_type = ev_type_kind_target.
ls_fieldmapping-t_name = <ls_components_target>-name.
clear lo_elemdescr.
if <ls_components_target>-type is bound.
lo_elemdescr ?= <ls_components_target>-type.
ls_fieldmapping-t_absolute_name = lo_elemdescr->absolute_name.
ls_fieldmapping-t_type_kind = lo_elemdescr->type_kind.
ls_fieldmapping-t_length = lo_elemdescr->length.
ls_fieldmapping-t_decimals = lo_elemdescr->decimals.
ls_fieldmapping-t_output_length = lo_elemdescr->output_length.
ls_fieldmapping-t_help_id = lo_elemdescr->help_id.
ls_fieldmapping-t_edit_mask = lo_elemdescr->edit_mask.
endif.
* target name w/ or w/o subfield?
if <ls_components_target>-subname is initial.
* no sub-field-
lv_position_target = lv_position_target + 1.
ls_fieldmapping-t_position = lv_position_target. "in target structure
else.
* sub-field
concatenate
<ls_components_target>-name
'-'
<ls_components_target>-subname
into <ls_components_target>-name.
* nested fields cannot be accessed via position
* in an "assign component of" statement
* ->we identify these assignments by fieldname by an initial position
clear ls_fieldmapping-t_position.
endif.
* save position (required for 'ASSIGN COMPONENT OF')
*-----------------------------------------------------------------
* try to find an appropriate source field
loop at lt_components_source assigning <ls_components_source>.
if <ls_components_target>-name = <ls_components_source>-name.
* ####ToDo####: implement a more sophisticated comparison
* e.g. ignore "/BIC/" "/BI0/" prefixes
* ignore leading zero
if <ls_components_source>-subname is initial.
ls_fieldmapping-s_name = <ls_components_source>-name.
lv_position_source = lv_position_source + 1.
ls_fieldmapping-s_position = lv_position_source. "in source structure
else.
if lv_source_name_memory = <ls_components_source>-name.
* we do not increment source position
* because it is the same "name" field
else.
lv_position_source = lv_position_source + 1.
endif.
* target field = source field, but sourcefield is a structure!
* Most likely the source is a BRF-date/time field
* Therefore we compare the type_kinds
if ls_fieldmapping-t_type_kind <> <ls_components_source>-type->type_kind.
* type_kind is different -> source field is not relevant
continue.
endif.
* nested fields cannot be accessed via position
* in an "assign component of" statement
* ->we identify these assignments by fieldname by an initial position
clear ls_fieldmapping-s_position.
concatenate
<ls_components_source>-name
'-'
<ls_components_source>-subname
into ls_fieldmapping-s_name.
endif." <ls_components_source>-subname is initial.
* Fill Source details
* "prefix S: source-Fields
ls_fieldmapping-s_parent_type = ev_type_kind_target.
clear lo_elemdescr.
if <ls_components_source>-type is bound.
lo_elemdescr ?= <ls_components_source>-type.
ls_fieldmapping-s_absolute_name = lo_elemdescr->absolute_name.
ls_fieldmapping-s_type_kind = lo_elemdescr->type_kind.
ls_fieldmapping-s_length = lo_elemdescr->length.
ls_fieldmapping-s_decimals = lo_elemdescr->decimals.
ls_fieldmapping-s_output_length = lo_elemdescr->output_length.
ls_fieldmapping-s_help_id = lo_elemdescr->help_id.
ls_fieldmapping-s_edit_mask = lo_elemdescr->edit_mask.
endif.
* add data references to target and source field to ls_fieldmapping
"source
if ev_type_kind_source ca 'ST'.
unassign <lv_source_value>.
assign er_source_struc->* to <ls_source_data>.
assign component ls_fieldmapping-s_name of structure <ls_source_data> to <lv_source_value>.
* <lv_source_value> = sy-tabix.
if sy-subrc = 0.
get reference of <lv_source_value> into ls_fieldmapping-s_ref_value.
endif.
endif.
"target
if ev_type_kind_target ca 'ST'.
unassign <lv_target_value>.
assign er_target_struc->* to <ls_target_data>.
assign component ls_fieldmapping-t_name of structure <ls_target_data> to <lv_target_value>.
* <lv_target_value> = sy-tabix.
if sy-subrc = 0.
get reference of <lv_target_value> into ls_fieldmapping-t_ref_value.
endif.
endif.
* add fieldmapping record
insert ls_fieldmapping into table et_fieldmapping.
exit. " loop AT lt_components_source
endif.
*
* if lv_source_name_memory = <ls_components_source>-name.
** we do not increment source position
** because it is the same "name" field
* else.
* lv_position_source = lv_position_source + 1.
* endif.
* store name
lv_source_name_memory = <ls_components_source>-name.
endloop."AT lt_components_source ASSIGNING <ls_components_source>.
* lo_elemdescr ?= <ls_components_target>-type.
* if lo_elemdescr->is_ddic_type( ) = abap_true.
* ls_ddic_info = lo_elemdescr->get_ddic_field( ).
* endif.
endloop. "at lt_components_target assigning <ls_components_target>.
endmethod.
method create_fieldmapping_new.
************************************************************************
* *
* Creates a Field by Field Mapping between Source and Target *
* *
* created: 31th August 2018 *
* : Performance Enhancement *
* ET_Fieldmapping contains DataRefs to each source&target field
* of structures ER_SOURCE_STRUC & ER_TARGET_STRUC.
* ER_SOURCE_STRUC & ER_TARGET_STRUC (and there corresponding field refs in et_fieldmapping)
* are directly used when transforming data.
* This avoids the much slower "assign component x of structure y to"
* changes:
* 10th August 2020: Transfer BRF Timepoint Types to target issue#161
************************************************************************
* break-point.
data:
* lo_typedescr type ref to cl_abap_typedescr,
lo_elemdescr type ref to cl_abap_elemdescr,
* lo_structdescr type ref to cl_abap_structdescr,
* lo_tabledescr type ref to cl_abap_tabledescr,
lt_components_source type tyt_components_extended,
lt_components_target type tyt_components_extended,
ls_fieldmapping type tys_fieldmapping,
lt_fieldmapping_source type sorted table of tys_fieldmapping with unique key s_name s_subname,
* lv_typekind_source type tyv_type_kind,
* lv_typekind_target type tyv_type_kind,
lv_position_target type i,
lv_position_source type i,
lv_source_name_memory type string,
lv_fieldname_string type string,
lrs_target_data type ref to data,
lrs_source_data type ref to data.
field-symbols:
<ls_components_source> type line of tyt_components_extended,
<ls_components_target> type line of tyt_components_extended,
* <lo_source_data> type any,
<lt_source_data> type any table,
<lt_target_data> type any table,
<ls_source_data> type any,
<ls_target_data> type any,
<lv_source_value> type any,
<lv_target_value> type any,
<ls_et_fieldmapping> type tys_fieldmapping,
<ls_fieldmapping_source> type tys_fieldmapping.
* break-point.
*Step: checks and inits
clear et_fieldmapping.
if ir_source_data is not bound
or ir_target_data is not bound.
return.
endif.
*Step: get type descriptions Source+Target
* Source
call method zcl_rulerunner=>get_type_description
exporting
ir_dataref = ir_source_data
importing
et_components = lt_components_source
ev_type_kind = ev_type_kind_source.
* create data reference to source structure
case ev_type_kind_source.
when 'S'.
er_source_struc = ir_source_data.
when 'T'.
assign ir_source_data->* to <lt_source_data>.
create data lrs_source_data like line of <lt_source_data>.
er_source_struc = lrs_source_data.
endcase.
* target
call method zcl_rulerunner=>get_type_description
exporting
ir_dataref = ir_target_data
importing
et_components = lt_components_target
ev_type_kind = ev_type_kind_target.
* create data reference to source structure
case ev_type_kind_target.
when 'S'.
er_target_struc = ir_target_data.
when 'T'.
assign ir_target_data->* to <lt_target_data>.
create data lrs_target_data like line of <lt_target_data>.
er_target_struc = lrs_target_data.
endcase.
*STep: check possible combinations
case ev_type_kind_source.
when 'E'.
if ev_type_kind_target <> 'E'.
* ####ToDo####: add a logic that casts data
raise exception type zcx_rulerunner.
endif.
when 'S'.
if ev_type_kind_target = 'E'.
* ####ToDo####: look for target-datatyp in source and assign values
raise exception type zcx_rulerunner.
endif.
when 'T'.
if ev_type_kind_target = 'E'.
* ####ToDo####: look for target-datatyp in source and assign values
raise exception type zcx_rulerunner.
endif.
when others.
* ####ToDo####: add message or replace by method call
raise exception type zcx_rulerunner.
endcase.
*Step: Add Target fields to Mapping table
* break-point.
loop at lt_components_target assigning <ls_components_target>.
clear ls_fieldmapping.
* fill target details
ls_fieldmapping-t_parent_type = ev_type_kind_target.
ls_fieldmapping-t_name = <ls_components_target>-name.
ls_fieldmapping-t_subname = <ls_components_target>-subname.
clear lo_elemdescr.
if <ls_components_target>-type is bound.
lo_elemdescr ?= <ls_components_target>-type.
ls_fieldmapping-t_absolute_name = lo_elemdescr->absolute_name.
ls_fieldmapping-t_type_kind = lo_elemdescr->type_kind.
ls_fieldmapping-t_length = lo_elemdescr->length.
ls_fieldmapping-t_decimals = lo_elemdescr->decimals.
ls_fieldmapping-t_output_length = lo_elemdescr->output_length.
ls_fieldmapping-t_help_id = lo_elemdescr->help_id.
ls_fieldmapping-t_edit_mask = lo_elemdescr->edit_mask.
endif.
if <ls_components_target>-subname is initial.
lv_position_target = lv_position_target + 1.
endif.
ls_fieldmapping-t_position = lv_position_target. "in target structure
insert ls_fieldmapping into table et_fieldmapping.
endloop. "at lt_components_target assigning <ls_components_target>.
*Step: Add Source fields to temporary Mapping table
* break-point.
loop at lt_components_source assigning <ls_components_source>.
clear ls_fieldmapping.
* fill target details
ls_fieldmapping-s_parent_type = ev_type_kind_source.
ls_fieldmapping-s_name = <ls_components_source>-name.
ls_fieldmapping-s_subname = <ls_components_source>-subname.
clear lo_elemdescr.
if <ls_components_source>-type is bound.
lo_elemdescr ?= <ls_components_source>-type.
ls_fieldmapping-s_absolute_name = lo_elemdescr->absolute_name.
ls_fieldmapping-s_type_kind = lo_elemdescr->type_kind.
ls_fieldmapping-s_length = lo_elemdescr->length.
ls_fieldmapping-s_decimals = lo_elemdescr->decimals.
ls_fieldmapping-s_output_length = lo_elemdescr->output_length.
ls_fieldmapping-s_help_id = lo_elemdescr->help_id.
ls_fieldmapping-s_edit_mask = lo_elemdescr->edit_mask.
endif.
if <ls_components_source>-subname is initial.
lv_position_source = lv_position_source + 1.
endif.
ls_fieldmapping-s_position = lv_position_source. "in target structure
insert ls_fieldmapping into table lt_fieldmapping_source.
endloop. "at lt_components_source assigning <ls_components_source>.
*STep: For each target field we need to find a corresponding source field
*-----------------------------------------------------------------
* try to find an appropriate source field
* et_fieldmapping contains target fields including position in structure
* lt_fieldmapping_source contains source fields including position in structure
loop at et_fieldmapping assigning <ls_et_fieldmapping>.
* ####ToDo####: implement a more sophisticated comparison
* e.g. ignore "/BIC/" "/BI0/" prefixes
* ignore leading zer0
loop at lt_fieldmapping_source assigning <ls_fieldmapping_source>
where s_name = <ls_et_fieldmapping>-t_name.
* check wether typekinds are identical or no subnames
if (
<ls_fieldmapping_source>-s_subname is initial and <ls_et_fieldmapping>-t_subname is initial
)
or
(
<ls_fieldmapping_source>-s_type_kind = <ls_et_fieldmapping>-t_type_kind
).
* this is the correct sourcefield
* -> fill sourcefield-properties in target-record
<ls_et_fieldmapping>-s_parent_type = <ls_fieldmapping_source>-s_parent_type.
* concatenate <ls_fieldmapping_source>-s_name
* '-' <ls_fieldmapping_source>-s_subname
* into <ls_et_fieldmapping>-s_name.
<ls_et_fieldmapping>-s_name = <ls_fieldmapping_source>-s_name .
<ls_et_fieldmapping>-s_subname = <ls_fieldmapping_source>-s_subname .
<ls_et_fieldmapping>-s_absolute_name = <ls_fieldmapping_source>-s_absolute_name .
<ls_et_fieldmapping>-s_type_kind = <ls_fieldmapping_source>-s_type_kind.
<ls_et_fieldmapping>-s_length = <ls_fieldmapping_source>-s_length.
<ls_et_fieldmapping>-s_decimals = <ls_fieldmapping_source>-s_decimals .
<ls_et_fieldmapping>-s_output_length = <ls_fieldmapping_source>-s_output_length .
<ls_et_fieldmapping>-s_help_id = <ls_fieldmapping_source>-s_help_id .
<ls_et_fieldmapping>-s_edit_mask = <ls_fieldmapping_source>-s_edit_mask .
<ls_et_fieldmapping>-s_position = <ls_fieldmapping_source>-s_position.
* add data references to target and source field to ls_fieldmapping
"source
if ev_type_kind_source ca 'ST'.
unassign <lv_source_value>.
assign er_source_struc->* to <ls_source_data>.
if <ls_et_fieldmapping>-s_subname is initial.
lv_fieldname_string = <ls_et_fieldmapping>-s_name.
else.
concatenate <ls_et_fieldmapping>-s_name '-' <ls_et_fieldmapping>-s_subname into lv_fieldname_string.
endif.
assign component lv_fieldname_string of structure <ls_source_data> to <lv_source_value>.
* <lv_source_value> = sy-tabix.
if sy-subrc = 0.
get reference of <lv_source_value> into <ls_et_fieldmapping>-s_ref_value.
endif.
endif.
"target
if ev_type_kind_target ca 'ST'.
unassign <lv_target_value>.
assign er_target_struc->* to <ls_target_data>.
if <ls_et_fieldmapping>-t_subname is initial.
lv_fieldname_string = <ls_et_fieldmapping>-t_name.
else.
concatenate <ls_et_fieldmapping>-t_name '-' <ls_et_fieldmapping>-t_subname into lv_fieldname_string.
endif.
assign component lv_fieldname_string of structure <ls_target_data> to <lv_target_value>.
* <lv_target_value> = sy-tabix.
if sy-subrc = 0.
get reference of <lv_target_value> into <ls_et_fieldmapping>-t_ref_value.
endif.
endif.
endif."<ls_fieldmapping_source>-s_type_kind = <ls_et_fieldmapping>-t_type_kind.
endloop."at lt_fieldmapping_source assigning <ls_fieldmapping_source>
endloop."at et_fieldmapping assigning <ls_et_fieldmapping>.
*remove target fields w/o source assignment
* start-delete.8-10-2020.issue161.TransferTimepointType
* delete et_fieldmapping where s_name is initial.
* end-delete.8-10-2020.issue161.TransferTimepointType
* start-insert.8-10-2020.issue161.TransferTimepointType
* If the target field is a BRF Timepoint, then we need to store the timepoint type!
* Note: Target Timepoint Type is stored in field <ls_et_fieldmapping>-s_subname
delete et_fieldmapping where
( s_name is initial
and
t_subname <> 'TYPE'
).
data: lv_timepoint_type type fdt_timepoint_type.
* Der Timepoint-Type wird in Feld s_subname gespeichert (quick n dirty
loop at et_fieldmapping assigning <ls_et_fieldmapping>.
case <ls_et_fieldmapping>-t_subname.
when 'DATE'.
lv_timepoint_type = 1.
when 'TIME'.
lv_timepoint_type = 2.
when 'TYPE'.
<ls_et_fieldmapping>-s_subname = lv_timepoint_type.
* Referenz erzeugen
concatenate <ls_et_fieldmapping>-t_name '-' <ls_et_fieldmapping>-t_subname into lv_fieldname_string.
assign component lv_fieldname_string of structure <ls_target_data> to <lv_target_value>.
* <lv_target_value> = sy-tabix.
if sy-subrc = 0.
get reference of <lv_target_value> into <ls_et_fieldmapping>-t_ref_value.
endif.
when others.
endcase.
endloop.
* end-insert.8-10-2020.issue161.TransferTimepointType
*delete position for nested fields
loop at et_fieldmapping assigning <ls_et_fieldmapping>.
if <ls_et_fieldmapping>-t_subname is not initial.
clear <ls_et_fieldmapping>-t_position.
endif.
if <ls_et_fieldmapping>-s_subname is not initial.
clear <ls_et_fieldmapping>-s_position.
endif.
endloop.
endmethod. "create_fieldmapping_new
method create_metadata_eventtype.
************************************************************************
* creates metadata of an Event Type *
* including: Functions w/ context and fieldmapping *
* Programmer: Derk Rösler *
* Date: 23th April 2018 *
* *
************************************************************************
* constants:lv_function_brf_cust type if_fdt_types=>id value '02E05A2E017C1EE891DE98788B7D8547'.
data:
ls_event_brf_customizing type zrulerun_brf_event_cust_s,
ls_function_meta type zrulerun_function_meta_s,
lv_function_id type zrulerun_functionid.
data:
lt_name_value type abap_parmbind_tab,
ls_name_value type abap_parmbind,
lr_context_data type ref to data,
lr_brf_result_data type ref to data,
lx_fdt type ref to cx_fdt,
la_iv_event_type type if_fdt_types=>element_text,
lv_abs_name type zrulerun_abs_name.
field-symbols:
<ls_event_brf_function_cust> type zrulerun_brf_function_cust_s.
*Step 0: Initializations
clear es_meta_eventtype.
* break-point.
*STep 1: Check Inputs
if iv_event_type is initial.
return.
* ####To Do####: raise exception or return value
endif.
*Step: create Metadata
* define Key-fields
es_meta_eventtype-eventtype = iv_event_type.
if ir_target_data is bound.
get_type_description(
exporting
ir_dataref = ir_target_data
importing
ev_absolut_name = lv_abs_name
* et_components = " Components of a structure: type definition
* ev_type_kind = " Type of Dataobject (T,S,E)
).
es_meta_eventtype-target_abs_name = lv_abs_name.
endif.
****************************************************************************************************
* get BRF-Functions that are assigned to the Eventtype via BRF+ function
* plus Eventtyp-properties
* and
* BRF+ Function Properties
****************************************************************************************************
* determine function_id
get_function_id(
exporting
iv_function_id = '' " BRFplus: Function ID
iv_function_name = const_rulerun_brf_functionname " BRFplus Function Name
iv_application_name = const_rulerun_brf_applicatname " BRFplus Application name
importing
ev_function_id = lv_function_id " BRFplus: Function ID
).
if lv_function_id is initial.
ev_returncode = 30.
return.
endif.
* transfer Eventtype to BRF context
ls_name_value-name = 'IV_EVENT_TYPE'.
la_iv_event_type = iv_event_type.
get reference of la_iv_event_type into lr_context_data.
ls_name_value-value = lr_context_data.
insert ls_name_value into table lt_name_value.
try.
cl_fdt_function_process=>process( exporting iv_function_id = lv_function_id
iv_timestamp = gv_timestamp
importing ea_result = ls_event_brf_customizing
changing ct_name_value = lt_name_value ).
catch cx_fdt into lx_fdt.
* ####ToDo####: error handling
endtry.
* => ls_event_brf_customizing contains:
* -EVTYP_ROPERTIES_T table w/ eventtype properties
* -FUNCTIONS_T table w/ BRF+functions that have been assigned to the eventtype
es_meta_eventtype-evtyp_properties_t = ls_event_brf_customizing-evtyp_properties_t.
** check the list of BRF functions that should be executed
* check_brf_function_list(
* changing
* ct_brf_function_list = ct_brf_function_list
* ).
** -> ct_brf_function_list only contains existing brf functions
****************************************************************************************************
* process each brf function and create metadata
****************************************************************************************************
loop at ls_event_brf_customizing-functions_t assigning <ls_event_brf_function_cust>.
* we only create metadata for BRF-functions that should be executed
* if ct_brf_function_list is not initial.
if it_resultgroups is not initial.
read table it_resultgroups with key
resultgroup = <ls_event_brf_function_cust>-resultgroup
* application_name = <ls_event_brf_function_cust>-application_name
* function_name = <ls_event_brf_function_cust>-function_name
transporting no fields.
if sy-subrc <> 0. "brf-function should not be executed
continue.
endif.
endif.
clear ls_function_meta.
move-corresponding <ls_event_brf_function_cust> to ls_function_meta.
* Function ID check/determine
call method zcl_rulerunner=>get_function_id
exporting
iv_function_id = ''
iv_function_name = <ls_event_brf_function_cust>-function_name
iv_application_name = <ls_event_brf_function_cust>-application_name
importing
ev_function_id = lv_function_id.
if lv_function_id is initial.
* this BRF-Function does not exist or is not valid
continue."loop at ls_event_brf_customizing-functions_t
endif.
ls_function_meta-function_id = lv_function_id.
*every BRF+ fucntion may have properties (defined via BRF+)
ls_function_meta-fct_properties_t = <ls_event_brf_function_cust>-fct_properties_t.
* get result object of brf function
try .
cl_fdt_function_process=>get_data_object_reference( exporting iv_function_id = lv_function_id
iv_data_object = '_V_RESULT'
iv_timestamp = gv_timestamp
* iv_trace_generation = abap_false
importing er_data = lr_brf_result_data ).
catch cx_fdt into lx_fdt..
* ####ToDo####: error handling
endtry.
* store reference to brf result object
ls_function_meta-ref_brf_result = lr_brf_result_data.
* Create Fieldmapping from BRF-Result to Target-Data
call method zcl_rulerunner=>create_fieldmapping
exporting
ir_source_data = lr_brf_result_data
ir_target_data = ir_target_data
importing
et_fieldmapping = ls_function_meta-fieldmapping_t
ev_type_kind_source = ls_function_meta-type_kind_brf_result
ev_type_kind_target = ls_function_meta-type_kind_target
er_source_struc = ls_function_meta-ref_source_struc
er_target_struc = ls_function_meta-ref_target_struc.
* create a list of context elements,
* list includes a data reference to the context object
call method zcl_rulerunner=>create_context_list
exporting
iv_function_id = lv_function_id
importing
et_context_list = ls_function_meta-context_t.
.
* append function table in result structure
insert ls_function_meta into table es_meta_eventtype-functions_t.
endloop."at lt_event_brf_customizing assigning <ls_event_brf_customizing>.
endmethod.
method create_resultgroup_range.
** creates a range table of BRF resultgroups
data: ls_range type line of tyt_range_resultgroups.
field-symbols: <ls_resultgroups> type tys_resultgroups.
clear et_range_resultgroups.
ls_range-sign = 'I'.
ls_range-option = 'EQ'.
loop at it_resultgroups assigning <ls_resultgroups>.
ls_range-low = <ls_resultgroups>-resultgroup.
append ls_range to et_range_resultgroups.
endloop.
endmethod.
method delete_events.
************************************************************************
* Deletes Events from rulerunner database *
* *
* Programmer: Derk Rösler *
* Date: 03 Dec 2018 *
* *
************************************************************************
data:
lt_events_key type standard table of tys_events_key,
ls_events_key type tys_events_key,
lt_eventlog_key type standard table of tys_eventlog_key,
ls_eventlog_key type tys_events_key,
lv_continue_deletion type abap_bool value 'X',
ls_messages type line of tyt_messages,
lv_timestamp_planned type zrulerun_timestamp_pla,
lt_range_timestamp_planned type tyt_range_timestamp,
ls_range_timestamp_planned type line of tyt_range_timestamp,
lv_package_size type i.
field-symbols:
<ls_eventlog_key> type tys_eventlog_key,
<ls_events_key> type tys_events_key.
* initialize messages
ls_messages-arbgb = 'ZRULERUNNER_MSG'.
ls_messages-msgty = 'I'.
call function 'MESSAGES_INITIALIZE'.
* Test Mode ?
if iv_test_mode = 'X'.
ls_messages-txtnr = 200.
lv_package_size = 0. "we need to select all relevant recs
* this may result in an memory overflow, in this case just do not use the test-mode
else.
ls_messages-txtnr = 215.
lv_package_size = 2000.
endif.
append ls_messages to et_messages.
if iv_display_messages = 'X'.
message_store( changing cs_message = ls_messages ).
endif.
* planned events in the future?
if iv_delete_future_events = 'X'.
* we do not care about the selection criteria
lv_timestamp_planned = iv_timestamp_planned_max.
else.
* events in the future not allowed
if iv_timestamp_planned_max > gv_timestamp
or iv_timestamp_planned_max is initial.
lv_timestamp_planned = gv_timestamp.
else.
lv_timestamp_planned = iv_timestamp_planned_max.
endif.
endif.
* construct range tab
if lv_timestamp_planned is not initial.
ls_range_timestamp_planned-sign = 'I'.
ls_range_timestamp_planned-option = 'LT'.
ls_range_timestamp_planned-low = lv_timestamp_planned.
append ls_range_timestamp_planned to lt_range_timestamp_planned.
endif.
* get events from table zrulerun_events
* Step 1: determine already processed events via view zrulerun_vevlog
* get processed events from zrulerun_plog
* View zrulerun_vevlog contains only events
* that have been processed yet
try.
while lv_continue_deletion = 'X'.
clear lt_eventlog_key.
select
client
eventid
resultgroup
functionid
from
zrulerun_vevlog
into table
lt_eventlog_key
up to 2000 rows
where
eventid in it_range_event_id
and eventtype in it_range_event_types
and resultgroup in it_range_resultgroups
and tst_processed in it_range_timestamp_processed
and tst_planned in lt_range_timestamp_planned
and tst_created in it_range_timestamp_created
group by
client
eventid
resultgroup
functionid .
ls_messages-txtnr = 205.
ls_messages-msgv1 = sy-dbcnt.
ls_messages-msgv2 = 'ZRULERUN_PLOG'.
if sy-dbcnt = lv_package_size and sy-dbcnt is not initial.
lv_continue_deletion = 'X'.
else.
lv_continue_deletion = ''.
endif.
append ls_messages to et_messages.
if iv_display_messages = 'X'.
message_store( changing cs_message = ls_messages ).
endif.
* !!!!! Deletion in DB Tables !!!!!1
if iv_test_mode ne 'X'.
* Step 1: delete from processing log
delete zrulerun_plog from table lt_eventlog_key.
ls_messages-txtnr = 220.
ls_messages-msgv1 = sy-dbcnt.
ls_messages-msgv2 = 'ZRULERUN_PLOG'.
append ls_messages to et_messages.
if iv_display_messages = 'X'.
message_store( changing cs_message = ls_messages ).
endif.
* Step 2: delete from event table
loop at lt_eventlog_key assigning <ls_eventlog_key>.
move-corresponding <ls_eventlog_key> to ls_events_key .
collect ls_events_key into lt_events_key.
endloop.
delete zrulerun_events from table lt_events_key.
ls_messages-txtnr = 220.
ls_messages-msgv1 = sy-dbcnt.
ls_messages-msgv2 = 'ZRULERUN_EVENTS'.
append ls_messages to et_messages.
if iv_display_messages = 'X'.
message_store( changing cs_message = ls_messages ).
endif.
* --------------------
commit work.
* ---------------------
endif."iv_test_mode ne 'X'.
endwhile."lv_continue_deletion = 'X'.
if iv_delete_unprocessed_events = 'X'.
* we need to delete events in zrulerun_events that correspond to the selection criteria
lv_continue_deletion = 'X'.
while lv_continue_deletion = 'X'.
clear lt_events_key.
* DB-Select
select
client
eventid
from
zrulerun_events
into table
lt_events_key
up to lv_package_size rows
where
eventid in it_range_event_id
and eventtype in it_range_event_types
* and resultgroup in it_range_resultgroups
* and tst_processed in it_range_timestamp_processed
and tst_created in it_range_timestamp_created
and tst_planned in lt_range_timestamp_planned
group by
client
eventid
.
ls_messages-txtnr = 205.
ls_messages-msgv1 = sy-dbcnt.
ls_messages-msgv2 = 'ZRULERUN_EVENTS'.
if sy-dbcnt = lv_package_size and sy-dbcnt is not initial.
lv_continue_deletion = 'X'.
else.
lv_continue_deletion = ''.
endif.
append ls_messages to et_messages.
if iv_display_messages = 'X'.
message_store( changing cs_message = ls_messages ).
endif.
if iv_test_mode ne 'X'.
delete zrulerun_events from table lt_events_key.
ls_messages-txtnr = 220.
ls_messages-msgv1 = sy-dbcnt.
ls_messages-msgv2 = 'ZRULERUN_EVENTS'.
append ls_messages to et_messages.
if iv_display_messages = 'X'.
message_store( changing cs_message = ls_messages ).
endif.
* --------------------
commit work.
* ---------------------
endif."iv_test_mode ne 'X'.
endwhile. "lv_continue_deletion = 'X'.
endif."iv_delete_unprocessed_events = 'X'.
if iv_display_messages = 'X'.
call function 'MESSAGES_SHOW'
exporting
send_if_one = space " Message sent directly if number = 1
batch_list_type = 'J' " J = job log / L = in spool list / B = both
show_linno = 'X' " Also show line numbers
show_linno_text = space " Column header for row
exceptions
inconsistent_range = 1
no_messages = 2
others = 3.
if sy-subrc <> 0.
endif.
endif.
catch cx_root .
raise exception type zcx_rulerunner
exporting
* textid =
* previous =
* mt_message =
iv_message_text = 'Error while deleting data'.
endtry.
endmethod.
method get_delta_timestamp.
data: lt_range_resultgroups type tyt_range_resultgroups.
create_resultgroup_range(
exporting
it_resultgroups = it_resultgroups
importing
et_range_resultgroups = lt_range_resultgroups
).
* Delta-Mode: adjust iv_timestamp_planned_from
* by reading last delta update from Delta-Management table
if lt_range_resultgroups is initial.
select single tst_planned
into ev_delta_timestamp
from zrulerun_delta
where eventtype = iv_eventtype
and resultgroup = ''.
else." lt_range_resultgroups is initial
* multiple resultgroups may have different timestamps
* to be on the safe side we use minimum
select min( tst_planned )
into ev_delta_timestamp
from zrulerun_delta
where eventtype = iv_eventtype
and resultgroup in lt_range_resultgroups.
endif. " lt_range_resultgroups is initial.
endmethod.
method get_function_id.
************************************************************************
* Determines the BRF+ Function ID *
* Uses SQL Lookups *
* *
* Programmer: Derk Rösler *
* Created: 24th April 2018 *
************************************************************************
data: ls_function_list_buffer type tys_function_list.
field-symbols: <ls_function_list_buffer> type tys_function_list.
*Step: Initializations
clear ev_function_id.
*Step:Check Inputs
if
iv_function_id is initial
and iv_function_name is initial
* and iv_application_id is initial
and iv_application_name is initial .
return.
endif.
* Step: process iv_function_id
* ->all other import-parameters are ignored
* ###ToDo:#### Buffering
if iv_function_id is not initial.
* Lookup Local Function
select single id into ev_function_id from fdt_admn_0000a
where id = iv_function_id
and deleted = abap_false.
if sy-subrc = 0 . return. endif.
* Lookup Customizing Function
select single id into ev_function_id from fdt_admn_0000
where id = iv_function_id
and deleted = abap_false.
if sy-subrc = 0 . return. endif.
* Lookup System Function
select single id into ev_function_id from fdt_admn_0000s
where id = iv_function_id
and deleted = abap_false.
if sy-subrc = 0 . return. endif.
endif.
* Step: process iv_function_name and iv_application_name
* Buffer lookup:
read table gt_function_list_buffer assigning <ls_function_list_buffer>
with table key application_name = iv_application_name function_name = iv_function_name.
if sy-subrc = 0.
ev_function_id = <ls_function_list_buffer>-function_id.
return.
endif.
clear ls_function_list_buffer.
ls_function_list_buffer-application_name = iv_application_name.
ls_function_list_buffer-function_name = iv_function_name.
* Lookup Customizing Function
select single cust_fu~id
from
fdt_admn_0000 as cust_fu
inner join fdt_admn_0000 as cust_ap
on
cust_ap~id = cust_fu~application_id
into ev_function_id
where
cust_ap~object_type = 'AP'
and cust_fu~object_type = 'FU'
and cust_fu~name = iv_function_name
and cust_ap~name = iv_application_name
and cust_fu~deleted = abap_false
and cust_ap~deleted = abap_false.
if sy-subrc = 0 .
ls_function_list_buffer-function_id = ev_function_id.
insert ls_function_list_buffer into table gt_function_list_buffer.
return.
endif.
* Lookup Local Function
select single local_fu~id
from
fdt_admn_0000a as local_fu
inner join fdt_admn_0000a as local_ap
on
local_ap~id = local_fu~application_id
into ev_function_id
where
local_ap~object_type = 'AP'
and local_fu~object_type = 'FU'
and local_fu~name = iv_function_name
and local_ap~name = iv_application_name
and local_fu~deleted = abap_false
and local_ap~deleted = abap_false.
if sy-subrc = 0 .
ls_function_list_buffer-function_id = ev_function_id.
insert ls_function_list_buffer into table gt_function_list_buffer.
return.
endif.
* Lookup System Function
select single syst_fu~id
from
fdt_admn_0000s as syst_fu
inner join fdt_admn_0000s as syst_ap
on
syst_ap~id = syst_fu~application_id
into ev_function_id
where
syst_ap~object_type = 'AP'
and syst_fu~object_type = 'FU'
and syst_fu~name = iv_function_name
and syst_ap~name = iv_application_name
and syst_fu~deleted = abap_false
and syst_ap~deleted = abap_false.
if sy-subrc = 0 .
ls_function_list_buffer-function_id = ev_function_id.
insert ls_function_list_buffer into table gt_function_list_buffer.
return.
endif.
endmethod.
method get_metadata_eventtype.
************************************************************************
* load metadata of an Event Type *
* including: Functions w/ context and fieldmapping *
* Programmer: Derk Rösler *
* Date: 23th April 2018 *
* *
************************************************************************
data: ls_meta_eventtype type zrulerun_event_meta_s,
lv_absolute_name type zrulerun_abs_name.
*Step: Buffer Lookup
get_type_description(
exporting
ir_dataref = ir_target_data
importing
ev_absolut_name = lv_absolute_name
).
read table gt_meta_eventtype
with table key
eventtype = iv_event_type
target_abs_name = lv_absolute_name
reference into er_meta_eventtype.
* into es_meta_eventtype.
if sy-subrc = 0.
return.
else.
* create metadata (including context list and fieldmappen source->target)
zcl_rulerunner=>create_metadata_eventtype(
exporting
iv_event_type = iv_event_type
ir_target_data = ir_target_data
it_resultgroups = it_resultgroups
importing
ev_returncode = ev_returncode
es_meta_eventtype = ls_meta_eventtype
* changing
* ct_brf_function_list = ct_brf_function_list
).
* store metadata.
insert ls_meta_eventtype into table gt_meta_eventtype.
* return reference to result
read table gt_meta_eventtype
with table key
eventtype = iv_event_type
target_abs_name = lv_absolute_name
reference into er_meta_eventtype.
endif.
endmethod.
method get_rulerunner_version.
data: lv_version type tyv_version.
lv_version = 'Main 0.10'.
append lv_version to et_versions.
lv_version = 'BW 0.4'.
append lv_version to et_versions.
lv_version = 'ODATA 0.2'.
append lv_version to et_versions.
endmethod.
method get_type_description.
* break-point.
data: lo_typedescr type ref to cl_abap_typedescr,
lo_elemdescr type ref to cl_abap_elemdescr,
lo_structdescr type ref to cl_abap_structdescr,
lo_tabledescr type ref to cl_abap_tabledescr,
lo_datadescr type ref to cl_abap_datadescr,
lt_components type tyt_components,
lt_components_sub type tyt_components,
ls_components type tys_components,
ls_components_extended type tys_components_extended.
* lt_temp_components type ABAP_COMPDESCR_TAB.
* data: oref_error type ref to cx_root,
data lv_text type string.
field-symbols:
<ls_components> type tys_components,
<ls_components_sub> type tys_components.
clear et_components.
* break-point.
lo_typedescr ?= cl_abap_typedescr=>describe_by_data_ref( ir_dataref ).
ev_absolut_name = lo_typedescr->absolute_name.
ev_type_kind = lo_typedescr->kind.
if et_components is not supplied.
return.
endif.
case lo_typedescr->kind.
when 'T'.
try.
lo_tabledescr ?= lo_typedescr.
lo_datadescr = lo_tabledescr->get_table_line_type( ).
if lo_datadescr->kind = 'S'.
lo_structdescr ?= lo_datadescr.
elseif lo_datadescr->kind = 'T'.
lo_tabledescr ?= lo_datadescr.
lo_structdescr ?= lo_tabledescr->get_table_line_type( ).
endif.
catch cx_sy_move_cast_error .
* break-point.
raise exception type zcx_rulerunner
* exporting
* textid =
* previous =
* mt_message =
* iv_message_text = ''
.
endtry.
lt_components = lo_structdescr->get_components( ).
when 'S'.
lo_structdescr ?= lo_typedescr.
lt_components = lo_structdescr->get_components( ).
when 'E'.
lo_elemdescr ?= lo_typedescr.
ls_components-name = ''.
ls_components-type = lo_elemdescr.
append ls_components to lt_components.
endcase.
* Step: resolve nested structures
* NOTE: deep types w/ tables are not supported
* If a component is a structure, then the elements are resolved.
* the Name of the sub component is saved in field subname
loop at lt_components assigning <ls_components>.
clear ls_components_extended.
case <ls_components>-type->kind.
when 'E'.
move-corresponding <ls_components> to ls_components_extended.
append ls_components_extended to et_components.
when 'S'.
* get components of sub structure
clear lt_components_sub.
clear lo_structdescr.
lo_structdescr ?= <ls_components>-type.
lt_components_sub = lo_structdescr->get_components( ).
loop at lt_components_sub assigning <ls_components_sub>.
clear ls_components_extended.
ls_components_extended-name = <ls_components>-name.
ls_components_extended-type = <ls_components_sub>-type.
ls_components_extended-subname = <ls_components_sub>-name.
append ls_components_extended to et_components.
endloop.
when others.
raise exception type zcx_rulerunner.
* ####ToDo####: excepion w/ message
endcase.
endloop.
endmethod.
method message_store.
* adjust line number
cs_message-zeile = cs_message-zeile + 1.
shift cs_message-msgv1 left deleting leading space.
call function 'MESSAGE_STORE'
exporting
arbgb = cs_message-arbgb " Message ID
* exception_if_not_active = 'X' " X = exception not_active is initialized if
msgty = cs_message-msgty " Type of message (I, S, W, E, A)
msgv1 = cs_message-msgv1 " First variable parameter of message
msgv2 = cs_message-msgv2 " Second variable parameter of message
msgv3 = cs_message-msgv3 " Third variable parameter of message
msgv4 = cs_message-msgv4 " Fourth variable parameter of message
txtnr = cs_message-txtnr " Message Number
* zeile = SPACE " Reference line (if it exists)
* importing
* act_severity = " Level of current message
* max_severity = " Maximum level of severity
* exceptions
* message_type_not_valid = 1
* not_active = 2
* others = 3
.
if sy-subrc <> 0.
* message id sy-msgid type sy-msgty number sy-msgno
* with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
endmethod.
method move_data_source_to_target.
************************************************************************
* *
* Moves data from source to target *
* Metadata are buffered (for performance reasons) *
* created: 31th August 2018 *
* *
* changes: *
* 10.08.2020 Buffering gt_datamover_meta *
************************************************************************
data:
lr_source_data type ref to data,
lr_target_data type ref to data,
lv_target_abs_name type zrulerun_abs_name,
lv_source_abs_name type zrulerun_abs_name,
ls_datamover_meta type zrulerun_datamover_meta_s.
*check inputs
if io_source_data is initial .
return.
endif.
if eo_target_data is not supplied.
return.
endif.
*get references and absolute names
get reference of io_source_data into lr_source_data.
get_type_description(
exporting
ir_dataref = lr_source_data
importing
ev_absolut_name = lv_source_abs_name
).
get reference of eo_target_data into lr_target_data.
get_type_description(
exporting
ir_dataref = lr_target_data
importing
ev_absolut_name = lv_target_abs_name
).
* read metadata from buffer
clear ls_datamover_meta.
read table gt_datamover_meta into ls_datamover_meta
with table key
source_abs_name = lv_source_abs_name
target_abs_name = lv_target_abs_name.
if sy-subrc <> 0."read table gt_datamover_meta
* buffer read fails -> need to create metadata
ls_datamover_meta-source_abs_name = lv_source_abs_name. "inserted.10-8-2020.Buffering gt_datamover_meta
ls_datamover_meta-target_abs_name = lv_target_abs_name."inserted.10-8-2020.Buffering gt_datamover_meta
try.
create_fieldmapping_new(
exporting
ir_source_data = lr_source_data
ir_target_data = lr_target_data
importing
et_fieldmapping = ls_datamover_meta-fieldmapping_t
ev_type_kind_source = ls_datamover_meta-type_kind_source " Type Kind: T-table,S-structure,E-element
ev_type_kind_target = ls_datamover_meta-type_kind_target " Type Kind: T-table,S-structure,E-element
er_source_struc = ls_datamover_meta-ref_source_struc
er_target_struc = ls_datamover_meta-ref_target_struc
).
* ls_datamover_meta-source_abs_name = lv_source_abs_name. "deleted.10-8-2020.Buffering gt_datamover_meta
* ls_datamover_meta-target_abs_name = lv_target_abs_name."deleted.10-8-2020.Buffering gt_datamover_meta
insert ls_datamover_meta into table gt_datamover_meta.
catch cx_root .
insert ls_datamover_meta into table gt_datamover_meta."inserted.10-8-2020.Buffering gt_datamover_meta
raise exception type zcx_rulerunner
exporting
iv_message_text = 'Error while creating fieldmapping'.
endtry.
endif. "sy-subrc <> 0."read table gt_datamover_meta
try.
* finally move the data
move_data_source_to_target_int(
exporting
io_source_data = io_source_data
iv_type_kind_source = ls_datamover_meta-type_kind_source
iv_type_kind_target = ls_datamover_meta-type_kind_target
ir_source_struc = ls_datamover_meta-ref_source_struc
ir_target_struc = ls_datamover_meta-ref_target_struc
changing
ct_fieldmapping = ls_datamover_meta-fieldmapping_t
co_target_data = eo_target_data
).
catch cx_root .
raise exception type zcx_rulerunner
exporting
iv_message_text = 'Error while moving data'.
endtry.
endmethod.
method move_data_source_to_target_int.
************************************************************************
* *
* moves data from source to target *
* fieldmapping must be provided *
* created: 26th April 2018 *
* changes: *
* 10th August 2020: Transfer BRF Timepoint Types to target issue#161 *
* 22 may 2018: Performance Enhancement *
* reuse of existing data references to transfer values (source -> target)
************************************************************************
field-symbols: <ls_fieldmapping> type tys_fieldmapping,
<ls_source_data> type any,
<ls_target_data> type any,
<ls_source_data_temp> type any,
<ls_target_data_temp> type any,
<lt_target_data> type any table,
<lt_source_data> type any table,
<lv_source_value> type any,
<lv_target_value> type any.
data:
lrs_target_data type ref to data,
lrs_source_data type ref to data
.
* break-point.
*create/assign structure of source type
if iv_type_kind_source = 'T'.
* need to create a structure
assign io_source_data to <lt_source_data>.
* create data lrs_target_data like line of <lt_source_data>.
create data lrs_source_data like line of <lt_source_data>.
assign lrs_source_data->* to <ls_source_data>.
* Performance: reuse of existing data references
assign ir_source_struc->* to <ls_source_data_temp>.
elseif iv_type_kind_source = 'S'.
assign io_source_data to <ls_source_data>.
* Performance: reuse of existing data references
assign ir_source_struc->* to <ls_source_data_temp>.
endif.
*create/assign structure of target type
if iv_type_kind_target = 'T'.
* need to create a structure
assign co_target_data to <lt_target_data>.
create data lrs_target_data like line of <lt_target_data>.
assign lrs_target_data->* to <ls_target_data>.
* Performance: reuse of existing data references
assign ir_target_struc->* to <ls_target_data_temp>.
elseif iv_type_kind_target = 'S'.
assign co_target_data to <ls_target_data>.
* Performance: reuse of existing data references
assign ir_target_struc->* to <ls_target_data_temp>.
endif.
*==================================================
*Process data
case iv_type_kind_target.
when 'E'."iv_type_kind_target
if iv_type_kind_source = 'E'.
co_target_data = io_source_data.
else.
raise exception type zcx_rulerunner.
endif.
when 'S'."iv_type_kind_target
case iv_type_kind_source.
when 'E'."iv_type_kind_source
raise exception type zcx_rulerunner.
when 'S'."iv_type_kind_source
* structure->structure
* Performance: use existing data references
<ls_source_data_temp> = <ls_source_data>.
loop at ct_fieldmapping assigning <ls_fieldmapping>.
* start-delete.#1.8-10-2020.issue161.TransferTimepointType
* assign <ls_fieldmapping>-s_ref_value->* to <lv_source_value>.
* assign <ls_fieldmapping>-t_ref_value->* to <lv_target_value>.
* <lv_target_value> = <lv_source_value>.
* end-delete.#1.8-10-2020.issue161.TransferTimepointType
* start-insert.#1.8-10-2020.issue161.TransferTimepointType
if <ls_fieldmapping>-t_subname = 'TYPE'.
assign <ls_fieldmapping>-t_ref_value->* to <lv_target_value>.
<lv_target_value> = <ls_fieldmapping>-s_subname.
else.
assign <ls_fieldmapping>-s_ref_value->* to <lv_source_value>.
assign <ls_fieldmapping>-t_ref_value->* to <lv_target_value>.
<lv_target_value> = <lv_source_value>.
endif.
* end-insert.#1.8-10-2020.issue161.TransferTimepointType
endloop.
* Note:
* <ls_fieldmapping>-s_ref_value references to <ls_source_data_temp>
* <ls_fieldmapping>-T_REF_VALUE references to <ls_target_data_temp>
* i.e. <ls_target_data_temp> contains the target data
<ls_target_data> = <ls_target_data_temp>.
when 'T'."iv_type_kind_source
* table->structure
* read only first line of source
loop at <lt_source_data> assigning <ls_source_data> .
loop at ct_fieldmapping assigning <ls_fieldmapping>.
* start-delete.#2.8-10-2020.issue161.TransferTimepointType
* assign <ls_fieldmapping>-s_ref_value->* to <lv_source_value>.
* assign <ls_fieldmapping>-t_ref_value->* to <lv_target_value>.
* <lv_target_value> = <lv_source_value>.
* end-delete.#2.8-10-2020.issue161.TransferTimepointType
* start-insert.#2.8-10-2020.issue161.TransferTimepointType
if <ls_fieldmapping>-t_subname = 'TYPE'.
assign <ls_fieldmapping>-t_ref_value->* to <lv_target_value>.
<lv_target_value> = <ls_fieldmapping>-s_subname.
else.
assign <ls_fieldmapping>-s_ref_value->* to <lv_source_value>.
assign <ls_fieldmapping>-t_ref_value->* to <lv_target_value>.
<lv_target_value> = <lv_source_value>.
endif.
* end-insert.#2.8-10-2020.issue161.TransferTimepointType
endloop.
* Note:
* <ls_fieldmapping>-s_ref_value references to <ls_source_data_temp>
* <ls_fieldmapping>-T_REF_VALUE references to <ls_target_data_temp>
* i.e. <ls_target_data_temp> contains the target data
<ls_target_data> = <ls_target_data_temp>.
* only first record is transferred.
exit. "at <lt_source_data> ASSIGNING <ls_source_data> .
endloop."at <lt_source_data> assigning <ls_source_data>
when others.
raise exception type zcx_rulerunner.
endcase.
when 'T'."iv_type_kind_target
case iv_type_kind_source.
when 'E'."iv_type_kind_source
raise exception type zcx_rulerunner.
when 'S'."iv_type_kind_source
* structure->table
* Performance: use existing data references
<ls_source_data_temp> = <ls_source_data>.
loop at ct_fieldmapping assigning <ls_fieldmapping>.
* start-delete.#3.8-10-2020.issue161.TransferTimepointType
* assign <ls_fieldmapping>-s_ref_value->* to <lv_source_value>.
* assign <ls_fieldmapping>-t_ref_value->* to <lv_target_value>.
* <lv_target_value> = <lv_source_value>.
* end-delete.#3.8-10-2020.issue161.TransferTimepointType
* start-insert.#3.8-10-2020.issue161.TransferTimepointType
if <ls_fieldmapping>-t_subname = 'TYPE'.
assign <ls_fieldmapping>-t_ref_value->* to <lv_target_value>.
<lv_target_value> = <ls_fieldmapping>-s_subname.
else.
assign <ls_fieldmapping>-s_ref_value->* to <lv_source_value>.
assign <ls_fieldmapping>-t_ref_value->* to <lv_target_value>.
<lv_target_value> = <lv_source_value>.
endif.
* end-insert.#3.8-10-2020.issue161.TransferTimepointType
endloop.
* Note:
* <ls_fieldmapping>-s_ref_value references to <ls_source_data_temp>
* <ls_fieldmapping>-T_REF_VALUE references to <ls_target_data_temp>
* i.e. <ls_target_data_temp> contains the target data
<ls_target_data> = <ls_target_data_temp>.
insert <ls_target_data> into table <lt_target_data>.
when 'T'."iv_type_kind_source
* Table -> table
loop at <lt_source_data> assigning <ls_source_data>.
* Performance: use existing data references
<ls_source_data_temp> = <ls_source_data>.
loop at ct_fieldmapping assigning <ls_fieldmapping>.
* start-delete.#4.8-10-2020.issue161.TransferTimepointType
* assign <ls_fieldmapping>-s_ref_value->* to <lv_source_value>.
* assign <ls_fieldmapping>-t_ref_value->* to <lv_target_value>.
* <lv_target_value> = <lv_source_value>.
* end-delete.#4.8-10-2020.issue161.TransferTimepointType
* start-insert.#4.8-10-2020.issue161.TransferTimepointType
if <ls_fieldmapping>-t_subname = 'TYPE'.
assign <ls_fieldmapping>-t_ref_value->* to <lv_target_value>.
<lv_target_value> = <ls_fieldmapping>-s_subname.
else.
assign <ls_fieldmapping>-s_ref_value->* to <lv_source_value>.
assign <ls_fieldmapping>-t_ref_value->* to <lv_target_value>.
<lv_target_value> = <lv_source_value>.
endif.
* end-insert.#4.8-10-2020.issue161.TransferTimepointType
endloop.
* Note:
* <ls_fieldmapping>-s_ref_value references to <ls_source_data_temp>
* <ls_fieldmapping>-T_REF_VALUE references to <ls_target_data_temp>
* i.e. <ls_target_data_temp> contains the target data
<ls_target_data> = <ls_target_data_temp>.
insert <ls_target_data> into table <lt_target_data>.
endloop."at <lt_source_data> ASSIGNING <ls_source_data>.
when others.
raise exception type zcx_rulerunner.
endcase.
when others.
endcase.
endmethod.
method process_event_directly.
************************************************************************
* *
* Processes all BRF-Functions that are assigned to the Eventtype *
* the BRF results are handed over in parameter co_result_data *
* *
* *
************************************************************************
data: lt_parameters type zrulerun_key_value_t,
ls_parameters type zrulerun_key_value_s,
ls_event_data type zrulerun_events_extended_s,
* lt_brf_function_list type tyth_function_list,
* ls_brf_function_list type tys_function_list.
lt_resultgroups type tyts_resultgroups,
ls_resultgroups type tys_resultgroups,
lt_processing_log type tyt_processing_log.
*Step: Check Inputs
if iv_event_type is initial.
ev_returncode = 1.
return.
endif.
if eo_result_data is not supplied.
ev_returncode = 10.
return.
endif.
*Step : transfer event data into internal format
if it_parameters is supplied.
lt_parameters = it_parameters.
endif.
* IV_PARAMETER_1
if iv_parameter_1_key is supplied
and iv_parameter_1_value is supplied.
clear ls_parameters.
ls_parameters-key = iv_parameter_1_key.
ls_parameters-value = iv_parameter_1_value.
append ls_parameters to lt_parameters.
endif.
* IV_PARAMETER_2
if iv_parameter_2_key is supplied
and iv_parameter_2_value is supplied.
clear ls_parameters.
ls_parameters-key = iv_parameter_2_key.
ls_parameters-value = iv_parameter_2_value.
append ls_parameters to lt_parameters.
endif.
* IV_PARAMETER_3
if iv_parameter_3_key is supplied
and iv_parameter_3_value is supplied.
clear ls_parameters.
ls_parameters-key = iv_parameter_3_key.
ls_parameters-value = iv_parameter_3_value.
append ls_parameters to lt_parameters.
endif.
*Step : transfer resultgroups into internal format
if iv_resultgroup is supplied and iv_resultgroup is not initial.
ls_resultgroups-resultgroup = iv_resultgroup.
append ls_resultgroups to lt_resultgroups.
endif.
if it_resultgroups is supplied and it_resultgroups is not initial.
append lines of it_resultgroups to lt_resultgroups.
endif.
** create event data in internal format
ls_event_data-eventtype = iv_event_type.
ls_event_data-parameters_t = lt_parameters.
*-----------------------------------------------
*Step: execute event
try.
call method zcl_rulerunner=>process_single_event
exporting
it_resultgroups = lt_resultgroups
* it_brf_function_id = lt_range_function_id
* it_brf_function_list = lt_brf_function_list
importing
ev_returncode = ev_returncode
eo_target_data = eo_result_data
changing
cs_event_id_data = ls_event_data
ct_processing_log = lt_processing_log
* ct_brf_function_list = lt_brf_function_list
.
catch cx_root.
raise exception type zcx_rulerunner
exporting
* textid =
* previous =
* mt_message =
iv_message_text = 'Error while processing single event'.
endtry.
endmethod.
method process_multiple_eventids.
************************************************************************
* *
* Processes a multiple Event ID's *
* *
* Note: only one result object can be handed over *
* therefore the event-ID's / BRF-Functions must *
* be selected carefully *
* The result of these event-ID's/BRF-functions must *
* be transferrable into the result object somehow *
************************************************************************
data: lt_resultgroups type tyts_resultgroups,
ls_resultgroups type tys_resultgroups.
*Step : transfer resultgroups into internal format
if iv_resultgroup is supplied and iv_resultgroup is not initial.
ls_resultgroups-resultgroup = iv_resultgroup.
append ls_resultgroups to lt_resultgroups.
endif.
if it_resultgroups is supplied and it_resultgroups is not initial.
append lines of it_resultgroups to lt_resultgroups.
endif.
try.
process_multiple_eventids_int(
exporting
it_table_with_eventid = it_table_with_eventid
iv_update_processing_log = iv_update_processing_log
iv_repeat_processing = iv_repeat_processing
iv_package_size = iv_package_size
it_resultgroups = lt_resultgroups
importing
eo_result_data = eo_result_data
* changing
* ct_brf_function_list = lt_brf_function_list
).
catch cx_root.
raise exception type zcx_rulerunner
exporting
iv_message_text = 'Error while processing multiple events'.
return.
endtry.
endmethod.
method process_multiple_eventids_int.
************************************************************************
* *
* Processes a list of Event ID's including function) *
* *
* Note: only one result object can be handed over *
* therefore the event-ID's / BRF-Resultgroups must *
* be selected carefully *
* The result of these event-ID's/BRF-functions must *
* be transferrable into the result object somehow *
************************************************************************
* Selection mode: iv_select_processed_events
* iv_repeat_processing = X
* - all events are processed wether they have been processed yet or not
* iv_repeat_processing =''
* -events are only processed when there is no record in table ZRULERUN_DELTA or
* ZRULERUN_DELTA-TST_PROCESSED is initial
* -NOTE: Execution timestamps are stored per eventid AND functionid in table ZRULERUN_DELTA
* That means: if a specific function should be executed, there may exist a specific timestamp
data: "ls_range_function_id type line of tyt_range_functionid,
* lt_range_function_id type tyt_range_functionid,
lt_event_data type standard table of zrulerun_events,
lt_event_data_relevant type standard table of zrulerun_events,
ls_event_data_memory type zrulerun_events,
* lt_event_data_extended type standard table of zrulerun_events_extended_s,
ls_event_data_extended type zrulerun_events_extended_s,
lv_returncode type sy-subrc,
lv_db_cursor type i,
lv_db_cursor_close type abap_bool,
lv_package_size type i,
lt_event_id type tyt_event_id,
lt_processing_log type tyt_processing_log.
field-symbols:
* <ls_brf_function_list> type tys_function_list,
<ls_event_data> type zrulerun_events.
* <ls_event_data_extended> type zrulerun_events_extended_s.
*Step: initializations
if iv_package_size is initial.
lv_package_size = const_db_eventid_package_size.
else.
lv_package_size = iv_package_size.
endif.
*Step: check inputs
if it_table_with_eventid is initial.
return.
endif.
* Debugging?
zcl_rulerunner=>check_debug_mode( ).
* Step: create table with eventid's
create_eventid_table(
exporting
it_any_table = it_table_with_eventid
importing
et_event_id = lt_event_id
).
if lt_event_id is initial.
return.
endif.
*Step: Get Event-ID data
* select all events wether processed yet or not
open cursor lv_db_cursor for
select * from zrulerun_events
* into table lt_event_data
for all entries in lt_event_id
where eventid = lt_event_id-eventid.
if sy-subrc = 0.
lv_db_cursor_close = abap_false.
else.
lv_db_cursor_close = abap_true.
endif.
*====================================================================
*Step: Process Eventid in packages
while lv_db_cursor_close = abap_false.
clear lt_event_data.
fetch next cursor lv_db_cursor into lt_event_data package size lv_package_size.
if sy-subrc = 0.
lv_db_cursor_close = abap_false.
else.
lv_db_cursor_close = abap_true.
continue.
* exit.
endif.
* Debugging?
zcl_rulerunner=>check_debug_mode( ).
* --------------------------------------
* Step: get events that have not been processed yet
if iv_repeat_processing = abap_false.
* already processed events must be excluded
remove_already_processed_event(
exporting
it_resultgroups = it_resultgroups
changing
ct_event_data = lt_event_data
).
endif. "iv_select_processed_events = abap_false.
* --------------------------------------
* lt_event_data contains now only those events that have to be processed
* --------------------------------------
* Step: identify events with identical parameters
* Events may have identical Parameters
* if that is the case, then the event may only be executed once
* but the processed_timestamp must be written to all events
sort lt_event_data by parahash.
loop at lt_event_data assigning <ls_event_data>.
if <ls_event_data>-eventtype = ls_event_data_memory-eventtype
and
<ls_event_data>-parahash = ls_event_data_memory-parahash.
* Parameter are identical-> no need to process event
else.
* parameter not identical -> event must be processed
append <ls_event_data> to lt_event_data_relevant.
endif.
* save current record
ls_event_data_memory = <ls_event_data>.
endloop.
* Note:
* lt_event_date_relevant contains events that must be processed
* lt_event_data containts events where timestamp processed must be updated
*===================================
*Step: process events
loop at lt_event_data_relevant assigning <ls_event_data>.
* clear eo_result_data.
* convert into internal format
move-corresponding <ls_event_data> to ls_event_data_extended.
* execute
call method zcl_rulerunner=>process_single_event
exporting
it_resultgroups = it_resultgroups
* it_brf_function_id = lt_range_function_id
* it_brf_function_list = it_brf_function_list
importing
ev_returncode = lv_returncode
eo_target_data = eo_result_data
changing
cs_event_id_data = ls_event_data_extended
ct_processing_log = lt_processing_log
* ct_brf_function_list = ct_brf_function_list
.
<ls_event_data>-tst_processed = ls_event_data_extended-tst_processed.
endloop."at lt_event_data_relevant assigning <ls_event_data>.
*===================================
* Step: Update Execution Timestamp
* Debugging?
zcl_rulerunner=>check_debug_mode( ).
if iv_update_processing_log = abap_true.
zcl_rulerunner=>update_processing_log(
exporting
"note: lt_event_data contains all events where the timestamp must be updated
it_event_data = lt_event_data
it_resultgroups = it_resultgroups
it_processing_log = lt_processing_log
* it_functionid_range = lt_range_function_id
importing
ev_returncode = lv_returncode
) .
if lv_returncode <> 0.
raise exception type zcx_rulerunner.
endif.
endif.
endwhile."lv_db_cursor_close = abap_false.
endmethod.
method process_single_event.
************************************************************************
* processes all BRF Functions that are assigned to an event id *
* *
* Programmer: Derk Rösler *
* Date: 23th April 2018 *
* *
************************************************************************
data:
* ls_meta_eventtype type zrulerun_event_meta_s,
lr_meta_eventtype type ref to zrulerun_event_meta_s,
* ls_meta_function TYPE ZRULERUN_FUNCTION_META_S,
lr_target_data type ref to data,
lt_parameters type zrulerun_key_value_t,
lv_string type string,
lt_brf_context_values type abap_parmbind_tab,
ls_brf_context_values type abap_parmbind,
lx_rulerunner_exception type ref to cx_fdt,
ls_processing_log type tys_processing_log
.
* lt_range_function_id type tyt_range_functionid.
field-symbols:
<ls_function_meta> type zrulerun_function_meta_s,
<lo_brf_result> type any,
<ls_context_table> type zrulerun_context_list_ref_s,
<ls_meta_eventtype> type zrulerun_event_meta_s.
*Debugging?
zcl_rulerunner=>check_debug_mode( ).
*Step : Initializations + input checks
if cs_event_id_data is initial.
* or io_target_data is INITIAL.
return.
endif.
*Step: get Eventtype metadata
get reference of eo_target_data into lr_target_data.
call method zcl_rulerunner=>get_metadata_eventtype
exporting
iv_event_type = cs_event_id_data-eventtype
ir_target_data = lr_target_data
it_resultgroups = it_resultgroups
importing
* ev_returncode =
er_meta_eventtype = lr_meta_eventtype
* changing
* ct_brf_function_list = ct_brf_function_list
.
assign lr_meta_eventtype->* to <ls_meta_eventtype>.
*Step : get RulerRunner Parameters from JSON into context tab
if cs_event_id_data-parameters_t is not initial.
lt_parameters = cs_event_id_data-parameters_t.
elseif cs_event_id_data-parajson is not initial .
lv_string = cs_event_id_data-parajson.
call method cl_fdt_json=>json_to_data
exporting
iv_json = lv_string
changing
ca_data = lt_parameters.
endif.
** Step: generate BRF-function context using rulerunner Parameter Table
* ls_brf_context_values-name = const_rulerun_brf_context_name.
*
* get reference of lt_parameters into lr_brf_context_values.
* ls_brf_context_values-value = lr_brf_context_values.
* insert ls_brf_context_values into table lt_brf_context_values.
*-------------------------------------------------------------
*Step: process each BRF-function
* Debugging?
zcl_rulerunner=>check_debug_mode( ).
*==============================================================
loop at <ls_meta_eventtype>-functions_t assigning <ls_function_meta>.
* where function_id in lt_range_function_id.
* Note: <ls_meta_eventtype>-functions_t contains only relevant functions
* according to the required resultgroups in it_resultgroups
** check that rulerunner-Parameter table GT_RULERUNNER (Key Value) is part of brf-function context
* read table <ls_function_meta>-context_t with table key id = const_rulerun_brf_context_id
* transporting no fields.
* if sy-subrc <> 0.
* raise exception type zcx_rulerunner
* exporting
* iv_message_text = 'BRF-Function must contain context table GT_RULERUNNER'.
** do nothing
* endif.
* Context Handover:
* add all context parameters of the BRF-function to lt_brf_context_values
clear lt_brf_context_values.
loop at <ls_function_meta>-context_t assigning <ls_context_table>.
ls_brf_context_values-name = <ls_context_table>-name.
if <ls_context_table>-name = const_rulerun_brf_context_name.
get reference of lt_parameters into ls_brf_context_values-value.
else .
* Handover previous result object
ls_brf_context_values-value = <ls_context_table>-dataref_result.
endif.
insert ls_brf_context_values into table lt_brf_context_values.
endloop.
* excecute BRF function
assign <ls_function_meta>-ref_brf_result->* to <lo_brf_result>.
clear <lo_brf_result>.
try.
cl_fdt_function_process=>process( exporting iv_function_id = <ls_function_meta>-function_id
iv_timestamp = gv_timestamp
importing ea_result = <lo_brf_result>
changing ct_name_value = lt_brf_context_values ).
catch cx_fdt into lx_rulerunner_exception.
raise exception type zcx_rulerunner.
* ####ToDo####: error handling
endtry.
* get and store reference of all context values of the BRF-function
loop at <ls_function_meta>-context_t assigning <ls_context_table>.
cl_fdt_function_process=>get_context_value(
exporting
iv_function_id = <ls_function_meta>-function_id " Function ID
iv_data_object = <ls_context_table>-id " Data object: Name or ID
iv_timestamp = gv_timestamp " Desired timestamp
* iv_trace_generation = " ABAP_TRUE: Generation with lean trace
importing
* ev_data = " Data object actual value
er_data = <ls_context_table>-dataref_result " Data object reference pointing to actual value
).
* catch cx_fdt_input. "
* catch cx_fdt_processing. "
endloop. "t <ls_function_meta>-context_t assigning <ls_context_table>
* break-point.
* Map BRF-result to Target-Result
call method zcl_rulerunner=>move_data_source_to_target_int
exporting
io_source_data = <lo_brf_result>
iv_type_kind_source = <ls_function_meta>-type_kind_brf_result
iv_type_kind_target = <ls_function_meta>-type_kind_target
ir_source_struc = <ls_function_meta>-ref_source_struc " contains created source structure
ir_target_struc = <ls_function_meta>-ref_target_struc " contains created target structure
changing
ct_fieldmapping = <ls_function_meta>-fieldmapping_t
co_target_data = eo_target_data.
* write processing log
ls_processing_log-eventid = cs_event_id_data-eventid.
ls_processing_log-functionid = <ls_function_meta>-function_id.
ls_processing_log-resultgroup = <ls_function_meta>-resultgroup.
ls_processing_log-tst_processed = gv_timestamp.
append ls_processing_log to ct_processing_log.
endloop. "at ls_meta_eventtype-functions assigning <ls_function_meta>
*-------------------------------------------------------------
ev_returncode = 0.
* event processed -> set timestamp
cs_event_id_data-tst_processed = gv_timestamp.
endmethod.
method process_stored_events.
************************************************************************
* *
* Processes Event-ID's that are stored in DB table ZRULERUN_EVENTS *
* processes these events or
* returns a table of Event-ID's that can be processed later on *
* *
* *
************************************************************************
*Summary:
* 1. Results of this method:
* 1a. if eo_result_data is supplied then the BRF functioncs are executed
* and the results are exported.
* This option is useful in Non BW Environments, when rulerunner is consumed in ABAP
* 1b. if et_event_id is supplied then all event_id data according to selection criteria are provided
* 2. Calling Options: iv_run_packetised
* 2.a. iv_run_packetised = true:
* -method can be called multiple times with same import parameters
* -each call processes only a data package according to iv_package_size
* -a static database cursor is created during 1st call according to import parameters
* -import parameters are ignored from 2nd call on (only iv_run_packetised = true is required)
* -is useful for SAP BW Datasources
* 2.b. iv_run_packetised = false:
* -all events (according to import parameters) are processed
* -BRF-functions are processed (see 1.a.) in packages according to iv_package_size
*
*
*
data: lv_timestamp_planned_to type zrulerun_timestamp_pla,
lv_timestamp_planned_from type zrulerun_timestamp_pla,
* lv_timestamp_created_to type zrulerun_timestamp_cre,
lv_open_cursor type abap_bool,
lv_package_size type i,
lt_event_id type tyt_event_id,
lt_resultgroups type tyts_resultgroups,
ls_resultgroups type tys_resultgroups,
lt_range_event_types type tyt_range_event_types,
ls_range_event_types type line of tyt_range_event_types,
lv_update_processing_log type abap_bool.
field-symbols:
<ls_event_id> type tys_event_id,
<ls_resultgroups> type tys_resultgroups.
try.
* transfer event_types into rangetab
if it_event_type_range is supplied.
lt_range_event_types = it_event_type_range.
endif.
if iv_event_type is not initial.
ls_range_event_types-option = 'EQ'.
ls_range_event_types-sign = 'I'.
ls_range_event_types-high = iv_event_type.
append ls_range_event_types to lt_range_event_types.
endif.
*Step: check inputs
* if lt_range_event_types is initial .
** event_type is required,
** but not in subsequent packetized calls
* if iv_run_packetised = abap_false
* or (
* iv_run_packetised = abap_true
* and
* gv_packetising_is_active = abap_false "first call
* ).
* return.
* endif.
*
* endif."iv_event_type is initial
*Step: initializations
* clear et_event_id. " in packetized mode we need to append ->no clear!
clear eo_result_data.
*step: determine wether to open a database cursor
if iv_run_packetised = abap_true.
"packetising mode (2.a.)
if gv_db_cursor_events is initial "no cursor
and gv_packetising_is_active = abap_false. "
lv_open_cursor = abap_true.
else.
lv_open_cursor = abap_false.
endif.
else.
"non packetising mode (2.b.)-> always need to open a DB cursor
lv_open_cursor = abap_true.
endif. "iv_run_packetised = abap_true.
*Step: Open DB cursor
if lv_open_cursor = abap_true.
if gv_db_cursor_events is not initial.
close cursor gv_db_cursor_events.
endif.
*------Set Timestamps including Delta-Logic
* set iv_timestamp_planned_to
** Delta-mode
* if iv_use_delta_mode = abap_true.
* lv_timestamp_planned_to = gv_timestamp.
* else.
* Full-Mode + Deltamode: same logic
if iv_timestamp_planned_to is initial.
lv_timestamp_planned_to = gv_timestamp.
else.
lv_timestamp_planned_to = iv_timestamp_planned_to.
endif.
* endif.
* Important: rulerunner stores delta-timestamps per
* Eventtype and Resultgroup
* But BW-datasource transfers only timestamp from / to
* We replace the timestamp from provided by SAP BW
* with the minimum timestamp stored in rulerunner
* set timestamp lv_timestamp_planned_from
if iv_delta_mode = const_delta_mode_delta.
* Important: In Delta-Mode we only support
* a single event_type in iv_event_type
* This is due to different timestamps per event_type in table zrulerun_delta
if it_event_type_range is supplied
and it_event_type_range is not initial.
raise exception type zcx_rulerunner
exporting
* textid =
* previous =
* mt_message =
iv_message_text = 'In Delta-Mode it_event_type_range is not accepted.'.
endif.
get_delta_timestamp(
exporting
it_resultgroups = lt_resultgroups
iv_eventtype = iv_event_type
importing
ev_delta_timestamp = lv_timestamp_planned_from ).
else.
lv_timestamp_planned_from = iv_timestamp_planned_from.
endif.
*------Set Timestamps including Delta-Logic
* : transfer resultgroups into internal format
clear lt_resultgroups.
if iv_resultgroup is supplied and iv_resultgroup is not initial.
ls_resultgroups-resultgroup = iv_resultgroup.
append ls_resultgroups to lt_resultgroups.
endif.
if it_resultgroups is supplied and it_resultgroups is not initial.
* append lines of it_resultgroups to lt_resultgroups .
loop at it_resultgroups assigning <ls_resultgroups>.
if <ls_resultgroups>-resultgroup is not initial.
ls_resultgroups-resultgroup = <ls_resultgroups>-resultgroup.
append ls_resultgroups to lt_resultgroups.
endif.
endloop.
endif.
* open cursor according to selections
open cursor @gv_db_cursor_events for
select
eventid ,
eventtype ,
tst_created ,
tst_planned
* ' ' as resultgroup ,
* ' ' as tst_delta
* , ' ' as function_id
from zrulerun_events
where
eventtype in @lt_range_event_types
and
"tst_planned <= @lv_timestamp_planned
tst_planned between @iv_timestamp_planned_from and @lv_timestamp_planned_to
" events with identical parameters will be processed only once,therefore sort by parahash
order by parahash
.
if sy-subrc = 0. "open cursor @gv_db_cursor_events for ...
* Update Delta-Timestamp
if ( iv_delta_mode = const_delta_mode_delta
or
iv_delta_mode = const_delta_mode_init
)
and iv_update_delta_timestamp = abap_true.
if iv_test_mode = abap_false.
update_delta_timestamp(
exporting
iv_eventtype = iv_event_type
it_resultgroups = lt_resultgroups
iv_timestamp_planned = lv_timestamp_planned_to
).
endif. "iv_test_mode = abap_false
endif. "...
* Test Mode -> no update of processing log
if iv_test_mode = abap_false.
* no test
lv_update_processing_log = iv_update_processing_log.
else.
* test mode -> no update
lv_update_processing_log = abap_false.
endif.
else. "sy-subrc = 0. "open cursor @gv_db_cursor_events for ...
* no db-cursor -> no data & no packetising
ev_no_more_data = abap_true.
gv_packetising_is_active = abap_false.
return.
endif. "sy-subrc = 0. "open cursor @gv_db_cursor_events for ...
endif."lv_open_cursor = abap_true
*==========================
* Fetch data
* determine package size
if iv_package_size is not initial.
lv_package_size = iv_package_size.
else.
lv_package_size = const_db_eventid_package_size.
endif.
check_debug_mode( ).
while gv_db_cursor_events is not initial.
fetch next cursor gv_db_cursor_events
into table lt_event_id
package size lv_package_size.
if sy-subrc = 0.
ev_no_more_data = abap_false.
* set global variables
if iv_run_packetised = abap_true.
gv_packetising_is_active = abap_true.
else.
gv_packetising_is_active = abap_false.
endif.
* return table with event_id data
* is relevant for BW-Datasources:
* if it_resultgroups is not initial.
* read table it_resultgroups assigning <ls_resultgroups>
* index 1.
* endif.
** enhance event_id data from input variable data
loop at lt_event_id assigning <ls_event_id>.
if iv_delta_mode = abap_true.
<ls_event_id>-tst_delta = lv_timestamp_planned_to.
endif.
** if one or more resultgroups are requested
** we transfer the first resultgroup
** that seems odd, but in a BW datasource only one resultgroup is allowed
* if <ls_resultgroups> is assigned.
* <ls_event_id>-resultgroup = <ls_resultgroups>-resultgroup.
* endif.
endloop.
append lines of lt_event_id to et_event_id.
* ---------------------------------
* process brf-functions?
if eo_result_data is supplied.
** need to process the events and return the result
* STep: Process all events in lt_event_id
process_multiple_eventids_int(
exporting
it_table_with_eventid = lt_event_id
iv_update_processing_log = lv_update_processing_log
iv_repeat_processing = iv_repeat_processing
iv_package_size = lv_package_size
it_resultgroups = lt_resultgroups
importing
eo_result_data = eo_result_data
* changing
* ct_brf_function_list = lt_brf_function_list
).
endif."eo_result_data is supplied
* --------------------------------------------
* when packetising, we return after one fetch
if gv_packetising_is_active = abap_true.
return.
endif.
else." sy-subrc = 0.
* no more data -> end of packetising
ev_no_more_data = abap_true.
gv_packetising_is_active = abap_false.
close cursor gv_db_cursor_events.
return.
endif. " sy-subrc = 0.
endwhile."gv_db_cursor_events is not initial.
catch cx_root.
raise exception type zcx_rulerunner
exporting
iv_message_text = 'Error while processing stored events'.
endtry.
endmethod."process_stored_events
method remove_already_processed_event.
data: lt_range_resultgroup type tyt_range_resultgroups,
lt_event_id_processed type tyth_event_id,
lt_event_data_temp type tyt_zrulerun_events.
field-symbols: <ls_event_data> like line of ct_event_data.
* importing it_resultgroups type zcl_rulerunner=>tyts_resultgroups
* changing ct_event_data type zcl_rulerunner=>tyt_zrulerun_events
* data:
* already processed events must be excluded
* Note: this cannot be done with left outer join ( event+delta) due to LOB column PARAJSON
* Step: check inputs
if ct_event_data is initial.
return.
endif.
* need resultgroup rangetab for use in SQL statement
create_resultgroup_range(
exporting
it_resultgroups = it_resultgroups
importing
et_range_resultgroups = lt_range_resultgroup
).
* get already processed events ( per resultgroup)
if lt_range_resultgroup is initial.
* resultgroup independend select
select eventid from zrulerun_plog
into table lt_event_id_processed
for all entries in ct_event_data
where eventid = ct_event_data-eventid
and resultgroup = ''
and tst_processed <> ''.
else. "lt_range_resultgroup is initial.
* resultgroup dependend select
select eventid from zrulerun_plog
into table lt_event_id_processed
for all entries in ct_event_data
where eventid = ct_event_data-eventid
and resultgroup in lt_range_resultgroup
and tst_processed <> ''.
endif. "lt_range_resultgroup is initial.
* remove already processed events from lt_event_data
loop at ct_event_data assigning <ls_event_data>.
* NOte: lt_event_id_processed is initial when "iv_select_processed_events = true
read table lt_event_id_processed
with key eventid = <ls_event_data>-eventid
transporting no fields.
if sy-subrc <> 0. "not found
* eventid was not processed
* -> must be processed
append <ls_event_data> to lt_event_data_temp.
endif.
endloop.
ct_event_data = lt_event_data_temp.
clear lt_event_data_temp.
endmethod.
method select_for_all_entries_in.
data:
lv_select_from_table_name type string,
lv_temp_string type string,
lt_where_condition type table of string,
lrt_for_all type ref to data,
lrs_for_all type ref to data,
lrt_export type ref to data,
lrs_et_result_data type ref to data,
lx_root type ref to cx_root.
field-symbols: <lt_for_all> type standard table,
<lt_export> type standard table,
<ls_export> type any,
<ls_it_for_all> type any,
<ls_lt_for_all> type any,
<lv_field_source> type any,
<lv_field_target> type any,
<ls_et_result_data> type any.
try.
* Check inputs
if iv_select_from_table_name is initial.
return.
endif.
if it_for_all_entries_table is initial.
return.
endif.
if iv_for_all_entries_tablename is initial.
return.
endif.
if iv_where_field_1_db is initial
or
iv_where_field_1_for_all is initial.
return.
endif.
* create dynamic data objects w/ flat structure for SQL Statement
* BRF+ generates nested structures for date-fields
"we need to create an internal table with flat fields
* BRF-TAbles have complex structures
create data lrt_for_all type standard table of (iv_for_all_entries_tablename).
create data lrs_for_all type (iv_for_all_entries_tablename).
create data lrt_export type standard table of (iv_select_from_table_name).
"get reference of it_for_all_entries_table into lr_for_all.
assign lrt_for_all->* to <lt_for_all>.
assign lrs_for_all->* to <ls_lt_for_all>.
assign lrt_export->* to <lt_export>.
* break-point.
* transform it_for_all_entries_table into internal format ( flat)
loop at it_for_all_entries_table assigning <ls_it_for_all>.
* move-corresponding <ls_it_for_all> to <ls_lt_for_all>."does not work due to nested structures of BRF
assign component iv_where_field_1_for_all of structure <ls_it_for_all> to <lv_field_source>.
assign component iv_where_field_1_for_all of structure <ls_lt_for_all> to <lv_field_target>.
<lv_field_target> = <lv_field_source>.
* 2.field
if iv_where_field_2_db is supplied and iv_where_field_2_db is not initial
and iv_where_field_2_for_all is supplied and iv_where_field_2_for_all is not initial.
assign component iv_where_field_2_for_all of structure <ls_it_for_all> to <lv_field_source>.
assign component iv_where_field_2_for_all of structure <ls_lt_for_all> to <lv_field_target>.
<lv_field_target> = <lv_field_source>.
endif.
* 3.field
if iv_where_field_3_db is supplied and iv_where_field_3_db is not initial
and iv_where_field_3_for_all is supplied and iv_where_field_3_for_all is not initial.
assign component iv_where_field_3_for_all of structure <ls_it_for_all> to <lv_field_source>.
assign component iv_where_field_3_for_all of structure <ls_lt_for_all> to <lv_field_target>.
<lv_field_target> = <lv_field_source>.
endif.
* 4.field
if iv_where_field_4_db is supplied and iv_where_field_4_db is not initial
and iv_where_field_4_for_all is supplied and iv_where_field_4_for_all is not initial.
assign component iv_where_field_4_for_all of structure <ls_it_for_all> to <lv_field_source>.
assign component iv_where_field_4_for_all of structure <ls_lt_for_all> to <lv_field_target>.
<lv_field_target> = <lv_field_source>.
endif.
* 5.field
if iv_where_field_5_db is supplied and iv_where_field_5_db is not initial
and iv_where_field_5_for_all is supplied and iv_where_field_5_for_all is not initial.
assign component iv_where_field_5_for_all of structure <ls_it_for_all> to <lv_field_source>.
assign component iv_where_field_5_for_all of structure <ls_lt_for_all> to <lv_field_target>.
<lv_field_target> = <lv_field_source>.
endif.
append <ls_lt_for_all> to <lt_for_all>.
endloop.
lv_select_from_table_name = iv_select_from_table_name.
condense lv_select_from_table_name no-gaps.
* create where condition into table lt_where_condition
* first condition
concatenate iv_where_field_1_db ' = <lt_for_all>-' iv_where_field_1_for_all into lv_temp_string respecting blanks.
append lv_temp_string to lt_where_condition.
* second condition
if iv_where_field_2_db is supplied and iv_where_field_2_db is not initial
and iv_where_field_2_for_all is supplied and iv_where_field_2_for_all is not initial.
concatenate ' AND ' iv_where_field_2_db ' = <lt_for_all>-' iv_where_field_2_for_all into lv_temp_string respecting blanks.
append lv_temp_string to lt_where_condition.
endif.
* 3' condition
if iv_where_field_3_db is supplied and iv_where_field_3_db is not initial
and iv_where_field_3_for_all is supplied and iv_where_field_3_for_all is not initial.
concatenate ' AND ' iv_where_field_3_db ' = <lt_for_all>-' iv_where_field_3_for_all into lv_temp_string respecting blanks.
append lv_temp_string to lt_where_condition.
endif.
* 4' condition
if iv_where_field_4_db is supplied and iv_where_field_4_db is not initial
and iv_where_field_4_for_all is supplied and iv_where_field_4_for_all is not initial.
concatenate ' AND ' iv_where_field_4_db ' = <lt_for_all>-' iv_where_field_4_for_all into lv_temp_string respecting blanks.
append lv_temp_string to lt_where_condition.
endif.
* 5' condition
if iv_where_field_5_db is supplied and iv_where_field_5_db is not initial
and iv_where_field_5_for_all is supplied and iv_where_field_5_for_all is not initial.
concatenate ' AND ' iv_where_field_5_db ' = <lt_for_all>-' iv_where_field_5_for_all into lv_temp_string respecting blanks.
append lv_temp_string to lt_where_condition.
endif.
* finally select data from DB
select * from (iv_select_from_table_name)
into table <lt_export>
for all entries in <lt_for_all>
where (lt_where_condition).
move_data_source_to_target(
exporting
io_source_data = <lt_export>
importing
eo_target_data = et_result_data
).
catch cx_root.
raise exception type zcx_rulerunner
exporting
iv_message_text = 'Error in select for all entries in'.
return.
endtry.
endmethod.
method set_debug_mode.
gv_debug_mode = iv_debug_mode.
endmethod.
method set_timestamp.
get time stamp field gv_timestamp.
endmethod.
method show_rulerunner_customizing.
* calls BRF workbench with rulerunner application
* Optional parameter iv_brf_component_id allows to navigate to an arbitrary object
data: lo_ui_exec type ref to if_fdt_wd_ui_execution,
lo_wd_instance type ref to if_fdt_wd_factory,
lv_brf_component_id type zrulerun_functionid.
try.
lo_wd_instance = cl_fdt_wd_factory=>get_instance( ).
lo_ui_exec = lo_wd_instance->get_ui_execution( ).
* The if_fdt_wd_ui_execution interface has a function to call the workbench, optionally specifying an object using the IV_ID importing parameter.
*break-point.
if iv_brf_component_id is initial.
get_function_id(
exporting
iv_function_id = '' " BRFplus: Function ID
iv_function_name = const_rulerun_brf_functionname " BRFplus Function Name
iv_application_name = const_rulerun_brf_applicatname" BRFplus Application name
importing
ev_function_id = lv_brf_component_id " BRFplus: Function ID
).
else.
lv_brf_component_id = iv_brf_component_id.
endif.
lo_ui_exec->execute_workbench(
exporting
iv_id = lv_brf_component_id " ID
* iv_timestamp = " Timestamp
* iv_display_mode = " Display Mode
)..
catch cx_root.
raise exception type zcx_rulerunner
exporting
iv_message_text = 'Error while showing rr customizing'.
return.
endtry.
endmethod.
method update_delta_timestamp.
data: ls_delta type zrulerun_delta.
field-symbols: <ls_resultgroups> type tys_resultgroups.
ls_delta-eventtype = iv_eventtype.
ls_delta-tst_planned = iv_timestamp_planned.
if it_resultgroups is initial.
modify zrulerun_delta from ls_delta.
else.
loop at it_resultgroups assigning <ls_resultgroups>.
ls_delta-resultgroup = <ls_resultgroups>-resultgroup.
modify zrulerun_delta from ls_delta.
endloop.
endif.
endmethod.
method update_processing_log.
************************************************************************
* *
* Updates the Process-Timestamps in table zrulerun_plog (Alias "PLOG" *
* *
* *
************************************************************************
*
* Summary:
* Method updates the processing log for events that are stored in table zrulerun_events
* When executing multiple events rulerunner checks for Events with identical parameters.
* Events with identical parameters are executed only once!!!
* But the PLOG must be updated also for events that have been skipped
* it_event_data: contains eventid's that must be updated in PLOG
* it_range_resultgroups: contains resultgroups that must be updated in PLOG
* it_processing_log: contains
data: lt_event_plog_timestamps type standard table of zrulerun_plog,
ls_event_plog_timestamps type zrulerun_plog,
lts_processing_log type tyts_processing_log.
field-symbols:
<ls_event_id> type zrulerun_events,
<ls_resultgroups> type tys_resultgroups,
<ls_processing_log> type tys_processing_log.
*Step: initializations
*Step: check inputs
if it_event_data is initial.
return.
endif.
*Debugging?
zcl_rulerunner=>check_debug_mode( ).
*Step: Performance:
lts_processing_log = it_processing_log.
*Step: process it_event_data
loop at it_event_data assigning <ls_event_id>.
clear ls_event_plog_timestamps.
* Eventid
ls_event_plog_timestamps-eventid = <ls_event_id>-eventid.
* set "Timestamp processed"
ls_event_plog_timestamps-tst_processed = gv_timestamp.
if it_resultgroups is initial.
* event really processed when record in it_processing_log exists
loop at it_processing_log assigning <ls_processing_log>
where eventid = <ls_event_id>-eventid
and resultgroup = ''.
ls_event_plog_timestamps-resultgroup = ''.
ls_event_plog_timestamps-functionid = <ls_processing_log>-functionid.
ls_event_plog_timestamps-tst_processed = <ls_processing_log>-tst_processed.
append ls_event_plog_timestamps to lt_event_plog_timestamps.
endloop.
if sy-subrc <> 0. " no processing log -> record skipped
ls_event_plog_timestamps-skipped = abap_true.
append ls_event_plog_timestamps to lt_event_plog_timestamps.
endif.
else. "it_resultgroups is initial.
"-----
loop at it_resultgroups assigning <ls_resultgroups>.
ls_event_plog_timestamps-resultgroup = <ls_resultgroups>-resultgroup.
* event really processed when record in it_processing_log exists
loop at it_processing_log assigning <ls_processing_log>
where eventid = <ls_event_id>-eventid
and resultgroup = <ls_resultgroups>-resultgroup .
ls_event_plog_timestamps-functionid = <ls_processing_log>-functionid.
ls_event_plog_timestamps-tst_processed = <ls_processing_log>-tst_processed.
append ls_event_plog_timestamps to lt_event_plog_timestamps.
endloop. "at it_processing_log assigning <ls_processing_log>
if sy-subrc <> 0. " no processing log -> record skipped
ls_event_plog_timestamps-skipped = abap_true.
append ls_event_plog_timestamps to lt_event_plog_timestamps.
endif.
endloop. "at it_resultgroups assigning <ls_resultgroups>.
"-----
endif. "it_resultgroups is initial.
endloop. "at it_event_data assigning <ls_event_id>.
*Step: modify database table
* ####ToDo####: DB-Table Locking
modify zrulerun_plog from table lt_event_plog_timestamps.
endmethod.
ENDCLASS.
| [
4871,
1976,
565,
62,
81,
18173,
403,
1008,
6770,
198,
220,
1171,
198,
220,
2251,
1171,
764,
628,
220,
1171,
2665,
13,
198,
9,
220,
220,
220,
3858,
25,
198,
220,
220,
220,
3858,
25,
1259,
85,
62,
9641,
2099,
269,
4129,
1315,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1259,
83,
62,
9641,
2099,
3084,
286,
1259,
85,
62,
9641,
13,
198,
220,
220,
220,
3858,
25,
1259,
85,
62,
67,
12514,
62,
14171,
2099,
269,
4129,
352,
13,
198,
220,
220,
220,
3858,
25,
1259,
85,
62,
65,
86,
62,
929,
67,
62,
14171,
2099,
269,
4129,
362,
13,
198,
220,
220,
220,
3858,
25,
1259,
85,
62,
65,
86,
62,
25927,
2099,
269,
4129,
1542,
13,
198,
220,
220,
220,
3858,
25,
1259,
85,
62,
26495,
62,
7857,
2099,
299,
4129,
718,
13,
198,
220,
220,
220,
3858,
25,
1259,
83,
62,
81,
18173,
403,
62,
31534,
2099,
3210,
3084,
286,
1976,
81,
18173,
403,
62,
31534,
13,
198,
220,
220,
220,
3858,
1259,
85,
62,
49283,
62,
14171,
2099,
269,
4129,
362,
13,
198,
220,
220,
220,
3858,
25,
198,
220,
220,
220,
220,
220,
1259,
83,
62,
89,
81,
18173,
403,
62,
31534,
2099,
3210,
3084,
286,
1976,
81,
18173,
403,
62,
31534,
764,
198,
220,
220,
220,
3858,
1259,
85,
62,
31438,
62,
3672,
2099,
277,
28664,
62,
31438,
62,
3672,
764,
198,
220,
220,
220,
3858,
1259,
85,
62,
8818,
62,
3672,
2099,
277,
28664,
62,
8818,
62,
3672,
764,
198,
220,
220,
220,
3858,
25,
198,
220,
220,
220,
220,
220,
2221,
286,
256,
893,
62,
8818,
62,
4868,
11,
198,
220,
220,
220,
220,
220,
220,
220,
3586,
62,
3672,
2099,
220,
1259,
85,
62,
31438,
62,
3672,
11,
198,
220,
220,
220,
220,
220,
220,
220,
2163,
62,
3672,
220,
220,
220,
2099,
220,
1259,
85,
62,
8818,
62,
3672,
11,
198,
220,
220,
220,
220,
220,
220,
220,
2163,
62,
312,
220,
220,
220,
220,
220,
2099,
220,
1976,
81,
18173,
403,
62,
8818,
312,
11,
198,
220,
220,
220,
220,
220,
886,
286,
256,
893,
62,
8818,
62,
4868,
764,
198,
220,
220,
220,
3858,
25,
198,
220,
220,
220,
220,
220,
1259,
400,
62,
8818,
62,
4868,
2099,
468,
704,
3084,
286,
256,
893,
62,
8818,
62,
4868,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
351,
3748,
1994,
220,
3586,
62,
3672,
2163,
62,
3672,
764,
198,
220,
220,
220,
3858,
25,
198,
9,
220,
220,
220,
220,
220,
2221,
286,
256,
893,
62,
20274,
24432,
11,
198,
9,
220,
220,
220,
220,
220,
220,
220,
1255,
8094,
2099,
1976,
81,
18173,
403,
62,
20274,
8094,
11,
198,
9,
220,
220,
220,
220,
220,
886,
286,
256,
893,
62,
20274,
24432,
11,
198,
220,
220,
220,
220,
220,
256,
893,
62,
20274,
24432,
220,
2099,
1976,
81,
18173,
403,
62,
20274,
24432,
62,
82,
11,
198,
220,
220,
220,
220,
220,
1259,
912,
62,
20274,
24432,
2099,
1976,
81,
18173,
403,
62,
20274,
24432,
62,
83,
13,
198,
9,
220,
220,
220,
220,
220,
1259,
912,
62,
20274,
24432,
2099,
23243,
3084,
286,
256,
893,
62,
20274,
24432,
198,
9,
220,
220,
220,
220,
220,
220,
220,
220,
351,
1729,
12,
34642,
1994,
1255,
8094,
526,
13159,
12,
34642,
30940,
8563,
618,
19319,
14184,
16856,
198,
220,
220,
220,
3858,
25,
198,
220,
220,
220,
220,
220,
2221,
286,
256,
893,
62,
15596,
62,
312,
13,
198,
220,
220,
220,
220,
220,
220,
220,
2291,
2099,
1976,
81,
18173,
403,
62,
15596,
62,
19608,
292,
1668,
62,
82,
764,
198,
9,
220,
220,
220,
220,
220,
220,
220,
1785,
312,
2099,
1976,
81,
18173,
403,
62,
1990,
83,
312,
11,
198,
9,
220,
220,
220,
220,
220,
220,
220,
2163,
62,
312,
2099,
1976,
81,
18173,
403,
62,
8818,
312,
11,
198,
220,
220,
220,
3858,
25,
220,
886,
286,
256,
893,
62,
15596,
62,
312,
764,
198,
220,
220,
220,
3858,
25,
198,
220,
220,
220,
220,
220,
1259,
83,
62,
15596,
62,
312,
220,
2099,
3210,
3084,
286,
256,
893,
62,
15596,
62,
312,
11,
198,
220,
220,
220,
220,
220,
1259,
400,
62,
15596,
62,
312,
2099,
468,
704,
3084,
286,
256,
893,
62,
15596,
62,
312,
198,
220,
220,
220,
220,
220,
220,
220,
351,
3748,
1994,
1785,
312,
764,
198,
9,
220,
13667,
12,
51,
2977,
198,
220,
220,
220,
3858,
25,
198,
9,
220,
220,
220,
220,
220,
1259,
83,
62,
9521,
62,
8818,
312,
220,
2099,
2837,
286,
1976,
81,
18173,
403,
62,
8818,
312,
837,
198,
220,
220,
220,
220,
220,
220,
220,
1259,
83,
62,
9521,
62,
20274,
24432,
2099,
2837,
286,
1976,
81,
18173,
403,
62,
20274,
8094,
13,
198,
220,
220,
220,
3858,
25,
198,
220,
220,
220,
220,
220,
1259,
83,
62,
9521,
62,
15596,
62,
312,
220,
220,
220,
2099,
2837,
286,
1976,
81,
18173,
403,
62,
1990,
83,
312,
764,
198,
220,
220,
220,
3858,
25,
198,
220,
220,
220,
220,
220,
1259,
83,
62,
9521,
62,
15596,
62,
19199,
2099,
2837,
286,
1976,
81,
18173,
403,
62,
1990,
28004,
764,
198,
220,
220,
220,
3858,
25,
198,
220,
220,
220,
220,
220,
1259,
83,
62,
9521,
62,
16514,
27823,
220,
220,
2099,
2837,
286,
1976,
81,
18173,
403,
62,
16514,
27823,
62,
7513,
764,
198,
220,
220,
220,
3858,
25,
198,
220,
220,
220,
220,
220,
2221,
286,
256,
893,
62,
15596,
62,
22252,
62,
5589,
533,
11,
198,
220,
220,
220,
220,
220,
220,
220,
1785,
4906,
220,
220,
220,
220,
2099,
1976,
81,
18173,
403,
62,
1990,
28004,
11,
198,
220,
220,
220,
220,
220,
220,
220,
256,
301,
62,
25598,
220,
220,
2099,
1976,
81,
18173,
403,
62,
16514,
27823,
62,
7513,
11,
198,
220,
220,
220,
220,
220,
220,
220,
256,
301,
62,
36800,
220,
220,
2099,
1976,
81,
18173,
403,
62,
16514,
27823,
62,
489,
64,
11,
198,
220,
220,
220,
220,
220,
220,
220,
256,
301,
62,
14681,
276,
2099,
1976,
81,
18173,
403,
62,
16514,
27823,
62,
1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1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS zcl_swag_spec DEFINITION
PUBLIC
CREATE PUBLIC .
PUBLIC SECTION.
METHODS constructor
IMPORTING
!iv_title TYPE clike
!iv_description TYPE clike
!it_meta TYPE zcl_swag=>ty_meta_internal_tt
!iv_base TYPE clike .
METHODS generate
RETURNING
VALUE(rv_spec) TYPE string .
PROTECTED SECTION.
DATA mv_title TYPE string .
DATA mv_description TYPE string .
DATA mt_meta TYPE zcl_swag=>ty_meta_internal_tt .
DATA mv_base TYPE string .
DATA mt_definitions TYPE string_table .
METHODS request
IMPORTING
!is_meta TYPE zcl_swag=>ty_meta_internal
!is_parameter TYPE seosubcodf .
METHODS definitions
RETURNING
VALUE(rv_defs) TYPE string .
METHODS path
IMPORTING
!is_meta TYPE zcl_swag=>ty_meta_internal
RETURNING
VALUE(rv_path) TYPE string .
METHODS parameters
IMPORTING
!is_meta TYPE zcl_swag=>ty_meta_internal
RETURNING
VALUE(rv_parameters) TYPE string .
METHODS response
IMPORTING
!is_meta TYPE zcl_swag=>ty_meta_internal
RETURNING
VALUE(rv_response) TYPE string .
PRIVATE SECTION.
ENDCLASS.
CLASS ZCL_SWAG_SPEC IMPLEMENTATION.
METHOD constructor.
mv_title = iv_title.
mv_description = iv_description.
mt_meta = it_meta.
mv_base = iv_base.
ENDMETHOD.
METHOD definitions.
DATA: lv_string TYPE string,
lv_sep TYPE string,
lt_string TYPE STANDARD TABLE OF string WITH DEFAULT KEY.
APPEND ' "definitions":{' TO lt_string.
lv_sep = |,\n|.
CONCATENATE LINES OF mt_definitions INTO lv_string SEPARATED BY lv_sep.
APPEND lv_string TO lt_string.
APPEND ' }' TO lt_string.
CONCATENATE LINES OF lt_string INTO rv_defs
SEPARATED BY cl_abap_char_utilities=>newline.
ENDMETHOD.
METHOD generate.
DEFINE _add.
CONCATENATE rv_spec &1 cl_abap_char_utilities=>newline
INTO rv_spec ##NO_TEXT.
END-OF-DEFINITION.
TYPES: BEGIN OF ty_path,
path TYPE string,
meta LIKE mt_meta,
END OF ty_path.
DATA: lt_paths TYPE TABLE OF ty_path,
lv_last_path TYPE abap_bool,
lv_last_meta TYPE abap_bool,
lv_path TYPE string,
lv_tags TYPE string,
lv_add TYPE string.
FIELD-SYMBOLS: <ls_path> LIKE LINE OF lt_paths,
<ls_meta> LIKE LINE OF mt_meta.
* handle path with multiple handlers(ie. GET and POST)
LOOP AT mt_meta ASSIGNING <ls_meta>.
lv_path = path( <ls_meta> ).
READ TABLE lt_paths ASSIGNING <ls_path> WITH KEY path = lv_path.
IF sy-subrc <> 0.
APPEND INITIAL LINE TO lt_paths ASSIGNING <ls_path>.
<ls_path>-path = lv_path.
ENDIF.
APPEND <ls_meta> TO <ls_path>-meta.
ENDLOOP.
_add '{'.
_add ' "swagger":"2.0",'.
_add ' "info":{ '.
_add ' "version":"1.0.0",'.
lv_add = | "title":"{ mv_title }",|.
_add lv_add.
lv_add = | "description":"{ mv_description }"|.
_add lv_add.
_add ' },'.
lv_add = | "basePath":"{ mv_base }",|.
_add lv_add.
_add ' "securityDefinitions": {'.
_add ' "basicAuth": {"type": "basic"}'.
_add ' },'.
_add ' "security": ['.
_add ' {"basicAuth": []}'.
_add ' ],'.
_add ' "schemes":['.
_add ' "http"'.
_add ' ],'.
_add ' "consumes":['.
_add ' "application/json"'.
_add ' ],'.
_add ' "produces":['.
_add ' "application/json"'.
_add ' ],'.
_add ' "paths":{'.
LOOP AT lt_paths ASSIGNING <ls_path>.
lv_last_path = boolc( sy-tabix = lines( lt_paths ) ).
lv_add = | "{ <ls_path>-path }":\{|.
_add lv_add.
LOOP AT <ls_path>-meta ASSIGNING <ls_meta>.
lv_last_meta = boolc( sy-tabix = lines( <ls_path>-meta ) ).
lv_add = | "{ to_lower( <ls_meta>-meta-method ) }":\{|.
_add lv_add.
IF lines( <ls_meta>-meta-tags ) > 0.
CONCATENATE LINES OF <ls_meta>-meta-tags INTO lv_tags SEPARATED BY '", "'.
lv_add = | "tags":["{ lv_tags }"],|.
_add lv_add.
ENDIF.
lv_add = | "summary":"{ <ls_meta>-meta-summary }",|.
_add lv_add.
lv_add = | "description":"",|.
_add lv_add.
lv_add = parameters( <ls_meta> ).
_add lv_add.
_add ' "produces":['.
READ TABLE <ls_meta>-parameters WITH KEY
pardecltyp = zcl_swag=>c_parm_kind-returning
type = 'STRING' TRANSPORTING NO FIELDS.
IF sy-subrc = 0.
_add '"text/plain"'.
ELSE.
_add '"application/json"'.
ENDIF.
_add ' ],'.
_add ' "responses":{'.
lv_add = response( <ls_meta> ).
_add lv_add.
_add ' "401":{'.
_add ' "description":"not authorized"'.
_add ' },'.
_add ' "404":{'.
_add ' "description":"not found"'.
_add ' },'.
_add ' "500":{'.
_add ' "description":"error"'.
_add ' }'.
_add ' }'.
_add ' }'.
IF lv_last_meta = abap_false.
_add ','.
ENDIF.
ENDLOOP.
_add ' }'.
IF lv_last_path = abap_false.
_add ','.
ENDIF.
ENDLOOP.
_add ' },'.
lv_add = definitions( ).
_add lv_add.
_add '}'.
ENDMETHOD.
METHOD parameters.
DATA: lt_string TYPE TABLE OF string,
lv_string LIKE LINE OF lt_string,
lv_type TYPE string,
lo_map TYPE REF TO zcl_swag_map_type.
FIELD-SYMBOLS: <ls_parameter> LIKE LINE OF is_meta-parameters.
APPEND '"parameters":[' TO lt_string.
LOOP AT is_meta-parameters ASSIGNING <ls_parameter>
WHERE pardecltyp = zcl_swag=>c_parm_kind-importing.
APPEND '{' TO lt_string.
CONCATENATE '"name":"' <ls_parameter>-sconame '",' INTO lv_string.
APPEND lv_string TO lt_string.
READ TABLE is_meta-meta-url-group_names FROM <ls_parameter>-sconame
TRANSPORTING NO FIELDS.
IF sy-subrc = 0.
APPEND '"in":"path",' TO lt_string.
ELSEIF is_meta-meta-method = zcl_swag=>c_method-get.
APPEND '"in":"query",' TO lt_string.
ELSE.
APPEND '"in":"body",' TO lt_string.
lv_string = |"schema": \{"$ref": "#/definitions/{ is_meta-meta-handler }_Request"\}|.
APPEND lv_string TO lt_string.
APPEND '},' TO lt_string.
request( is_meta = is_meta
is_parameter = <ls_parameter> ).
CONTINUE.
ENDIF.
APPEND '"description":"",' TO lt_string.
CREATE OBJECT lo_map
EXPORTING
is_param = <ls_parameter>.
lv_type = lo_map->map( ).
CONCATENATE lv_type ',' INTO lv_string.
APPEND lv_string TO lt_string.
IF <ls_parameter>-paroptionl = abap_true.
APPEND '"required":false' TO lt_string.
ELSE.
APPEND '"required":true' TO lt_string.
ENDIF.
APPEND '},' TO lt_string.
ENDLOOP.
IF sy-subrc = 0.
* fix the comma
DELETE lt_string INDEX lines( lt_string ).
APPEND '}' TO lt_string.
ENDIF.
APPEND '],' TO lt_string.
CONCATENATE LINES OF lt_string INTO rv_parameters
SEPARATED BY cl_abap_char_utilities=>newline.
ENDMETHOD.
METHOD path.
DATA: lv_name TYPE string,
lv_offset1 TYPE i,
lv_offset2 TYPE i.
rv_path = is_meta-meta-url-regex.
REPLACE ALL OCCURRENCES OF '$' IN rv_path WITH ''.
* replace the regex groups like (\w*) with swagger identifies {IV_NAME}
LOOP AT is_meta-meta-url-group_names INTO lv_name.
FIND FIRST OCCURRENCE OF '(' IN rv_path MATCH OFFSET lv_offset1.
FIND FIRST OCCURRENCE OF ')' IN rv_path MATCH OFFSET lv_offset2.
lv_offset2 = lv_offset2 + 1.
CONCATENATE rv_path(lv_offset1) '{' lv_name '}' rv_path+lv_offset2 INTO rv_path.
ENDLOOP.
ENDMETHOD.
METHOD request.
DATA: lo_map TYPE REF TO zcl_swag_map_type,
lv_string TYPE string,
lv_type TYPE string.
CREATE OBJECT lo_map
EXPORTING
is_param = is_parameter
iv_schema = abap_false.
lv_type = lo_map->map( ).
* todo, basic/simple types?
lv_string = |"{ is_meta-meta-handler }_Request": \{{ lv_type }\}|.
APPEND lv_string TO mt_definitions.
ENDMETHOD.
METHOD response.
DATA: lt_string TYPE TABLE OF string,
lv_type TYPE string,
lv_string TYPE string,
lo_map TYPE REF TO zcl_swag_map_type.
FIELD-SYMBOLS: <ls_parameter> LIKE LINE OF is_meta-parameters.
APPEND '"200": {' TO lt_string.
READ TABLE is_meta-parameters WITH KEY pardecltyp = zcl_swag=>c_parm_kind-returning
TRANSPORTING NO FIELDS.
IF sy-subrc = 0.
APPEND ' "description": "successful operation",' TO lt_string.
ELSE.
APPEND ' "description": "successful operation"' TO lt_string.
ENDIF.
LOOP AT is_meta-parameters ASSIGNING <ls_parameter>
WHERE pardecltyp = zcl_swag=>c_parm_kind-returning.
CREATE OBJECT lo_map
EXPORTING
is_param = <ls_parameter>
iv_schema = abap_false.
lv_type = lo_map->map( ).
APPEND '"schema": {' TO lt_string.
lv_string = |"$ref": "#/definitions/{ is_meta-meta-handler }_Response"|.
APPEND lv_string TO lt_string.
APPEND '}' TO lt_string.
lv_string = |"{ is_meta-meta-handler }_Response":\{"type": "object","properties": \{"DATA": \{{ lv_type }\}\}\}|.
APPEND lv_string TO mt_definitions.
ENDLOOP.
APPEND '},' TO lt_string.
CONCATENATE LINES OF lt_string INTO rv_response
SEPARATED BY cl_abap_char_utilities=>newline.
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
2032,
363,
62,
16684,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
29244,
6158,
44731,
764,
628,
220,
44731,
44513,
13,
628,
220,
220,
220,
337,
36252,
50,
23772,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
7839,
220,
220,
220,
220,
220,
220,
41876,
537,
522,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
11213,
41876,
537,
522,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
270,
62,
28961,
220,
220,
220,
220,
220,
220,
220,
41876,
1976,
565,
62,
2032,
363,
14804,
774,
62,
28961,
62,
32538,
62,
926,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
8692,
220,
220,
220,
220,
220,
220,
220,
41876,
537,
522,
764,
198,
220,
220,
220,
337,
36252,
50,
7716,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
81,
85,
62,
16684,
8,
41876,
4731,
764,
198,
220,
48006,
9782,
1961,
44513,
13,
628,
220,
220,
220,
42865,
285,
85,
62,
7839,
41876,
4731,
764,
198,
220,
220,
220,
42865,
285,
85,
62,
11213,
41876,
4731,
764,
198,
220,
220,
220,
42865,
45079,
62,
28961,
41876,
1976,
565,
62,
2032,
363,
14804,
774,
62,
28961,
62,
32538,
62,
926,
764,
198,
220,
220,
220,
42865,
285,
85,
62,
8692,
41876,
4731,
764,
198,
220,
220,
220,
42865,
45079,
62,
4299,
50101,
41876,
4731,
62,
11487,
764,
628,
220,
220,
220,
337,
36252,
50,
2581,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
271,
62,
28961,
220,
220,
220,
220,
220,
41876,
1976,
565,
62,
2032,
363,
14804,
774,
62,
28961,
62,
32538,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
271,
62,
17143,
2357,
41876,
384,
418,
549,
19815,
69,
764,
198,
220,
220,
220,
337,
36252,
50,
17336,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
81,
85,
62,
4299,
82,
8,
41876,
4731,
764,
198,
220,
220,
220,
337,
36252,
50,
3108,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
271,
62,
28961,
220,
220,
220,
220,
220,
220,
41876,
1976,
565,
62,
2032,
363,
14804,
774,
62,
28961,
62,
32538,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
81,
85,
62,
6978,
8,
41876,
4731,
764,
198,
220,
220,
220,
337,
36252,
50,
10007,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
271,
62,
28961,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
1976,
565,
62,
2032,
363,
14804,
774,
62,
28961,
62,
32538,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
81,
85,
62,
17143,
7307,
8,
41876,
4731,
764,
198,
220,
220,
220,
337,
36252,
50,
2882,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
271,
62,
28961,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
1976,
565,
62,
2032,
363,
14804,
774,
62,
28961,
62,
32538,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
81,
85,
62,
26209,
8,
41876,
4731,
764,
198,
220,
4810,
3824,
6158,
44513,
13,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1168,
5097,
62,
17887,
4760,
62,
48451,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
23772,
13,
628,
220,
220,
220,
285,
85,
62,
7839,
220,
220,
220,
220,
220,
220,
796,
21628,
62,
7839,
13,
198,
220,
220,
220,
285,
85,
62,
11213,
796,
21628,
62,
11213,
13,
198,
220,
220,
220,
45079,
62,
28961,
220,
220,
220,
220,
220,
220,
220,
796,
340,
62,
28961,
13,
198,
220,
220,
220,
285,
85,
62,
8692,
220,
220,
220,
220,
220,
220,
220,
796,
21628,
62,
8692,
13,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
17336,
13,
628,
220,
220,
220,
42865,
25,
300,
85,
62,
8841,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
325,
79,
220,
220,
220,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
83,
62,
8841,
41876,
49053,
9795,
43679,
3963,
4731,
13315,
5550,
38865,
35374,
13,
628,
198,
220,
220,
220,
43504,
10619,
705,
220,
366,
4299,
50101,
1298,
90,
6,
5390,
300,
83,
62,
8841,
13,
628,
220,
220,
220,
300,
85,
62,
325,
79,
796,
930,
11,
59,
77,
91,
13,
198,
220,
220,
220,
39962,
1404,
1677,
6158,
43277,
1546,
3963,
45079,
62,
4299,
50101,
39319,
300,
85,
62,
8841,
7946,
27082,
11617,
11050,
300,
85,
62,
325,
79,
13,
198,
220,
220,
220,
43504,
10619,
300,
85,
62,
8841,
5390,
300,
83,
62,
8841,
13,
628,
220,
220,
220,
43504,
10619,
705,
220,
1782,
6,
5390,
300,
83,
62,
8841,
13,
628,
220,
220,
220,
39962,
1404,
1677,
6158,
43277,
1546,
3963,
300,
83,
62,
8841,
39319,
374,
85,
62,
4299,
82,
198,
220,
220,
220,
220,
220,
7946,
27082,
11617,
11050,
537,
62,
397,
499,
62,
10641,
62,
315,
2410,
14804,
3605,
1370,
13,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
7716,
13,
628,
220,
220,
220,
23449,
8881,
4808,
2860,
13,
198,
220,
220,
220,
220,
220,
39962,
1404,
1677,
6158,
374,
85,
62,
16684,
1222,
16,
537,
62,
397,
499,
62,
10641,
62,
315,
2410,
14804,
3605,
1370,
198,
220,
220,
220,
220,
220,
220,
220,
39319,
374,
85,
62,
16684,
22492,
15285,
62,
32541,
13,
198,
220,
220,
220,
23578,
12,
19238,
12,
7206,
20032,
17941,
13,
628,
220,
220,
220,
24412,
47,
1546,
25,
347,
43312,
3963,
1259,
62,
6978,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3108,
41876,
4731,
11,
198,
220,
220,
220,
220
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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AISING zcx_cilib_unsupp_operation,
to_string IMPORTING ir_data TYPE REF TO data
iv_replace_unicode_entities TYPE abap_bool DEFAULT abap_false
RETURNING VALUE(rv_string) TYPE string
RAISING zcx_cilib_unsupp_operation,
to_int IMPORTING ir_data TYPE REF TO data
RETURNING VALUE(rv_int) TYPE i
RAISING zcx_cilib_unsupp_operation.
PROTECTED SECTION.
PRIVATE SECTION.
ENDCLASS.
CLASS zcl_cilib_util_json_abap_conv IMPLEMENTATION.
METHOD to_boolean.
FIELD-SYMBOLS: <lv_boolean> TYPE csequence.
ASSIGN ir_data->* TO <lv_boolean>.
ASSERT sy-subrc = 0.
rv_boolean = SWITCH #( to_upper( <lv_boolean> )
WHEN 'TRUE' OR abap_true THEN abap_true
WHEN 'FALSE' OR abap_false THEN abap_false
ELSE abap_undefined
).
IF rv_boolean = abap_undefined.
RAISE EXCEPTION TYPE zcx_cilib_unsupp_operation.
ENDIF.
ENDMETHOD.
METHOD to_string.
DATA: lv_hex TYPE x LENGTH 2.
FIELD-SYMBOLS: <lv_string> TYPE csequence.
ASSIGN ir_data->* TO <lv_string>.
ASSERT sy-subrc = 0.
rv_string = <lv_string>.
IF iv_replace_unicode_entities = abap_true.
" https://stackoverflow.com/questions/52207088/cl-http-utility-not-normalizing-my-url-why
FIND ALL OCCURRENCES OF REGEX '\\u....' IN rv_string RESULTS DATA(lt_matches).
SORT lt_matches BY offset DESCENDING.
LOOP AT lt_matches ASSIGNING FIELD-SYMBOL(<ls_match>).
lv_hex = to_upper( substring( val = rv_string+<ls_match>-offset(<ls_match>-length) off = 2 ) ).
DATA(lv_uchar) = cl_abap_conv_in_ce=>uccp( lv_hex ).
REPLACE SECTION OFFSET <ls_match>-offset LENGTH <ls_match>-length OF rv_string WITH lv_uchar.
ENDLOOP.
ENDIF.
ENDMETHOD.
METHOD to_int.
FIELD-SYMBOLS: <lv_int> TYPE i.
ASSIGN ir_data->* TO <lv_int>.
ASSERT sy-subrc = 0.
rv_int = <lv_int>.
ENDMETHOD.
ENDCLASS.
| [
40484,
19449,
9564,
2969,
2099,
38394,
198,
31631,
1976,
565,
62,
2856,
571,
62,
22602,
62,
17752,
62,
397,
499,
62,
42946,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
25261,
198,
220,
29244,
6158,
4810,
3824,
6158,
13,
628,
220,
44731,
44513,
13,
198,
220,
220,
220,
42715,
12,
49273,
50,
25,
198,
220,
220,
220,
220,
220,
284,
62,
2127,
21052,
30023,
9863,
2751,
4173,
62,
7890,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
1366,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
30826,
4261,
15871,
26173,
8924,
7,
81,
85,
62,
2127,
21052,
8,
41876,
450,
499,
62,
30388,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
17926,
1797,
2751,
220,
220,
1976,
66,
87,
62,
2856,
571,
62,
403,
18608,
62,
27184,
11,
198,
220,
220,
220,
220,
220,
284,
62,
8841,
30023,
9863,
2751,
4173,
62,
7890,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
1366,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
33491,
62,
46903,
1098,
62,
298,
871,
41876,
450,
499,
62,
30388,
5550,
38865,
450,
499,
62,
9562,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
30826,
4261,
15871,
26173,
8924,
7,
81,
85,
62,
8841,
8,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4731,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
17926,
1797,
2751,
220,
220,
1976,
66,
87,
62,
2856,
571,
62,
403,
18608,
62,
27184,
11,
198,
220,
220,
220,
220,
220,
284,
62,
600,
30023,
9863,
2751,
4173,
62,
7890,
220,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
1366,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
30826,
4261,
15871,
26173,
8924,
7,
81,
85,
62,
600,
8,
41876,
1312,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
17926,
1797,
2751,
220,
220,
1976,
66,
87,
62,
2856,
571,
62,
403,
18608,
62,
27184,
13,
198,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
4810,
3824,
6158,
44513,
13,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1976,
565,
62,
2856,
571,
62,
22602,
62,
17752,
62,
397,
499,
62,
42946,
30023,
2538,
10979,
6234,
13,
198,
220,
337,
36252,
284,
62,
2127,
21052,
13,
198,
220,
220,
220,
18930,
24639,
12,
23060,
10744,
3535,
50,
25,
1279,
6780,
62,
2127,
21052,
29,
41876,
269,
43167,
13,
628,
220,
220,
220,
24994,
16284,
4173,
62,
7890,
3784,
9,
5390,
1279,
6780,
62,
2127,
21052,
28401,
198,
220,
220,
220,
24994,
17395,
827,
12,
7266,
6015,
796,
657,
13,
628,
220,
220,
220,
374,
85,
62,
2127,
21052,
796,
12672,
31949,
1303,
7,
284,
62,
45828,
7,
1279,
6780,
62,
2127,
21052,
29,
1267,
198,
220,
220,
220,
220,
220,
42099,
705,
5446,
8924,
6,
6375,
450,
499,
62,
7942,
220,
220,
42243,
450,
499,
62,
7942,
198,
220,
220,
220,
220,
220,
42099,
705,
37,
23719,
6,
6375,
450,
499,
62,
9562,
42243,
450,
499,
62,
9562,
198,
220,
220,
220,
220,
220,
17852,
5188,
450,
499,
62,
917,
18156,
198,
220,
220,
220,
6739,
198,
220,
220,
220,
16876,
374,
85,
62,
2127,
21052,
796,
450,
499,
62,
917,
18156,
13,
198,
220,
220,
220,
220,
220,
17926,
24352,
7788,
42006,
2849,
41876,
1976,
66,
87,
62,
2856,
571,
62,
403,
18608,
62,
27184,
13,
198,
220,
220,
220,
23578,
5064,
13,
198,
220,
23578,
49273,
13,
628,
220,
337,
36252,
284,
62,
8841,
13,
198,
220,
220,
220,
42865,
25,
300,
85,
62,
33095,
41876,
2124,
406,
49494,
362,
13,
198,
220,
220,
220,
18930,
24639,
12,
23060,
10744,
3535,
50,
25,
1279,
6780,
62,
8841,
29,
41876,
269,
43167,
13,
628,
220,
220,
220,
24994,
16284,
4173,
62,
7890,
3784,
9,
5390,
1279,
6780,
62,
8841,
28401,
198,
220,
220,
220,
24994,
17395,
827,
12,
7266,
6015,
796,
657,
13,
628,
220,
220,
220,
374,
85,
62,
8841,
796,
1279,
6780,
62,
8841,
28401,
628,
220,
220,
220,
16876,
21628,
62,
33491,
62,
46903,
1098,
62,
298,
871,
796,
450,
499,
62,
7942,
13,
198,
220,
220,
220,
220,
220,
366,
3740,
1378,
25558,
2502,
11125,
13,
785,
14,
6138,
507,
14,
4309,
1238,
2154,
3459,
14,
565,
12,
4023,
12,
315,
879,
12,
1662,
12,
11265,
2890,
12,
1820,
12,
6371,
12,
22850,
198,
220,
220,
220,
220,
220,
376,
12115,
11096,
440,
4093,
31302,
24181,
1546,
3963,
23337,
6369,
705,
6852,
84,
1106,
6,
3268,
374,
85,
62,
8841,
15731,
35342,
42865,
7,
2528,
62,
6759,
2052,
737,
198,
220,
220,
220,
220,
220,
311,
9863,
300,
83,
62,
6759,
2052,
11050,
11677,
22196,
34,
10619,
2751,
13,
198,
220,
220,
220,
220,
220,
17579,
3185,
5161,
300,
83,
62,
6759,
2052,
24994,
3528,
15871,
18930,
24639,
12,
23060,
10744,
3535,
7,
27,
7278,
62,
15699,
29,
737,
198,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
33095,
796,
284,
62,
45828,
7,
3293,
1806,
7,
1188,
796,
374,
85,
62,
8841,
10,
27,
7278,
62,
15699,
29,
12,
28968,
7,
27,
7278,
62,
15699,
29,
12,
13664,
8,
572,
796,
362,
1267,
6739,
198,
220,
220,
220,
220,
220,
220,
220,
42865,
7,
6780,
62,
794,
283,
8,
796,
537,
62,
397,
499,
62,
42946,
62,
259,
62,
344,
14804,
18863,
79,
7,
300,
85,
62,
33095,
6739,
198,
220,
220,
220,
220,
220,
220,
220,
45285,
11598,
44513,
3963,
10652,
2767,
1279,
7278,
62,
15699,
29,
12,
28968,
406,
49494,
1279,
7278,
62,
15699,
29,
12,
13664,
3963,
374,
85,
62,
8841,
13315,
300,
85,
62,
794,
283,
13,
198,
220,
220,
220,
220,
220,
23578,
21982,
3185,
13,
198,
220,
220,
220,
23578,
5064,
13,
198,
220,
23578,
49273,
13,
628,
220,
337,
36252,
284,
62
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
class ZCL_XTT_FILE_RAW definition
public
final
create public .
public section.
interfaces ZIF_XTT_FILE .
methods CONSTRUCTOR
importing
!IV_NAME type CSEQUENCE
!IV_STRING type STRING optional
!IV_XSTRING type XSTRING optional .
protected section.
private section.
data MV_NAME type STRING .
data MV_XSTRING type XSTRING .
ENDCLASS.
CLASS ZCL_XTT_FILE_RAW IMPLEMENTATION.
METHOD constructor.
mv_name = iv_name.
IF iv_xstring IS SUPPLIED.
mv_xstring = iv_xstring.
ELSEIF iv_string IS SUPPLIED.
mv_xstring = zcl_eui_conv=>string_to_xstring( iv_string ).
ENDIF.
ENDMETHOD.
METHOD zif_xtt_file~get_content.
IF ev_as_xstring IS REQUESTED.
ev_as_xstring = mv_xstring.
ELSEIF ev_as_string IS REQUESTED.
ev_as_string = zcl_eui_conv=>xstring_to_string( mv_xstring ).
ENDIF.
ENDMETHOD.
METHOD zif_xtt_file~get_name.
rv_name = mv_name.
ENDMETHOD.
ENDCLASS.
| [
4871,
1168,
5097,
62,
55,
15751,
62,
25664,
62,
20530,
6770,
198,
220,
1171,
198,
220,
2457,
198,
220,
2251,
1171,
764,
198,
198,
11377,
2665,
13,
628,
220,
20314,
1168,
5064,
62,
55,
15751,
62,
25664,
764,
628,
220,
5050,
7102,
46126,
1581,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
3824,
62,
20608,
2099,
327,
5188,
10917,
18310,
198,
220,
220,
220,
220,
220,
5145,
3824,
62,
18601,
2751,
2099,
19269,
2751,
11902,
198,
220,
220,
220,
220,
220,
5145,
3824,
62,
55,
18601,
2751,
2099,
1395,
18601,
2751,
11902,
764,
198,
24326,
2665,
13,
198,
19734,
2665,
13,
628,
220,
1366,
32947,
62,
20608,
2099,
19269,
2751,
764,
198,
220,
1366,
32947,
62,
55,
18601,
2751,
2099,
1395,
18601,
2751,
764,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1168,
5097,
62,
55,
15751,
62,
25664,
62,
20530,
30023,
2538,
10979,
6234,
13,
628,
198,
49273,
23772,
13,
198,
220,
285,
85,
62,
3672,
796,
21628,
62,
3672,
13,
628,
220,
16876,
21628,
62,
87,
8841,
3180,
19549,
49094,
13,
198,
220,
220,
220,
285,
85,
62,
87,
8841,
796,
21628,
62,
87,
8841,
13,
198,
220,
17852,
5188,
5064,
21628,
62,
8841,
3180,
19549,
49094,
13,
198,
220,
220,
220,
285,
85,
62,
87,
8841,
796,
1976,
565,
62,
68,
9019,
62,
42946,
14804,
8841,
62,
1462,
62,
87,
8841,
7,
21628,
62,
8841,
6739,
198,
220,
23578,
5064,
13,
198,
10619,
49273,
13,
628,
198,
49273,
1976,
361,
62,
742,
83,
62,
7753,
93,
1136,
62,
11299,
13,
198,
220,
16876,
819,
62,
292,
62,
87,
8841,
3180,
4526,
35780,
1961,
13,
198,
220,
220,
220,
819,
62,
292,
62,
87,
8841,
796,
285,
85,
62,
87,
8841,
13,
198,
220,
17852,
5188,
5064,
819,
62,
292,
62,
8841,
3180,
4526,
35780,
1961,
13,
198,
220,
220,
220,
819,
62,
292,
62,
8841,
796,
1976,
565,
62,
68,
9019,
62,
42946,
14804,
87,
8841,
62,
1462,
62,
8841,
7,
285,
85,
62,
87,
8841,
6739,
198,
220,
23578,
5064,
13,
198,
10619,
49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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS /dmo/bp_booking_u10 DEFINITION
PUBLIC
ABSTRACT
FINAL
FOR BEHAVIOR OF /dmo/i_travel_u10 .
PUBLIC SECTION.
PROTECTED SECTION.
PRIVATE SECTION.
ENDCLASS.
CLASS /dmo/bp_booking_u10 IMPLEMENTATION.
ENDCLASS.
| [
31631,
1220,
67,
5908,
14,
46583,
62,
2070,
278,
62,
84,
940,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
9564,
18601,
10659,
198,
220,
25261,
198,
220,
7473,
9348,
7801,
12861,
1581,
3963,
1220,
67,
5908,
14,
72,
62,
35927,
62,
84,
940,
764,
628,
220,
44731,
44513,
13,
198,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
4810,
3824,
6158,
44513,
13,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1220,
67,
5908,
14,
46583,
62,
2070,
278,
62,
84,
940,
30023,
2538,
10979,
6234,
13,
198,
10619,
31631,
13,
198
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
*----------------------------------------------------------------------*
* CLASS ZCL_LOGGER DEFINITION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
class zcl_logger definition
public
create private
global friends zcl_logger_factory .
public section.
*"* public components of class ZCL_LOGGER
*"* do not include other source files here!!!
type-pools abap .
interfaces zif_logger.
aliases: add for zif_logger~add,
a for zif_logger~a,
e for zif_logger~e,
w for zif_logger~w,
i for zif_logger~i,
s for zif_logger~s,
has_errors for zif_logger~has_errors,
has_warnings for zif_logger~has_warnings,
is_empty for zif_logger~is_empty,
length for zif_logger~length,
save for zif_logger~save,
export_to_table for zif_logger~export_to_table,
fullscreen for zif_logger~fullscreen,
popup for zif_logger~popup,
handle for zif_logger~handle,
db_number for zif_logger~db_number,
header for zif_logger~header.
"! Starts a new log.
"! For backwards compatibility only! Use ZCL_LOGGER_FACTORY instead.
class-methods new
importing
!object type csequence optional
!subobject type csequence optional
!desc type csequence optional
!context type simple optional
!auto_save type abap_bool optional
!second_db_conn type abap_bool default abap_true
returning
value(r_log) type ref to zcl_logger .
"! Reopens an already existing log.
"! For backwards compatibility only! Use ZCL_LOGGER_FACTORY instead.
class-methods open
importing
!object type csequence
!subobject type csequence
!desc type csequence optional
!create_if_does_not_exist type abap_bool default abap_false
!auto_save type abap_bool optional
returning
value(r_log) type ref to zcl_logger .
protected section.
*"* protected components of class ZCL_LOGGER
*"* do not include other source files here!!!
private section.
* Local type for hrpad_message as it is not available in an ABAP Development System
types: begin of hrpad_message_field_list_alike,
scrrprfd type scrrprfd.
types: end of hrpad_message_field_list_alike.
types: begin of hrpad_message_alike,
cause(32) type c, "original: hrpad_message_cause
detail_level type ballevel.
include type symsg .
types: field_list type standard table of hrpad_message_field_list_alike
with non-unique key scrrprfd.
types: end of hrpad_message_alike.
*"* private components of class ZCL_LOGGER
*"* do not include other source files here!!!
data sec_connection type abap_bool .
data sec_connect_commit type abap_bool .
data settings type ref to zif_logger_settings.
methods:
"! Safety limit for previous exception drill down
drill_down_into_exception
importing
exception type ref to cx_root
type type symsgty optional
importance type balprobcl optional
returning
value(rt_exception_data_table) type tty_exception_data,
get_message_handles
importing
msgtype type symsgty optional
returning
value(rt_message_handles) type bal_t_msgh ,
add_structure
importing
obj_to_log type any optional
context type simple optional
callback_form type csequence optional
callback_prog type csequence optional
callback_fm type csequence optional
type type symsgty optional
importance type balprobcl optional
preferred parameter obj_to_log
returning
value(self) type ref to zif_logger .
methods save_log.
endclass.
class zcl_logger implementation.
method drill_down_into_exception.
data: i type i value 2,
previous_exception type ref to cx_root,
exceptions type tty_exception.
field-symbols <ex> like line of exceptions.
append initial line to exceptions assigning <ex>.
<ex>-level = 1.
<ex>-exception = exception.
previous_exception = exception.
while i <= settings->get_max_exception_drill_down( ).
if previous_exception->previous is not bound.
exit.
endif.
previous_exception ?= previous_exception->previous.
append initial line to exceptions assigning <ex>.
<ex>-level = i.
<ex>-exception = previous_exception.
i = i + 1.
endwhile.
field-symbols <ret> like line of rt_exception_data_table.
sort exceptions by level descending. "Display the deepest exception first
loop at exceptions assigning <ex>.
append initial line to rt_exception_data_table assigning <ret>.
<ret>-exception = <ex>-exception.
<ret>-msgty = type.
<ret>-probclass = importance.
endloop.
endmethod.
method get_message_handles.
data: log_handle type bal_t_logh,
filter type bal_s_mfil.
field-symbols <f> like line of filter-msgty.
insert handle into table log_handle.
if msgtype is not initial.
append initial line to filter-msgty assigning <f>.
<f>-sign = 'I'.
<f>-option = 'EQ'.
<f>-low = msgtype.
endif.
call function 'BAL_GLB_SEARCH_MSG'
exporting
i_t_log_handle = log_handle
i_s_msg_filter = filter
importing
e_t_msg_handle = rt_message_handles
exceptions
msg_not_found = 0.
endmethod.
method new.
if auto_save is supplied.
r_log ?= zcl_logger_factory=>create_log(
object = object
subobject = subobject
desc = desc
context = context
settings = zcl_logger_factory=>create_settings(
)->set_usage_of_secondary_db_conn( second_db_conn
)->set_autosave( auto_save )
).
else.
r_log ?= zcl_logger_factory=>create_log(
object = object
subobject = subobject
desc = desc
context = context
settings = zcl_logger_factory=>create_settings(
)->set_usage_of_secondary_db_conn( second_db_conn )
).
endif.
endmethod.
method open.
if auto_save is supplied.
r_log ?= zcl_logger_factory=>open_log(
object = object
subobject = subobject
desc = desc
create_if_does_not_exist = create_if_does_not_exist
settings = zcl_logger_factory=>create_settings(
)->set_autosave( auto_save )
).
else.
r_log ?= zcl_logger_factory=>open_log(
object = object
subobject = subobject
desc = desc
create_if_does_not_exist = create_if_does_not_exist
).
endif.
endmethod.
method a.
self = add(
obj_to_log = obj_to_log
context = context
callback_form = callback_form
callback_prog = callback_prog
callback_fm = callback_fm
type = 'A'
importance = importance ).
endmethod.
method add.
data: detailed_msg type bal_s_msg,
exception_data_table type tty_exception_data,
free_text_msg type char200,
ctx_type type ref to cl_abap_typedescr,
ctx_ddic_header type x030l,
msg_type type ref to cl_abap_typedescr,
msg_table_type type ref to cl_abap_tabledescr,
log_numbers type bal_t_lgnm,
log_handles type bal_t_logh,
log_number type bal_s_lgnm,
formatted_context type bal_s_cont,
formatted_params type bal_s_parm.
field-symbols: <table_of_messages> type any table,
<message_line> type any,
<bapiret1_msg> type bapiret1,
<bapi_msg> type bapiret2,
<bapi_coru_msg> type bapi_coru_return,
<bapi_order_msg> type bapi_order_return,
<bdc_msg> type bdcmsgcoll,
<hrpad_msg> type hrpad_message_alike,
<rcomp_msg> type rcomp,
<context_val> type any.
if context is not initial.
assign context to <context_val>.
formatted_context-value = <context_val>.
ctx_type = cl_abap_typedescr=>describe_by_data( context ).
call method ctx_type->get_ddic_header
receiving
p_header = ctx_ddic_header
exceptions
not_found = 1
no_ddic_type = 2
others = 3.
if sy-subrc = 0.
formatted_context-tabname = ctx_ddic_header-tabname.
endif.
endif.
if callback_fm is not initial.
formatted_params-callback-userexitf = callback_fm.
formatted_params-callback-userexitp = callback_prog.
formatted_params-callback-userexitt = 'F'.
elseif callback_form is not initial.
formatted_params-callback-userexitf = callback_form.
formatted_params-callback-userexitp = callback_prog.
formatted_params-callback-userexitt = ' '.
endif.
msg_type = cl_abap_typedescr=>describe_by_data( obj_to_log ).
if obj_to_log is not supplied.
detailed_msg-msgty = sy-msgty.
detailed_msg-msgid = sy-msgid.
detailed_msg-msgno = sy-msgno.
detailed_msg-msgv1 = sy-msgv1.
detailed_msg-msgv2 = sy-msgv2.
detailed_msg-msgv3 = sy-msgv3.
detailed_msg-msgv4 = sy-msgv4.
elseif msg_type->absolute_name = '\TYPE=BAPIRET1'.
assign obj_to_log to <bapiret1_msg>.
detailed_msg-msgty = <bapiret1_msg>-type.
detailed_msg-msgid = <bapiret1_msg>-id.
detailed_msg-msgno = <bapiret1_msg>-number.
detailed_msg-msgv1 = <bapiret1_msg>-message_v1.
detailed_msg-msgv2 = <bapiret1_msg>-message_v2.
detailed_msg-msgv3 = <bapiret1_msg>-message_v3.
detailed_msg-msgv4 = <bapiret1_msg>-message_v4.
elseif msg_type->absolute_name = '\TYPE=BAPIRET2'.
assign obj_to_log to <bapi_msg>.
detailed_msg-msgty = <bapi_msg>-type.
detailed_msg-msgid = <bapi_msg>-id.
detailed_msg-msgno = <bapi_msg>-number.
detailed_msg-msgv1 = <bapi_msg>-message_v1.
detailed_msg-msgv2 = <bapi_msg>-message_v2.
detailed_msg-msgv3 = <bapi_msg>-message_v3.
detailed_msg-msgv4 = <bapi_msg>-message_v4.
elseif msg_type->absolute_name = '\TYPE=BAPI_CORU_RETURN'.
assign obj_to_log to <bapi_coru_msg>.
detailed_msg-msgty = <bapi_coru_msg>-type.
detailed_msg-msgid = <bapi_coru_msg>-id.
detailed_msg-msgno = <bapi_coru_msg>-number.
detailed_msg-msgv1 = <bapi_coru_msg>-message_v1.
detailed_msg-msgv2 = <bapi_coru_msg>-message_v2.
detailed_msg-msgv3 = <bapi_coru_msg>-message_v3.
detailed_msg-msgv4 = <bapi_coru_msg>-message_v4.
elseif msg_type->absolute_name = '\TYPE=BAPI_ORDER_RETURN'.
assign obj_to_log to <bapi_order_msg>.
detailed_msg-msgty = <bapi_order_msg>-type.
detailed_msg-msgid = <bapi_order_msg>-id.
detailed_msg-msgno = <bapi_order_msg>-number.
detailed_msg-msgv1 = <bapi_order_msg>-message_v1.
detailed_msg-msgv2 = <bapi_order_msg>-message_v2.
detailed_msg-msgv3 = <bapi_order_msg>-message_v3.
detailed_msg-msgv4 = <bapi_order_msg>-message_v4.
elseif msg_type->absolute_name = '\TYPE=BDCMSGCOLL'.
assign obj_to_log to <bdc_msg>.
detailed_msg-msgty = <bdc_msg>-msgtyp.
detailed_msg-msgid = <bdc_msg>-msgid.
detailed_msg-msgno = <bdc_msg>-msgnr.
detailed_msg-msgv1 = <bdc_msg>-msgv1.
detailed_msg-msgv2 = <bdc_msg>-msgv2.
detailed_msg-msgv3 = <bdc_msg>-msgv3.
detailed_msg-msgv4 = <bdc_msg>-msgv4.
elseif msg_type->absolute_name = '\TYPE=HRPAD_MESSAGE'.
assign obj_to_log to <hrpad_msg>.
detailed_msg-msgty = <hrpad_msg>-msgty.
detailed_msg-msgid = <hrpad_msg>-msgid.
detailed_msg-msgno = <hrpad_msg>-msgno.
detailed_msg-msgv1 = <hrpad_msg>-msgv1.
detailed_msg-msgv2 = <hrpad_msg>-msgv2.
detailed_msg-msgv3 = <hrpad_msg>-msgv3.
detailed_msg-msgv4 = <hrpad_msg>-msgv4.
elseif msg_type->absolute_name = '\TYPE=RCOMP'.
assign obj_to_log to <rcomp_msg>.
detailed_msg-msgty = <rcomp_msg>-msgty.
detailed_msg-msgid = <rcomp_msg>-msgid.
detailed_msg-msgno = <rcomp_msg>-msgno.
detailed_msg-msgv1 = <rcomp_msg>-msgv1.
detailed_msg-msgv2 = <rcomp_msg>-msgv2.
detailed_msg-msgv3 = <rcomp_msg>-msgv3.
detailed_msg-msgv4 = <rcomp_msg>-msgv4.
elseif msg_type->type_kind = cl_abap_typedescr=>typekind_oref.
exception_data_table = me->drill_down_into_exception(
exception = obj_to_log
type = type
importance = importance
).
elseif msg_type->type_kind = cl_abap_typedescr=>typekind_table.
assign obj_to_log to <table_of_messages>.
loop at <table_of_messages> assigning <message_line>.
add( <message_line> ).
endloop.
elseif msg_type->type_kind = cl_abap_typedescr=>typekind_struct1 "flat structure
or msg_type->type_kind = cl_abap_typedescr=>typekind_struct2. "deep structure (already when string is used)
add_structure(
exporting
obj_to_log = obj_to_log
context = context
callback_form = callback_form
callback_prog = callback_prog
callback_fm = callback_fm
type = type
importance = importance
receiving
self = self
).
else.
free_text_msg = obj_to_log.
endif.
if free_text_msg is not initial.
call function 'BAL_LOG_MSG_ADD_FREE_TEXT'
exporting
i_log_handle = me->handle
i_msgty = type
i_probclass = importance
i_text = free_text_msg
i_s_context = formatted_context
i_s_params = formatted_params.
elseif exception_data_table is not initial.
field-symbols <exception_data> like line of exception_data_table.
loop at exception_data_table assigning <exception_data>.
call function 'BAL_LOG_EXCEPTION_ADD'
exporting
i_log_handle = me->handle
i_s_exc = <exception_data>.
endloop.
elseif detailed_msg is not initial.
detailed_msg-context = formatted_context.
detailed_msg-params = formatted_params.
detailed_msg-probclass = importance.
call function 'BAL_LOG_MSG_ADD'
exporting
i_log_handle = me->handle
i_s_msg = detailed_msg.
endif.
if me->settings->get_autosave( ) = abap_true.
save_log( ).
endif.
self = me.
endmethod.
method add_structure.
data: msg_type type ref to cl_abap_typedescr,
msg_struct_type type ref to cl_abap_structdescr,
components type cl_abap_structdescr=>component_table,
component like line of components,
string_to_log type string.
field-symbols: <component> type any.
msg_struct_type ?= cl_abap_typedescr=>describe_by_data( obj_to_log ).
components = msg_struct_type->get_components( ).
add( '--- Begin of structure ---' ).
loop at components into component.
assign component component-name of structure obj_to_log to <component>.
if sy-subrc = 0.
msg_type = cl_abap_typedescr=>describe_by_data( <component> ).
if msg_type->kind = cl_abap_typedescr=>kind_elem.
string_to_log = |{ to_lower( component-name ) } = { <component> }|.
add( string_to_log ).
elseif msg_type->kind = cl_abap_typedescr=>kind_struct.
add_structure(
exporting
obj_to_log = <component>
context = context
callback_form = callback_form
callback_prog = callback_prog
callback_fm = callback_fm
type = type
importance = importance
receiving
self = self
).
endif.
endif.
endloop.
add( '--- End of structure ---' ).
endmethod.
method e.
self = add(
obj_to_log = obj_to_log
context = context
callback_form = callback_form
callback_prog = callback_prog
callback_fm = callback_fm
type = 'E'
importance = importance ).
endmethod.
method export_to_table.
data: message_handles type bal_t_msgh,
message type bal_s_msg,
bapiret2 type bapiret2.
field-symbols <msg_handle> type balmsghndl.
message_handles = get_message_handles( ).
loop at message_handles assigning <msg_handle>.
call function 'BAL_LOG_MSG_READ'
exporting
i_s_msg_handle = <msg_handle>
importing
e_s_msg = message
exceptions
others = 3.
if sy-subrc is initial.
message id message-msgid
type message-msgty
number message-msgno
into bapiret2-message
with message-msgv1 message-msgv2 message-msgv3 message-msgv4.
bapiret2-type = message-msgty.
bapiret2-id = message-msgid.
bapiret2-number = message-msgno.
bapiret2-log_no = <msg_handle>-log_handle. "last 2 chars missing!!
bapiret2-log_msg_no = <msg_handle>-msgnumber.
bapiret2-message_v1 = message-msgv1.
bapiret2-message_v2 = message-msgv2.
bapiret2-message_v3 = message-msgv3.
bapiret2-message_v4 = message-msgv4.
bapiret2-system = sy-sysid.
append bapiret2 to rt_bapiret.
endif.
endloop.
endmethod.
method fullscreen.
data:
profile type bal_s_prof,
lt_log_handles type bal_t_logh.
append me->handle to lt_log_handles.
call function 'BAL_DSP_PROFILE_SINGLE_LOG_GET'
importing
e_s_display_profile = profile.
call function 'BAL_DSP_LOG_DISPLAY'
exporting
i_s_display_profile = profile
i_t_log_handle = lt_log_handles.
endmethod.
method has_errors.
rv_yes = boolc( lines( get_message_handles( msgtype = 'E' ) ) > 0 ).
endmethod.
method has_warnings.
rv_yes = boolc( lines( get_message_handles( msgtype = 'W' ) ) > 0 ).
endmethod.
method i.
self = add(
obj_to_log = obj_to_log
context = context
callback_form = callback_form
callback_prog = callback_prog
callback_fm = callback_fm
type = 'I'
importance = importance ).
endmethod.
method is_empty.
rv_yes = boolc( length( ) = 0 ).
endmethod.
method length.
rv_length = lines( get_message_handles( ) ).
endmethod.
method popup.
* See SBAL_DEMO_04_POPUP for ideas
data:
profile type bal_s_prof,
lt_log_handles type bal_t_logh.
append me->handle to lt_log_handles.
call function 'BAL_DSP_PROFILE_POPUP_GET'
importing
e_s_display_profile = profile.
call function 'BAL_DSP_LOG_DISPLAY'
exporting
i_s_display_profile = profile
i_t_log_handle = lt_log_handles.
endmethod.
method s.
self = add(
obj_to_log = obj_to_log
context = context
callback_form = callback_form
callback_prog = callback_prog
callback_fm = callback_fm
type = 'S'
importance = importance ).
endmethod.
method save.
check me->settings->get_autosave( ) = abap_false.
save_log( ).
endmethod.
method w.
self = add(
obj_to_log = obj_to_log
context = context
callback_form = callback_form
callback_prog = callback_prog
callback_fm = callback_fm
type = 'W'
importance = importance ).
endmethod.
method save_log.
data log_handles type bal_t_logh.
data log_numbers type bal_t_lgnm.
data log_number type bal_s_lgnm.
insert me->handle into table log_handles.
call function 'BAL_DB_SAVE'
exporting
i_t_log_handle = log_handles
i_2th_connection = me->sec_connection
i_2th_connect_commit = me->sec_connect_commit
importing
e_new_lognumbers = log_numbers.
if me->db_number is initial.
read table log_numbers index 1 into log_number.
me->db_number = log_number-lognumber.
endif.
endmethod.
endclass.
| [
9,
10097,
23031,
9,
198,
9,
220,
220,
220,
220,
220,
220,
42715,
1168,
5097,
62,
25294,
30373,
5550,
20032,
17941,
198,
9,
10097,
23031,
9,
198,
9,
198,
9,
10097,
23031,
9,
198,
4871,
1976,
565,
62,
6404,
1362,
6770,
198,
220,
1171,
198,
220,
2251,
2839,
198,
220,
3298,
2460,
1976,
565,
62,
6404,
1362,
62,
69,
9548,
764,
628,
220,
1171,
2665,
13,
198,
9,
1,
9,
1171,
6805,
286,
1398,
1168,
5097,
62,
25294,
30373,
198,
9,
1,
9,
466,
407,
2291,
584,
2723,
3696,
994,
10185,
198,
220,
220,
220,
2099,
12,
7742,
82,
450,
499,
764,
628,
220,
220,
220,
20314,
1976,
361,
62,
6404,
1362,
13,
198,
220,
220,
220,
47217,
25,
751,
329,
1976,
361,
62,
6404,
1362,
93,
2860,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
257,
329,
1976,
361,
62,
6404,
1362,
93,
64,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
304,
329,
1976,
361,
62,
6404,
1362,
93,
68,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
266,
329,
1976,
361,
62,
6404,
1362,
93,
86,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1312,
329,
1976,
361,
62,
6404,
1362,
93,
72,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
264,
329,
1976,
361,
62,
6404,
1362,
93,
82,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
468,
62,
48277,
329,
1976,
361,
62,
6404,
1362,
93,
10134,
62,
48277,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
468,
62,
40539,
654,
329,
1976,
361,
62,
6404,
1362,
93,
10134,
62,
40539,
654,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
318,
62,
28920,
329,
1976,
361,
62,
6404,
1362,
93,
271,
62,
28920,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4129,
329,
1976,
361,
62,
6404,
1362,
93,
13664,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3613,
329,
1976,
361,
62,
6404,
1362,
93,
21928,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
10784,
62,
1462,
62,
11487,
329,
1976,
361,
62,
6404,
1362,
93,
39344,
62,
1462,
62,
11487,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1336,
9612,
329,
1976,
361,
62,
6404,
1362,
93,
12853,
9612,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
46207,
329,
1976,
361,
62,
6404,
1362,
93,
12924,
929,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5412,
329,
1976,
361,
62,
6404,
1362,
93,
28144,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
20613,
62,
17618,
329,
1976,
361,
62,
6404,
1362,
93,
9945,
62,
17618,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
13639,
329,
1976,
361,
62,
6404,
1362,
93,
25677,
13,
628,
220,
220,
220,
366,
0,
50181,
257,
649,
2604,
13,
198,
220,
220,
220,
366,
0,
1114,
16196,
17764,
691,
0,
5765,
1168,
5097,
62,
25294,
30373,
62,
37,
10659,
15513,
2427,
13,
198,
220,
220,
220,
1398,
12,
24396,
82,
649,
198,
220,
220,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
15252,
220,
220,
220,
220,
220,
220,
220,
220,
2099,
269,
43167,
11902,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
7266,
15252,
220,
220,
220,
220,
220,
2099,
269,
43167,
11902,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
20147,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2099,
269,
43167,
11902,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
22866,
220,
220,
220,
220,
220,
220,
220,
2099,
2829,
11902,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
23736,
62,
21928,
220,
220,
220,
220,
220,
2099,
450,
499,
62,
30388,
11902,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
12227,
62,
9945,
62,
37043,
2099,
450,
499,
62,
30388,
4277,
450,
499,
62,
7942,
198,
220,
220,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
220,
220,
1988,
7,
81,
62,
6404,
8,
220,
220,
220,
2099,
1006,
284,
1976,
565,
62,
6404,
1362,
764,
628,
220,
220,
220,
366,
0,
797,
44813,
281,
1541,
4683,
2604,
13,
198,
220,
220,
220,
366,
0,
1114,
16196,
17764,
691,
0,
5765,
1168,
5097,
62,
25294,
30373,
62,
37,
10659,
15513,
2427,
13,
198,
220,
220,
220,
1398,
12,
24396,
82,
1280,
198,
220,
220,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
15252,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2099,
269,
43167,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
7266,
15252,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2099,
269,
43167,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
20147,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2099,
269,
43167,
11902,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
17953,
62,
361,
62,
22437,
62,
1662,
62,
38476,
2099,
450,
499,
62,
30388,
4277,
450,
499,
62,
9562,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
23736,
62,
21928,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2099,
450,
499,
62,
30388,
11902,
198,
220,
220,
220,
220,
220,
8024,
198,
220,
220,
220,
220,
220,
220,
220,
1988,
7,
81,
62,
6404,
8,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2099,
1006,
284,
1976,
565,
62,
6404,
1362,
764,
628,
220,
6861,
2665,
13,
198,
9,
1,
9,
6861,
6805,
286,
1398,
1168,
5097,
62,
25294,
30373,
198,
9,
1,
9,
466,
407,
2291,
584,
2723,
3696,
994,
10185,
198,
220
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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IMPLEMENTATION.
METHOD zif_abapgit_object~changed_by.
SELECT SINGLE as4user FROM dd30l INTO rv_user
WHERE shlpname = ms_item-obj_name
AND as4local = 'A'. "#EC CI_GENBUFF
IF sy-subrc <> 0.
rv_user = c_user_unknown.
ENDIF.
ENDMETHOD.
METHOD zif_abapgit_object~delete.
IF zif_abapgit_object~exists( ) = abap_false.
RETURN.
ENDIF.
delete_ddic( 'H' ).
ENDMETHOD.
METHOD zif_abapgit_object~deserialize.
DATA: lv_name TYPE ddobjname,
ls_dd30v TYPE dd30v,
lt_dd31v TYPE TABLE OF dd31v,
lt_dd32p TYPE TABLE OF dd32p,
lt_dd33v TYPE TABLE OF dd33v.
io_xml->read( EXPORTING iv_name = 'DD30V'
CHANGING cg_data = ls_dd30v ).
IF iv_step = zif_abapgit_object=>gc_step_id-ddic AND NOT ls_dd30v-selmexit IS INITIAL.
ls_dd30v-selmexit = 'RS_DD_SELMEXIT'.
ELSEIF iv_step = zif_abapgit_object=>gc_step_id-late AND ls_dd30v-selmexit IS INITIAL.
RETURN. " already active
ENDIF.
io_xml->read( EXPORTING iv_name = 'DD31V_TABLE'
CHANGING cg_data = lt_dd31v ).
io_xml->read( EXPORTING iv_name = 'DD32P_TABLE'
CHANGING cg_data = lt_dd32p ).
io_xml->read( EXPORTING iv_name = 'DD33V_TABLE'
CHANGING cg_data = lt_dd33v ).
corr_insert( iv_package = iv_package
ig_object_class = 'DICT' ).
lv_name = ms_item-obj_name.
CALL FUNCTION 'DDIF_SHLP_PUT'
EXPORTING
name = lv_name
dd30v_wa = ls_dd30v
TABLES
dd31v_tab = lt_dd31v
dd32p_tab = lt_dd32p
dd33v_tab = lt_dd33v
EXCEPTIONS
shlp_not_found = 1
name_inconsistent = 2
shlp_inconsistent = 3
put_failure = 4
put_refused = 5
OTHERS = 6.
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( 'error from DDIF_SHLP_PUT' ).
ENDIF.
zcl_abapgit_objects_activation=>add_item( ms_item ).
ENDMETHOD.
METHOD zif_abapgit_object~exists.
DATA: lv_shlpname TYPE dd30l-shlpname.
SELECT SINGLE shlpname FROM dd30l INTO lv_shlpname
WHERE shlpname = ms_item-obj_name
AND as4local = 'A'. "#EC CI_GENBUFF
rv_bool = boolc( sy-subrc = 0 ).
ENDMETHOD.
METHOD zif_abapgit_object~get_comparator.
RETURN.
ENDMETHOD.
METHOD zif_abapgit_object~get_deserialize_steps.
APPEND zif_abapgit_object=>gc_step_id-ddic TO rt_steps.
APPEND zif_abapgit_object=>gc_step_id-late TO rt_steps.
ENDMETHOD.
METHOD zif_abapgit_object~get_metadata.
rs_metadata = get_metadata( ).
rs_metadata-ddic = abap_true.
ENDMETHOD.
METHOD zif_abapgit_object~is_active.
rv_active = is_active( ).
ENDMETHOD.
METHOD zif_abapgit_object~is_locked.
rv_is_locked = abap_false.
ENDMETHOD.
METHOD zif_abapgit_object~jump.
jump_se11( iv_radio = 'RSRD1-SHMA'
iv_field = 'RSRD1-SHMA_VAL' ).
ENDMETHOD.
METHOD zif_abapgit_object~serialize.
DATA: lv_name TYPE ddobjname,
ls_dd30v TYPE dd30v,
lt_dd31v TYPE TABLE OF dd31v,
lt_dd32p TYPE TABLE OF dd32p,
lt_dd33v TYPE TABLE OF dd33v.
FIELD-SYMBOLS: <ls_dd32p> LIKE LINE OF lt_dd32p.
lv_name = ms_item-obj_name.
CALL FUNCTION 'DDIF_SHLP_GET'
EXPORTING
name = lv_name
state = 'A'
langu = mv_language
IMPORTING
dd30v_wa = ls_dd30v
TABLES
dd31v_tab = lt_dd31v
dd32p_tab = lt_dd32p
dd33v_tab = lt_dd33v
EXCEPTIONS
illegal_input = 1
OTHERS = 2.
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( 'error from DDIF_SHLP_GET' ).
ENDIF.
IF ls_dd30v IS INITIAL.
RETURN. " does not exist in system
ENDIF.
CLEAR: ls_dd30v-as4user,
ls_dd30v-as4date,
ls_dd30v-as4time.
LOOP AT lt_dd32p ASSIGNING <ls_dd32p>.
* clear information inherited from domain
CLEAR: <ls_dd32p>-domname,
<ls_dd32p>-headlen,
<ls_dd32p>-scrlen1,
<ls_dd32p>-scrlen2,
<ls_dd32p>-datatype,
<ls_dd32p>-leng,
<ls_dd32p>-outputlen,
<ls_dd32p>-decimals,
<ls_dd32p>-lowercase,
<ls_dd32p>-signflag,
<ls_dd32p>-convexit.
ENDLOOP.
io_xml->add( iv_name = 'DD30V'
ig_data = ls_dd30v ).
io_xml->add( ig_data = lt_dd31v
iv_name = 'DD31V_TABLE' ).
io_xml->add( ig_data = lt_dd32p
iv_name = 'DD32P_TABLE' ).
io_xml->add( ig_data = lt_dd33v
iv_name = 'DD33V_TABLE' ).
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
397,
499,
18300,
62,
15252,
62,
1477,
34431,
5550,
20032,
17941,
44731,
3268,
16879,
2043,
2751,
16034,
1976,
565,
62,
397,
499,
18300,
62,
48205,
62,
16668,
25261,
13,
628,
220,
44731,
44513,
13,
198,
220,
220,
220,
23255,
37,
2246,
1546,
1976,
361,
62,
397,
499,
18300,
62,
15252,
13,
198,
220,
220,
220,
8355,
43429,
1546,
6941,
62,
16624,
7473,
1976,
361,
62,
397,
499,
18300,
62,
15252,
93,
5908,
62,
16624,
13,
628,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
4810,
3824,
6158,
44513,
13,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1168,
5097,
62,
6242,
2969,
38,
2043,
62,
9864,
23680,
62,
50,
6581,
47,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
1976,
361,
62,
397,
499,
18300,
62,
15252,
93,
40985,
62,
1525,
13,
628,
220,
220,
220,
33493,
311,
2751,
2538,
355,
19,
7220,
16034,
49427,
1270,
75,
39319,
374,
85,
62,
7220,
198,
220,
220,
220,
220,
220,
33411,
427,
34431,
3672,
796,
13845,
62,
9186,
12,
26801,
62,
3672,
198,
220,
220,
220,
220,
220,
5357,
355,
19,
12001,
796,
705,
32,
4458,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
25113,
2943,
14514,
62,
35353,
19499,
5777,
198,
220,
220,
220,
16876,
827,
12,
7266,
6015,
1279,
29,
657,
13,
198,
220,
220,
220,
220,
220,
374,
85,
62,
7220,
796,
269,
62,
7220,
62,
34680,
13,
198,
220,
220,
220,
23578,
5064,
13,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
1976,
361,
62,
397,
499,
18300,
62,
15252,
93,
33678,
13,
628,
220,
220,
220,
16876,
1976,
361,
62,
397,
499,
18300,
62,
15252,
93,
1069,
1023,
7,
1267,
796,
450,
499,
62,
9562,
13,
198,
220,
220,
220,
220,
220,
30826,
27064,
13,
198,
220,
220,
220,
23578,
5064,
13,
628,
220,
220,
220,
12233,
62,
1860,
291,
7,
705,
39,
6,
6739,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
1976,
361,
62,
397,
499,
18300,
62,
15252,
93,
8906,
48499,
1096,
13,
628,
220,
220,
220,
42865,
25,
300,
85,
62,
3672,
220,
41876,
49427,
26801,
3672,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
43979,
62,
1860,
1270,
85,
41876,
49427,
1270,
85,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
83,
62,
1860,
3132,
85,
41876,
43679,
3963,
49427,
3132,
85,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
83,
62,
1860,
2624,
79,
41876,
43679,
3963,
49427,
2624,
79,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
83,
62,
1860,
2091,
85,
41876,
43679,
3963,
49427,
2091,
85,
13,
628,
198,
220,
220,
220,
33245,
62,
19875,
3784,
961,
7,
7788,
15490,
2751,
21628,
62,
3672,
796,
705,
16458,
1270,
53,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5870,
15567,
2751,
269,
70,
62,
7890,
796,
43979,
62,
1860,
1270,
85,
6739,
628,
220,
220,
220,
16876,
21628,
62,
9662,
796,
1976,
361,
62,
397,
499,
18300,
62,
15252,
14804,
36484,
62,
9662,
62,
312,
12,
1860,
291,
5357,
5626,
43979,
62,
1860,
1270,
85,
12,
741,
76,
37023,
3180,
3268,
2043,
12576,
13,
198,
220,
220,
220,
220,
220,
43979,
62,
1860,
1270,
85,
12,
741,
76,
37023,
796,
705,
6998,
62,
16458,
62,
50,
3698,
44,
6369,
2043,
4458,
198,
220,
220,
220,
17852,
5188,
5064,
21628,
62,
9662,
796,
1976,
361,
62,
397,
499,
18300,
62,
15252,
14804,
36484,
62,
9662,
62,
312,
12,
17660,
5357,
43979,
62,
1860,
1270,
85,
12,
741,
76,
37023,
3180,
3268,
2043,
12576,
13,
198,
220,
220,
220,
220,
220,
30826,
27064,
13,
366,
1541,
4075,
198,
220,
220,
220,
23578,
5064,
13,
628,
220,
220,
220,
33245,
62,
19875,
3784,
961,
7,
7788,
15490,
2751,
21628,
62,
3672,
796,
705,
16458,
3132,
53,
62,
38148,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5870,
15567,
2751,
269,
70,
62,
7890,
796,
300,
83,
62,
1860,
3132,
85,
6739,
198,
220,
220,
220,
33245,
62,
19875,
3784,
961,
7,
7788,
15490,
2751,
21628,
62,
3672,
796,
705,
16458,
2624,
47,
62,
38148,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5870,
15567,
2751,
269,
70,
62,
7890,
796,
300,
83,
62,
1860,
2624,
79,
6739,
198,
220,
220,
220,
33245,
62,
19875,
3784,
961,
7,
7788,
15490,
2751,
21628,
62,
3672,
796,
705,
16458,
2091,
53,
62,
38148,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5870,
15567,
2751,
269,
70,
62,
7890,
796,
300,
83,
62,
1860,
2091,
85,
6739,
628,
220,
220,
220,
1162,
81,
62,
28463,
7,
21628,
62,
26495,
796,
21628,
62,
26495,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
45329,
62,
15252,
62,
4871,
796,
705,
35,
18379,
6,
6739,
628,
220,
220,
220,
300,
85,
62,
3672,
796,
13845,
62,
9186,
12,
26801,
62,
3672,
13,
628,
220,
220,
220,
42815,
29397,
4177,
2849,
705,
16458,
5064,
62,
50,
6581,
47,
62,
30076,
6,
198,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1438,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
300,
85,
62,
3672,
198,
220,
220,
220,
220,
220,
220,
220,
49427,
1270,
85,
62,
10247,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
43979,
62,
1860,
1270,
85,
198,
220,
220,
220,
220,
220,
309,
6242,
28378,
198,
220,
220,
220,
220,
220,
220,
220,
49427,
3132,
85,
62,
8658,
220,
220,
220,
220,
220,
220,
220,
220,
796,
300,
83,
62,
1860,
3132,
85,
198,
220,
220,
220,
220,
220,
220,
220,
49427,
2624,
79,
62,
8658,
220,
220,
220,
220,
220,
220,
220,
220,
796
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
"! Renders the main HTML page from a Transformation which receives the deep
"! structure with all the required data
class ZCL_TIMEM_ASSET_HTML_TMACHINE definition
public
final
create private
global friends ZCL_TIMEM_ASSET_FACTORY .
public section.
interfaces ZIF_TIMEM_ASSET .
"! Constructor for the main HTML asset
"! @parameter is_parts | Deep structure containing all the information that
"! is to be rendered as HTML.
methods CONSTRUCTOR
importing
!DATA type ZTIMEM_DATA .
PROTECTED SECTION.
private section.
data DATA type ZTIMEM_DATA .
ENDCLASS.
CLASS ZCL_TIMEM_ASSET_HTML_TMACHINE IMPLEMENTATION.
METHOD constructor.
me->data = data.
ENDMETHOD.
METHOD zif_timem_asset~get_content.
CALL TRANSFORMATION ztimem_html_timemachine
SOURCE data = data
RESULT XML result
OPTIONS xml_header = 'NO'.
ENDMETHOD.
METHOD zif_timem_asset~get_subtype.
result = 'html'.
ENDMETHOD.
METHOD zif_timem_asset~get_url.
result = 'timemachine.html'.
ENDMETHOD.
ENDCLASS.
| [
40484,
371,
7338,
262,
1388,
11532,
2443,
422,
257,
49127,
543,
11583,
262,
2769,
198,
40484,
4645,
351,
477,
262,
2672,
1366,
198,
4871,
1168,
5097,
62,
51,
3955,
3620,
62,
10705,
2767,
62,
28656,
62,
15972,
16219,
8881,
6770,
198,
220,
1171,
198,
220,
2457,
198,
220,
2251,
2839,
628,
220,
3298,
2460,
1168,
5097,
62,
51,
3955,
3620,
62,
10705,
2767,
62,
37,
10659,
15513,
764,
198,
198,
11377,
2665,
13,
628,
220,
20314,
1168,
5064,
62,
51,
3955,
3620,
62,
10705,
2767,
764,
628,
220,
220,
220,
366,
0,
28407,
273,
329,
262,
1388,
11532,
11171,
198,
220,
220,
220,
366,
0,
2488,
17143,
2357,
318,
62,
42632,
930,
10766,
4645,
7268,
477,
262,
1321,
326,
198,
220,
220,
220,
366,
0,
318,
284,
307,
15111,
355,
11532,
13,
198,
220,
5050,
7102,
46126,
1581,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
26947,
2099,
1168,
51,
3955,
3620,
62,
26947,
764,
198,
220,
48006,
9782,
1961,
44513,
13,
198,
19734,
2665,
13,
628,
220,
1366,
42865,
2099,
1168,
51,
3955,
3620,
62,
26947,
764,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1168,
5097,
62,
51,
3955,
3620,
62,
10705,
2767,
62,
28656,
62,
15972,
16219,
8881,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
23772,
13,
198,
220,
220,
220,
502,
3784,
7890,
796,
1366,
13,
198,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
1976,
361,
62,
16514,
368,
62,
562,
316,
93,
1136,
62,
11299,
13,
198,
220,
220,
220,
42815,
44069,
35036,
1976,
16514,
368,
62,
6494,
62,
16514,
368,
20480,
198,
220,
220,
220,
311,
31033,
1366,
796,
1366,
198,
220,
220,
220,
15731,
16724,
23735,
1255,
198,
220,
220,
220,
39852,
11053,
35555,
62,
25677,
796,
705,
15285,
4458,
198,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
1976,
361,
62,
16514,
368,
62,
562,
316,
93,
1136,
62,
7266,
4906,
13,
198,
220,
220,
220,
1255,
796,
705,
6494,
4458,
198,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
1976,
361,
62,
16514,
368,
62,
562,
316,
93,
1136,
62,
6371,
13,
198,
220,
220,
220,
1255,
796,
705,
16514,
368,
20480,
13,
6494,
4458,
198,
220,
23578,
49273,
13,
198,
10619,
31631,
13,
198
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS zcl_abapgit_injector DEFINITION
PUBLIC
CREATE PRIVATE.
PUBLIC SECTION.
CLASS-METHODS set_tadir
IMPORTING
!ii_tadir TYPE REF TO zif_abapgit_tadir .
CLASS-METHODS set_sap_package
IMPORTING
!iv_package TYPE devclass
!ii_sap_package TYPE REF TO zif_abapgit_sap_package .
CLASS-METHODS set_code_inspector
IMPORTING
!iv_package TYPE devclass
!ii_code_inspector TYPE REF TO zif_abapgit_code_inspector .
CLASS-METHODS set_stage_logic
IMPORTING
!ii_logic TYPE REF TO zif_abapgit_stage_logic .
CLASS-METHODS set_cts_api
IMPORTING
!ii_cts_api TYPE REF TO zif_abapgit_cts_api .
CLASS-METHODS set_environment
IMPORTING
!ii_environment TYPE REF TO zif_abapgit_environment .
CLASS-METHODS set_longtexts
IMPORTING
!ii_longtexts TYPE REF TO zif_abapgit_longtexts .
PROTECTED SECTION.
PRIVATE SECTION.
ENDCLASS.
CLASS ZCL_ABAPGIT_INJECTOR IMPLEMENTATION.
METHOD set_code_inspector.
DATA: ls_code_inspector LIKE LINE OF zcl_abapgit_factory=>gt_code_inspector.
FIELD-SYMBOLS: <ls_code_inspector> LIKE LINE OF zcl_abapgit_factory=>gt_code_inspector.
READ TABLE zcl_abapgit_factory=>gt_code_inspector
ASSIGNING <ls_code_inspector>
WITH TABLE KEY package = iv_package.
IF sy-subrc <> 0.
ls_code_inspector-package = iv_package.
INSERT ls_code_inspector
INTO TABLE zcl_abapgit_factory=>gt_code_inspector
ASSIGNING <ls_code_inspector>.
ENDIF.
<ls_code_inspector>-instance = ii_code_inspector.
ENDMETHOD.
METHOD set_cts_api.
zcl_abapgit_factory=>gi_cts_api = ii_cts_api.
ENDMETHOD.
METHOD set_environment.
zcl_abapgit_factory=>gi_environment = ii_environment.
ENDMETHOD.
METHOD set_longtexts.
zcl_abapgit_factory=>gi_longtext = ii_longtexts.
ENDMETHOD.
METHOD set_sap_package.
DATA: ls_sap_package TYPE zcl_abapgit_factory=>ty_sap_package.
FIELD-SYMBOLS: <ls_sap_package> TYPE zcl_abapgit_factory=>ty_sap_package.
READ TABLE zcl_abapgit_factory=>gt_sap_package
ASSIGNING <ls_sap_package>
WITH TABLE KEY package = iv_package.
IF sy-subrc <> 0.
ls_sap_package-package = iv_package.
INSERT ls_sap_package
INTO TABLE zcl_abapgit_factory=>gt_sap_package
ASSIGNING <ls_sap_package>.
ENDIF.
<ls_sap_package>-instance = ii_sap_package.
ENDMETHOD.
METHOD set_stage_logic.
zcl_abapgit_factory=>gi_stage_logic = ii_logic.
ENDMETHOD.
METHOD set_tadir.
zcl_abapgit_factory=>gi_tadir = ii_tadir.
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
397,
499,
18300,
62,
259,
752,
273,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
29244,
6158,
4810,
3824,
6158,
13,
628,
220,
44731,
44513,
13,
628,
220,
220,
220,
42715,
12,
49273,
50,
900,
62,
83,
324,
343,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
4178,
62,
83,
324,
343,
41876,
4526,
37,
5390,
1976,
361,
62,
397,
499,
18300,
62,
83,
324,
343,
764,
198,
220,
220,
220,
42715,
12,
49273,
50,
900,
62,
82,
499,
62,
26495,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
26495,
220,
220,
220,
220,
41876,
1614,
4871,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
4178,
62,
82,
499,
62,
26495,
41876,
4526,
37,
5390,
1976,
361,
62,
397,
499,
18300,
62,
82,
499,
62,
26495,
764,
198,
220,
220,
220,
42715,
12,
49273,
50,
900,
62,
8189,
62,
1040,
806,
273,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
26495,
220,
220,
220,
220,
220,
220,
220,
41876,
1614,
4871,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
4178,
62,
8189,
62,
1040,
806,
273,
41876,
4526,
37,
5390,
1976,
361,
62,
397,
499,
18300,
62,
8189,
62,
1040,
806,
273,
764,
198,
220,
220,
220,
42715,
12,
49273,
50,
900,
62,
14247,
62,
6404,
291,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
4178,
62,
6404,
291,
41876,
4526,
37,
5390,
1976,
361,
62,
397,
499,
18300,
62,
14247,
62,
6404,
291,
764,
198,
220,
220,
220,
42715,
12,
49273,
50,
900,
62,
310,
82,
62,
15042,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
4178,
62,
310,
82,
62,
15042,
41876,
4526,
37,
5390,
1976,
361,
62,
397,
499,
18300,
62,
310,
82,
62,
15042,
764,
198,
220,
220,
220,
42715,
12,
49273,
50,
900,
62,
38986,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
4178,
62,
38986,
41876,
4526,
37,
5390,
1976,
361,
62,
397,
499,
18300,
62,
38986,
764,
198,
220,
220,
220,
42715,
12,
49273,
50,
900,
62,
6511,
5239,
82,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
4178,
62,
6511,
5239,
82,
41876,
4526,
37,
5390,
1976,
361,
62,
397,
499,
18300,
62,
6511,
5239,
82,
764,
198,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
4810,
3824,
6158,
44513,
13,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1168,
5097,
62,
6242,
2969,
38,
2043,
62,
1268,
23680,
1581,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
900,
62,
8189,
62,
1040,
806,
273,
13,
628,
220,
220,
220,
42865,
25,
43979,
62,
8189,
62,
1040,
806,
273,
34178,
48920,
3963,
1976,
565,
62,
397,
499,
18300,
62,
69,
9548,
14804,
13655,
62,
8189,
62,
1040,
806,
273,
13,
198,
220,
220,
220,
18930,
24639,
12,
23060,
10744,
3535,
50,
25,
1279,
7278,
62,
8189,
62,
1040,
806,
273,
29,
34178,
48920,
3963,
1976,
565,
62,
397,
499,
18300,
62,
69,
9548,
14804,
13655,
62,
8189,
62,
1040,
806,
273,
13,
628,
220,
220,
220,
20832,
43679,
1976,
565,
62,
397,
499,
18300,
62,
69,
9548,
14804,
13655,
62,
8189,
62,
1040,
806,
273,
198,
220,
220,
220,
220,
220,
220,
220,
220,
24994,
3528,
15871,
1279,
7278,
62,
8189,
62,
1040,
806,
273,
29,
198,
220,
220,
220,
220,
220,
220,
220,
220,
13315,
43679,
35374,
5301,
796,
21628,
62,
26495,
13,
198,
220,
220,
220,
16876,
827,
12,
7266,
6015,
1279,
29,
657,
13,
628,
220,
220,
220,
220,
220,
43979,
62,
8189,
62,
1040,
806,
273,
12,
26495,
796,
21628,
62,
26495,
13,
628,
220,
220,
220,
220,
220,
29194,
17395,
43979,
62,
8189,
62,
1040,
806,
273,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
39319,
43679,
1976,
565,
62,
397,
499,
18300,
62,
69,
9548,
14804,
13655,
62,
8189,
62,
1040,
806,
273,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
24994,
3528,
15871,
1279,
7278,
62,
8189,
62,
1040,
806,
273,
28401,
628,
220,
220,
220,
23578,
5064,
13,
628,
220,
220,
220,
1279,
7278,
62,
8189,
62,
1040,
806,
273,
29,
12,
39098,
796,
21065,
62,
8189,
62,
1040,
806,
273,
13,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
900,
62,
310,
82,
62,
15042,
13,
198,
220,
220,
220,
1976,
565,
62,
397,
499,
18300,
62,
69,
9548,
14804,
12397,
62,
310,
82,
62,
15042,
796,
21065,
62,
310,
82,
62,
15042,
13,
198,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
900,
62,
38986,
13,
198,
220,
220,
220,
1976,
565,
62,
397,
499,
18300,
62,
69,
9548,
14804,
12397,
62,
38986,
796,
21065,
62,
38986,
13,
198,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
900,
62,
6511,
5239,
82,
13,
198,
220,
220,
220,
1976,
565,
62,
397,
499,
18300,
62,
69,
9548,
14804,
12397,
62,
6511,
5239,
796,
21065,
62,
6511,
5239,
82,
13,
198,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
900,
62,
82,
499,
62,
26495,
13,
628,
220,
220,
220,
42865,
25,
43979,
62,
82,
499,
62,
26495,
41876,
1976,
565,
62,
397,
499,
18300,
62,
69,
9548,
14804,
774,
62,
82,
499,
62,
26495,
13,
198,
220,
220,
220,
18930,
24639,
12,
23060,
10744,
3535,
50,
25,
1279,
7278,
62,
82,
499,
62,
26495,
29,
41876,
1976,
565,
62,
397,
499,
18300,
62,
69,
9548,
14804,
774,
62,
82,
499,
62,
26495,
13,
628,
220,
220,
220,
20832,
43679,
1976,
565,
62,
397,
499,
18300,
62,
69,
9548,
14804,
13655,
62,
82,
499,
62,
26495,
198,
220,
220,
220,
220,
220,
220,
220,
220,
24994,
3528,
15871,
1279,
7278,
62,
82,
499,
62,
26495,
29,
198,
220,
220,
220,
220,
220,
220,
220,
220,
13315,
43679,
35374,
5301,
796,
21628
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS zcl_abapgit_object_pinf DEFINITION PUBLIC INHERITING FROM zcl_abapgit_objects_super FINAL.
PUBLIC SECTION.
INTERFACES zif_abapgit_object.
PRIVATE SECTION.
TYPES: BEGIN OF ty_pinf,
attributes TYPE scompidtln,
elements TYPE STANDARD TABLE OF scomeldtln WITH DEFAULT KEY,
END OF ty_pinf.
TYPES: ty_elements TYPE STANDARD TABLE OF tpak_package_interf_elem_ref WITH DEFAULT KEY.
METHODS:
create_or_load
IMPORTING is_pinf TYPE ty_pinf
iv_package TYPE devclass
RETURNING VALUE(ri_interface) TYPE REF TO if_package_interface
RAISING zcx_abapgit_exception,
delete_elements
IMPORTING ii_interface TYPE REF TO if_package_interface
RAISING zcx_abapgit_exception,
update_attributes
IMPORTING is_pinf TYPE ty_pinf
ii_interface TYPE REF TO if_package_interface
RAISING zcx_abapgit_exception,
update_elements
IMPORTING is_pinf TYPE ty_pinf
ii_interface TYPE REF TO if_package_interface
RAISING zcx_abapgit_exception.
ENDCLASS.
CLASS zcl_abapgit_object_pinf IMPLEMENTATION.
METHOD zif_abapgit_object~has_changed_since.
rv_changed = abap_true.
ENDMETHOD. "zif_abapgit_object~has_changed_since
METHOD zif_abapgit_object~changed_by.
SELECT SINGLE changed_by FROM intf INTO rv_user
WHERE intf_name = ms_item-obj_name.
IF sy-subrc <> 0.
rv_user = c_user_unknown.
ENDIF.
ENDMETHOD.
METHOD zif_abapgit_object~get_metadata.
rs_metadata = get_metadata( ).
ENDMETHOD. "zif_abapgit_object~get_metadata
METHOD zif_abapgit_object~exists.
DATA: lv_pack_name TYPE intf-pack_name,
lv_main_pack TYPE tdevc-mainpack.
SELECT SINGLE pack_name FROM intf INTO lv_pack_name
WHERE intf_name = ms_item-obj_name.
rv_bool = boolc( sy-subrc = 0 ).
IF rv_bool = abap_true.
SELECT SINGLE mainpack FROM tdevc INTO lv_main_pack
WHERE devclass = lv_pack_name. "#EC CI_GENBUFF
rv_bool = boolc( sy-subrc = 0 ).
ENDIF.
ENDMETHOD. "zif_abapgit_object~exists
METHOD zif_abapgit_object~serialize.
DATA: ls_pinf TYPE ty_pinf,
lv_name TYPE scomifnam,
lt_elements TYPE ty_elements,
li_interface TYPE REF TO if_package_interface.
FIELD-SYMBOLS: <lg_any> TYPE any,
<li_element> LIKE LINE OF lt_elements,
<ls_element> LIKE LINE OF ls_pinf-elements.
lv_name = ms_item-obj_name.
cl_package_interface=>load_package_interface(
EXPORTING
i_package_interface_name = lv_name
i_force_reload = abap_true
IMPORTING
e_package_interface = li_interface ).
li_interface->get_all_attributes(
IMPORTING e_package_interface_data = ls_pinf-attributes ).
CLEAR: ls_pinf-attributes-pack_name,
ls_pinf-attributes-author,
ls_pinf-attributes-created_by,
ls_pinf-attributes-created_on,
ls_pinf-attributes-changed_by,
ls_pinf-attributes-changed_on,
ls_pinf-attributes-tadir_devc.
* fields does not exist in older SAP versions
ASSIGN COMPONENT 'SW_COMP_LOGICAL_PACKAGE' OF STRUCTURE ls_pinf-attributes TO <lg_any>.
IF sy-subrc = 0.
CLEAR <lg_any>.
ENDIF.
ASSIGN COMPONENT 'SW_COMP_TADIR_PACKAGE' OF STRUCTURE ls_pinf-attributes TO <lg_any>.
IF sy-subrc = 0.
CLEAR <lg_any>.
ENDIF.
li_interface->get_elements( IMPORTING e_elements = lt_elements ).
LOOP AT lt_elements ASSIGNING <li_element>.
APPEND INITIAL LINE TO ls_pinf-elements ASSIGNING <ls_element>.
<li_element>->get_all_attributes( IMPORTING e_element_data = <ls_element> ).
CLEAR <ls_element>-elem_pack.
ENDLOOP.
io_xml->add( ig_data = ls_pinf
iv_name = 'PINF' ).
ENDMETHOD. "serialize
METHOD zif_abapgit_object~deserialize.
DATA: li_interface TYPE REF TO if_package_interface,
ls_pinf TYPE ty_pinf.
io_xml->read( EXPORTING iv_name = 'PINF'
CHANGING cg_data = ls_pinf ).
li_interface = create_or_load(
is_pinf = ls_pinf
iv_package = iv_package ).
update_attributes(
is_pinf = ls_pinf
ii_interface = li_interface ).
update_elements(
is_pinf = ls_pinf
ii_interface = li_interface ).
ENDMETHOD. "deserialize
METHOD update_attributes.
DATA: ls_sign TYPE scompisign,
lv_changeable TYPE flag.
ii_interface->get_changeable( IMPORTING e_changeable = lv_changeable ).
IF lv_changeable = abap_false.
* at creation the object is already in change mode
ii_interface->set_changeable( abap_true ).
ENDIF.
ls_sign-descript = abap_true.
ls_sign-pinftype = abap_true.
ls_sign-restricted = abap_true.
ls_sign-default_if = abap_true.
ls_sign-def_sever = abap_true.
ls_sign-acl_flag = abap_true.
ls_sign-pifstablty = abap_true.
ls_sign-release_status = abap_true.
ii_interface->set_all_attributes(
i_package_interface_data = is_pinf-attributes
i_data_sign = ls_sign ).
* looks like setting "i_suppress_dialog = abap_true" will make
* it fail for local($) packages
ii_interface->save( ).
ii_interface->set_changeable( abap_false ).
ENDMETHOD.
METHOD update_elements.
DATA: lt_existing TYPE ty_elements,
lt_add TYPE scomeldata,
lv_index TYPE i,
lv_found TYPE abap_bool,
* ls_sign TYPE scomelsign,
ls_attr TYPE scomeldtln.
FIELD-SYMBOLS: <li_element> LIKE LINE OF lt_existing,
<ls_element> LIKE LINE OF is_pinf-elements.
* ls_sign-usag_restr = abap_true.
* ls_sign-stability = abap_true.
* ls_sign-no_check = abap_true.
* ls_sign-useastype = abap_true.
* ls_sign-asforgnkey = abap_true.
* ls_sign-deprecation_type = abap_true. backport
* ls_sign-replacement_object_type = abap_true. backport
* ls_sign-replacement_object_name = abap_true. backport
* ls_sign-replacement_subobject_type = abap_true. backport
* ls_sign-replacement_subobject_name = abap_true. backport
ii_interface->set_elements_changeable( abap_true ).
ii_interface->get_elements( IMPORTING e_elements = lt_existing ).
LOOP AT is_pinf-elements ASSIGNING <ls_element>.
lv_found = abap_false.
LOOP AT lt_existing ASSIGNING <li_element>.
lv_index = sy-tabix.
<li_element>->get_all_attributes( IMPORTING e_element_data = ls_attr ).
IF <ls_element>-elem_type = ls_attr-elem_type
AND <ls_element>-elem_key = ls_attr-elem_key.
DELETE lt_existing INDEX lv_index.
CONTINUE. " current loop
ENDIF.
ENDLOOP.
IF lv_found = abap_false.
APPEND <ls_element> TO lt_add.
ENDIF.
ENDLOOP.
ii_interface->remove_elements( lt_existing ).
ii_interface->add_elements( lt_add ).
ii_interface->save_elements( ).
ii_interface->set_elements_changeable( abap_false ).
ENDMETHOD.
METHOD create_or_load.
IF zif_abapgit_object~exists( ) = abap_false.
cl_package_interface=>create_new_package_interface(
EXPORTING
i_pkg_interface_name = is_pinf-attributes-intf_name
i_publisher_pkg_name = iv_package
IMPORTING
e_package_interface = ri_interface
EXCEPTIONS
object_already_existing = 1
object_just_created = 2
interface_name_invalid = 3
unexpected_error = 4
OTHERS = 7 ).
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( 'error creating new package interface' ).
ENDIF.
ELSE.
cl_package_interface=>load_package_interface(
EXPORTING
i_package_interface_name = is_pinf-attributes-intf_name
i_force_reload = abap_true
IMPORTING
e_package_interface = ri_interface
EXCEPTIONS
db_read_error = 1
unexpected_error = 2
object_not_existing = 3
shorttext_not_existing = 4
object_locked_and_modified = 5
OTHERS = 6 ).
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( 'error loading package interface' ).
ENDIF.
ENDIF.
ENDMETHOD.
METHOD delete_elements.
DATA: lt_elements TYPE ty_elements.
FIELD-SYMBOLS: <li_element> LIKE LINE OF lt_elements.
ii_interface->set_elements_changeable( abap_true ).
ii_interface->get_elements( IMPORTING e_elements = lt_elements ).
LOOP AT lt_elements ASSIGNING <li_element>.
<li_element>->delete( ).
ENDLOOP.
ii_interface->save_elements( ).
ENDMETHOD.
METHOD zif_abapgit_object~delete.
DATA: lv_name TYPE scomifnam,
li_interface TYPE REF TO if_package_interface.
lv_name = ms_item-obj_name.
cl_package_interface=>load_package_interface(
EXPORTING
i_package_interface_name = lv_name
IMPORTING
e_package_interface = li_interface
EXCEPTIONS
db_read_error = 1
unexpected_error = 2
object_not_existing = 3
shorttext_not_existing = 4
object_locked_and_modified = 5
OTHERS = 6 ).
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( 'error loading package interface, delete' ).
ENDIF.
* elements must be deleted before the package interface
* can be deleted
delete_elements( li_interface ).
li_interface->set_changeable( abap_true ).
li_interface->delete( ).
li_interface->save( ).
ENDMETHOD. "delete
METHOD zif_abapgit_object~jump.
CALL FUNCTION 'RS_TOOL_ACCESS'
EXPORTING
operation = 'SHOW'
object_name = ms_item-obj_name
object_type = 'PINF'
in_new_window = abap_true.
ENDMETHOD. "jump
METHOD zif_abapgit_object~compare_to_remote_version.
CREATE OBJECT ro_comparison_result TYPE zcl_abapgit_comparison_null.
ENDMETHOD.
METHOD zif_abapgit_object~is_locked.
rv_is_locked = abap_false.
ENDMETHOD.
ENDCLASS. "zcl_abapgit_object_PINF IMPLEMENTATION
| [
31631,
1976,
565,
62,
397,
499,
18300,
62,
15252,
62,
79,
10745,
5550,
20032,
17941,
44731,
3268,
16879,
2043,
2751,
16034,
1976,
565,
62,
397,
499,
18300,
62,
48205,
62,
16668,
25261,
13,
628,
220,
44731,
44513,
13,
198,
220,
220,
220,
23255,
37,
2246,
1546,
1976,
361,
62,
397,
499,
18300,
62,
15252,
13,
628,
220,
4810,
3824,
6158,
44513,
13,
198,
220,
220,
220,
24412,
47,
1546,
25,
347,
43312,
3963,
1259,
62,
79,
10745,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
12608,
41876,
629,
3361,
312,
83,
18755,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4847,
220,
220,
41876,
49053,
9795,
43679,
3963,
629,
462,
335,
83,
18755,
13315,
5550,
38865,
35374,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
23578,
3963,
1259,
62,
79,
10745,
13,
628,
220,
220,
220,
24412,
47,
1546,
25,
1259,
62,
68,
3639,
41876,
49053,
9795,
43679,
3963,
256,
41091,
62,
26495,
62,
3849,
69,
62,
68,
10671,
62,
5420,
13315,
5550,
38865,
35374,
13,
628,
220,
220,
220,
337,
36252,
50,
25,
198,
220,
220,
220,
220,
220,
2251,
62,
273,
62,
2220,
198,
220,
220,
220,
220,
220,
220,
220,
30023,
9863,
2751,
318,
62,
79,
10745,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
1259,
62,
79,
10745,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
26495,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
1614,
4871,
198,
220,
220,
220,
220,
220,
220,
220,
30826,
4261,
15871,
26173,
8924,
7,
380,
62,
39994,
8,
41876,
4526,
37,
5390,
611,
62,
26495,
62,
39994,
198,
220,
220,
220,
220,
220,
220,
220,
17926,
1797,
2751,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
11,
198,
220,
220,
220,
220,
220,
12233,
62,
68,
3639,
198,
220,
220,
220,
220,
220,
220,
220,
30023,
9863,
2751,
21065,
62,
39994,
41876,
4526,
37,
5390,
611,
62,
26495,
62,
39994,
198,
220,
220,
220,
220,
220,
220,
220,
17926,
1797,
2751,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
11,
198,
220,
220,
220,
220,
220,
4296,
62,
1078,
7657,
198,
220,
220,
220,
220,
220,
220,
220,
30023,
9863,
2751,
318,
62,
79,
10745,
220,
220,
220,
220,
220,
41876,
1259,
62,
79,
10745,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21065,
62,
39994,
41876,
4526,
37,
5390,
611,
62,
26495,
62,
39994,
198,
220,
220,
220,
220,
220,
220,
220,
17926,
1797,
2751,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
11,
198,
220,
220,
220,
220,
220,
4296,
62,
68,
3639,
198,
220,
220,
220,
220,
220,
220,
220,
30023,
9863,
2751,
318,
62,
79,
10745,
220,
220,
220,
220,
220,
41876,
1259,
62,
79,
10745,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
21065,
62,
39994,
41876,
4526,
37,
5390,
611,
62,
26495,
62,
39994,
198,
220,
220,
220,
220,
220,
220,
220,
17926,
1797,
2751,
220,
220,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
13,
198,
198,
10619,
31631,
13,
198,
198,
31631,
1976,
565,
62,
397,
499,
18300,
62,
15252,
62,
79,
10745,
30023,
2538,
10979,
6234,
13,
628,
220,
337,
36252,
1976,
361,
62,
397,
499,
18300,
62,
15252,
93,
10134,
62,
40985,
62,
20777,
13,
198,
220,
220,
220,
374,
85,
62,
40985,
796,
450,
499,
62,
7942,
13,
198,
220,
23578,
49273,
13,
220,
366,
89,
361,
62,
397,
499,
18300,
62,
15252,
93,
10134,
62,
40985,
62,
20777,
628,
220,
337,
36252,
1976,
361,
62,
397,
499,
18300,
62,
15252,
93,
40985,
62,
1525,
13,
628,
220,
220,
220,
33493,
311,
2751,
2538,
3421,
62,
1525,
16034,
493,
69,
39319,
374,
85,
62,
7220,
198,
220,
220,
220,
220,
220,
33411,
493,
69,
62,
3672,
796,
13845,
62,
9186,
12,
26801,
62,
3672,
13,
198,
220,
220,
220,
16876,
827,
12,
7266,
6015,
1279,
29,
657,
13,
198,
220,
220,
220,
220,
220,
374,
85,
62,
7220,
796,
269,
62,
7220,
62,
34680,
13,
198,
220,
220,
220,
23578,
5064,
13,
628,
220,
23578,
49273,
13,
628,
220,
337,
36252,
1976,
361,
62,
397,
499,
18300,
62,
15252,
93,
1136,
62,
38993,
13,
198,
220,
220,
220,
44608,
62,
38993,
796,
651,
62,
38993,
7,
6739,
198,
220,
23578,
49273,
13,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
89,
361,
62,
397,
499,
18300,
62,
15252,
93,
1136,
62,
38993,
628,
220,
337,
36252,
1976,
361,
62,
397,
499,
18300,
62,
15252,
93,
1069,
1023,
13,
628,
220,
220,
220,
42865,
25,
300,
85,
62,
8002,
62,
3672,
41876,
493,
69,
12,
8002,
62,
3672,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
85,
62,
12417,
62,
8002,
41876,
256,
7959,
66,
12,
12417,
8002,
13,
628,
198,
220,
220,
220,
33493,
311,
2751,
2538,
2353,
62,
3672,
16034,
493,
69,
39319,
300,
85,
62,
8002,
62,
3672,
198,
220,
220,
220,
220,
220,
33411,
493,
69,
62,
3672,
796,
13845,
62,
9186,
12,
26801,
62,
3672,
13,
198,
220,
220,
220,
374,
85,
62,
30388,
796,
20512,
66,
7,
827,
12,
7266,
6015,
796,
657,
6739,
628,
220,
220,
220,
16876,
374,
85,
62,
30388,
796,
450,
499,
62,
7942,
13,
198,
220,
220,
220,
220,
220,
33493,
311,
2751,
2538,
1388,
8002,
16034,
256,
7959,
66,
39319,
300,
85,
62,
12417,
62,
8002,
198,
220,
220,
220,
220,
220,
220,
220,
33411,
1614,
4871,
796,
300,
85,
62,
8002,
62,
3672,
13,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
25113,
2943,
14514,
62,
35353,
19499,
5777,
198,
220,
220,
220,
220,
220,
374,
85,
62,
30388,
796,
20512,
66,
7,
827,
12,
7266,
6015,
796,
657,
6739,
198,
220,
220,
220,
23578,
5064
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1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E i,
fixed_length TYPE i,
terminator TYPE string,
length_field_length TYPE i,
length_field_offset TYPE i,
length_field_header TYPE i,
END OF ty_apc_tcp_frame.
ENDINTERFACE. | [
41358,
49836,
611,
62,
397,
499,
62,
17620,
62,
19199,
44731,
13,
198,
220,
24412,
47,
1546,
25,
347,
43312,
3963,
1259,
62,
499,
66,
62,
83,
13155,
62,
14535,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5739,
62,
4906,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
1312,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5969,
62,
13664,
220,
220,
220,
220,
220,
220,
220,
41876,
1312,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
5651,
1352,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4129,
62,
3245,
62,
13664,
41876,
1312,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4129,
62,
3245,
62,
28968,
41876,
1312,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4129,
62,
3245,
62,
25677,
41876,
1312,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
23578,
3963,
1259,
62,
499,
66,
62,
83,
13155,
62,
14535,
13,
198,
10619,
41358,
49836,
13
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS zcl_advent2020_day12_rename DEFINITION
PUBLIC
FINAL
CREATE PUBLIC .
PUBLIC SECTION.
INTERFACES zif_advent2020_rename .
PROTECTED SECTION.
PRIVATE SECTION.
ENDCLASS.
CLASS ZCL_ADVENT2020_DAY12_RENAME IMPLEMENTATION.
METHOD zif_advent2020_rename~solve.
output = 'todo'.
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
324,
1151,
42334,
62,
820,
1065,
62,
918,
480,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
25261,
198,
220,
29244,
6158,
44731,
764,
628,
220,
44731,
44513,
13,
628,
220,
220,
220,
23255,
37,
2246,
1546,
1976,
361,
62,
324,
1151,
42334,
62,
918,
480,
764,
198,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
4810,
3824,
6158,
44513,
13,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1168,
5097,
62,
2885,
53,
3525,
42334,
62,
26442,
1065,
62,
49,
1677,
10067,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
1976,
361,
62,
324,
1151,
42334,
62,
918,
480,
93,
82,
6442,
13,
628,
220,
220,
220,
5072,
796,
705,
83,
24313,
4458,
628,
220,
23578,
49273,
13,
198,
10619,
31631,
13,
198
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS lcl_test DEFINITION DEFERRED.
CLASS zcl_ntlm_arc4 DEFINITION LOCAL FRIENDS lcl_test.
*----------------------------------------------------------------------*
* CLASS lcl_Test DEFINITION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS lcl_test DEFINITION FOR TESTING
DURATION SHORT
RISK LEVEL HARMLESS
FINAL.
PRIVATE SECTION.
* ================
METHODS: encrypt1 FOR TESTING RAISING cx_static_check,
encrypt2 FOR TESTING RAISING cx_static_check,
encrypt3 FOR TESTING RAISING cx_static_check,
decrypt1 FOR TESTING RAISING cx_static_check,
to_xstring FOR TESTING RAISING cx_static_check.
ENDCLASS. "lcl_Test
*----------------------------------------------------------------------*
* CLASS lcl_Test IMPLEMENTATION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS lcl_test IMPLEMENTATION.
* ==============================
METHOD to_xstring.
* ==============================
DATA: lv_result TYPE xstring.
lv_result = zcl_ntlm_arc4=>to_xstring( 'Key' ).
cl_abap_unit_assert=>assert_equals(
exp = '4B6579'
act = lv_result ).
ENDMETHOD. "string_To_Xstring_Utf8
METHOD encrypt1.
* ==============================
DATA: lv_ciphertext TYPE xstring.
lv_ciphertext = zcl_ntlm_arc4=>encrypt(
iv_key = 'Key'
iv_plaintext = 'Plaintext' ).
cl_abap_unit_assert=>assert_equals(
exp = 'BBF316E8D940AF0AD3'
act = lv_ciphertext ).
ENDMETHOD. "encrypt
METHOD encrypt2.
* ==============================
DATA: lv_ciphertext TYPE xstring.
lv_ciphertext = zcl_ntlm_arc4=>encrypt(
iv_key = 'Wiki'
iv_plaintext = 'pedia' ).
cl_abap_unit_assert=>assert_equals(
exp = '1021BF0420'
act = lv_ciphertext ).
ENDMETHOD. "encrypt2
METHOD encrypt3.
* ==============================
DATA: lv_ciphertext TYPE xstring.
lv_ciphertext = zcl_ntlm_arc4=>encrypt(
iv_key = 'Secret'
iv_plaintext = 'Attack at dawn' ).
cl_abap_unit_assert=>assert_equals(
exp = '45A01F645FC35B383552544B9BF5'
act = lv_ciphertext ).
ENDMETHOD. "encrypt3
METHOD decrypt1.
* ==============================
CONSTANTS: lc_plaintext TYPE string VALUE 'Plaintext',
lc_key TYPE string VALUE 'Key'.
DATA: lv_plaintext TYPE string,
lv_ciphertext TYPE xstring.
lv_ciphertext = zcl_ntlm_arc4=>encrypt(
iv_key = lc_key
iv_plaintext = lc_plaintext ).
lv_plaintext = zcl_ntlm_arc4=>decrypt(
iv_key = lc_key
iv_ciphertext = lv_ciphertext ).
cl_abap_unit_assert=>assert_equals(
exp = lc_plaintext
act = lv_plaintext ).
ENDMETHOD. "encrypt
ENDCLASS. "lcl_Test
| [
31631,
300,
565,
62,
9288,
5550,
20032,
17941,
23449,
1137,
22083,
13,
198,
31631,
1976,
565,
62,
429,
75,
76,
62,
5605,
19,
5550,
20032,
17941,
37347,
1847,
48167,
1677,
5258,
300,
565,
62,
9288,
13,
198,
198,
9,
10097,
23031,
9,
198,
9,
220,
220,
220,
220,
220,
220,
42715,
300,
565,
62,
14402,
5550,
20032,
17941,
198,
9,
10097,
23031,
9,
198,
9,
198,
9,
10097,
23031,
9,
198,
31631,
300,
565,
62,
9288,
5550,
20032,
17941,
7473,
43001,
2751,
198,
220,
360,
4261,
6234,
6006,
9863,
198,
220,
45698,
42,
49277,
43638,
5805,
7597,
198,
220,
25261,
13,
628,
220,
4810,
3824,
6158,
44513,
13,
198,
9,
796,
25609,
18604,
628,
220,
220,
220,
337,
36252,
50,
25,
34117,
16,
7473,
43001,
2751,
17926,
1797,
2751,
43213,
62,
12708,
62,
9122,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
34117,
17,
7473,
43001,
2751,
17926,
1797,
2751,
43213,
62,
12708,
62,
9122,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
34117,
18,
7473,
43001,
2751,
17926,
1797,
2751,
43213,
62,
12708,
62,
9122,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
42797,
16,
7473,
43001,
2751,
17926,
1797,
2751,
43213,
62,
12708,
62,
9122,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
284,
62,
87,
8841,
7473,
43001,
2751,
17926,
1797,
2751,
43213,
62,
12708,
62,
9122,
13,
198,
198,
10619,
31631,
13,
220,
220,
220,
220,
220,
220,
366,
75,
565,
62,
14402,
198,
198,
9,
10097,
23031,
9,
198,
9,
220,
220,
220,
220,
220,
220,
42715,
300,
565,
62,
14402,
30023,
2538,
10979,
6234,
198,
9,
10097,
23031,
9,
198,
9,
198,
9,
10097,
23031,
9,
198,
31631,
300,
565,
62,
9288,
30023,
2538,
10979,
6234,
13,
198,
9,
36658,
25609,
28,
628,
220,
337,
36252,
284,
62,
87,
8841,
13,
198,
9,
36658,
25609,
28,
628,
220,
220,
220,
42865,
25,
300,
85,
62,
20274,
41876,
2124,
8841,
13,
628,
198,
220,
220,
220,
300,
85,
62,
20274,
796,
1976,
565,
62,
429,
75,
76,
62,
5605,
19,
14804,
1462,
62,
87,
8841,
7,
705,
9218,
6,
6739,
628,
220,
220,
220,
537,
62,
397,
499,
62,
20850,
62,
30493,
14804,
30493,
62,
4853,
874,
7,
198,
220,
220,
220,
220,
220,
220,
220,
1033,
796,
705,
19,
33,
2996,
3720,
6,
198,
220,
220,
220,
220,
220,
220,
220,
719,
796,
300,
85,
62,
20274,
6739,
628,
220,
23578,
49273,
13,
220,
220,
220,
220,
220,
220,
366,
8841,
62,
2514,
62,
55,
8841,
62,
18274,
69,
23,
628,
220,
337,
36252,
34117,
16,
13,
198,
9,
36658,
25609,
28,
628,
220,
220,
220,
42865,
25,
300,
85,
62,
66,
10803,
5239,
41876,
2124,
8841,
13,
628,
198,
220,
220,
220,
300,
85,
62,
66,
10803,
5239,
796,
1976,
565,
62,
429,
75,
76,
62,
5605,
19,
14804,
12685,
6012,
7,
198,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
2539,
220,
220,
220,
220,
220,
220,
796,
705,
9218,
6,
198,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
25638,
5239,
796,
705,
3646,
391,
5239,
6,
6739,
628,
220,
220,
220,
537,
62,
397,
499,
62,
20850,
62,
30493,
14804,
30493,
62,
4853,
874,
7,
198,
220,
220,
220,
220,
220,
220,
220,
1033,
796,
705,
15199,
37,
33400,
36,
23,
35,
46899,
8579,
15,
2885,
18,
6,
198,
220,
220,
220,
220,
220,
220,
220,
719,
796,
300,
85,
62,
66,
10803,
5239,
6739,
628,
220,
23578,
49273,
13,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
12685,
6012,
628,
220,
337,
36252,
34117,
17,
13,
198,
9,
36658,
25609,
28,
628,
220,
220,
220,
42865,
25,
300,
85,
62,
66,
10803,
5239,
41876,
2124,
8841,
13,
628,
198,
220,
220,
220,
300,
85,
62,
66,
10803,
5239,
796,
1976,
565,
62,
429,
75,
76,
62,
5605,
19,
14804,
12685,
6012,
7,
198,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
2539,
220,
220,
220,
220,
220,
220,
796,
705,
32603,
6,
198,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
25638,
5239,
796,
705,
50235,
6,
6739,
628,
220,
220,
220,
537,
62,
397,
499,
62,
20850,
62,
30493,
14804,
30493,
62,
4853,
874,
7,
198,
220,
220,
220,
220,
220,
220,
220,
1033,
796,
705,
940,
2481,
29499,
3023,
1238,
6,
198,
220,
220,
220,
220,
220,
220,
220,
719,
796,
300,
85,
62,
66,
10803,
5239,
6739,
628,
220,
23578,
49273,
13,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
12685,
6012,
17,
628,
198,
220,
337,
36252,
34117,
18,
13,
198,
9,
36658,
25609,
28,
628,
220,
220,
220,
42865,
25,
300,
85,
62,
66,
10803,
5239,
41876,
2124,
8841,
13,
628,
198,
220,
220,
220,
300,
85,
62,
66,
10803,
5239,
796,
1976,
565,
62,
429,
75,
76,
62,
5605,
19,
14804,
12685,
6012,
7,
198,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
2539,
220,
220,
220,
220,
220,
220,
796,
705,
23725,
6,
198,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
25638,
5239,
796,
705,
27732,
379,
17577,
6,
6739,
628,
220,
220,
220,
537,
62,
397,
499,
62,
20850,
62,
30493,
14804,
30493,
62,
4853,
874,
7,
198,
220,
220,
220,
220,
220,
220,
220,
1033,
796,
705,
2231,
32,
486,
37,
49259,
4851,
2327,
33,
2548,
28567,
1495,
2598,
33,
24,
29499,
20,
6,
198,
220,
220,
220,
220,
220,
220,
220,
719,
796,
300,
85,
62,
66,
10803,
5239,
6739,
628,
220,
23578,
49273,
13,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
12685,
6012,
18,
628,
220,
337,
36252,
42797,
16,
13,
198,
9,
36658,
25609,
28,
628,
220,
220,
220,
7102,
2257,
1565,
4694,
25,
300,
66,
62,
25638,
5239,
41876,
4731,
26173,
8924,
705,
3646,
391,
5239,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1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do not include other source files here!!!
interfaces IF_T100_MESSAGE .
constants:
begin of BUGS_ARE_MANDATORY,
msgid type symsgid value 'ZBT_ALV_CTRL_MSG',
msgno type symsgno value '001',
attr1 type scx_attrname value '',
attr2 type scx_attrname value '',
attr3 type scx_attrname value '',
attr4 type scx_attrname value '',
end of BUGS_ARE_MANDATORY .
data TRANSPORT type ref to ZCL_TRANSPORT .
methods CONSTRUCTOR
importing
!TEXTID like IF_T100_MESSAGE=>T100KEY optional
!PREVIOUS like PREVIOUS optional
!TRANSPORT type ref to ZCL_TRANSPORT optional .
protected section.
*"* protected components of class ZCX_TRANSPORT_ALV_CTRL_EXC
*"* do not include other source files here!!!
private section.
*"* private components of class ZCX_TRANSPORT_ALV_CTRL_EXC
*"* do not include other source files here!!!
ENDCLASS.
CLASS ZCX_TRANSPORT_ALV_CTRL_EXC IMPLEMENTATION.
method CONSTRUCTOR.
CALL METHOD SUPER->CONSTRUCTOR
EXPORTING
PREVIOUS = PREVIOUS
.
me->TRANSPORT = TRANSPORT .
clear me->textid.
if textid is initial.
IF_T100_MESSAGE~T100KEY = IF_T100_MESSAGE=>DEFAULT_TEXTID.
else.
IF_T100_MESSAGE~T100KEY = TEXTID.
endif.
endmethod.
ENDCLASS.
| [
4871,
1168,
34,
55,
62,
5446,
1565,
4303,
9863,
62,
1847,
53,
62,
4177,
7836,
62,
6369,
34,
6770,
198,
220,
1171,
198,
220,
10639,
1780,
422,
327,
55,
62,
35744,
2149,
62,
50084,
198,
220,
2457,
198,
220,
2251,
1171,
764,
198,
198,
11377,
2665,
13,
198,
9,
1,
9,
1171,
6805,
286,
1398,
1168,
34,
55,
62,
5446,
1565,
4303,
9863,
62,
1847,
53,
62,
4177,
7836,
62,
6369,
34,
198,
9,
1,
9,
466,
407,
2291,
584,
2723,
3696,
994,
10185,
628,
220,
20314,
16876,
62,
51,
3064,
62,
44,
1546,
4090,
8264,
764,
628,
220,
38491,
25,
198,
220,
220,
220,
2221,
286,
347,
7340,
50,
62,
12203,
62,
44,
6981,
1404,
15513,
11,
198,
220,
220,
220,
220,
220,
31456,
312,
2099,
827,
19662,
312,
1988,
705,
57,
19313,
62,
1847,
53,
62,
4177,
7836,
62,
5653,
38,
3256,
198,
220,
220,
220,
220,
220,
31456,
3919,
2099,
827,
19662,
3919,
1988,
705,
8298,
3256,
198,
220,
220,
220,
220,
220,
708,
81,
16,
2099,
629,
87,
62,
35226,
3672,
1988,
705,
3256,
198,
220,
220,
220,
220,
220,
708,
81,
17,
2099,
629,
87,
62,
35226,
3672,
1988,
705,
3256,
198,
220,
220,
220,
220,
220,
708,
81,
18,
2099,
629,
87,
62,
35226,
3672,
1988,
705,
3256,
198,
220,
220,
220,
220,
220,
708,
81,
19,
2099,
629,
87,
62,
35226,
3672,
1988,
705,
3256,
198,
220,
220,
220,
886,
286,
347,
7340,
50,
62,
12203,
62,
44,
6981,
1404,
15513,
764,
198,
220,
1366,
48213,
4303,
9863,
2099,
1006,
284,
1168,
5097,
62,
5446,
1565,
4303,
9863,
764,
628,
220,
5050,
7102,
46126,
1581,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
32541,
2389,
588,
16876,
62,
51,
3064,
62,
44,
1546,
4090,
8264,
14804,
51,
3064,
20373,
11902,
198,
220,
220,
220,
220,
220,
5145,
46437,
12861,
20958,
588,
22814,
12861,
20958,
11902,
198,
220,
220,
220,
220,
220,
5145,
5446,
1565,
4303,
9863,
2099,
1006,
284,
1168,
5097,
62,
5446,
1565,
4303,
9863,
11902,
764,
198,
24326,
2665,
13,
198,
9,
1,
9,
6861,
6805,
286,
1398,
1168,
34,
55,
62,
5446,
1565,
4303,
9863,
62,
1847,
53,
62,
4177,
7836,
62,
6369,
34,
198,
9,
1,
9,
466,
407,
2291,
584,
2723,
3696,
994,
10185,
198,
19734,
2665,
13,
198,
9,
1,
9,
2839,
6805,
286,
1398,
1168,
34,
55,
62,
5446,
1565,
4303,
9863,
62,
1847,
53,
62,
4177,
7836,
62,
6369,
34,
198,
9,
1,
9,
466,
407,
2291,
584,
2723,
3696,
994,
10185,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1168,
34,
55,
62,
5446,
1565,
4303,
9863,
62,
1847,
53,
62,
4177,
7836,
62,
6369,
34,
30023,
2538,
10979,
6234,
13,
628,
198,
24396,
7102,
46126,
1581,
13,
198,
34,
7036,
337,
36252,
33088,
3784,
10943,
46126,
1581,
198,
6369,
15490,
2751,
198,
46437,
12861,
20958,
796,
22814,
12861,
20958,
198,
13,
198,
1326,
3784,
5446,
1565,
4303,
9863,
796,
48213,
4303,
9863,
764,
198,
20063,
502,
3784,
5239,
312,
13,
198,
361,
2420,
312,
318,
4238,
13,
198,
220,
16876,
62,
51,
3064,
62,
44,
1546,
4090,
8264,
93,
51,
3064,
20373,
796,
16876,
62,
51,
3064,
62,
44,
1546,
4090,
8264,
14804,
7206,
38865,
62,
32541,
2389,
13,
198,
17772,
13,
198,
220,
16876,
62,
51,
3064,
62,
44,
1546,
4090,
8264,
93,
51,
3064,
20373,
796,
40383,
2389,
13,
198,
32088,
13,
198,
437,
24396,
13,
198,
10619,
31631,
13,
198
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS ltcl_test DEFINITION DEFERRED.
CLASS zcx_adv_exception DEFINITION LOCAL FRIENDS ltcl_test.
CLASS ltcl_test DEFINITION
FOR TESTING
DURATION SHORT
RISK LEVEL HARMLESS.
PUBLIC SECTION.
METHODS:
test_direct_text FOR TESTING,
test_t100_text1 FOR TESTING,
test_t100_text2 FOR TESTING,
test_t100_text3 FOR TESTING,
test_t100_text4 FOR TESTING,
test_t100_text5 FOR TESTING,
test_t100_text6 FOR TESTING,
test_t100_text7 FOR TESTING,
test_t100_text8 FOR TESTING,
test_no_text FOR TESTING.
PROTECTED SECTION.
PRIVATE SECTION.
TYPES:
BEGIN OF gty_t100_message,
msgid TYPE symsgid,
msgno TYPE symsgno,
msgv1 TYPE symsgv,
msgv2 TYPE symsgv,
msgv3 TYPE symsgv,
msgv4 TYPE symsgv,
END OF gty_t100_message.
CLASS-METHODS:
get_exc_text IMPORTING ix_ex TYPE REF TO cx_root
RETURNING VALUE(rv_text) TYPE string,
get_t100_text IMPORTING is_message TYPE gty_t100_message
RETURNING VALUE(rv_text) TYPE string.
ENDCLASS.
CLASS ltcl_test IMPLEMENTATION.
METHOD test_direct_text.
CONSTANTS: lc_text1 TYPE string VALUE `This is a test error message.`,
lc_text2 TYPE string VALUE ``.
DATA: lx_ex TYPE REF TO zcx_adv_exception,
lx_previous TYPE REF TO cx_root.
TRY.
lx_previous = new cx_sy_dyn_call_illegal_method(
textid = cx_sy_dyn_call_illegal_method=>private_method
classname = 'CLASS'
methodname = 'METHOD'
).
zcx_adv_exception=>raise( iv_text = lx_previous->get_text( )
ix_previous = lx_previous ).
cl_abap_unit_assert=>fail( ).
CATCH zcx_adv_exception INTO lx_ex.
cl_abap_unit_assert=>assert_equals( act = get_exc_text( lx_ex )
exp = lx_previous->get_text( ) ).
cl_abap_unit_assert=>assert_equals( act = lx_ex->previous exp = lx_previous ).
ENDTRY.
FREE: lx_ex, lx_previous.
TRY.
zcx_adv_exception=>raise( lc_text1 ).
cl_abap_unit_assert=>fail( ).
CATCH zcx_adv_exception INTO lx_ex.
cl_abap_unit_assert=>assert_equals( act = get_exc_text( lx_ex ) exp = lc_text1 ).
ENDTRY.
FREE lx_ex.
TRY.
zcx_adv_exception=>raise( lc_text2 ).
cl_abap_unit_assert=>fail( ).
CATCH zcx_adv_exception INTO lx_ex.
cl_abap_unit_assert=>assert_equals(
act = get_exc_text( lx_ex )
exp = zcx_adv_exception=>gc_generic_error_msg ).
ENDTRY.
FREE lx_ex.
ENDMETHOD.
METHOD test_no_text.
DATA: lx_ex TYPE REF TO zcx_adv_exception.
TRY.
zcx_adv_exception=>raise( space ).
cl_abap_unit_assert=>fail( ).
CATCH zcx_adv_exception INTO lx_ex.
cl_abap_unit_assert=>assert_equals(
act = get_exc_text( lx_ex )
exp = zcx_adv_exception=>gc_generic_error_msg ).
ENDTRY.
ENDMETHOD.
METHOD test_t100_text1.
CONSTANTS: BEGIN OF lc_msg1,
msgid TYPE symsgid VALUE '00',
msgno TYPE symsgno VALUE '001',
msgv1 TYPE symsgv VALUE IS INITIAL,
msgv2 TYPE symsgv VALUE IS INITIAL,
msgv3 TYPE symsgv VALUE IS INITIAL,
msgv4 TYPE symsgv VALUE IS INITIAL,
END OF lc_msg1.
DATA: lx_ex TYPE REF TO zcx_adv_exception,
lv_text TYPE string.
TRY.
lv_text = get_t100_text( lc_msg1 ).
zcx_adv_exception=>raise_t100( ).
cl_abap_unit_assert=>fail( ).
CATCH zcx_adv_exception INTO lx_ex.
cl_abap_unit_assert=>assert_equals( act = get_exc_text( lx_ex ) exp = lv_text ).
ENDTRY.
ENDMETHOD.
METHOD test_t100_text2.
CONSTANTS: BEGIN OF lc_msg2,
msgid TYPE symsgid VALUE '00',
msgno TYPE symsgno VALUE '001',
msgv1 TYPE symsgv VALUE 'Variable 1',
msgv2 TYPE symsgv VALUE IS INITIAL,
msgv3 TYPE symsgv VALUE IS INITIAL,
msgv4 TYPE symsgv VALUE IS INITIAL,
END OF lc_msg2.
DATA: lx_ex TYPE REF TO zcx_adv_exception,
lv_text TYPE string.
TRY.
lv_text = get_t100_text( lc_msg2 ).
zcx_adv_exception=>raise_t100( ).
cl_abap_unit_assert=>fail( ).
CATCH zcx_adv_exception INTO lx_ex.
cl_abap_unit_assert=>assert_equals( act = get_exc_text( lx_ex ) exp = lv_text ).
ENDTRY.
ENDMETHOD.
METHOD test_t100_text3.
CONSTANTS: BEGIN OF lc_msg3,
msgid TYPE symsgid VALUE '00',
msgno TYPE symsgno VALUE '001',
msgv1 TYPE symsgv VALUE 'Variable 1',
msgv2 TYPE symsgv VALUE 'Variable 2',
msgv3 TYPE symsgv VALUE IS INITIAL,
msgv4 TYPE symsgv VALUE IS INITIAL,
END OF lc_msg3.
DATA: lx_ex TYPE REF TO zcx_adv_exception,
lv_text TYPE string.
TRY.
lv_text = get_t100_text( lc_msg3 ).
zcx_adv_exception=>raise_t100( ).
cl_abap_unit_assert=>fail( ).
CATCH zcx_adv_exception INTO lx_ex.
cl_abap_unit_assert=>assert_equals( act = get_exc_text( lx_ex ) exp = lv_text ).
ENDTRY.
ENDMETHOD.
METHOD test_t100_text4.
CONSTANTS: BEGIN OF lc_msg4,
msgid TYPE symsgid VALUE '00',
msgno TYPE symsgno VALUE '001',
msgv1 TYPE symsgv VALUE 'Variable 1',
msgv2 TYPE symsgv VALUE 'Variable 2',
msgv3 TYPE symsgv VALUE 'Variable 3',
msgv4 TYPE symsgv VALUE IS INITIAL,
END OF lc_msg4.
DATA: lx_ex TYPE REF TO zcx_adv_exception,
lv_text TYPE string.
TRY.
lv_text = get_t100_text( lc_msg4 ).
zcx_adv_exception=>raise_t100( ).
cl_abap_unit_assert=>fail( ).
CATCH zcx_adv_exception INTO lx_ex.
cl_abap_unit_assert=>assert_equals( act = get_exc_text( lx_ex ) exp = lv_text ).
ENDTRY.
ENDMETHOD.
METHOD test_t100_text5.
CONSTANTS: BEGIN OF lc_msg5,
msgid TYPE symsgid VALUE '00',
msgno TYPE symsgno VALUE '001',
msgv1 TYPE symsgv VALUE 'Variable 1',
msgv2 TYPE symsgv VALUE 'Variable 2',
msgv3 TYPE symsgv VALUE 'Variable 3',
msgv4 TYPE symsgv VALUE 'Variable 4',
END OF lc_msg5.
DATA: lx_ex TYPE REF TO zcx_adv_exception,
lv_text TYPE string.
TRY.
lv_text = get_t100_text( lc_msg5 ).
zcx_adv_exception=>raise_t100( ).
cl_abap_unit_assert=>fail( ).
CATCH zcx_adv_exception INTO lx_ex.
cl_abap_unit_assert=>assert_equals( act = get_exc_text( lx_ex ) exp = lv_text ).
ENDTRY.
ENDMETHOD.
METHOD test_t100_text6.
CONSTANTS: BEGIN OF lc_msg6,
msgid TYPE symsgid VALUE '00',
msgno TYPE symsgno VALUE '003',
msgv1 TYPE symsgv VALUE 'Variable 1',
msgv2 TYPE symsgv VALUE 'Variable 2',
msgv3 TYPE symsgv VALUE 'Variable 3',
msgv4 TYPE symsgv VALUE 'Variable 4',
END OF lc_msg6.
DATA: lx_ex TYPE REF TO zcx_adv_exception,
lv_text TYPE string.
TRY.
lv_text = get_t100_text( lc_msg6 ).
zcx_adv_exception=>raise_t100( ).
cl_abap_unit_assert=>fail( ).
CATCH zcx_adv_exception INTO lx_ex.
cl_abap_unit_assert=>assert_equals( act = get_exc_text( lx_ex ) exp = lv_text ).
ENDTRY.
ENDMETHOD.
METHOD test_t100_text7.
CONSTANTS: BEGIN OF lc_msg7,
msgid TYPE symsgid VALUE '00',
msgno TYPE symsgno VALUE '003',
msgv1 TYPE symsgv VALUE IS INITIAL,
msgv2 TYPE symsgv VALUE IS INITIAL,
msgv3 TYPE symsgv VALUE IS INITIAL,
msgv4 TYPE symsgv VALUE IS INITIAL,
END OF lc_msg7.
DATA: lx_ex TYPE REF TO zcx_adv_exception,
lv_text TYPE string.
TRY.
lv_text = get_t100_text( lc_msg7 ).
zcx_adv_exception=>raise_t100( ).
cl_abap_unit_assert=>fail( ).
CATCH zcx_adv_exception INTO lx_ex.
cl_abap_unit_assert=>assert_equals( act = get_exc_text( lx_ex ) exp = lv_text ).
ENDTRY.
ENDMETHOD.
METHOD test_t100_text8.
CONSTANTS: BEGIN OF lc_msg8,
msgid TYPE symsgid VALUE '00',
msgno TYPE symsgno VALUE '002',
msgv1 TYPE symsgv VALUE IS INITIAL,
msgv2 TYPE symsgv VALUE IS INITIAL,
msgv3 TYPE symsgv VALUE IS INITIAL,
msgv4 TYPE symsgv VALUE IS INITIAL,
END OF lc_msg8.
DATA: lx_ex TYPE REF TO zcx_adv_exception,
lv_text TYPE string.
TRY.
lv_text = get_t100_text( lc_msg8 ).
zcx_adv_exception=>raise_t100( ).
cl_abap_unit_assert=>fail( ).
CATCH zcx_adv_exception INTO lx_ex.
cl_abap_unit_assert=>assert_equals( act = get_exc_text( lx_ex ) exp = lv_text ).
ENDTRY.
ENDMETHOD.
METHOD get_exc_text.
cl_message_helper=>set_msg_vars_for_if_msg( ix_ex ).
MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
INTO rv_text.
ENDMETHOD.
METHOD get_t100_text.
MESSAGE ID is_message-msgid TYPE 'S' NUMBER is_message-msgno
WITH is_message-msgv1 is_message-msgv2 is_message-msgv3 is_message-msgv4
INTO rv_text.
ENDMETHOD.
ENDCLASS.
| [
31631,
300,
83,
565,
62,
9288,
5550,
20032,
17941,
23449,
1137,
22083,
13,
198,
31631,
1976,
66,
87,
62,
32225,
62,
1069,
4516,
5550,
20032,
17941,
37347,
1847,
48167,
1677,
5258,
300,
83,
565,
62,
9288,
13,
198,
198,
31631,
300,
83,
565,
62,
9288,
5550,
20032,
17941,
198,
220,
7473,
43001,
2751,
198,
220,
360,
4261,
6234,
6006,
9863,
198,
220,
45698,
42,
49277,
43638,
5805,
7597,
13,
628,
220,
44731,
44513,
13,
198,
220,
220,
220,
337,
36252,
50,
25,
198,
220,
220,
220,
220,
220,
1332,
62,
12942,
62,
5239,
7473,
43001,
2751,
11,
198,
220,
220,
220,
220,
220,
1332,
62,
83,
3064,
62,
5239,
16,
7473,
43001,
2751,
11,
198,
220,
220,
220,
220,
220,
1332,
62,
83,
3064,
62,
5239,
17,
7473,
43001,
2751,
11,
198,
220,
220,
220,
220,
220,
1332,
62,
83,
3064,
62,
5239,
18,
7473,
43001,
2751,
11,
198,
220,
220,
220,
220,
220,
1332,
62,
83,
3064,
62,
5239,
19,
7473,
43001,
2751,
11,
198,
220,
220,
220,
220,
220,
1332,
62,
83,
3064,
62,
5239,
20,
7473,
43001,
2751,
11,
198,
220,
220,
220,
220,
220,
1332,
62,
83,
3064,
62,
5239,
21,
7473,
43001,
2751,
11,
198,
220,
220,
220,
220,
220,
1332,
62,
83,
3064,
62,
5239,
22,
7473,
43001,
2751,
11,
198,
220,
220,
220,
220,
220,
1332,
62,
83,
3064,
62,
5239,
23,
7473,
43001,
2751,
11,
198,
220,
220,
220,
220,
220,
1332,
62,
3919,
62,
5239,
7473,
43001,
2751,
13,
198,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
4810,
3824,
6158,
44513,
13,
198,
220,
220,
220,
24412,
47,
1546,
25,
198,
220,
220,
220,
220,
220,
347,
43312,
3963,
308,
774,
62,
83,
3064,
62,
20500,
11,
198,
220,
220,
220,
220,
220,
220,
220,
31456,
312,
41876,
827,
19662,
312,
11,
198,
220,
220,
220,
220,
220,
220,
220,
31456,
3919,
41876,
827,
19662,
3919,
11,
198,
220,
220,
220,
220,
220,
220,
220,
31456,
85,
16,
41876,
827,
19662,
85,
11,
198,
220,
220,
220,
220,
220,
220,
220,
31456,
85,
17,
41876,
827,
19662,
85,
11,
198,
220,
220,
220,
220,
220,
220,
220,
31456,
85,
18,
41876,
827,
19662,
85,
11,
198,
220,
220,
220,
220,
220,
220,
220,
31456,
85,
19,
41876,
827,
19662,
85,
11,
198,
220,
220,
220,
220,
220,
23578,
3963,
308,
774,
62,
83,
3064,
62,
20500,
13,
198,
220,
220,
220,
42715,
12,
49273,
50,
25,
198,
220,
220,
220,
220,
220,
651,
62,
41194,
62,
5239,
30023,
9863,
2751,
220,
844,
62,
1069,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
43213,
62,
15763,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
30826,
4261,
15871,
26173,
8924,
7,
81,
85,
62,
5239,
8,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
651,
62,
83,
3064,
62,
5239,
30023,
9863,
2751,
318,
62,
20500,
220,
220,
220,
220,
41876,
308,
774,
62,
83,
3064,
62,
20500,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
30826,
4261,
15871,
26173,
8924,
7,
81,
85,
62,
5239,
8,
41876,
4731,
13,
198,
10619,
31631,
13,
198,
198,
31631,
300,
83,
565,
62,
9288,
30023,
2538,
10979,
6234,
13,
198,
220,
337,
36252,
1332,
62,
12942,
62,
5239,
13,
198,
220,
220,
220,
7102,
2257,
1565,
4694,
25,
300,
66,
62,
5239,
16,
41876,
4731,
26173,
8924,
4600,
1212,
318,
257,
1332,
4049,
3275,
13,
47671,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
66,
62,
5239,
17,
41876,
4731,
26173,
8924,
7559,
13,
198,
220,
220,
220,
42865,
25,
300,
87,
62,
1069,
220,
220,
220,
220,
220,
220,
41876,
4526,
37,
5390,
1976,
66,
87,
62,
32225,
62,
1069,
4516,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
300,
87,
62,
3866,
1442,
41876,
4526,
37,
5390,
43213,
62,
15763,
13,
628,
220,
220,
220,
7579,
56,
13,
198,
220,
220,
220,
220,
220,
220,
220,
300,
87,
62,
3866,
1442,
796,
649,
43213,
62,
1837,
62,
67,
2047,
62,
13345,
62,
47749,
62,
24396,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2420,
312,
220,
220,
220,
220,
796,
43213,
62,
1837,
62,
67,
2047,
62,
13345,
62,
47749,
62,
24396,
14804,
19734,
62,
24396,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1398,
3672,
220,
796,
705,
31631,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2446,
3672,
796,
705,
49273,
6,
198,
220,
220,
220,
220,
220,
220,
220,
6739,
628,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
32225,
62,
1069,
4516,
14804,
40225,
7,
21628,
62,
5239,
220,
220,
220,
220,
796,
300,
87,
62,
3866,
1442,
3784,
1136,
62,
5239,
7,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
844,
62,
3866,
1442,
796,
300,
87,
62,
3866,
1442,
6739,
198,
220,
220,
220,
220,
220,
220,
220,
537,
62,
397,
499,
62,
20850,
62,
30493,
14804,
32165,
7,
6739,
628,
220,
220,
220,
220,
220,
327,
11417,
1976,
66,
87,
62,
32225,
62,
1069,
4516,
39319,
300,
87,
62,
1069,
13,
198,
220,
220,
220,
220,
220,
220,
220,
537,
62,
397,
499,
62,
20850,
62,
30493,
14804,
30493,
62,
4853,
874,
7,
719,
796,
651,
62,
41194,
62,
5239,
7,
300,
87,
62,
1069,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1033,
796,
300,
87,
62,
3866,
1442,
3784,
1136,
62,
5239,
7,
1267,
6739,
198,
220,
220,
220,
220,
220,
220,
220,
537,
62,
397,
499,
62,
20850,
62,
30493
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS cl_http_server DEFINITION PUBLIC CREATE PRIVATE.
PUBLIC SECTION.
CLASS-METHODS get_location
EXPORTING
host TYPE string.
ENDCLASS.
CLASS cl_http_server IMPLEMENTATION.
METHOD get_location.
host = 'open-abap.org'.
ENDMETHOD.
ENDCLASS. | [
31631,
537,
62,
4023,
62,
15388,
5550,
20032,
17941,
44731,
29244,
6158,
4810,
3824,
6158,
13,
198,
220,
44731,
44513,
13,
198,
220,
220,
220,
42715,
12,
49273,
50,
651,
62,
24886,
198,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
2583,
41876,
4731,
13,
198,
10619,
31631,
13,
198,
198,
31631,
537,
62,
4023,
62,
15388,
30023,
2538,
10979,
6234,
13,
198,
220,
337,
36252,
651,
62,
24886,
13,
198,
220,
220,
220,
2583,
796,
705,
9654,
12,
397,
499,
13,
2398,
4458,
198,
220,
23578,
49273,
13,
198,
10619,
31631,
13
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
"! Representation of a class object. It will be able to create and return a list
"! of all the parts the class is made of.
class ZCL_TIMEM_OBJECT_CLAS definition
public
final
create public .
public section.
interfaces ZIF_TIMEM_OBJECT .
"! Constructor for the class object.
"! @parameter i_name | Class name
methods CONSTRUCTOR
importing
!NAME type SEOCLSNAME
raising
ZCX_TIMEM .
protected section.
private section.
data NAME type SEOCLSNAME .
ENDCLASS.
CLASS ZCL_TIMEM_OBJECT_CLAS IMPLEMENTATION.
METHOD constructor.
me->name = name.
ENDMETHOD.
METHOD zif_timem_object~check_exists.
cl_abap_classdescr=>describe_by_name(
EXPORTING
p_name = name
EXCEPTIONS
type_not_found = 1
OTHERS = 2 ).
IF sy-subrc = 0.
result = abap_true.
ENDIF.
ENDMETHOD.
METHOD zif_timem_object~get_name.
result = name.
ENDMETHOD.
METHOD zif_timem_object~get_part_list.
" All sort of includes
result = VALUE #(
( name = 'Class pool' object_name = CONV #( name ) type = 'CLSD' )
( name = 'Public section' object_name = CONV #( name ) type = 'CPUB' )
( name = 'Protected section' object_name = CONV #( name ) type = 'CPRO' )
( name = 'Private section' object_name = CONV #( name ) type = 'CPRI' )
( name = 'Local class definition' object_name = cl_oo_classname_service=>get_ccdef_name( name ) type = 'CDEF' )
( name = 'Local class implementation' object_name = cl_oo_classname_service=>get_ccimp_name( name ) type = 'CINC' )
( name = 'Local macros' object_name = cl_oo_classname_service=>get_ccmac_name( name ) type = 'CINC' )
( name = 'Local types' object_name = cl_oo_classname_service=>get_cl_name( name ) type = 'REPS' )
( name = 'Local test classes' object_name = cl_oo_classname_service=>get_ccau_name( name ) type = 'CINC' )
).
" Class methods
result = VALUE #( BASE result
FOR method_include IN cl_oo_classname_service=>get_all_method_includes( name )
LET method_name = cl_oo_classname_service=>get_method_by_include( method_include-incname )-cpdname
IN ( name = |{ to_lower( method_name ) }()|
object_name = |{ name WIDTH = 30 }{ method_name }|
type = 'METH' ) ).
ENDMETHOD.
ENDCLASS.
| [
40484,
10858,
341,
286,
257,
1398,
2134,
13,
632,
481,
307,
1498,
284,
2251,
290,
1441,
257,
1351,
198,
40484,
286,
477,
262,
3354,
262,
1398,
318,
925,
286,
13,
198,
4871,
1168,
5097,
62,
51,
3955,
3620,
62,
9864,
23680,
62,
5097,
1921,
6770,
198,
220,
1171,
198,
220,
2457,
198,
220,
2251,
1171,
764,
198,
198,
11377,
2665,
13,
628,
220,
20314,
1168,
5064,
62,
51,
3955,
3620,
62,
9864,
23680,
764,
628,
220,
220,
220,
366,
0,
28407,
273,
329,
262,
1398,
2134,
13,
198,
220,
220,
220,
366,
0,
2488,
17143,
2357,
1312,
62,
3672,
930,
5016,
1438,
198,
220,
5050,
7102,
46126,
1581,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
20608,
2099,
7946,
4503,
6561,
20608,
198,
220,
220,
220,
8620,
198,
220,
220,
220,
220,
220,
1168,
34,
55,
62,
51,
3955,
3620,
764,
198,
24326,
2665,
13,
198,
19734,
2665,
13,
628,
220,
1366,
36751,
2099,
7946,
4503,
6561,
20608,
764,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1168,
5097,
62,
51,
3955,
3620,
62,
9864,
23680,
62,
5097,
1921,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
23772,
13,
198,
220,
220,
220,
502,
3784,
3672,
796,
1438,
13,
198,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
1976,
361,
62,
16514,
368,
62,
15252,
93,
9122,
62,
1069,
1023,
13,
198,
220,
220,
220,
537,
62,
397,
499,
62,
4871,
20147,
81,
14804,
20147,
4892,
62,
1525,
62,
3672,
7,
198,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
279,
62,
3672,
220,
220,
220,
220,
220,
220,
220,
220,
796,
1438,
198,
220,
220,
220,
220,
220,
7788,
42006,
11053,
198,
220,
220,
220,
220,
220,
220,
220,
2099,
62,
1662,
62,
9275,
796,
352,
198,
220,
220,
220,
220,
220,
220,
220,
440,
4221,
4877,
220,
220,
220,
220,
220,
220,
220,
220,
796,
362,
6739,
198,
220,
220,
220,
16876,
827,
12,
7266,
6015,
796,
657,
13,
198,
220,
220,
220,
220,
220,
1255,
796,
450,
499,
62,
7942,
13,
198,
220,
220,
220,
23578,
5064,
13,
198,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
1976,
361,
62,
16514,
368,
62,
15252,
93,
1136,
62,
3672,
13,
198,
220,
220,
220,
1255,
796,
1438,
13,
198,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
1976,
361,
62,
16514,
368,
62,
15252,
93,
1136,
62,
3911,
62,
4868,
13,
198,
220,
220,
220,
366,
1439,
3297,
286,
3407,
198,
220,
220,
220,
1255,
796,
26173,
8924,
1303,
7,
198,
220,
220,
220,
220,
220,
357,
1438,
796,
705,
9487,
5933,
6,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2134,
62,
3672,
796,
7102,
53,
1303,
7,
1438,
1267,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2099,
796,
705,
5097,
10305,
6,
1267,
198,
220,
220,
220,
220,
220,
357,
1438,
796,
705,
15202,
2665,
6,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2134,
62,
3672,
796,
7102,
53,
1303,
7,
1438,
1267,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2099,
796,
705,
36037,
33,
6,
1267,
198,
220,
220,
220,
220,
220,
357,
1438,
796,
705,
19703,
11197,
2665,
6,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2134,
62,
3672,
796,
7102,
53,
1303,
7,
1438,
1267,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2099,
796,
705,
34,
31190,
6,
1267,
198,
220,
220,
220,
220,
220,
357,
1438,
796,
705,
29067,
2665,
6,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2134,
62,
3672,
796,
7102,
53,
1303,
7,
1438,
1267,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2099,
796,
705,
34,
4805,
40,
6,
1267,
198,
220,
220,
220,
220,
220,
357,
1438,
796,
705,
14565,
1398,
6770,
6,
220,
220,
220,
220,
220,
2134,
62,
3672,
796,
537,
62,
2238,
62,
4871,
3672,
62,
15271,
14804,
1136,
62,
535,
4299,
62,
3672,
7,
1438,
1267,
2099,
796,
705,
34,
32988,
6,
1267,
198,
220,
220,
220,
220,
220,
357,
1438,
796,
705,
14565,
1398,
7822,
6,
220,
2134,
62,
3672,
796,
537,
62,
2238,
62,
4871,
3672,
62,
15271,
14804,
1136,
62,
535,
11011,
62,
3672,
7,
1438,
1267,
2099,
796,
705,
34,
30158,
6,
1267,
198,
220,
220,
220,
220,
220,
357,
1438,
796,
705,
14565,
34749,
6,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2134,
62,
3672,
796,
537,
62,
2238,
62,
4871,
3672,
62,
15271,
14804,
1136,
62,
535,
20285,
62,
3672,
7,
1438,
1267,
2099,
796,
705,
34,
30158,
6,
1267,
198,
220,
220,
220,
220,
220,
357,
1438,
796,
705,
14565,
3858,
6,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2134,
62,
3672,
796,
537,
62,
2238,
62,
4871,
3672,
62,
15271,
14804,
1136,
62,
565,
62,
3672,
7,
1438,
1267,
220,
220,
220,
2099,
796,
705,
2200,
3705,
6,
1267,
198,
220,
220,
220,
220,
220,
357,
1438,
796,
705,
14565,
1332,
6097,
6,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2134,
62,
3672,
796,
537,
62,
2238,
62,
4871,
3672,
62,
15271,
14804,
1136,
62,
535,
559,
62,
3672,
7,
1438,
1267,
220,
2099,
796,
705,
34,
30158,
6,
1267,
198,
220,
220,
220,
6739,
628,
220,
220,
220,
366,
5016,
5050,
198,
220,
220,
220,
1255,
796,
26173,
8924,
1303,
7,
49688,
1255,
198,
220,
220
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS zcl_abapgit_objects_ci_tests DEFINITION
PUBLIC
FINAL
CREATE PUBLIC
FOR TESTING
DURATION SHORT
RISK LEVEL CRITICAL .
PUBLIC SECTION.
CLASS-METHODS run
IMPORTING
!iv_object TYPE string
!iv_url TYPE string OPTIONAL .
PROTECTED SECTION.
PRIVATE SECTION.
ENDCLASS.
CLASS zcl_abapgit_objects_ci_tests IMPLEMENTATION.
METHOD run.
DATA:
ls_repo TYPE zif_abapgit_exit=>ty_ci_repo,
lt_repos TYPE zif_abapgit_exit=>ty_ci_repos,
li_exit TYPE REF TO zif_abapgit_exit,
lo_ci_repos TYPE REF TO object,
ld_options TYPE REF TO data,
ld_results TYPE REF TO data,
lv_msg TYPE string,
lv_check TYPE string,
lx_error TYPE REF TO zcx_abapgit_exception.
FIELD-SYMBOLS:
<ls_options> TYPE any,
<lv_option> TYPE any,
<lt_repo_result> TYPE ANY TABLE,
<ls_repo_result> TYPE any,
<lv_result> TYPE any,
<lv_repo> TYPE any.
" Add the default test repo from https://github.com/abapGit-tests
ls_repo-name = iv_object.
IF iv_url IS NOT INITIAL.
ls_repo-clone_url = iv_url.
ELSE.
ls_repo-clone_url = |https://github.com/abapGit-tests/{ iv_object }|.
ENDIF.
APPEND ls_repo TO lt_repos.
" Get list of repos via exit
li_exit = zcl_abapgit_exit=>get_instance( ).
li_exit->get_ci_tests(
EXPORTING
iv_object = |{ iv_object }|
CHANGING
ct_ci_repos = lt_repos ).
IF lines( lt_repos ) = 0.
RETURN.
ENDIF.
" Objects will be created and deleted, do not run in customer system!
" These tests may fail if you are locking the entries (e.g. the ZABAPGIT transaction is open)
IF zcl_abapgit_persist_settings=>get_instance( )->read( )->get_run_critical_tests( ) = abap_false.
cl_abap_unit_assert=>fail(
msg = 'Cancelled. You can enable these tests in abapGit settings'
level = if_aunit_constants=>tolerable ).
ENDIF.
" Check if abapGit-CI is installed
SELECT SINGLE clsname FROM seoclass INTO lv_check WHERE clsname = 'ZCL_ABAPGIT_CI_REPOS'.
IF sy-subrc <> 0.
cl_abap_unit_assert=>fail(
msg = 'Cancelled. abapGit-CI is not installed (https://github.com/abapGit/CI)'
level = if_aunit_constants=>tolerable ).
ENDIF.
TRY.
" Prepare input for CI repo test
CREATE DATA ld_options TYPE ('ZIF_ABAPGIT_CI_DEFINITIONS=>TY_REPO_CHECK_OPTIONS').
ASSIGN ld_options->* TO <ls_options>.
ASSIGN COMPONENT 'CHECK_LOCAL' OF STRUCTURE <ls_options> TO <lv_option>.
ASSERT sy-subrc = 0.
<lv_option> = abap_true.
CREATE DATA ld_results TYPE ('ZIF_ABAPGIT_CI_DEFINITIONS=>TY_RESULT-REPO_RESULT_LIST').
ASSIGN ld_results->* TO <lt_repo_result>.
" Run CI repo tests
CREATE OBJECT lo_ci_repos TYPE ('ZCL_ABAPGIT_CI_REPOS').
CALL METHOD lo_ci_repos->('PROCESS_REPOS')
EXPORTING
it_repos = lt_repos
is_options = <ls_options>
RECEIVING
rt_result_list = <lt_repo_result>.
" Check results for individual repos
LOOP AT <lt_repo_result> ASSIGNING <ls_repo_result>.
ASSIGN COMPONENT 'NAME' OF STRUCTURE <ls_repo_result> TO <lv_repo>.
ASSERT sy-subrc = 0.
CLEAR lv_msg.
DO 7 TIMES.
CASE sy-index.
WHEN 1.
lv_check = 'CREATE_PACKAGE'.
WHEN 2.
lv_check = 'CLONE'.
WHEN 3.
lv_check = 'PULL'.
WHEN 4.
lv_check = 'SYNTAX_CHECK'.
WHEN 5.
lv_check = 'OBJECT_CHECK'.
WHEN 6.
lv_check = 'PURGE'.
WHEN 7.
lv_check = 'CHECK_LEFTOVERS'.
ENDCASE.
ASSIGN COMPONENT lv_check OF STRUCTURE <ls_repo_result> TO <lv_result>.
ASSERT sy-subrc = 0.
cl_abap_unit_assert=>assert_equals(
exp = 'OK'
act = <lv_result>
msg = |{ <lv_repo> }: { lv_check } = { <lv_result> }| ).
ENDDO.
ENDLOOP.
CATCH zcx_abapgit_exception INTO lx_error.
cl_abap_unit_assert=>fail( msg = lx_error->get_text( ) ).
ENDTRY.
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
397,
499,
18300,
62,
48205,
62,
979,
62,
41989,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
25261,
198,
220,
29244,
6158,
44731,
198,
220,
7473,
43001,
2751,
198,
220,
360,
4261,
6234,
6006,
9863,
198,
220,
45698,
42,
49277,
8740,
2043,
20151,
764,
628,
220,
44731,
44513,
13,
628,
220,
220,
220,
42715,
12,
49273,
50,
1057,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
15252,
41876,
4731,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
6371,
220,
220,
220,
41876,
4731,
39852,
2849,
1847,
764,
198,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
4810,
3824,
6158,
44513,
13,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1976,
565,
62,
397,
499,
18300,
62,
48205,
62,
979,
62,
41989,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
1057,
13,
628,
220,
220,
220,
42865,
25,
198,
220,
220,
220,
220,
220,
43979,
62,
260,
7501,
220,
220,
220,
220,
41876,
1976,
361,
62,
397,
499,
18300,
62,
37023,
14804,
774,
62,
979,
62,
260,
7501,
11,
198,
220,
220,
220,
220,
220,
300,
83,
62,
260,
1930,
220,
220,
220,
41876,
1976,
361,
62,
397,
499,
18300,
62,
37023,
14804,
774,
62,
979,
62,
260,
1930,
11,
198,
220,
220,
220,
220,
220,
7649,
62,
37023,
220,
220,
220,
220,
41876,
4526,
37,
5390,
1976,
361,
62,
397,
499,
18300,
62,
37023,
11,
198,
220,
220,
220,
220,
220,
2376,
62,
979,
62,
260,
1930,
41876,
4526,
37,
5390,
2134,
11,
198,
220,
220,
220,
220,
220,
300,
67,
62,
25811,
220,
41876,
4526,
37,
5390,
1366,
11,
198,
220,
220,
220,
220,
220,
300,
67,
62,
43420,
220,
41876,
4526,
37,
5390,
1366,
11,
198,
220,
220,
220,
220,
220,
300,
85,
62,
19662,
220,
220,
220,
220,
220,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
300,
85,
62,
9122,
220,
220,
220,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
300,
87,
62,
18224,
220,
220,
220,
41876,
4526,
37,
5390,
1976,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
13,
628,
220,
220,
220,
18930,
24639,
12,
23060,
10744,
3535,
50,
25,
198,
220,
220,
220,
220,
220,
1279,
7278,
62,
25811,
29,
220,
220,
220,
220,
41876,
597,
11,
198,
220,
220,
220,
220,
220,
1279,
6780,
62,
18076,
29,
220,
220,
220,
220,
220,
41876,
597,
11,
198,
220,
220,
220,
220,
220,
1279,
2528,
62,
260,
7501,
62,
20274,
29,
41876,
15529,
43679,
11,
198,
220,
220,
220,
220,
220,
1279,
7278,
62,
260,
7501,
62,
20274,
29,
41876,
597,
11,
198,
220,
220,
220,
220,
220,
1279,
6780,
62,
20274,
29,
220,
220,
220,
220,
220,
41876,
597,
11,
198,
220,
220,
220,
220,
220,
1279,
6780,
62,
260,
7501,
29,
220,
220,
220,
220,
220,
220,
220,
41876,
597,
13,
628,
220,
220,
220,
366,
3060,
262,
4277,
1332,
29924,
422,
3740,
1378,
12567,
13,
785,
14,
397,
499,
38,
270,
12,
41989,
198,
220,
220,
220,
43979,
62,
260,
7501,
12,
3672,
796,
21628,
62,
15252,
13,
198,
220,
220,
220,
16876,
21628,
62,
6371,
3180,
5626,
3268,
2043,
12576,
13,
198,
220,
220,
220,
220,
220,
43979,
62,
260,
7501,
12,
21018,
62,
6371,
796,
21628,
62,
6371,
13,
198,
220,
220,
220,
17852,
5188,
13,
198,
220,
220,
220,
220,
220,
43979,
62,
260,
7501,
12,
21018,
62,
6371,
796,
930,
5450,
1378,
12567,
13,
785,
14,
397,
499,
38,
270,
12,
41989,
14,
90,
21628,
62,
15252,
1782,
91,
13,
198,
220,
220,
220,
23578,
5064,
13,
198,
220,
220,
220,
43504,
10619,
43979,
62,
260,
7501,
5390,
300,
83,
62,
260,
1930,
13,
628,
220,
220,
220,
366,
3497,
1351,
286,
1128,
418,
2884,
8420,
198,
220,
220,
220,
7649,
62,
37023,
796,
1976,
565,
62,
397,
499,
18300,
62,
37023,
14804,
1136,
62,
39098,
7,
6739,
198,
220,
220,
220,
7649,
62,
37023,
3784,
1136,
62,
979,
62,
41989,
7,
198,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
21628,
62,
15252,
220,
220,
220,
796,
930,
90,
21628,
62,
15252,
1782,
91,
198,
220,
220,
220,
220,
220,
5870,
15567,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
269,
83,
62,
979,
62,
260,
1930,
220,
796,
300,
83,
62,
260,
1930,
6739,
628,
220,
220,
220,
16876,
3951,
7,
300,
83,
62,
260,
1930,
1267,
796,
657,
13,
198,
220,
220,
220,
220,
220,
30826,
27064,
13,
198,
220,
220,
220,
23578,
5064,
13,
628,
220,
220,
220,
366,
35832,
481,
307,
2727,
290,
13140,
11,
466,
407,
1057,
287,
6491,
1080,
0,
198,
220,
220,
220,
366,
2312,
5254,
743,
2038,
611,
345,
389,
22656,
262,
12784,
357,
68,
13,
70,
13,
262,
1168,
6242,
2969,
38,
2043,
8611,
318,
1280,
8,
198,
220,
220,
220,
16876,
1976,
565,
62,
397,
499,
18300,
62,
19276,
396,
62,
33692,
14804,
1136,
62,
39098,
7,
1267,
3784,
961,
7,
1267,
3784,
1136,
62,
5143,
62,
34666,
62,
41989,
7,
1267,
796,
450,
499,
62,
9562,
13,
198,
220,
220,
220,
220,
220,
537,
62,
397,
499,
62,
20850,
62,
30493,
14804,
32165,
7,
198,
220,
220,
220,
220,
220,
220,
220,
31456,
220,
220,
796,
705,
34,
590,
3353,
13,
921,
460,
7139,
777,
5254,
287,
450,
499,
38,
270,
6460,
6,
198,
220,
220,
220,
220,
220,
220,
220,
1241,
796,
611,
62,
1942,
270,
62,
9979,
1187,
14804,
83,
13625,
540,
6739,
198,
220,
220,
220,
23578,
5064,
13,
628,
220,
220,
220,
366,
6822,
611,
450,
499,
38,
270,
12,
25690,
318,
6589,
198,
220,
220,
220,
33493,
311,
2751,
2538,
537,
82,
3672,
16034,
384,
420,
31172,
39319,
300,
85,
62,
9122,
33411,
537,
82,
3672,
796,
705,
57,
5097,
62,
6242,
2969,
38,
2043,
62,
25690,
62,
35316,
2640,
4458,
198,
220,
220,
220,
16876,
827,
12,
7266,
6015,
1279,
29,
657,
13,
198,
220,
220,
220,
220,
220,
537,
62,
397,
499,
62,
20850,
62,
30493,
14804,
32165,
7,
198,
220,
220,
220,
220,
220,
220,
220
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS ycl_abapgit_persistence_db DEFINITION
PUBLIC
CREATE PRIVATE .
PUBLIC SECTION.
CONSTANTS c_tabname TYPE tabname VALUE 'YABAPGIT' ##NO_TEXT.
CONSTANTS c_lock TYPE viewname VALUE 'EYABAPGIT' ##NO_TEXT.
CONSTANTS:
c_type_settings TYPE yif_abapgit_persistence=>ty_type VALUE 'SETTINGS' ##NO_TEXT,
c_type_repo TYPE yif_abapgit_persistence=>ty_type VALUE 'REPO' ##NO_TEXT,
c_type_background TYPE yif_abapgit_persistence=>ty_type VALUE 'BACKGROUND' ##NO_TEXT,
c_type_user TYPE yif_abapgit_persistence=>ty_type VALUE 'USER' ##NO_TEXT.
CLASS-METHODS get_instance
RETURNING
VALUE(ro_db) TYPE REF TO ycl_abapgit_persistence_db .
METHODS add
IMPORTING
!iv_type TYPE yif_abapgit_persistence=>ty_type
!iv_value TYPE yif_abapgit_persistence=>ty_content-value
!iv_data TYPE yif_abapgit_persistence=>ty_content-data_str
RAISING
ycx_abapgit_exception .
METHODS delete
IMPORTING
!iv_type TYPE yif_abapgit_persistence=>ty_type
!iv_value TYPE yif_abapgit_persistence=>ty_content-value
RAISING
ycx_abapgit_exception .
METHODS list
RETURNING
VALUE(rt_content) TYPE yif_abapgit_persistence=>tt_content .
METHODS list_by_type
IMPORTING
!iv_type TYPE yif_abapgit_persistence=>ty_type
RETURNING
VALUE(rt_content) TYPE yif_abapgit_persistence=>tt_content .
METHODS lock
IMPORTING
!iv_mode TYPE enqmode DEFAULT 'E'
!iv_type TYPE yif_abapgit_persistence=>ty_type
!iv_value TYPE yif_abapgit_persistence=>ty_content-value
RAISING
ycx_abapgit_exception .
METHODS modify
IMPORTING
!iv_type TYPE yif_abapgit_persistence=>ty_type
!iv_value TYPE yif_abapgit_persistence=>ty_content-value
!iv_data TYPE yif_abapgit_persistence=>ty_content-data_str
RAISING
ycx_abapgit_exception .
METHODS read
IMPORTING
!iv_type TYPE yif_abapgit_persistence=>ty_type
!iv_value TYPE yif_abapgit_persistence=>ty_content-value
RETURNING
VALUE(rv_data) TYPE yif_abapgit_persistence=>ty_content-data_str
RAISING
ycx_abapgit_not_found .
METHODS update
IMPORTING
!iv_type TYPE yif_abapgit_persistence=>ty_type
!iv_value TYPE yif_abapgit_persistence=>ty_content-value
!iv_data TYPE yif_abapgit_persistence=>ty_content-data_str
RAISING
ycx_abapgit_exception .
PRIVATE SECTION.
CLASS-DATA go_db TYPE REF TO ycl_abapgit_persistence_db .
DATA: gv_update_function TYPE funcname.
METHODS get_update_function RETURNING VALUE(r_funcname) TYPE funcname.
METHODS validate_and_unprettify_xml
IMPORTING
!iv_xml TYPE string
RETURNING
VALUE(rv_xml) TYPE string
RAISING
ycx_abapgit_exception .
ENDCLASS.
CLASS ycl_abapgit_persistence_db IMPLEMENTATION.
METHOD add.
DATA ls_table TYPE yif_abapgit_persistence=>ty_content.
ls_table-type = iv_type.
ls_table-value = iv_value.
ls_table-data_str = iv_data.
INSERT (c_tabname) FROM ls_table. "#EC CI_SUBRC
ASSERT sy-subrc = 0.
ENDMETHOD.
METHOD delete.
lock( iv_type = iv_type
iv_value = iv_value ).
DELETE FROM (c_tabname)
WHERE type = iv_type
AND value = iv_value.
IF sy-subrc <> 0.
ycx_abapgit_exception=>raise( 'DB Delete failed' ).
ENDIF.
ENDMETHOD.
METHOD get_instance.
IF go_db IS NOT BOUND.
CREATE OBJECT go_db.
ENDIF.
ro_db = go_db.
ENDMETHOD.
METHOD list.
SELECT * FROM (c_tabname)
INTO TABLE rt_content. "#EC CI_SUBRC
ENDMETHOD.
METHOD list_by_type.
SELECT * FROM (c_tabname)
INTO TABLE rt_content
WHERE type = iv_type
ORDER BY PRIMARY KEY. "#EC CI_SUBRC
ENDMETHOD.
METHOD lock.
DATA: lv_dummy_update_function TYPE funcname.
CALL FUNCTION 'ENQUEUE_EYABAPGIT'
EXPORTING
mode_yabapgit = iv_mode
type = iv_type
value = iv_value
EXCEPTIONS
foreign_lock = 1
system_failure = 2
OTHERS = 3.
IF sy-subrc <> 0.
ycx_abapgit_exception=>raise( |Could not aquire lock { iv_type } { iv_value }| ).
ENDIF.
lv_dummy_update_function = get_update_function( ).
* trigger dummy update task to automatically release locks at commit
CALL FUNCTION lv_dummy_update_function
IN UPDATE TASK.
ENDMETHOD.
METHOD modify.
DATA: ls_content TYPE yif_abapgit_persistence=>ty_content.
lock( iv_type = iv_type
iv_value = iv_value ).
ls_content-type = iv_type.
ls_content-value = iv_value.
ls_content-data_str = iv_data.
MODIFY (c_tabname) FROM ls_content.
IF sy-subrc <> 0.
ycx_abapgit_exception=>raise( 'DB modify failed' ).
ENDIF.
ENDMETHOD.
METHOD read.
SELECT SINGLE data_str FROM (c_tabname) INTO rv_data
WHERE type = iv_type
AND value = iv_value. "#EC CI_SUBRC
IF sy-subrc <> 0.
RAISE EXCEPTION TYPE ycx_abapgit_not_found.
ENDIF.
ENDMETHOD.
METHOD update.
DATA lv_data LIKE iv_data.
lv_data = validate_and_unprettify_xml( iv_data ).
lock( iv_type = iv_type
iv_value = iv_value ).
UPDATE (c_tabname) SET data_str = lv_data
WHERE type = iv_type
AND value = iv_value.
IF sy-subrc <> 0.
ycx_abapgit_exception=>raise( 'DB update failed' ).
ENDIF.
ENDMETHOD. "update
METHOD validate_and_unprettify_xml.
rv_xml = ycl_abapgit_xml_pretty=>print(
iv_xml = iv_xml
iv_unpretty = abap_true
iv_ignore_errors = abap_false ).
ENDMETHOD. " validate_and_unprettify_xml
METHOD get_update_function.
IF gv_update_function IS INITIAL.
gv_update_function = 'CALL_V1_PING'.
CALL FUNCTION 'FUNCTION_EXISTS'
EXPORTING
funcname = gv_update_function
EXCEPTIONS
OTHERS = 2.
IF sy-subrc <> 0.
gv_update_function = 'BANK_OBJ_WORKL_RELEASE_LOCKS'.
ENDIF.
ENDIF.
r_funcname = gv_update_function.
ENDMETHOD.
ENDCLASS.
| [
31631,
331,
565,
62,
397,
499,
18300,
62,
19276,
13274,
62,
9945,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
29244,
6158,
4810,
3824,
6158,
764,
628,
220,
44731,
44513,
13,
198,
220,
220,
220,
7102,
2257,
1565,
4694,
269,
62,
8658,
3672,
41876,
7400,
3672,
26173,
8924,
705,
56,
6242,
2969,
38,
2043,
6,
22492,
15285,
62,
32541,
13,
198,
220,
220,
220,
7102,
2257,
1565,
4694,
269,
62,
5354,
41876,
1570,
3672,
26173,
8924,
705,
22348,
6242,
2969,
38,
2043,
6,
22492,
15285,
62,
32541,
13,
628,
220,
220,
220,
7102,
2257,
1565,
4694,
25,
198,
220,
220,
220,
220,
220,
269,
62,
4906,
62,
33692,
220,
220,
41876,
331,
361,
62,
397,
499,
18300,
62,
19276,
13274,
14804,
774,
62,
4906,
26173,
8924,
705,
28480,
51,
20754,
6,
22492,
15285,
62,
32541,
11,
198,
220,
220,
220,
220,
220,
269,
62,
4906,
62,
260,
7501,
220,
220,
220,
220,
220,
220,
41876,
331,
361,
62,
397,
499,
18300,
62,
19276,
13274,
14804,
774,
62,
4906,
26173,
8924,
705,
2200,
16402,
6,
22492,
15285,
62,
32541,
11,
198,
220,
220,
220,
220,
220,
269,
62,
4906,
62,
25249,
41876,
331,
361,
62,
397,
499,
18300,
62,
19276,
13274,
14804,
774,
62,
4906,
26173,
8924,
705,
31098,
46025,
6,
22492,
15285,
62,
32541,
11,
198,
220,
220,
220,
220,
220,
269,
62,
4906,
62,
7220,
220,
220,
220,
220,
220,
220,
41876,
331,
361,
62,
397,
499,
18300,
62,
19276,
13274,
14804,
774,
62,
4906,
26173,
8924,
705,
29904,
6,
22492,
15285,
62,
32541,
13,
628,
220,
220,
220,
42715,
12,
49273,
50,
651,
62,
39098,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
305,
62,
9945,
8,
41876,
4526,
37,
5390,
331,
565,
62,
397,
499,
18300,
62,
19276,
13274,
62,
9945,
764,
198,
220,
220,
220,
337,
36252,
50,
751,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
4906,
220,
41876,
331,
361,
62,
397,
499,
18300,
62,
19276,
13274,
14804,
774,
62,
4906,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
8367,
41876,
331,
361,
62,
397,
499,
18300,
62,
19276,
13274,
14804,
774,
62,
11299,
12,
8367,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
7890,
220,
41876,
331,
361,
62,
397,
499,
18300,
62,
19276,
13274,
14804,
774,
62,
11299,
12,
7890,
62,
2536,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
331,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
764,
198,
220,
220,
220,
337,
36252,
50,
12233,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
4906,
220,
41876,
331,
361,
62,
397,
499,
18300,
62,
19276,
13274,
14804,
774,
62,
4906,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
8367,
41876,
331,
361,
62,
397,
499,
18300,
62,
19276,
13274,
14804,
774,
62,
11299,
12,
8367,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
331,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
764,
198,
220,
220,
220,
337,
36252,
50,
1351,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
17034,
62,
11299,
8,
41876,
331,
361,
62,
397,
499,
18300,
62,
19276,
13274,
14804,
926,
62,
11299,
764,
198,
220,
220,
220,
337,
36252,
50,
1351,
62,
1525,
62,
4906,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
4906,
220,
220,
220,
220,
220,
220,
220,
220,
220,
41876,
331,
361,
62,
397,
499,
18300,
62,
19276,
13274,
14804,
774,
62,
4906,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
17034,
62,
11299,
8,
41876,
331,
361,
62,
397,
499,
18300,
62,
19276,
13274,
14804,
926,
62,
11299,
764,
198,
220,
220,
220,
337,
36252,
50,
5793,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
14171,
220,
41876,
551,
80,
14171,
5550,
38865,
705,
36,
6,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
4906,
220,
41876,
331,
361,
62,
397,
499,
18300,
62,
19276,
13274,
14804,
774,
62,
4906,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
8367,
41876,
331,
361,
62,
397,
499,
18300,
62,
19276,
13274,
14804,
774,
62,
11299,
12,
8367,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
331,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
764,
198,
220,
220,
220,
337,
36252,
50,
13096,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
4906,
220,
41876,
331,
361,
62,
397,
499,
18300,
62,
19276,
13274,
14804,
774,
62,
4906,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
8367,
41876,
331,
361,
62,
397,
499,
18300,
62,
19276,
13274,
14804,
774,
62,
11299,
12,
8367,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
7890,
220,
41876,
331,
361,
62,
397,
499,
18300,
62,
19276,
13274,
14804,
774,
62,
11299,
12,
7890,
62,
2536,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
331,
66,
87,
62,
397,
499,
18300,
62,
1069,
4516,
764,
198,
220,
220,
220,
337,
36252,
50,
1100,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
4906,
220,
220,
220,
220,
220,
220,
41876,
331,
361,
62,
397,
499,
18300,
62,
19276,
13274,
14804,
774,
62,
4906,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
8367,
220,
220,
220,
220,
220,
41876,
331,
361,
62,
397,
499,
18300,
62,
19276,
13274,
14804,
774,
62,
11299,
12,
8367,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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 .
ALIASES get_sha1
FOR zif_ags_object~get_sha1 .
ALIASES get_type
FOR zif_ags_object~get_type .
ALIASES save
FOR zif_ags_object~save .
ALIASES serialize
FOR zif_ags_object~serialize .
TYPES:
ty_list TYPE STANDARD TABLE OF REF TO zcl_ags_obj_blob WITH DEFAULT KEY .
METHODS get_data
RETURNING
VALUE(rv_data) TYPE xstring .
METHODS set_data
IMPORTING
!iv_data TYPE xstring .
CLASS-METHODS new
IMPORTING
!iv_repo TYPE zags_objects-repo
RETURNING
VALUE(ro_blob) TYPE REF TO zcl_ags_obj_blob .
CLASS-METHODS load
IMPORTING
!iv_repo TYPE zags_objects-repo
!iv_sha1 TYPE zags_objects-sha1
RETURNING
VALUE(ro_blob) TYPE REF TO zcl_ags_obj_blob
RAISING
zcx_ags_error .
CLASS-METHODS load_mass
IMPORTING
!iv_repo TYPE zags_objects-repo
!it_sha1 TYPE zags_sha1_tt
RETURNING
VALUE(rt_list) TYPE ty_list
RAISING
zcx_ags_error .
PROTECTED SECTION.
PRIVATE SECTION.
DATA mv_data TYPE xstring .
DATA mv_new TYPE abap_bool .
DATA mv_repo TYPE zags_objects-repo .
DATA mv_sha1 TYPE zags_sha1 .
DATA mv_adler32 TYPE zags_adler32 .
ENDCLASS.
CLASS ZCL_AGS_OBJ_BLOB IMPLEMENTATION.
METHOD get_data.
rv_data = mv_data.
ENDMETHOD.
METHOD load.
DATA: ls_data TYPE zags_objects.
CREATE OBJECT ro_blob.
ro_blob->mv_new = abap_false.
ro_blob->mv_sha1 = iv_sha1.
ls_data = zcl_ags_db=>get_objects( )->single(
iv_repo = iv_repo
iv_sha1 = iv_sha1 ).
ro_blob->deserialize(
iv_data = ls_data-data_raw
iv_adler32 = ls_data-adler32 ).
ENDMETHOD.
METHOD load_mass.
DATA: lt_objects TYPE zags_objects_tt,
lo_blob TYPE REF TO zcl_ags_obj_blob.
FIELD-SYMBOLS: <ls_object> LIKE LINE OF lt_objects.
ASSERT NOT iv_repo IS INITIAL.
IF lines( it_sha1 ) = 0.
RETURN.
ENDIF.
lt_objects = zcl_ags_db=>get_objects( )->mass(
iv_repo = iv_repo
it_sha1 = it_sha1 ).
LOOP AT lt_objects ASSIGNING <ls_object>.
ASSERT <ls_object>-type = zif_ags_constants=>c_type-blob.
lo_blob = zcl_ags_obj_blob=>new( iv_repo ).
lo_blob->mv_new = abap_false.
lo_blob->mv_sha1 = <ls_object>-sha1.
lo_blob->deserialize(
iv_data = <ls_object>-data_raw
iv_adler32 = <ls_object>-adler32 ).
APPEND lo_blob TO rt_list.
ENDLOOP.
ENDMETHOD.
METHOD new.
ASSERT NOT iv_repo IS INITIAL.
CREATE OBJECT ro_blob.
ro_blob->mv_new = abap_true.
ro_blob->mv_repo = iv_repo.
ENDMETHOD.
METHOD set_data.
ASSERT mv_new = abap_true.
mv_data = iv_data.
ENDMETHOD.
METHOD zif_ags_object~deserialize.
mv_data = iv_data.
mv_adler32 = iv_adler32.
ENDMETHOD.
METHOD zif_ags_object~get_adler32.
IF mv_adler32 IS INITIAL.
rv_adler32 = zcl_abapgit_hash=>adler32( serialize( ) ).
ELSE.
ASSERT NOT mv_adler32 IS INITIAL.
rv_adler32 = mv_adler32.
ENDIF.
ENDMETHOD.
METHOD zif_ags_object~get_sha1.
IF mv_new = abap_true.
rv_sha1 = zcl_ags_util=>sha1(
iv_type = zif_ags_constants=>c_type-blob
iv_data = serialize( ) ).
ELSE.
ASSERT NOT mv_sha1 IS INITIAL.
rv_sha1 = mv_sha1.
ENDIF.
ENDMETHOD.
METHOD zif_ags_object~get_type.
rv_type = zif_ags_constants=>c_type-blob.
ENDMETHOD.
METHOD zif_ags_object~save.
DATA: ls_object TYPE zags_objects.
ASSERT mv_new = abap_true.
ls_object-repo = mv_repo.
ls_object-sha1 = get_sha1( ).
ls_object-type = get_type( ).
ls_object-data_raw = serialize( ).
ls_object-adler32 = get_adler32( ).
zcl_ags_db=>get_objects( )->modify( ls_object ).
ENDMETHOD.
METHOD zif_ags_object~serialize.
rv_data = mv_data.
ENDMETHOD.
ENDCLASS.
| [
31631,
1976,
565,
62,
3775,
62,
26801,
62,
2436,
672,
5550,
20032,
17941,
198,
220,
44731,
198,
220,
29244,
6158,
4810,
3824,
6158,
764,
628,
220,
44731,
44513,
13,
628,
220,
220,
220,
23255,
37,
2246,
1546,
1976,
361,
62,
3775,
62,
15252,
764,
628,
220,
220,
220,
8355,
43429,
1546,
748,
48499,
1096,
198,
220,
220,
220,
220,
220,
7473,
1976,
361,
62,
3775,
62,
15252,
93,
8906,
48499,
1096,
764,
198,
220,
220,
220,
8355,
43429,
1546,
651,
62,
324,
1754,
2624,
198,
220,
220,
220,
220,
220,
7473,
1976,
361,
62,
3775,
62,
15252,
93,
1136,
62,
324,
1754,
2624,
764,
198,
220,
220,
220,
8355,
43429,
1546,
651,
62,
26270,
16,
198,
220,
220,
220,
220,
220,
7473,
1976,
361,
62,
3775,
62,
15252,
93,
1136,
62,
26270,
16,
764,
198,
220,
220,
220,
8355,
43429,
1546,
651,
62,
4906,
198,
220,
220,
220,
220,
220,
7473,
1976,
361,
62,
3775,
62,
15252,
93,
1136,
62,
4906,
764,
198,
220,
220,
220,
8355,
43429,
1546,
3613,
198,
220,
220,
220,
220,
220,
7473,
1976,
361,
62,
3775,
62,
15252,
93,
21928,
764,
198,
220,
220,
220,
8355,
43429,
1546,
11389,
1096,
198,
220,
220,
220,
220,
220,
7473,
1976,
361,
62,
3775,
62,
15252,
93,
46911,
1096,
764,
628,
220,
220,
220,
24412,
47,
1546,
25,
198,
220,
220,
220,
220,
220,
1259,
62,
4868,
41876,
49053,
9795,
43679,
3963,
4526,
37,
5390,
1976,
565,
62,
3775,
62,
26801,
62,
2436,
672,
13315,
5550,
38865,
35374,
764,
628,
220,
220,
220,
337,
36252,
50,
651,
62,
7890,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
81,
85,
62,
7890,
8,
41876,
2124,
8841,
764,
198,
220,
220,
220,
337,
36252,
50,
900,
62,
7890,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
7890,
41876,
2124,
8841,
764,
198,
220,
220,
220,
42715,
12,
49273,
50,
649,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
260,
7501,
220,
220,
220,
220,
220,
220,
41876,
1976,
3775,
62,
48205,
12,
260,
7501,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
305,
62,
2436,
672,
8,
41876,
4526,
37,
5390,
1976,
565,
62,
3775,
62,
26801,
62,
2436,
672,
764,
198,
220,
220,
220,
42715,
12,
49273,
50,
3440,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
260,
7501,
220,
220,
220,
220,
220,
220,
41876,
1976,
3775,
62,
48205,
12,
260,
7501,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
26270,
16,
220,
220,
220,
220,
220,
220,
41876,
1976,
3775,
62,
48205,
12,
26270,
16,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
305,
62,
2436,
672,
8,
41876,
4526,
37,
5390,
1976,
565,
62,
3775,
62,
26801,
62,
2436,
672,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
3775,
62,
18224,
764,
198,
220,
220,
220,
42715,
12,
49273,
50,
3440,
62,
22208,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
452,
62,
260,
7501,
220,
220,
220,
220,
220,
220,
41876,
1976,
3775,
62,
48205,
12,
260,
7501,
198,
220,
220,
220,
220,
220,
220,
220,
5145,
270,
62,
26270,
16,
220,
220,
220,
220,
220,
220,
41876,
1976,
3775,
62,
26270,
16,
62,
926,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
198,
220,
220,
220,
220,
220,
220,
220,
26173,
8924,
7,
17034,
62,
4868,
8,
41876,
1259,
62,
4868,
198,
220,
220,
220,
220,
220,
17926,
1797,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
1976,
66,
87,
62,
3775,
62,
18224,
764,
198,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
4810,
3824,
6158,
44513,
13,
628,
220,
220,
220,
42865,
285,
85,
62,
7890,
41876,
2124,
8841,
764,
198,
220,
220,
220,
42865,
285,
85,
62,
3605,
41876,
450,
499,
62,
30388,
764,
198,
220,
220,
220,
42865,
285,
85,
62,
260,
7501,
41876,
1976,
3775,
62,
48205,
12,
260,
7501,
764,
198,
220,
220,
220,
42865,
285,
85,
62,
26270,
16,
41876,
1976,
3775,
62,
26270,
16,
764,
198,
220,
220,
220,
42865,
285,
85,
62,
324,
1754,
2624,
41876,
1976,
3775,
62,
324,
1754,
2624,
764,
198,
10619,
31631,
13,
628,
198,
198,
31631,
1168,
5097,
62,
4760,
50,
62,
9864,
41,
62,
9148,
9864,
30023,
2538,
10979,
6234,
13,
628,
198,
220,
337,
36252,
651,
62,
7890,
13,
628,
220,
220,
220,
374,
85,
62,
7890,
796,
285,
85,
62,
7890,
13,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
3440,
13,
628,
220,
220,
220,
42865,
25,
43979,
62,
7890,
41876,
1976,
3775,
62,
48205,
13,
628,
220,
220,
220,
29244,
6158,
25334,
23680,
686,
62,
2436,
672,
13,
198,
220,
220,
220,
686,
62,
2436,
672,
3784,
76,
85,
62,
3605,
796,
450,
499,
62,
9562,
13,
198,
220,
220,
220,
686,
62,
2436,
672,
3784,
76,
85,
62,
26270,
16,
796,
21628,
62,
26270,
16,
13,
628,
220,
220,
220,
43979,
62,
7890,
796,
1976,
565,
62,
3775,
62,
9945,
14804,
1136,
62,
48205,
7,
1267,
3784,
29762,
7,
198,
220,
220,
220,
220,
220,
21628,
62,
260,
7501,
796,
21628,
62,
260,
7501,
198,
220,
220,
220,
220,
220,
21628,
62,
26270,
16,
796,
21628,
62,
26270,
16,
6739,
628,
220,
220,
220,
686,
62,
2436,
672,
3784,
8906,
48499,
1096,
7,
198,
220,
220,
220,
220,
220,
21628,
62,
7890,
220,
220,
220,
796,
43979,
62,
7890,
12,
7890,
62,
1831,
198,
220,
220,
220,
220,
220,
21628,
62,
324,
1754,
2624,
796,
43979,
62,
7890,
12,
324,
1754,
2624,
6739,
628,
220,
23578,
49273,
13,
628,
198,
220,
337,
36252,
3440,
62,
22208,
13,
628,
220,
220,
220,
42865,
25,
300,
83,
62
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS ltcl_hamming DEFINITION FOR TESTING RISK LEVEL HARMLESS DURATION SHORT FINAL.
PRIVATE SECTION.
DATA cut TYPE REF TO zcl_hamming.
METHODS setup.
METHODS test_short_equal FOR TESTING RAISING cx_static_check.
METHODS test_short_different FOR TESTING RAISING cx_static_check.
METHODS test_long_equal FOR TESTING RAISING cx_static_check.
METHODS test_long_different FOR TESTING RAISING cx_static_check.
METHODS test_first_longer FOR TESTING RAISING cx_static_check.
METHODS test_second_longer FOR TESTING RAISING cx_static_check.
METHODS test_both_empty FOR TESTING RAISING cx_static_check.
METHODS test_one_empty FOR TESTING RAISING cx_static_check.
ENDCLASS.
CLASS ltcl_hamming IMPLEMENTATION.
METHOD setup.
cut = NEW zcl_hamming( ).
ENDMETHOD.
METHOD test_short_equal.
cl_abap_unit_assert=>assert_equals(
act = cut->hamming_distance(
first_strand = 'A'
second_strand = 'A' )
exp = 0 ).
ENDMETHOD.
METHOD test_short_different.
cl_abap_unit_assert=>assert_equals(
act = cut->hamming_distance(
first_strand = 'A'
second_strand = 'G' )
exp = 1 ).
ENDMETHOD.
METHOD test_long_equal.
cl_abap_unit_assert=>assert_equals(
act = cut->hamming_distance(
first_strand = 'GACGACGTGCTAAAGATCCTG'
second_strand = 'GACGACGTGCTAAAGATCCTG' )
exp = 0 ).
ENDMETHOD.
METHOD test_long_different.
cl_abap_unit_assert=>assert_equals(
act = cut->hamming_distance(
first_strand = 'GGACGGATTCTG'
second_strand = 'AGGACGGATTCT' )
exp = 9 ).
ENDMETHOD.
METHOD test_first_longer.
TRY.
cut->hamming_distance(
first_strand = 'AACTATCG'
second_strand = 'AACTATC' ).
cl_abap_unit_assert=>fail( ).
CATCH cx_parameter_invalid.
ENDTRY.
ENDMETHOD.
METHOD test_second_longer.
TRY.
cut->hamming_distance(
first_strand = 'AACTAAC'
second_strand = 'AACTAACT' ).
cl_abap_unit_assert=>fail( ).
CATCH cx_parameter_invalid.
ENDTRY.
ENDMETHOD.
METHOD test_both_empty.
cl_abap_unit_assert=>assert_equals(
act = cut->hamming_distance(
first_strand = ''
second_strand = '' )
exp = 0 ).
ENDMETHOD.
METHOD test_one_empty.
TRY.
cut->hamming_distance(
first_strand = ''
second_strand = 'CGT' ).
cl_abap_unit_assert=>fail( ).
CATCH cx_parameter_invalid.
ENDTRY.
ENDMETHOD.
ENDCLASS.
| [
31631,
300,
83,
565,
62,
2763,
2229,
5550,
20032,
17941,
7473,
43001,
2751,
45698,
42,
49277,
43638,
5805,
7597,
360,
4261,
6234,
6006,
9863,
25261,
13,
628,
220,
4810,
3824,
6158,
44513,
13,
198,
220,
220,
220,
42865,
2005,
41876,
4526,
37,
5390,
1976,
565,
62,
2763,
2229,
13,
198,
220,
220,
220,
337,
36252,
50,
9058,
13,
198,
220,
220,
220,
337,
36252,
50,
1332,
62,
19509,
62,
40496,
7473,
43001,
2751,
17926,
1797,
2751,
43213,
62,
12708,
62,
9122,
13,
198,
220,
220,
220,
337,
36252,
50,
1332,
62,
19509,
62,
39799,
7473,
43001,
2751,
17926,
1797,
2751,
43213,
62,
12708,
62,
9122,
13,
198,
220,
220,
220,
337,
36252,
50,
1332,
62,
6511,
62,
40496,
7473,
43001,
2751,
17926,
1797,
2751,
43213,
62,
12708,
62,
9122,
13,
198,
220,
220,
220,
337,
36252,
50,
1332,
62,
6511,
62,
39799,
7473,
43001,
2751,
17926,
1797,
2751,
43213,
62,
12708,
62,
9122,
13,
198,
220,
220,
220,
337,
36252,
50,
1332,
62,
11085,
62,
6511,
263,
7473,
43001,
2751,
17926,
1797,
2751,
43213,
62,
12708,
62,
9122,
13,
198,
220,
220,
220,
337,
36252,
50,
1332,
62,
12227,
62,
6511,
263,
7473,
43001,
2751,
17926,
1797,
2751,
43213,
62,
12708,
62,
9122,
13,
198,
220,
220,
220,
337,
36252,
50,
1332,
62,
16885,
62,
28920,
7473,
43001,
2751,
17926,
1797,
2751,
43213,
62,
12708,
62,
9122,
13,
198,
220,
220,
220,
337,
36252,
50,
1332,
62,
505,
62,
28920,
7473,
43001,
2751,
17926,
1797,
2751,
43213,
62,
12708,
62,
9122,
13,
198,
198,
10619,
31631,
13,
198,
198,
31631,
300,
83,
565,
62,
2763,
2229,
30023,
2538,
10979,
6234,
13,
628,
220,
337,
36252,
9058,
13,
198,
220,
220,
220,
2005,
796,
12682,
1976,
565,
62,
2763,
2229,
7,
6739,
198,
220,
23578,
49273,
13,
628,
220,
337,
36252,
1332,
62,
19509,
62,
40496,
13,
198,
220,
220,
220,
537,
62,
397,
499,
62,
20850,
62,
30493,
14804,
30493,
62,
4853,
874,
7,
198,
220,
220,
220,
220,
220,
719,
796,
2005,
3784,
2763,
2229,
62,
30246,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
717,
62,
2536,
392,
220,
796,
705,
32,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1218,
62,
2536,
392,
796,
705,
32,
6,
1267,
198,
220,
220,
220,
220,
220,
1033,
796,
657,
6739,
198,
220,
23578,
49273,
13,
628,
220,
337,
36252,
1332,
62,
19509,
62,
39799,
13,
198,
220,
220,
220,
537,
62,
397,
499,
62,
20850,
62,
30493,
14804,
30493,
62,
4853,
874,
7,
198,
220,
220,
220,
220,
220,
719,
796,
2005,
3784,
2763,
2229,
62,
30246,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
717,
62,
2536,
392,
220,
796,
705,
32,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1218,
62,
2536,
392,
796,
705,
38,
6,
1267,
198,
220,
220,
220,
220,
220,
1033,
796,
352,
6739,
198,
220,
23578,
49273,
13,
628,
220,
337,
36252,
1332,
62,
6511,
62,
40496,
13,
198,
220,
220,
220,
537,
62,
397,
499,
62,
20850,
62,
30493,
14804,
30493,
62,
4853,
874,
7,
198,
220,
220,
220,
220,
220,
719,
796,
2005,
3784,
2763,
2229,
62,
30246,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
717,
62,
2536,
392,
220,
796,
705,
38,
2246,
38,
2246,
19555,
38,
4177,
3838,
4760,
1404,
4093,
35990,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1218,
62,
2536,
392,
796,
705,
38,
2246,
38,
2246,
19555,
38,
4177,
3838,
4760,
1404,
4093,
35990,
6,
1267,
198,
220,
220,
220,
220,
220,
1033,
796,
657,
6739,
198,
220,
23578,
49273,
13,
628,
220,
337,
36252,
1332,
62,
6511,
62,
39799,
13,
198,
220,
220,
220,
537,
62,
397,
499,
62,
20850,
62,
30493,
14804,
30493,
62,
4853,
874,
7,
198,
220,
220,
220,
220,
220,
719,
796,
2005,
3784,
2763,
2229,
62,
30246,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
717,
62,
2536,
392,
220,
796,
705,
11190,
2246,
11190,
17139,
4177,
38,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1218,
62,
2536,
392,
796,
705,
4760,
38,
2246,
11190,
17139,
4177,
6,
1267,
198,
220,
220,
220,
220,
220,
1033,
796,
860,
6739,
198,
220,
23578,
49273,
13,
628,
220,
337,
36252,
1332,
62,
11085,
62,
6511,
263,
13,
198,
220,
220,
220,
7579,
56,
13,
198,
220,
220,
220,
220,
220,
220,
220,
2005,
3784,
2763,
2229,
62,
30246,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
717,
62,
2536,
392,
220,
796,
705,
32,
10659,
1404,
39816,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1218,
62,
2536,
392,
796,
705,
32,
10659,
1404,
34,
6,
6739,
198,
220,
220,
220,
220,
220,
220,
220,
537,
62,
397,
499,
62,
20850,
62,
30493,
14804,
32165,
7,
6739,
198,
220,
220,
220,
220,
220,
327,
11417,
43213,
62,
17143,
2357,
62,
259,
12102,
13,
198,
220,
220,
220,
23578,
40405,
13,
198,
220,
23578,
49273,
13,
628,
220,
337,
36252,
1332,
62,
12227,
62,
6511,
263,
13,
198,
220,
220,
220,
7579,
56,
13,
198,
220,
220,
220,
220,
220,
220,
220,
2005,
3784,
2763,
2229,
62,
30246,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
717,
62,
2536,
392,
220,
796,
705,
32,
2246,
5603,
2246,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1218,
62,
2536,
392,
796,
705,
32,
2246,
5603,
10659,
6,
6739,
198,
220,
220,
220,
220,
220,
220,
220,
537,
62,
397,
499,
62,
20850,
62,
30493,
14804,
32165,
7,
6739,
198,
220,
220,
220,
220,
220,
327,
11417,
43213,
62,
17143,
2357,
62,
259,
12102,
13,
198,
220,
220,
220,
23578,
40405,
13,
198,
220,
23578,
49273,
13,
628,
220,
337,
36252,
1332,
62,
16885,
62,
28920,
13,
198,
220,
220,
220
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
class /HEC1/CL_CONFIG_ACT_DEL_HELPER definition
public
final
create public .
public section.
interfaces /HEC1/IF_BOPF_ACT_DEL_HELPER .
protected section.
private section.
class-methods DELETE_ADDITIONAL_SERVICE
importing
!IO_READ type ref to /BOBF/IF_FRW_READ
!IT_ROOT_KEY type /BOBF/T_FRW_KEY
!IS_PARAMETERS type /HEC1/S_ACT_DELETE_NODE
exporting
!ET_ACT_PARAM_SOLUTION type /BOBF/T_FRW_KEY
changing
!CT_MODIFICATION type /BOBF/T_FRW_MODIFICATION .
class-methods DELETE_APP_SERVER_INSTANCE
importing
!IO_READ type ref to /BOBF/IF_FRW_READ
!IT_ROOT_KEY type /BOBF/T_FRW_KEY
!IS_PARAMETERS type /HEC1/S_ACT_DELETE_NODE
exporting
!ET_ACT_PARAM_TIER type /HEC1/T_ACT_UPDATE_TIER
changing
!CT_MODIFICATION type /BOBF/T_FRW_MODIFICATION .
class-methods DELETE_APP_SERV_PERF_CAT
importing
!IO_READ type ref to /BOBF/IF_FRW_READ
!IT_ROOT_KEY type /BOBF/T_FRW_KEY
!IS_PARAMETERS type /HEC1/S_ACT_DELETE_NODE
exporting
!ET_ACT_PARAM_APP_SERV_PC type /HEC1/T_ACT_UPDATE_APP_SERV_PC
!ET_ACT_PARAM_APP_NODE type /BOBF/T_FRW_KEY
changing
!CT_MODIFICATION type /BOBF/T_FRW_MODIFICATION .
class-methods DELETE_APP_STORAGE_AMOUNT
importing
!IO_READ type ref to /BOBF/IF_FRW_READ
!IT_ROOT_KEY type /BOBF/T_FRW_KEY
!IS_PARAMETERS type /HEC1/S_ACT_DELETE_NODE
exporting
!ET_ACT_PARAM_APP_STORAGE type /BOBF/T_FRW_KEY
!ET_ACT_PARAM_APP_STORAGE_QTY type /HEC1/T_ACT_UPDATE_APP_STRGQTY
!ET_ACT_PARAM_APP_SERV_PC type /HEC1/T_ACT_UPDATE_APP_SERV_PC
changing
!CT_MODIFICATION type /BOBF/T_FRW_MODIFICATION .
class-methods DELETE_APP_STORAGE_BACKUP
importing
!IO_READ type ref to /BOBF/IF_FRW_READ
!IT_ROOT_KEY type /BOBF/T_FRW_KEY
!IS_PARAMETERS type /HEC1/S_ACT_DELETE_NODE
exporting
!ET_ACT_PARAM_APP_STORAGE type /BOBF/T_FRW_KEY
!ET_ACT_PARAM_APP_BACKUP type /HEC1/T_ACT_UPDATE_APP_BACKUP
changing
!CT_MODIFICATION type /BOBF/T_FRW_MODIFICATION .
class-methods DELETE_CONNECTIVITY
importing
!IO_READ type ref to /BOBF/IF_FRW_READ
!IT_ROOT_KEY type /BOBF/T_FRW_KEY
!IS_PARAMETERS type /HEC1/S_ACT_DELETE_NODE
changing
!CT_MODIFICATION type /BOBF/T_FRW_MODIFICATION .
class-methods DELETE_DATACENTER
importing
!IO_READ type ref to /BOBF/IF_FRW_READ
!IT_ROOT_KEY type /BOBF/T_FRW_KEY
!IS_PARAMETERS type /HEC1/S_ACT_DELETE_NODE
changing
!CT_MODIFICATION type /BOBF/T_FRW_MODIFICATION .
class-methods DELETE_DB_SERVER_INSTANCE
importing
!IO_READ type ref to /BOBF/IF_FRW_READ
!IT_ROOT_KEY type /BOBF/T_FRW_KEY
!IS_PARAMETERS type /HEC1/S_ACT_DELETE_NODE
exporting
!ET_ACT_PARAM_TIER type /HEC1/T_ACT_UPDATE_TIER
changing
!CT_MODIFICATION type /BOBF/T_FRW_MODIFICATION .
class-methods DELETE_DB_SERV_PERF_CAT
importing
!IO_READ type ref to /BOBF/IF_FRW_READ
!IT_ROOT_KEY type /BOBF/T_FRW_KEY
!IS_PARAMETERS type /HEC1/S_ACT_DELETE_NODE
exporting
!ET_ACT_PARAM_DB_SERV_PC type /HEC1/T_ACT_UPDATE_DB_SERV_PC
!ET_ACT_PARAM_DB_NODE type /BOBF/T_FRW_KEY
changing
!CT_MODIFICATION type /BOBF/T_FRW_MODIFICATION .
class-methods DELETE_DB_STORAGE_AMOUNT
importing
!IO_READ type ref to /BOBF/IF_FRW_READ
!IT_ROOT_KEY type /BOBF/T_FRW_KEY
!IS_PARAMETERS type /HEC1/S_ACT_DELETE_NODE
exporting
!ET_ACT_PARAM_DB_STORAGE_QTY type /HEC1/T_ACT_UPDATE_DB_STRG_QTY
!ET_ACT_PARAM_DB_STORAGE type /BOBF/T_FRW_KEY
!ET_ACT_PARAM_DB_SERV_PC type /HEC1/T_ACT_UPDATE_DB_SERV_PC
changing
!CT_MODIFICATION type /BOBF/T_FRW_MODIFICATION .
class-methods DELETE_DB_STORAGE_BACKUP
importing
!IO_READ type ref to /BOBF/IF_FRW_READ
!IT_ROOT_KEY type /BOBF/T_FRW_KEY
!IS_PARAMETERS type /HEC1/S_ACT_DELETE_NODE
exporting
!ET_ACT_PARAM_DB_STORAGE type /BOBF/T_FRW_KEY
!ET_ACT_PARAM_DB_BACKUP type /HEC1/T_ACT_UPDATE_APP_BACKUP
changing
!CT_MODIFICATION type /BOBF/T_FRW_MODIFICATION .
class-methods DELETE_INSTANCE_DB
importing
!IO_READ type ref to /BOBF/IF_FRW_READ
!IT_ROOT_KEY type /BOBF/T_FRW_KEY
!IS_PARAMETERS type /HEC1/S_ACT_DELETE_NODE
exporting
!ET_ACT_PARAM_TIER type /HEC1/T_ACT_UPDATE_TIER
changing
!CT_MODIFICATION type /BOBF/T_FRW_MODIFICATION .
class-methods DELETE_NETWORK_SEGMENT
importing
!IO_READ type ref to /BOBF/IF_FRW_READ
!IT_ROOT_KEY type /BOBF/T_FRW_KEY
!IS_PARAMETERS type /HEC1/S_ACT_DELETE_NODE
changing
!CT_MODIFICATION type /BOBF/T_FRW_MODIFICATION .
class-methods DELETE_PHASE
importing
!IO_READ type ref to /BOBF/IF_FRW_READ
!IT_ROOT_KEY type /BOBF/T_FRW_KEY
!IS_PARAMETERS type /HEC1/S_ACT_DELETE_NODE
exporting
!ET_ACT_PARAM_PHASE type /HEC1/T_ACT_UPDATE_PHASE
changing
!CT_MODIFICATION type /BOBF/T_FRW_MODIFICATION .
class-methods DELETE_SOLUTION
importing
!IO_READ type ref to /BOBF/IF_FRW_READ
!IT_ROOT_KEY type /BOBF/T_FRW_KEY
!IS_PARAMETERS type /HEC1/S_ACT_DELETE_NODE
changing
!CT_MODIFICATION type /BOBF/T_FRW_MODIFICATION .
class-methods DELETE_TIER
importing
!IO_READ type ref to /BOBF/IF_FRW_READ
!IT_ROOT_KEY type /BOBF/T_FRW_KEY
!IS_PARAMETERS type /HEC1/S_ACT_DELETE_NODE
exporting
!ET_ACT_PARAM_SOLUTION type /BOBF/T_FRW_KEY
changing
!CT_MODIFICATION type /BOBF/T_FRW_MODIFICATION .
class-methods GET_CONTACT_NODES
importing
!IO_READ type ref to /BOBF/IF_FRW_READ
!IT_ROOT_KEY type /BOBF/T_FRW_KEY
returning
value(RT_CONTACT_REFERENCE) type /HEC1/T_DATA_CONTACT_REF_CT .
class-methods GET_MULTITENANCY_NODES
importing
!IO_READ type ref to /BOBF/IF_FRW_READ
!IT_ROOT_KEY type /BOBF/T_FRW_KEY
exporting
!ET_SOLUTION type /HEC1/T_DATA_SOLUTION_CT
!ET_TIER type /HEC1/T_DATA_TIER_CT
!ET_DB_SERVER_INSTANCE type /HEC1/T_DATA_DB_SERVER_INST_CT
!ET_INSTANCE_DB type /HEC1/T_DATA_DB_INST_CT .
ENDCLASS.
CLASS /HEC1/CL_CONFIG_ACT_DEL_HELPER IMPLEMENTATION.
METHOD /hec1/if_bopf_act_del_helper~delete_helper.
DATA: lt_modification TYPE /bobf/t_frw_modification,
lt_root TYPE /hec1/t_config_root_ct,
lr_act_param_phase TYPE REF TO data,
lr_act_param_tier TYPE REF TO data,
lr_act_param_db_serv_pc TYPE REF TO data,
lr_act_param_db_storage_qty TYPE REF TO data,
lr_act_param_db_backup TYPE REF TO data,
lr_act_param_app_serv_pc TYPE REF TO data,
lr_act_param_app_storage_qty TYPE REF TO data,
lr_act_param_app_backup TYPE REF TO data.
FIELD-SYMBOLS: <fs_parameters> TYPE /hec1/s_act_delete_node.
" ***************************************************************************
" Process
" 1) check for generated phases and add those to the delete table
" 2) get data specific to the node
" 3) run specific node logic
" ***************************************************************************
ASSIGN is_parameters->* TO <fs_parameters>.
DATA(lv_node) = /hec1/cl_config_utilities=>get_node_key_by_object_type( iv_object_type = <fs_parameters>-node ).
" Check for generated phases. Those phases need to be deleted with the objects
" Those objects are added to the modification table
lt_modification = /hec1/cl_config_helper=>delete_generated_phases( iv_node_key = is_ctx-node_key
it_key = it_key
io_read = io_read
it_param_child_list = VALUE #( ( CORRESPONDING #( <fs_parameters> ) ) ) ).
io_read->get_root_key( EXPORTING iv_node = is_ctx-node_key
it_key = it_key
IMPORTING et_target_key = DATA(lt_root_key) ).
CASE lv_node.
WHEN /hec1/if_configuration_c=>sc_node-phase.
delete_phase( EXPORTING io_read = io_read
it_root_key = lt_root_key
is_parameters = <fs_parameters>
IMPORTING et_act_param_phase = DATA(lt_act_param_phase)
CHANGING ct_modification = lt_modification ).
WHEN /hec1/if_configuration_c=>sc_node-datacenter.
delete_datacenter( EXPORTING io_read = io_read
it_root_key = lt_root_key
is_parameters = <fs_parameters>
CHANGING ct_modification = lt_modification ).
WHEN /hec1/if_configuration_c=>sc_node-network_segment.
delete_network_segment( EXPORTING io_read = io_read
it_root_key = lt_root_key
is_parameters = <fs_parameters>
CHANGING ct_modification = lt_modification ).
WHEN /hec1/if_configuration_c=>sc_node-connectivity.
delete_connectivity( EXPORTING io_read = io_read
it_root_key = lt_root_key
is_parameters = <fs_parameters>
CHANGING ct_modification = lt_modification ).
WHEN /hec1/if_configuration_c=>sc_node-add_service.
delete_additional_service( EXPORTING io_read = io_read
it_root_key = lt_root_key
is_parameters = <fs_parameters>
IMPORTING et_act_param_solution = DATA(lt_act_param_solution)
CHANGING ct_modification = lt_modification ).
WHEN /hec1/if_configuration_c=>sc_node-solution.
delete_solution( EXPORTING io_read = io_read
it_root_key = lt_root_key
is_parameters = <fs_parameters>
CHANGING ct_modification = lt_modification ).
WHEN /hec1/if_configuration_c=>sc_node-tier.
delete_tier( EXPORTING io_read = io_read
it_root_key = lt_root_key
is_parameters = <fs_parameters>
IMPORTING et_act_param_solution = lt_act_param_solution
CHANGING ct_modification = lt_modification ).
WHEN /hec1/if_configuration_c=>sc_node-db_server_instance.
delete_db_server_instance( EXPORTING io_read = io_read
it_root_key = lt_root_key
is_parameters = <fs_parameters>
IMPORTING et_act_param_tier = DATA(lt_act_param_tier)
CHANGING ct_modification = lt_modification ).
WHEN /hec1/if_configuration_c=>sc_node-instance_db.
delete_instance_db( EXPORTING io_read = io_read
it_root_key = lt_root_key
is_parameters = <fs_parameters>
IMPORTING et_act_param_tier = lt_act_param_tier
CHANGING ct_modification = lt_modification ).
WHEN /hec1/if_configuration_c=>sc_node-db_server_perform_cat.
delete_db_serv_perf_cat( EXPORTING io_read = io_read
it_root_key = lt_root_key
is_parameters = <fs_parameters>
IMPORTING et_act_param_db_node = DATA(lt_act_param_db_node)
et_act_param_db_serv_pc = DATA(lt_act_param_db_serv_pc)
CHANGING ct_modification = lt_modification ).
WHEN /hec1/if_configuration_c=>sc_node-db_storage_amount.
delete_db_storage_amount( EXPORTING io_read = io_read
it_root_key = lt_root_key
is_parameters = <fs_parameters>
IMPORTING et_act_param_db_serv_pc = lt_act_param_db_serv_pc
et_act_param_db_storage_qty = DATA(lt_act_param_db_storage_qty)
et_act_param_db_storage = DATA(lt_act_param_db_storage)
CHANGING ct_modification = lt_modification ).
WHEN /hec1/if_configuration_c=>sc_node-db_storage_backup.
delete_db_storage_backup( EXPORTING io_read = io_read
it_root_key = lt_root_key
is_parameters = <fs_parameters>
IMPORTING et_act_param_db_storage = lt_act_param_db_storage
et_act_param_db_backup = DATA(lt_act_param_db_backup)
CHANGING ct_modification = lt_modification ).
WHEN /hec1/if_configuration_c=>sc_node-app_server_instance.
delete_app_server_instance( EXPORTING io_read = io_read
it_root_key = lt_root_key
is_parameters = <fs_parameters>
IMPORTING et_act_param_tier = lt_act_param_tier
CHANGING ct_modification = lt_modification ).
WHEN /hec1/if_configuration_c=>sc_node-app_server_perform_cat.
delete_app_serv_perf_cat( EXPORTING io_read = io_read
it_root_key = lt_root_key
is_parameters = <fs_parameters>
IMPORTING et_act_param_app_node = DATA(lt_act_param_app_node)
et_act_param_app_serv_pc = DATA(lt_act_param_app_serv_pc)
CHANGING ct_modification = lt_modification ).
WHEN /hec1/if_configuration_c=>sc_node-app_storage_amount.
delete_app_storage_amount( EXPORTING io_read = io_read
it_root_key = lt_root_key
is_parameters = <fs_parameters>
IMPORTING et_act_param_app_serv_pc = lt_act_param_app_serv_pc
et_act_param_app_storage_qty = DATA(lt_act_param_app_storage_qty)
et_act_param_app_storage = DATA(lt_act_param_app_storage)
CHANGING ct_modification = lt_modification ).
WHEN /hec1/if_configuration_c=>sc_node-app_storage_backup.
delete_app_storage_backup( EXPORTING io_read = io_read
it_root_key = lt_root_key
is_parameters = <fs_parameters>
IMPORTING et_act_param_app_storage = lt_act_param_app_storage
et_act_param_app_backup = DATA(lt_act_param_app_backup)
CHANGING ct_modification = lt_modification ).
WHEN OTHERS.
" check if the selected node exists and if it can be deleted.
io_read->retrieve( EXPORTING iv_node = lv_node
it_key = VALUE #( ( key = <fs_parameters>-key ) )
iv_fill_data = abap_false
IMPORTING et_failed_key = DATA(lt_failed_key) ).
IF lt_failed_key IS INITIAL.
INSERT VALUE #( node = lv_node
change_mode = /bobf/if_frw_c=>sc_modify_delete
key = <fs_parameters>-key ) INTO TABLE lt_modification.
ENDIF.
ENDCASE.
"-----------------------------------
" Set Follow-Up to GENERAL - Phase
"-----------------------------------
IF lt_act_param_phase IS NOT INITIAL.
lr_act_param_phase = NEW /hec1/t_act_update_phase( lt_act_param_phase ).
/hec1/cl_config_det_general=>/hec1/if_config_det_general~set_act_node_keys(
is_ctx = VALUE #( BASE CORRESPONDING #( is_ctx )
node_key = /hec1/if_configuration_c=>sc_node-phase )
it_key = CORRESPONDING #( lt_act_param_phase )
iv_action = /hec1/cl_config_det_general=>/hec1/if_config_det_general~get_act_key( /hec1/if_config_constant=>gc_act_method-update_phase )
iv_act_exectime = /bobf/if_conf_c=>sc_time_after_validation
ir_act_param = lr_act_param_phase ).
ENDIF.
"-----------------------------------
" Set Follow-Up to GENERAL - Solution
"-----------------------------------
IF lt_act_param_solution IS NOT INITIAL.
/hec1/cl_config_det_general=>/hec1/if_config_det_general~set_act_node_keys(
is_ctx = VALUE #( BASE CORRESPONDING #( is_ctx )
node_key = /hec1/if_configuration_c=>sc_node-solution )
it_key = lt_act_param_solution
iv_action = /hec1/cl_config_det_general=>/hec1/if_config_det_general~get_act_key( /hec1/if_config_constant=>gc_act_method-update_solution )
iv_act_exectime = /bobf/if_conf_c=>sc_time_after_validation ).
ENDIF.
"-----------------------------------
" Set Follow-Up to GENERAL - Tier
"-----------------------------------
IF lt_act_param_tier IS NOT INITIAL.
lr_act_param_tier = NEW /hec1/t_act_update_tier( lt_act_param_tier ).
/hec1/cl_config_det_general=>/hec1/if_config_det_general~set_act_node_keys(
is_ctx = VALUE #( BASE CORRESPONDING #( is_ctx )
node_key = /hec1/if_configuration_c=>sc_node-tier )
it_key = VALUE #( FOR param_tier IN lt_act_param_tier
( key = param_tier-key ) )
iv_action = /hec1/cl_config_det_general=>/hec1/if_config_det_general~get_act_key( /hec1/if_config_constant=>gc_act_method-update_tier )
iv_act_exectime = /bobf/if_conf_c=>sc_time_after_validation
ir_act_param = lr_act_param_tier ).
ENDIF.
"-----------------------------------
" Set Follow-Up to GENERAL - DB Node
"-----------------------------------
IF lt_act_param_db_node IS NOT INITIAL.
/hec1/cl_config_det_general=>/hec1/if_config_det_general~set_act_node_keys(
is_ctx = VALUE #( BASE CORRESPONDING #( is_ctx )
node_key = /hec1/if_configuration_c=>sc_node-db_node )
it_key = lt_act_param_db_node
iv_action = /hec1/cl_config_det_general=>/hec1/if_config_det_general~get_act_key( /hec1/if_config_constant=>gc_act_method-update_db_node )
iv_act_exectime = /bobf/if_conf_c=>sc_time_after_validation ).
ENDIF.
"-----------------------------------
" Set Follow-Up to GENERAL - DB Serv PC
"-----------------------------------
IF lt_act_param_db_serv_pc IS NOT INITIAL.
lr_act_param_db_serv_pc = NEW /hec1/t_act_update_db_serv_pc( lt_act_param_db_serv_pc ).
/hec1/cl_config_det_general=>/hec1/if_config_det_general~set_act_node_keys(
is_ctx = VALUE #( BASE CORRESPONDING #( is_ctx )
node_key = /hec1/if_configuration_c=>sc_node-db_server_perform_cat )
it_key = VALUE #( FOR db_spc IN lt_act_param_db_serv_pc
( key = db_spc-key ) )
iv_action = /hec1/cl_config_det_general=>/hec1/if_config_det_general~get_act_key( /hec1/if_config_constant=>gc_act_method-update_db_server_perf_cat )
iv_act_exectime = /bobf/if_conf_c=>sc_time_after_validation
ir_act_param = lr_act_param_db_serv_pc ).
ENDIF.
"-----------------------------------
" Set Follow-Up to GENERAL - DB Storage Qty
"-----------------------------------
IF lt_act_param_db_storage_qty IS NOT INITIAL.
lr_act_param_db_storage_qty = NEW /hec1/t_act_update_db_strg_qty( lt_act_param_db_storage_qty ).
/hec1/cl_config_det_general=>/hec1/if_config_det_general~set_act_node_keys(
is_ctx = VALUE #( BASE CORRESPONDING #( is_ctx )
node_key = /hec1/if_configuration_c=>sc_node-db_storage_amount )
it_key = VALUE #( FOR db_strg_qty IN lt_act_param_db_storage_qty
( key = db_strg_qty-key ) )
iv_action = /hec1/cl_config_det_general=>/hec1/if_config_det_general~get_act_key( /hec1/if_config_constant=>gc_act_method-update_db_storage_amount )
iv_act_exectime = /bobf/if_conf_c=>sc_time_after_validation
ir_act_param = lr_act_param_db_storage_qty ).
ENDIF.
"-----------------------------------
" Set Follow-Up to GENERAL - DB Storage
"-----------------------------------
IF lt_act_param_db_storage IS NOT INITIAL.
/hec1/cl_config_det_general=>/hec1/if_config_det_general~set_act_node_keys(
is_ctx = VALUE #( BASE CORRESPONDING #( is_ctx )
node_key = /hec1/if_configuration_c=>sc_node-db_storage )
it_key = lt_act_param_db_storage
iv_action = /hec1/cl_config_det_general=>/hec1/if_config_det_general~get_act_key( /hec1/if_config_constant=>gc_act_method-update_db_storage )
iv_act_exectime = /bobf/if_conf_c=>sc_time_after_validation ).
ENDIF.
"-----------------------------------
" Set Follow-Up to GENERAL - DB Storage Backup
"-----------------------------------
IF lt_act_param_db_backup IS NOT INITIAL.
lr_act_param_db_backup = NEW /hec1/t_act_update_db_backup( lt_act_param_db_backup ).
/hec1/cl_config_det_general=>/hec1/if_config_det_general~set_act_node_keys(
is_ctx = VALUE #( BASE CORRESPONDING #( is_ctx )
node_key = /hec1/if_configuration_c=>sc_node-db_storage_backup )
it_key = VALUE #( FOR db_backup IN lt_act_param_db_backup
( key = db_backup-key ) )
iv_action = /hec1/cl_config_det_general=>/hec1/if_config_det_general~get_act_key( /hec1/if_config_constant=>gc_act_method-update_db_storage_backup )
iv_act_exectime = /bobf/if_conf_c=>sc_time_after_validation
ir_act_param = lr_act_param_db_backup ).
ENDIF.
"-----------------------------------
" Set Follow-Up to GENERAL - App Node
"-----------------------------------
IF lt_act_param_app_node IS NOT INITIAL.
/hec1/cl_config_det_general=>/hec1/if_config_det_general~set_act_node_keys(
is_ctx = VALUE #( BASE CORRESPONDING #( is_ctx )
node_key = /hec1/if_configuration_c=>sc_node-app_node )
it_key = lt_act_param_app_node
iv_action = /hec1/cl_config_det_general=>/hec1/if_config_det_general~get_act_key( /hec1/if_config_constant=>gc_act_method-update_app_node )
iv_act_exectime = /bobf/if_conf_c=>sc_time_after_validation ).
ENDIF.
"-----------------------------------
" Set Follow-Up to GENERAL - App Serv PC
"-----------------------------------
IF lt_act_param_app_serv_pc IS NOT INITIAL.
lr_act_param_app_serv_pc = NEW /hec1/t_act_update_app_serv_pc( lt_act_param_app_serv_pc ).
/hec1/cl_config_det_general=>/hec1/if_config_det_general~set_act_node_keys(
is_ctx = VALUE #( BASE CORRESPONDING #( is_ctx )
node_key = /hec1/if_configuration_c=>sc_node-app_server_perform_cat )
it_key = VALUE #( FOR app_spc IN lt_act_param_app_serv_pc
( key = app_spc-key ) )
iv_action = /hec1/cl_config_det_general=>/hec1/if_config_det_general~get_act_key( /hec1/if_config_constant=>gc_act_method-update_app_server_perf_cat )
iv_act_exectime = /bobf/if_conf_c=>sc_time_after_validation
ir_act_param = lr_act_param_app_serv_pc ).
ENDIF.
"-----------------------------------
" Set Follow-Up to GENERAL - App Storage Qty
"-----------------------------------
IF lt_act_param_app_storage_qty IS NOT INITIAL.
lr_act_param_app_storage_qty = NEW /hec1/t_act_update_app_strgqty( lt_act_param_app_storage_qty ).
/hec1/cl_config_det_general=>/hec1/if_config_det_general~set_act_node_keys(
is_ctx = VALUE #( BASE CORRESPONDING #( is_ctx )
node_key = /hec1/if_configuration_c=>sc_node-app_storage_amount )
it_key = VALUE #( FOR app_strg_qty IN lt_act_param_app_storage_qty
( key = app_strg_qty-key ) )
iv_action = /hec1/cl_config_det_general=>/hec1/if_config_det_general~get_act_key( /hec1/if_config_constant=>gc_act_method-update_app_storage_amount )
iv_act_exectime = /bobf/if_conf_c=>sc_time_after_validation
ir_act_param = lr_act_param_app_storage_qty ).
ENDIF.
"-----------------------------------
" Set Follow-Up to GENERAL - App Storage
"-----------------------------------
IF lt_act_param_app_storage IS NOT INITIAL.
/hec1/cl_config_det_general=>/hec1/if_config_det_general~set_act_node_keys(
is_ctx = VALUE #( BASE CORRESPONDING #( is_ctx )
node_key = /hec1/if_configuration_c=>sc_node-app_storage )
it_key = lt_act_param_app_storage
iv_action = /hec1/cl_config_det_general=>/hec1/if_config_det_general~get_act_key( /hec1/if_config_constant=>gc_act_method-update_app_storage )
iv_act_exectime = /bobf/if_conf_c=>sc_time_after_validation ).
ENDIF.
"-----------------------------------
" Set Follow-Up to GENERAL - App Storage Backup
"-----------------------------------
IF lt_act_param_app_backup IS NOT INITIAL.
lr_act_param_app_backup = NEW /hec1/t_act_update_app_backup( lt_act_param_app_backup ).
/hec1/cl_config_det_general=>/hec1/if_config_det_general~set_act_node_keys(
is_ctx = VALUE #( BASE CORRESPONDING #( is_ctx )
node_key = /hec1/if_configuration_c=>sc_node-app_storage_backup )
it_key = VALUE #( FOR app_backup IN lt_act_param_app_backup
( key = app_backup-key ) )
iv_action = /hec1/cl_config_det_general=>/hec1/if_config_det_general~get_act_key( /hec1/if_config_constant=>gc_act_method-update_app_storage_backup )
iv_act_exectime = /bobf/if_conf_c=>sc_time_after_validation
ir_act_param = lr_act_param_app_backup ).
ENDIF.
"-----------------------------------
" Execute Modification ( = Delete)
"-----------------------------------
IF lt_modification IS NOT INITIAL.
io_modify->do_modify( lt_modification ).
io_modify->end_modify( EXPORTING iv_process_immediately = abap_true
IMPORTING eo_message = DATA(lo_message)
eo_change = DATA(lo_change) ).
ENDIF.
" **************************************************************************************************************************************************
" Attention!!!!!!
" This is only a temporary solution, because this is
" a mix between UI logic and BOPF logic. Normally no
" UI logic has to be set into a BOPF object. But at
" the moment there is the problem, that the Application
" is not running with FBI, therefore we can't control
" the tree about the FBI feeder class
" Switch to FBI, this part can be deleted
LOOP AT lt_modification INTO DATA(ls_modification).
IF ls_modification-node = /hec1/if_configuration_c=>sc_node-phase.
/hec1/cl_bopf_config_ui_tree_h=>get_instance( )->/hec1/if_bopf_config_ui_tree_h~delete( iv_tree_type = /hec1/if_config_constants=>gc_tree_type-phasing
iv_node_key = ls_modification-key ).
ELSE.
/hec1/cl_bopf_config_ui_tree_h=>get_instance( )->/hec1/if_bopf_config_ui_tree_h~delete( iv_node_key = ls_modification-key ).
ENDIF.
ENDLOOP.
CLEAR: <fs_parameters>,
lt_modification,
lt_root.
ENDMETHOD.
METHOD delete_additional_service.
DATA: lt_solution TYPE /hec1/t_data_solution_ct,
lt_tier TYPE /hec1/t_data_tier_ct,
lt_add_service TYPE /hec1/t_data_add_services_ct,
lt_tier_add_service TYPE /hec1/t_data_tier_add_serv_ct.
DATA(lv_node) = /hec1/if_configuration_c=>sc_node-add_service.
" Get Data
io_read->retrieve( EXPORTING iv_node = lv_node
it_key = VALUE #( ( key = is_parameters-key ) )
IMPORTING et_data = lt_add_service ).
" Get Tier Services
io_read->retrieve_by_association( EXPORTING iv_node = /hec1/if_configuration_c=>sc_node-root
it_key = it_root_key
iv_fill_data = abap_true
iv_association = /hec1/if_configuration_c=>sc_association-root-solution
IMPORTING et_data = lt_solution
et_target_key = DATA(lt_solution_key) ).
io_read->retrieve_by_association( EXPORTING iv_node = /hec1/if_configuration_c=>sc_node-solution
it_key = lt_solution_key
iv_fill_data = abap_true
iv_association = /hec1/if_configuration_c=>sc_association-solution-tier
IMPORTING et_data = lt_tier
et_target_key = DATA(lt_tier_key) ).
io_read->retrieve_by_association( EXPORTING iv_node = /hec1/if_configuration_c=>sc_node-tier
it_key = lt_tier_key
iv_fill_data = abap_true
iv_association = /hec1/if_configuration_c=>sc_association-tier-tier_add_service
IMPORTING et_target_key = DATA(lt_tier_service_key)
et_data = lt_tier_add_service ).
" Run Delete Logic
" Add Node to Delete List
TRY.
DATA(ls_add_service) = lt_add_service[ 1 ].
INSERT VALUE #( node = /hec1/if_configuration_c=>sc_node-add_service
change_mode = /bobf/if_frw_c=>sc_modify_delete
key = ls_add_service-key ) INTO TABLE ct_modification.
CATCH cx_sy_itab_line_not_found.
ENDTRY.
" Add corresponding tier services to delete list
LOOP AT lt_tier_add_service INTO DATA(ls_tier_add_service)
WHERE hec_tas_service_ref_guid = ls_add_service-hec_node_service.
INSERT VALUE #( node = /hec1/if_configuration_c=>sc_node-tier_add_service
change_mode = /bobf/if_frw_c=>sc_modify_delete
key = ls_tier_add_service-key ) INTO TABLE ct_modification.
ENDLOOP.
ENDMETHOD.
METHOD delete_app_server_instance.
DATA: lt_app_serv_inst TYPE /hec1/t_data_app_serv_inst_ct,
lt_db_storage TYPE /hec1/t_data_db_storage_ct.
DATA(lv_node) = /hec1/if_configuration_c=>sc_node-app_server_instance.
" Get Data
io_read->retrieve( EXPORTING iv_node = lv_node
it_key = VALUE #( ( key = is_parameters-key ) )
IMPORTING et_data = lt_app_serv_inst ).
" Run Delete Logic
" Add Node to Delete List
TRY.
DATA(ls_app_serv_inst) = lt_app_serv_inst[ 1 ].
INSERT VALUE #( node = /hec1/if_configuration_c=>sc_node-app_server_instance
change_mode = /bobf/if_frw_c=>sc_modify_delete
key = ls_app_serv_inst-key ) INTO TABLE ct_modification.
CATCH cx_sy_itab_line_not_found.
ENDTRY.
" Add Parent Node to Update List
INSERT VALUE #( key = ls_app_serv_inst-parent_key
do_update_qty = abap_true ) INTO TABLE et_act_param_tier.
ENDMETHOD.
METHOD delete_app_serv_perf_cat.
DATA: lt_app_serv_pc TYPE /hec1/t_data_app_serv_pc_ct,
lt_app_serv_pc_all TYPE /hec1/t_data_app_serv_pc_ct.
DATA(lv_node) = /hec1/if_configuration_c=>sc_node-app_server_perform_cat.
" Get Data
io_read->retrieve( EXPORTING iv_node = lv_node
it_key = VALUE #( ( key = is_parameters-key ) )
IMPORTING et_data = lt_app_serv_pc ).
io_read->retrieve_by_association( EXPORTING iv_node = lv_node
it_key = VALUE #( ( key = is_parameters-key ) )
iv_association = /hec1/if_configuration_c=>sc_association-app_server_perform_cat-to_parent
IMPORTING et_target_key = DATA(lt_app_node_key) ).
io_read->retrieve_by_association( EXPORTING iv_node = /hec1/if_configuration_c=>sc_node-app_node
it_key = lt_app_node_key
iv_association = /hec1/if_configuration_c=>sc_association-app_node-app_server_perform_cat
iv_fill_data = abap_true
IMPORTING et_data = lt_app_serv_pc_all ).
" Run Delete Logic
" Add Node to Delete List
TRY.
DATA(ls_app_serv_pc) = lt_app_serv_pc[ 1 ].
INSERT VALUE #( node = /hec1/if_configuration_c=>sc_node-app_server_perform_cat
change_mode = /bobf/if_frw_c=>sc_modify_delete
key = ls_app_serv_pc-key ) INTO TABLE ct_modification.
CATCH cx_sy_itab_line_not_found.
ENDTRY.
" Add Parent Node to Update List
INSERT VALUE #( key = ls_app_serv_pc-parent_key ) INTO TABLE et_act_param_app_node.
" the Phasing needs to be adjusted for the predecessor and ALL successors
" modify predecessor
TRY.
DATA(ls_app_serv_pc_pred) = lt_app_serv_pc_all[ key = ls_app_serv_pc-hec_predecessor_guid ].
INSERT VALUE #( key = ls_app_serv_pc_pred-key
parent_key = ls_app_serv_pc_pred-parent_key
do_clear_phasing = abap_true
) INTO TABLE et_act_param_app_serv_pc.
CATCH cx_sy_itab_line_not_found.
ENDTRY.
DATA(ls_app_serv_pc_succ) = ls_app_serv_pc.
" modify successors
TRY.
DO.
ls_app_serv_pc_succ = lt_app_serv_pc_all[ key = ls_app_serv_pc_succ-hec_successor_guid ].
INSERT VALUE #( key = ls_app_serv_pc_succ-key
parent_key = ls_app_serv_pc_succ-parent_key
do_clear_phasing = abap_true
) INTO TABLE et_act_param_app_serv_pc.
ENDDO.
CATCH cx_sy_itab_line_not_found.
ENDTRY.
ENDMETHOD.
METHOD delete_app_storage_amount.
DATA: lt_app_storage_qty TYPE /hec1/t_data_app_storageqty_ct,
lt_app_storage_qty_all TYPE /hec1/t_data_app_storageqty_ct,
lt_app_serv_pc TYPE /hec1/t_data_app_serv_pc_ct,
lt_app_serv_pc_all TYPE /hec1/t_data_app_serv_pc_ct,
lt_app_storage TYPE /hec1/t_data_app_storage_ct.
DATA(lv_node) = /hec1/if_configuration_c=>sc_node-app_storage_amount.
" Get Data
io_read->retrieve( EXPORTING iv_node = lv_node
it_key = VALUE #( ( key = is_parameters-key ) )
IMPORTING et_data = lt_app_storage_qty ).
io_read->retrieve_by_association( EXPORTING iv_node = lv_node
it_key = VALUE #( ( key = is_parameters-key ) )
iv_fill_data = abap_true
iv_association = /hec1/if_configuration_c=>sc_association-app_storage_amount-to_parent
IMPORTING et_target_key = DATA(lt_app_serv_pc_key)
et_data = lt_app_serv_pc ).
" Get all storage amounts
io_read->retrieve_by_association( EXPORTING iv_node = /hec1/if_configuration_c=>sc_node-app_server_perform_cat
it_key = lt_app_serv_pc_key
iv_fill_data = abap_true
iv_association = /hec1/if_configuration_c=>sc_association-app_server_perform_cat-app_storage_amount
IMPORTING et_data = lt_app_storage_qty_all ).
" Get server
io_read->retrieve_by_association( EXPORTING iv_node = /hec1/if_configuration_c=>sc_node-app_server_perform_cat
it_key = lt_app_serv_pc_key
iv_association = /hec1/if_configuration_c=>sc_association-app_server_perform_cat-app_server
IMPORTING et_target_key = DATA(lt_app_server_key) ).
io_read->retrieve_by_association( EXPORTING iv_node = /hec1/if_configuration_c=>sc_node-app_server
it_key = lt_app_server_key
iv_fill_data = abap_true
iv_association = /hec1/if_configuration_c=>sc_association-app_server-app_storage
IMPORTING et_data = lt_app_storage ).
" Run Delete Logic
" Add Node to Delete List
TRY.
DATA(ls_app_storage_qty) = lt_app_storage_qty[ 1 ].
INSERT VALUE #( node = /hec1/if_configuration_c=>sc_node-app_storage_amount
change_mode = /bobf/if_frw_c=>sc_modify_delete
key = ls_app_storage_qty-key ) INTO TABLE ct_modification.
CATCH cx_sy_itab_line_not_found.
ENDTRY.
" Get corresponding storage node
LOOP AT lt_app_storage INTO DATA(ls_app_storage).
" add to general parameters
IF ls_app_storage-hec_storage_qty_ref_guid = ls_app_storage_qty-hec_node_app_storage_qty.
"Add Storage to delete table
INSERT VALUE #( node = /hec1/if_configuration_c=>sc_node-app_storage
change_mode = /bobf/if_frw_c=>sc_modify_delete
key = ls_app_storage-key ) INTO TABLE ct_modification.
ELSE.
INSERT VALUE #( key = ls_app_storage-key ) INTO TABLE et_act_param_app_storage.
ENDIF.
ENDLOOP.
" Add Parent Node to Update List
TRY.
DATA(ls_app_serv_pc) = lt_app_serv_pc[ key = ls_app_storage_qty-parent_key ].
INSERT VALUE #( key = ls_app_serv_pc-key
parent_key = ls_app_serv_pc-parent_key
do_update_storage_qty = abap_true
) INTO TABLE et_act_param_app_serv_pc.
CATCH cx_sy_itab_line_not_found.
ENDTRY.
" the Phasing needs to be adjusted for the predecessor and ALL successors
" modify predecessor
TRY.
DATA(ls_app_storage_qty_pred) = lt_app_storage_qty_all[ key = ls_app_storage_qty-hec_predecessor_guid ].
INSERT VALUE #( key = ls_app_storage_qty_pred-key
parent_key = ls_app_storage_qty_pred-parent_key
do_clear_phasing = abap_true
) INTO TABLE et_act_param_app_storage_qty.
CATCH cx_sy_itab_line_not_found.
ENDTRY.
DATA(ls_app_storage_qty_succ) = ls_app_storage_qty.
" modify successors
TRY.
DO.
ls_app_storage_qty_succ = lt_app_storage_qty_all[ key = ls_app_storage_qty_succ-hec_successor_guid ].
INSERT VALUE #( key = ls_app_storage_qty_succ-key
parent_key = ls_app_storage_qty_succ-parent_key
do_clear_phasing = abap_true
) INTO TABLE et_act_param_app_storage_qty.
ENDDO.
CATCH cx_sy_itab_line_not_found.
ENDTRY.
ENDMETHOD.
METHOD delete_app_storage_backup.
DATA: lt_app_backup TYPE /hec1/t_data_app_backup_ct,
lt_app_backup_all TYPE /hec1/t_data_app_backup_ct.
DATA(lv_node) = /hec1/if_configuration_c=>sc_node-app_storage_backup.
" Get Data
io_read->retrieve( EXPORTING iv_node = lv_node
it_key = VALUE #( ( key = is_parameters-key ) )
IMPORTING et_data = lt_app_backup ).
io_read->retrieve_by_association( EXPORTING iv_node = lv_node
it_key = VALUE #( ( key = is_parameters-key ) )
iv_association = /hec1/if_configuration_c=>sc_association-app_storage_backup-to_parent
IMPORTING et_target_key = DATA(lt_app_storage_key) ).
io_read->retrieve_by_association( EXPORTING iv_node = /hec1/if_configuration_c=>sc_node-app_storage
it_key = lt_app_storage_key
iv_association = /hec1/if_configuration_c=>sc_association-app_storage-app_storage_backup
iv_fill_data = abap_true
IMPORTING et_data = lt_app_backup_all ).
" Run Delete Logic
" Add Node to Delete List
TRY.
DATA(ls_app_backup) = lt_app_backup[ 1 ].
INSERT VALUE #( node = /hec1/if_configuration_c=>sc_node-app_storage_backup
change_mode = /bobf/if_frw_c=>sc_modify_delete
key = ls_app_backup-key ) INTO TABLE ct_modification.
CATCH cx_sy_itab_line_not_found.
ENDTRY.
" Add Parent Node to Update List
INSERT VALUE #( key = ls_app_backup-parent_key ) INTO TABLE et_act_param_app_storage.
" the Phasing needs to be adjusted for the predecessor and ALL successors
" modify predecessor
TRY.
DATA(ls_app_backup_pred) = lt_app_backup_all[ key = ls_app_backup-hec_predecessor_guid ].
INSERT VALUE #( key = ls_app_backup_pred-key
parent_key = ls_app_backup_pred-parent_key
do_clear_phasing = abap_true
) INTO TABLE et_act_param_app_backup.
CATCH cx_sy_itab_line_not_found.
ENDTRY.
DATA(ls_app_backup_succ) = ls_app_backup.
" modify successors
TRY.
DO.
ls_app_backup_succ = lt_app_backup_all[ key = ls_app_backup_succ-hec_successor_guid ].
INSERT VALUE #( key = ls_app_backup_succ-key
parent_key = ls_app_backup_succ-parent_key
do_clear_phasing = abap_true
) INTO TABLE et_act_param_app_backup.
ENDDO.
CATCH cx_sy_itab_line_not_found.
ENDTRY.
ENDMETHOD.
METHOD delete_connectivity.
DATA: lt_connectivity TYPE /hec1/t_data_connectivity_ct.
DATA(lv_node) = /hec1/if_configuration_c=>sc_node-connectivity.
" Get Data
io_read->retrieve( EXPORTING iv_node = lv_node
it_key = VALUE #( ( key = is_parameters-key ) )
IMPORTING et_data = lt_connectivity ).
" Get Contacts
DATA(lt_contact_reference) = get_contact_nodes( io_read = io_read
it_root_key = it_root_key ).
" Run Delete Logic
LOOP AT VALUE /bobf/t_frw_key( FOR conn IN lt_connectivity
FOR cont_ref IN lt_contact_reference WHERE ( hec_contact_ref_node_key = conn-hec_node_connectivity )
( key = cont_ref-key ) ) INTO DATA(ls_key).
INSERT VALUE #( node = /hec1/if_configuration_c=>sc_node-contact_reference
change_mode = /bobf/if_frw_c=>sc_modify_delete
key = ls_key-key ) INTO TABLE ct_modification.
ENDLOOP.
" add the current selection to delete
io_read->retrieve( EXPORTING iv_node = lv_node
it_key = VALUE #( ( key = is_parameters-key ) )
iv_fill_data = abap_false
IMPORTING et_failed_key = DATA(lt_failed_key) ).
IF lt_failed_key IS INITIAL.
INSERT VALUE #( node = lv_node
change_mode = /bobf/if_frw_c=>sc_modify_delete
key = is_parameters-key ) INTO TABLE ct_modification.
ENDIF.
ENDMETHOD.
METHOD delete_datacenter.
DATA: lt_datacenter TYPE /hec1/t_data_datacenter_ct,
lt_inf_baseline TYPE /hec1/t_data_if_baseline_ct,
lt_network_segment TYPE /hec1/t_data_network_segm_ct,
lt_connectivity TYPE /hec1/t_data_connectivity_ct.
DATA(lv_node) = /hec1/if_configuration_c=>sc_node-datacenter.
" Get Data
io_read->retrieve( EXPORTING iv_node = lv_node
it_key = VALUE #( ( key = is_parameters-key ) )
IMPORTING et_data = lt_datacenter ).
io_read->retrieve_by_association( EXPORTING iv_node = lv_node
it_key = VALUE #( ( key = is_parameters-key ) )
iv_association = /hec1/if_configuration_c=>sc_association-datacenter-infrastructure_baseline
IMPORTING et_target_key = DATA(lt_if_baseline_key) ).
io_read->retrieve_by_association( EXPORTING iv_node = /hec1/if_configuration_c=>sc_node-infrastructure_baseline
it_key = lt_if_baseline_key
iv_fill_data = abap_true
iv_association = /hec1/if_configuration_c=>sc_association-infrastructure_baseline-network_segment
IMPORTING et_data = lt_network_segment ).
io_read->retrieve_by_association( EXPORTING iv_node = lv_node
it_key = VALUE #( ( key = is_parameters-key ) )
iv_fill_data = abap_true
iv_association = /hec1/if_configuration_c=>sc_association-datacenter-connectivity
IMPORTING et_data = lt_connectivity ).
" Get Contacts
DATA(lt_contact_reference) = get_contact_nodes( io_read = io_read
it_root_key = it_root_key ).
" Run Delete Logic
LOOP AT VALUE /bobf/t_frw_key( FOR conn IN lt_connectivity
FOR cont_ref IN lt_contact_reference WHERE ( hec_contact_ref_node_key = conn-hec_node_connectivity )
( key = cont_ref-key ) ) INTO DATA(ls_key).
INSERT VALUE #( node = /hec1/if_configuration_c=>sc_node-contact_reference
change_mode = /bobf/if_frw_c=>sc_modify_delete
key = ls_key-key ) INTO TABLE ct_modification.
ENDLOOP.
LOOP AT VALUE /bobf/t_frw_key( FOR nw_segm IN lt_network_segment
FOR cont_ref IN lt_contact_reference WHERE ( hec_contact_ref_node_key = nw_segm-hec_node_network_segment )
( key = cont_ref-key ) ) INTO ls_key.
INSERT VALUE #( node = /hec1/if_configuration_c=>sc_node-contact_reference
change_mode = /bobf/if_frw_c=>sc_modify_delete
key = ls_key-key ) INTO TABLE ct_modification.
ENDLOOP.
" add the current selection to delete
io_read->retrieve( EXPORTING iv_node = lv_node
it_key = VALUE #( ( key = is_parameters-key ) )
iv_fill_data = abap_false
IMPORTING et_failed_key = DATA(lt_failed_key) ).
IF lt_failed_key IS INITIAL.
INSERT VALUE #( node = lv_node
change_mode = /bobf/if_frw_c=>sc_modify_delete
key = is_parameters-key ) INTO TABLE ct_modification.
ENDIF.
CLEAR: lt_datacenter,
lt_contact_reference,
lt_connectivity,
lt_inf_baseline,
lt_network_segment.
ENDMETHOD.
METHOD delete_db_server_instance.
DATA(lv_node) = /hec1/if_configuration_c=>sc_node-db_server_instance.
" Get Data
" Get Multitenancy nodes
get_multitenancy_nodes( EXPORTING io_read = io_read
it_root_key = it_root_key
IMPORTING et_solution = DATA(lt_solution_all)
et_tier = DATA(lt_tier_all)
et_db_server_instance = DATA(lt_db_serv_inst_all)
et_instance_db = DATA(lt_inst_db_all) ).
" Get Contacts
DATA(lt_contact_reference) = get_contact_nodes( io_read = io_read
it_root_key = it_root_key ).
" Run Delete Logic
" Add Node to Delete List
TRY.
DATA(ls_db_serv_inst) = lt_db_serv_inst_all[ key = is_parameters-key ].
INSERT VALUE #( node = /hec1/if_configuration_c=>sc_node-db_server_instance
change_mode = /bobf/if_frw_c=>sc_modify_delete
key = ls_db_serv_inst-key ) INTO TABLE ct_modification.
CATCH cx_sy_itab_line_not_found.
ENDTRY.
" Add Parent Node to Update List
INSERT VALUE #( key = ls_db_serv_inst-parent_key
do_update_qty = abap_true ) INTO TABLE et_act_param_tier.
" TODO: Multitenancy
ENDMETHOD.
METHOD delete_db_serv_perf_cat.
DATA: lt_db_serv_pc TYPE /hec1/t_data_db_serv_pc_ct,
lt_db_serv_pc_all TYPE /hec1/t_data_db_serv_pc_ct,
lt_db_node TYPE /hec1/t_data_db_node_ct.
DATA(lv_node) = /hec1/if_configuration_c=>sc_node-db_server_perform_cat.
" Get Data
io_read->retrieve( EXPORTING iv_node = lv_node
it_key = VALUE #( ( key = is_parameters-key ) )
IMPORTING et_data = lt_db_serv_pc ).
io_read->retrieve_by_association( EXPORTING iv_node = lv_node
it_key = VALUE #( ( key = is_parameters-key ) )
iv_association = /hec1/if_configuration_c=>sc_association-db_server_perform_cat-to_parent
IMPORTING et_target_key = DATA(lt_db_node_key)
et_data = lt_db_node ).
io_read->retrieve_by_association( EXPORTING iv_node = /hec1/if_configuration_c=>sc_node-db_node
it_key = lt_db_node_key
iv_association = /hec1/if_configuration_c=>sc_association-db_node-db_server_perform_cat
iv_fill_data = abap_true
IMPORTING et_data = lt_db_serv_pc_all ).
" Run Delete Logic
" Add Node to Delete List
TRY.
DATA(ls_db_serv_pc) = lt_db_serv_pc[ key = is_parameters-key ].
INSERT VALUE #( node = /hec1/if_configuration_c=>sc_node-db_server_perform_cat
change_mode = /bobf/if_frw_c=>sc_modify_delete
key = ls_db_serv_pc-key ) INTO TABLE ct_modification.
" Add Parent Node to Update List
INSERT VALUE #( key = ls_db_serv_pc-parent_key ) INTO TABLE et_act_param_db_node.
" ********************************
" Adjust Phasing
" ********************************
" the Phasing needs to be cleared for the predecessor and ALL successors
" modify predecessor
TRY.
DATA(ls_db_serv_pc_pred) = lt_db_serv_pc_all[ key = ls_db_serv_pc-hec_predecessor_guid ].
INSERT VALUE #( key = ls_db_serv_pc_pred-key
parent_key = ls_db_serv_pc_pred-parent_key
do_clear_phasing = abap_true
) INTO TABLE et_act_param_db_serv_pc.
CATCH cx_sy_itab_line_not_found.
ENDTRY.
DATA(ls_db_serv_pc_succ) = ls_db_serv_pc.
" modify successors
TRY.
DO.
ls_db_serv_pc_succ = lt_db_serv_pc_all[ key = ls_db_serv_pc_succ-hec_successor_guid ].
INSERT VALUE #( key = ls_db_serv_pc_succ-key
parent_key = ls_db_serv_pc_succ-parent_key
do_clear_phasing = abap_true
) INTO TABLE et_act_param_db_serv_pc.
ENDDO.
CATCH cx_sy_itab_line_not_found.
ENDTRY.
CATCH cx_sy_itab_line_not_found.
ENDTRY.
ENDMETHOD.
METHOD delete_db_storage_amount.
DATA: lt_db_serv_pc TYPE /hec1/t_data_db_serv_pc_ct,
lt_db_serv_pc_all TYPE /hec1/t_data_db_serv_pc_ct,
lt_db_storage_qty TYPE /hec1/t_data_db_storage_qty_ct,
lt_db_storage_qty_all TYPE /hec1/t_data_db_storage_qty_ct,
lt_db_storage TYPE /hec1/t_data_db_storage_ct.
DATA(lv_node) = /hec1/if_configuration_c=>sc_node-db_storage_amount.
" Get Data
io_read->retrieve( EXPORTING iv_node = lv_node
it_key = VALUE #( ( key = is_parameters-key ) )
IMPORTING et_data = lt_db_storage_qty ).
io_read->retrieve_by_association( EXPORTING iv_node = lv_node
it_key = VALUE #( ( key = is_parameters-key ) )
iv_fill_data = abap_true
iv_association = /hec1/if_configuration_c=>sc_association-db_storage_amount-to_parent
IMPORTING et_target_key = DATA(lt_db_serv_pc_key)
et_data = lt_db_serv_pc ).
" Get all storage amounts
io_read->retrieve_by_association( EXPORTING iv_node = /hec1/if_configuration_c=>sc_node-db_server_perform_cat
it_key = lt_db_serv_pc_key
iv_fill_data = abap_true
iv_association = /hec1/if_configuration_c=>sc_association-db_server_perform_cat-db_storage_amount
IMPORTING et_data = lt_db_storage_qty_all ).
" Get Server
io_read->retrieve_by_association( EXPORTING iv_node = /hec1/if_configuration_c=>sc_node-db_server_perform_cat
it_key = lt_db_serv_pc_key
iv_association = /hec1/if_configuration_c=>sc_association-db_server_perform_cat-db_server
IMPORTING et_target_key = DATA(lt_db_server_key) ).
io_read->retrieve_by_association( EXPORTING iv_node = /hec1/if_configuration_c=>sc_node-db_server
it_key = lt_db_server_key
iv_fill_data = abap_true
iv_association = /hec1/if_configuration_c=>sc_association-db_server-db_storage
IMPORTING et_data = lt_db_storage ).
" Run Delete Logic
" Add Node to Delete List
TRY.
DATA(ls_db_storage_qty) = lt_db_storage_qty[ 1 ].
INSERT VALUE #( node = /hec1/if_configuration_c=>sc_node-db_storage_amount
change_mode = /bobf/if_frw_c=>sc_modify_delete
key = ls_db_storage_qty-key ) INTO TABLE ct_modification.
" Get corresponding storage node
LOOP AT lt_db_storage INTO DATA(ls_db_storage).
" add to general parameters
IF ls_db_storage-hec_storage_qty_ref_guid = ls_db_storage_qty-hec_node_db_storage_qty.
"Add Storage to delete table
INSERT VALUE #( node = /hec1/if_configuration_c=>sc_node-app_storage
change_mode = /bobf/if_frw_c=>sc_modify_delete
key = ls_db_storage-key ) INTO TABLE ct_modification.
ELSE.
INSERT VALUE #( key = ls_db_storage-key ) INTO TABLE et_act_param_db_storage.
ENDIF.
ENDLOOP.
" Add Parent Node to Update List
TRY.
DATA(ls_db_serv_pc) = lt_db_serv_pc[ key = ls_db_storage_qty-parent_key ].
INSERT VALUE #( key = ls_db_serv_pc-key
parent_key = ls_db_serv_pc-parent_key
do_update_storage_qty = abap_true
) INTO TABLE et_act_param_db_serv_pc.
CATCH cx_sy_itab_line_not_found.
ENDTRY.
" the Phasing needs to be adjusted for the predecessor and ALL successors
" modify predecessor
TRY.
DATA(ls_db_storage_qty_pred) = lt_db_storage_qty_all[ key = ls_db_storage_qty-hec_predecessor_guid ].
INSERT VALUE #( key = ls_db_storage_qty_pred-key
parent_key = ls_db_storage_qty_pred-parent_key
do_clear_phasing = abap_true
) INTO TABLE et_act_param_db_storage_qty.
CATCH cx_sy_itab_line_not_found.
ENDTRY.
DATA(ls_db_storage_qty_succ) = ls_db_storage_qty.
" modify successors
TRY.
DO.
ls_db_storage_qty_succ = lt_db_storage_qty_all[ key = ls_db_storage_qty_succ-hec_successor_guid ].
INSERT VALUE #( key = ls_db_storage_qty_succ-key
parent_key = ls_db_storage_qty_succ-parent_key
do_clear_phasing = abap_true
) INTO TABLE et_act_param_db_storage_qty.
ENDDO.
CATCH cx_sy_itab_line_not_found.
ENDTRY.
CATCH cx_sy_itab_line_not_found.
ENDTRY.
ENDMETHOD.
METHOD delete_db_storage_backup.
DATA: lt_db_backup TYPE /hec1/t_data_db_backup_ct,
lt_db_backup_all TYPE /hec1/t_data_db_backup_ct.
DATA(lv_node) = /hec1/if_configuration_c=>sc_node-db_storage_backup.
" Get Data
io_read->retrieve( EXPORTING iv_node = lv_node
it_key = VALUE #( ( key = is_parameters-key ) )
IMPORTING et_data = lt_db_backup ).
io_read->retrieve_by_association( EXPORTING iv_node = lv_node
it_key = VALUE #( ( key = is_parameters-key ) )
iv_association = /hec1/if_configuration_c=>sc_association-db_storage_backup-to_parent
IMPORTING et_target_key = DATA(lt_db_storage_key) ).
io_read->retrieve_by_association( EXPORTING iv_node = /hec1/if_configuration_c=>sc_node-db_storage
it_key = lt_db_storage_key
iv_association = /hec1/if_configuration_c=>sc_association-db_storage-db_storage_backup
iv_fill_data = abap_true
IMPORTING et_data = lt_db_backup_all ).
" Run Delete Logic
" Add Node to Delete List
TRY.
DATA(ls_db_backup) = lt_db_backup[ 1 ].
INSERT VALUE #( node = /hec1/if_configuration_c=>sc_node-db_storage_backup
change_mode = /bobf/if_frw_c=>sc_modify_delete
key = ls_db_backup-key ) INTO TABLE ct_modification.
CATCH cx_sy_itab_line_not_found.
ENDTRY.
" Add Parent Node to Update List
INSERT VALUE #( key = ls_db_backup-parent_key ) INTO TABLE et_act_param_db_storage.
" the Phasing needs to be adjusted for the predecessor and ALL successors
" modify predecessor
TRY.
DATA(ls_db_backup_pred) = lt_db_backup_all[ key = ls_db_backup-hec_predecessor_guid ].
INSERT VALUE #( key = ls_db_backup_pred-key
parent_key = ls_db_backup_pred-parent_key
do_clear_phasing = abap_true
) INTO TABLE et_act_param_db_backup.
CATCH cx_sy_itab_line_not_found.
ENDTRY.
DATA(ls_db_backup_succ) = ls_db_backup.
" modify successors
TRY.
DO.
ls_db_backup_succ = lt_db_backup_all[ key = ls_db_backup_succ-hec_successor_guid ].
INSERT VALUE #( key = ls_db_backup_succ-key
parent_key = ls_db_backup_succ-parent_key
do_clear_phasing = abap_true
) INTO TABLE et_act_param_db_backup.
ENDDO.
CATCH cx_sy_itab_line_not_found.
ENDTRY.
ENDMETHOD.
METHOD delete_instance_db.
DATA(lv_node) = /hec1/if_configuration_c=>sc_node-instance_db.
" Get Data
" Get Multitenancy nodes
get_multitenancy_nodes( EXPORTING io_read = io_read
it_root_key = it_root_key
IMPORTING et_solution = DATA(lt_solution_all)
et_tier = DATA(lt_tier_all)
et_db_server_instance = DATA(lt_db_serv_inst_all)
et_instance_db = DATA(lt_inst_db_all) ).
" Get Contacts
DATA(lt_contact_reference) = get_contact_nodes( io_read = io_read
it_root_key = it_root_key ).
" Run Delete Logic
" Add Node to Delete List
TRY.
DATA(ls_instance_db) = lt_inst_db_all[ 1 ].
INSERT VALUE #( node = /hec1/if_configuration_c=>sc_node-instance_db
change_mode = /bobf/if_frw_c=>sc_modify_delete
key = ls_instance_db-key ) INTO TABLE ct_modification.
CATCH cx_sy_itab_line_not_found.
ENDTRY.
" TODO Multitenancy
ENDMETHOD.
METHOD delete_network_segment.
DATA: lt_network_segment TYPE /hec1/t_data_network_segm_ct.
DATA(lv_node) = /hec1/if_configuration_c=>sc_node-network_segment.
" Get Data
io_read->retrieve( EXPORTING iv_node = lv_node
it_key = VALUE #( ( key = is_parameters-key ) )
IMPORTING et_data = lt_network_segment ).
" Get Contacts
DATA(lt_contact_reference) = get_contact_nodes( io_read = io_read
it_root_key = it_root_key ).
" Run Delete Logic
LOOP AT VALUE /bobf/t_frw_key( FOR nw_segm IN lt_network_segment
FOR cont_ref IN lt_contact_reference WHERE ( hec_contact_ref_node_key = nw_segm-hec_node_network_segment )
( key = cont_ref-key ) ) INTO DATA(ls_key).
INSERT VALUE #( node = /hec1/if_configuration_c=>sc_node-contact_reference
change_mode = /bobf/if_frw_c=>sc_modify_delete
key = ls_key-key ) INTO TABLE ct_modification.
ENDLOOP.
" add the current selection to delete
io_read->retrieve( EXPORTING iv_node = lv_node
it_key = VALUE #( ( key = is_parameters-key ) )
iv_fill_data = abap_false
IMPORTING et_failed_key = DATA(lt_failed_key) ).
IF lt_failed_key IS INITIAL.
INSERT VALUE #( node = lv_node
change_mode = /bobf/if_frw_c=>sc_modify_delete
key = is_parameters-key ) INTO TABLE ct_modification.
ENDIF.
ENDMETHOD.
METHOD delete_phase.
DATA: lt_phase TYPE /hec1/t_data_phase_ct.
io_read->retrieve_by_association( EXPORTING iv_node = /hec1/if_configuration_c=>sc_node-root
it_key = it_root_key
iv_association = /hec1/if_configuration_c=>sc_association-root-phase
iv_fill_data = abap_true
IMPORTING et_data = lt_phase ).
TRY.
DATA(ls_phase) = lt_phase[ key = is_parameters-key ].
INSERT VALUE #( node = /hec1/if_configuration_c=>sc_node-phase
change_mode = /bobf/if_frw_c=>sc_modify_delete
key = ls_phase-key )
INTO TABLE ct_modification.
IF ls_phase-hec_phase_predecessor_guid IS NOT INITIAL.
" Add Predecessor Phase to Update List
INSERT VALUE #( key = lt_phase[ key = ls_phase-hec_phase_predecessor_guid ]-key
do_clear_phasing = abap_true
) INTO TABLE et_act_param_phase.
ENDIF.
IF ls_phase-hec_phase_successor_guid IS NOT INITIAL.
DO.
ls_phase = lt_phase[ key = ls_phase-hec_phase_successor_guid ].
INSERT VALUE #( node = /hec1/if_configuration_c=>sc_node-phase
change_mode = /bobf/if_frw_c=>sc_modify_delete
key = ls_phase-key )
INTO TABLE ct_modification.
ENDDO.
ENDIF.
CATCH cx_sy_itab_line_not_found.
ENDTRY.
CLEAR: lt_phase,
ls_phase.
ENDMETHOD.
METHOD delete_solution.
DATA(lv_node) = /hec1/if_configuration_c=>sc_node-solution.
" Get Data
" Get Multitenancy nodes
get_multitenancy_nodes( EXPORTING io_read = io_read
it_root_key = it_root_key
IMPORTING et_solution = DATA(lt_solution_all)
et_tier = DATA(lt_tier_all)
et_db_server_instance = DATA(lt_db_serv_inst_all)
et_instance_db = DATA(lt_inst_db_all) ).
" Get Contacts
DATA(lt_contact_reference) = get_contact_nodes( io_read = io_read
it_root_key = it_root_key ).
" Run Delete Logic
" add tier-contacts to delete list
" Tier-Contacts are not located under the tier, but only contain a reference to the tier!!
LOOP AT VALUE /bobf/t_frw_key( FOR tier IN lt_tier_all WHERE ( parent_key = is_parameters-key )
FOR cont_ref IN lt_contact_reference WHERE ( hec_contact_ref_node_key = tier-hec_node_tier )
( key = cont_ref-key ) ) INTO DATA(ls_key).
INSERT VALUE #( node = /hec1/if_configuration_c=>sc_node-contact_reference
change_mode = /bobf/if_frw_c=>sc_modify_delete
key = ls_key-key ) INTO TABLE ct_modification.
ENDLOOP.
" add the current selection to delete
io_read->retrieve( EXPORTING iv_node = lv_node
it_key = VALUE #( ( key = is_parameters-key ) )
iv_fill_data = abap_false
IMPORTING et_failed_key = DATA(lt_failed_key) ).
IF lt_failed_key IS INITIAL.
INSERT VALUE #( node = lv_node
change_mode = /bobf/if_frw_c=>sc_modify_delete
key = is_parameters-key ) INTO TABLE ct_modification.
ENDIF.
ENDMETHOD.
METHOD delete_tier.
DATA: lt_connectivity TYPE /hec1/t_data_connectivity_ct.
DATA(lv_node) = /hec1/if_configuration_c=>sc_node-tier.
" Get Data
" Get Multitenancy nodes
get_multitenancy_nodes( EXPORTING io_read = io_read
it_root_key = it_root_key
IMPORTING et_solution = DATA(lt_solution_all)
et_tier = DATA(lt_tier_all)
et_db_server_instance = DATA(lt_db_serv_inst_all)
et_instance_db = DATA(lt_inst_db_all) ).
" Get Contacts
DATA(lt_contact_reference) = get_contact_nodes( io_read = io_read
it_root_key = it_root_key ).
" Run Delete Logic
" add tier-contacts to delete list
" Tier-Contacts are not located under the tier, but only contain a reference to the tier!!
LOOP AT VALUE /bobf/t_frw_key( FOR tier IN lt_tier_all WHERE ( key = is_parameters-key )
FOR cont_ref IN lt_contact_reference WHERE ( hec_contact_ref_node_key = tier-hec_node_tier )
( key = cont_ref-key ) ) INTO DATA(ls_key).
INSERT VALUE #( node = /hec1/if_configuration_c=>sc_node-contact_reference
change_mode = /bobf/if_frw_c=>sc_modify_delete
key = ls_key-key ) INTO TABLE ct_modification.
ENDLOOP.
" Get node that needs to be deleted
TRY.
DATA(ls_tier) = lt_tier_all[ key = is_parameters-key ].
INSERT VALUE #( node = /hec1/if_configuration_c=>sc_node-tier
change_mode = /bobf/if_frw_c=>sc_modify_delete
key = ls_tier-key ) INTO TABLE ct_modification.
" 1. Delete Related Tier
IF ls_tier-hec_related_stack_guid IS NOT INITIAL.
io_read->retrieve_by_association( EXPORTING iv_node = /hec1/if_configuration_c=>sc_node-solution
it_key = VALUE #( ( key = ls_tier-parent_key ) )
iv_fill_data = abap_true
iv_association = /hec1/if_configuration_c=>sc_association-solution-tier
IMPORTING et_data = lt_tier_all ).
LOOP AT lt_tier_all ASSIGNING FIELD-SYMBOL(<fs_tier_all>)
WHERE hec_related_stack_guid = ls_tier-hec_related_stack_guid.
INSERT VALUE #( node = /hec1/if_configuration_c=>sc_node-tier
change_mode = /bobf/if_frw_c=>sc_modify_delete
key = <fs_tier_all>-key ) INTO TABLE ct_modification.
ENDLOOP.
ENDIF. "related stack guid not initial.
CATCH cx_sy_itab_line_not_found.
ENDTRY.
" Add Parent Node to Update List
INSERT VALUE #( key = ls_tier-parent_key ) INTO TABLE et_act_param_solution.
" add the current selection to delete
io_read->retrieve( EXPORTING iv_node = lv_node
it_key = VALUE #( ( key = is_parameters-key ) )
iv_fill_data = abap_false
IMPORTING et_failed_key = data(lt_failed_key) ).
IF lt_failed_key IS INITIAL.
INSERT VALUE #( node = lv_node
change_mode = /bobf/if_frw_c=>sc_modify_delete
key = is_parameters-key ) INTO TABLE ct_modification.
ENDIF.
ENDMETHOD.
METHOD get_contact_nodes.
io_read->retrieve_by_association( EXPORTING iv_node = /hec1/if_configuration_c=>sc_node-root
it_key = it_root_key
iv_association = /hec1/if_configuration_c=>sc_association-root-contact
IMPORTING et_target_key = DATA(lt_contact_key) ).
io_read->retrieve_by_association( EXPORTING iv_node = /hec1/if_configuration_c=>sc_node-contact
it_key = lt_contact_key
iv_fill_data = abap_true
iv_association = /hec1/if_configuration_c=>sc_association-contact-contact_reference
IMPORTING et_data = rt_contact_reference ).
ENDMETHOD.
METHOD get_multitenancy_nodes.
"all solutions (needed for multitenancy)
io_read->retrieve_by_association( EXPORTING iv_node = /hec1/if_configuration_c=>sc_node-root
it_key = it_root_key
iv_fill_data = abap_true
iv_association = /hec1/if_configuration_c=>sc_association-root-solution
IMPORTING et_data = et_solution
et_target_key = DATA(lt_solution_key) ).
"all tiers
io_read->retrieve_by_association( EXPORTING iv_node = /hec1/if_configuration_c=>sc_node-solution
it_key = lt_solution_key
iv_fill_data = abap_true
iv_association = /hec1/if_configuration_c=>sc_association-solution-tier
IMPORTING et_data = et_tier
et_target_key = DATA(lt_tier_key) ).
"all DB Server Instance
io_read->retrieve_by_association( EXPORTING iv_node = /hec1/if_configuration_c=>sc_node-tier
it_key = lt_tier_key
iv_fill_data = abap_true
iv_association = /hec1/if_configuration_c=>sc_association-tier-db_server_instance
IMPORTING et_data = et_db_server_instance
et_target_key = DATA(lt_db_si_key) ).
"all Instance DBs
io_read->retrieve_by_association( EXPORTING iv_node = /hec1/if_configuration_c=>sc_node-db_server_instance
it_key = lt_db_si_key
iv_fill_data = abap_true
iv_association = /hec1/if_configuration_c=>sc_association-db_server_instance-instance_db
IMPORTING et_data = et_instance_db ).
ENDMETHOD.
ENDCLASS.
| [
4871,
1220,
39,
2943,
16,
14,
5097,
62,
10943,
16254,
62,
10659,
62,
35,
3698,
62,
39,
3698,
18973,
6770,
198,
220,
1171,
198,
220,
2457,
198,
220,
2251,
1171,
764,
198,
198,
11377,
2665,
13,
628,
220,
20314,
1220,
39,
2943,
16,
14,
5064,
62,
33,
3185,
37,
62,
10659,
62,
35,
3698,
62,
39,
3698,
18973,
764,
198,
24326,
2665,
13,
198,
19734,
2665,
13,
628,
220,
1398,
12,
24396,
82,
5550,
2538,
9328,
62,
29266,
17941,
1847,
62,
35009,
27389,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
9399,
62,
15675,
2099,
1006,
284,
1220,
8202,
29499,
14,
5064,
62,
10913,
54,
62,
15675,
198,
220,
220,
220,
220,
220,
5145,
2043,
62,
13252,
2394,
62,
20373,
2099,
1220,
8202,
29499,
14,
51,
62,
10913,
54,
62,
20373,
198,
220,
220,
220,
220,
220,
5145,
1797,
62,
27082,
2390,
2767,
4877,
2099,
1220,
39,
2943,
16,
14,
50,
62,
10659,
62,
7206,
2538,
9328,
62,
45,
16820,
198,
220,
220,
220,
39133,
198,
220,
220,
220,
220,
220,
5145,
2767,
62,
10659,
62,
27082,
2390,
62,
50,
3535,
35354,
2099,
1220,
8202,
29499,
14,
51,
62,
10913,
54,
62,
20373,
198,
220,
220,
220,
5609,
198,
220,
220,
220,
220,
220,
5145,
4177,
62,
33365,
30643,
6234,
2099,
1220,
8202,
29499,
14,
51,
62,
10913,
54,
62,
33365,
30643,
6234,
764,
198,
220,
1398,
12,
24396,
82,
5550,
2538,
9328,
62,
24805,
62,
35009,
5959,
62,
38604,
19240,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
9399,
62,
15675,
2099,
1006,
284,
1220,
8202,
29499,
14,
5064,
62,
10913,
54,
62,
15675,
198,
220,
220,
220,
220,
220,
5145,
2043,
62,
13252,
2394,
62,
20373,
2099,
1220,
8202,
29499,
14,
51,
62,
10913,
54,
62,
20373,
198,
220,
220,
220,
220,
220,
5145,
1797,
62,
27082,
2390,
2767,
4877,
2099,
1220,
39,
2943,
16,
14,
50,
62,
10659,
62,
7206,
2538,
9328,
62,
45,
16820,
198,
220,
220,
220,
39133,
198,
220,
220,
220,
220,
220,
5145,
2767,
62,
10659,
62,
27082,
2390,
62,
25621,
1137,
2099,
1220,
39,
2943,
16,
14,
51,
62,
10659,
62,
16977,
62,
25621,
1137,
198,
220,
220,
220,
5609,
198,
220,
220,
220,
220,
220,
5145,
4177,
62,
33365,
30643,
6234,
2099,
1220,
8202,
29499,
14,
51,
62,
10913,
54,
62,
33365,
30643,
6234,
764,
198,
220,
1398,
12,
24396,
82,
5550,
2538,
9328,
62,
24805,
62,
35009,
53,
62,
18973,
37,
62,
34,
1404,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
9399,
62,
15675,
2099,
1006,
284,
1220,
8202,
29499,
14,
5064,
62,
10913,
54,
62,
15675,
198,
220,
220,
220,
220,
220,
5145,
2043,
62,
13252,
2394,
62,
20373,
2099,
1220,
8202,
29499,
14,
51,
62,
10913,
54,
62,
20373,
198,
220,
220,
220,
220,
220,
5145,
1797,
62,
27082,
2390,
2767,
4877,
2099,
1220,
39,
2943,
16,
14,
50,
62,
10659,
62,
7206,
2538,
9328,
62,
45,
16820,
198,
220,
220,
220,
39133,
198,
220,
220,
220,
220,
220,
5145,
2767,
62,
10659,
62,
27082,
2390,
62,
24805,
62,
35009,
53,
62,
5662,
2099,
1220,
39,
2943,
16,
14,
51,
62,
10659,
62,
16977,
62,
24805,
62,
35009,
53,
62,
5662,
198,
220,
220,
220,
220,
220,
5145,
2767,
62,
10659,
62,
27082,
2390,
62,
24805,
62,
45,
16820,
2099,
1220,
8202,
29499,
14,
51,
62,
10913,
54,
62,
20373,
198,
220,
220,
220,
5609,
198,
220,
220,
220,
220,
220,
5145,
4177,
62,
33365,
30643,
6234,
2099,
1220,
8202,
29499,
14,
51,
62,
10913,
54,
62,
33365,
30643,
6234,
764,
198,
220,
1398,
12,
24396,
82,
5550,
2538,
9328,
62,
24805,
62,
2257,
1581,
11879,
62,
2390,
28270,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
9399,
62,
15675,
2099,
1006,
284,
1220,
8202,
29499,
14,
5064,
62,
10913,
54,
62,
15675,
198,
220,
220,
220,
220,
220,
5145,
2043,
62,
13252,
2394,
62,
20373,
2099,
1220,
8202,
29499,
14,
51,
62,
10913,
54,
62,
20373,
198,
220,
220,
220,
220,
220,
5145,
1797,
62,
27082,
2390,
2767,
4877,
2099,
1220,
39,
2943,
16,
14,
50,
62,
10659,
62,
7206,
2538,
9328,
62,
45,
16820,
198,
220,
220,
220,
39133,
198,
220,
220,
220,
220,
220,
5145,
2767,
62,
10659,
62,
27082,
2390,
62,
24805,
62,
2257,
1581,
11879,
2099,
1220,
8202,
29499,
14,
51,
62,
10913,
54,
62,
20373,
198,
220,
220,
220,
220,
220,
5145,
2767,
62,
10659,
62,
27082,
2390,
62,
24805,
62,
2257,
1581,
11879,
62,
48,
9936,
2099,
1220,
39,
2943,
16,
14,
51,
62,
10659,
62,
16977,
62,
24805,
62,
18601,
38,
48,
9936,
198,
220,
220,
220,
220,
220,
5145,
2767,
62,
10659,
62,
27082,
2390,
62,
24805,
62,
35009,
53,
62,
5662,
2099,
1220,
39,
2943,
16,
14,
51,
62,
10659,
62,
16977,
62,
24805,
62,
35009,
53,
62,
5662,
198,
220,
220,
220,
5609,
198,
220,
220,
220,
220,
220,
5145,
4177,
62,
33365,
30643,
6234,
2099,
1220,
8202,
29499,
14,
51,
62,
10913,
54,
62,
33365,
30643,
6234,
764,
198,
220,
1398,
12,
24396,
82,
5550,
2538,
9328,
62,
24805,
62,
2257,
1581,
11879,
62,
31098,
8577,
198,
220,
220,
220,
33332,
198,
220,
220,
220,
220,
220,
5145,
9399,
62,
15675,
2099,
1006,
284,
1220,
8202,
29499,
14,
5064,
62,
10913,
54,
62,
15675,
198,
220,
220,
220,
220,
220,
5145,
2043,
62,
13252,
2394,
62,
20373,
2099,
1220,
8202,
29499,
14,
51,
62,
10913,
54,
62,
20373,
198,
220,
220,
220,
220,
220,
5145,
1797,
62,
27082,
2390,
2767,
4877,
2099,
1220,
39,
2943,
16,
14,
50,
62,
10659,
62,
7206,
2538,
9328,
62,
45,
16820,
198,
220,
220,
220,
39133,
198,
220,
220,
220,
220,
220,
5145,
2767,
62,
10659,
62,
27082,
2390,
62,
24805,
62,
2257,
1581,
11879,
2099,
1220,
8202,
29499,
14,
51,
62,
10913,
54,
62,
20373,
198,
220,
220,
220,
220,
220,
5145,
2767,
62,
10659,
62,
27082,
2390,
62,
24805,
62,
31098,
8577,
2099,
1220,
39,
2943,
16,
14,
51,
62,
10659,
62,
16977,
62,
24805,
62,
31098,
8577,
198,
220,
220,
220,
5609,
198,
220,
220,
220,
220,
220,
5145,
4177,
62,
33365,
30643,
6234
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
"! <h1>API for Deleting a Travel</h1>
"!
"! <p>
"! Function module to delete a single Travel instance.
"! It will also delete all related subnodes of Booking and Booking Supplement.
"! </p>
"!
"! @parameter iv_travel_id | ID of the Travel to be deleted
"! @parameter et_messages | Table of occurred messages
"!
FUNCTION /DMO/FLIGHT_TRAVEL_DELETE08.
*"----------------------------------------------------------------------
*"*"Local Interface:
*" IMPORTING
*" REFERENCE(IV_TRAVEL_ID) TYPE /DMO/TRAVEL_ID08
*" EXPORTING
*" REFERENCE(ET_MESSAGES) TYPE /DMO/IF_FLIGHT_LEGACY08=>TT_MESSAGE
*"----------------------------------------------------------------------
CLEAR et_messages.
/dmo/cl_flight_legacy08=>get_instance( )->delete_travel( EXPORTING iv_travel_id = iv_travel_id
IMPORTING et_messages = DATA(lt_messages) ).
/dmo/cl_flight_legacy08=>get_instance( )->convert_messages( EXPORTING it_messages = lt_messages
IMPORTING et_messages = et_messages ).
ENDFUNCTION.
| [
40484,
1279,
71,
16,
29,
17614,
329,
42226,
889,
257,
13524,
3556,
71,
16,
29,
198,
40484,
198,
40484,
1279,
79,
29,
198,
40484,
15553,
8265,
284,
12233,
257,
2060,
13524,
4554,
13,
198,
40484,
632,
481,
635,
12233,
477,
3519,
850,
77,
4147,
286,
4897,
278,
290,
4897,
278,
23150,
13,
198,
40484,
7359,
79,
29,
198,
40484,
198,
40484,
2488,
17143,
2357,
21628,
62,
35927,
62,
312,
220,
220,
220,
220,
220,
220,
220,
220,
220,
930,
4522,
286,
262,
13524,
284,
307,
13140,
198,
40484,
2488,
17143,
2357,
2123,
62,
37348,
1095,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
930,
8655,
286,
5091,
6218,
198,
40484,
198,
42296,
4177,
2849,
1220,
35,
11770,
14,
3697,
9947,
62,
51,
3861,
18697,
62,
7206,
2538,
9328,
2919,
13,
198,
9,
1,
10097,
23031,
198,
9,
1,
9,
1,
14565,
26491,
25,
198,
9,
1,
220,
30023,
9863,
2751,
198,
9,
1,
220,
220,
220,
220,
4526,
24302,
18310,
7,
3824,
62,
51,
3861,
18697,
62,
2389,
8,
41876,
220,
1220,
35,
11770,
14,
51,
3861,
18697,
62,
2389,
2919,
198,
9,
1,
220,
7788,
15490,
2751,
198,
9,
1,
220,
220,
220,
220,
4526,
24302,
18310,
7,
2767,
62,
44,
1546,
4090,
48075,
8,
41876,
220,
1220,
35,
11770,
14,
5064,
62,
3697,
9947,
62,
2538,
38,
43300,
2919,
14804,
15751,
62,
44,
1546,
4090,
8264,
198,
9,
1,
10097,
23031,
198,
220,
30301,
1503,
2123,
62,
37348,
1095,
13,
628,
220,
1220,
67,
5908,
14,
565,
62,
22560,
62,
1455,
1590,
2919,
14804,
1136,
62,
39098,
7,
1267,
3784,
33678,
62,
35927,
7,
7788,
15490,
2751,
21628,
62,
35927,
62,
312,
796,
21628,
62,
35927,
62,
312,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
30023,
9863,
2751,
2123,
62,
37348,
1095,
220,
796,
42865,
7,
2528,
62,
37348,
1095,
8,
6739,
628,
220,
1220,
67,
5908,
14,
565,
62,
22560,
62,
1455,
1590,
2919,
14804,
1136,
62,
39098,
7,
1267,
3784,
1102,
1851,
62,
37348,
1095,
7,
7788,
15490,
2751,
340,
62,
37348,
1095,
796,
300,
83,
62,
37348,
1095,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
30023,
9863,
2751,
2123,
62,
37348,
1095,
796,
2123,
62,
37348,
1095,
6739,
198,
1677,
8068,
4944,
4177,
2849,
13,
198
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
CLASS ycl_a2g_json_pivotgrpvalmeta DEFINITION
PUBLIC
INHERITING FROM ycl_a2g_jsonbase
CREATE PUBLIC .
PUBLIC SECTION.
"! Build the class
"! @parameter if_msg_manager | message managere where soter alla message triggered by the applicaition
METHODS constructor
IMPORTING if_msg_manager TYPE REF TO yif_a2g_msg_manager.
TYPES: BEGIN OF ty_s_json_pivotgrpvalmeta,
value TYPE ycl_a2g_json_extendedvalue=>ty_s_json_extendedvalue,
collapsed TYPE string,
END OF ty_s_json_pivotgrpvalmeta.
TYPES ty_t_json_pivotgrpvalmeta TYPE STANDARD TABLE OF ty_s_json_pivotgrpvalmeta WITH NON-UNIQUE DEFAULT KEY.
PROTECTED SECTION.
METHODS generate_rules REDEFINITION.
METHODS rebuild_data REDEFINITION.
METHODS push_data REDEFINITION.
DATA: gs_pivotgrpvalmeta TYPE ty_s_json_pivotgrpvalmeta.
PRIVATE SECTION.
ENDCLASS.
CLASS ycl_a2g_json_pivotgrpvalmeta IMPLEMENTATION.
METHOD push_data.
ENDMETHOD.
METHOD rebuild_data.
ENDMETHOD.
METHOD constructor.
super->constructor( if_msg_manager ).
me->gv_data = REF #( me->gs_pivotgrpvalmeta ).
ENDMETHOD.
METHOD generate_rules.
ENDMETHOD.
ENDCLASS.
| [
31631,
331,
565,
62,
64,
17,
70,
62,
17752,
62,
79,
45785,
2164,
79,
2100,
28961,
5550,
20032,
17941,
198,
220,
44731,
198,
3268,
16879,
2043,
2751,
16034,
331,
565,
62,
64,
17,
70,
62,
17752,
8692,
198,
220,
29244,
6158,
44731,
764,
628,
220,
44731,
44513,
13,
628,
220,
220,
220,
366,
0,
10934,
262,
1398,
198,
220,
220,
220,
366,
0,
2488,
17143,
2357,
611,
62,
19662,
62,
37153,
930,
3275,
6687,
260,
810,
264,
19543,
477,
64,
3275,
13973,
416,
262,
2161,
64,
653,
198,
220,
220,
220,
337,
36252,
50,
23772,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
611,
62,
19662,
62,
37153,
41876,
4526,
37,
5390,
331,
361,
62,
64,
17,
70,
62,
19662,
62,
37153,
13,
628,
220,
220,
220,
24412,
47,
1546,
25,
347,
43312,
3963,
1259,
62,
82,
62,
17752,
62,
79,
45785,
2164,
79,
2100,
28961,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1988,
220,
220,
220,
220,
41876,
331,
565,
62,
64,
17,
70,
62,
17752,
62,
2302,
1631,
8367,
14804,
774,
62,
82,
62,
17752,
62,
2302,
1631,
8367,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
14707,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
23578,
3963,
1259,
62,
82,
62,
17752,
62,
79,
45785,
2164,
79,
2100,
28961,
13,
198,
220,
220,
220,
24412,
47,
1546,
1259,
62,
83,
62,
17752,
62,
79,
45785,
2164,
79,
2100,
28961,
41876,
49053,
9795,
43679,
3963,
1259,
62,
82,
62,
17752,
62,
79,
45785,
2164,
79,
2100,
28961,
13315,
44521,
12,
4944,
33866,
8924,
5550,
38865,
35374,
13,
628,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
220,
220,
337,
36252,
50,
7716,
62,
38785,
23848,
36,
20032,
17941,
13,
198,
220,
220,
220,
337,
36252,
50,
17884,
62,
7890,
220,
220,
23848,
36,
20032,
17941,
13,
198,
220,
220,
220,
337,
36252,
50,
4574,
62,
7890,
220,
220,
220,
220,
220,
23848,
36,
20032,
17941,
13,
628,
220,
220,
220,
42865,
25,
308,
82,
62,
79,
45785,
2164,
79,
2100,
28961,
220,
41876,
1259,
62,
82,
62,
17752,
62,
79,
45785,
2164,
79,
2100,
28961,
13,
198,
220,
4810,
3824,
6158,
44513,
13,
198,
10619,
31631,
13,
628,
198,
198,
31631,
331,
565,
62,
64,
17,
70,
62,
17752,
62,
79,
45785,
2164,
79,
2100,
28961,
30023,
2538,
10979,
6234,
13,
198,
220,
337,
36252,
4574,
62,
7890,
13,
198,
220,
23578,
49273,
13,
628,
220,
337,
36252,
17884,
62,
7890,
13,
198,
220,
23578,
49273,
13,
628,
220,
337,
36252,
23772,
13,
198,
220,
220,
220,
2208,
3784,
41571,
273,
7,
611,
62,
19662,
62,
37153,
6739,
198,
220,
220,
220,
502,
3784,
70,
85,
62,
7890,
796,
4526,
37,
1303,
7,
502,
3784,
14542,
62,
79,
45785,
2164,
79,
2100,
28961,
220,
6739,
198,
220,
23578,
49273,
13,
628,
220,
337,
36252,
7716,
62,
38785,
13,
198,
220,
23578,
49273,
13,
198,
10619,
31631,
13,
198
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
class YCX_SIMBAL_LOG definition
public
inheriting from CX_STATIC_CHECK
create public .
public section.
interfaces IF_T100_DYN_MSG .
interfaces IF_T100_MESSAGE .
constants:
begin of OBJECT_UNDEFINED,
msgid type symsgid value 'YSIMBAL',
msgno type symsgno value '000',
attr1 type scx_attrname value 'OBJECT',
attr2 type scx_attrname value '',
attr3 type scx_attrname value '',
attr4 type scx_attrname value '',
end of OBJECT_UNDEFINED .
constants:
begin of CANT_CREATE_INSTANCE,
msgid type symsgid value 'YSIMBAL',
msgno type symsgno value '001',
attr1 type scx_attrname value 'OBJECT',
attr2 type scx_attrname value 'SUBOBJECT',
attr3 type scx_attrname value '',
attr4 type scx_attrname value '',
end of CANT_CREATE_INSTANCE .
constants:
begin of SUBOBJECT_UNDEFINED,
msgid type symsgid value 'YSIMBAL',
msgno type symsgno value '002',
attr1 type scx_attrname value 'OBJECT',
attr2 type scx_attrname value 'SUBOBJECT',
attr3 type scx_attrname value '',
attr4 type scx_attrname value '',
end of SUBOBJECT_UNDEFINED .
constants:
begin of ADD_MESSAGE_ERROR,
msgid type symsgid value 'YSIMBAL',
msgno type symsgno value '005',
attr1 type scx_attrname value '',
attr2 type scx_attrname value '',
attr3 type scx_attrname value '',
attr4 type scx_attrname value '',
end of ADD_MESSAGE_ERROR .
constants:
begin of CANT_CREATE_OBJECT,
msgid type symsgid value 'YSIMBAL',
msgno type symsgno value '007',
attr1 type scx_attrname value '',
attr2 type scx_attrname value '',
attr3 type scx_attrname value '',
attr4 type scx_attrname value '',
end of CANT_CREATE_OBJECT .
constants:
begin of CANT_SAVE,
msgid type symsgid value 'YSIMBAL',
msgno type symsgno value '004',
attr1 type scx_attrname value 'OBJECT',
attr2 type scx_attrname value 'SUBOBJECT',
attr3 type scx_attrname value '',
attr4 type scx_attrname value '',
end of CANT_SAVE .
constants:
begin of CANT_DISPLAY,
msgid type symsgid value 'YSIMBAL',
msgno type symsgno value '008',
attr1 type scx_attrname value 'OBJECT',
attr2 type scx_attrname value 'SUBOBJECT',
attr3 type scx_attrname value '',
attr4 type scx_attrname value '',
end of CANT_DISPLAY .
data OBJECT type BALOBJ_D .
data SUBOBJECT type BALSUBOBJ .
methods CONSTRUCTOR
importing
!TEXTID like IF_T100_MESSAGE=>T100KEY optional
!PREVIOUS like PREVIOUS optional
!OBJECT type BALOBJ_D optional
!SUBOBJECT type BALSUBOBJ optional .
protected section.
private section.
ENDCLASS.
CLASS YCX_SIMBAL_LOG IMPLEMENTATION.
method CONSTRUCTOR.
CALL METHOD SUPER->CONSTRUCTOR
EXPORTING
PREVIOUS = PREVIOUS
.
me->OBJECT = OBJECT .
me->SUBOBJECT = SUBOBJECT .
clear me->textid.
if textid is initial.
IF_T100_MESSAGE~T100KEY = IF_T100_MESSAGE=>DEFAULT_TEXTID.
else.
IF_T100_MESSAGE~T100KEY = TEXTID.
endif.
endmethod.
ENDCLASS.
| [
4871,
575,
34,
55,
62,
48913,
33,
1847,
62,
25294,
6770,
198,
220,
1171,
198,
220,
10639,
1780,
422,
327,
55,
62,
35744,
2149,
62,
50084,
198,
220,
2251,
1171,
764,
198,
198,
11377,
2665,
13,
628,
220,
20314,
16876,
62,
51,
3064,
62,
35,
40760,
62,
5653,
38,
764,
198,
220,
20314,
16876,
62,
51,
3064,
62,
44,
1546,
4090,
8264,
764,
628,
220,
38491,
25,
198,
220,
220,
220,
2221,
286,
25334,
23680,
62,
4944,
7206,
20032,
1961,
11,
198,
220,
220,
220,
220,
220,
31456,
312,
2099,
827,
19662,
312,
1988,
705,
16309,
3955,
33,
1847,
3256,
198,
220,
220,
220,
220,
220,
31456,
3919,
2099,
827,
19662,
3919,
1988,
705,
830,
3256,
198,
220,
220,
220,
220,
220,
708,
81,
16,
2099,
629,
87,
62,
35226,
3672,
1988,
705,
9864,
23680,
3256,
198,
220,
220,
220,
220,
220,
708,
81,
17,
2099,
629,
87,
62,
35226,
3672,
1988,
705,
3256,
198,
220,
220,
220,
220,
220,
708,
81,
18,
2099,
629,
87,
62,
35226,
3672,
1988,
705,
3256,
198,
220,
220,
220,
220,
220,
708,
81,
19,
2099,
629,
87,
62,
35226,
3672,
1988,
705,
3256,
198,
220,
220,
220,
886,
286,
25334,
23680,
62,
4944,
7206,
20032,
1961,
764,
198,
220,
38491,
25,
198,
220,
220,
220,
2221,
286,
327,
8643,
62,
43387,
6158,
62,
38604,
19240,
11,
198,
220,
220,
220,
220,
220,
31456,
312,
2099,
827,
19662,
312,
1988,
705,
16309,
3955,
33,
1847,
3256,
198,
220,
220,
220,
220,
220,
31456,
3919,
2099,
827,
19662,
3919,
1988,
705,
8298,
3256,
198,
220,
220,
220,
220,
220,
708,
81,
16,
2099,
629,
87,
62,
35226,
3672,
1988,
705,
9864,
23680,
3256,
198,
220,
220,
220,
220,
220,
708,
81,
17,
2099,
629,
87,
62,
35226,
3672,
1988,
705,
12564,
8202,
33,
23680,
3256,
198,
220,
220,
220,
220,
220,
708,
81,
18,
2099,
629,
87,
62,
35226,
3672,
1988,
705,
3256,
198,
220,
220,
220,
220,
220,
708,
81,
19,
2099,
629,
87,
62,
35226,
3672,
1988,
705,
3256,
198,
220,
220,
220,
886,
286,
327,
8643,
62,
43387,
6158,
62,
38604,
19240,
764,
198,
220,
38491,
25,
198,
220,
220,
220,
2221,
286,
13558,
8202,
33,
23680,
62,
4944,
7206,
20032,
1961,
11,
198,
220,
220,
220,
220,
220,
31456,
312,
2099,
827,
19662,
312,
1988,
705,
16309,
3955,
33,
1847,
3256,
198,
220,
220,
220,
220,
220,
31456,
3919,
2099,
827,
19662,
3919,
1988,
705,
21601,
3256,
198,
220,
220,
220,
220,
220,
708,
81,
16,
2099,
629,
87,
62,
35226,
3672,
1988,
705,
9864,
23680,
3256,
198,
220,
220,
220,
220,
220,
708,
81,
17,
2099,
629,
87,
62,
35226,
3672,
1988,
705,
12564,
8202,
33,
23680,
3256,
198,
220,
220,
220,
220,
220,
708,
81,
18,
2099,
629,
87,
62,
35226,
3672,
1988,
705,
3256,
198,
220,
220,
220,
220,
220,
708,
81,
19,
2099,
629,
87,
62,
35226,
3672,
1988,
705,
3256,
198,
220,
220,
220,
886,
286,
13558,
8202,
33,
23680,
62,
4944,
7206,
20032,
1961,
764,
198,
220,
38491,
25,
198,
220,
220,
220,
2221,
286,
27841,
62,
44,
1546,
4090,
8264,
62,
24908,
11,
198,
220,
220,
220,
220,
220,
31456,
312,
2099,
827,
19662,
312,
1988,
705,
16309,
3955,
33,
1847,
3256,
198,
220,
220,
220,
220,
220,
31456,
3919,
2099,
827,
19662,
3919,
1988,
705,
22544,
3256,
198,
220,
220,
220,
220,
220,
708,
81,
16,
2099,
629,
87,
62,
35226,
3672,
1988,
705,
3256,
198,
220,
220,
220,
220,
220,
708,
81,
17,
2099,
629,
87,
62,
35226,
3672,
1988,
705,
3256,
198,
220,
220,
220,
220,
220,
708,
81,
18,
2099,
629,
87,
62,
35226,
3672,
1988,
705,
3256,
198,
220,
220,
220,
220,
220,
708,
81,
19,
2099,
629,
87,
62,
35226,
3672,
1988,
705,
3256,
198,
220,
220,
220,
886,
286,
27841,
62,
44,
1546,
4090,
8264,
62,
24908,
764,
198,
220,
38491,
25,
198,
220,
220,
220,
2221,
286,
327,
8643,
62,
43387,
6158,
62,
9864,
23680,
11,
198,
220,
220,
220,
220,
220,
31456,
312,
2099,
827,
19662,
312,
1988,
705,
16309,
3955,
33,
1847,
3256,
198,
220,
220,
220,
220,
220,
31456,
3919,
2099,
827,
19662,
3919,
1988,
705,
25816,
3256,
198,
220,
220,
220,
220,
220,
708,
81,
16,
2099,
629,
87,
62,
35226,
3672,
1988,
705,
3256,
198,
220,
220,
220,
220,
220,
708,
81,
17,
2099,
629,
87,
62,
35226,
3672,
1988,
705,
3256,
198,
220,
220,
220,
220,
220,
708,
81,
18,
2099,
629,
87,
62,
35226,
3672,
1988,
705,
3256,
198,
220,
220,
220,
220,
220,
708,
81,
19,
2099,
629,
87,
62,
35226,
3672,
1988,
705,
3256,
198,
220,
220,
220,
886,
286,
327,
8643,
62,
43387,
6158,
62,
9864,
23680,
764,
198,
220,
38491,
25,
198,
220,
220,
220,
2221,
286,
327,
8643,
62,
4090,
6089,
11,
198,
220,
220,
220,
220,
220,
31456,
312,
2099,
827,
19662,
312,
1988,
705,
16309,
3955,
33,
1847,
3256,
198,
220,
220,
220,
220,
220,
31456,
3919,
2099,
827,
19662,
3919,
1988,
705,
22914,
3256,
198,
220,
220,
220,
220,
220,
708,
81,
16,
2099,
629,
87,
62,
35226,
3672,
1988,
705,
9864,
23680,
3256,
198,
220,
220,
220,
220,
220,
708,
81,
17,
2099,
629,
87,
62,
35226,
3672,
1988,
705,
12564,
8202,
33,
23680,
3256,
198,
220,
220,
220,
220,
220,
708,
81,
18,
2099,
629,
87,
62,
35226,
3672,
1988,
705,
3256,
198,
220,
220,
220,
220,
220,
708,
81,
19,
2099,
629,
87,
62,
35226,
3672,
1988,
705,
3256,
198,
220,
220,
220,
886,
286,
327,
8643,
62,
4090,
6089,
764,
198,
220,
38491,
25,
198,
220,
220,
220,
2221,
286,
327,
8643,
62,
26288,
31519,
11,
198,
220,
220,
220,
220,
220,
31456,
312,
2099,
827,
19662,
312,
1988,
705,
16309,
3955,
33,
1847,
3256,
198,
220,
220,
220,
220,
220,
31456,
3919,
2099,
827,
19662,
3919,
1988,
705,
25257,
3256,
198,
220,
220,
220,
220,
220,
708,
81,
16,
2099,
629,
87,
62,
35226,
3672,
1988,
705,
9864,
23680,
3256,
198,
220,
220,
220,
220,
220,
708,
81,
17,
2099,
629,
87,
62,
35226,
3672,
1988,
705,
12564,
8202,
33,
23680,
3256,
198,
220,
220,
220,
220,
220,
708,
81
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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ENDINTERFACE.
CLASS lcl_agency_data_generator DEFINITION CREATE PRIVATE.
PUBLIC SECTION.
INTERFACES: lif_data_generator.
TYPES: tt_agency TYPE STANDARD TABLE OF /dmo/agency30 WITH KEY agency_id.
CLASS-METHODS: get_data
RETURNING VALUE(rt_data) TYPE tt_agency.
PROTECTED SECTION.
PRIVATE SECTION.
ENDCLASS.
CLASS lcl_agency_data_generator IMPLEMENTATION.
METHOD lif_data_generator~create.
IF out IS BOUND. out->write( '--> Delete Content.' ). ENDIF.
DELETE FROM /dmo/agency30. "#EC CI_NOWHERE
IF out IS BOUND. out->write( '--> Build Content.' ). ENDIF.
DATA(lt_data) = get_data( ).
IF out IS BOUND. out->write( '--> Insert Content.' ). ENDIF.
INSERT /dmo/agency30 FROM TABLE @lt_data.
IF out IS BOUND. out->write( '--> Done.' ). ENDIF.
ENDMETHOD.
METHOD get_data.
rt_data = VALUE tt_agency(
( agency_id = '070001'
name = 'Sunshine Travel'
street = '134 West Street '
postal_code = '54323 '
city = 'Rochester '
country_code = 'US '
phone_number = '+1 901-632-5620 '
web_address = 'http://www.sunshine-travel.sap '
email_address = '[email protected] '
)
( agency_id = '070002'
name = 'Fly High'
street = 'Berliner Allee 11 '
postal_code = '40880 '
city = 'Duesseldorf '
country_code = 'DE '
phone_number = '+49 2102 69555 '
web_address = 'http://www.flyhigh.sap '
email_address = '[email protected] '
)
( agency_id = '070003'
name = 'Happy Hopping'
street = 'Calvinstr. 36 '
postal_code = '13467 '
city = 'Berlin '
country_code = 'DE '
phone_number = '+49 30-8853-0 '
web_address = 'http://www.haphop.sap '
email_address = '[email protected] '
)
( agency_id = '070004'
name = 'Pink Panther'
street = 'Auf der Schanz 54 '
postal_code = '65936 '
city = 'Frankfurt '
country_code = 'DE '
phone_number = '+49 69-467653-0 '
web_address = 'http://www.pinkpanther.sap'
email_address = '[email protected] '
)
( agency_id = '070005'
name = 'Your Choice'
street = 'Gustav-Jung-Str. 425 '
postal_code = '90455'
city = 'Nuernberg'
country_code = 'DE'
phone_number = '+49 9256-4548-0'
web_address = 'http://www.yc.sap'
email_address = '[email protected]'
)
( agency_id = '070006'
name = 'Bella Italia'
street = 'Via Marconi 123'
postal_code = '00139'
city = 'Roma'
country_code = 'IT'
phone_number = '+39 6 893546721'
web_address = 'http://www.tours.it/Adventure/'
email_address = '[email protected]/Adventure/'
)
( agency_id = '070007'
name = 'Hot Socks Travel'
street = '224 Balnagask Rd '
postal_code = '8053 '
city = 'Sydney'
country_code = 'AU '
phone_number = '+61 2 2004 5000 '
web_address = 'http://www.hst.co.au'
email_address = '[email protected]'
)
( agency_id = '070008'
name = 'Burns Nuclear'
street = '14 Science Park Drive'
postal_code = '118228'
city = 'Singapore'
country_code = 'SG'
phone_number = '+65 777-5566'
web_address = 'http://www.burns-burns-burns.sg'
email_address = '[email protected]'
)
( agency_id = '070009'
name = 'Honauer Reisen GmbH'
street = 'Baumgarten 8'
postal_code = '4212'
city = 'Neumarkt'
country_code = 'AT'
phone_number = '+43 7941 8903'
web_address = 'http://www.honauer.at'
email_address = '[email protected]'
)
( agency_id = '070010'
name = 'Travel from Walldorf'
street = 'Altonaer Str. 24 '
postal_code = '10557 '
city = 'Berlin '
country_code = 'DE '
phone_number = '+49 30-622860 '
web_address = 'http://www.travel-from-walldorf'
email_address = 'info@travel-from-walldorf'
)
( agency_id = '070011'
name = 'Voyager Enterprises'
street = 'Gustavslundsvaegen 151'
postal_code = '70563 '
city = 'Stockholm '
country_code = 'SE '
phone_number = '+46 8/ 587 70000'
web_address = 'http://www.starfleet.ufp'
email_address = '[email protected]'
)
( agency_id = '070012'
name = 'Ben McCloskey Ltd.'
street = '74 Court Oak Rd'
postal_code = 'B17 9TN'
city = 'Birmingham'
country_code = 'GB'
phone_number = '+44 121 365-2251 '
web_address = 'http://www.ben-mcCloskey.co.uk'
email_address = '[email protected]'
)
( agency_id = '070013'
name = 'Pillepalle Trips'
street = 'Gorki Park 4 '
postal_code = '8008 '
city = 'Zuerich '
country_code = 'CH '
phone_number = '+41 1 345-5321 '
web_address = 'http://www.pi-pa-tri.sap'
email_address = '[email protected]'
)
( agency_id = '070014'
name = 'Kangeroos'
street = 'Lancaster drive 435 '
postal_code = '20001 '
city = 'London '
country_code = 'GB '
phone_number = '+44 171-2937638 '
web_address = 'http://www.hopp.sap '
email_address = '[email protected] '
)
( agency_id = '070015'
name = 'Bavarian Castle'
street = 'Pilnizerstr. 241 '
postal_code = '01069 '
city = 'Dresden '
country_code = 'DE '
phone_number = '+49 98-32832732 '
web_address = 'http://www.neu.schwanstein.sap '
email_address = '[email protected] '
)
( agency_id = '070016'
name = 'Ali''s Bazar'
street = '45, Mac Arthur Boulevard '
postal_code = '19113 '
city = 'Boston '
country_code = 'US '
phone_number = '+1 508-692-5200 '
web_address = 'http://www.ali.sap '
email_address = '[email protected] '
)
( agency_id = '070017'
name = 'Super Agency'
street = '50 Cranworth St'
postal_code = 'G12 8AG'
city = 'Glasgow'
country_code = 'GB'
phone_number = '+44 141 711-5643'
web_address = 'http://www.super.sap'
email_address = '[email protected]'
)
( agency_id = '070018'
name = 'Wang Chong'
street = 'Gagarine Park '
postal_code = '150021 '
city = 'Moscow '
country_code = 'RU '
phone_number = '+7 3287-213321 '
web_address = 'http://www.wang.chong.sap'
email_address = '[email protected]'
)
( agency_id = '070019'
name = 'Around the World'
street = 'An der Breiten Wiese 122 '
postal_code = '30625 '
city = 'Hannover '
country_code = 'DE '
phone_number = '+49 511-347589-0 '
web_address = 'http://www.atw.sap'
email_address = '[email protected]'
)
( agency_id = '070020'
name = 'No Return'
street = 'Wahnheider Str. 57 '
postal_code = '51105 '
city = 'Koeln '
country_code = 'DE '
phone_number = '+49 221-5689-100 '
web_address = 'http://www.bye-bye.sap '
email_address = '[email protected] '
)
( agency_id = '070021'
name = 'Special Agency Peru'
street = 'Triberger Str. 42 '
postal_code = '70569 '
city = 'Stuttgart '
country_code = 'DE '
phone_number = '+49 711-7100 '
web_address = 'http://www.sap.com '
email_address = '[email protected] '
)
( agency_id = '070022'
name = 'Caribian Dreams'
street = 'Deichstrasse 45 '
postal_code = '26721 '
city = 'Emden '
country_code = 'DE '
phone_number = '+49 2670-8560-0 '
web_address = 'http://www.cuba-libre.sap '
email_address = '[email protected] '
)
( agency_id = '070023'
name = 'Asia By Plane'
street = '6-9 Iidabashi 7-chome'
postal_code = '102-0072'
city = 'Tokyo '
country_code = 'JP'
phone_number = '+81 3-3239-3501 '
web_address = 'http://www.asia-by-plane.co.jp'
email_address = '[email protected]'
)
( agency_id = '070024'
name = 'Everywhere'
street = 'Regensburger Platz 23 '
postal_code = '81679 '
city = 'Muenchen '
country_code = 'DE '
phone_number = '+49 89-2499239 '
web_address = 'http://www.everywhere.sap'
email_address = '[email protected]'
)
( agency_id = '070025'
name = 'Happy Holiday'
street = 'Rastenburger Str. 12'
postal_code = '28779 '
city = 'Bremen '
country_code = 'DE '
phone_number = '+49 3266-288817 '
web_address = 'http://www.haphol.sap'
email_address = '[email protected]'
)
( agency_id = '070026'
name = 'No Name'
street = 'Schwalbenweg 43 '
postal_code = '52078 '
city = 'Aachen '
country_code = 'DE '
phone_number = '+49 241-77729 '
web_address = 'http://www.nn.sap'
email_address = '[email protected]'
)
( agency_id = '070027'
name = 'Fly Low'
street = 'Chemnitzer Str. 42 '
postal_code = '01187 '
city = 'Dresden '
country_code = 'DE '
phone_number = '+49 351-5423-00 '
web_address = 'http://www.fly-low.sap'
email_address = '[email protected]'
)
( agency_id = '070028'
name = 'Aussie Travel'
street = 'Queens Road '
postal_code = 'M8 7RYP '
city = 'Manchester '
country_code = 'GB '
phone_number = '+44 161 2052000 '
web_address = 'http://www.down-under.sap'
email_address = '[email protected]'
)
( agency_id = '070029'
name = 'Up ''n'' Away'
street = 'Nackenbergerstr. 92 '
postal_code = '30625 '
city = 'Hannover '
country_code = 'DE '
phone_number = '+49 511 403266-0 '
web_address = 'http://www.una.sap '
email_address = '[email protected] '
)
( agency_id = '070030'
name = 'Trans World Travel'
street = '100 Industrial Drive '
postal_code = '60804 '
city = 'Chicago '
country_code = 'US '
phone_number = '+1 708-454-8723 '
web_address = 'http://www.twt.sap '
email_address = '[email protected] '
)
( agency_id = '070031'
name = 'Bright Side of Life'
street = '340 State Street '
postal_code = '30432 '
city = 'San Francisco '
country_code = 'US '
phone_number = '+1 415-454-9877 '
web_address = 'http://www.ruebennase.sap '
email_address = '[email protected] '
)
( agency_id = '070032'
name = 'Sunny, Sunny, Sunny'
street = '1300 State Street '
postal_code = '19003 '
city = 'Philadelphia '
country_code = 'US '
phone_number = '+1 215-090-7659 '
web_address = 'http://www.s3.sap '
email_address = '[email protected] '
)
( agency_id = '070033'
name = 'Fly & Smile'
street = 'Zeppelinstr. 17 '
postal_code = '60318 '
city = 'Frankfurt '
country_code = 'DE '
phone_number = '+49 69-99-0 '
web_address = 'http://www.fly-and-smile.sap '
email_address = '[email protected] '
)
( agency_id = '070034'
name = 'Supercheap'
street = '1400, Washington Circle '
postal_code = '30439 '
city = 'Los Angeles '
country_code = 'US '
phone_number = '+1 251-369-2510 '
web_address = 'http://www.supercheap.sap '
email_address = '[email protected] '
)
( agency_id = '070035'
name = 'Hitchhiker'
street = '21 Rue de Moselle '
postal_code = '92132 '
city = 'Issy-les-Moulineaux '
country_code = 'FR '
phone_number = '+33 1-405-555-888 '
web_address = 'http://www.42.sap '
email_address = '[email protected] '
)
( agency_id = '070036'
name = 'Fly Now, Pay Later'
street = '100 Madison '
postal_code = '11012 '
city = 'New York '
country_code = 'US '
phone_number = '+1 512 343-8543 '
web_address = 'http://www.fn-pl.sap '
email_address = '[email protected] '
)
( agency_id = '070037'
name = 'Real Weird Vacation'
street = '949 5th Street '
postal_code = 'V6T 1Z4'
city = 'Vancouver'
country_code = 'CA '
phone_number = '+1 604 827-8024'
web_address = 'http://www.reweva.sap '
email_address = '[email protected] '
)
( agency_id = '070038'
name = 'Cap Travels Ltd.'
street = '10 Mandela St'
postal_code = '2128'
city = 'Johannesburg'
country_code = 'ZA'
phone_number = '+27 11 886-8981'
web_address = 'http://www.cap-travels.co.za'
email_address = '[email protected]'
)
( agency_id = '070039'
name = 'Rainy, Stormy, Cloudy'
street = 'Lindenstr. 462 '
postal_code = '70563 '
city = 'Stuttgart '
country_code = 'DE '
phone_number = '+49 711-7992-00 '
web_address = 'http://www.windy.sap/rsc/ '
email_address = '[email protected]/rsc/ '
)
( agency_id = '070040'
name = 'Women only'
street = 'Kirchstr. 53 '
postal_code = '55124 '
city = 'Mainz '
country_code = 'DE '
phone_number = '+49 6131-543-00 '
web_address = 'http://www.women-only.sap '
email_address = '[email protected] '
)
( agency_id = '070041'
name = 'Maxitrip'
street = 'Flugfeld 17'
postal_code = '65128'
city = 'Wiesbaden'
country_code = 'DE'
phone_number = '+49 611-55 66 77'
web_address = 'http://www.maxitrip.sap'
email_address = '[email protected]'
)
( agency_id = '070042'
name = 'The Ultimate Answer'
street = 'Manchester Rd 20 '
postal_code = 'AB1 1SA '
city = 'Avon '
country_code = 'GB '
phone_number = '+44 934-66799 '
web_address = 'http://www.thulan.sap '
email_address = '[email protected] '
)
( agency_id = '070043'
name = 'Intertravel'
street = 'Michigan Ave '
postal_code = '60154 '
city = 'Chicago '
country_code = 'US '
phone_number = '+1 788 798-6555 '
web_address = 'http://www.intertravel.sap '
email_address = '[email protected] '
)
( agency_id = '070044'
name = 'Ultimate Goal'
street = '300 Peach tree street Sou'
postal_code = '01069 '
city = 'Atlanta '
country_code = 'US '
phone_number = '+1 874-654-6686'
web_address = 'http://www.ultimate-goal.sap '
email_address = '[email protected] '
)
( agency_id = '070045'
name = 'Submit and Return'
street = '20890 East Central Ave '
postal_code = '30987 '
city = 'Palo Alto '
country_code = 'US '
phone_number = '+1 652 645-5236 '
web_address = 'http://www.sar.sap '
email_address = '[email protected] '
)
( agency_id = '070046'
name = 'Hendrik''s'
street = '1200 Industrial Drive '
postal_code = '60153 '
city = 'Chicago '
country_code = 'US '
phone_number = '+1 08-924-9884 '
web_address = 'http://www.essen.sap/150596 '
email_address = '[email protected]/150596 '
)
( agency_id = '070047'
name = 'All British Air Planes'
street = '224 Tomato Lane '
postal_code = '08965 '
city = 'Vineland '
country_code = 'US '
phone_number = '+44 609-896-Moore '
web_address = 'http://www.abap.sap '
email_address = '[email protected] '
)
( agency_id = '070048'
name = 'Rocky Horror Tours'
street = '789 Santa Monica Blvd. '
postal_code = '08934 '
city = 'Santa Monica '
country_code = 'US '
phone_number = '+1 64351-6455-654 '
web_address = 'http://www.frank.furter.sap '
email_address = '[email protected] '
)
( agency_id = '070049'
name = 'Miles and More'
street = '777 Arlington Blvd. '
postal_code = '46515 '
city = 'Elkhart '
country_code = 'US '
phone_number = '+1 646 867-6888 '
web_address = 'http://www.mam.sap'
email_address = '[email protected]'
)
( agency_id = '070050'
name = 'Not Only By Bike'
street = 'Saalburgstr. 765 '
postal_code = '60385 '
city = 'Frankfurt '
country_code = 'DE '
phone_number = '+49 69 465789-0'
web_address = 'http://www.nobb.sap'
email_address = '[email protected]'
)
).
ENDMETHOD.
ENDCLASS.
CLASS lcl_airport_data_generator DEFINITION CREATE PRIVATE.
PUBLIC SECTION.
INTERFACES: lif_data_generator.
TYPES: tt_airport TYPE STANDARD TABLE OF /dmo/airport30 WITH KEY airport_id.
CLASS-METHODS: get_data
RETURNING VALUE(rt_data) TYPE lcl_airport_data_generator=>tt_airport.
PROTECTED SECTION.
PRIVATE SECTION.
ENDCLASS.
CLASS lcl_airport_data_generator IMPLEMENTATION.
METHOD lif_data_generator~create.
IF out IS BOUND. out->write( '--> Delete Content.' ). ENDIF.
DELETE FROM /dmo/airport30. "#EC CI_NOWHERE
IF out IS BOUND. out->write( '--> Build Content.' ). ENDIF.
DATA(lt_data) = get_data( ).
IF out IS BOUND. out->write( '--> Insert Content.' ). ENDIF.
INSERT /dmo/airport30 FROM TABLE @lt_data.
IF out IS BOUND. out->write( '--> Done.' ). ENDIF.
ENDMETHOD.
METHOD get_data.
rt_data = VALUE tt_airport(
" Europe
( airport_id = 'FRA' name = 'Frankfurt Airport' city = 'Frankfurt/Main' country = 'DE' )
( airport_id = 'HAM' name = 'Hamburg Airport' city = 'Hamburg' country = 'DE' )
( airport_id = 'MUC' name = 'Munich Airport' city = 'Munich' country = 'DE' )
( airport_id = 'SXF' name = 'Berlin Schönefeld Airport' city = 'Berlin' country = 'DE' )
( airport_id = 'THF' name = 'Berlin Tempelhof Airport' city = 'Berlin' country = 'DE' )
( airport_id = 'TXL' name = 'Berlin Tegel Airport' city = 'Berlin' country = 'DE' )
( airport_id = 'CDG' name = 'Charles de Gaulle Airport' city = 'Paris' country = 'FR' )
( airport_id = 'ORY' name = 'Orly Airport' city = 'Paris' country = 'FR' )
( airport_id = 'VIE' name = 'Vienna International Airport' city = 'Vienna' country = 'AT' )
( airport_id = 'ZRH' name = 'Zürich Airport' city = 'Zurich' country = 'CH' )
( airport_id = 'RTM' name = 'Rotterdam The Hague Airport' city = 'Rotterdam' country = 'NL' )
( airport_id = 'FCO' name = 'Leonardo da Vinci–Fiumicino Airport' city = 'Rome' country = 'IT' )
( airport_id = 'VCE' name = 'Venice Marco Polo Airport' city = 'Venice' country = 'IT' )
( airport_id = 'LCY' name = 'London City Airport' city = 'London' country = 'UK' )
( airport_id = 'LGW' name = 'Gatwick Airport' city = 'London' country = 'UK' )
( airport_id = 'LHR' name = 'Heathrow Airport' city = 'London' country = 'UK' )
( airport_id = 'MAD' name = 'Adolfo Suárez Madrid–Barajas Airport' city = 'Madrid' country = 'ES' )
( airport_id = 'VKO' name = 'Vnukovo International Airport' city = 'Moscow' country = 'RU' )
( airport_id = 'SVO' name = 'Sheremetyevo International Airport' city = 'Moscow' country = 'RU' )
" America
( airport_id = 'JFK' name = 'John F. Kennedy International Airport' city = 'New York City, New York' country = 'US' )
( airport_id = 'BNA' name = 'Nashville International Airport' city = 'Nashville, Tennessee' country = 'US' )
( airport_id = 'BOS' name = 'Logan International Airport' city = 'Boston, Massachusetts' country = 'US' )
( airport_id = 'ELP' name = 'El Paso International Airport' city = 'El Paso, Texas' country = 'US' )
( airport_id = 'DEN' name = 'Denver International Airport' city = 'Denver, Colorado' country = 'US' )
( airport_id = 'HOU' name = 'William P. Hobby Airport' city = 'Houston, Texas' country = 'US' )
( airport_id = 'LAS' name = 'McCarran International Airport' city = 'Las Vegas, Nevada' country = 'US' )
( airport_id = 'LAX' name = 'Los Angeles International Airport' city = 'Los Angeles, California' country = 'US' )
( airport_id = 'MCI' name = 'Kansas City International Airport' city = 'Kansas City, Missouri' country = 'US' )
( airport_id = 'MIA' name = 'Miami International Airport' city = 'Miami, Florida' country = 'US' )
( airport_id = 'SFO' name = 'San Francisco International Airport' city = 'San Francisco, California' country = 'US' )
( airport_id = 'EWR' name = 'Newark Liberty International Airport' city = 'Newark, New Jersey' country = 'US' )
( airport_id = 'YOW' name = 'Ottawa Macdonald–Cartier Int. Airport' city = 'Ottawa, Ontario' country = 'CA' )
( airport_id = 'ACA' name = 'General Juan N. Álvarez Int. Airport' city = 'Acapulco, Guerrero' country = 'MX' )
( airport_id = 'GIG' name = 'Rio de Janeiro–Galeão Int. Airport' city = 'Rio de Janeiro' country = 'BR' )
( airport_id = 'HAV' name = 'José Martí International Airport' city = 'Havana' country = 'CU' )
" Australia
( airport_id = 'ASP' name = 'Alice Springs Airport' city = 'Alice Springs, Northern Territory' country = 'AU' )
" Africa
( airport_id = 'ACE' name = 'Lanzarote Airport' city = 'Lanzarote, Canary Islands' country = 'ES' )
( airport_id = 'HRE' name = 'Harare International Airport' city = 'Harare' country = 'ZW' )
( airport_id = 'GCJ' name = 'Grand Central Airport' city = 'Johannesburg' country = 'SA' )
" Asia
( airport_id = 'NRT' name = 'Narita International Airport' city = 'Tokyo, Honshu' country = 'JP' )
( airport_id = 'ITM' name = 'Osaka International Airport' city = 'Osaka, Honshu' country = 'JP' )
( airport_id = 'KIX' name = 'Kansai International Airport' city = 'Osaka, Honshu' country = 'JP' )
( airport_id = 'HIJ' name = 'Hiroshima Airport' city = 'Hiroshima, Honshu' country = 'JP' )
( airport_id = 'SIN' name = 'Singapore Changi Airport' city = 'Singapore' country = 'SG' )
( airport_id = 'KUL' name = 'Kuala Lumpur International Airport' city = 'Kuala Lumpur' country = 'MY' )
( airport_id = 'HKG' name = 'Hong Kong International Airport' city = 'Hongkong' country = 'CN' )
( airport_id = 'BKK' name = 'Suvarnabhumi Airport' city = 'Bangkok' country = 'TH' )
).
ENDMETHOD.
ENDCLASS.
CLASS lcl_carrier_data_generator DEFINITION CREATE PRIVATE.
PUBLIC SECTION.
INTERFACES: lif_data_generator.
TYPES: tt_carrier TYPE STANDARD TABLE OF /dmo/carrier30 WITH KEY carrier_id.
CLASS-METHODS: get_data
RETURNING
VALUE(rt_data) TYPE tt_carrier.
PROTECTED SECTION.
PRIVATE SECTION.
ENDCLASS.
CLASS lcl_carrier_data_generator IMPLEMENTATION.
METHOD lif_data_generator~create.
IF out IS BOUND. out->write( '--> Delete Content.' ). ENDIF.
DELETE FROM /dmo/carrier30. "#EC CI_NOWHERE
IF out IS BOUND. out->write( '--> Build Content.' ). ENDIF.
DATA(lt_data) = get_data( ).
IF out IS BOUND. out->write( '--> Insert Content.' ). ENDIF.
INSERT /dmo/carrier30 FROM TABLE @lt_data.
IF out IS BOUND. out->write( '--> Done.' ). ENDIF.
ENDMETHOD.
METHOD get_data.
rt_data = VALUE tt_carrier(
( carrier_id = 'AA' name = 'American Airlines Inc.' currency_code = 'USD' )
( carrier_id = 'AC' name = 'Air Canada' currency_code = 'CAD' )
( carrier_id = 'AF' name = 'Air France' currency_code = 'EUR' )
( carrier_id = 'AZ' name = 'Alitalia Societa Aerea Italiana S.p.A.' currency_code = 'EUR' )
( carrier_id = 'BA' name = 'British Airways p.l.c.' currency_code = 'GBP' )
( carrier_id = 'FJ' name = 'Air Pacific Limited t/a Fiji Airway' currency_code = 'USD' )
( carrier_id = 'CO' name = 'Cobaltair Ltd. dba Cobalt' currency_code = 'USD' )
( carrier_id = 'DL' name = 'Delta Air Lines, Inc.' currency_code = 'USD' )
( carrier_id = 'LH' name = 'Deutsche Lufthansa AG' currency_code = 'EUR' )
( carrier_id = 'NG' name = 'AL-Naser Wings' currency_code = 'EUR' )
( carrier_id = 'JL' name = 'Japan Airlines Co., Ltd.' currency_code = 'JPY' )
( carrier_id = 'QF' name = 'Qantas Airways Ltd.' currency_code = 'AUD' )
( carrier_id = 'SA' name = 'South African Airways' currency_code = 'ZAR' )
( carrier_id = 'SQ' name = 'Singapore Airlines Limited' currency_code = 'SGD' )
( carrier_id = 'SR' name = 'Sundair GmbH' currency_code = 'CHF' )
( carrier_id = 'UA' name = 'United Airlines, Inc.' currency_code = 'USD' )
).
ENDMETHOD.
ENDCLASS.
CLASS lcl_connection_data_generator DEFINITION CREATE PRIVATE.
PUBLIC SECTION.
INTERFACES: lif_data_generator.
TYPES: tt_connection TYPE STANDARD TABLE OF /dmo/connecti_30 WITH KEY carrier_id connection_id.
TYPES:
"! Structure for additional information for generation. <br/>
"! <em>weekday</em> '1' means Monday, '7' is Sunday
BEGIN OF ty_connection_additional_info.
INCLUDE TYPE /dmo/connecti_30.
TYPES: weekday TYPE i,
END OF ty_connection_additional_info.
TYPES: tt_connection_additional_info TYPE STANDARD TABLE OF ty_connection_additional_info WITH KEY connection_id.
CLASS-METHODS: get_data "provide data public
RETURNING VALUE(rt_data) TYPE tt_connection_additional_info.
PROTECTED SECTION.
PRIVATE SECTION.
ENDCLASS.
CLASS lcl_connection_data_generator IMPLEMENTATION.
METHOD lif_data_generator~create.
IF out IS BOUND. out->write( '--> Delete Content.' ). ENDIF.
DELETE FROM /dmo/connecti_30. "#EC CI_NOWHERE
IF out IS BOUND. out->write( '--> Build Content.' ). ENDIF.
DATA(lt_data) = get_data( ).
DATA(lt_data_db) = CORRESPONDING tt_connection( lt_data ).
IF out IS BOUND. out->write( '--> Insert Content.' ). ENDIF.
INSERT /dmo/connecti_30 FROM TABLE @lt_data.
IF out IS BOUND. out->write( '--> Done.' ). ENDIF.
ENDMETHOD.
METHOD get_data.
rt_data = VALUE tt_connection_additional_info(
( carrier_id = 'SQ' connection_id = '0001' airport_from_id = 'SFO' airport_to_id = 'SIN' departure_time = '011500' arrival_time = '115000' distance = 13523 distance_unit = 'KM' weekday = 3 ) "1-7
( carrier_id = 'SQ' connection_id = '0002' airport_from_id = 'SIN' airport_to_id = 'SFO' departure_time = '063000' arrival_time = '091500' distance = 13523 distance_unit = 'KM' weekday = 4 ) "1-7
( carrier_id = 'SQ' connection_id = '0011' airport_from_id = 'NRT' airport_to_id = 'SIN' departure_time = '145500' arrival_time = '205000' distance = 5363 distance_unit = 'KM' weekday = 4 ) "1-7
( carrier_id = 'SQ' connection_id = '0012' airport_from_id = 'SIN' airport_to_id = 'NRT' departure_time = '095300' arrival_time = '175400' distance = 5363 distance_unit = 'KM' weekday = 6 ) "1-7
( carrier_id = 'UA' connection_id = '0058' airport_from_id = 'SFO' airport_to_id = 'FRA' departure_time = '134500' arrival_time = '095500' distance = 9608 distance_unit = 'KM' weekday = 1 ) "1-7
( carrier_id = 'UA' connection_id = '0059' airport_from_id = 'FRA' airport_to_id = 'SFO' departure_time = '135500' arrival_time = '163000' distance = 9608 distance_unit = 'KM' weekday = 2 ) "1-7
( carrier_id = 'UA' connection_id = '1537' airport_from_id = 'EWR' airport_to_id = 'MIA' departure_time = '215600' arrival_time = '004700' distance = 1752 distance_unit = 'KM' weekday = 5 ) "1-7
( carrier_id = 'AA' connection_id = '0322' airport_from_id = 'MIA' airport_to_id = 'EWR' departure_time = '201700' arrival_time = '231900' distance = 1752 distance_unit = 'KM' weekday = 7 ) "1-7
( carrier_id = 'AA' connection_id = '0017' airport_from_id = 'MIA' airport_to_id = 'HAV' departure_time = '071900' arrival_time = '080300' distance = 520 distance_unit = 'KM' weekday = 3 ) "1-7
( carrier_id = 'AA' connection_id = '2678' airport_from_id = 'HAV' airport_to_id = 'MIA' departure_time = '061500' arrival_time = '103000' distance = 520 distance_unit = 'KM' weekday = 6 ) "1-7
( carrier_id = 'AA' connection_id = '0015' airport_from_id = 'JFK' airport_to_id = 'SFO' departure_time = '071300' arrival_time = '100400' distance = 4156 distance_unit = 'KM' weekday = 5 ) "1-7
( carrier_id = 'AA' connection_id = '0018' airport_from_id = 'SFO' airport_to_id = 'JFK' departure_time = '064000' arrival_time = '150600' distance = 4156 distance_unit = 'KM' weekday = 4 ) "1-7
( carrier_id = 'LH' connection_id = '0400' airport_from_id = 'FRA' airport_to_id = 'JFK' departure_time = '101000' arrival_time = '113400' distance = 6162 distance_unit = 'KM' weekday = 6 ) "1-7
( carrier_id = 'LH' connection_id = '0401' airport_from_id = 'JFK' airport_to_id = 'FRA' departure_time = '183000' arrival_time = '074500' distance = 6162 distance_unit = 'KM' weekday = 5 ) "1-7
( carrier_id = 'LH' connection_id = '0402' airport_from_id = 'FRA' airport_to_id = 'EWR' departure_time = '133000' arrival_time = '153500' distance = 6217 distance_unit = 'KM' weekday = 1 ) "1-7
( carrier_id = 'LH' connection_id = '0403' airport_from_id = 'EWR' airport_to_id = 'FRA' departure_time = '180900' arrival_time = '073000' distance = 6217 distance_unit = 'KM' weekday = 1 ) "1-7
( carrier_id = 'JL' connection_id = '0407' airport_from_id = 'NRT' airport_to_id = 'FRA' departure_time = '132300' arrival_time = '155600' distance = 9379 distance_unit = 'KM' weekday = 5 ) "1-7
( carrier_id = 'JL' connection_id = '0408' airport_from_id = 'FRA' airport_to_id = 'NRT' departure_time = '202500' arrival_time = '154000' distance = 9379 distance_unit = 'KM' weekday = 6 ) "1-7
( carrier_id = 'AZ' connection_id = '0788' airport_from_id = 'VCE' airport_to_id = 'NRT' departure_time = '132500' arrival_time = '101300' distance = 9595 distance_unit = 'KM' weekday = 6 )
( carrier_id = 'AZ' connection_id = '0789' airport_from_id = 'NRT' airport_to_id = 'VCE' departure_time = '142600' arrival_time = '213100' distance = 9595 distance_unit = 'KM' weekday = 5 )
).
ENDMETHOD.
ENDCLASS.
CLASS lcl_flight_data_generator DEFINITION DEFERRED.
CLASS /dmo/cl_flight_data_generat_30 DEFINITION LOCAL FRIENDS lcl_flight_data_generator.
CLASS lcl_flight_data_generator DEFINITION CREATE PRIVATE.
PUBLIC SECTION.
INTERFACES: lif_data_generator.
TYPES: tt_flights TYPE STANDARD TABLE OF /dmo/flight30
WITH KEY carrier_id connection_id flight_date
WITH NON-UNIQUE SORTED KEY key_sorted_seats COMPONENTS seats_occupied
WITH NON-UNIQUE SORTED KEY key_sorted_date COMPONENTS connection_id flight_date.
CLASS-METHODS: get_data
RETURNING VALUE(rt_data) TYPE tt_flights.
PROTECTED SECTION.
PRIVATE SECTION.
TYPES: BEGIN OF ty_plane_type,
id TYPE /dmo/plane_type_id30,
seats_max TYPE /dmo/plane_seats_max30,
long_distance TYPE abap_bool,
index TYPE int1,
END OF ty_plane_type,
BEGIN OF ty_flight_info,
id TYPE /dmo/plane_type_id30,
long_distance TYPE abap_bool,
seats_max TYPE /dmo/plane_seats_max30,
seats_occupied TYPE /dmo/plane_seats_occupied30,
price TYPE /dmo/flight_price30,
END OF ty_flight_info,
BEGIN OF ty_connection_recurrency,
id TYPE /dmo/connection_id30,
recurrency TYPE STANDARD TABLE OF /dmo/flight_date30 WITH EMPTY KEY,
END OF ty_connection_recurrency.
TYPES: tt_plane_type TYPE STANDARD TABLE OF ty_plane_type WITH KEY id,
tt_connection_recurrency TYPE STANDARD TABLE OF ty_connection_recurrency WITH KEY id.
CONSTANTS: cv_random_offset TYPE i VALUE 25,
cv_random_percent TYPE i VALUE 70.
CLASS-DATA: gt_connections TYPE lcl_connection_data_generator=>tt_connection,
gt_carrier TYPE lcl_carrier_data_generator=>tt_carrier,
gt_plane_types TYPE tt_plane_type,
go_random_int_distance_long TYPE REF TO cl_abap_random_int,
go_random_int_distance_short TYPE REF TO cl_abap_random_int,
gv_plane_distance_long TYPE i,
gv_plane_distance_short TYPE i,
gt_connection_recurrency TYPE lcl_flight_data_generator=>tt_connection_recurrency,
gt_flights TYPE lcl_flight_data_generator=>tt_flights,
go_random_seats TYPE REF TO cl_abap_random_int.
CLASS-METHODS: build_dependent_content,
get_flight_info
IMPORTING
iv_connection_id TYPE /dmo/connection_id30
RETURNING
VALUE(rs_plane_info) TYPE ty_flight_info,
build_plane_types
RETURNING
VALUE(rt_data) TYPE lcl_flight_data_generator=>tt_plane_type,
build_connection_recurrency
RETURNING
VALUE(rt_data) TYPE lcl_flight_data_generator=>tt_connection_recurrency,
calc_next_monday
IMPORTING
iv_date TYPE d
RETURNING
VALUE(rv_date) TYPE d.
ENDCLASS.
CLASS lcl_flight_data_generator IMPLEMENTATION.
METHOD lif_data_generator~create.
IF out IS BOUND. out->write( '--> Delete Content.' ). ENDIF.
DELETE FROM /dmo/flight30. "#EC CI_NOWHERE
IF out IS BOUND. out->write( '--> Build Dependent Content.' ). ENDIF.
build_dependent_content( ).
IF out IS BOUND. out->write( '--> Build Content.' ). ENDIF.
get_data( ).
IF out IS BOUND. out->write( '--> Insert Content.' ). ENDIF.
INSERT /dmo/flight30 FROM TABLE @gt_flights.
IF out IS BOUND. out->write( '--> Done.' ). ENDIF.
ENDMETHOD.
METHOD get_data.
DATA: lt_flights TYPE tt_flights,
ls_flight TYPE lcl_flight_data_generator=>ty_flight_info.
IF gt_flights IS NOT INITIAL.
rt_data = gt_flights.
EXIT.
ENDIF.
LOOP AT gt_connections INTO DATA(ls_connection).
LOOP AT gt_connection_recurrency[ id = ls_connection-connection_id ]-recurrency INTO DATA(lv_flight_date).
ls_flight = get_flight_info( ls_connection-connection_id ).
APPEND VALUE /dmo/flight30(
carrier_id = ls_connection-carrier_id
connection_id = ls_connection-connection_id
flight_date = lv_flight_date
price = ls_flight-price
currency_code = VALUE /dmo/flight30-currency_code(
gt_carrier[ carrier_id = ls_connection-carrier_id ]-currency_code
DEFAULT 'EUR' )
plane_type_id = ls_flight-id
seats_max = ls_flight-seats_max
seats_occupied = ls_flight-seats_occupied
) TO gt_flights.
ENDLOOP.
rt_data = gt_flights.
ENDLOOP.
ENDMETHOD.
METHOD build_dependent_content.
gt_connections = CORRESPONDING #( lcl_connection_data_generator=>get_data( ) ).
gt_carrier = lcl_carrier_data_generator=>get_data( ).
gt_plane_types = build_plane_types( ).
go_random_seats = cl_abap_random_int=>create(
min = cv_random_percent - cv_random_offset
max = cv_random_percent + cv_random_offset
).
gt_connection_recurrency = build_connection_recurrency( ).
ENDMETHOD.
METHOD get_flight_info.
DATA: lv_count TYPE i,
lo_random TYPE REF TO cl_abap_random_int.
DATA(lt_connections) = lcl_connection_data_generator=>get_data( ).
DATA(lv_is_long_distance) = COND abap_bool( WHEN lt_connections[ connection_id = iv_connection_id ]-distance > 3000
THEN abap_true
ELSE abap_false ).
IF lv_is_long_distance = abap_true.
IF gv_plane_distance_long IS INITIAL.
SELECT COUNT(*) FROM @gt_plane_types AS planes WHERE long_distance = @lv_is_long_distance INTO @gv_plane_distance_long.
ENDIF.
lv_count = gv_plane_distance_long.
IF go_random_int_distance_long IS NOT BOUND.
go_random_int_distance_long = cl_abap_random_int=>create( seed = 1337 min = 1 max = gv_plane_distance_long ).
ENDIF.
lo_random = go_random_int_distance_long.
ELSE.
IF gv_plane_distance_short IS INITIAL.
SELECT COUNT(*) FROM @gt_plane_types AS planes WHERE long_distance = @lv_is_long_distance INTO @gv_plane_distance_short.
ENDIF.
lv_count = gv_plane_distance_short.
IF go_random_int_distance_short IS NOT BOUND.
go_random_int_distance_short = cl_abap_random_int=>create( seed = 1337 min = 1 max = gv_plane_distance_short ).
ENDIF.
lo_random = go_random_int_distance_short.
ENDIF.
DATA(ls_plane_type) = gt_plane_types[
long_distance = lv_is_long_distance
index = lo_random->get_next( )
].
DATA(lv_seats_occupied_percent) = go_random_seats->get_next( ).
rs_plane_info = VALUE ty_flight_info(
id = ls_plane_type-id
long_distance = ls_plane_type-long_distance
seats_max = ls_plane_type-seats_max
seats_occupied = ls_plane_type-seats_max * lv_seats_occupied_percent DIV 100
price = /dmo/cl_flight_data_generat_30=>calculate_flight_price(
iv_seats_occupied_percent = lv_seats_occupied_percent
iv_flight_distance = lt_connections[ connection_id = iv_connection_id ]-distance
)
).
ENDMETHOD.
METHOD build_plane_types.
rt_data = VALUE tt_plane_type(
( id = 'A320-200' seats_max = 130 long_distance = ' ' index = 1 )
( id = 'A321-200' seats_max = 150 long_distance = ' ' index = 2 )
( id = '737-800' seats_max = 140 long_distance = ' ' index = 3 )
( id = 'A319-100' seats_max = 120 long_distance = ' ' index = 4 )
( id = '747-400' seats_max = 385 long_distance = 'X' index = 1 )
( id = '767-200' seats_max = 260 long_distance = 'X' index = 2 )
( id = 'A340-600' seats_max = 330 long_distance = 'X' index = 3 )
( id = 'A380-800' seats_max = 475 long_distance = 'X' index = 4 )
).
ENDMETHOD.
METHOD build_connection_recurrency.
CONSTANTS:
cv_days_between_test TYPE i VALUE 300,
cv_days_between_8weeks TYPE i VALUE 56,
cv_days_between_4weeks TYPE i VALUE 28,
cv_days_between_2weeks TYPE i VALUE 14,
cv_days_between_1weeks TYPE i VALUE 7.
DATA:
flight_date_max TYPE d,
flight_date_min TYPE d.
DATA(lv_days_between) = cv_days_between_test.
GET TIME STAMP FIELD DATA(current_timestamp).
DATA(tmp) = CONV string( current_timestamp ).
DATA lv_datum TYPE d.
lv_datum = tmp(8).
" flight_date_max is a Monday 8 months in the future
flight_date_max = calc_next_monday( CONV /dmo/flight_date30( lv_datum + 217 ) ).
" flight_date_min is a Monday 5 months in the past
flight_date_min = calc_next_monday( CONV /dmo/flight_date30( lv_datum - 148 ) ).
LOOP AT lcl_connection_data_generator=>get_data( ) INTO DATA(ls_connection).
APPEND VALUE ty_connection_recurrency(
id = ls_connection-connection_id
recurrency = VALUE ty_connection_recurrency-recurrency(
FOR flightdate = flight_date_max + ls_connection-weekday - 1
THEN flightdate - lv_days_between
UNTIL flightdate < flight_date_min + ls_connection-weekday - 1
( CONV /dmo/flight_date30( flightdate ) )
)
) TO rt_data.
ENDLOOP.
ENDMETHOD.
METHOD calc_next_monday.
* 01.01.1900 was a Saturday.
DATA(lv_weekday) = iv_date MOD 7.
* Therefore 0 is a Saturday, 1 for Sunday, etc.. and will be mapped to 1 for Monday, 2 for Tuesday, etc..
IF lv_weekday > 1.
lv_weekday = lv_weekday - 1.
ELSE.
lv_weekday = lv_weekday + 6.
ENDIF.
rv_date = iv_date - lv_weekday + 8.
ENDMETHOD.
ENDCLASS.
CLASS lcl_customer_data_generator DEFINITION CREATE PRIVATE.
PUBLIC SECTION.
INTERFACES: lif_data_generator.
TYPES: BEGIN OF ty_last_name,
last_name TYPE /dmo/last_name30,
END OF ty_last_name.
TYPES: tt_customer TYPE STANDARD TABLE OF /dmo/customer30 WITH KEY customer_id,
tt_last_name TYPE STANDARD TABLE OF ty_last_name WITH KEY last_name.
CLASS-METHODS: get_data
RETURNING VALUE(rt_data) TYPE tt_customer,
build_last_names
RETURNING
VALUE(rt_data) TYPE tt_last_name.
PROTECTED SECTION.
PRIVATE SECTION.
TYPES:
" Names
BEGIN OF ty_first_name,
first_name TYPE /dmo/first_name30,
gender TYPE c LENGTH 1,
END OF ty_first_name,
BEGIN OF ty_name,
first_name TYPE /dmo/first_name30,
last_name TYPE /dmo/last_name30,
title TYPE /dmo/title30,
END OF ty_name,
" Addresses
BEGIN OF ty_city,
country TYPE land1,
postal_code TYPE /dmo/postal_code30,
city TYPE /dmo/city30,
END OF ty_city,
tt_street_per_country TYPE STANDARD TABLE OF /dmo/street30 WITH EMPTY KEY,
BEGIN OF ty_street,
country TYPE land1,
streets TYPE tt_street_per_country,
END OF ty_street,
BEGIN OF ty_address,
country TYPE land1,
postal_code TYPE /dmo/postal_code30,
city TYPE /dmo/city30,
street TYPE /dmo/street30,
phone_number TYPE /dmo/phone_number30,
email_address TYPE /dmo/email_address30,
END OF ty_address.
TYPES:
" Names
tt_first_name TYPE STANDARD TABLE OF ty_first_name WITH KEY first_name,
tt_name TYPE STANDARD TABLE OF ty_name WITH KEY first_name last_name,
" Addresses
tt_city TYPE STANDARD TABLE OF ty_city WITH KEY country city,
tt_street TYPE STANDARD TABLE OF ty_street WITH KEY country,
tt_address TYPE STANDARD TABLE OF ty_address WITH KEY country city street.
CONSTANTS cv_email_host TYPE string VALUE `flight.example` ##NO_TEXT.
CONSTANTS cv_phone_number_seperator TYPE string VALUE `-` ##NO_TEXT.
CONSTANTS cv_phone_number_min TYPE int8 VALUE 1234567890.
CONSTANTS cv_phone_number_max TYPE int8 VALUE 9999999999.
CLASS-DATA gt_data TYPE lcl_customer_data_generator=>tt_customer.
CLASS-METHODS:
" Names
generate_names
RETURNING
VALUE(rt_data) TYPE tt_name,
build_first_names
RETURNING
VALUE(rt_data) TYPE tt_first_name,
" Adresses
generate_addresses
RETURNING
VALUE(rt_data) TYPE tt_address,
build_city
RETURNING
VALUE(rt_data) TYPE tt_city,
build_street
RETURNING
VALUE(rt_data) TYPE tt_street.
ENDCLASS.
CLASS lcl_customer_data_generator IMPLEMENTATION.
METHOD lif_data_generator~create.
IF out IS BOUND. out->write( '--> Delete Content.' ). ENDIF.
DELETE FROM /dmo/customer30. "#EC CI_NOWHERE
IF out IS BOUND. out->write( '--> Build Content.' ). ENDIF.
DATA(lt_data) = get_data( ).
IF out IS BOUND. out->write( '--> Insert Content.' ). ENDIF.
INSERT /dmo/customer30 FROM TABLE @lt_data.
IF out IS BOUND. out->write( '--> Done.' ). ENDIF.
ENDMETHOD.
METHOD build_first_names.
rt_data = VALUE tt_first_name(
( first_name = 'Simon' gender = 'M')
( first_name = 'Harish' gender = 'M')
( first_name = 'Volker' gender = 'M')
( first_name = 'Jasmin' gender = 'F')
( first_name = 'Felix' gender = 'M')
( first_name = 'Kristina' gender = 'F')
( first_name = 'Thilo' gender = 'M')
( first_name = 'Andrej' gender = 'M')
( first_name = 'Anna' gender = 'F')
( first_name = 'Johannes' gender = 'M')
( first_name = 'Johann' gender = 'M')
( first_name = 'Christoph' gender = 'M')
( first_name = 'Andreas' gender = 'M')
( first_name = 'Stephen' gender = 'M')
( first_name = 'Mathilde' gender = 'F')
( first_name = 'August' gender = 'M')
( first_name = 'Illya' gender = 'M')
( first_name = 'Georg' gender = 'M')
( first_name = 'Gisela' gender = 'F')
( first_name = 'Christa' gender = 'F')
( first_name = 'Holm' gender = 'M')
( first_name = 'Irmtraut' gender = 'F')
( first_name = 'Ludwig' gender = 'M')
( first_name = 'Laura' gender = 'F')
( first_name = 'Kurt' gender = 'M')
( first_name = 'Guenther' gender = 'M')
( first_name = 'Horst' gender = 'M')
( first_name = 'Matthias' gender = 'M')
( first_name = 'Amelie' gender = 'F')
( first_name = 'Walter' gender = 'M')
( first_name = 'Sophie' gender = 'F')
( first_name = 'Claire' gender = 'F')
( first_name = 'Chantal' gender = 'F')
( first_name = 'Jean' gender = 'M')
( first_name = 'Cindy' gender = 'F')
( first_name = 'Pierre' gender = 'M')
( first_name = 'Irene' gender = 'F')
( first_name = 'Adam' gender = 'M')
( first_name = 'Fabio' gender = 'M')
( first_name = 'Lothar' gender = 'M')
( first_name = 'Annemarie' gender = 'F')
( first_name = 'Ida' gender = 'F')
( first_name = 'Roland' gender = 'M')
( first_name = 'Achim' gender = 'M')
( first_name = 'Allen' gender = 'M')
( first_name = 'Lee' gender = 'M')
( first_name = 'Guillermo' gender = 'M')
( first_name = 'Florian' gender = 'M')
( first_name = 'Ulla' gender = 'F')
( first_name = 'Juan' gender = 'M')
( first_name = 'Marta' gender = 'F')
( first_name = 'Salvador' gender = 'M')
( first_name = 'Christine' gender = 'F')
( first_name = 'Dominik' gender = 'M')
( first_name = 'Astrid' gender = 'F')
( first_name = 'Ruth' gender = 'F')
( first_name = 'Theresia' gender = 'F')
( first_name = 'Thomas' gender = 'M')
( first_name = 'Friedrich' gender = 'M')
( first_name = 'Anneliese' gender = 'F')
( first_name = 'Peter' gender = 'M')
( first_name = 'Anne-Marie' gender = 'F')
( first_name = 'James' gender = 'M')
( first_name = 'Jean-Luc' gender = 'M')
( first_name = 'Benjamin' gender = 'M')
( first_name = 'Hendrik' gender = 'M')
( first_name = 'Uli' gender = 'F')
( first_name = 'Siegfried' gender = 'M')
( first_name = 'Max' gender = 'M')
).
ENDMETHOD.
METHOD build_last_names.
rt_data = VALUE tt_last_name(
( last_name = 'Buchholm')
( last_name = 'Vrsic')
( last_name = 'Jeremias')
( last_name = 'Gutenberg')
( last_name = 'Fischmann')
( last_name = 'Columbo')
( last_name = 'Neubasler')
( last_name = 'Martin')
( last_name = 'Detemple')
( last_name = 'Barth')
( last_name = 'Benz')
( last_name = 'Hansmann')
( last_name = 'Koslowski')
( last_name = 'Wohl')
( last_name = 'Koller')
( last_name = 'Hoffen')
( last_name = 'Dumbach')
( last_name = 'Goelke')
( last_name = 'Waldmann')
( last_name = 'Mechler')
( last_name = 'Buehler')
( last_name = 'Heller')
( last_name = 'Simonen')
( last_name = 'Henry')
( last_name = 'Marshall')
( last_name = 'Legrand')
( last_name = 'Jacqmain')
( last_name = 'D´Oultrement')
( last_name = 'Hunter')
( last_name = 'Delon')
( last_name = 'Kreiss')
( last_name = 'Trensch')
( last_name = 'Cesari')
( last_name = 'Matthaeus')
( last_name = 'Babilon')
( last_name = 'Zimmermann')
( last_name = 'Kramer')
( last_name = 'Illner')
( last_name = 'Pratt')
( last_name = 'Gahl')
( last_name = 'Benjamin')
( last_name = 'Miguel')
( last_name = 'Weiss')
( last_name = 'Sessler')
( last_name = 'Montero')
( last_name = 'Domenech')
( last_name = 'Moyano')
( last_name = 'Sommer')
( last_name = 'Schneider')
( last_name = 'Eichbaum')
( last_name = 'Gueldenpfennig')
( last_name = 'Sudhoff')
( last_name = 'Lautenbach')
( last_name = 'Ryan')
( last_name = 'Prinz')
( last_name = 'Deichgraeber')
( last_name = 'Pan')
( last_name = 'Lindwurm')
( last_name = 'Kirk')
( last_name = 'Picard')
( last_name = 'Sisko')
( last_name = 'Madeira')
( last_name = 'Meier')
( last_name = 'Rahn')
( last_name = 'Leisert')
( last_name = 'Müller')
( last_name = 'Mustermann')
( last_name = 'Becker')
( last_name = 'Fischer')
).
ENDMETHOD.
METHOD get_data.
IF gt_data IS NOT INITIAL.
rt_data = gt_data.
EXIT.
ENDIF.
DATA(lt_names) = generate_names( ).
DATA(lt_addresses) = generate_addresses( ).
DATA(lo_random_phone_number) = cl_abap_random_int8=>create( min = cv_phone_number_min
max = cv_phone_number_max ).
DATA(lo_random_city) = cl_abap_random_int=>create( min = 1 max = lines( lt_addresses ) ).
DATA(lo_random_street_number) = cl_abap_random_int=>create( min = 1 max = 100 ).
gt_data = VALUE tt_customer(
FOR i = 1 THEN i + 1 WHILE i <= lines( lt_names ) LET j = lo_random_city->get_next( ) IN
(
customer_id = i
first_name = lt_names[ i ]-first_name
last_name = lt_names[ i ]-last_name
title = lt_names[ i ]-title
street = lt_addresses[ j ]-street && ` ` && lo_random_street_number->get_next( )
postal_code = lt_addresses[ j ]-postal_code
city = lt_addresses[ j ]-city
country_code = lt_addresses[ j ]-country
phone_number = '+' && COND string(
WHEN lt_addresses[ j ]-country = 'AT' THEN '43'
WHEN lt_addresses[ j ]-country = 'BE' THEN '32'
WHEN lt_addresses[ j ]-country = 'CH' THEN '41'
WHEN lt_addresses[ j ]-country = 'DE' THEN '49'
WHEN lt_addresses[ j ]-country = 'ES' THEN '34'
WHEN lt_addresses[ j ]-country = 'FR' THEN '33'
WHEN lt_addresses[ j ]-country = 'IT' THEN '39'
WHEN lt_addresses[ j ]-country = 'SI' THEN '386'
WHEN lt_addresses[ j ]-country = 'US' THEN '1'
ELSE '89'
)
&& cv_phone_number_seperator
&& |{ replace( val = lo_random_phone_number->get_next( ) off = 3 len = 1 with = cv_phone_number_seperator ) }|
email_address = to_lower( lt_names[ i ]-first_name && `.` && lt_names[ i ]-last_name && `@` && cv_email_host && `.` && lt_addresses[ j ]-country )
)
).
rt_data = gt_data.
ENDMETHOD.
METHOD generate_names.
DATA: lo_random_counter TYPE REF TO cl_abap_random_int,
lo_random_first_name TYPE REF TO cl_abap_random_int,
lo_random_title TYPE REF TO cl_abap_random_int,
ls_first_name TYPE lcl_customer_data_generator=>ty_first_name.
DATA(lt_first_names) = build_first_names( ).
lo_random_counter = cl_abap_random_int=>create( min = 5 max = 15 ).
lo_random_first_name = cl_abap_random_int=>create( min = 1 max = lines( lt_first_names ) ).
LOOP AT build_last_names( ) INTO DATA(ls_last_name).
DO lo_random_counter->get_next( ) TIMES.
ls_first_name = lt_first_names[ lo_random_first_name->get_next( ) ].
APPEND VALUE ty_name(
first_name = ls_first_name-first_name
last_name = ls_last_name-last_name
title = COND /dmo/title30( WHEN ls_first_name-gender = 'M' THEN 'Mr.'
WHEN ls_first_name-gender = 'F' THEN 'Mrs.'
ELSE 'Martian' )
) TO rt_data.
ENDDO.
ENDLOOP.
ENDMETHOD.
METHOD build_city.
rt_data = VALUE tt_city(
( country = 'DE' postal_code = '23496' city = 'Dielheim')
( country = 'SI' postal_code = '1000' city = 'Ljubljana')
( country = 'DE' postal_code = '86343' city = 'Koenigsbrunn')
( country = 'DE' postal_code = '55128' city = 'Mainz')
( country = 'DE' postal_code = '11111' city = 'Berlin')
( country = 'US' postal_code = '17844' city = 'Washington')
( country = 'AT' postal_code = '4020' city = 'Linz')
( country = 'DE' postal_code = '68723' city = 'Schwetzingen')
( country = 'DE' postal_code = '68789' city = 'St. Leon-Rot')
( country = 'DE' postal_code = '66464' city = 'Homburg')
( country = 'DE' postal_code = '69231' city = 'Rauenberg')
( country = 'DE' postal_code = '69190' city = 'Walldorf')
( country = 'DE' postal_code = '58332' city = 'Schwelm')
( country = 'DE' postal_code = '64342' city = 'Seeheim-Jugenheim')
( country = 'DE' postal_code = '69121' city = 'Heidelberg')
( country = 'DE' postal_code = '63150' city = 'Heusenstamm')
( country = 'DE' postal_code = '64283' city = 'Darmstadt')
( country = 'DE' postal_code = '69207' city = 'Kurt')
( country = 'DE' postal_code = '79104' city = 'Freiburg')
( country = 'DE' postal_code = '79312' city = 'Emmendingen')
( country = 'DE' postal_code = '68753' city = 'Amelie')
( country = 'DE' postal_code = '68163' city = 'Mannheim')
( country = 'DE' postal_code = '67105' city = 'Schifferstadt')
( country = 'DE' postal_code = '68163' city = 'Mannheim-Lindenhof')
( country = 'FR' postal_code = '78140' city = 'Vélizy')
( country = 'CH' postal_code = '1211' city = 'Genève')
( country = 'BE' postal_code = 'B - 1030' city = 'Bruxelles')
( country = 'US' postal_code = '76018' city = 'Arlington')
( country = 'FR' postal_code = '06130' city = 'Grasse')
( country = 'DE' postal_code = '27299' city = 'Langwedel')
( country = 'DE' postal_code = '69483' city = 'Wald-Michelbach')
( country = 'IT' postal_code = '00195' city = 'Roma')
( country = 'DE' postal_code = '81375' city = 'Muenchen')
( country = 'DE' postal_code = '67663' city = 'Kaiserslautern')
( country = 'DE' postal_code = '66386' city = 'St. Ingbert')
( country = 'DE' postal_code = '79761' city = 'Waldshut')
( country = 'DE' postal_code = '76137' city = 'Karlsruhe')
( country = 'US' postal_code = '07666' city = 'Teaneck')
( country = 'US' postal_code = '17758' city = 'N. Massapequa')
( country = 'US' postal_code = '09765' city = 'Boulder')
( country = 'ES' postal_code = '28020' city = 'Madrid')
( country = 'DE' postal_code = '69180' city = 'Wiesloch')
( country = 'ES' postal_code = '08014' city = 'Barcelona')
( country = 'ES' postal_code = '41006' city = 'Sevilla')
( country = 'DE' postal_code = '75305' city = 'Neuenburg')
( country = 'DE' postal_code = '41466' city = 'Neuss')
( country = 'DE' postal_code = '71116' city = 'Gaertringen')
( country = 'US' postal_code = '60657' city = 'Chicago')
( country = 'DE' postal_code = '63263' city = 'Neu-Isenburg')
( country = 'DE' postal_code = '23056' city = 'Buxtehude')
( country = 'DE' postal_code = '16233' city = 'Potsdam')
( country = 'DE' postal_code = '90419' city = 'Nuernberg')
( country = 'US' postal_code = '22334' city = 'San Francisco')
( country = 'FR' postal_code = '75839' city = 'Paris')
( country = 'US' postal_code = '63728' city = 'New Orleans')
( country = 'DE' postal_code = '75757' city = 'Elsenz')
( country = 'DE' postal_code = '70111' city = 'Reutlingen')
( country = 'DE' postal_code = '15344' city = 'Strausberg')
).
ENDMETHOD.
METHOD generate_addresses.
TYPES: BEGIN OF ty_random_street,
country TYPE land1,
random TYPE REF TO cl_abap_random_int,
END OF ty_random_street,
tt_random_street TYPE STANDARD TABLE OF ty_random_street WITH KEY country.
DATA: lo_random_counter TYPE REF TO cl_abap_random_int,
lo_random_city TYPE REF TO cl_abap_random_int,
lt_random_street TYPE tt_random_street,
lo_phone_number TYPE REF TO cl_abap_random_int.
DATA(lt_street) = build_street( ).
lo_random_counter = cl_abap_random_int=>create( min = 5 max = 15 ).
lo_phone_number = cl_abap_random_int=>create( min = 1 max = 100 ).
LOOP AT lt_street INTO DATA(ls_street).
APPEND VALUE ty_random_street(
country = ls_street-country
random = cl_abap_random_int=>create( min = 1 max = lines( ls_street-streets ) )
) TO lt_random_street.
ENDLOOP.
LOOP AT build_city( ) INTO DATA(ls_city).
DO lo_random_counter->get_next( ) TIMES.
APPEND VALUE ty_address(
country = ls_city-country
postal_code = ls_city-postal_code
city = ls_city-city
street = |{ lt_street[
country = ls_city-country
]-streets[
lt_random_street[ country = ls_city-country ]-random->get_next( )
] }|
) TO rt_data.
ENDDO.
ENDLOOP.
ENDMETHOD.
METHOD build_street.
rt_data = VALUE tt_street(
( country = 'AT' streets = VALUE tt_street_per_country( ( 'Hasnerstrasse' ) ) )
( country = 'BE' streets = VALUE tt_street_per_country( ( 'rue Voltaire' ) ) )
( country = 'CH' streets = VALUE tt_street_per_country( ( 'rue de Moillebeau' ) ) )
( country = 'DE' streets = VALUE tt_street_per_country( ( 'Akazienweg' )
( 'Albert-Schweitzer-Str.' )
( 'Alte Reichsstr.' )
( 'Am Deich' )
( 'Arionweg' )
( 'Arndtstrasse' )
( 'Auf dem Huegel' )
( 'Ausfallstr.' )
( 'Ausserhalb' )
( 'Carl-Metz Strasse' )
( 'Caspar-David-Friedrich-Str.' )
( 'Dudweilerstr.' )
( 'Elzstrasse' )
( 'Emil-Heckel-Str.' )
( 'Erlengrund' )
( 'Franz-Marc-Str.' )
( 'Friedensallee' )
( 'Froschstr.' )
( 'Gartenstr.' )
( 'Gemeindestr.' )
( 'Goeckinghofstr.' )
( 'Gruenlingweg' )
( 'Hauptstr.' )
( 'Heidelberger Str.' )
( 'Im Warmet' )
( 'Jacobistrasse' )
( 'Karl-Marx-Allee' )
( 'Karl-Schwaner-Str.' )
( 'Leichhof' )
( 'Lerchenstr.' )
( 'Marktplatz' )
( 'Max-Planck-Str.' )
( 'Meerfeldstr.' )
( 'Melissenstr.' )
( 'Muehltalstr.' )
( 'Mutterstadter Str.' )
( 'N7,' )
( 'Rankestr.' )
( 'Raupelsweg' )
( 'Schillerstr.' )
( 'Stauboernchenstrasse' )
( 'Stiftsbogen' )
( 'Waldmann' )
( 'Wilhelminentr.' )
( 'Zwischergasse' ) ) )
( country = 'ES' streets = VALUE tt_street_per_country( ( 'Camelias' )
( 'Fuenlabrada' )
( 'Piedad' )
( 'Pza. Pablo Ruiz Picasso' ) ) )
( country = 'FR' streets = VALUE tt_street_per_country( ( 'Rue Balzac' )
( 'route de Pégomas' )
( 'rue Nieuport' ) ) )
( country = 'IT' streets = VALUE tt_street_per_country( ( 'Via Giulio Cesare' ) ) )
( country = 'SI' streets = VALUE tt_street_per_country( ( 'Poklukarjeva' ) ) )
( country = 'US' streets = VALUE tt_street_per_country( ( '17th St.' )
( 'Federal Avenue' )
( 'Golden Gate Drive' )
( 'Lake Shore Drive' )
( 'Oak Street' )
( 'Sagamore St.' )
( 'Voodoo Avenue' )
( 'Windstone Drive' ) ) )
).
ENDMETHOD.
ENDCLASS.
CLASS lcl_supplement_data_generator DEFINITION CREATE PRIVATE.
PUBLIC SECTION.
INTERFACES: lif_data_generator.
TYPES: tt_supplement TYPE STANDARD TABLE OF /dmo/suppleme_30 WITH KEY supplement_id,
tt_supplement_text TYPE STANDARD TABLE OF /dmo/suppl_te_30 WITH KEY supplement_id.
" Merged types
TYPES BEGIN OF ty_supplement_complete.
INCLUDE TYPE /dmo/suppleme_30.
TYPES language_code TYPE spras.
TYPES description TYPE /dmo/description30.
TYPES END OF ty_supplement_complete.
TYPES tt_supplement_complete TYPE STANDARD TABLE OF ty_supplement_complete WITH KEY supplement_id.
CLASS-METHODS: get_data
RETURNING VALUE(rt_data) TYPE tt_supplement_complete.
PROTECTED SECTION.
PRIVATE SECTION.
ENDCLASS.
CLASS lcl_supplement_data_generator IMPLEMENTATION.
METHOD lif_data_generator~create.
IF out IS BOUND. out->write( '--> Delete Content.' ). ENDIF.
DELETE FROM /dmo/suppleme_30. "#EC CI_NOWHERE
DELETE FROM /dmo/suppl_te_30. "#EC CI_NOWHERE
IF out IS BOUND. out->write( '--> Build Content.' ). ENDIF.
DATA(lt_data) = get_data( ).
IF out IS BOUND. out->write( '--> Insert Content.' ). ENDIF.
INSERT /dmo/suppleme_30 FROM TABLE @( CORRESPONDING tt_supplement( lt_data ) ).
INSERT /dmo/suppl_te_30 FROM TABLE @( CORRESPONDING tt_supplement_text( lt_data ) ).
IF out IS BOUND. out->write( '--> Done.' ). ENDIF.
ENDMETHOD.
METHOD get_data.
" BV = beverage
" ML = meal
" LU = luggage
" EX = extra
rt_data = VALUE tt_supplement_complete(
( supplement_id = 'BV-0001' price = '2.30' currency_code = 'EUR' language_code = 'E' description = 'Hot Chocolate' )
( supplement_id = 'BV-0002' price = '7.50' currency_code = 'EUR' language_code = 'E' description = 'Alcohol free Champagne' )
( supplement_id = 'BV-0003' price = '3.50' currency_code = 'EUR' language_code = 'E' description = 'Cola' )
( supplement_id = 'BV-0004' price = '3.50' currency_code = 'EUR' language_code = 'E' description = 'Orange Limonade' )
( supplement_id = 'BV-0005' price = '3.50' currency_code = 'EUR' language_code = 'E' description = 'Apple Juice' )
( supplement_id = 'BV-0006' price = '3.50' currency_code = 'EUR' language_code = 'E' description = 'Pear Juice' )
( supplement_id = 'BV-0007' price = '3.50' currency_code = 'EUR' language_code = 'E' description = 'Mango Juice' )
( supplement_id = 'BV-0008' price = '3.50' currency_code = 'EUR' language_code = 'E' description = 'Lemon Limonade' )
( supplement_id = 'BV-0009' price = '4.50' currency_code = 'EUR' language_code = 'E' description = 'Tomato Juice' )
( supplement_id = 'ML-0001' price = '3.00' currency_code = 'EUR' language_code = 'E' description = 'Black Forest Cake' )
( supplement_id = 'ML-0002' price = '2.00' currency_code = 'EUR' language_code = 'E' description = 'Chocolate Cake' )
( supplement_id = 'ML-0003' price = '1.50' currency_code = 'EUR' language_code = 'E' description = 'Apple Pie' )
( supplement_id = 'ML-0004' price = '1.50' currency_code = 'EUR' language_code = 'E' description = 'Pear Pie' )
( supplement_id = 'ML-0005' price = '8.00' currency_code = 'EUR' language_code = 'E' description = 'Nice Salad')
( supplement_id = 'ML-0006' price = '9.00' currency_code = 'EUR' language_code = 'E' description = 'Paris Salad')
( supplement_id = 'ML-0007' price = '12.00' currency_code = 'EUR' language_code = 'E' description = 'Hamburg Salad with Eggs' )
( supplement_id = 'ML-0008' price = '25.00' currency_code = 'EUR' language_code = 'E' description = 'Quail with French Salad and Black Forest Cake')
( supplement_id = 'ML-0009' price = '13.00' currency_code = 'EUR' language_code = 'E' description = 'Duck on Lettuce' )
( supplement_id = 'ML-0010' price = '5.00' currency_code = 'EUR' language_code = 'E' description = 'Carpaccio')
( supplement_id = 'ML-0011' price = '7.00' currency_code = 'EUR' language_code = 'E' description = 'Seasonal Salad')
( supplement_id = 'ML-0012' price = '16.00' currency_code = 'EUR' language_code = 'E' description = 'Hamburg Salad with Fresh Shrimps')
( supplement_id = 'ML-0013' price = '17.00' currency_code = 'EUR' language_code = 'E' description = 'Quail')
( supplement_id = 'ML-0014' price = '14.00' currency_code = 'EUR' language_code = 'E' description = 'Wiener Schnitzel')
( supplement_id = 'ML-0015' price = '13.00' currency_code = 'EUR' language_code = 'E' description = 'Pork Schnitzel')
( supplement_id = 'ML-0016' price = '14.00' currency_code = 'EUR' language_code = 'E' description = 'Schnitzel with Pepper Sauce')
( supplement_id = 'ML-0017' price = '11.00' currency_code = 'EUR' language_code = 'E' description = 'Chicken and French Fries')
( supplement_id = 'ML-0018' price = '12.00' currency_code = 'EUR' language_code = 'E' description = 'Turkey Steak')
( supplement_id = 'ML-0019' price = '15.00' currency_code = 'EUR' language_code = 'E' description = 'Bavarian Duck')
( supplement_id = 'ML-0020' price = '14.00' currency_code = 'EUR' language_code = 'E' description = 'Knuckle of Pork')
( supplement_id = 'ML-0021' price = '22.00' currency_code = 'EUR' language_code = 'E' description = 'Fillet of Beef')
( supplement_id = 'ML-0022' price = '21.00' currency_code = 'EUR' language_code = 'E' description = 'Trout Au Bleu')
( supplement_id = 'ML-0023' price = '20.00' currency_code = 'EUR' language_code = 'E' description = 'Trout Meuniere')
( supplement_id = 'ML-0024' price = '17.00' currency_code = 'EUR' language_code = 'E' description = 'Monkfish')
( supplement_id = 'ML-0025' price = '12.00' currency_code = 'EUR' language_code = 'E' description = 'Sole')
( supplement_id = 'ML-0026' price = '6.00' currency_code = 'EUR' language_code = 'E' description = 'Mini Fried Sole')
( supplement_id = 'ML-0027' price = '14.00' currency_code = 'EUR' language_code = 'E' description = 'Salmon in a Bearnaise Sauce')
( supplement_id = 'ML-0028' price = '15.00' currency_code = 'EUR' language_code = 'E' description = 'Salmon Lasagne')
( supplement_id = 'ML-0029' price = '3.00' currency_code = 'EUR' language_code = 'E' description = 'Chocolate Ice Cream')
( supplement_id = 'ML-0030' price = '2.50' currency_code = 'EUR' language_code = 'E' description = 'Vanilla Ice Cream')
( supplement_id = 'ML-0031' price = '4.50' currency_code = 'EUR' language_code = 'E' description = 'Vanilla Ice Cream with Hot Cherries')
( supplement_id = 'ML-0032' price = '4.50' currency_code = 'EUR' language_code = 'E' description = 'Vanilla Ice Cream with Hot Raspberries')
( supplement_id = 'ML-0033' price = '4.00' currency_code = 'EUR' language_code = 'E' description = 'Apple Strudel')
( supplement_id = 'ML-0034' price = '4.00' currency_code = 'EUR' language_code = 'E' description = 'Raspberry Sorbet')
( supplement_id = 'ML-0035' price = '4.00' currency_code = 'EUR' language_code = 'E' description = 'Strawberry Sorbet')
( supplement_id = 'LU-0001' price = '40.00' currency_code = 'EUR' language_code = 'E' description = 'Extra baggage 5 kgs')
( supplement_id = 'LU-0002' price = '15.00' currency_code = 'EUR' language_code = 'E' description = 'Luggage transfer from airport to hotel')
( supplement_id = 'LU-0003' price = '75.00' currency_code = 'EUR' language_code = 'E' description = 'Luggage pickup from home and return ' )
( supplement_id = 'LU-0004' price = '80.00' currency_code = 'EUR' language_code = 'E' description = 'Bulky goods like sports equipment' )
) .
ENDMETHOD.
ENDCLASS.
CLASS lcl_travel_data_generator DEFINITION DEFERRED.
CLASS /dmo/cl_flight_data_generat_30 DEFINITION LOCAL FRIENDS lcl_travel_data_generator.
CLASS lcl_travel_data_generator DEFINITION CREATE PRIVATE.
PUBLIC SECTION.
INTERFACES: lif_data_generator.
TYPES: tt_travel TYPE STANDARD TABLE OF /dmo/travel30 WITH KEY travel_id,
tt_bookings TYPE STANDARD TABLE OF /dmo/booking30 WITH KEY travel_id booking_id,
tt_booking_supplements TYPE STANDARD TABLE OF /dmo/book_sup_30 WITH KEY travel_id booking_id booking_supplement_id.
" Build nested tables
TYPES BEGIN OF ty_booking_complete.
INCLUDE TYPE /dmo/booking30.
TYPES booking_supplements TYPE tt_booking_supplements.
TYPES END OF ty_booking_complete.
TYPES tt_booking_complete TYPE STANDARD TABLE OF ty_booking_complete WITH KEY travel_id booking_id.
TYPES BEGIN OF ty_travel_complete.
INCLUDE TYPE /dmo/travel30.
TYPES bookings TYPE tt_booking_complete.
TYPES END OF ty_travel_complete.
"! <em>Travel</em> structure <br/>
"! <em>Bookings</em> table <br/>
"! --> <em>Booking</em> structure <br/>
"! --> <em>Booking Supplement</em> table <br/>
"! -----> <em>Booking Supplement</em> structure
TYPES tt_travel_complete TYPE STANDARD TABLE OF ty_travel_complete WITH KEY travel_id.
PROTECTED SECTION.
PRIVATE SECTION.
TYPES: BEGIN OF ty_countryname,
country TYPE i_countrytext-country,
countryname TYPE i_countrytext-countryname,
END OF ty_countryname.
CONSTANTS: cv_travel_group_amount_max TYPE i VALUE 3,
cv_trip_length_center TYPE i VALUE 3,
cv_trip_length_offset TYPE i VALUE 2,
cv_booking_date_min TYPE i VALUE 0,
cv_booking_date_max TYPE i VALUE 20,
cv_travel_create_dat_befor_min TYPE i VALUE 0,
cv_travel_create_dat_befor_max TYPE i VALUE 40,
cv_travel_change_date_min TYPE i VALUE 0,
cv_travel_change_date_max TYPE i VALUE 10,
cv_booking_supplement_amount TYPE i VALUE 5,
cv_booking_days_before TYPE i VALUE 15.
CLASS-DATA:
go_random_seats TYPE REF TO cl_abap_random_int,
gt_flights_seats_decrease TYPE lcl_flight_data_generator=>tt_flights,
go_ran_travel_group_amount TYPE REF TO cl_abap_random_int,
go_ran_trip_length TYPE REF TO cl_abap_random_int,
go_ran_customer TYPE REF TO cl_abap_random_int,
gt_agency TYPE lcl_agency_data_generator=>tt_agency,
gt_customer TYPE lcl_customer_data_generator=>tt_customer,
gt_flights_final TYPE lcl_flight_data_generator=>tt_flights,
go_ran_booking_date TYPE REF TO cl_abap_random_int,
go_ran_agency TYPE REF TO cl_abap_random_int,
gt_connections TYPE lcl_connection_data_generator=>tt_connection_additional_info,
go_ran_booking_supplement_id TYPE REF TO cl_abap_random_int,
go_ran_booking_supplement_amnt TYPE REF TO cl_abap_random_int,
gt_supplements TYPE lcl_supplement_data_generator=>tt_supplement_complete,
go_ran_travel_description TYPE REF TO cl_abap_random_int,
go_ran_travel_create_dat_befor TYPE REF TO cl_abap_random_int,
go_ran_travel_change_date TYPE REF TO cl_abap_random_int,
go_ran_hour TYPE REF TO cl_abap_random_int,
go_ran_min_sec TYPE REF TO cl_abap_random_int,
gt_airports TYPE lcl_airport_data_generator=>tt_airport,
gt_countryname TYPE STANDARD TABLE OF ty_countryname WITH KEY country,
go_ran_status_description TYPE REF TO cl_abap_random_int,
gt_last_names TYPE lcl_customer_data_generator=>tt_last_name,
go_ran_last_name TYPE REF TO cl_abap_random_int,
go_ran_customer_travel TYPE REF TO cl_abap_random_int,
mv_datum TYPE d.
CLASS-METHODS:
get_data
RETURNING
VALUE(rt_data) TYPE tt_travel_complete,
build_booking
IMPORTING
iv_travel_id TYPE /dmo/booking30-travel_id
RETURNING
VALUE(rt_bookings) TYPE tt_booking_complete,
build_dependend_content,
find_next_fitting_flight
IMPORTING
iv_seats_required TYPE i
is_flight_previous TYPE /dmo/flight30 OPTIONAL
RETURNING
VALUE(rs_flight) TYPE /dmo/flight30,
generate_booking_supplements
IMPORTING
iv_travel_id TYPE /dmo/booking30-travel_id
iv_booking_id TYPE /dmo/booking30-booking_id
RETURNING
VALUE(rt_data) TYPE tt_booking_supplements,
generate_description
IMPORTING
it_bookings TYPE lcl_travel_data_generator=>tt_booking_complete
RETURNING
VALUE(rv_description) TYPE /dmo/travel30-description,
generate_random_time
RETURNING
VALUE(r_result) TYPE i,
calculate_booking_fee
IMPORTING
it_bookings TYPE lcl_travel_data_generator=>tt_booking_complete
RETURNING
VALUE(rv_booking_fee) TYPE /dmo/travel30-booking_fee,
generate_travel_customer_id
IMPORTING
it_bookings TYPE lcl_travel_data_generator=>tt_booking_complete
RETURNING
VALUE(rv_customer_id) TYPE /dmo/travel30-customer_id,
set_today,
calc_days_before_book_or_today
IMPORTING
iv_booking_date TYPE lcl_travel_data_generator=>ty_booking_complete-booking_date
RETURNING
VALUE(rv_travel_create_date_dats) TYPE d
RAISING
cx_parameter_invalid_range
cx_parameter_invalid_type .
ENDCLASS.
CLASS lcl_travel_data_generator IMPLEMENTATION.
METHOD lif_data_generator~create.
DATA: lt_travels TYPE tt_travel,
lt_bookings TYPE tt_bookings,
lt_booking_supplements TYPE tt_booking_supplements.
IF out IS BOUND. out->write( '--> Delete Travel Content.' ). ENDIF.
DELETE FROM /dmo/travel30. "#EC CI_NOWHERE
IF out IS BOUND. out->write( '--> Delete Booking Content.' ). ENDIF.
DELETE FROM /dmo/booking30. "#EC CI_NOWHERE
IF out IS BOUND. out->write( '--> Delete Booking Supplement Content.' ). ENDIF.
DELETE FROM /dmo/book_sup_30. "#EC CI_NOWHERE
IF out IS BOUND. out->write( '--> Build Content.' ). ENDIF.
DATA(lt_data) = get_data( ).
IF out IS BOUND. out->write( '--> Convert Content to Table Format' ). ENDIF.
LOOP AT lt_data INTO DATA(ls_travel).
APPEND CORRESPONDING /dmo/travel30( ls_travel ) TO lt_travels.
LOOP AT ls_travel-bookings INTO DATA(ls_booking).
APPEND CORRESPONDING /dmo/booking30( ls_booking ) TO lt_bookings.
APPEND LINES OF ls_booking-booking_supplements TO lt_booking_supplements.
ENDLOOP.
ENDLOOP.
IF out IS BOUND. out->write( '--> Insert Travel Content' ). ENDIF.
INSERT /dmo/travel30 FROM TABLE @lt_travels.
IF out IS BOUND. out->write( '--> Insert Booking Content' ). ENDIF.
INSERT /dmo/booking30 FROM TABLE @lt_bookings.
IF out IS BOUND. out->write( '--> Insert Booking Supplement Content' ). ENDIF.
INSERT /dmo/book_sup_30 FROM TABLE @lt_booking_supplements.
IF out IS BOUND. out->write( '--> Done.' ). ENDIF.
ENDMETHOD.
METHOD get_data.
DATA: lv_travel_id TYPE /dmo/booking30-travel_id.
build_dependend_content( ).
set_today( ).
lv_travel_id = 1.
DATA(lt_bookings) = build_booking( lv_travel_id ).
WHILE lt_bookings IS NOT INITIAL.
DATA(lv_travel_create_date_dats) = calc_days_before_book_or_today( lt_bookings[ 1 ]-booking_date ).
DATA(lv_booking_fee) = calculate_booking_fee( lt_bookings ).
DATA(lastchanged_date) = lv_travel_create_date_dats.
lastchanged_date = lastchanged_date + go_ran_travel_change_date->get_next( ).
DATA(lastchangedat_stamp) = CONV timestampl( ( CONV string( lastchanged_date ) * 1000000 ) ).
lastchangedat_stamp = lastchangedat_stamp + generate_random_time( ).
APPEND VALUE ty_travel_complete(
travel_id = lv_travel_id
agency_id = gt_agency[ go_ran_agency->get_next( ) ]-agency_id
customer_id = generate_travel_customer_id( lt_bookings )
begin_date = lt_bookings[ 1 ]-flight_date
end_date = lt_bookings[ lines( lt_bookings ) ]-flight_date
booking_fee = lv_booking_fee
total_price = lv_booking_fee + REDUCE /dmo/travel30-total_price( INIT sum = 0
FOR booking IN lt_bookings
NEXT
sum = sum
+ booking-flight_price
+ REDUCE /dmo/flight_price30( INIT sum_supplement = 0
FOR booking_supplement IN booking-booking_supplements
NEXT sum_supplement = sum_supplement + booking_supplement-price )
)
currency_code = lt_bookings[ 1 ]-currency_code
description = generate_description( lt_bookings )
status = SWITCH /dmo/travel30-status( go_ran_status_description->get_next( )
WHEN 1 OR 2 THEN /dmo/if_flight_legacy30=>travel_status-new
WHEN 3 THEN /dmo/if_flight_legacy30=>travel_status-booked
WHEN 4 THEN /dmo/if_flight_legacy30=>travel_status-planned )
createdby = gt_last_names[ go_ran_last_name->get_next( ) ]-last_name
createdat = CONV timestampl( CONV string( lv_travel_create_date_dats ) * 1000000 + generate_random_time( ) )
lastchangedby = gt_last_names[ go_ran_last_name->get_next( ) ]-last_name
lastchangedat = lastchangedat_stamp
bookings = lt_bookings
) TO rt_data.
lv_travel_id = lv_travel_id + 1.
lt_bookings = build_booking( lv_travel_id ).
ENDWHILE.
ENDMETHOD.
METHOD calc_days_before_book_or_today.
cl_abap_tstmp=>td_add(
EXPORTING
date = COND d( WHEN mv_datum > iv_booking_date
THEN iv_booking_date
ELSE mv_datum )
time = CONV t( 0 )
secs = -86400 * cv_booking_days_before
IMPORTING
res_date = rv_travel_create_date_dats ).
ENDMETHOD.
METHOD set_today.
GET TIME STAMP FIELD DATA(current_timestamp).
DATA(tmp) = CONV string( current_timestamp ).
mv_datum = tmp(8).
mv_datum = mv_datum - 1.
ENDMETHOD.
METHOD generate_random_time.
r_result = go_ran_hour->get_next( ) * 10000 + go_ran_min_sec->get_next( ) * 100 + go_ran_min_sec->get_next( ).
ENDMETHOD.
METHOD build_dependend_content.
go_ran_hour = cl_abap_random_int=>create( min = 0 max = 23 ).
go_ran_min_sec = cl_abap_random_int=>create( min = 0 max = 59 ).
gt_agency = lcl_agency_data_generator=>get_data( ).
go_ran_agency = cl_abap_random_int=>create( min = 1 max = lines( gt_agency ) ).
gt_customer = lcl_customer_data_generator=>get_data( ).
go_ran_customer = cl_abap_random_int=>create( min = 1 max = lines( gt_customer ) ).
gt_last_names = lcl_customer_data_generator=>build_last_names( ).
go_ran_last_name = cl_abap_random_int=>create( min = 1 max = lines( gt_last_names ) ).
go_ran_customer_travel = cl_abap_random_int=>create( min = 1 max = 4 ).
gt_connections = lcl_connection_data_generator=>get_data( ).
gt_airports = lcl_airport_data_generator=>get_data( ).
SELECT FROM i_countrytext FIELDS country, countryname WHERE language = 'E' INTO TABLE @gt_countryname.
gt_flights_final = lcl_flight_data_generator=>get_data( ).
SORT gt_flights_final BY flight_date ASCENDING.
gt_flights_seats_decrease = lcl_flight_data_generator=>get_data( ).
SORT gt_flights_seats_decrease BY flight_date ASCENDING.
go_ran_travel_group_amount = cl_abap_random_int=>create( min = 1 max = cv_travel_group_amount_max ).
go_ran_trip_length = cl_abap_random_int=>create( min = cv_trip_length_center - cv_trip_length_offset max = cv_trip_length_center + cv_trip_length_offset ).
go_ran_booking_date = cl_abap_random_int=>create( min = cv_booking_date_min max = cv_booking_date_max ).
go_ran_travel_create_dat_befor = cl_abap_random_int=>create( min = cv_booking_date_min max = cv_booking_date_max ).
go_ran_travel_change_date = cl_abap_random_int=>create( min = cv_booking_date_min max = cv_booking_date_max ).
gt_supplements = lcl_supplement_data_generator=>get_data( ).
go_ran_booking_supplement_id = cl_abap_random_int=>create( min = 1 max = lines( lcl_supplement_data_generator=>get_data( ) ) ).
go_ran_booking_supplement_amnt = cl_abap_random_int=>create( min = 0 max = cv_booking_supplement_amount ).
go_ran_status_description = cl_abap_random_int=>create( min = 1 max = 4 ).
go_ran_travel_description = cl_abap_random_int=>create( min = 0 max = 9 ).
ENDMETHOD.
METHOD build_booking.
TYPES: tt_customer_id TYPE TABLE OF /dmo/customer30-customer_id WITH EMPTY KEY.
DATA: lv_booking_id TYPE /dmo/booking30-booking_id,
lt_customer_id TYPE tt_customer_id,
lv_customer_amount TYPE i.
DATA(lv_trip_length) = go_ran_trip_length->get_next( ).
lt_customer_id = VALUE tt_customer_id(
FOR i = 1 THEN i + 1 WHILE i <= go_ran_travel_group_amount->get_next( )
LET j = go_ran_customer->get_next( ) IN
( gt_customer[ j ]-customer_id )
).
lt_customer_id = CORRESPONDING tt_customer_id( lt_customer_id DISCARDING DUPLICATES ).
lv_customer_amount = lines( lt_customer_id ).
lv_booking_id = 0.
DATA(ls_flight) = find_next_fitting_flight( iv_seats_required = lv_customer_amount ).
CHECK ls_flight IS NOT INITIAL.
DO lv_trip_length TIMES.
READ TABLE gt_flights_seats_decrease
WITH KEY key_sorted_date
COMPONENTS
carrier_id = ls_flight-carrier_id
connection_id = ls_flight-connection_id
flight_date = ls_flight-flight_date
ASSIGNING FIELD-SYMBOL(<flight>).
DATA(lv_booking_date) = CONV /dmo/booking30-booking_date( <flight>-flight_date - go_ran_booking_date->get_next( ) ).
DATA(lv_price) = /dmo/cl_flight_data_generat_30=>calculate_flight_price(
iv_flight_distance = gt_connections[ carrier_id = <flight>-carrier_id connection_id = <flight>-connection_id ]-distance
iv_seats_occupied_percent = ( gt_flights_final[ KEY primary_key ##PRIMKEY[KEY_SORTED_DATE]
carrier_id = <flight>-carrier_id
connection_id = <flight>-connection_id
flight_date = <flight>-flight_date
]-seats_occupied
- <flight>-seats_occupied
) * 100 DIV <flight>-seats_max
).
<flight>-seats_occupied = <flight>-seats_occupied - lv_customer_amount.
APPEND LINES OF VALUE tt_booking_complete(
FOR i = 1 THEN i + 1 WHILE i <= lines( lt_customer_id )
(
travel_id = iv_travel_id
booking_id = lv_booking_id + i
booking_date = lv_booking_date
customer_id = lt_customer_id[ i ]
carrier_id = <flight>-carrier_id
connection_id = <flight>-connection_id
flight_date = <flight>-flight_date
flight_price = lv_price
currency_code = <flight>-currency_code
booking_supplements = generate_booking_supplements( iv_travel_id = iv_travel_id iv_booking_id = CONV /dmo/booking30-booking_id( lv_booking_id + i ) )
)
) TO rt_bookings.
lv_booking_id = lv_booking_id + lines( lt_customer_id ).
ls_flight = find_next_fitting_flight(
iv_seats_required = lv_customer_amount
is_flight_previous = <flight>
).
IF ls_flight IS INITIAL.
EXIT.
ENDIF.
ENDDO.
ENDMETHOD.
METHOD find_next_fitting_flight.
DATA(lt_flights_filtered) = FILTER lcl_flight_data_generator=>tt_flights(
gt_flights_seats_decrease
USING KEY key_sorted_seats
WHERE seats_occupied >= iv_seats_required
).
CHECK lt_flights_filtered IS NOT INITIAL.
IF is_flight_previous IS SUPPLIED.
DATA(lv_connection_id_new) = VALUE /dmo/connecti_30-connection_id( gt_connections[
airport_from_id = gt_connections[
connection_id = is_flight_previous-connection_id
]-airport_to_id
]-connection_id
OPTIONAL ).
CHECK lv_connection_id_new IS NOT INITIAL.
DATA(lt_flights_filtered2) = FILTER lcl_flight_data_generator=>tt_flights(
lt_flights_filtered
USING KEY key_sorted_date
WHERE connection_id = lv_connection_id_new
AND flight_date >= is_flight_previous-flight_date
).
CHECK lt_flights_filtered2 IS NOT INITIAL.
rs_flight = lt_flights_filtered2[ 1 ].
ELSE.
rs_flight = lt_flights_filtered[ 1 ].
ENDIF.
ENDMETHOD.
METHOD generate_booking_supplements.
rt_data = VALUE tt_booking_supplements(
FOR i = 1
THEN i + 1
WHILE i <= go_ran_booking_supplement_amnt->get_next( )
LET j = go_ran_booking_supplement_id->get_next( ) IN
( travel_id = iv_travel_id
booking_id = iv_booking_id
booking_supplement_id = i
supplement_id = gt_supplements[ j ]-supplement_id
price = gt_supplements[ j ]-price
currency_code = gt_supplements[ j ]-currency_code )
).
ENDMETHOD.
METHOD generate_description.
TYPES: tt_customers TYPE SORTED TABLE OF /dmo/customer30 WITH UNIQUE KEY customer_id.
rv_description = SWITCH /dmo/travel30-description(
go_ran_travel_description->get_next( )
WHEN 1 THEN `Business Trip for ` &&
REDUCE /dmo/travel30-description(
LET travelers = CORRESPONDING tt_customers( it_bookings DISCARDING DUPLICATES MAPPING customer_id = customer_id ) IN
INIT s = `` i = 1
FOR traveler IN travelers
NEXT s = s && gt_customer[ customer_id = traveler-customer_id ]-first_name
&& COND /dmo/travel30-description( WHEN i < lines( it_bookings ) THEN `, ` )
i = i + 1 )
WHEN 2 THEN `Vacation for ` &&
REDUCE /dmo/travel30-description(
LET travelers2 = CORRESPONDING tt_customers( it_bookings DISCARDING DUPLICATES MAPPING customer_id = customer_id ) IN
INIT s = `` i = 1
FOR traveler IN travelers2
NEXT s = s && gt_customer[ customer_id = traveler-customer_id ]-first_name
&& COND /dmo/travel30-description( WHEN i < lines( it_bookings ) THEN `, ` )
i = i + 1 )
WHEN 3 THEN `Business Trip to ` &&
gt_countryname[
country = gt_airports[
airport_id = gt_connections[
carrier_id = it_bookings[ 1 ]-carrier_id connection_id = it_bookings[ 1 ]-connection_id
]-airport_to_id
]-country
]-countryname
WHEN 4 THEN `Vacation to ` &&
gt_countryname[
country = gt_airports[
airport_id = gt_connections[
carrier_id = it_bookings[ 1 ]-carrier_id connection_id = it_bookings[ 1 ]-connection_id
]-airport_to_id
]-country
]-countryname
WHEN 5 THEN `Sightseeing in ` && gt_airports[
airport_id = gt_connections[
carrier_id = it_bookings[ 1 ]-carrier_id connection_id = it_bookings[ 1 ]-connection_id
]-airport_to_id
]-city
WHEN 6 THEN `Visiting ` && gt_customer[ go_ran_customer->get_next( ) ]-first_name
WHEN 7 THEN `Business Trip`
ELSE `Vacation`
).
ENDMETHOD.
METHOD calculate_booking_fee.
rv_booking_fee = 10 * lines( it_bookings ).
ENDMETHOD.
METHOD generate_travel_customer_id.
rv_customer_id = COND /dmo/travel30-customer_id(
WHEN go_ran_customer_travel->get_next( ) = 1
THEN gt_customer[ go_ran_customer->get_next( ) ]-customer_id
ELSE it_bookings[ 1 ]-customer_id
).
ENDMETHOD.
ENDCLASS.
| [
41358,
49836,
3868,
62,
7890,
62,
8612,
1352,
13,
198,
220,
42715,
12,
49273,
50,
25,
198,
220,
220,
220,
2251,
198,
220,
220,
220,
220,
220,
30023,
9863,
2751,
503,
41876,
4526,
37,
5390,
611,
62,
2238,
62,
324,
83,
62,
4871,
5143,
62,
448,
39852,
2849,
1847,
13,
198,
10619,
41358,
49836,
13,
198,
198,
31631,
300,
565,
62,
40955,
62,
7890,
62,
8612,
1352,
5550,
20032,
17941,
29244,
6158,
4810,
3824,
6158,
13,
628,
220,
44731,
44513,
13,
198,
220,
220,
220,
23255,
37,
2246,
1546,
25,
3868,
62,
7890,
62,
8612,
1352,
13,
198,
220,
220,
220,
24412,
47,
1546,
25,
256,
83,
62,
40955,
41876,
49053,
9795,
43679,
3963,
1220,
67,
5908,
14,
40955,
1270,
13315,
35374,
4086,
62,
312,
13,
198,
220,
220,
220,
42715,
12,
49273,
50,
25,
651,
62,
7890,
198,
220,
220,
220,
220,
220,
30826,
4261,
15871,
26173,
8924,
7,
17034,
62,
7890,
8,
41876,
256,
83,
62,
40955,
13,
198,
220,
48006,
9782,
1961,
44513,
13,
198,
220,
4810,
3824,
6158,
44513,
13,
198,
10619,
31631,
13,
198,
198,
31631,
300,
565,
62,
40955,
62,
7890,
62,
8612,
1352,
30023,
2538,
10979,
6234,
13,
628,
220,
337,
36252,
3868,
62,
7890,
62,
8612,
1352,
93,
17953,
13,
198,
220,
220,
220,
16876,
503,
3180,
347,
15919,
13,
220,
503,
3784,
13564,
7,
705,
46904,
23520,
14041,
2637,
6739,
220,
23578,
5064,
13,
198,
220,
220,
220,
5550,
2538,
9328,
16034,
1220,
67,
5908,
14,
40955,
1270,
13,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
25113,
2943,
14514,
62,
45669,
39,
9338,
628,
220,
220,
220,
16876,
503,
3180,
347,
15919,
13,
220,
503,
3784,
13564,
7,
705,
46904,
10934,
14041,
2637,
6739,
23578,
5064,
13,
198,
220,
220,
220,
42865,
7,
2528,
62,
7890,
8,
796,
651,
62,
7890,
7,
6739,
628,
220,
220,
220,
16876,
503,
3180,
347,
15919,
13,
220,
503,
3784,
13564,
7,
705,
46904,
35835,
14041,
2637,
6739,
23578,
5064,
13,
198,
220,
220,
220,
29194,
17395,
1220,
67,
5908,
14,
40955,
1270,
16034,
43679,
2488,
2528,
62,
7890,
13,
628,
220,
220,
220,
16876,
503,
3180,
347,
15919,
13,
220,
503,
3784,
13564,
7,
705,
46904,
24429,
2637,
6739,
23578,
5064,
13,
198,
220,
23578,
49273,
13,
628,
220,
337,
36252,
651,
62,
7890,
13,
198,
220,
220,
220,
374,
83,
62,
7890,
796,
26173,
8924,
256,
83,
62,
40955,
7,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
357,
4086,
62,
312,
796,
705,
2998,
18005,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1438,
220,
220,
220,
220,
220,
796,
705,
16012,
19489,
13524,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4675,
220,
220,
220,
796,
705,
19880,
2688,
3530,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
30793,
62,
8189,
220,
796,
705,
20,
3559,
1954,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1748,
220,
220,
220,
220,
220,
796,
705,
49,
420,
19593,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1499,
62,
8189,
220,
220,
796,
705,
2937,
705,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3072,
62,
17618,
796,
705,
10,
16,
860,
486,
12,
21,
2624,
12,
3980,
1238,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3992,
62,
21975,
220,
220,
220,
220,
220,
220,
796,
705,
4023,
1378,
2503,
13,
19155,
19489,
12,
35927,
13,
82,
499,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3053,
62,
21975,
796,
705,
10951,
31,
19155,
19489,
12,
35927,
13,
82,
499,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1267,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
357,
4086,
62,
312,
796,
705,
2998,
34215,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1438,
220,
220,
220,
220,
220,
796,
705,
33771,
3334,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
4675,
220,
220,
220,
796,
705,
24814,
24683,
978,
7197,
1367,
220,
220,
220,
220,
220,
220,
220,
705,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
30793,
62,
8189,
220,
796,
705,
26200,
1795,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1748,
220,
220,
220,
220,
220,
796,
705,
35,
947,
325,
335,
24263,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1499,
62,
8189,
220,
220,
796,
705,
7206,
705,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3072,
62,
17618,
796,
705,
10,
2920,
362,
15377,
8644,
31046,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3992,
62,
21975,
220,
220,
220,
220,
220,
220,
796,
705,
4023,
1378,
2503,
13,
12254,
8929,
13,
82,
499,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
3053,
62,
21975,
796,
705,
10951,
31,
12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
1,
1,
1,
1,
1
] |
class ZCL_EXCEL_STYLE_CONDITIONAL definition
public
final
create public .
public section.
*"* public components of class ZCL_EXCEL_STYLE_CONDITIONAL
*"* do not include other source files here!!!
constants C_CFVO_TYPE_FORMULA type ZEXCEL_CONDITIONAL_TYPE value 'formula'. "#EC NOTEXT
constants C_CFVO_TYPE_MAX type ZEXCEL_CONDITIONAL_TYPE value 'max'. "#EC NOTEXT
constants C_CFVO_TYPE_MIN type ZEXCEL_CONDITIONAL_TYPE value 'min'. "#EC NOTEXT
constants C_CFVO_TYPE_NUMBER type ZEXCEL_CONDITIONAL_TYPE value 'num'. "#EC NOTEXT
constants C_CFVO_TYPE_PERCENT type ZEXCEL_CONDITIONAL_TYPE value 'percent'. "#EC NOTEXT
constants C_CFVO_TYPE_PERCENTILE type ZEXCEL_CONDITIONAL_TYPE value 'percentile'. "#EC NOTEXT
constants C_ICONSET_3ARROWS type ZEXCEL_CONDITION_RULE_ICONSET value '3Arrows'. "#EC NOTEXT
constants C_ICONSET_3ARROWSGRAY type ZEXCEL_CONDITION_RULE_ICONSET value '3ArrowsGray'. "#EC NOTEXT
constants C_ICONSET_3FLAGS type ZEXCEL_CONDITION_RULE_ICONSET value '3Flags'. "#EC NOTEXT
constants C_ICONSET_3SIGNS type ZEXCEL_CONDITION_RULE_ICONSET value '3Signs'. "#EC NOTEXT
constants C_ICONSET_3SYMBOLS type ZEXCEL_CONDITION_RULE_ICONSET value '3Symbols'. "#EC NOTEXT
constants C_ICONSET_3SYMBOLS2 type ZEXCEL_CONDITION_RULE_ICONSET value '3Symbols2'. "#EC NOTEXT
constants C_ICONSET_3TRAFFICLIGHTS type ZEXCEL_CONDITION_RULE_ICONSET value ''. "#EC NOTEXT
constants C_ICONSET_3TRAFFICLIGHTS2 type ZEXCEL_CONDITION_RULE_ICONSET value '3TrafficLights2'. "#EC NOTEXT
constants C_ICONSET_4ARROWS type ZEXCEL_CONDITION_RULE_ICONSET value '4Arrows'. "#EC NOTEXT
constants C_ICONSET_4ARROWSGRAY type ZEXCEL_CONDITION_RULE_ICONSET value '4ArrowsGray'. "#EC NOTEXT
constants C_ICONSET_4RATING type ZEXCEL_CONDITION_RULE_ICONSET value '4Rating'. "#EC NOTEXT
constants C_ICONSET_4REDTOBLACK type ZEXCEL_CONDITION_RULE_ICONSET value '4RedToBlack'. "#EC NOTEXT
constants C_ICONSET_4TRAFFICLIGHTS type ZEXCEL_CONDITION_RULE_ICONSET value '4TrafficLights'. "#EC NOTEXT
constants C_ICONSET_5ARROWS type ZEXCEL_CONDITION_RULE_ICONSET value '5Arrows'. "#EC NOTEXT
constants C_ICONSET_5ARROWSGRAY type ZEXCEL_CONDITION_RULE_ICONSET value '5ArrowsGray'. "#EC NOTEXT
constants C_ICONSET_5QUARTERS type ZEXCEL_CONDITION_RULE_ICONSET value '5Quarters'. "#EC NOTEXT
constants C_ICONSET_5RATING type ZEXCEL_CONDITION_RULE_ICONSET value '5Rating'. "#EC NOTEXT
constants C_OPERATOR_BEGINSWITH type ZEXCEL_CONDITION_OPERATOR value 'beginsWith'. "#EC NOTEXT
constants C_OPERATOR_BETWEEN type ZEXCEL_CONDITION_OPERATOR value 'between'. "#EC NOTEXT
constants C_OPERATOR_CONTAINSTEXT type ZEXCEL_CONDITION_OPERATOR value 'containsText'. "#EC NOTEXT
constants C_OPERATOR_ENDSWITH type ZEXCEL_CONDITION_OPERATOR value 'endsWith'. "#EC NOTEXT
constants C_OPERATOR_EQUAL type ZEXCEL_CONDITION_OPERATOR value 'equal'. "#EC NOTEXT
constants C_OPERATOR_GREATERTHAN type ZEXCEL_CONDITION_OPERATOR value 'greaterThan'. "#EC NOTEXT
constants C_OPERATOR_GREATERTHANOREQUAL type ZEXCEL_CONDITION_OPERATOR value 'greaterThanOrEqual'. "#EC NOTEXT
constants C_OPERATOR_LESSTHAN type ZEXCEL_CONDITION_OPERATOR value 'lessThan'. "#EC NOTEXT
constants C_OPERATOR_LESSTHANOREQUAL type ZEXCEL_CONDITION_OPERATOR value 'lessThanOrEqual'. "#EC NOTEXT
constants C_OPERATOR_NONE type ZEXCEL_CONDITION_OPERATOR value ''. "#EC NOTEXT
constants C_OPERATOR_NOTCONTAINS type ZEXCEL_CONDITION_OPERATOR value 'notContains'. "#EC NOTEXT
constants C_OPERATOR_NOTEQUAL type ZEXCEL_CONDITION_OPERATOR value 'notEqual'. "#EC NOTEXT
constants C_RULE_CELLIS type ZEXCEL_CONDITION_RULE value 'cellIs'. "#EC NOTEXT
constants C_RULE_CONTAINSTEXT type ZEXCEL_CONDITION_RULE value 'containsText'. "#EC NOTEXT
constants C_RULE_DATABAR type ZEXCEL_CONDITION_RULE value 'dataBar'. "#EC NOTEXT
constants C_RULE_EXPRESSION type ZEXCEL_CONDITION_RULE value 'expression'. "#EC NOTEXT
constants C_RULE_ICONSET type ZEXCEL_CONDITION_RULE value 'iconSet'. "#EC NOTEXT
constants C_RULE_COLORSCALE type ZEXCEL_CONDITION_RULE value 'colorScale'. "#EC NOTEXT
constants C_RULE_NONE type ZEXCEL_CONDITION_RULE value 'none'. "#EC NOTEXT
constants C_RULE_TOP10 type ZEXCEL_CONDITION_RULE value 'top10'. "#EC NOTEXT
constants C_RULE_ABOVE_AVERAGE type ZEXCEL_CONDITION_RULE value 'aboveAverage'. "#EC NOTEXT
constants C_SHOWVALUE_FALSE type ZEXCEL_CONDITIONAL_SHOW_VALUE value 0. "#EC NOTEXT
constants C_SHOWVALUE_TRUE type ZEXCEL_CONDITIONAL_SHOW_VALUE value 1. "#EC NOTEXT
data MODE_CELLIS type ZEXCEL_CONDITIONAL_CELLIS .
data MODE_COLORSCALE type ZEXCEL_CONDITIONAL_COLORSCALE .
data MODE_DATABAR type ZEXCEL_CONDITIONAL_DATABAR .
data MODE_EXPRESSION type ZEXCEL_CONDITIONAL_EXPRESSION .
data MODE_ICONSET type ZEXCEL_CONDITIONAL_ICONSET .
data MODE_TOP10 type ZEXCEL_CONDITIONAL_TOP10 .
data MODE_ABOVE_AVERAGE type ZEXCEL_CONDITIONAL_ABOVE_AVG .
data PRIORITY type ZEXCEL_STYLE_PRIORITY value 1. "#EC NOTEXT . . . . . . . . . . . . . . . . " .
data RULE type ZEXCEL_CONDITION_RULE .
methods CONSTRUCTOR .
methods GET_DIMENSION_RANGE
returning
value(EP_DIMENSION_RANGE) type STRING .
methods SET_RANGE
importing
!IP_START_ROW type ZEXCEL_CELL_ROW
!IP_START_COLUMN type ZEXCEL_CELL_COLUMN_ALPHA
!IP_STOP_ROW type ZEXCEL_CELL_ROW
!IP_STOP_COLUMN type ZEXCEL_CELL_COLUMN_ALPHA .
methods ADD_RANGE
importing
!IP_START_ROW type ZEXCEL_CELL_ROW
!IP_START_COLUMN type ZEXCEL_CELL_COLUMN_ALPHA
!IP_STOP_ROW type ZEXCEL_CELL_ROW
!IP_STOP_COLUMN type ZEXCEL_CELL_COLUMN_ALPHA .
class ZCL_EXCEL_STYLE_CONDITIONAL definition load .
class-methods FACTORY_COND_STYLE_ICONSET
importing
!IO_WORKSHEET type ref to ZCL_EXCEL_WORKSHEET
!IV_ICON_TYPE type ZEXCEL_CONDITION_RULE_ICONSET default C_ICONSET_3TRAFFICLIGHTS2
!IV_CFVO1_TYPE type ZEXCEL_CONDITIONAL_TYPE default C_CFVO_TYPE_PERCENT
!IV_CFVO1_VALUE type ZEXCEL_CONDITIONAL_VALUE optional
!IV_CFVO2_TYPE type ZEXCEL_CONDITIONAL_TYPE default C_CFVO_TYPE_PERCENT
!IV_CFVO2_VALUE type ZEXCEL_CONDITIONAL_VALUE optional
!IV_CFVO3_TYPE type ZEXCEL_CONDITIONAL_TYPE default C_CFVO_TYPE_PERCENT
!IV_CFVO3_VALUE type ZEXCEL_CONDITIONAL_VALUE optional
!IV_CFVO4_TYPE type ZEXCEL_CONDITIONAL_TYPE default C_CFVO_TYPE_PERCENT
!IV_CFVO4_VALUE type ZEXCEL_CONDITIONAL_VALUE optional
!IV_CFVO5_TYPE type ZEXCEL_CONDITIONAL_TYPE default C_CFVO_TYPE_PERCENT
!IV_CFVO5_VALUE type ZEXCEL_CONDITIONAL_VALUE optional
!IV_SHOWVALUE type ZEXCEL_CONDITIONAL_SHOW_VALUE default ZCL_EXCEL_STYLE_CONDITIONAL=>C_SHOWVALUE_TRUE
returning
value(RV_STYLE_CONDITIONAL) type ref to ZCL_EXCEL_STYLE_CONDITIONAL .
*"* protected components of class ZABAP_EXCEL_STYLE_FONT
*"* do not include other source files here!!!
protected section.
private section.
data MV_RULE_RANGE type STRING .
ENDCLASS.
CLASS ZCL_EXCEL_STYLE_CONDITIONAL IMPLEMENTATION.
METHOD add_range.
DATA: lv_column TYPE zexcel_cell_column,
lv_row_alpha TYPE string,
lv_col_alpha TYPE string,
lv_coords1 TYPE string,
lv_coords2 TYPE string.
lv_column = zcl_excel_common=>convert_column2int( ip_start_column ).
* me->mv_cell_data-cell_row = 1.
* me->mv_cell_data-cell_column = lv_column.
*
lv_col_alpha = ip_start_column.
lv_row_alpha = ip_start_row.
SHIFT lv_row_alpha RIGHT DELETING TRAILING space.
SHIFT lv_row_alpha LEFT DELETING LEADING space.
CONCATENATE lv_col_alpha lv_row_alpha INTO lv_coords1.
IF ip_stop_column IS NOT INITIAL.
lv_column = zcl_excel_common=>convert_column2int( ip_stop_column ).
ELSE.
lv_column = zcl_excel_common=>convert_column2int( ip_start_column ).
ENDIF.
IF ip_stop_row IS NOT INITIAL. " If we don't get explicitly a stop column use start column
lv_row_alpha = ip_stop_row.
ELSE.
lv_row_alpha = ip_start_row.
ENDIF.
IF ip_stop_column IS NOT INITIAL. " If we don't get explicitly a stop column use start column
lv_col_alpha = ip_stop_column.
ELSE.
lv_col_alpha = ip_start_column.
ENDIF.
SHIFT lv_row_alpha RIGHT DELETING TRAILING space.
SHIFT lv_row_alpha LEFT DELETING LEADING space.
CONCATENATE lv_col_alpha lv_row_alpha INTO lv_coords2.
IF lv_coords2 IS NOT INITIAL AND lv_coords2 <> lv_coords1.
CONCATENATE me->mv_rule_range ` ` lv_coords1 ':' lv_coords2 INTO me->mv_rule_range.
ELSE.
CONCATENATE me->mv_rule_range ` ` lv_coords1 INTO me->mv_rule_range.
ENDIF.
SHIFT me->mv_rule_range LEFT DELETING LEADING space.
ENDMETHOD.
METHOD constructor.
DATA: ls_iconset TYPE zexcel_conditional_iconset.
ls_iconset-iconset = zcl_excel_style_conditional=>c_iconset_3trafficlights.
ls_iconset-cfvo1_type = zcl_excel_style_conditional=>c_cfvo_type_percent.
ls_iconset-cfvo1_value = '0'.
ls_iconset-cfvo2_type = zcl_excel_style_conditional=>c_cfvo_type_percent.
ls_iconset-cfvo2_value = '20'.
ls_iconset-cfvo3_type = zcl_excel_style_conditional=>c_cfvo_type_percent.
ls_iconset-cfvo3_value = '40'.
ls_iconset-cfvo4_type = zcl_excel_style_conditional=>c_cfvo_type_percent.
ls_iconset-cfvo4_value = '60'.
ls_iconset-cfvo5_type = zcl_excel_style_conditional=>c_cfvo_type_percent.
ls_iconset-cfvo5_value = '80'.
me->rule = zcl_excel_style_conditional=>c_rule_none.
* me->iconset->operator = zcl_excel_style_conditional=>c_operator_none.
me->mode_iconset = ls_iconset.
me->priority = 1.
* inizialize dimension range
me->MV_RULE_RANGE = 'A1'.
ENDMETHOD.
METHOD factory_cond_style_iconset.
*--------------------------------------------------------------------*
* Work in progress
* Missing: LE or LT may be specified --> extend structure ZEXCEL_CONDITIONAL_ICONSET to hold this information as well
*--------------------------------------------------------------------*
* DATA: lv_needed_values TYPE i.
* CASE icon_type.
*
* WHEN 'C_ICONSET_3ARROWS'
* OR 'C_ICONSET_3ARROWSGRAY'
* OR 'C_ICONSET_3FLAGS'
* OR 'C_ICONSET_3SIGNS'
* OR 'C_ICONSET_3SYMBOLS'
* OR 'C_ICONSET_3SYMBOLS2'
* OR 'C_ICONSET_3TRAFFICLIGHTS'
* OR 'C_ICONSET_3TRAFFICLIGHTS2'.
* lv_needed_values = 3.
*
* WHEN 'C_ICONSET_4ARROWS'
* OR 'C_ICONSET_4ARROWSGRAY'
* OR 'C_ICONSET_4RATING'
* OR 'C_ICONSET_4REDTOBLACK'
* OR 'C_ICONSET_4TRAFFICLIGHTS'.
* lv_needed_values = 4.
*
* WHEN 'C_ICONSET_5ARROWS'
* OR 'C_ICONSET_5ARROWSGRAY'
* OR 'C_ICONSET_5QUARTERS'
* OR 'C_ICONSET_5RATING'.
* lv_needed_values = 5.
*
* WHEN OTHERS.
* RETURN.
* ENDCASE.
ENDMETHOD.
METHOD get_dimension_range.
ep_dimension_range = me->mv_rule_range.
ENDMETHOD.
METHOD set_range.
CLEAR: me->mv_rule_range.
me->add_range( ip_start_row = ip_start_row
ip_start_column = ip_start_column
ip_stop_row = ip_stop_row
ip_stop_column = ip_stop_column ).
ENDMETHOD.
ENDCLASS.
| [
4871,
1168,
5097,
62,
6369,
34,
3698,
62,
2257,
56,
2538,
62,
10943,
35,
17941,
1847,
6770,
198,
220,
1171,
198,
220,
2457,
198,
220,
2251,
1171,
764,
198,
198,
11377,
2665,
13,
198,
198,
9,
1,
9,
1171,
6805,
286,
1398,
1168,
5097,
62,
6369,
34,
3698,
62,
2257,
56,
2538,
62,
10943,
35,
17941,
1847,
198,
9,
1,
9,
466,
407,
2291,
584,
2723,
3696,
994,
10185,
198,
220,
38491,
327,
62,
22495,
29516,
62,
25216,
62,
21389,
6239,
32,
2099,
1168,
6369,
34,
3698,
62,
10943,
35,
17941,
1847,
62,
25216,
1988,
705,
687,
4712,
4458,
25113,
2943,
5626,
13918,
198,
220,
38491,
327,
62,
22495,
29516,
62,
25216,
62,
22921,
2099,
1168,
6369,
34,
3698,
62,
10943,
35,
17941,
1847,
62,
25216,
1988,
705,
9806,
4458,
25113,
2943,
5626,
13918,
198,
220,
38491,
327,
62,
22495,
29516,
62,
25216,
62,
23678,
2099,
1168,
6369,
34,
3698,
62,
10943,
35,
17941,
1847,
62,
25216,
1988,
705,
1084,
4458,
25113,
2943,
5626,
13918,
198,
220,
38491,
327,
62,
22495,
29516,
62,
25216,
62,
41359,
13246,
2099,
1168,
6369,
34,
3698,
62,
10943,
35,
17941,
1847,
62,
25216,
1988,
705,
22510,
4458,
25113,
2943,
5626,
13918,
198,
220,
38491,
327,
62,
22495,
29516,
62,
25216,
62,
18973,
43960,
2099,
1168,
6369,
34,
3698,
62,
10943,
35,
17941,
1847,
62,
25216,
1988,
705,
25067,
4458,
25113,
2943,
5626,
13918,
198,
220,
38491,
327,
62,
22495,
29516,
62,
25216,
62,
18973,
43960,
41119,
2099,
1168,
6369,
34,
3698,
62,
10943,
35,
17941,
1847,
62,
25216,
1988,
705,
25067,
576,
4458,
25113,
2943,
5626,
13918,
198,
220,
38491,
327,
62,
2149,
19213,
2767,
62,
18,
26465,
22845,
2099,
1168,
6369,
34,
3698,
62,
10943,
35,
17941,
62,
49,
24212,
62,
2149,
19213,
2767,
1988,
705,
18,
3163,
8516,
4458,
25113,
2943,
5626,
13918,
198,
220,
38491,
327,
62,
2149,
19213,
2767,
62,
18,
26465,
22845,
38,
30631,
2099,
1168,
6369,
34,
3698,
62,
10943,
35,
17941,
62,
49,
24212,
62,
2149,
19213,
2767,
1988,
705,
18,
3163,
8516,
46130,
4458,
25113,
2943,
5626,
13918,
198,
220,
38491,
327,
62,
2149,
19213,
2767,
62,
18,
38948,
50,
2099,
1168,
6369,
34,
3698,
62,
10943,
35,
17941,
62,
49,
24212,
62,
2149,
19213,
2767,
1988,
705,
18,
40053,
4458,
25113,
2943,
5626,
13918,
198,
220,
38491,
327,
62,
2149,
19213,
2767,
62,
18,
50,
3528,
8035,
2099,
1168,
6369,
34,
3698,
62,
10943,
35,
17941,
62,
49,
24212,
62,
2149,
19213,
2767,
1988,
705,
18,
11712,
82,
4458,
25113,
2943,
5626,
13918,
198,
220,
38491,
327,
62,
2149,
19213,
2767,
62,
18,
23060,
10744,
3535,
50,
2099,
1168,
6369,
34,
3698,
62,
10943,
35,
17941,
62,
49,
24212,
62,
2149,
19213,
2767,
1988,
705,
18,
13940,
2022,
10220,
4458,
25113,
2943,
5626,
13918,
198,
220,
38491,
327,
62,
2149,
19213,
2767,
62,
18,
23060,
10744,
3535,
50,
17,
2099,
1168,
6369,
34,
3698,
62,
10943,
35,
17941,
62,
49,
24212,
62,
2149,
19213,
2767,
1988,
705,
18,
13940,
2022,
10220,
17,
4458,
25113,
2943,
5626,
13918,
198,
220,
38491,
327,
62,
2149,
19213,
2767,
62,
18,
51,
3861,
5777,
2149,
43,
34874,
2099,
1168,
6369,
34,
3698,
62,
10943,
35,
17941,
62,
49,
24212,
62,
2149,
19213,
2767,
1988,
705,
4458,
25113,
2943,
5626,
13918,
198,
220,
38491,
327,
62,
2149,
19213,
2767,
62,
18,
51,
3861,
5777,
2149,
43,
34874,
17,
2099,
1168,
6369,
34,
3698,
62,
10943,
35,
17941,
62,
49,
24212,
62,
2149,
19213,
2767,
1988,
705,
18,
15721,
2108,
43,
2337,
17,
4458,
25113,
2943,
5626,
13918,
198,
220,
38491,
327,
62,
2149,
19213,
2767,
62,
19,
26465,
22845,
2099,
1168,
6369,
34,
3698,
62,
10943,
35,
17941,
62,
49,
24212,
62,
2149,
19213,
2767,
1988,
705,
19,
3163,
8516,
4458,
25113,
2943,
5626,
13918,
198,
220,
38491,
327,
62,
2149,
19213,
2767,
62,
19,
26465,
22845,
38,
30631,
2099,
1168,
6369,
34,
3698,
62,
10943,
35,
17941,
62,
49,
24212,
62,
2149,
19213,
2767,
1988,
705,
19,
3163,
8516,
46130,
4458,
25113,
2943,
5626,
13918,
198,
220,
38491,
327,
62,
2149,
19213,
2767,
62,
19,
49,
33881,
2099,
1168,
6369,
34,
3698,
62,
10943,
35,
17941,
62,
49,
24212,
62,
2149,
19213,
2767,
1988,
705,
19,
29321,
4458,
25113,
2943,
5626,
13918,
198,
220,
38491,
327,
62,
2149,
19213,
2767,
62,
19,
22083,
10468,
9148,
8120,
2099,
1168,
6369,
34,
3698,
62,
10943,
35,
17941,
62,
49,
24212,
62,
2149,
19213,
2767,
1988,
705,
19,
7738,
2514,
9915,
4458,
25113,
2943,
5626,
13918,
198,
220,
38491,
327,
62,
2149,
19213,
2767,
62,
19,
51,
3861,
5777,
2149,
43,
34874,
2099,
1168,
6369,
34,
3698,
62,
10943,
35,
17941,
62,
49,
24212,
62,
2149,
19213,
2767,
1988,
705,
19,
15721,
2108,
43,
2337,
4458,
25113,
2943,
5626,
13918,
198,
220,
38491,
327,
62,
2149,
19213,
2767,
62,
20,
26465,
22845,
2099,
1168,
6369,
34,
3698,
62,
10943,
35,
17941,
62,
49,
24212,
62,
2149,
19213,
2767,
1988,
705,
20,
3163,
8516,
4458,
25113,
2943,
5626,
13918,
198,
220,
38491,
327,
62,
2149,
19213,
2767,
62,
20,
26465,
22845,
38,
30631,
2099,
1168,
6369,
34,
3698,
62,
10943,
35,
17941,
62,
49,
24212,
62,
2149,
19213,
2767,
1988,
705,
20,
3163,
8516,
46130,
4458,
25113,
2943,
5626,
13918,
198,
220,
38491,
327,
62,
2149,
19213,
2767,
62,
20,
10917,
7227,
4877,
2099,
1168,
6369,
34,
3698,
62,
10943,
35,
17941,
62,
49,
24212,
62,
2149,
19213,
2767,
1988,
705,
20,
4507,
6137,
4458,
25113,
2943,
5626,
13918,
198,
220,
38491,
327,
62,
2149,
19213,
2767,
62,
20,
49,
33881,
2099,
1168,
6369,
34,
3698,
62,
10943,
35,
17941,
62,
49,
24212,
62,
2149,
19213,
2767,
1988,
705,
20,
29321,
4458,
25113,
2943,
5626,
13918,
198,
220,
38491,
327,
62,
31054,
25633,
62,
33,
43312,
17887,
10554,
2099,
1168,
6369,
34,
3698,
62,
10943,
35,
17941,
62,
31054,
25633,
1988,
705,
1350,
29878,
3152,
4458,
25113,
2943,
5626,
13918,
198,
220,
38491,
327,
62,
31054,
25633,
62,
33,
2767,
8845,
1677,
2099,
1168,
6369,
34,
3698,
62,
10943,
35,
17941,
62,
31054,
25633,
1988,
705,
23395,
4458,
25113,
2943,
5626,
13918,
198,
220,
38491,
327,
62,
31054,
25633,
62,
10943,
30339,
2257,
13918,
2099,
1168,
6369
] | [
1,
1,
1,
1,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o.
* See https://github.com/abapinho/abaK
********************************************************************************
* MIT License
*
* Copyright (c) 2018 Nuno Godinho
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
********************************************************************************
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-sou.
PARAMETERS p_db RADIOBUTTON GROUP g.
PARAMETERS p_zabak RADIOBUTTON GROUP g.
PARAMETERS p_xml RADIOBUTTON GROUP g.
SELECTION-SCREEN END OF BLOCK b1.
DATA: go_exp TYPE REF TO zcx_abak,
go_demo TYPE REF TO zcl_abak_demo,
which_demo TYPE string,
txt TYPE string.
INITIALIZATION.
sy-title = |{ sy-title } (v{ zif_abak_consts=>version })|.
START-OF-SELECTION.
CASE abap_true.
WHEN p_db.
which_demo = 'DB'.
WHEN p_zabak.
which_demo = 'ZABAK'.
WHEN p_xml.
which_demo = 'XML'.
ENDCASE.
TRY.
CREATE OBJECT go_demo
EXPORTING
i_which_demo = which_demo.
go_demo->get_our_company( ).
SKIP.
go_demo->is_account_type_valid( ).
SKIP.
go_demo->get_customer_for_context( ).
SKIP.
go_demo->is_currency_valid( ).
SKIP.
go_demo->validate_amount( ).
CATCH zcx_abak INTO go_exp.
txt = go_exp->get_text( ).
WRITE: / 'Error:', txt.
ENDTRY.
| [
2200,
15490,
1976,
397,
461,
62,
9536,
78,
13,
198,
198,
9,
4091,
3740,
1378,
12567,
13,
785,
14,
397,
499,
20327,
14,
15498,
42,
198,
198,
17174,
17174,
8412,
198,
9,
17168,
13789,
198,
9,
198,
9,
15069,
357,
66,
8,
2864,
399,
36909,
1793,
20327,
198,
9,
198,
9,
2448,
3411,
318,
29376,
7520,
11,
1479,
286,
3877,
11,
284,
597,
1048,
16727,
257,
4866,
198,
9,
286,
428,
3788,
290,
3917,
10314,
3696,
357,
1169,
366,
25423,
12340,
284,
1730,
198,
9,
287,
262,
10442,
1231,
17504,
11,
1390,
1231,
17385,
262,
2489,
198,
9,
284,
779,
11,
4866,
11,
13096,
11,
20121,
11,
7715,
11,
14983,
11,
850,
43085,
11,
290,
14,
273,
3677,
198,
9,
9088,
286,
262,
10442,
11,
290,
284,
8749,
6506,
284,
4150,
262,
10442,
318,
198,
9,
30760,
284,
466,
523,
11,
2426,
284,
262,
1708,
3403,
25,
198,
9,
198,
9,
383,
2029,
6634,
4003,
290,
428,
7170,
4003,
2236,
307,
3017,
287,
477,
198,
9,
9088,
393,
8904,
16690,
286,
262,
10442,
13,
198,
9,
198,
9,
3336,
47466,
3180,
36592,
2389,
1961,
366,
1921,
3180,
1600,
42881,
34764,
56,
3963,
15529,
509,
12115,
11,
7788,
32761,
6375,
198,
9,
8959,
49094,
11,
47783,
2751,
21728,
5626,
40880,
5390,
3336,
34764,
11015,
3963,
34482,
3398,
1565,
5603,
25382,
11,
198,
9,
376,
46144,
7473,
317,
16652,
2149,
37232,
33079,
48933,
5357,
44521,
1268,
10913,
2751,
12529,
13,
3268,
8005,
49261,
50163,
3336,
198,
9,
37195,
20673,
6375,
27975,
38162,
9947,
367,
15173,
4877,
9348,
43031,
19146,
7473,
15529,
47666,
3955,
11,
29506,
25552,
6375,
25401,
198,
9,
43031,
25382,
11,
7655,
2767,
16879,
3268,
3537,
40282,
3963,
27342,
10659,
11,
309,
9863,
6375,
25401,
54,
24352,
11,
5923,
1797,
2751,
16034,
11,
198,
9,
16289,
3963,
6375,
3268,
7102,
45,
24565,
13315,
3336,
47466,
6375,
3336,
23210,
6375,
25401,
5550,
1847,
20754,
3268,
3336,
198,
9,
47466,
13,
198,
17174,
17174,
8412,
198,
198,
46506,
2849,
12,
6173,
2200,
1677,
347,
43312,
3963,
9878,
11290,
275,
16,
13315,
8782,
10067,
37977,
2538,
2420,
12,
82,
280,
13,
198,
27082,
2390,
2767,
4877,
279,
62,
9945,
33540,
9399,
47526,
11357,
44441,
308,
13,
198,
27082,
2390,
2767,
4877,
279,
62,
89,
397,
461,
33540,
9399,
47526,
11357,
44441,
308,
13,
198,
27082,
2390,
2767,
4877,
279,
62,
19875,
33540,
9399,
47526,
11357,
44441,
308,
13,
198,
46506,
2849,
12,
6173,
2200,
1677,
23578,
3963,
9878,
11290,
275,
16,
13,
198,
198,
26947,
25,
467,
62,
11201,
220,
220,
220,
220,
41876,
4526,
37,
5390,
1976,
66,
87,
62,
397,
461,
11,
198,
220,
220,
220,
220,
220,
467,
62,
9536,
78,
220,
220,
220,
41876,
4526,
37,
5390,
1976,
565,
62,
397,
461,
62,
9536,
78,
11,
198,
220,
220,
220,
220,
220,
543,
62,
9536,
78,
41876,
4731,
11,
198,
220,
220,
220,
220,
220,
256,
742,
220,
220,
220,
220,
220,
220,
220,
41876,
4731,
13,
198,
198,
1268,
2043,
12576,
14887,
6234,
13,
198,
220,
827,
12,
7839,
796,
930,
90,
827,
12,
7839,
1782,
357,
85,
90,
1976,
361,
62,
397,
461,
62,
1102,
6448,
14804,
9641,
1782,
14726,
13,
198,
198,
2257,
7227,
12,
19238,
12,
46506,
2849,
13,
628,
220,
42001,
450,
499,
62,
7942,
13,
198,
220,
220,
220,
42099,
279,
62,
9945,
13,
198,
220,
220,
220,
220,
220,
543,
62,
9536,
78,
796,
705,
11012,
4458,
198,
220,
220,
220,
42099,
279,
62,
89,
397,
461,
13,
198,
220,
220,
220,
220,
220,
543,
62,
9536,
78,
796,
705,
34892,
4339,
42,
4458,
198,
220,
220,
220,
42099,
279,
62,
19875,
13,
198,
220,
220,
220,
220,
220,
543,
62,
9536,
78,
796,
705,
55,
5805,
4458,
198,
220,
23578,
34,
11159,
13,
628,
220,
7579,
56,
13,
198,
220,
220,
220,
220,
220,
29244,
6158,
25334,
23680,
467,
62,
9536,
78,
198,
220,
220,
220,
220,
220,
220,
220,
7788,
15490,
2751,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1312,
62,
4758,
62,
9536,
78,
796,
543,
62,
9536,
78,
13,
628,
220,
220,
220,
220,
220,
467,
62,
9536,
78,
3784,
1136,
62,
454,
62,
39722,
7,
6739,
198,
220,
220,
220,
220,
220,
14277,
4061,
13,
198,
220,
220,
220,
220,
220,
467,
62,
9536,
78,
3784,
271,
62,
23317,
62,
4906,
62,
12102,
7,
6739,
198,
220,
220,
220,
220,
220,
14277,
4061,
13,
198,
220,
220,
220,
220,
220,
467,
62,
9536,
78,
3784,
1136,
62,
23144,
263,
62,
1640,
62,
22866,
7,
6739,
198,
220,
220,
220,
220,
220,
14277,
4061,
13,
198,
220,
220,
220,
220,
220,
467,
62,
9536,
78,
3784,
271,
62,
34415,
62,
12102,
7,
6739,
198,
220,
220,
220,
220,
220,
14277,
4061,
13,
198,
220,
220,
220,
220,
220,
467,
62,
9536,
78,
3784,
12102,
378,
62,
17287,
7,
6739,
628,
220,
220,
220,
327,
11417,
1976,
66,
87,
62,
397,
461,
39319,
467,
62,
11201,
13,
198,
220,
220,
220,
220,
220,
256,
742,
796,
467,
62,
11201,
3784,
1136,
62,
5239,
7,
6739,
198,
220,
220,
220,
220,
220,
44423,
25,
1220,
705,
12331,
25,
3256,
256,
742,
13,
198,
220,
23578,
40405,
13,
198
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,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