You are viewing this site as a guest. You can still ask questions and help others! Join our Dev2Dev IT Community to receive your own blog, share your knowledge, and much more.

Skipping Application Engine Section

11 replies [Last post]
iammanku's picture
User offline. Last seen 9 years 30 weeks ago. Offline
Joined: 03/24/2009
Posts: 10

Hi All,

I have an Application Engine, with two Sections - one Main and a Section A.

Main section has got one DoSelect action followed by the Call Section action to Section A.

Section A has PeopleCode action and SQL action.

The peopleCode action in section A, on encoutering a particular condition, wants to skip the SQL section followed by it and proceed to the next row returned by the DoSelect action in the Main section.

Pls let me know how to proceed . This is really urgent and any help/hint will be highly apppreciated.

Thanks in advance.

oddsnends's picture
User offline. Last seen 9 years 7 weeks ago. Offline
Joined: 03/28/2008
Posts: 16
Re: Skipping Application Engine Section

I think this is going to require more detail than you have provided. Are you sure the DoSelect is returning data? Also, iis the Active Checkbox for the section checked?

iammanku's picture
User offline. Last seen 9 years 30 weeks ago. Offline
Joined: 03/24/2009
Posts: 10
Re: Skipping Application Engine Section

Thank you oddsnends ...

DoSelect is returning data and Active checkbox is checked.

My question is how can we skip an entire section (section A in the above note), based on some condition in PeopleCode action within Section A.

Supppose the code in Section A: PeopleCode action is:

If &Num = 999 Then
Proceed to the next row in the doselect in Section Main, withoout executing the SQL action in the Section A.
End-if;

Hope this makes the query simpler! Pls help...

oddsnends's picture
User offline. Last seen 9 years 7 weeks ago. Offline
Joined: 03/28/2008
Posts: 16
Re: Skipping Application Engine Section

I'm a bit new to the App Engine

Could you try using the built-In exit()

If &Num = 999 Then
exit (1); /*Proceed to the next row in the doselect in Section Main, withoout executing the SQL action in the Section A.*/
End-if;

Let us know if that works.

Lepa's picture
User offline. Last seen 8 weeks 2 days ago. Offline
Joined: 06/23/2008
Posts: 591
Re: Skipping Application Engine Section

Why don't you have the SQL action as a separate section (section B) and if the condition is ok in your peoplecode then call section B from within your code, if not, then don't call section B ( section B will be the one containing your SQL)

Give back to the community and help it grow!
* Help with unanswered forum questions and issues
* Register or login to share your knowledge at your own blog

iammanku's picture
User offline. Last seen 9 years 30 weeks ago. Offline
Joined: 03/24/2009
Posts: 10
Re: Skipping Application Engine Section

Thanks All.

If &Num = 999 Then
Return 1;
End-if;

And also we will check the On Return property of PeopleCode Section to - Break.

As per PeopleBook, On Return property of PeopleCode Section will be activated only on encoutering Return 1 or exit 1 in the peoplecode. The program exits the current step and section, and control returns to the calling step.

Thanks oddsnends again for your help.

And Lepa, I would prefer some peopleCode techniques, rather than changing the AE program structure, since it is OOB AE. Thanks...

I will apply this and let you know the outcome!

Ashar's picture
User offline. Last seen 2 years 41 weeks ago. Offline
Joined: 03/26/2008
Posts: 227
Re: Skipping Application Engine Section

just curious to know, what is OOB AE? may be this is a stupid question.. but i really dont know what it is..

iammanku's picture
User offline. Last seen 9 years 30 weeks ago. Offline
Joined: 03/24/2009
Posts: 10
Re: Skipping Application Engine Section

OOB means Out of the Box. OOB Application Engine is something that is PeopleSoft delivered AE.

Ashar's picture
User offline. Last seen 2 years 41 weeks ago. Offline
Joined: 03/26/2008
Posts: 227
Re: Skipping Application Engine Section

in which Product Suite?
HR? Financials?

iammanku's picture
User offline. Last seen 9 years 30 weeks ago. Offline
Joined: 03/24/2009
Posts: 10
Re: Skipping Application Engine Section

It may not be restricted to any product suit!

And friends, my issue is resolved!.
1. Changed the Peoplecode action - On Return property to BREAK.

2. People code is
If &Num = 999 Then
Exit(1);
End-if;

Now everyhting works as expected.

Thank you so much for your responses!!!

Jolly's picture
Jolly (not verified)
Re: Skipping Application Engine Section

Dear Manku,
Your answers were really very beneficial, not only did they solve my problem( the same one actually) but i could understand the logic too.. A note of thanks....

Guest's picture
Guest
Re: Skipping Application Engine Step

Based on step 1 peoplecode action i want skip step2 do select action how cani acheive this pls help me