on 09-28-2009 4:03 PM
hello, i have several dropboxes in a screen
the user select values and then press the button "Insert Data" ....at the first view could be an simple Sql Insert but before i have to do some sql queries with the values that the user select for example...in the first dropbox the user choose the area..but he see the area description and in the database have to go the area code...how can i make a Query and then catch the result to use in the insert Query...
another thing...how to call this transaction? i was thinking in put in the button..onclick , and build onefunction that call an transaction..it is possible??
regards
Mário
Mario,
taking the users input, use it to retrieve some more values and then do some database inserts sounds to me that you should use your "Insert Data" button to call a xacute query that gets the user input as parameter and calls a transaction that does the rest of the logic: prepare and execute the actual insert.
[SAP Help: Xacute Query|http://help.sap.com/saphelp_xmii120/helpdata/en/45/458160db273876e10000000a114a6b/frameset.htm]
Good luck
Michael
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanks Michael, i already thinking like: http://img269.imageshack.us/img269/2623/tinsert.jpg
my problem is that i dont know how to catch the values of the firsts sql querys to use in the insert instruction....should i use the xml results??
could someone explain this??
regards
Mário
Mario,
if you have created the first SQLs, e.g. the SqlGetAreaByDesc, and then click on the action and open the Configuration, click on ok to generate sample XML. This makes it quite easy in the link editor to drag the results of the query to the target fields of your insert.
The usual XPATH expression in the Expression Editor looks like this: "SqlGetAreaByDesc_0.Results{/Rowsets/Rowset/Row/FIELD}"
Hope this help.
Michael
User | Count |
---|---|
8 | |
7 | |
3 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.