cancel
Showing results for 
Search instead for 
Did you mean: 

Processing records step-by-step

former_member203185
Participant
0 Kudos

Hi experts

I have come across such requirement like the following:

1. Using filters to data source I retrieve some records

2. For each of retrieved records I need automatically take a field value (kind of ID) and retrieve records from the data source by the ID.

So, the problem is that for retrieved records only the first record is processed.

And my question is that how can I make processing along the whole table?

Thank you in advance.

Sincerely,

Anton

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member202465
Contributor
0 Kudos

Hi Anton,

Please let me see if I get it right:

You have sort of Master-Slave relationship, for exampel Suppliers and Orders.

1. you get all the Suppliers.

2. for each supplier you want to get all his orders.

Is it correct?

Thanks,

Udi

former_member203185
Participant
0 Kudos

Hi Ehud,

The task is more complecated but I have already found solution.

I had to use WD controlers to save retrieving records.

But in general, can it be implemented using VC controls only?

Due to delay of my discussion moderation I started another discussion related to my problem.

Please have a look.:

http://scn.sap.com/message/14079643

 

Sincerely,

Anton

former_member202465
Contributor
0 Kudos

Hello Anton,

As I see it, It's important to understand what you want to do with the data. do you need to present in the UI the results of the 1st data source? the 2nd? etc.

If no user interaction is involved between getting the results of the 1st and 2nd data sources, it may be better to have one function on the DB return all the results required in step 2 (so you don't have to think of iterations in VC).

But it all depends on the specifics of your scenario, I'm currently not sure I can say what's best. Maybe we could start by: why do we need two separate calls to the DB?

Thanks,

Udi

former_member203185
Participant
0 Kudos

Hi Udi,

thank you for reply.

A couple of words about my requirements and implemented solution.

I have business process and its reporting to data source. It's quite standard data source because I connect to it using absolutely standard SAP CE functionality. Furtheremore, due to 7.2 version of CE I have no API to use my own connectivity method.

Using SAP VC I consumed the datasource, built some filters and all looked well. But using filters I received not all records for some processes. So it is essential to show users consistent process. That's why I needed to use the datasource twice. So, on the first step I restrict record set selection, on the second step I distinct processes numbers and receive all their steps to show it to users. That is the idea. But here I was faced with troubles. VC didn't want to process record set by each records.

But I made up my mind with using of Java WD component that just gets record set and in cycle raises special event wich pushes separate record outside directly into filter port of the data source. Than the data source returns all the process's steps. But here I came across new trouble. On the next iteration previous results disappeared and nothing could help me.

Here I invented enhancement to my JWD component, so I added necessary context and two special ports: income and outcome for records coming from the datasource. By the way my JWD component collects all necessary records and can push it in separate VC table.

That is my solution and it works.

Now I wonder if I could make it rather easier on VC controls only. Is it possible or not?

Sincerely,

Anton

former_member202465
Contributor
0 Kudos

Hi Anton,

The iteration part seems to me impossible to do in VC. The closest thing is a Data Service that gets a Recordset (0..n or 1..n) as input.

What I wanted to see is what exactly causes you to need iteration in the first place. in other words, should something change in the Data Services you use for the modeling to be easier?

I must say I still didn't get it - I guess it's also complicated to explain - sorry!

If I have to guess I'd say the following might help me:

- Example that explains the relevant data you have, as in DB tables - lowest level

- What exactly the process sould do with that data

I could then think what Data Sevices I would build to later consume by VC.

Thanks,

Udi