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: 

Triggering of a mail on release of any PO for First time only

sanjeev_mishra_15aug
Active Participant
0 Kudos
1,178

Hi Experts,

I have a requirement like:

The mail should be triggered to the approver only when the PO is released for the very first time using Tcode ME28 or ME29N after creation of PO using tcode ME21N.

For this I was using Badi ME_PURCHDOC_POSTED~Posted method. But I failed to recognize whether the PO is being release for the very first Time only or multiple times.

Please suggest your points.

Thanks in advance,

Sanjeev Kumar

1 ACCEPTED SOLUTION

Former Member
0 Kudos
516

Hi Sanjeev,

In ekko table field FRGZU shows release status,

suppose release stratergy is of 3 level then it will contain XXX,

so with first X the document is first time release,

And when document is partially released FRGRL is also X.

You can try this, and let us know what is status.

Regards,

Jaydeep

9 REPLIES 9

former_member196331
Active Contributor
0 Kudos
516

Small question.

Are you getting or identifying  When ever po is release. place. (badi/or enhancement point).

0 Kudos
516

Thanks NewB for quick reply.

I have to identify just one thing that whether the po is being released for the very first time or not.

I still didn't get proper solution.

0 Kudos
516

you are sending a mail when ever po is released ok.

While sending a mail. po number has to be save in temp table.

Po no:1

Po no:2

Po No:1

Some body releasing, Now you are sending a mail, you have to check int temp table, whether po no is exist or not, if no then insert the po no into the table.

if exists don't send any mail.

somebody unreleased and again releasing, now check it in table, po no already exists so, no need to send mail because already send the mail previously.

You have to see the table Cdpos and Field name is  eq FRGKE enter this one  at se16n and check it

po release Strategy will be capture, so, while releasing you can check it. whether somebody has released or not, just observe it , you can get some knowledge.

Hope you understood.

0 Kudos
516

I still didn't get proper solution.


But You closed the post.Have you got the answer.

Former Member
0 Kudos
517

Hi Sanjeev,

In ekko table field FRGZU shows release status,

suppose release stratergy is of 3 level then it will contain XXX,

so with first X the document is first time release,

And when document is partially released FRGRL is also X.

You can try this, and let us know what is status.

Regards,

Jaydeep

0 Kudos
516

Thanks Jaydeep for your valuable reply,

Suppose once the PO has been released on all 3 levels for the very first time and thereafter once again that PO is reverted back, some changes are made and then again the PO is being released. So here again I will get the same result as you suggested in the first time releasing process of that PO.

But I don't need to trigger the mail when the PO is released once it has been released for the very first time.

So I need to confirm whether the PO has been released for the very first time or not.

Hope my query is clear to you. Please suggest me your solution.

Thanks in advance.

0 Kudos
516

Again i am telling you, you has to check the table cdpos and field name is FRGKE.

The below Attached image will explains your doubts.

Hope you understood.

0 Kudos
516

Hi Sanjeev,

You can check version field in same table.

refer below thread.

Version Management in PO | SCN

Regards,

Jaydeep

0 Kudos
516

Thanks NewB for your useful reply.

Thank you all who suggested me.

Thank you very much.