I would like to invoke a service from a DSP by using the %invoke …% instruction, because the service i would like to invoke has an record as input and a recordlist as output (with different construction).
The DSP is the output template from a service, which is found at /package/folder1/folder1_1/serviceA, but the service i would like to invoke is found at /package/folder1/folder1_2/serviceB.
The output from serviceB is a recordlist called Products.
I tried the following instruction, but it seems not to work:
%invoke /folder1.folder1_2/serviceB%
%loop Products%
%value Product/Name%
%value Product/ProdID%
%value Product/Price%
%endloop%
%endinvoke%
Thanks,
Varrius
PS: I’m using SAP BC 4.6 if it’s relevant.
edit:
I have still the same problem, but got another one
When i invoke a service from the DSP with an link/action like:
how can i avoid to set the url into the address-bar? Is there any possibility? (Maybe using a frame? But i don't know how to make that with the BC.)
When i invoke service on this way, is the pipeline dropped or could i use variables in the next services?
edit2:
Is it possible to set a value to variables in a DSP? I know i can copy from one to another, but i want to set my own data, like strings etc.
I don’t quite understand whether you are having a problem in invoking the service itself or just displaying the result from the service into the output template. If you are invoking the service alright and it is just the display problem - the reason is
Once you have put the %loop Products% tag, you don’t need the Products while printing the values of vars inside Products - the scope gets limited to the Products document - so you just need to use:
%loop Products%
%value Name%
My loop over the variables is right, because i have a recordlist (Products) which contains records(Product) with the data of the actual product in the list. But it seems to be, that i can’t use the Products list in the DSP, while it’s created in the invoked service.
How is it possible to set data in the pipeline so i can use it in every following service without mapping it? When i invoke a service from a DSP, it seems that i loose all the data from pipeline, except from the data i created between the <form action invoke …> and , because it is sent to the service as input.
If above is the structure of the data, then your loop statement is correct and the data should indeed be displayed provided it is available in the pipeline as output.
In order to allow data (variables) to move from service-dsp-service you will have to store them as hidden fields in your dsp and then use inputs in your following service to receive the values in these variables. This would work, however, this approach should be taken only if the data size is not large.
your right with the document list structure, that’s how it looks like.
How can i store them as hidden fields in the DSP? Is it enough to set them as output of there service or do i need to do more?
What is the maximum size i’m allowed to store this way and are there alternatives then?
Thanks,