You are on page 1of 15

Compare Report Sources

Left-Hand Column:
Report Source Code: ZPS_MASS_SETTLEMENT_RULE_BPC active version
Local System: R3Q
Request: R3DK951587 03/03/2015 ZDF0017
Text: DEV:C29238 Change for ZPS_MASS_SETTLEMENT_RULE_BPC

Right-Hand Column:
Report Source Code: ZPS_MASS_SETTLEMENT_RULE_BPC active version
Remote system: R3P
Request: R3DK942180 12/24/2012 YKY0005
Text: FICO:CRQ3502 ZMPC_SETTLE

-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
------------------------

Contents Unchanged:
1 1
************************************************************************
2 2 * Title : Upload Settlement Rules for BPC
*
3 3 *
*
4 4 * Program : ZPS_MASS_SETTLEMENT_RULE_BPC
*

Differing Lines:
5 * Transaction : ZMPC_SETTLE
*
5 * Transaction : ZPS_BPC_SR
*

Contents Unchanged:
6 6 *
*
7 7 * Program Desc: This program
*
8 8 * 1. Uploads input file from application server.
*
... ... ...
49 49
*----------------------------------------------------------------------*
50 50 * 12/20/2012 | YKY0005 | Increase wait time CRQ 3502
*
51 51
*----------------------------------------------------------------------*

Lines not available in version of the REMOTE system:


52 * 12/16/2014 | ZMB0383 | R3DK951587
*
53 * | | Add new fields in input file to BDC
fields *
54 * 02/05/2014 | ZDF0017 | Add company code lookup
*
55
*----------------------------------------------------------------------*

Contents Unchanged:
56 52 REPORT zps_mass_settlement_rule_bpc
57 53 LINE-SIZE 180
58 54 LINE-COUNT 65
... ... ...
72 68 * T Y P E S
*
73 69
*----------------------------------------------------------------------*
74 70 TYPES: BEGIN OF ty_in_file,

Differing Lines:
75 project(20), "project
76 spend_type(20), "Spend Type from BPC
77 artnr(18), "product "R3DK951587
78 customer(10), "customer "R3DK951587
79 country(20), "country
80 amount(40), "amount
71 project(20), "project
72 spend_type(20), "Spend Type from BPC
73 promo_grp(20), "product hierarchy/Promogroup
74 cust_grp(20), "customer group
75 country(20), "country
76 amount(40), "amount

Lines not available in version of the REMOTE system:


81 * Begin of change for R3DK951587
82 paph5(14), "product hierarchy/Promogroup
83 kdgrp(2), "class of trade == customer group
84 fkart(4), " billing type
85 kaufn(10), " sales order
86 kdpos(6), " sales order item
87 rkaufnr(12), " order
88 bukrs(4), " company code
89 werks(4), " plant
90 vtweg(2), " distribution channel
91 spart(2), " division
92 wbs_elem(8), " WBS Element (read from input file only)
93 prctr(10), " profit center
94 pprctr(10), " partner profit center
95 paph6(18), " prodhier01_6
96 auart(4), " sales doc type
97 kmmakl(9), " material group
98 kunwe(10), " ship to part
99 ktgrd(2), " acct_assg_gr
100 kunrg(10), " payer
101 wwrep(10), " sales representative
102 wwbpi(1), " bracket price indicator
103 wwfwk(6), " fiscal year/week
104 pstyv(4), " item category
105 wwndf(10), " campaign ID
106 kukla(2), " customer class
107 wwsgm(10), " segment
108 * End of change for R3DK951587

Contents Unchanged:
109 77 END OF ty_in_file.
110 78
111 79 TYPES: BEGIN OF ty_srule,

Differing Lines:
112 pspid TYPE proj-pspid, "project
113 posid TYPE prps-posid, "WBS element
114 artnr TYPE ce41000-artnr, "product
115 customer TYPE ce41000-kndnr, "customer
116 country TYPE ce41000-land1, "country
80 pspid TYPE proj-pspid, "project
81 posid TYPE prps-posid, "WBS element
82 cust_grp TYPE ce41000-kdgrp, "customer group
83 promo_grp TYPE ce41000-paph5, "product hierarchy
84 country TYPE ce41000-land1, "country

Lines not available in version of the REMOTE system:


117

Contents Unchanged:
118 85 * Begin of change for CTS: R3DK928679
119 86 * Changed the type from n to p with decimals
120 87 * per(3) TYPE n, "Settlement
percentage

Differing Lines:
121 per TYPE cobrb-prozs,
88 per TYPE cobrb-prozs,

Contents Unchanged:
122 89 * End of change for CTS: R3DK928679

Differing Lines:
123 spend_type(20) TYPE c, "Spend Type from BPC
124 amount TYPE cobrb-bmeng, "quantity
125 tot_amt TYPE cobrb-bmeng, "total WBS quantity
126 nlag_mat TYPE mara-matnr, "NLAG material
127 prctr TYPE marc-prctr, "profit center
90 spend_type(20) TYPE c, "Spend Type from BPC
91 amount TYPE cobrb-bmeng, "quantity
92 tot_amt TYPE cobrb-bmeng, "total WBS quantity
93 nlag_mat TYPE mara-matnr, "NLAG material
94 prctr TYPE marc-prctr, "profit center

Lines not available in version of the REMOTE system:


128
129 * Begin of change for R3DK951587
130
131 paph5 TYPE ce01000-paph5, "product
hierarchy/Promogroup
132 kdgrp TYPE ce01000-kdgrp, "class of
trade == customer group
133 fkart TYPE ce01000-fkart, " billing type
134 kaufn TYPE ce01000-kaufn, " sales order
135 kdpos TYPE ce01000-kdpos, " sales order item
136 rkaufnr TYPE ce01000-rkaufnr, " order
137 bukrs TYPE ce01000-bukrs, " company code
138 werks TYPE ce01000-werks, " plant
139 vtweg TYPE ce01000-vtweg, " distribution channel
140 spart TYPE ce01000-spart, " division
141 pprctr TYPE ce01000-pprctr, " partner profit
center
142 paph6 TYPE ce01000-paph6, " prodhier01_6
143 auart TYPE ce01000-auart, " sales doc type
144 kmmakl TYPE ce01000-kmmakl, " material group
145 kunwe TYPE ce01000-kunwe, " ship to part
146 ktgrd TYPE ce01000-ktgrd, " acct_assg_gr
147 kunrg TYPE ce01000-kunrg, " payer
148 wwrep TYPE ce01000-wwrep, " sales representative
149 wwbpi TYPE ce01000-wwbpi, " bracket price
indicator
150 wwfwk TYPE ce01000-wwfwk, " fiscal year/week
151 pstyv TYPE ce01000-pstyv, " item category
152 wwndf TYPE ce01000-wwndf, " campaign ID
153 kukla TYPE ce01000-kukla, " customer class
154 wwsgm TYPE ce01000-wwsgm, " segment
155
156 * End of change for R3DK951587
157

Contents Unchanged:
158 95 END OF ty_srule.
159 96

Lines only available in version of the REMOTE system:


97 TYPES: BEGIN OF ty_wbs,
98 pspid TYPE proj-pspid, "project
99 posid TYPE prps-posid, "WBS element
100 kdgrp TYPE ce41000-kdgrp, "customer group
101 paph5 TYPE ce41000-paph5, "product hierarchy
102 land1 TYPE ce41000-land1, "country
103 objnr TYPE prps-objnr, "object number
104 END OF ty_wbs.

Contents Unchanged:
160 105
161 106
162 107
*----------------------------------------------------------------------*
... ... ...
165 110 DATA: t_in_data TYPE STANDARD TABLE OF ty_in_file WITH HEADER
LINE.
166 111 DATA: t_srule TYPE STANDARD TABLE OF ty_srule WITH HEADER LINE.
167 112 DATA: t_unique_wbs TYPE STANDARD TABLE OF ty_srule WITH HEADER
LINE.

Lines only available in version of the REMOTE system:


113 DATA: t_wbs_create TYPE STANDARD TABLE OF ty_wbs WITH HEADER LINE.
114 DATA: t_wbs_modify TYPE STANDARD TABLE OF ty_wbs WITH HEADER LINE.

Contents Unchanged:
168 115 DATA: t_cobra TYPE STANDARD TABLE OF cobra WITH HEADER LINE,
169 116 t_cobrb TYPE STANDARD TABLE OF cobrb WITH HEADER LINE.

Lines not available in version of the REMOTE system:


170
171 DATA: gt_zfi_mpc_st_md TYPE TABLE OF zfi_mpc_st_md,
172 gs_zfi_mpc_st_md LIKE LINE OF gt_zfi_mpc_st_md.
Contents Unchanged:
173 117
174 118 * Batchinputdata of single transaction
175 119 DATA: t_bdcdata LIKE bdcdata OCCURS 0 WITH HEADER LINE.
... ... ...
178 122 DATA: t_messtab LIKE bdcmsgcoll OCCURS 0 WITH HEADER LINE.
179 123
180 124 DATA: BEGIN OF t_prps OCCURS 0,

Differing Lines:
181 pspnr TYPE prps-pspnr,
182 posid TYPE prps-posid,
183 objnr TYPE prps-objnr,
125 pspnr TYPE prps-pspnr,
126 posid TYPE prps-posid,
127 objnr TYPE prps-objnr,

Contents Unchanged:
184 128 END OF t_prps.
185 129
186 130 DATA: BEGIN OF t_marc OCCURS 0,

Differing Lines:
187 matnr TYPE marc-matnr,
188 prctr TYPE marc-prctr,
131 matnr TYPE marc-matnr,
132 prctr TYPE marc-prctr,

Contents Unchanged:
189 133 END OF t_marc.
190 134
191 135 DATA: current_fy TYPE t009b-bdatj, "current Fiscal year
... ... ...
194 138 startdt_fp TYPE t009b-poper. "start date Fiscal Period
195 139
196 140 DATA: error_flag TYPE c.

Differing Lines:
197 DATA: w_record_read TYPE i, "Total no.of records in the file
198 w_cnt_wbs_read TYPE i, "Total no.of unique WBS elements
199 w_cnt_wbs_failed TYPE i, "Total no.of unique WBS elements
failed
200 w_cnt_wbs_correct TYPE i, "Total no.of unique WBS elements
updated
201 w_records_correct TYPE i, "Total no.of records uploaded
202 w_records_failed TYPE i. "Total no.of records failed
141 DATA: w_record_read TYPE i,"Total no.of records in the file
142 w_cnt_wbs_read TYPE i,"Total no.of unique WBS elements
143 w_cnt_wbs_failed TYPE i,"Total no.of unique WBS elements
failed
144 w_cnt_wbs_correct TYPE i,"Total no.of unique WBS elements
updated
145 w_records_correct TYPE i,"Total no.of records uploaded
146 w_records_failed TYPE i."Total no.of records failed

Contents Unchanged:
203 147
204 148 DATA: c_lfilei1 LIKE filename-fileintern VALUE
205 149
'ZPS_F7069_SRULES_IN'.
... ... ...
208 152
*----------------------------------------------------------------------*
209 153 * C O N S T A N T S
*
210 154
*----------------------------------------------------------------------*

Differing Lines:
211 CONSTANTS : c_x TYPE c VALUE 'X',
212 c_00(2) VALUE '00'. "Message ID
155 CONSTANTS : c_x TYPE c VALUE 'X',
156 c_00(2) VALUE '00'. "Message ID

Contents Unchanged:
213 157
214 158
215 159
*----------------------------------------------------------------------*
... ... ...
227 171
*----------------------------------------------------------------------*
228 172 SELECTION-SCREEN BEGIN OF BLOCK info1 WITH FRAME TITLE text-t01.
229 173 SELECTION-SCREEN SKIP.

Differing Lines:
230 PARAMETERS: p_test AS CHECKBOX DEFAULT 'X', "test mode flag
174 PARAMETERS: p_test AS CHECKBOX DEFAULT 'X', "test mode flag

Contents Unchanged:
231 175 p_mode(1) TYPE c DEFAULT 'N'. "mode of execution
for BDC
232 176
233 177
... ... ...
264 208 START-OF-SELECTION.
265 209
*---------------------------------------------------------------------*
266 210 *- read Input file

Lines not available in version of the REMOTE system:


267

Contents Unchanged:
268 211 PERFORM read_input_file.
269 212
270 213 CHECK error_flag IS INITIAL.
... ... ...
394 337
*----------------------------------------------------------------------*
395 338 FORM read_input_file.
396 339

Differing Lines:
397 DATA: wa_file_data(300) TYPE c.
340 DATA: wa_file_data(150) TYPE c.

Contents Unchanged:
398 341
399 342 REFRESH: t_in_data[].
400 343
... ... ...
408 351 IF sy-subrc EQ 0.
409 352 SPLIT wa_file_data AT '|' INTO t_in_data-project
410 353 t_in_data-spend_type

Differing Lines:
411 t_in_data-artnr
"R3DK951587
412 t_in_data-paph5
"R3DK951587
354 t_in_data-promo_grp
355 t_in_data-cust_grp

Lines not available in version of the REMOTE system:


413 t_in_data-kdgrp
"R3DK951587

Contents Unchanged:
414 356 t_in_data-country

Differing Lines:
415 t_in_data-amount
357 t_in_data-amount.

Lines not available in version of the REMOTE system:


416 * Begin of R3DK951587
417 t_in_data-customer
418 t_in_data-fkart " billing
type
419 t_in_data-kaufn " sales
order
420 t_in_data-kdpos " sales
order item
421 t_in_data-rkaufnr " order
422 t_in_data-bukrs " company
code
423 t_in_data-werks " plant
424 * t_in_data-vkorg " sales
org
425 t_in_data-vtweg "
distribution channel
426 t_in_data-spart " division
427 t_in_data-wbs_elem " WBS
Element (read from input file only)
428 t_in_data-prctr " profit
center
429 t_in_data-pprctr " partner
profit center
430 t_in_data-paph6 "
prodhier01_6
431 t_in_data-auart " sales
doc type
432 t_in_data-kmmakl "
material group
433 t_in_data-kunwe " ship to
part
434 t_in_data-ktgrd "
acct_assg_gr
435 t_in_data-kunrg " payer
436 t_in_data-wwrep " sales
representative
437 t_in_data-wwbpi " bracket
price indicator
438 * t_in_data-crmelem "
marketing element
439 t_in_data-wwfwk " fiscal
year/week
440 t_in_data-pstyv " item
category
441 t_in_data-wwndf " campaign
ID
442 t_in_data-kukla " customer
class
443 t_in_data-wwsgm " segment
444 * End of R3DK951587
445 .
446
447 IF t_in_data-bukrs IS INITIAL.
448 PERFORM lookup_company_code
449 USING
450 t_in_data-spend_type
451 CHANGING
452 t_in_data-bukrs.
453 ENDIF.
454

Contents Unchanged:
455 358 APPEND t_in_data.
456 359 ELSE.
457 360 EXIT. "do
... ... ...
500 403 IMPORTING
501 404 output = t_srule-posid.
502 405

Differing Lines:
503 * CONCATENATE 'X' t_in_data-promo_grp INTO t_srule-nlag_mat.
"R3DK951587
406 CONCATENATE 'X' t_in_data-promo_grp INTO t_srule-nlag_mat.

Lines not available in version of the REMOTE system:


504 t_srule-nlag_mat = t_in_data-artnr.
"R3DK951587

Contents Unchanged:
505 407 APPEND t_srule.
506 408
507 409 ENDLOOP.
... ... ...
512 414 SORT t_unique_wbs BY posid.
513 415 DELETE ADJACENT DUPLICATES FROM t_unique_wbs COMPARING posid.
514 416

Differing Lines:
515 * total number of unique WBS elements in the input file
417 * total number of unique WBS emelemnts in the input file

Contents Unchanged:
516 418 DESCRIBE TABLE t_unique_wbs LINES w_cnt_wbs_read.
517 419
518 420
519 421 ENDFORM. " read_input_file

Lines not available in version of the REMOTE system:


520
521 FORM lookup_company_code
522 USING
523 p_spend_type
524 CHANGING
525 p_zzbukrs.
526
527 "Spend Type Master Data For MPC
528 IF gt_zfi_mpc_st_md IS INITIAL.
529 SELECT * FROM zfi_mpc_st_md INTO TABLE gt_zfi_mpc_st_md.
530 SORT gt_zfi_mpc_st_md.
531 ENDIF.
532
533 READ TABLE gt_zfi_mpc_st_md INTO gs_zfi_mpc_st_md
534 WITH KEY zspend_type = p_spend_type BINARY SEARCH.
535
536 IF sy-subrc NE 0
537 OR gs_zfi_mpc_st_md-zzbukrs IS INITIAL.
538 WRITE: / 'Company code for spend type is not maintained in
ZFI_MPC_ST_MD: '(001), p_spend_type.
539 ELSE.
540 p_zzbukrs = gs_zfi_mpc_st_md-zzbukrs.
541 ENDIF.
542
543 ENDFORM.

Contents Unchanged:
544 422
545 423
*&---------------------------------------------------------------------*
546 424 *& Form OBTAIN_WBS_PRPS
... ... ...
609 487 DATA: wbs_flag TYPE c.
610 488 DATA: wbs_objnr TYPE prps-objnr.
611 489 DATA: total_wbs_amount TYPE cobrb-betrr.

Differing Lines:
612 DATA: wa_err_msg TYPE string,
613 err_flag(1) TYPE c.
490 DATA: wa_err_msg TYPE string,
491 err_flag(1) TYPE c.

Contents Unchanged:
614 492 DATA: wa_tmp_rule_cnt TYPE i.
615 493
616 494 CLEAR: w_cnt_wbs_failed, w_cnt_wbs_correct,
... ... ...
747 625 USING p_posid
748 626 CHANGING p_err_flag p_err_message.
749 627 * Begin of change for CTS: R3DK928679
Differing Lines:
750 DATA lv_temp(132) TYPE c.
628 data lv_temp(132) TYPE c.

Contents Unchanged:
751 629 * End of change for CTS: R3DK928679
752 630 CLEAR: p_err_flag, p_err_message.
753 631 REFRESH t_bdcdata[].
... ... ...
766 644
767 645 PERFORM bdc_dynpro USING 'SAPLKOBS' '0100'.
768 646 PERFORM bdc_field USING 'BDC_OKCODE' '=COBL_XERGO'.

Differing Lines:
769 * Start of R3DK951587
647

Contents Unchanged:
770 648 PERFORM bdc_dynpro USING 'SAPLKEAK' '0300'.

Differing Lines:
771 PERFORM bdc_field USING 'BDC_OKCODE' '/00'.
772
649 PERFORM bdc_field USING 'RKEAK-FIELD(15)' temp_srule-prctr.
"Profit center Eg.M0190.
650 PERFORM bdc_field USING 'BDC_OKCODE' '=P+'.

Lines not available in version of the REMOTE system:


773 *
774 * Fields available at this point: (until next '=P+')
775 * RKEAK-FIELD(01) : customer
776 * RKEAK-FIELD(02) : product
777 * RKEAK-FIELD(03) : billing type
778 * RKEAK-FIELD(04) : sales order
779 * RKEAK-FIELD(05) : sales order item
780 * RKEAK-FIELD(06) : order
781 * RKEAK-FIELD(07) : company code
782 * RKEAK-FIELD(08) : plant
783 * RKEAK-FIELD(09) : business area
784 * RKEAK-FIELD(10) : sales org
785 * RKEAK-FIELD(11) : distribution channel
786 * RKEAK-FIELD(12) : division
787 * RKEAK-FIELD(13) : wbs element (disabled, set at
transaction start)
788 * RKEAK-FIELD(14) : cost object
789 * RKEAK-FIELD(15) : profit center
790 *
791
792 IF temp_srule-customer IS NOT INITIAL.
793 PERFORM bdc_field USING 'RKEAK-FIELD(01)' temp_srule-
customer. "Customer Eg.20000001.
794 ENDIF.
795 PERFORM bdc_field USING 'RKEAK-FIELD(02)' temp_srule-artnr.
"Product Eg.X64CZA870590003.
796
797 PERFORM bdc_field USING 'RKEAK-FIELD(03)' temp_srule-fkart.
798 PERFORM bdc_field USING 'RKEAK-FIELD(04)' temp_srule-kaufn.
799 PERFORM bdc_field USING 'RKEAK-FIELD(05)' temp_srule-kdpos.
800 PERFORM bdc_field USING 'RKEAK-FIELD(06)' temp_srule-
rkaufnr.
801 PERFORM bdc_field USING 'RKEAK-FIELD(07)' temp_srule-bukrs.
802 PERFORM bdc_field USING 'RKEAK-FIELD(08)' temp_srule-werks.
803 * PERFORM bdc_field USING 'RKEAK-FIELD(09)' temp_srule-
business_area. " business area not provided in input file
804 * PERFORM bdc_field USING 'RKEAK-FIELD(10)' temp_srule-
vkorg. " sales org not provided in input file
805 PERFORM bdc_field USING 'RKEAK-FIELD(11)' temp_srule-vtweg.
806 PERFORM bdc_field USING 'RKEAK-FIELD(12)' temp_srule-spart.
807 * RKEAK-FIELD(13) is WBS Element (already assigned)
808 * PERFORM bdc_field USING 'RKEAK-FIELD(14)' temp_srule-
cost_object. " cost object not provided in input file

Contents Unchanged:
809 651

Lines not available in version of the REMOTE system:


810 PERFORM bdc_field USING 'RKEAK-FIELD(15)' temp_srule-prctr.
"Profit center Eg.M0190.
811
812
813 PERFORM bdc_field USING 'BDC_OKCODE' '=P+'. " page down in
GUI screen ... necessary to view all fields

Contents Unchanged:
814 652 PERFORM bdc_dynpro USING 'SAPLKEAK' '0300'.

Lines only available in version of the REMOTE system:


653 PERFORM bdc_field USING 'RKEAK-FIELD(15)' temp_srule-
cust_grp. "cust Grp Eg.GR.
654 PERFORM bdc_field USING 'BDC_OKCODE' '=P+'.

Contents Unchanged:
815 655

Lines not available in version of the REMOTE system:


816 *
817 * Fields available at this point: (until next '=P+')
818 * RKEAK-FIELD(01) : partner profit center
819 * RKEAK-FIELD(02) : prod hier 01-6
820 * RKEAK-FIELD(03) : sales doc type
821 * RKEAK-FIELD(04) : material group
822 * RKEAK-FIELD(05) : ship-to party
823 * RKEAK-FIELD(06) : acct assg gr
824 * RKEAK-FIELD(07) : payer
825 * RKEAK-FIELD(08) : sales rep
826 * RKEAK-FIELD(09) : bracket price indicator
827 * RKEAK-FIELD(10) : marketing element
828 * RKEAK-FIELD(11) : fiscal year/week
829 * RKEAK-FIELD(12) : item category
830 * RKEAK-FIELD(13) : campaign id
831 * RKEAK-FIELD(14) : customer class
832 * RKEAK-FIELD(15) : customer group
833 *
834 PERFORM bdc_field USING 'RKEAK-FIELD(01)' temp_srule-
pprctr.
835 PERFORM bdc_field USING 'RKEAK-FIELD(02)' temp_srule-paph6.
836 PERFORM bdc_field USING 'RKEAK-FIELD(03)' temp_srule-auart.
837 PERFORM bdc_field USING 'RKEAK-FIELD(04)' temp_srule-
kmmakl.
838 PERFORM bdc_field USING 'RKEAK-FIELD(05)' temp_srule-kunwe.
839 PERFORM bdc_field USING 'RKEAK-FIELD(06)' temp_srule-ktgrd.
840 PERFORM bdc_field USING 'RKEAK-FIELD(07)' temp_srule-kunrg.
841 PERFORM bdc_field USING 'RKEAK-FIELD(08)' temp_srule-wwrep.
842 PERFORM bdc_field USING 'RKEAK-FIELD(09)' temp_srule-wwbpi.
843 * PERFORM bdc_field USING 'RKEAK-FIELD(10)' temp_srule-
crmelem. " marketing element not provided in input file
844 PERFORM bdc_field USING 'RKEAK-FIELD(11)' temp_srule-wwfwk.
845 PERFORM bdc_field USING 'RKEAK-FIELD(12)' temp_srule-pstyv.
846 PERFORM bdc_field USING 'RKEAK-FIELD(13)' temp_srule-wwndf.
847 PERFORM bdc_field USING 'RKEAK-FIELD(14)' temp_srule-kukla.
848 PERFORM bdc_field USING 'RKEAK-FIELD(15)' temp_srule-kdgrp.
849
850 PERFORM bdc_field USING 'BDC_OKCODE' '=P+'.

Contents Unchanged:
851 656 PERFORM bdc_dynpro USING 'SAPLKEAK' '0300'.

Differing Lines:
852
853 *
657 PERFORM bdc_field USING 'RKEAK-FIELD(01)' temp_srule-
promo_grp. "Prod Hier Eg.24AVA12R890001.
658 PERFORM bdc_field USING 'RKEAK-FIELD(02)' temp_srule-
country. "Country Eg.US.

Lines not available in version of the REMOTE system:


854 * Fields available at this point:
855 * RKEAK-FIELD(01) : prod hier 01-5
856 * RKEAK-FIELD(02) : country
857 * RKEAK-FIELD(03) : segment
858 * RKEAK-FIELD(04) : VICSBOL
859 *
860
861 PERFORM bdc_field USING 'RKEAK-FIELD(01)' temp_srule-paph5.
862 PERFORM bdc_field USING 'RKEAK-FIELD(02)' temp_srule-
country. "Country Eg.US.
863 PERFORM bdc_field USING 'RKEAK-FIELD(03)' temp_srule-wwsgm.
864 * PERFORM bdc_field USING 'RKEAK-FIELD(04)' temp_srule-
vicsbol. " VICSBOL not provided in input file
865
866

Contents Unchanged:
867 659 PERFORM bdc_field USING 'BDC_OKCODE' '=WEIT'.

Lines not available in version of the REMOTE system:


868 * End of R3DK951587

Contents Unchanged:
869 660
870 661 PERFORM bdc_dynpro USING 'SAPLKOBS' '0100'.
871 662 PERFORM bdc_field USING 'COBRB-PERBZ' 'FUL'.

Lines not available in version of the REMOTE system:


872
Contents Unchanged:
873 663
874 664 * Begin of change for CTS: R3DK928679
875 665 CLEAR lv_temp.
... ... ...
953 743
954 744 * if there are no errors, update the success count
955 745 * else write the error messages to output

Differing Lines:
956 DATA: wa_tmp_msg_cnt TYPE i,
746 DATA: wa_tmp_msg_cnt TYPE i,

Contents Unchanged:
957 747 wa_tmp_rule_cnt TYPE i.
958 748
959 749 DESCRIBE TABLE temp_srule LINES wa_tmp_rule_cnt.
... ... ...
1032 822 * if there are any unsettled rules - scenario 3
1033 823 DATA: wa_unstrule TYPE c.
1034 824

Differing Lines:
1035 DATA: wa_err_msg TYPE string,
1036 err_flag(1) TYPE c.
825 DATA: wa_err_msg TYPE string,
826 err_flag(1) TYPE c.

Contents Unchanged:
1037 827
1038 828 DATA: wa_tmp_rule_cnt TYPE i.
1039 829
... ... ...
1160 950 EXPORTING
1161 951 tabname = w_tabname
1162 952 varkey = w_varkey.

Differing Lines:
1163 CALL FUNCTION 'DEQUEUE_ALL'
1164 EXPORTING
1165 _synchron = ' '.
953 CALL FUNCTION 'DEQUEUE_ALL'
954 EXPORTING
955 _SYNCHRON = ' ' .

Contents Unchanged:
1166 956
1167 957
1168 958 ENDIF.
... ... ...
1179 969 FORM convert_amt_percent TABLES tmp_srule LIKE t_srule[]
1180 970 USING p_total_amount.
1181 971 * Begin of addition for CTS: R3DK928679

Differing Lines:
1182 DATA: lwa_srule TYPE ty_srule,
972 DATA: lwa_srule TYPE ty_srule,

Contents Unchanged:
1183 973 lv_per_total TYPE p DECIMALS 2,
1184 974 lv_per_difference TYPE p DECIMALS 2,

Differing Lines:
1185 "R3DK930985 lv_index TYPE n.
1186 lv_index TYPE i.
"R3DK930985
975 "R3DK930985 lv_index TYPE n.
976 lv_index TYPE i. "R3DK930985

Contents Unchanged:
1187 977
1188 978
1189 979 CONSTANTS: lc_100 TYPE p DECIMALS 2 VALUE '100.00'.
... ... ...
1204 994 ENDLOOP.
1205 995 * Begin of addition for CTS: R3DK928679
1206 996 * Adjusting percentage to 100.00

Differing Lines:
1207 IF lv_per_total <> lc_100.
1208 lv_per_difference = lc_100 - lv_per_total.
1209 READ TABLE tmp_srule INTO lwa_srule INDEX lv_index.
1210 lwa_srule-per = lwa_srule-per + lv_per_difference.
1211 MODIFY tmp_srule FROM lwa_srule INDEX lv_index TRANSPORTING
per.
1212 ENDIF.
997 if lv_per_total <> lc_100.
998 lv_per_difference = lc_100 - lv_per_total.
999 READ TABLE tmp_srule INTO lwa_srule INDEX lv_index.
1000 lwa_srule-per = lwa_srule-per + lv_per_difference.
1001 MODIFY tmp_srule FROM lwa_srule INDEX lv_index TRANSPORTING
per.
1002 endif.

Contents Unchanged:
1213 1003 * End of addition for CTS: R3DK928679
1214 1004
1215 1005 ENDFORM. " CONVERT_AMT_PERCENT
... ... ...
1311 1101
1312 1102 * if there are errors, write the error messages to output and
1313 1103 * adjust the failure counts

Differing Lines:
1314 DATA: wa_tmp_msg_cnt TYPE i,
1104 DATA: wa_tmp_msg_cnt TYPE i,

Contents Unchanged:
1315 1105 wa_tmp_rule_cnt TYPE i.
1316 1106
1317 1107 DESCRIBE TABLE t_srule LINES wa_tmp_rule_cnt.
... ... ...
1342 1132 CONCATENATE 'Error Message:' t_messtab-msgid t_messtab-msgnr
'-' p_err_message INTO p_err_message SEPARATED BY space.
1343 1133 ENDIF.
1344 1134

Differing Lines:
1345 COMMIT WORK AND WAIT. "R3DK933630 10/11/2011
1135 COMMIT WORK AND WAIT. "R3DK933630 10/11/2011

Contents Unchanged:
1346 1136
1347 1137 ENDFORM. " MODIFY_RULES
1348 1138
... ... ...
1379 1169
1380 1170
1381 1171 LOOP AT p_data.

Differing Lines:
1382 WRITE:/1(8) 'Project:' , 9(15) p_data-pspid
LEFT-JUSTIFIED,
1383 24(13) ', Spend Type:', 38(5) p_data-
spend_type LEFT-JUSTIFIED,
1384 43(17) ', Product:', 61(2) p_data-artnr
LEFT-JUSTIFIED, "R3DK951587
1385 63(13) ', Customer:', 77(15) p_data-customer
LEFT-JUSTIFIED, "R3DK951587
1386 89(10) ', Country:', 100(3) p_data-country
LEFT-JUSTIFIED,
1387 104(9) ', Amount:', 114(15) p_data-amount
LEFT-JUSTIFIED,
1388 129(8) ', % Cal:', 138(4) p_data-per
LEFT-JUSTIFIED.
1172 WRITE:/1(8) 'Project:' , 9(15) p_data-pspid LEFT-
JUSTIFIED,
1173 24(13) ', Spend Type:', 38(5) p_data-spend_type
LEFT-JUSTIFIED,
1174 43(17) ', Customer Group:', 61(2) p_data-cust_grp
LEFT-JUSTIFIED,
1175 63(13) ', Promogroup:', 77(15) p_data-promo_grp
LEFT-JUSTIFIED,
1176 89(10) ', Country:', 100(3) p_data-country
LEFT-JUSTIFIED,
1177 104(9) ', Amount:', 114(15) p_data-amount
LEFT-JUSTIFIED,
1178 129(8) ', % Cal:', 138(4) p_data-per LEFT-
JUSTIFIED.

Lines not available in version of the REMOTE system:


1389

Contents Unchanged:
1390 1179
1391 1180 ENDLOOP.
1392 1181
... ... ...
1496 1285
1497 1286
1498 1287 ENDFORM. " GET_START_DATE_FP_FY