on 09-30-2007 11:14 AM
hi Experts,
I am new to VC,
1) I am working on a project where i need to get data from RFC and display it without any click of button ie. when my i view opens it sholud display the data.
2)The data is to be displayed in such a way that besides every data from iview i have to display an image which i have uploaded from image manager. this image will be static.
Can anyone help me which would be the best way to go about.
Regards,
Sanjyoti.
Hi
I will open a blog and hopefully will be able to explain it better than, but since it will take time I just give you the solution for this example.
First create a button to trigger an action (let's say the action is called "go").
Drag a line and create a signal out set go as the event, name the signal out as "sig".
Create 4 numeric fields in the signal out "num1",..,"num4".
Map num1 <- 1
Add a signal in to the model, name it "sig" and create 4 numeric field to it ("num1",..,"num4" as well).
Drag a line from the signal in and choose a form from the context menu.
4 recordsl will appear in the form. set them as visible and as spinner control.
drag a line from the form's out port and add a signal out named "go".
Map is as follows:
num1 <= @num1+1
num2 <= 1
num3 <= if(@num2==1,1,0)
num4 <= if@num3==1,1,0)
Add a gaurd condition to the line @num1<4 and name the event "Next_Event"
double click on num1 to open the properties popup.
For num1 define a custom action named "Next_Event"
For num2 define a custom action named "Pass1"
For num3 define a system action move row - move next
For num4 define a custom action named "pass2"
drag a line from the form and add data store. Create 2 field in it "first" and "second"
set the event to be pass1 and map the value you want from the table to "first".
Create another line from the form to the data store with event pass 2 that maps value to second.
Create a new form with 2 field which default vlaue is the value in the data store.
Hope you got the hang of it,
Shay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi Shay,
Thanks for your replies they had been very helpfull.
in the above reply i am not able to understand about
*****************************
Map is as follows:
num1 <= @num1+1
num2 <= 1
num3 <= if(@num2==1,1,0)
num4 <= if@num3==1,1,0)
Add a gaurd condition to the line @num1<4 and name the event "Next_Event"
**********************************************
where exactly should i write this code ??
when finally i deploy the project instead of the data to be displayed what i can see is "undefined" in the textfield.
In my case i dont want to use any button, as the iview is loaded the RFC should execute and data shold be displayed in the textfield.
As promissed, I've publiched a blog with the solution.
You can find it here:
https://www.sdn.sap.com/irj/sdn/weblogs?blog=/cs/junior/search/wlg?id_user=251746470
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi Shay ,
could you please repost the solution again , the url SAP Community Network Blogs is empty
Hi Aya,
If I get it right, you want something like this:
1. Connect a Start Point element to the Data Service to trigger its execution. Open the Map Data dialog on the link to define the values assigned:
2. In the Layout Board add an Image control to the Table:
3. Open the Browse Images dialog on the new column. select the desired images.
Hope this helps,
Thanks,
Udi
Hi,
A. Instead of having a button with an action, you can trigger this by connecting the data service to the signal out directly.
B. The "Code" should be the mapping between the form with the spinners and the signal out.
if you'll correct this it will also solve the "undefined" issue. If not, simply set default values to the fields in the data store.
Good luck.
Shay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi Shay,
Thank you for your help.
I tried the same and was able to see the data but what has to be done if i want to display the data from the second row.
what i tried was i included two more fields in the form 2 and assiged it the same value which i have attached to the previous two.
Would you please explain me the flow of the process. I am not able to understand what exactly this process is doing and how is it getting the data from the table to text fields ????
Regards,
Sanjyoti.
Hi Sanjyoti,
Conditioning image for each row works in SP13, but I'm not sure as for earlier versions. Which version are you using?
As for your additional question, you can use the system action called move row and set your selection to "move after".
Hope it helps,
Shay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sanjyoti,
You can use a start point and connect it to your data service. Make sure you map the data correctly.
You can add an image element to your form/table and use images from the image manager. If the image is static (doesn't change according to the data) simply use "true" as the condition.
Hope it helps,
Shay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi Shay,
Thanks for your reply,
I am able to see the data now but i can see all the rows of the table having the same image, i need seperate image for everydata.
One more question how can i make the code to extract data one by one from the table or make it point to the next data from the table.
Regards,
Sanjyoti.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.