Help in ABAP code please!

We have upgraded to ECC6.0 and I am trying to fix some syntax errors. Here is the piece of code with the problem:
====
import i_key
           old_zsops to old_zzsops
           new_zsops to new_zzsops
           from database zsopshist(Z1)
           id i_key.
     import i_key
           old_zsops to old_prezsops
           new_zsops to new_prezsops
           from database zsopshist(Z1)
           id i_key.
=====
I am kind of new to ABAP and went throught the documentation but could someone please tell me what "old_zsops to old_zzsops" does?
The code above is causing the dump with error "Error when attempting to IMPORT object "OLD_ZSOPS"". I went through the code and I found that old_zsops and new_zsops is not declared at all and it doesn't give any compilation errors! It goes to dump when I execute the problem. If it is required I would send the whole code but I see the following declarations in the code:
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.
Could someone please help me how to fix this problem? How do I declare "old_zsops and new_zsops" because they are used in 2 different import statements? All the answers will be rewarded.
Thanks.
Mithun

Everything is in the same porgram. To avoid confusion I will send the whole code:
===
REPORT ZCFICO6010
         line-count 65
         line-size 132
         no standard page heading.
tables: zsopshist, zsops.
*data: old_zsops like zsops,
     new_zsops like 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
BEGIN OF BLOCK COMMENTED OUT FOR                         "JJMM20040330
write:/5 'Cost Center'(T02), s_oprcd+5(5), 'To'(T03), s_oprcdh,
       40 'Changed On'(T04), s_aedtm, 'To'(T03), s_aedtmh,
       85 'Sort by'(T05), text.
uline. skip.
END OF BLOCK COMMENTED OUT FOR                           "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.
/---  PJCHG10854 Begin commented/New code                     /
/---  To change the import structure based on date the old    /
/---  import was removed and following coded added.           /
      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.
     import i_key
          old_zsops
          new_zsops
          from database zsopshist(Z1)
          id i_key.
/---   PJCHG10854 END commented/New code                /
      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
========
Thanks.
Mithun

Similar Messages

  • Need help in ABAP code to Enhance the Extract Structure ?????

    Hi all,
        I want to enhance the extract structure to get KBETR & KBRUE fields of KONP table since it didn’t allow me to add those fields while creating the generic extractor because of currency key problems. I want to read all KONP records into internal table with KNUMH (Key). Next, I want to fill them into ZZKBETR & ZZKBRUE of Extract Structure ZOXUR40065 in loop.
    DATA:
      i_t_zrebate like ZOXUR40065 occurs 0 with header line,
      reb_tabix like sy-tabix.
    TABLES: KONP.
      Could you please help me in completing the ABAP code?
    Thanks,
    Venkat.

    Hello Manga,
        I have included the following code in ZXRSAU01:
    WHEN 'ZREBATE'.
    PERFORM ZREBATE_EXIT TABLES C_T_DATA.
    After Double click on ZREBATE_EXIT on perform statement, it created ZXRSAF01 include and the following code is added in it:
    FORM ZREBATE_EXIT TABLES FP_C_T_DATA STRUCTURE ZOXUR40065.
    DATA:
    i_t_zrebate like ZOXUR40065 occurs 0 with header line,
    reb_tabix like sy-tabix.
    FIELD-SYMBOLS: <l_c_t_data> TYPE ZOXUR40065.
    LOOP AT fp_c_t_data ASSIGNING <l_c_t_data>.
    reb_tabix = sy-tabix.
    select single KBETR KBRUE
    into (<l_c_t_data>-ZZKBETR,
    <l_c_t_data>-ZZKBRUE,
    from KONP
    where KNUMH eq <l_c_t_data>-KNUMH.
    if sy-subrc eq 0.
    MODIFY fp_c_t_data FROM <l_c_t_data> INDEX reb_tabix.
    endif.
    CLEAR:reb_tabix.
    ENDLOOP.
    ENDFORM.
    When I tried to Activate this ZXRSAF01 include, it fails with 'The FORM "ZREBATE_EXIT" does not exist'.
      Should it be FP_C_T  or P_C_T? I found P_C_T in ZXRSAF01 include.
      What is wrong with it, please ?
       Can't I add this whole code in main include ZXRSAU01itself?
      The Extractor ZREBATE is based on KONA, KONH & KONP tables. This Extractor and KONA table have the same 4000 records and KONP has 13000 records. I want to extract KBERT & KBRUE from KONP.
       Thanks in advance.
    Regards,
    Venkat

  • Syntax helper for ABAP code?

    Please, I would like to ask any of you ABAP developers with some expirience...is there any tool (inside or outside the Workbench) that can color the syntax of ABAP code... (the way it is done in some other IDEs like Visual Studio, JBuilder or even Ultra Edit...) ???

    There are some IDE external of SAP that do that. But .. I try it and don't like that.
    Ex : http://www.sapedit.com/
    Wait for next release, there will be some new stuff.
    Frédéric

  • Need help in ABAP code

    Hi All,
    I have the data like this and ABC line is the primary object, Inline is the attribute.
    ABC Line                                                                       Inline
    GH04                    1001
    OI04                    1031
    OU04                    1002
    OU05                                                                            1002
    My requirement is like in the report. I have to use the Inline and restrict with the data when I restrict with 1001, 1031 and 1002. But it has to consider 1001, 1031 and 1002 which starts with only OU*. I donu2019t require all ABC lines.
    I tried to write the code but I couldnu2019t.
    Can any one give the code please?
    Thanks
    Sravani

    if the ABC line item is OU* then you need to display 1001 and 1031 else you want display all the items
    I m right???
    reach me at
    Edited by: shanthi bhaskar on Apr 15, 2010 5:20 PM

  • Multiple Users Login ( Help With The Code ) Please.

    Hi all. Please help me...
    I'm using www.wix.com to create my websites.
    but since Wix.com don't able us to have member system conecet to database, i use Flash SWF As3 files...
    Please can anyone help me with the Code?
    Username=1    /Password= 1    /Url= www.1.com
    Username=2    /Password= 2    /Url= www.2.com
    Username=2    /Password= 2    /Url= www.2.com
    *If user name 1 or 2 or 3 correct. Show massage ex: Welcome back, if not correct " Bad login"
    *When login, it will open the url but in new page after the old one closed.
    + There is anyway to add " Password recovaring box too"?
    but not connected to datdabase as i said?
    Please help me, please! i areadly have code but it don't work for more than one user.
    Thank u soooo much!!
    Loai

    Here's the code i have already,,
    but i don't know how to add more than one user + when login it open new window ( popup ) i want it to open in the same window...
    Please help.
    stop();
    //hide the password
    //pass_txt.displayAsPassword = true;
    //adding event listener to the login button
    login_mc.addEventListener(MouseEvent.CLICK, loginUser);
    function loginUser(e:MouseEvent):void{
    //if both username and password are correct let the user logged in
    if(name_txt.text == "1" && pass_txt.text == "1"){
    navigateToURL( new URLRequest( "http://www.wix.com/designersgroup/tutorials/9-1" ), "_blank" );
    display_txt.text = "Going to secure area";
    else if(name_txt.text != "1" && pass_txt.text != "1"){
    display_txt.text = "Login failed!";
    if(name_txt.text == "2" && pass_txt.text == "2"){
    navigateToURL( new URLRequest( "http://www.wix.com/designersgroup/tutorials/9-2" ), "_blank" );
    display_txt.text = "Going to secure area";
    else if(name_txt.text != "2" && pass_txt.text != "2"){
    display_txt.text = "Login failed!";

  • Help with button code please?

    I am a novice and have just completed my first animated movie. I need help with action script.
    The movie is currently looped and I have created and invisible button the size of the frame with the intention that a user can click on the movie image to stop it and on second click continue the movie from where it stopped.
    I have used the AS event handler method to stop the movie. I have tested it and it works. But I cannot figure suitable code to restart the movie.
    Two questions;
    1. am I going about the task the right way? (should I use two buttons, one stop, one start)?
    2. if my approach is feasible, can anyone give me the correct AS to re-start the movie and put me out of my misery please?

    you can use the following after changing "yourbutton" and "yourmovieclip" to use suitable instance names:
    yourbutton.onRelease=function(){
    if(!this.toggle){
    yourmovieclip.stop();
    } else {
    yourmovieclip.play();
    this.toggle=!this.toggle;

  • Help with abap code in Transformation

    Hi Experts,
    we have a scenario where we load delta data from an DSO into a Cube.
    The records in the DSO looks like below.
    Location as (L)
    WorkOrder as (W)
    Startdate(DDMMYYYY)/time (HH:MM:SS) as (S)
    Finishdate/time as (F)
    L1
    W1
    21/04/2009/10:00:00
    21/04/2009/12:00:00
    L1
    W2
    21/04/2009/14:00:00
    21/04/2009/23:00:00
    || L1 ||W3||  21/04/2009/16:00:00 ||21/04/2009/20:00:00 || 
    Total time ( April 2009 ) for above Location L1 should be calculated as a difference between W1 and W2 since W3 is a overlapping record. So the result would be 13 Hrs. Work Orders are summarised, so we dont need work order info in the output.
    Can you experts help me with the code to implement??
    Thanks,
    DV

    For each location, for example L1, move the records to an internal table itab.
    sort itab by startdate.
    read table itab index 1. 
    You will get the first value.
    sort itab by finishdate descending.
    read table itab index 1.
    you will get the second value.
    Calculate the difference and populate it to the internal table.
    finally modify the source package.
    I have just given the logic.  I hope you can build upon this.
    I hope it helps.
    Thanks.

  • Help on ABAP code to trigger an Email with HTML attachment

    Hi folks,
                Could any of you help me out in writing code to attach a HTML document to the internet email address.
          I was able to convert the list output to HTML using FM WWW_LIST_TO_HTML.
          Could some help me out how to attach HTML doc to the Email  using any of the FM SO_DOCUMENT_SEND_API1 or  SO_NEW_DOCUMENT_SEND_API1 or any other.
          I tried some of the examples available in the forum, but I couldnot find one that actually send the list output(in HTML format) as attachment to email
    points will be rewarded for helpful responses...
       Thanks In Advance.
        Suku

    Hi,
    REPORT  zkiran_send_mail_bor                    .
    *& Report  Zkiran_SEND_MAIL_BOR
    *&  Send document with BOR Object as attachment
    DATA: docdata    LIKE sodocchgi1,
          objpack    LIKE sopcklsti1 OCCURS 10 WITH HEADER LINE,
          objhead    LIKE solisti1   OCCURS 10 WITH HEADER LINE,
          objtxt     LIKE solisti1   OCCURS 10 WITH HEADER LINE,
          objbin     LIKE solisti1   OCCURS 10 WITH HEADER LINE,
          objhex     LIKE solix      OCCURS 10 WITH HEADER LINE,
          reclist    LIKE somlreci1  OCCURS  1 WITH HEADER LINE.
    DATA: tab_lines  TYPE i,
          doc_size   TYPE i,
          objdes(100).
    For the BOR attachment
    CONSTANTS:
      c_object_describe LIKE swotobjid-describe VALUE '<OBJECT>'.
    DATA:
      l_object      TYPE swotobjid,
      l_objheader   LIKE soxobj.
    PARAMETERS:
      p_objtyp TYPE swo_objtyp OBLIGATORY,
      p_objkey TYPE swo_typeid OBLIGATORY.
    Create Message Body
      Main Text
    objtxt = 'Test Document.'.
    APPEND objtxt.
    objtxt = 'You will find a BOR object attachment in message.'.
    APPEND objtxt.
    objtxt = 'Have a nice day.'.
    APPEND objtxt.
      Title and Description
    DESCRIBE TABLE objtxt LINES tab_lines.
    READ     TABLE objtxt INDEX tab_lines.
    docdata-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objtxt ).
    docdata-obj_name  = 'BOR Object'.
    Concatenate p_objtyp '-' p_objkey into objdes.
    Concatenate 'BOR Object' objdes 'as Attachment'
           into docdata-obj_descr separated by space.
    condense docdata-obj_descr.
      Write Packing List (Main)
    CLEAR objpack-transf_bin.
    objpack-head_start = 0.
    objpack-head_num   = 0.
    objpack-body_start = 1.
    objpack-body_num   = tab_lines.
    objpack-doc_type   = 'RAW'.
    APPEND objpack.
    Create OBJ attachment
    l_object-describe = c_object_describe.
    l_object-objtype  = p_objtyp.
    l_object-objkey   = p_objkey.
    CALL FUNCTION 'OWN_LOGICAL_SYSTEM_GET'
      IMPORTING
        own_logical_system             = l_object-logsys
      EXCEPTIONS
        own_logical_system_not_defined = 1
        OTHERS                         = 2.
    IF sy-subrc <> 0.
      MESSAGE e398(00) WITH 'No Log Sys Found'.
    ENDIF.
    MOVE-CORRESPONDING l_object TO l_objheader.
    APPEND l_objheader TO objhead.
      Write Packing List (Attachment)
    CLEAR objpack.
    objpack-head_start = 1.
    objpack-head_num   = 1.
    objpack-body_start = 0.
    objpack-body_num   = 0.
    objpack-doc_type   = 'OBJ'.
    objpack-obj_name   = p_objtyp.
    objpack-obj_descr  = Objdes.
    APPEND objpack.
    Create receiver list
    reclist-receiver = sy-uname.
    reclist-rec_type = 'B'.
    APPEND reclist.
    Send Message
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
      EXPORTING
        document_data              = docdata
        put_in_outbox              = 'X'
        commit_work                = 'X'   
      TABLES
        packing_list               = objpack
        object_header              = objhead
        contents_bin               = objbin
        contents_txt               = objtxt
        receivers                  = reclist
      EXCEPTIONS
        too_many_receivers         = 1
        document_not_sent          = 2
        document_type_not_exist    = 3
        operation_no_authorization = 4
        parameter_error            = 5
        x_error                    = 6
        enqueue_error              = 7
        OTHERS                     = 8.
    IF sy-subrc <> 0.
      MESSAGE ID 'SO' TYPE 'S' NUMBER '023'
              WITH docdata-obj_name.
    ENDIF.
    WRITE: / 'End of Program'.
    also <b>check BCS_EXAMPLE*</b>
    <b>Reward points</b>
    Regards

  • Help on ABAP code

    Hi,
    Lets say I have a table with 2 columns. Lets call this table IT_2.
    Column 1 - Value is either a space or *
    Column 2 - Text
    So here is what I need to do, looping into a new table (Call it IT_3).
    Loop at IT_2.
    When Column 1 = *.
    Create a new line with the value of column 2.
    When Column 1 = space
    Add the current column 2 text to the column 2 text of the previous row.
    Please help. This is very important and I am unsure as to how to implement this.
    Thanks,
    John

    Hi, John Damion.
    Try this:
    TYPES: BEGIN OF TYP_IT_2,
             COLUMN1 TYPE C,
             COLUMN2 TYPE C LENGTH 10,
           END OF TYP_IT_2.
    TYPES: BEGIN OF TYP_IT_3,
             COLUMN1 TYPE C,
             COLUMN2 TYPE C LENGTH 100,
           END OF TYP_IT_3.
    DATA: IT_2    TYPE STANDARD TABLE OF TYP_IT_2,
          WA_IT_2 TYPE TYP_IT_2,
          IT_3    TYPE STANDARD TABLE OF TYP_IT_3,
          WA_IT_3 TYPE TYP_IT_3,
          WA_IT   TYPE TYP_IT_3.
    WA_IT_2-COLUMN1 = '*'.
    WA_IT_2-COLUMN2 = 'A'.
    APPEND WA_IT_2 TO IT_2.
    WA_IT_2-COLUMN1 = ' '.
    WA_IT_2-COLUMN2 = 'B'.
    APPEND WA_IT_2 TO IT_2.
    WA_IT_2-COLUMN1 = '*'.
    WA_IT_2-COLUMN2 = 'C'.
    APPEND WA_IT_2 TO IT_2.
    WA_IT_2-COLUMN1 = ' '.
    WA_IT_2-COLUMN2 = 'D'.
    APPEND WA_IT_2 TO IT_2.
    WA_IT_2-COLUMN1 = ' '.
    WA_IT_2-COLUMN2 = 'E'.
    APPEND WA_IT_2 TO IT_2.
    WRITE 'IT_2:'.
    LOOP AT IT_2 INTO WA_IT_2.
      WRITE: / WA_IT_2-COLUMN1,
               WA_IT_2-COLUMN2.
    ENDLOOP.
    READ TABLE IT_2 INTO WA_IT INDEX 1.
    LOOP AT IT_2 INTO WA_IT_2 FROM 2.
      IF WA_IT_2-COLUMN1 = ' '.
        CONCATENATE WA_IT-COLUMN2 WA_IT_2 INTO WA_IT-COLUMN2.
      ELSE.
        APPEND WA_IT TO IT_3.
        WA_IT = WA_IT_2.
      ENDIF.
    ENDLOOP.
    APPEND WA_IT TO IT_3.
    WRITE / 'IT_3:'.
    LOOP AT IT_3 INTO WA_IT.
      WRITE: / WA_IT-COLUMN1,
               WA_IT-COLUMN2.
    ENDLOOP.
    And the result is:
    IT_2:
    * A
      B
    * C
      D
      E
    IT_3:
    * A B
    * C D E
    I hope this can help you.
    Regards,
    feng.

  • Need help for ABAP CODE

    hi,
    i need to reload the master data without FM, i put the comments on fm and relaod the data, now i having a problem, loading process is slow now as compair to before, when i was using with FM.i checked the manage of infoObject, it is show 1123455 records in "transfer" column and 0 record in "added" column, below is the start routine,
    Please help me to fix that problem
    IF NOT DATAPAK[] IS INITIAL.
        LOOP AT DATAPAK INTO S_DATAPAK.
          CLEAR V_INDEX.
          V_INDEX = SY-TABIX.
         IF S_DATAPAK-/BIC/ABRETPRI CO ' 0123456789.'.
           CLEAR: V_AMOUNT, V_PRC.
          V_AMOUNT = S_DATAPAK-/BIC/ABRETPRI.
          CALL FUNCTION 'RSAR_CURRENCY_CONVERT'
          EXPORTING
          I_CURRENCY = S_DATAPAK-CURRENCY
          CHANGING
          C_AMOUNT   = V_AMOUNT.
         V_PRC = V_AMOUNT.
         S_DATAPAK-/BIC/ABRETPRI = V_PRC.
        ENDIF.
    IF S_DATAPAK-/BIC/ABBLNKFLG IS INITIAL.
            S_DATAPAK-/BIC/ABBLNKFLG = 'N'.
          ENDIF.
    TRANSLATE S_DATAPAK-/BIC/ABSZRANGE TO UPPER CASE
    IF S_DATAPAK-CURRENCY IS INITIAL.
          S_DATAPAK-CURRENCY = S_DATAPAK-WHLPRCCURR.
    MODIFY DATAPAK FROM S_DATAPAK INDEX V_INDEX TRANSPORTING
         /BIC/ABRETPRI /BIC/ABWHLPRCE /BIC/ABBLNKFLG
         ENDIF.
    *ENDLOOP.
      ENDIF
    Thanks

    You need not use start routine to achieve this. Instead you can write transfer routines/formulas for those fields in UR.

  • Help with ABAP code in CMOD.

    dear all,
    can you help me solve the below abap coding problem? thanks.
    somewhere at the top
    DATA: L_S_RANGE LIKE LINE OF E_T_RANGE.
    DATA: L_S_VAR_RANGE LIKE E_T_RANGE.
          LOOP AT I_T_VAR_RANGE INTO L_S_VAR_RANGE. <-- error msg stops here.
            FIND l_s_var_range-vnam IN TABLE it_vnam.
            IF sy-subrc = 0.
              l_check = 'X'.
              EXIT.
            ENDIF.
          ENDLOOP.
    Error message...
    "L_S_VAR_RANGE" cannot be converted to the line type of "I_T_VAR_RANGE".
    Thanks all.

    Hi Try this,
    DATA: L_S_RANGE LIKE LINE OF E_T_RANGE.
    DATA: L_S_VAR_RANGE LIKE LINE OF  I_T_VAR_RANGE .
    LOOP AT I_T_VAR_RANGE INTO L_S_VAR_RANGE. <-- error msg stops here.
            FIND l_s_var_range-vnam IN TABLE it_vnam.
            IF sy-subrc = 0.
              l_check = 'X'.
              EXIT.
            ENDIF.
          ENDLOOP.
    Regards,
    Ravi

  • Abap code please

    Hello all,
    can experts of ABAP give me the following routine?
    In the update rules, i have to add a routine to populate subtotal_6 key figure.
    it should pick values as in subtotal_5 field if the distribution channel in the incoming records has  a value "IN". Else, it should have same values as in subtotal_6.
    the existing routine(standard) which i am using is as follows:
    ============
    PROGRAM UPDATE_ROUTINE.
    $$ begin of global - insert your declaration only below this line  -
    TABLES: ...
    DATA: IN    TYPE F,
          OUT   TYPE F,
          DENOM TYPE F,                                         "test
          NUMER TYPE F.
    Def. of 'credit-documents': following doc.categ. are 'credit docs'
      reversal invoice (N)
      credit memo  (O)
      internal credit memo (6)
    Credit-documents are delivered with negative sign. Sign is switched
    to positive to provide positive key-figures in the cube.
    The combination of characteristics DE_CRED and DOC-CLASS provides
    a comfortable way to distinguisch e.g. positive incoming orders or
    order returns.
    Def. der 'Soll-Dokumente': folgende Belegtypen sind 'Soll-Belege'
      Storno Rechnung (N)
      Gutschrift (O)
      Interne Verrechn. Gutschr. (6)
    Soll-Dokumente werden mit negativem Vorzeichen geliefert. Um die Kenn
    zahlen positiv in den Cube zu schreiben, wird das Vorzeich. gedreht
    Die Kombination der Merkmale DEB_CRED und DOC-CLASS gibt Ihnen die
    Möglichkeit schnell z.B. zwischen Auftrags-Eingang oder Retouren zu
    unterscheiden.
    DATA: DEB_CRED(3) TYPE C VALUE 'NO6'.
    constants: c_msgty_e value 'E'.
    $$ end of global - insert your declaration only before this line   -
    FORM compute_data_field
      TABLES   MONITOR STRUCTURE RSMONITOR "user defined monitoring
      USING    COMM_STRUCTURE LIKE /BIC/CS2LIS_13_VDITM
               RECORD_NO LIKE SY-TABIX
               RECORD_ALL LIKE SY-TABIX
               SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS
      CHANGING RESULT LIKE /BI0/V0SD_C03T-SUBTOT_1S
               RETURNCODE LIKE SY-SUBRC
               ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update
    $$ begin of routine - insert your code only below this line        -
    fill the internal table "MONITOR", to make monitor entries
      DATA: VALUE LIKE COMM_STRUCTURE-NETVAL_INV.
      DATA: US_RATE_TYPE LIKE COMM_STRUCTURE-RATE_TYPE.
      CLEAR RESULT.
      IF COMM_STRUCTURE-BILL_RULE CA '45'.
        RETURNCODE = 4.
        EXIT.
      ENDIF.
      IF NOT COMM_STRUCTURE-SUBTOTAL_1 IS INITIAL AND
         COMM_STRUCTURE-DOC_CURRCY NE COMM_STRUCTURE-STAT_CURR.
        US_RATE_TYPE = COMM_STRUCTURE-RATE_TYPE.
        IF US_RATE_TYPE EQ SPACE.
          US_RATE_TYPE = 'M'.
        ENDIF.
      ENDIF.
      IF COMM_STRUCTURE-DOC_CURRCY NE COMM_STRUCTURE-STAT_CURR.
        CALL FUNCTION 'CONVERT_TO_STAT_CURRENCY'
             EXPORTING
                  DATE                 = COMM_STRUCTURE-ST_UP_DTE
                  DOCUMENT_AMOUNT      = COMM_STRUCTURE-SUBTOTAL_1
                  DOCUMENT_CURRENCY    = COMM_STRUCTURE-DOC_CURRCY
                  LOCAL_CURRENCY       = COMM_STRUCTURE-LOC_CURRCY
                  STAT_CURRENCY        = COMM_STRUCTURE-STAT_CURR
                  LOCAL_RATE           = COMM_STRUCTURE-EXRATE_ACC
                  STAT_RATE            = COMM_STRUCTURE-EXCHG_STAT
                  LOCAL_TYPE_OF_RATE   = US_RATE_TYPE
                  STAT_TYPE_OF_RATE    = US_RATE_TYPE
             IMPORTING
                  STATISTICAL_AMOUNT   = VALUE
             EXCEPTIONS
                  LOCAL_RATE_NOT_FOUND = 1
                  STAT_RATE_NOT_FOUND  = 2.
        CASE SY-SUBRC.
          WHEN 0.
            RESULT = VALUE.
            RETURNCODE = 0.
          WHEN 1.
            CLEAR MONITOR.
            MONITOR-msgno = '005'.
            MONITOR-msgid = 'SDBW'.
            MONITOR-msgty = c_msgty_e.
            MONITOR-msgv1 = COMM_STRUCTURE-BILL_NUM.
            MONITOR-msgv2 = COMM_STRUCTURE-ST_UP_DTE.
            MONITOR-msgv3 = COMM_STRUCTURE-DOC_CURRCY.
            MONITOR-msgv4 = COMM_STRUCTURE-LOC_CURRCY.
            append MONITOR.
            RETURNCODE = 4.
          WHEN 2.
            CLEAR MONITOR.
            MONITOR-msgno = '006'.
            MONITOR-msgid = 'SDBW'.
            MONITOR-msgty = c_msgty_e.
            MONITOR-msgv1 = COMM_STRUCTURE-BILL_NUM.
            MONITOR-msgv2 = COMM_STRUCTURE-ST_UP_DTE.
            MONITOR-msgv3 = COMM_STRUCTURE-DOC_CURRCY.
            MONITOR-msgv4 = COMM_STRUCTURE-STAT_CURR.
            append MONITOR.
            RETURNCODE = 4.
        ENDCASE.
      ELSE.
        RESULT = COMM_STRUCTURE-SUBTOTAL_1.
      ENDIF.
      IF COMM_STRUCTURE-DOC_CATEG CA DEB_CRED.
        RESULT = RESULT * ( -1 ).
      ENDIF.
    $$ end of routine - insert your code only before this line         -
    ENDFORM.
    =============

    Hello,
    thanks srini. i added the code specified by you in the update routine. But it goes in a indefinate loop and remains in the yellow state in the monitor.
    till psa the data is loaded fine. though few records(20), it remains in a yellow state.
    what is wrong?
    following is the code:
    ================
    DATA: DEB_CRED(3) TYPE C VALUE 'NO6'.
    constants: c_msgty_e value 'E'.
    $$ end of global - insert your declaration only before this line   -
    FORM compute_data_field
      TABLES   MONITOR STRUCTURE RSMONITOR "user defined monitoring
      USING    COMM_STRUCTURE LIKE /BIC/CS2LIS_13_VDITM
               RECORD_NO LIKE SY-TABIX
               RECORD_ALL LIKE SY-TABIX
               SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS
      CHANGING RESULT LIKE /BI0/V0SD_C03T-SUBTOT_6S
               RETURNCODE LIKE SY-SUBRC
               ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update
    $$ begin of routine - insert your code only below this line        -
    fill the internal table "MONITOR", to make monitor entries
      DATA: VALUE LIKE COMM_STRUCTURE-SUBTOTAL_6.
      DATA: US_RATE_TYPE LIKE COMM_STRUCTURE-RATE_TYPE.
      CLEAR RESULT.
      IF COMM_STRUCTURE-BILL_RULE CA '45'.
        RETURNCODE = 4.
        EXIT.
      ENDIF.
      IF NOT COMM_STRUCTURE-SUBTOTAL_6 IS INITIAL AND
         COMM_STRUCTURE-DOC_CURRCY NE COMM_STRUCTURE-STAT_CURR.
        US_RATE_TYPE = COMM_STRUCTURE-RATE_TYPE.
        IF US_RATE_TYPE EQ SPACE.
          US_RATE_TYPE = 'M'.
        ENDIF.
      ENDIF.
      IF COMM_STRUCTURE-DOC_CURRCY NE COMM_STRUCTURE-STAT_CURR.
        CALL FUNCTION 'CONVERT_TO_STAT_CURRENCY'
             EXPORTING
                  DATE                 = COMM_STRUCTURE-ST_UP_DTE
                  DOCUMENT_AMOUNT      = COMM_STRUCTURE-SUBTOTAL_6
                  DOCUMENT_CURRENCY    = COMM_STRUCTURE-DOC_CURRCY
                  LOCAL_CURRENCY       = COMM_STRUCTURE-LOC_CURRCY
                  STAT_CURRENCY        = COMM_STRUCTURE-STAT_CURR
                  LOCAL_RATE           = COMM_STRUCTURE-EXRATE_ACC
                  STAT_RATE            = COMM_STRUCTURE-EXCHG_STAT
                  LOCAL_TYPE_OF_RATE   = US_RATE_TYPE
                  STAT_TYPE_OF_RATE    = US_RATE_TYPE
             IMPORTING
                  STATISTICAL_AMOUNT   = VALUE
             EXCEPTIONS
                  LOCAL_RATE_NOT_FOUND = 1
                  STAT_RATE_NOT_FOUND  = 2.
        CASE SY-SUBRC.
          WHEN 0.
            RESULT = VALUE.
            RETURNCODE = 0.
          WHEN 1.
            CLEAR MONITOR.
            MONITOR-msgno = '005'.
            MONITOR-msgid = 'SDBW'.
            MONITOR-msgty = c_msgty_e.
            MONITOR-msgv1 = COMM_STRUCTURE-BILL_NUM.
            MONITOR-msgv2 = COMM_STRUCTURE-ST_UP_DTE.
            MONITOR-msgv3 = COMM_STRUCTURE-DOC_CURRCY.
            MONITOR-msgv4 = COMM_STRUCTURE-LOC_CURRCY.
            append MONITOR.
            RETURNCODE = 4.
          WHEN 2.
            CLEAR MONITOR.
            MONITOR-msgno = '006'.
            MONITOR-msgid = 'SDBW'.
            MONITOR-msgty = c_msgty_e.
            MONITOR-msgv1 = COMM_STRUCTURE-BILL_NUM.
            MONITOR-msgv2 = COMM_STRUCTURE-ST_UP_DTE.
            MONITOR-msgv3 = COMM_STRUCTURE-DOC_CURRCY.
            MONITOR-msgv4 = COMM_STRUCTURE-STAT_CURR.
            append MONITOR.
            RETURNCODE = 4.
        ENDCASE.
      ELSE.
        RESULT = COMM_STRUCTURE-SUBTOTAL_6.
      ENDIF.
    CODE ADDED BY ME.......
      IF COMM_STRUCTURE-DISTR_CHAN = 'IN'.
        RESULT = COMM_STRUCTURE-SUBTOTAL_5.
      ELSE.
        RESULT = COMM_STRUCTURE-SUBTOTAL_6.
      ENDIF.
      IF COMM_STRUCTURE-DOC_CATEG CA DEB_CRED.
        RESULT = RESULT * ( -1 ).
      ENDIF.
    $$ end of routine - insert your code only before this line         -
    ENDFORM.

  • Call SE11 Search Help through ABAP code.

    Hello,
    I have a requirement in which I need to call various search helps created through SE11 in a Function Module. I want the Search help to return the Values which I would use in my Function Module.
    Please suggest if there's a standard FM/ Statement to process SE11 Search helps.
    Thanks,
    Shalabh

    TYPE-POOLS: shlp.
    DATA: l_shlp     TYPE shlp_descr_t,
          l_wa       TYPE ddshiface,
          l_bukrs    TYPE char50,
          l_repid    TYPE syrepid,
          L_DYNNR    TYPE SYDYNNR,
          l_ret_val  LIKE ddshretval OCCURS 0 WITH HEADER LINE,
          l_t_fields TYPE dynpread   OCCURS 0 WITH HEADER LINE.
    PARAMETERS: p_bukrs TYPE pa0001-bukrs,
                p_werks TYPE pa0001-werks,
                p_btrtl TYPE pa0001-btrtl.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_werks.
      FIELD-SYMBOLS <fs> TYPE ddshiface.
      l_repid = sy-repid.
      L_DYNNR = SY-DYNNR.
      CALL FUNCTION 'F4IF_GET_SHLP_DESCR'
        EXPORTING
          shlpname       = 'H_T500P'
    *     SHLPTYPE       = 'SH'
        IMPORTING
          shlp           = l_shlp
      LOOP AT l_shlp-interface INTO l_wa.
        IF l_wa-shlpfield  EQ 'BUKRS'.
          l_wa-valtabname = 'PA0001'.
          l_wa-valfield   = 'BUKRS'.
        ELSEIF l_wa-shlpfield EQ 'PERSA'.
          l_wa-valtabname = 'PA0001'.
          l_wa-valfield   = 'WERKS'.
        ENDIF.
        MODIFY l_shlp-interface FROM l_wa.
      ENDLOOP.
    * Process standard searchhelp
      CALL FUNCTION 'F4IF_START_VALUE_REQUEST'
        EXPORTING
          shlp          = l_shlp
        TABLES
          return_values = l_ret_val.

  • Help with error code, please.

    I have compiled a small AS3 script of a bouncing basketball with sound - the volume of the sound  decreasing as the bounces get smaller.
    I have obviously not done something correctly in the way I have installed the sound because I get this error message " 1180: Call to possibly undefined method bounce2 "( bounce2 is the mp3 file). Without the sound the ball bounces perfectly - it is the sound that has killed it. I am a newbie  and am trying to learn AS3 the hard way - by experience  but am stumped here - can some one help, please?   Below is my script.
    // create a ball sprite
    import flash.media.Sound;
    var initialrotationSpeed=12;
    var rotationSpeed : Number;
    var initialxVel : Number=8;
    var stage_width : Number=750;
    ball_mc.x=80;
    ball_mc.y=360;
    //setup position and velocity variables
    var xPos : Number=ball_mc.x;
    var yPos : Number=ball_mc.y;
    var xVel : Number;
    var yVel : Number=0.5;
    var grav ; Number=1;
    var vol : Number=1;
    var snd : Sound=new bounce2();
    snd.play();
    addEventListener(Event.ENTER_FRAME,onLoop,false,0,true);
    function onLoop(evt:Event) : void {
    if(ball_mc.x/stage_width));
    xVel=initialxVel*(1-(ball_mc.x/stage_width));
    yVel+=grav;
    xPos+=xVel;
    yPos+=yVel;
    if(Math.abs(yPos-560)<1&&Math.abs(yVel)<1)
    remove EventListener(Event.ENTER_FRAME,onLoop);
    else if(yPos>560){
    yPos=560;
    yVel*= -.8;
    xVel*= .8;
    vol- =0.1;
    snd.play(0,0,newSoundTransform(vol));
    ball_mc.x=xPos;
    ball_mc.y=yPos;
    if(ball_mc.xstage.stageWidth-ball_mc.width/4||ball_mc.x<0+ball_mc.width/4){
    xVel*= -1;
    addEventListener(Event.ENTER_FRAME,Rotation);
    function Rotation(event:Event):void {
    if(ball_mc.x/stage_width<1)
    ball_mc.rotation+=initialrotationSpeed*(1-ball_mc.x/stage_width);
    if(ball_mc.x<700)
    xVel=initialxVel*(1-(ball_mc.x/stage_width));
    ball_mc.x+=xVel;
    else
    removeEventListener(Event.ENTER_FRAME,Rotation);

    Thank you - that was it - "class" - or lack of .
    I am most appreciative of your assistance
    regards

  • Help in abap code logic

    hallow
    i have two tables that i wont to move the data(price) to third table itab
    i wont to now how i can do that?
    <b>i reward kindly</b>
    i give the tabls.
    INTAB_A132[]
    resrc             date             knumh
    0000123456 20070101 0000014834
    0000123456 20070601 0000014835
    2) intab_konp
    knumh (key)     kbetr(price)    
    0000014834   200000.00
    0000014834   250000.00
    this is what i have in table zempkostlprice_rec and i wont to add price colman
    zempkostlprice_rec
    rserc                date
    1 0000123456 012007
    2 0000123456 022007
    3 0000123456 032007
    4 0000123456 042007
    5 0000123456 052007
    6 0000123456 062007
    7 0000123456 072007
    8 0000123456 082007
    9 0000123456 092007
    10 0000123456 102007
    11 0000123456 112007
    12 0000123456 122007
    13 0000123456 012008
    this is what i wont to add price colman to thired table from intab_konp
    u can see that price have to be change after 01062007 to 250000
    resrc                   date             price
    <b>1 0000123456  012007             20000.00</b>
    2 0000123456      01022007         20000.00
    3 0000123456     01032007        20000.00
    4 0000123456     01042007         20000.00
    5 0000123456     01052007          20000.00
    <b>6 0000123456  01062007         250000.00</b>
    7 0000123456     01072007          250000.00
    8 0000123456     01082007          250000.00
    9 0000123456     01092007         250000.00
    10 0000123456   01102007          250000.00
    11 0000123456    01112007         250000.00
    12 0000123456   01122007          250000.00
    13 0000123456   01 012008        250000.00
    hi itry with that code  but its not working i get in colman 2000000 in all rows
    i thihk i have to take care in dates but i dont now how?
    regards
    LOOP AT zempkostlprice_rec INTO wa_zem.
    READ TABLE intab_a132 INTO wa_intab_a132 WITH KEY resrc = wa_zem-resrc.
    READ TABLE intab_konp INTO wa_intab_konp WITH KEY knumh = wa_intab_a132-knumh.
    IF sy-subrc = 0.
    wa_zem-kbetr = wa_intab_konp-kbetr.
    MODIFY zempkostlprice_rec FROM wa_zem TRANSPORTING kbetr.
    ENDIF.
    ENDLOOP.

    Create a new zprogram and put this code and check the values of internal tables in debugging mode
    the price value chages according to knumh value becoz u have given intab_konp table which has common knumh so using this field only we can modify in ur zemp* table.
    REPORT  ZSHYTAL.
    TYPES: BEGIN OF t_a132,
    resrc LIKE a132-resrc,
    kostl LIKE a132-kostl,
    datbi LIKE a132-datbi,
    datab LIKE a132-datab,
    knumh LIKE a132-knumh,
    END OF t_a132.
    TYPES: BEGIN OF t_konp,
    knumh LIKE konp-knumh,
    kstbm LIKE konp-kstbm,
    kbetr LIKE konp-kbetr,
    konwa TYPE konp-konwa,
    END OF t_konp.
    types: begin of t_zemp,
            RESRC like a132-resrc,
            KOSTL LIKE a132-kostl,
            kstbm LIKE konp-kstbm,
            konwa TYPE konp-konwa,
            kbetr LIKE konp-kbetr,
            knumh LIKE konp-knumh,
          END OF t_zemp.
    DATA: intab_konp TYPE TABLE OF t_konp WITH HEADER LINE .
    DATA : intab_a132 TYPE TABLE OF t_a132 WITH HEADER LINE .
    data: it_zemp type TABLE OF t_zemp WITH HEADER LINE.
    it_zemp-resrc = '0000123456'.
    it_zemp-knumh = '0000014834'.
    APPEND it_zemp.
    it_zemp-resrc = '0000123456'.
    it_zemp-knumh = '0000014834'.
    APPEND it_zemp.
    it_zemp-resrc = '0000123456'.
    it_zemp-knumh = '0000014835'.
    APPEND it_zemp.
    intab_a132-resrc = '0000123456'.
    intab_a132-knumh = '0000014834'.
    intab_a132-datbi = '20070531'.
    intab_a132-datab = '20070101'.
    APPEND intab_a132.
    intab_a132-resrc = '0000123456'.
    intab_a132-knumh = '0000014835'.
    intab_a132-datbi = '200701231'.
    intab_a132-datab = '20070601'.
    APPEND intab_a132.
    intab_konp-knumh = '0000014834'.
    intab_konp-kbetr = '20000'.
    APPEND intab_konp.
    intab_konp-knumh = '0000014835'.
    intab_konp-kbetr = '25000'.
    APPEND intab_konp.
    clear: intab_konp, intab_a132, it_zemp.
    LOOP at it_zemp. "into wa_zemp.
      READ TABLE intab_a132 WITH KEY resrc = it_zemp-resrc.
      READ TABLE intab_konp WITH key knumh = it_zemp-knumh.
      if sy-subrc eq 0.
        move intab_konp-kbetr to it_zemp-kbetr.
        modify it_zemp." from wa_zemp.
      ENDIF.
    endloop.

Maybe you are looking for

  • Error while loading material master data

    I am loading delta data for material master and its giving me the following error: "Programs not generated for InfoSource 0MATERIAL_ATTR and source system". How to resolve this error? Need ur help urgently. Thanks

  • Single Line Report issues

    Hi, folks. I have a table of employees and a table of certifications. An employee may have 0-15 certifications (and dates completed). I'm trying to generate a single line report like this: NAME - CPR DATE - FIRST AID DATE - Etc I've made an evaluatio

  • IDOCs to send Employee Data

    Hi All, In my current project, I have lots of interfaces to send employee data to third party. Now the interface team has decided to use IDOCs to transfer employee data. Employee data is of the order of 20,000 and many interface will be scheduled to

  • Parametrizaciones de seguridad en Excel

    Hola a todos Tengo un porblema al tratar de ejecutar reportes de XL Reporter, el mensaje que aparece es : "Parametrizaciones de seguridad en Excel  prohiben ejecutar XL Reporter" Esto sucedio cuando se actualizo la version de Office a 2007, ya he rev

  • Showing a stage on a different display that is connected to the system

    I want to implement something in my javafx destop application which I am not sure how to achieve. I am neither sure whether it can be achieved or not. So thought some expert guidance will come in handy. Bascially, I have an application built in javaf