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.

Does reading data from a Table for inserting into a new Table via App Engine require an AET table?

4 replies [Last post]
Guest's picture
Guest

Hello,

We have the below mentioned straightforward requirement which needs to be fulfilled via an App Engine:
--> Read data from an inbound Interface Table, call a CI to insert the same into a STaging table.

My question is :
1. Should the data be read from the Table using Do Select & the data stored in the AET table & then called again in PeopleCode for calling the CI?
2. Should all the processing be done in PeopleCode by writing all the "fetch" code in PeopleCode using sqlexec & then call a CI?

Thanks !

Lepa's picture
User offline. Last seen 2 years 6 weeks ago. Offline
Joined: 06/23/2008
Posts: 591
Re: Does reading data from a Table for inserting into a new ...

You need a state record, a Do Select and a PeopleCode action. Use Do Select to read data from inbound tables, assign values to the state record and then pass the values to CI using the PeopleCode action right after your Do Select action.

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

Guest's picture
Guest (not verified)
Re: Does reading data from a Table for inserting into a new ...

Thanks Lepa ...This indeed was what I was looking for...I'm a newbee on the Tech Side (come from a functional background) & was not 100% sure which approach I shd take..thanks again !

Guest's picture
Guest (not verified)
Re: Does reading data from a Table for inserting into a new ...

Hey Lepa,

Did have one question on this...Obviously we have a run control from where the program would be initiated...so should I plan to have 2 AET records, i.e one for storing the run control parameters & the other for storing the data which needs to be inserted?

Also, like SQR's, can we store the data in variables & use it across multiple actions in an AE?

Thanks for all your help !

Lepa's picture
User offline. Last seen 2 years 6 weeks ago. Offline
Joined: 06/23/2008
Posts: 591
Re: Does reading data from a Table for inserting into a new ...

You can if you want you but it is not necessary. You can use the same state record for both.

Quote:
Also, like SQR's, can we store the data in variables & use it across multiple actions in an AE?

Yes, look up %BIND in Application Engine PeopleBook. You use %BIND when you want to reference a variables stored in the state record and if you are referencing the value in PeopleCode you just use my_state_record.my_field

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