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: 

get the latest record of p2001 .

Former Member
0 Kudos

Hi,

My requirement is to get the latest record of p2001 and the condition awart eq '0620'. and i am using the macro rp_provide_from_last p2001 space p_begda p_endda.here i am getting the latest record but not for the condition awart eq '0620'.so how to get the latest records from p2001 of condition awart = '0620'.Cany anyone help me to solve this issue.

Thanks,

Deesanth

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Deesanth,

Before you use the Macro (rp_provide_from_last p2001 space p_begda p_endda) use the below code it may work for your condition.

DELETE P2001 WHERE awart NE '0620'. then use the above macro.

Please let me know if you need more information.

Regards,

Ramakrishna kotha.

+91 9848468817.

2 REPLIES 2

Former Member
0 Kudos

Hi Deesanth,

You can get in another way write a select statement as per your requirement. Then sort the internal table and read the first record.

Correct me if I am wrong.

Thanks & Regards,

M.Ramana Murthy

Former Member
0 Kudos

Hi Deesanth,

Before you use the Macro (rp_provide_from_last p2001 space p_begda p_endda) use the below code it may work for your condition.

DELETE P2001 WHERE awart NE '0620'. then use the above macro.

Please let me know if you need more information.

Regards,

Ramakrishna kotha.

+91 9848468817.