Skip to Content
author's profile photo Former Member
Former Member

Increase the number of records in start routine in update rules

Hello,

I want to duplicate records in start rountine of update rules if the charasteristics meet the criteria.

Example :

if infobject ZFlag = 1 I want that this record will appear two times but with differant date.

In communication structure I have

ZFLAG date material sum

1 12/09/2005 M1 50

After start routine I want to see

ZFLAG date material sum

1 12/09/2005 M1 50

1 12/09/2004 M1 50

Please give me example of code

Thanks

Points are guaranteed

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Sep 27, 2005 at 12:03 PM

    Hello,

    Try the following code..

    DATA: WA_TEMP TYPE DATA_PACKAGE_STRUCTURE OCCURS 0 WITH HEADER LINE.

    loop at DATA_PACKAGE where ZFLAG = '1' into wa_temp.

    wa_temp-date(4) = wa_temp-date(4) - 1.

    append wa_temp.

    • please note that just reducing by one year could result in a invalid date with earlier year in leap years. Review accordingly

    endloop.

    LOOP AT WA_TEMP.

    APPEND WA_TEMP TO DATA_PACKAGE.

    ENDLOOP.

    Hope this helps...

    Regards,

    Raj

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.