ABAP porgram in update rule-Job stats

Hi All,
I have an ABAP program that is in one of the update rules from source ODS to destination ODS. Source ODS has 20million records. When we are loading the records to destination ODS , Is there any way I can find howmuch time will take to process 1 record and  also when it is running how do I know howmany records it has processed or  howmany  yet to process ? I have tried with SM50 but not able to find much useful information?
Please help me and if you have any documents please send it to [email protected]
Regards
Vennela

hi Shravani,
try using this code.. ths is done as a report, you will have to change the fields.
**get the first 4 chars of the date. date is stored as YYYYMMDD format internally. check with the system year. sy-datum has the system date
if comm_structure-stat_date+0(4) = sy-datum+0(4).
**get the month i.e the 5 and 6th characters from the date and compare them
if comm_structure-stat_date+4(2) > sy-datum+4(2).
  result = 0.
**ELSE. .... you havent mentioned what u want to do if the month is lesser or equal to the system month
endif.
else.
**Get the first 6 chars of the statistical date.. i.e the year and month.
  result = comm_structure-stat_date+0(6).
endif.
Regards
Sujai

Similar Messages

  • ABAP code in update rules to convert the date

    Hi,
    Could any one send me the ABAP code that is written in the update rules to convert the date (DD/MM/YYYY  -- lenght 10) to YYYYMMDD ---  length 8  format.
    Also please let me know where I should write this code; while creating update rules or while creating infosource.
    Thanks,

    Hi Bharath,
    Hi Bharath,
    I suggest you do the conversion of dates in the transfer rules. Here is the correct code you need:
    * Assuming the source data field is called MYDATE
    * Place the ff. in the routine in the transfer rules:
    concatenate tran_structure-mydate+6(4) tran_structure-mydate+3(2) tran_structure-mydate(2) into result.
    replace MYDATE with the name of the source field (10 chars) in the transfer structure. Hope this helps.

  • URGENT !!! - ABAP code in update rule

    Friends,
    With my limited knowledge in ABAP, I need some help from the forum.
    I need to create a routine in update rule to capture 'date of last GR against a PO delivery schedule'. Let's say
    PO # 1234
    IT # 10
    SCL # 1
    There are multiple partial deliveries against SCL # 1 above and I have to capture the last delivery date and subsequently the last invoice date. If I try to set the rule to capture the 'posting date' based of 'transfer type'  - the GR date field gets overwritten by the last invoice date (the date of last activity). My requirement is to separate the two i.e.
    1) Date of last GR against PO - Item - SCL line
    2) Date of lasr INV against PO - Item - SCL line
    Can any one help me with the code ???
    Thanks,
    AK

    Hi,
    check the following link, gives an example of an update routine.
    http://help.sap.com/saphelp_nw70/helpdata/en/80/1a64fae07211d2acb80000e829fbfe/frameset.htm

  • ABAP Help on Update Rule Needed

    Hello.  I am trying to write a routine on an key figure in an update rule.  Basically, I am trying to load a custom key figure with either a 1 or a 0. 
    Here is the pseudocode:
    IF
    (((GI_DATE - ACT_GI_DTE) < 0) OR
      ((GI_DATE - ACT_GI_DTE) > 3)
    THEN
        NEW_KEY_FIGURE = 1
    ELSE
        NEW_KEY_FIGURE = 0
    ENDIF.
    Here is the code I currently have in the routine.  Any ideas on where I am going wrong here?  I am not an ABAP developer so please keep this in mind when responding.
    result value of the routine
      CLEAR RESULT.
    if the returncode is not equal zero, the result will not be updated
      IF COMM_STRUCTURE-GI_DATE - COMM_STRUCTURE-ACT_GI_DTE < 0 OR
         COMM_STRUCTURE-GI_DATE - COMM_STRUCTURE-ACT_GI_DTE > 3.
         COMM_STRUCTURE-NEW_KEY_FIGURE = 1.
      ELSE.
         COMM_STRUCTURE-NEW_KEY_FIGURE = 0.
      ENDIF.
      RESULT = COMM_STRUCTURE-NEW_KEY_FIGURE.
      RETURNCODE = 0.
    if abort is not equal zero, the update process will be canceled
      ABORT = 0.
    Thanks for any help you can give.

    Hi,
    I think you can not put "-" in if command, so code should be like this:
    data: datediff type n.
    result value of the routine
    CLEAR RESULT.
    clear datediff.
    detediff = COMM_STRUCTURE-GI_DATE - COMM_STRUCTURE-ACT_GI_DTE.
    IF datediff < 0 OR datediff > 3.
    Result = 1.
    ELSE.
    Result = 0.
    ENDIF.
    RETURNCODE = 0.
    if abort is not equal zero, the update process will be canceled
    ABORT = 0.
    Regards,
    Andrzej

  • Advice on abap routine in update rule

    Hello Experts,
    I have written a routine in update for replacing some 'not allowed characters' with space.
    The abap code is correctly working as a standalone program as is giving the correct results.However,
    when i write the same code in update routine, no change takes place in data, i.e. 'not allowed characters ' are still there in my data.
    Please advice if there is any special change that is to be made while writing the code in update routine.
    if STRLEN( CHECK_TEXT ) <> 0.
        ALLOWED_SPECIAL_CHARACTERS = ' &()*+,-.:;<>=?!@$%~'.
        ALLOWED_CHARACTERS = 'ABCDEFGHIJKLNMOPQRSTUVWXYZ_0123456789'.
          TRANSLATE CHECK_TEXT TO UPPER CASE.
        strl = strlen( CHECK_TEXT ).
        IF CHECK_TEXT CN ALLOWED_CHARACTERS.
           WHILE len1 LE strl.
            IF CHECK_TEXT+len1(1) CN ALLOWED_CHARACTERS.
            CHECK_TEXT+len1(1) = '.'.
             ENDIF.
           add 1 to len1.
          ENDWHILE.
        ENDIF.
    Regards
    Priyanka

    Thanx a lot for a quick reply .
    The main problem that we are facing is this simple code is working fine if it is executed as a report program but if no changes takes place when i move this same code to my update routine.
    (1) According to you i should write this routine in the start routine instead of update rotuine ??
    (2) how would function module help in my case...kindly elaborate a it.
    Here is the complete update rotuine.
    data:
    len1 TYPE i value 0
    R_TEXT(60),
    CHECK_TEXT(60),
    R_TEXT = COMM_STRUCTURE-/BIC/ZC_NTXT1.
    if STRLEN( R_TEXT ) <> 0.
      ALLOWED_SPECIAL_CHARACTERS = ' &()*+,-.:;<>=?!@$%~'.
      CONCATENATE 'ABCDEFGHIJKLNMOPQRSTUVWXYZ_0123456789/'
                  ALLOWED_SPECIAL_CHARACTERS
                  INTO ALLOWED_CHARACTERS.
      CHECK_TEXT = R_TEXT.
      TRANSLATE CHECK_TEXT TO UPPER CASE.
      strl = strlen( R_TEXT ).
    IF CHECK_TEXT CN ALLOWED_CHARACTERS.
          WHILE len1 LE strl.
          subs2 = CHECK_TEXT+len1(1).
            IF subs2 CN ALLOWED_CHARACTERS.
            CHECK_TEXT+len1(1) = '.'.
             ENDIF.
            ENDWHILE.
    endif.
        ENDIF.
    RESULT = CHECK_TEXT.

  • Defining ABAP variables in update rules

    Hello,
    How can I define a variable in ABAP of the same type as an InfoObject? I know it's easy as long as the InfoObject is a part of the communication structure. But this InfoObject is not present neither in the source ODS nor in the target cube. It is a custom InfoObject, not BC.
    Regards,
    Christoffer Owe

    Hello,
    I have not succeeded with that. Trying
    DATA: TmpYearWeek LIKE /BIC/ZWKCLSDT.
    where ZWKCLSDT is my InfoObject, results in
    "E:Field "/BIC/ZWKCLSDT" is unknown. It is neither in one of the specified tables nor defined by a "DATA" statement."
    Regards,
    Christoffer

  • How to write ABAP Routeines in Update/Transfer Rules ?

    Hi Experts,
    Iam new to BW and i don't have ABAP knowledge.Can any body help me ..to write ABAP Routeines in Update rules/Transfer rules.Give me some basic knowledge with proper example.and what type of routeines we need to write ?
    I will appreciate if some one helps me with proper Documentation.My mail id is [email protected]
    Points will be rewarded.
    Thanks in advance,
    Nayanasri.

    Hi Nayanasri,
    It is not mendatory that u need to write Update routines for all update rules. It depends on the requirement. Without update routine u can always manage. My last implementation was for a small chemical firm where i did not use any of the update routine. Suppose if u want to change the records in datapackage depending on certain conditions, then u can go for this. I'm just pasting one of my update routine program
    PROGRAM UPDATE_ROUTINE.
    $$ begin of global - insert your declaration only below this line  -
    TABLES: ...
    DATA:   ...
    $$ end of global - insert your declaration only before this line   -
    The follow definition is new in the BW3.x
    TYPES:
      BEGIN OF DATA_PACKAGE_STRUCTURE.
         INCLUDE STRUCTURE /BIC/CS8YGTGDCL6B.
    TYPES:
         RECNO   LIKE sy-tabix,
      END OF DATA_PACKAGE_STRUCTURE.
    DATA:
      DATA_PACKAGE TYPE STANDARD TABLE OF DATA_PACKAGE_STRUCTURE
           WITH HEADER LINE
           WITH NON-UNIQUE DEFAULT KEY INITIAL SIZE 0.
    FORM startup
      TABLES   MONITOR STRUCTURE RSMONITOR "user defined monitoring
               MONITOR_RECNO STRUCTURE RSMONITORS " monitoring with record n
               DATA_PACKAGE STRUCTURE DATA_PACKAGE
      USING    RECORD_ALL LIKE SY-TABIX
               SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS
      CHANGING ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update
    $$ begin of routine - insert your code only below this line        -
    fill the internal tables "MONITOR" and/or "MONITOR_RECNO",
    to make monitor entries
    DELETE DATA_PACKAGE WHERE /bic/yverbr NE  'V2'.
    DELETE DATA_PACKAGE WHERE /bic/ydpbasfs = 0 AND /bic/yoplqty = 0.
    ENDFORM.
    Where the delete statement deletes the records when the field /bic/yverbr noe equals to 'V2' or deletes it when /bic/ydpbasfs equals zero.
    If the explanation is not suffecient, pls post further
    Regards
    Sriram

  • Querying Cubes on Update Rules?

    I have an update rule that currently queries an ODS to get the value of a key figure and then apply that key figure to the cube the update rule is intended for.
    Basically, this is the select statement I use in the routine:
    select defect_quantity from table_a
      where notification = notification
        and notif_item = notif_item.
    Since the ODS is a flat table, this works fine.  However, I am having trouble figuring out how to write this same query against a cube. 
    Is there a way to query a cube with ABAP in an update rule?  Any info or link to how to do this would be appreciated.
    Thanks,
    Brent

    Hi,
    There is simple example:
    **> You must fill G_T_RANGE table with selection conditions for
    **> InfoCube data. In this case char 0VERSION = '1' and
    **> 0CALYEAR = '2005'. 
      CLEAR G_S_RANGE.
      G_S_RANGE-CHANM    = '0VERSION'.
      G_S_RANGE-SIGN     = 'I'.
      G_S_RANGE-COMPOP   = 'EQ'.
      G_S_RANGE-LOW      = '1'.
      APPEND G_S_RANGE TO G_T_RANGE.
      G_S_RANGE-CHANM    = '0CALYEAR'.
      G_S_RANGE-SIGN     = 'I'.
      G_S_RANGE-COMPOP   = 'EQ'.
      G_S_RANGE-LOW      = '2005'.
      APPEND G_S_RANGE TO G_T_RANGE.
    **> You should also provide information for which combination
    **> of characteristic you need value
      CLEAR G_S_SFC.
      G_S_SFC-CHANM    = '0VERSION'.
      G_S_SFC-CHAALIAS = '0VERSION'.
      G_S_SFC-ORDERBY  = 0.
      INSERT G_S_SFC INTO TABLE G_TH_SFC.
      G_S_SFC-CHANM    = '0PROFIT_CTR'.
      G_S_SFC-CHAALIAS = '0PROFIT_CTR'.
      G_S_SFC-ORDERBY  = 0.
      INSERT G_S_SFC INTO TABLE G_TH_SFC.
      G_S_SFC-CHANM    = '0CALYEAR'.
      G_S_SFC-CHAALIAS = '0CALYEAR'.
      G_S_SFC-ORDERBY  = 0.
      INSERT G_S_SFC INTO TABLE G_TH_SFC.
    **> And finaly which keyfigure should be aggregated
      CLEAR G_S_SFK.
      G_S_SFK-KYFNM    = '0AMOUNT'.
      G_S_SFK-KYFALIAS = '0AMOUNT'.
      G_S_SFK-AGGR     = 'SUM'.
      INSERT G_S_SFK INTO TABLE G_TH_SFK.
    **> I_INFOPROV - InfoProvider name. In this case InfoCube name
    **> I_TH_SFC - table with selected chars
    **> I_TH_SFK - table with selected keyfs
    **> I_T_RANGE - table selection conditions
    **> I_PACKAGESIZE - number of records in one function call
    **> You should call this function as many times as parameter
    **> E_END_OF_DATA will receive 'X' which means that last data
    **> packet has been read
    **> G_T_DATA - table with aggregated data from InfoCube
      CALL FUNCTION 'RSDRI_INFOPROV_READ'
        EXPORTING
          I_INFOPROV                   = 'ZINFOCUBE'
          I_TH_SFC                     = G_TH_SFC
          I_TH_SFK                     = G_TH_SFK
          I_T_RANGE                    = G_T_RANGE
          I_PACKAGESIZE                = 10000
          I_ROLLUP_ONLY                = ''
        IMPORTING
          E_T_DATA                     = G_T_DATA
          E_END_OF_DATA                = END_OF_DATA
        CHANGING
          C_FIRST_CALL                 = G_FIRST_CALL
        EXCEPTIONS
          OTHERS                       = 1.
    Krzys

  • Update Rule Routine: Compare system date

    Can anyone help me with regards to writing some ABAP code in update rule?
    I would like to check if the value of a date characteristics is equal to system date in data source. If its value is equal to system date, assign '0' value to another numeric characteristics. Otherwise, it will get the difference between system date and the date characteristics. I have rewritten the routine as follows. But there is no effects on the result. Am I correct?
    if COMM_STRUCTURE-<date characteristics> = SYST-DATUM.
      RESULT = '0'.
    else.
      RESULT = COMM_STRUCTURE-<numeric characteristics>.
    endif.
    Many thanks in advance.

    I have rewritten the code as follows. ZLASTPURD is a numeric characteristics. The code is written in the routine of ZLASTPURD in update rule. But it takes no effect. The case "COMM_STRUCTURE-/BIC/ZLASTPURD ='0'" means another date characteristics is equal to system date, the value of ZLASTPURD is blank after modifying the code. However, the code is workable for  "RESULT = COMM_STRUCTURE-/BIC/ZLASTPURD.". Is there anything wrong?
    data lastpurdays type I.
    lastpurdays = '1'.
    if COMM_STRUCTURE-/BIC/ZLASTPURD = '0'.
      RESULT = lastpurdays.
    else.
      RESULT = COMM_STRUCTURE-/BIC/ZLASTPURD.
    endif.
    Many thanks in advance.

  • To refer logical source in update rules

    Hi,
    I wanted to find the logical source system using abap into my update rule, is it possible.
    Help would be appreciated.
    Thanks,
    SD

    Hi,
    you have only to write something like this:
    case sy-sysid.
    * development system
        when 'dev1'.
            result = 'r3_dev'.
    * test system
        when 'test1'
            result = 'r3_test'.
    endcase.
    dev1 and test 1 are your bi systems. When data comming from one source system you can use this code in each transformation.
    Regards
    Andreas

  • Message RSAU466 when update rules activation

    Hi everybody,
    I did some corrections in an ABAP routine in update rules. When I try to activate them this message appears :
    Message no. RSAU466
    Diagnosis
    When generating the update program for data target XXXXX, InfoSource YYYYY, a syntax error occured in row 1.980.
    System response
    The update rules cannot be activated.
    Procedure
    If the error message Incorrect logical expression. is cut off, do the following to get the complete error message:
    Go into the update rule maintenance, choose Extras -> Display Activated Program and carry out a syntax check there. You can then find out what the error was.
    I've tried to display the acitvated program but this message occurs : Unable to find a tool to process the request
    I don't want to delete and recreate my update rules because thes are very complicated and it's very risky.
    Any idea ?
    Edited by: maredami on Jun 11, 2010 1:55 PM

    Thanks for your help !
    RSAU_UPDR_REACTIVATE_ALL doesnt work (No message exists).
    I've already seen these notes but we don't want to import support packages...
    I've found the generated program of the update rules (GPxxxxxxxxxxxx) and at the line 1980 that is wrote :  S_COB_PRO_PLANT TYPE RSD_S_COB_PRO.
    I have no idea what to do now...

  • ABAP assistance - start routine logic in update rule

    I have used an existing update rule and have based my logic around the same.  The purpose of the rule is to look up customer master data and get a subset of customer numbers from the transaction records so that the values for customer number from the transactional data will not be updated if it does not match with existing master data customer numbers.
    The loads are full and we drop the data before we load.
    I have listed the logic below (the number at the front is to be considered as the line number) and a list of open questions that I have thereafter:
    Start routine logic:
    1  DATA: l_index LIKE sy-tabix.
    2  DATA: BEGIN OF ls_customer,
    3        customer TYPE /BI0/OICUSTOMER,
    4        objver TYPE RSOBJVERS,
    5     END OF ls_customer,
    6      lt_customer LIKE TABLE OF ls_customer.
    7  REFRESH: lt_customer.
    8  LOOP AT DATA_PACKAGE.
    all customers from data package
    9    ls_customer-custno = DATA_PACKAGE-custid.
    10  ls_customer-objver = 'A'
    11    APPEND ls_customer TO lt_customer.
    12   ENDLOOP.
    12  SORT lt_customer.
    13  DELETE ADJACENT DUPLICATES FROM lt_customer.
    14   IF NOT lt_customer[] IS INITIAL.
    15    SELECT /BI0/OICUSTOMER RSOBJVERS
    16      FROM /BI0/PCUSTOMER
    17      INTO CORRESPONDING FIELDS OF TABLE lt_customer
    18      FOR ALL ENTRIES IN lt_customer
    19      WHERE ls_customer-custno = DATA_PACKAGE-custid
    20      AND ls_customer-objver = 'A'
    21    SORT lt_customer BY customer ASCENDING                    
    22  ENDIF.
    Questions
    Line
    1 - what is the purpose of this line? What is it that is being declared
    2 - in some code I have seen this line with OCCURS 0 at the end what does this mean with and without the term?
    4 - I am using the Data Element name is this correct or should I use the field name?
    3 - 5 here I declare an internal structure/table is that correct?
    6 - here I declare a work area based on the internal table is that correct?
    7 - What would happen if I avoided using the REFRESH statement?
    8 - 12 - Is this syntactically correct, I am trying to get a set of data which is the customer numbers which match the master data customers and the master data record is án active version and than appendíng to the work area?
    13 - My understanding is this will reduce the number of records in the work area is this correct and needed?
    14 - 22 I am trying to identify my required set of data but feel I am repeating myself, could someone advise?
    Finally what logic would I actually need to write in the key figure object, could I use something like:
    Result = lt_customer.
    Thanks
    Edited by: Niten Shah on Jun 30, 2008 8:06 PM

    1. This line is not required
    2. OCCURS 0 is the OLD way of defining an internal table with that structure.  As it is, it just defines a flat structure.
    3. Data element is usually best
    3-5 Yes
    6. No.  Here you are declaring a table of the type of the flat structure.  Just as the ABAP says!
    7. Nothing.  But by putting this in, you ensure that you know the state of the table (empty) before you start looping through the data package
    8-12. You can tell if it is syntactically correct by pressing Ctrl-F2 when in the editor.  Looks ok.
    13. Ensures your list of customers contains no duplicated.  The code up to this point is building a list of all the unique customers in the data package.
    14-22. Goes to the database and brings back ONLY those customers which are found in the master data.  Looks ok.
    This is a start routine (that's why you've got a data package).  You don't use result.  You should update the datapackage.  But this you haven't done.  Double click on the table name /BIC/PCUSTOMER to get the correct field names.
    So you have to loop through the data package again, and check if the customer in the datapackage is lt_customer.  If it is, fine, otherwise you blank it and report an error, or set an error message or whatever.
    I wouldn't do it like this.  I'd do something like this:
    STATICS: st_customer TYPE HASHED TABLE OF TYPE /bi0/oicustomer
                                  WITH UNIQUE KEY TABLE_LINE.
    * st_customer retains its value between calls, so only populate if empty
    * In one run of the infopackage, this will mean you do only one read of
    * the master data, so very efficient.
    IF st_customer IS INITIAL.
      SELECT customer FROM /BI0/PCUSTOMER
                              INTO TABLE st_customer
                              WHERE objvers EQ 'A'. " Only active values
    ENDIF.
    * Go through data package
    LOOP AT DATA_PACKAGE.
    * Check whether the customer exists.
      READ TABLE st_customer TRANSPORTING NO FIELDS
                  WITH TABLE KEY table_line = DATA_PACKAGE-custid.
      CHECK sy-subrc IS NOT INITIAL.
    * If you get here, the customer isn't valid.  So I'm just setting it blank
      CLEAR DATA_PACKAGE-custid.
      MODIFY DATA_PACKAGE. " Updates the datapackage record
    ENDLOOP.
    Even this is not fully optimised, but it's not bad.
    I strongly suggest that you get yourself sent on the basic ABAP programming course if you're going to do a lot of this.  Otherwise, read the ABAP documentation in the help.sap.com, and, from the editor, get the cursor on each ABAP keyword and press F1 to read the ABAP help.
    matt

  • ABAP Runtime error while activating Update rules.

    Hi Gurus,
    Actually we are in NW 2004's SP9.
    While activating the update rules of cube "0PY_PPC01" it is going to ABAP runtime error. It is giving the key words like "MESSAGE_TYPE_X"
    "%_T005K2" or "INSTANTIATE". And i apply NOTEs also i am unable to fix it.
    Can any one give  correct NOTE number that can fix it or any suggestions.
    Thanks in advance.
    Thanks
    Raju.k

    Hi Sven,
    Now we are also in SP11, But the thing is all the other UR are working fine Except
    this UR. Even there is no perticular NOTE number for this.
    Thanks
    Raju.k

  • ABAP objects for transfer/update rules - does this apply to include stateme

    I have a question about the new requirement for the code in the update/transfer rules to be written in ABAP Objects standards.  Does this still apply if in your update rules you using include programs?  Does this mean that when we upgrade we will have to follow the ABAP Objects standards (ie no header lines)?

    Routines will method based.
    In addition to what Chetan has sent, check this how to also.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/6090a621-c170-2910-c1ab-d9203321ee19
    Ravi Thothadri

  • Convert ABAP code in start routine/update rule to transform. start routine

    Dear BW ABAPers,
    I have created a custom purchasing info cube (YCP_PURC1) based on 0CP_PURC1 standard cube. I would like to convert this new data flow to BI7 (from 3.x), and convert the standard update rule to transformation. I would need to rewrite the below start routine from the standard update rule to a start routine ABAP code in the newly created  transformation / start routine. My ABAP knowledge is limited. Will you please help?
    *this is the start routine from the update rule. As a side note, the data source is 2LIS_02_SCL.
    LOOP AT SOURCE_PACKAGE.
        IF (     SOURCE_PACKAGE-cppvlc  EQ 0
             AND SOURCE_PACKAGE-cppvoc  EQ 0
             AND SOURCE_PACKAGE-cpquaou EQ 0 ).
          DELETE SOURCE_PACKAGE.
          CONTINUE.
        ENDIF.
    no_scl is initial ( e.g. for good receipts, billing)
    value has to be set depending on storno
        IF SOURCE_PACKAGE-no_scl IS INITIAL.
          IF SOURCE_PACKAGE-storno = 'X'.
            SOURCE_PACKAGE-no_scl = -1.
          ELSE.
            SOURCE_PACKAGE-no_scl = 1.
          ENDIF.
          MODIFY SOURCE_PACKAGE.
        ENDIF.
      ENDLOOP.
    if abort is not equal zero, the update process will be canceled
      ABORT = 0.
    Many thanks and look forward to your kind feedback.
    Kind regards,
    Csaba

    Dear All, Durgesh,
    thanks to you all for your valuable input. Mainly the ABAP part was more interesting for me.
    Durgesh, thanks for your input, it was useful. I just had to change the info objects to data source fields and add the lines before the loop:
    DATA: I_PACKAGE TYPE TYT_SC_1.
        FIELD-SYMBOLS <i_package> TYPE tys_sc_1.
        I_PACKAGE[] = SOURCE_PACKAGE[].
        LOOP AT SOURCE_PACKAGE assigning <i_package>.
          IF ( <i_package>-BWGEO EQ 0
          AND <i_package>-BWGEOO EQ 0
          AND <i_package>-BWMNG EQ 0 ).
            DELETE SOURCE_PACKAGE index sy-tabix.
            CONTINUE.
          ENDIF.
    no_scl is initial ( e.g. for good receipts, billing)
    value has to be set depending on storno
          IF <i_package>-NOSCL IS INITIAL.
            IF <i_package>-ROCANCEL = 'X'.
              <i_package>-NOSCL = -1.
            ELSE.
              <i_package>-NOSCL = 1.
            ENDIF.
          ENDIF.
        ENDLOOP.
    Points have been assigned accordingly.
    Thanks,
    Csaba

Maybe you are looking for