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

Moving record column value to previous record column

if ({ZAR_VRM30_Q007.Document Number}=previous({ZAR_VRM30_Q007.Document Number})) and
{@Gross billing_1} = 0 and {ZAR_VRM30_Q007.Net Billing} = 0 and {@Cash Receipts} = 0 and {ZAR_VRM30_Q007.Retainage based on Currency Type} <> 0
then


previous({ZAR_VRM30_Q007.Retainage based on Currency Type}) = {ZAR_VRM30_Q007.Retainage based on Currency Type}

Hi ,

I have a scenario where I have to move the current record value to previous record column.

As highlighted in the above screenshot, I'm comparing two records which have same billing doc no and see if the retainage is shown in second record.

If yes, see that second records gross billing, net billing values are 0, then move the retainage to previous record.. In this example: value 141,417.17 should be moved to the previous record leaving its value 0 in the second record.

I tried using if statement to satisfy the condition and its working but I'm not able to assign the retainage value to first record column. Here I'm getting only true and false values.

Please see the code below:

if ({ZAR_VRM30_Q007.Document Number}=previous({ZAR_VRM30_Q007.Document Number})) and
{@Gross billing_1} = 0 and {ZAR_VRM30_Q007.Net Billing} = 0 and {@Cash Receipts} = 0 and {ZAR_VRM30_Q007.Retainage based on Currency Type} <> 0

then


previous({ZAR_VRM30_Q007.Retainage based on Currency Type}) = {ZAR_VRM30_Q007.Retainage based on Currency Type}

Please let me know how to achieve this requirement.

Thanks for all the help!

John

crystal 1.jpg (53.4 kB)
Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Jul 27, 2012 at 05:15 PM

    Hi John,

    The formula outputs True or False because the last line of your formula is trying to compare two values and see if they're equal.

    previous({ZAR_VRM30_Q007.Retainage based on Currency Type}) = {ZAR_VRM30_Q007.Retainage based on Currency Type}

    will always output True or False.

    Change the last line to just:

    {ZAR_VRM30_Q007.Retainage based on Currency Type}

    Hope this helps!

    - Abhilash

    Follow us on Twitter

    Got Enhancement ideas? Try the SAP Idea Place

    Share Your Knowledge in SCN Topic Spaces


    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.