Application Development 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: 

BI 7 ABAP Routine Help

Former Member
0 Kudos

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

2 REPLIES 2

Former Member
0 Kudos

Hello,

Source_package in the start routine does not have a header line. In fact, since the routines in BI 7 are ABAP Objects-based, you cannot use internal tables with header lines at all. You need to use explicit work areas as you do in the loop at the end of your code. There might be other errors as well, what error messages do you get?

Best regards,

Erik

Former Member
0 Kudos

I solved it myself.