Skip to Content
0
Former Member
Jan 25, 2009 at 11:30 AM

BI 7 ABAP Routine Help

19 Views

Hi ABAPers,

I need a small favour to convert a BI 3.x routine to BI 7 .

I am having trouble to covert this one

* If all relevant key figures (cpstlc, cpquaaou etc.) are initial,
* data set is not relevant and will be deleted.
  LOOP AT DATA_PACKAGE.
    IF (     DATA_PACKAGE-CPPVLC  EQ 0
         AND DATA_PACKAGE-CPPVOC  EQ 0
         AND DATA_PACKAGE-CPSTLC  EQ 0
         AND DATA_PACKAGE-CPQUAOU EQ 0
         AND DATA_PACKAGE-CPSVLC  EQ 0 ).
      DELETE DATA_PACKAGE.
      CONTINUE.
    ENDIF.

*  no_scl is initial ( e.g. for good receipts, billing)
*  value has to be set depending on storno
    IF DATA_PACKAGE-NO_SCL IS INITIAL.
      IF DATA_PACKAGE-STORNO = 'X'.
        DATA_PACKAGE-NO_SCL = -1.
      ELSE.
        DATA_PACKAGE-NO_SCL = 1.
      ENDIF.
      MODIFY DATA_PACKAGE.
    ENDIF.
  ENDLOOP.


data: lw_DATA_PACKAGE TYPE DATA_PACKAGE_STRUCTURE.
* Change date(s) if the are greater then 31.12.2009
Loop at DATA_PACKAGE into lw_DATA_PACKAGE.

 if  lw_DATA_PACKAGE-SCL_DELDAT > '20091231'.
   lw_DATA_PACKAGE-SCL_DELDAT = '20091231'.
   endif.

  if  lw_DATA_PACKAGE-/BIC/ZEXWDATE > '20091231'.
   lw_DATA_PACKAGE-/BIC/ZEXWDATE = '20091231'.
   endif.

   if  lw_DATA_PACKAGE-STAT_DATE > '20091231'.
   lw_DATA_PACKAGE-STAT_DATE = '20091231'.
   endif.

   MODIFY DATA_PACKAGE FROM lw_DATA_PACKAGE TRANSPORTING SCL_DELDAT
   STAT_DATE /BIC/ZEXWDATE.


endloop.

I tried to replace DATA_PACKAGE with SOURCE_PACKAGE but it did not work.

any help is much appreciated.

Thanks

POPS