Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Please help me with this ABAP code!

Former Member
0 Likes
487

Here is my code:

===

REPORT ZCFICO6010

line-count 65

line-size 132

no standard page heading.

tables: zsopshist, zsops.

data: old_prezsops like zsops_prev. "PJCHG10854

data: new_prezsops like zsops_prev. "PJCHG10854

data: old_zzsops like zsops. "PJCHG10854

data: new_zzsops like zsops. "PJCHG10854

data: long_rec(900) type c. "PJCHG10854

data: old_lzsops like long_rec. "PJCHG10854

data: new_lzsops like long_rec. "PJCHG10854

data: curr_zsops like zsops,

prev_zsops like zsops_prev.

*-----

data: begin of i_key,

kostl(5),

aedat(8),

cputm(6).

data: end of i_key.

DATA: HEADER like zsops-oprcd,

header1(92) type c.

  • header1 like header.

data: v_field(18) type c,

v_old(20) type c,

v_new(20) type c,

user like zsops-uname,

date like zsops-aedtm.

data: begin of table occurs 0,

text(20) type c,

oprcd like zsops-oprcd,

field(15) type c,

user like zsops-uname,

date like zsops-aedtm,

v_old(20) ,

v_new(20) ,

end of table.

data: text(30) type c.

data: begin of itab occurs 0,

srtfd like zsopshist-srtfd,

end of itab.

*data: ihist like old_zsops occurs 0 with header line,

  • nhist like new_zsops occurs 0 with header line.

data: ihist like zsops occurs 0 with header line,

nhist like zsops occurs 0 with header line.

*&----


*& Selection Screen

*&----


SELECTION-SCREEN BEGIN OF BLOCK one WITH FRAME TITLE TEXT-200.

parameters: s_oprcd like zsops-oprcd obligatory,

s_oprcdh like zsops-oprcd .

  • s_cputm for sy-uzeit.

SELECTION-SCREEN END OF BLOCK one.

SELECTION-SCREEN BEGIN OF BLOCK three WITH FRAME TITLE TEXT-300.

parameters:s_aedtm like zsops-aedtm obligatory,

s_aedtmh like zsops-aedtm obligatory.

SELECTION-SCREEN END OF BLOCK three.

SELECTION-SCREEN BEGIN OF BLOCK TWO WITH FRAME TITLE TEXT-100.

PARAMETERS: P_REGSRT RADIOBUTTON GROUP RADI,

P_ACCSRT RADIOBUTTON GROUP RADI.

SELECTION-SCREEN END OF BLOCK TWO.

parameters: new_date like sy-datum obligatory default '20051214'.

&----


*& Top-Of-Page

&----


top-of-page.

  • BEGIN OF BLOCK INSERTED FOR "JJMM20040330

DATA: CC_LOW LIKE ZSOPS-OPRCD,

CC_HIGH LIKE ZSOPS-OPRCD,

FROM_DATE(10) TYPE C,

TO_DATE(10) TYPE C.

WRITE: S_OPRCD TO CC_LOW NO-ZERO,

S_AEDTM TO FROM_DATE USING EDIT MASK '__/__/____',

S_AEDTMH TO TO_DATE USING EDIT MASK '__/__/____'.

IF S_OPRCDH = S_OPRCD.

CONCATENATE: 'Cost Center'(T02) CC_LOW 'Changed On'(T04) FROM_DATE

'To'(T03) TO_DATE 'Sort By'(T05) text INTO HEADER1

separated by space.

ELSE.

WRITE: S_OPRCDH TO CC_HIGH NO-ZERO.

CONCATENATE: 'Cost Center'(T02) CC_LOW 'To'(T03) CC_HIGH

'Changed On'(T04) FROM_DATE 'To'(T03) TO_DATE

'Sort By'(T05) text INTO HEADER1 separated by space.

ENDIF.

  • END OF BLOCK INSERTED FOR "JJMM20040330

PERFORM DISPLAY_PAGE_HEADER(ZCLT0001) USING

  • header1 "JJMM20040330

HEADER

TEXT-T01

header1. "JJMM20040330

Write:/ 'Field Changed'(C01), 25 'Old Values'(C02),

55 'New Values'(C03), 85 'Cost Center'(C04),

105 'Changed By'(C05), 120 'Changed On'(C06).

uline.

&----


start-of-selection.

&----


data: time(6),

v_subrc like sy-subrc,

prev_format(1),

srtfd like zsopshist-srtfd,

srtfdh like zsopshist-srtfd.

srtfd0(5) = s_oprcd5(5).

srtfd+5(8) = s_aedtm.

srtfd+13(6) = '000000'.

if s_oprcdh is initial.

s_oprcdh = s_oprcd.

endif.

srtfdh0(5) = s_oprcdh5(5).

srtfdh+5(8) = s_aedtmh.

srtfdh+13(6) = '999999'.

select srtfd from zsopshist into table itab

WHERE SRTFD >= SRTFD

AND SRTFD <= SRTFDH.

  • sort itab by srtfd.

loop at itab.

IF ITAB+5(8) GE S_AEDTM AND "IJHM00001

ITAB+5(8) LE S_AEDTMH. "IJHM00001

move: itab+0(5) to i_key-kostl,

itab+5(8) to i_key-aedat,

itab+13(6) to i_key-cputm.

clear: v_subrc, prev_format.

if itab+5(8) lt new_date.

prev_format = 'X'.

perform import_record_prev changing v_subrc. "PJCHG10854

else.

perform import_record changing v_subrc. "PJCHG10854

endif.

if v_subrc = 0. "PJCHG10854

perform get_final_table.

endif.

ENDIF. "IJHM00001

endloop.

if p_regsrt = 'X'.

sort table by oprcd field date descending.

text = 'Cost Center'(C04).

else.

sort table by field oprcd date descending.

text = 'Field Changed'(C01).

endif.

perform write_report.

----


  • FORM get_final_table *

----


  • ........ *

----


form get_final_table.

  • move old_zsops to ihist. "PJCHG10854

  • move new_zsops to nhist. "PJCHG10854

if prev_format eq 'X'. "PJCHG10854

move old_prezsops to ihist. "PJCHG10854

move new_prezsops to nhist. "PJCHG10854

else. "PJCHG10854

move old_zzsops to ihist. "PJCHG10854

move new_zzsops to nhist. "PJCHG10854

endif. "PJCHG10854

if ihist-ivcrg ne nhist-ivcrg.

table-text = 'Invst Charge Base'(F01).

table-field = 'IVCRG'.

table-v_old = ihist-ivcrg.

table-v_new = nhist-ivcrg.

table-user = nhist-uname.

table-date = nhist-aedtm.

table-oprcd = nhist-oprcd.

append table.

  • perform write_report.

endif.

if ihist-mgtfp ne nhist-mgtfp.

table-field = 'MGTFP'.

table-text = 'Mgt Fee %'(F02).

table-v_old(12) = ihist-mgtfp.

table-v_new(12) = nhist-mgtfp.

table-user = nhist-uname.

table-date = nhist-aedtm.

table-oprcd = nhist-oprcd.

append table.

  • perform write_report.

endif.

if ihist-discd ne nhist-discd.

table-field = 'DISCD'.

table-text = 'Cash Disc. Passback'(F03).

table-v_old = ihist-discd.

table-v_new = nhist-discd.

table-user = nhist-uname.

table-date = nhist-aedtm.

table-oprcd = nhist-oprcd.

append table.

  • perform write_report.

endif.

if ihist-consc ne nhist-consc.

table-field = 'CONSC'.

table-text = 'Subsidy Calc'(F04).

table-v_old = ihist-consc.

table-v_new = nhist-consc.

table-user = nhist-uname.

table-date = nhist-aedtm.

table-oprcd = nhist-oprcd.

append table.

  • perform write_report.

endif.

if ihist-payfart ne nhist-payfart.

table-field = 'PAYFART'.

table-text = 'Payroll Fringe'(F05).

table-v_old(12) = ihist-payfart.

table-v_new(12) = nhist-payfart.

table-user = nhist-uname.

table-date = nhist-aedtm.

table-oprcd = nhist-oprcd.

append table.

  • perform write_report.

endif.

if ihist-frbpb ne nhist-frbpb.

table-field = 'FRBPB'.

table-text = 'Rebate Pass Back'(F06).

table-v_old(12) = ihist-frbpb.

table-v_new(12) = nhist-frbpb.

table-user = nhist-uname.

table-date = nhist-aedtm.

table-oprcd = nhist-oprcd.

append table.

  • perform write_report.

endif.

if ihist-exlca ne nhist-exlca.

table-field = 'EXLCA'.

table-text = 'Excl Source27'(F07).

table-v_old = ihist-exlca.

table-v_new = nhist-exlca.

table-user = nhist-uname.

table-date = nhist-aedtm.

table-oprcd = nhist-oprcd.

  • perform write_report.

append table.

endif.

if ihist-exlcb ne nhist-exlcb.

table-field = 'EXLCB'.

table-text = 'Excl Source11'(F08).

table-v_old = ihist-exlcb.

table-v_new = nhist-exlcb.

table-user = nhist-uname.

table-date = nhist-aedtm.

table-oprcd = nhist-oprcd.

  • perform write_report.

append table.

endif.

if ihist-trnrate ne nhist-trnrate.

table-field = 'TRNRATE'.

table-text = 'Payroll Training'(F09).

table-v_old(12) = ihist-trnrate.

table-v_new(12) = nhist-trnrate.

table-user = nhist-uname.

table-date = nhist-aedtm.

table-oprcd = nhist-oprcd.

append table.

  • perform write_report.

endif.

if ihist-mgffa ne nhist-mgffa.

table-field = 'MGFFA'.

table-text = 'Mgt Fee Amt'(F10).

table-v_old(12) = ihist-mgffa.

table-v_new(12) = nhist-mgffa.

table-user = nhist-uname.

table-date = nhist-aedtm.

table-oprcd = nhist-oprcd.

  • perform write_report.

append table.

endif.

if ihist-mgtfi ne nhist-mgtfi.

table-field = 'MGTFI'.

table-text = 'Mgt Fees Indicator'(F11).

table-v_old = ihist-mgtfi.

table-v_new = nhist-mgtfi.

table-user = nhist-uname.

table-date = nhist-aedtm.

table-oprcd = nhist-oprcd.

  • perform write_report.

append table.

endif.

if ihist-eqres ne nhist-eqres.

table-field = 'EQRES'.

table-text = 'Eqip Res Accrual'(F12).

  • table-v_old = ihist-eqres. "JJMM20040331

  • table-v_new = nhist-eqres. "JJMM20040331

table-v_old(12) = ihist-eqres. "JJMM20040331

table-v_new(12) = nhist-eqres. "JJMM20040331

table-user = nhist-uname.

table-date = nhist-aedtm.

table-oprcd = nhist-oprcd.

append table.

  • perform write_report.

endif.

if ihist-ovrhd ne nhist-ovrhd.

table-field = 'OVRHD'.

table-text = 'OverHead Amt'(F13).

table-v_old(12) = ihist-ovrhd.

table-v_new(12) = nhist-ovrhd.

table-user = nhist-uname.

table-date = nhist-aedtm.

table-oprcd = nhist-oprcd.

append table.

  • perform write_report.

endif.

if ihist-xaccural ne nhist-xaccural.

table-field = 'XACCUARAL'.

table-text = 'Exclude Accrual'(F14).

table-v_old(12) = ihist-xaccural.

table-v_new(12) = nhist-xaccural.

table-user = nhist-uname.

table-date = nhist-aedtm.

table-oprcd = nhist-oprcd.

append table.

  • perform write_report.

endif.

if ihist-ovrrt ne nhist-ovrrt.

table-field = 'OVRRT'.

table-text = 'OverHead Rate'(F15).

table-v_old(12) = ihist-ovrrt.

table-v_new(12) = nhist-ovrrt.

table-user = nhist-uname.

table-date = nhist-aedtm.

table-oprcd = nhist-oprcd.

append table.

  • perform write_report.

endif.

if ihist-ztbd01 ne nhist-ztbd01.

table-field = 'ZTBD01'.

  • table-text = 'Char1'. "JJMM20040330

table-text = 'Meal Allowance'(F16). "JJMM20040330

table-v_old = ihist-ztbd01.

table-v_new = nhist-ztbd01.

table-user = nhist-uname.

table-date = nhist-aedtm.

table-oprcd = nhist-oprcd.

append table.

  • perform write_report.

endif.

  • BEGIN OF BLOCK INSERTED FOR "JJMM20040330

if ihist-earlybil ne nhist-earlybil.

table-field = 'EARLYBIL'.

table-text = 'Early Billing'(F17).

table-v_old = ihist-earlybil.

table-v_new = nhist-earlybil.

table-user = nhist-uname.

table-date = nhist-aedtm.

table-oprcd = nhist-oprcd.

append table.

endif.

if ihist-combined ne nhist-combined.

table-field = 'COMBINED'.

table-text = 'Combined Billing'(F18).

table-v_old = ihist-COMBINED.

table-v_new = nhist-COMBINED.

table-user = nhist-uname.

table-date = nhist-aedtm.

table-oprcd = nhist-oprcd.

append table.

endif.

  • END OF BLOCK INSERTED FOR "JJMM20040330

if ihist-rate1 ne nhist-rate1.

table-field = 'RATE1'.

table-text = 'Rate 1'(F19).

table-v_old(12) = ihist-rate1.

table-v_new(12) = nhist-rate1.

table-user = nhist-uname.

table-date = nhist-aedtm.

table-oprcd = nhist-oprcd.

append table.

  • perform write_report.

endif.

*if ihist-rate1 ne nhist-rate2. "JJMM20040330

  • table-field = 'RATE1'. "JJMM20040330

if ihist-rate2 ne nhist-rate2. "JJMM20040330

table-field = 'RATE2'. "JJMM20040330

table-text = 'Rate 2'(F20).

table-v_old(12) = ihist-rate2.

table-v_new(12) = nhist-rate2.

table-user = nhist-uname.

table-date = nhist-aedtm.

table-oprcd = nhist-oprcd.

append table.

  • perform write_report.

endif.

*if ihist-rate1 ne nhist-rate3. "JJMM20040330

if ihist-rate3 ne nhist-rate3. "JJMM20040330

table-field = 'RATE3'.

table-text = 'Rate 3'(F21).

table-v_old(12) = ihist-rate3.

table-v_new(12) = nhist-rate3.

table-user = nhist-uname.

table-date = nhist-aedtm.

table-oprcd = nhist-oprcd.

append table.

  • perform write_report.

endif.

*if ihist-rate1 ne nhist-rate4. "JJMM20040330

if ihist-rate4 ne nhist-rate4. "JJMM20040330

table-field = 'RATE4'.

table-text = 'Rate 4'(F22).

table-v_old(12) = ihist-rate4.

table-v_new(12) = nhist-rate4.

table-user = nhist-uname.

table-date = nhist-aedtm.

table-oprcd = nhist-oprcd.

append table.

  • perform write_report.

endif.

*if ihist-rate1 ne nhist-rate5. "JJMM20040330

if ihist-rate5 ne nhist-rate5. "JJMM20040330

table-field = 'RATE5'.

table-text = 'Rate 5'(F23).

table-v_old(12) = ihist-rate5.

table-v_new(12) = nhist-rate5.

table-user = nhist-uname.

table-date = nhist-aedtm.

table-oprcd = nhist-oprcd.

append table.

  • perform write_report.

endif.

*if ihist-rate1 ne nhist-rate6. "JJMM20040330

if ihist-rate6 ne nhist-rate6. "JJMM20040330

table-field = 'RATE6'.

table-text = 'Rate 6'(F24).

table-v_old(12) = ihist-rate6.

table-v_new(12) = nhist-rate6.

table-user = nhist-uname.

table-date = nhist-aedtm.

table-oprcd = nhist-oprcd.

append table.

  • perform write_report.

endif.

*if ihist-rate1 ne nhist-rate7. "JJMM20040330

if ihist-rate7 ne nhist-rate7. "JJMM20040330

table-field = 'RATE7'.

table-text = 'Rate 7'(F25).

table-v_old(12) = ihist-rate7.

table-v_new(12) = nhist-rate7.

table-user = nhist-uname.

table-date = nhist-aedtm.

table-oprcd = nhist-oprcd.

append table.

  • perform write_report.

endif.

*if ihist-rate1 ne nhist-rate8. "JJMM20040330

if ihist-rate8 ne nhist-rate8. "JJMM20040330

table-field = 'RATE8'.

table-text = 'Rate 8'(F26).

table-v_old(12) = ihist-rate8.

table-v_new(12) = nhist-rate8.

table-user = nhist-uname.

table-date = nhist-aedtm.

table-oprcd = nhist-oprcd.

append table.

  • perform write_report.

endif.

*if ihist-rate1 ne nhist-rate9. "JJMM20040330

if ihist-rate9 ne nhist-rate9. "JJMM20040330

table-field = 'RATE9'.

table-text = 'Rate 9'(F27).

table-v_old(12) = ihist-rate9.

table-v_new(12) = nhist-rate9.

table-user = nhist-uname.

table-date = nhist-aedtm.

table-oprcd = nhist-oprcd.

append table.

  • perform write_report.

endif.

*if ihist-rate1 ne nhist-rate10. "JJMM20040330

if ihist-rate10 ne nhist-rate10. "JJMM20040330

table-field = 'RATE10'.

table-text = 'Rate 10'(F28).

table-v_old(12) = ihist-rate10.

table-v_new(12) = nhist-rate10.

table-user = nhist-uname.

table-date = nhist-aedtm.

table-oprcd = nhist-oprcd.

append table.

  • perform write_report.

endif.

*if ihist-rate1 ne nhist-rate11. "JJMM20040330

if ihist-rate11 ne nhist-rate11. "JJMM20040330

table-field = 'RATE11'.

table-text = 'Rate 11'(F29).

table-v_old(12) = ihist-rate11.

table-v_new(12) = nhist-rate11.

table-user = nhist-uname.

table-date = nhist-aedtm.

table-oprcd = nhist-oprcd.

append table.

  • perform write_report.

endif.

  • The following lines of code have been added per change IJHM00001

if ihist-rate12 ne nhist-rate12.

table-field = 'RATE12'.

table-text = 'Rate 12'(F30).

table-v_old(12) = ihist-rate12.

table-v_new(12) = nhist-rate12.

table-user = nhist-uname.

table-date = nhist-aedtm.

table-oprcd = nhist-oprcd.

append table.

endif.

if ihist-rate13 ne nhist-rate13.

table-field = 'RATE13'.

table-text = 'Rate 13'(F31).

table-v_old(12) = ihist-rate13.

table-v_new(12) = nhist-rate13.

table-user = nhist-uname.

table-date = nhist-aedtm.

table-oprcd = nhist-oprcd.

append table.

endif.

if ihist-rate14 ne nhist-rate14.

table-field = 'RATE14'.

table-text = 'Rate 14'(F32).

table-v_old(12) = ihist-rate14.

table-v_new(12) = nhist-rate14.

table-user = nhist-uname.

table-date = nhist-aedtm.

table-oprcd = nhist-oprcd.

append table.

endif.

if ihist-rate15 ne nhist-rate15.

table-field = 'RATE15'.

table-text = 'Rate 15'(F33).

table-v_old(12) = ihist-rate15.

table-v_new(12) = nhist-rate15.

table-user = nhist-uname.

table-date = nhist-aedtm.

table-oprcd = nhist-oprcd.

append table.

endif.

if ihist-rate16 ne nhist-rate16.

table-field = 'RATE16'.

table-text = 'Rate 16'(F34).

table-v_old(12) = ihist-rate16.

table-v_new(12) = nhist-rate16.

table-user = nhist-uname.

table-date = nhist-aedtm.

table-oprcd = nhist-oprcd.

append table.

endif.

if ihist-rate17 ne nhist-rate17.

table-field = 'RATE17'.

table-text = 'Rate 17'(F35).

table-v_old(12) = ihist-rate17.

table-v_new(12) = nhist-rate17.

table-user = nhist-uname.

table-date = nhist-aedtm.

table-oprcd = nhist-oprcd.

append table.

endif.

if ihist-rate18 ne nhist-rate18.

table-field = 'RATE18'.

table-text = 'Rate 18'(F36).

table-v_old(12) = ihist-rate18.

table-v_new(12) = nhist-rate18.

table-user = nhist-uname.

table-date = nhist-aedtm.

table-oprcd = nhist-oprcd.

append table.

endif.

**********************************************************************

  • The following lines of code have been added per change IJHM00002

if ihist-rate19 ne nhist-rate19.

table-field = 'RATE19'.

table-text = 'Rate 19'(F37).

table-v_old(12) = ihist-rate19.

table-v_new(12) = nhist-rate19.

table-user = nhist-uname.

table-date = nhist-aedtm.

table-oprcd = nhist-oprcd.

append table.

endif.

if ihist-rate20 ne nhist-rate20.

table-field = 'RATE20'.

table-text = 'Rate 20'(F38).

table-v_old(12) = ihist-rate20.

table-v_new(12) = nhist-rate20.

table-user = nhist-uname.

table-date = nhist-aedtm.

table-oprcd = nhist-oprcd.

append table.

endif.

if ihist-rate21 ne nhist-rate21.

table-field = 'RATE21'.

table-text = 'Rate 21'(F39).

table-v_old(12) = ihist-rate21.

table-v_new(12) = nhist-rate21.

table-user = nhist-uname.

table-date = nhist-aedtm.

table-oprcd = nhist-oprcd.

append table.

endif.

if ihist-rate22 ne nhist-rate22.

table-field = 'RATE22'.

table-text = 'Rate 22'(F40).

table-v_old(12) = ihist-rate22.

table-v_new(12) = nhist-rate22.

table-user = nhist-uname.

table-date = nhist-aedtm.

table-oprcd = nhist-oprcd.

append table.

endif.

**********************************************************************

if ihist-intcrb ne nhist-intcrb.

table-field = 'INTCRB'.

table-text = 'Intcrb'(F47). "IJHM00002

  • table-text = 'Intcrb'(F37). "IJHM00002

table-v_old = ihist-intcrb.

table-v_new = nhist-intcrb.

table-user = nhist-uname.

table-date = nhist-aedtm.

table-oprcd = nhist-oprcd.

append table.

endif.

if ihist-intcrr ne nhist-intcrr.

table-field = 'INTCRR'.

table-text = 'Intcrr'(F48). "IJHM00002

  • table-text = 'Intcrr'(F38). "IJHM00002

table-v_old(12) = ihist-intcrr.

table-v_new(12) = nhist-intcrr.

table-user = nhist-uname.

table-date = nhist-aedtm.

table-oprcd = nhist-oprcd.

append table.

endif.

if ihist-zwktran ne nhist-zwktran.

table-field = 'ZWKTRAN'.

table-text = 'Data Trans End Unit'(F49). "IJHM00002

  • table-text = 'Data Trans End Unit'(F39). "IJHM00002

table-v_old = ihist-zwktran.

table-v_new = nhist-zwktran.

table-user = nhist-uname.

table-date = nhist-aedtm.

table-oprcd = nhist-oprcd.

append table.

endif.

if ihist-zwkbud ne nhist-zwkbud.

table-field = 'ZWKBUD'.

table-text = 'Wkly Budget Ind'(F50). "IJHM00002

  • table-text = 'Wkly Budget Ind'(F40). "IJHM00002

table-v_old = ihist-zwkbud.

table-v_new = nhist-zwkbud.

table-user = nhist-uname.

table-date = nhist-aedtm.

table-oprcd = nhist-oprcd.

append table.

endif.

if ihist-bcycle ne nhist-bcycle.

table-field = 'BCYCLE'.

table-text = 'Bcycle'(F51). "IJHM00002

  • table-text = 'Bcycle'(F41). "IJHM00002

table-v_old = ihist-bcycle.

table-v_new = nhist-bcycle.

table-user = nhist-uname.

table-date = nhist-aedtm.

table-oprcd = nhist-oprcd.

append table.

endif.

if ihist-ovind ne nhist-ovind.

table-field = 'OVIND'.

table-text = 'Ovind'(F52). "IJHM00002

  • table-text = 'Ovind'(F42). "IJHM00002

table-v_old = ihist-ovind.

table-v_new = nhist-ovind.

table-user = nhist-uname.

table-date = nhist-aedtm.

table-oprcd = nhist-oprcd.

append table.

endif.

*New code for PRSID -


"ZN032106

if ihist-prsid ne nhist-prsid.

table-field = 'PRSID'.

table-text = 'PRSID'(F53).

table-v_old = ihist-prsid.

table-v_new = nhist-prsid.

table-user = nhist-uname.

table-date = nhist-aedtm.

table-oprcd = nhist-oprcd.

append table.

endif.

*End of new code----


"ZN032106

endform.

----


  • FORM write_report *

----


  • ........ *

----


form write_report.

loop at table.

write:/1 table-text, 25 table-v_old(12) left-justified,

55 table-v_new(12) left-justified, 85 table-oprcd,

106 table-user, 120 table-date.

uline.

endloop.

skip 5. "JJMM20040330

write:/35 TEXT-R01. "JJMM20040330

reserve 1 lines. "JJMM20040330

endform.

&----


*& Form import_record

&----


form import_record changing p_subrc.

import i_key

old_zsops to old_zzsops

new_zsops to new_zzsops

from database zsopshist(Z1)

id i_key.

p_subrc = sy-subrc.

endform. " import_record

&----


*& Form import_record_prev

&----


form import_record_prev changing p_subrc.

import i_key

old_zsops to old_prezsops

new_zsops to new_prezsops

from database zsopshist(Z1)

id i_key.

p_subrc = sy-subrc.

endform. " import_record_prev

&----


*& Form import_record_long

&----


form import_record_long changing p_subrc.

import i_key

old_zsops to old_lzsops

new_zsops to new_lzsops

from database zsopshist(Z1)

id i_key.

p_subrc = sy-subrc.

endform. " import_record_prev

===

<b>Here is the dump I am getting:</b>

====================

Error when attempting to IMPORT object "OLD_ZSOPS".

An exception occurred that is explained in detail below.

The exception, which is assigned to class 'CX_SY_IMPORT_MISMATCH_ERROR', was

not caught in

procedure "IMPORT_RECORD" "(FORM)", nor was it propagated by a RAISING clause.

Since the caller of the procedure could not have anticipated that the

exception would occur, the current program is terminated.

The reason for the exception is:

The object "OLD_ZSOPS" has a different object type in the dataset from

that in the target program "ZCFICO6010".

Try to find out why the type of the object is incorrect.

There are various possible options:

1. The type of the imported object has changed in the Data Dictionary.

Make sure that the type of the imported object matches the type

of the object in the Data Dictionary.

If the data cannot be restored from another source, the data must be

read by the 'old' structure, converted und again eported with the new

structure, so that future IMPORTs will always function with the new

structure.

2. A new program version is active, which no longer fits the dataset.

Try to solve the error generating the program "ZCFICO6010" again. This

works as follows: Select transaction SE38 in the SAP system. Enter

the program name "ZCFICO6010". Then activate the function 'Generate'.

If the error occures in a non-modified SAP program, you may be able to

find an interim solution in an SAP Note.

If you have access to SAP Notes, carry out a search with the following

keywords:

"CONNE_IMPORT_WRONG_OBJECT_TYPE" "CX_SY_IMPORT_MISMATCH_ERROR"

"ZCFICO6010" or "ZCFICO6010"

"IMPORT_RECORD"

If you cannot solve the problem yourself and want to send an error

notification to SAP, include the following information:

1. The description of the current problem (short dump)

To save the description, choose "System->List->Save->Local File

(Unconverted)".

2. Corresponding system log

Display the system log by calling transaction SM21.

Restrict the time interval to 10 minutes before and five minutes

after the short dump. Then choose "System->List->Save->Local File

(Unconverted)".

3. If the problem occurs in a problem of your own or a modified SAP

program: The source code of the program

In the editor, choose "Utilities->More

Utilities->Upload/Download->Download".

4. Details about the conditions under which the error occurred or which

actions and input led to the error.

The exception must either be prevented, caught within proedure

"IMPORT_RECORD" "(FORM)", or its possible occurrence must be declared in the

RAISING clause of the procedure.

To prevent the exception, note the following:

==============

Sorry forthis lengthy post but I was having difficulty explaining in previous post. All answers will be rewarded..

Thanks.

Mithun

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
415

What is the structure for zsops ?

There seems to be a compatibility issue....

1 REPLY 1
Read only

Former Member
0 Likes
416

What is the structure for zsops ?

There seems to be a compatibility issue....