Filter recordset with results of another?
Can you filter a recordset with the results of a field from a
proceeding recordset in PHP?
Manually setup a variable in between your recordsets in your
head.
$var = $row_firstRecordset['Fieldname'];
Second recordset, just use your $var name to filter.
HTH,
Jon
"tccdover" <[email protected]> wrote in
message
news:eaoha0$pcb$[email protected]..
> Can you filter a recordset with the results of a field
from a proceeding
> recordset in PHP?
Similar Messages
-
Add a new employee - Connection is busy with results for another command
Hi all,
I try to add a new employee in my SAP Business One system, but I get an error message like that : [Microsoft][SQL Native Client] Connection is busy with results for another command * (HEM5) (HEM5)
So I try to see if I get the same message when I update an employee, and I don't get this message.
Do you have an idea, why I get this error message when I add a new employee ?
Message was edited by:
Marc RiarHello,
I am afraid there maybe two users / workstations using the same user code and one of them is creating (add) and other is update. Try to ask the users/wrokstations.
Another way out is try to run this query :
select * from HEM5
Rgds,
JM
http://groups.yahoo.com/group/SBO_Knowledge_Village
[email protected] -
Filter based upon results of another request
How do I troubleshoot a Filter based upon results of another request issue?
I have a report that lists every account that purchased a product in May.
I have a report that lists every account that purchased a product between Jan - April.
I have a report that lists every account that purchased a product in May and also between Jan-apr. The problem is it's returning Account Names that are valid for May but not for Jan-apr and I dont' know why. It filters some but not others, interestingly enough it seems to split it down the middle.
Report A = 222 customers
Report B = 673
Report C = 111???
When I compare A to B manually I get 94.
Any ideas as to how I troubleshoot this?Worked it out ;-D
-
Filter recordset with session variable
This has never happened to me before, but for some reason, my
recordset that drives a dynamic table won't filter results based on
a session variable. I know session variables are working because I
have the session variable echo on the page (dragged-n-dropped my
session variable from the Bindings panel to my page), and that
works fine. So why can't I filter my recordset with the same
session variable??? What's going on?
PS: I've attached my result page's code to this
message.Gabe the Animator wrote:
> <?php require_once('Connections/sales.php'); ?>
> <?php
> if (!function_exists("GetSQLValueString")) {
> function GetSQLValueString($theValue, $theType,
$theDefinedValue = "",
> $theNotDefinedValue = "")
> {
> $theValue = get_magic_quotes_gpc() ?
stripslashes($theValue) : $theValue;
>
> $theValue = function_exists("mysql_real_escape_string")
> mysql_real_escape_string($theValue) :
mysql_escape_string($theValue);
>
> switch ($theType) {
> case "text":
> $theValue = ($theValue != "") ? "'" . $theValue . "'" :
"NULL";
> break;
> case "long":
> case "int":
> $theValue = ($theValue != "") ? intval($theValue) :
"NULL";
> break;
> case "double":
> $theValue = ($theValue != "") ? "'" .
doubleval($theValue) . "'" :
> "NULL";
> break;
> case "date":
> $theValue = ($theValue != "") ? "'" . $theValue . "'" :
"NULL";
> break;
> case "defined":
> $theValue = ($theValue != "") ? $theDefinedValue :
$theNotDefinedValue;
> break;
> }
> return $theValue;
> }
> }
>
> $colname_rsSales = "-1";
> if (isset($_SESSION['state'])) {
> $colname_rsSales = $_SESSION['state'];
> }
> mysql_select_db($database_sales, $sales);
> $query_rsSales = sprintf("SELECT * FROM sales WHERE city
= %s",
> GetSQLValueString($colname_rsSales, "text"));
> $rsSales = mysql_query($query_rsSales, $sales) or
die(mysql_error());
> $row_rsSales = mysql_fetch_assoc($rsSales);
> $totalRows_rsSales = mysql_num_rows($rsSales);
>
> session_start(); ?>
The issue is that PHP doesn't "work" with session values
until the session has started, and that must be done on each page,
and must be done in the code *above* any reference to a session
variable. The code you posted has the session_start() after it
tries to use the session value ito filter the recordset. So move
this last line of code ( session_start(); ) above $colnam_rsSales =
"-1". Better yet, use:
if(!session_id()){
session_start();
To prevent some versions of PHP from generating a
warning/notice if you've called session_start() on the page already
and you call it again.
Danilo Celic
| Extending Knowledge Daily :
http://CommunityMX.com/
| Adobe Community Expert -
Issue with Results from Another Query (Error on Null value)
Hi All,
We have a WebI report using "Result from Another Query" option of BO XI R3.1. The report was running fine till recently the dimension object using result from another query had a null value. Report suddenly throwed error as the query filters are invalid.
Is there a way to make this filter optional if no data/null value is there ? Because we need those null values in report as well.
Thank you for your time.
Thanks & Regards
LNHi Vivek,
It was not directly solved but I applied alternate logic to over come the issue.
Here's what I did to overcome:
I used a sub query in place of the whole result from another query.
For Ex:
Dim1 inlist result from another query1
I made it as
Dim1 inlist (Dim0)
where Conditions.
Here Dim0 is the object which we use for Result from another query and Conditions will be the necessary filter conditions to arrive proper Dim0. Make sure proper context is formed for the sub query.
Even though it resolved my problem, It introduces an new issue. It causes increase in query run time when huge set of data is returned from sub query.
Please let me know if i haven't explained clearly.
Hi Aris_BO,
Sorry for not responding earlier. The logic would probably make more queries null & not null. Thats why I was not advised to use it.
Thanks
LN -
Update Query with Results From another Procedure
I am not sure if you can do this or what the proper format of the command might look like.
I have a stored procedure which insert records into a database. I want to insert the records which are returned by calling another procedure. This other procedure returns a cursor object to a variable named o_rows. Can this be done using Oracle 8i?
Insert into MyTable
MyStoredProcedure(oRows);You have a couple of options.
1) You can turn your stored procedure into a pipelined table function. This would allow you to do something like
INSERT INTO myTable
SELECT *
FROM TABLE( myStoredProcedure() );I don't believe that pipelined table functions were available in 8i, however.
2) The other option would be to fetch rows from the cursor and insert those into your table. Something like
LOOP
FETCH oRows INTO col1, col2, col3, col4, ...
INSERT INTO myTable( <<column list>> )
VALUES( col1, col2, col3, col4 );Note that for simplicity I am omitting the declarations of the local variables col1, col2, etc. and the check to see whether the cursor was exhausted.
Justin
Distributed Database Consulting, Inc.
http://www.ddbcinc.com/askDDBC -
OBIEE Report - filter based on the result from another analysis
Hi,
I am using OBIEE 11g,
I am trying to use a filter which is based on the result from another analysis. I have an analysis A which is as table 1, and I want to filter the respective columns of analysis B (Table B) based on analysis A to remove the duplicates for march 01, 02, and 07 , but it is not working properly. I took a max of start and end time when I created analysis A. Please let me know if I did anything wrong. thanks.
Table 1
Employee Number
Date
IN
Out
Start Time
End Time
xxxxxxx
2015-02-26
9:00
13:00
00:00:00
00:00:00
2015-02-27
12:00
18:00
00:00:00
00:00:00
2015-02-28
8:00
14:00
00:00:00
00:00:00
2015-03-01
14:00
20:00
14:00:00
20:00:00
2015-03-02
16:00
20:00
16:00:00
20:00:00
2015-03-07
14:06
20:02
14:00:00
20:00:00
2015-03-11
16:00
20:00
16:00:00
20:00:00
2015-03-14
8:00
14:00
00:00:00
00:00:00
2015-03-25
14:00
20:00
16:00:00
20:00:00
Table 2
Employee Number
Date
IN
Out
Start Time
End Time
Hours
xxxxxxx
2015-02-26
9:00
13:00
00:00:00
00:00:00
-3
2015-02-27
12:00
18:00
00:00:00
00:00:00
6
2015-02-28
8:00
14:00
00:00:00
00:00:00
6
2015-03-01
14:00
20:00
00:00:00
00:00:00
6
14:00:00
20:00:00
6
2015-03-02
16:00
20:00
00:00:00
00:00:00
4
16:00:00
20:00:00
4
2015-03-07
14:06
20:02
00:00:00
00:00:00
6
14:00:00
20:00:00
6
2015-03-11
16:00
20:00
16:00:00
20:00:00
4
2015-03-14
8:00
14:00
00:00:00
00:00:00
6
2015-03-25
14:00
20:00
16:00:00
20:00:00
4Why avg here?
What columns you want to show in the report?
for a employee for given date if he have 2 rows then you may sum up hours right?
Employee Number
Date
IN
Out
Start Time
End Time
Hours -
Recordset filter error with form
I have a good working recordset which views my records good.
When I change this to a recordset with a filter (form value)
it doesn't work anymore (I did a test in de recordset window with
the same value)
In my browser I get: (dreamweaver closed and database isn't
locked anymore)
HTTP 500.100 - Internal Server Error - ASP error
Internet Information Services
Error Type:
Provider (0x80004005)
Unspecified error
/spxcrm/slsklantselectie.asp, line 16.
What could this be?I found that the problem must be in security and rights.
I've set up in the folders that IUSR_[username] should
havefull rights. This solves the problem, but not 100%.
Now I can run my page 2 times. The 3rd time I get the same
error.
Hope somebody has a better idea. -
Filtering recordset with session variable
This has never happened to me before, but for some reason, my
recordset that drives a dynamic table won't filter results based on
a session variable. I know session variables are working because I
have the session variable echo on the page (dragged-n-dropped my
session variable from the Bindings panel to my page), and that
works fine. So why can't I filter my recordset with the same
session variable??? What's going on?
PS: I've attached my result page's code to this
message.Actually, problem solved. I moved " session_start()" above
"$colname_rsSales = "-1" ", which did the trick. -
I am having the same problem as user "Gabe the animator" in a post sent in 2007.
"my recordset that drives a dynamic table won't filter results based on a session variable. I know session variables are working because I have the session variable echo on the page (dragged-n-dropped my session variable from the Bindings panel to my page), and that works fine. So why can't I filter my recordset with the same session variable???"
here is the code:
<?php require_once('Connections/mockconn.php'); ?>
<?php
session_start();
?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
return $theValue;
if(!session_id()){
session_start();
$colname_info = "-1";
if (isset($_SESSION['email'])) {
$colname_info = $_SESSION['email'];
mysql_select_db($database_mockconn, $mockconn);
$query_info = sprintf("SELECT name, last_name, email, password FROM registration WHERE email = %s", GetSQLValueString($colname_info, "text"));
$info = mysql_query($query_info, $mockconn) or die(mysql_error());
$row_info = mysql_fetch_assoc($info);
$totalRows_info = mysql_num_rows($info);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>home</title>
</head>
<body>
<div id="info">hello <?php echo $row_info['']; ?></div>
<?php
if (isset($_SESSION['email'])) {
echo 'your email: '.' '. $_SESSION['email'] .' '.'good job';}
?>
</body>
</html>
PLEASE PLEASE HELP.... I have been at this for day's...
how do I get the record set to filter based on the value of the session variableSorry I forgot to mension the error I am getting?
( ! ) Notice: Undefined index: in C:\wamp\www\mock\home.php on line 59
Call Stack
Time
Memory
Function
Location
1
0.0093
389024
{main}( )
..\home.php:0
Why is this error coming up? -
Hi,
I m trying to filter an asp recordset with % wildcart but impossible to do it.
Have got a asp form with a dropdown list based on a recordset that stores value (numeric) in a variable (id).
So this variable is used on my result asp page to filter a new recordset by this numeric value.
Im using wild card in order to display all records like this SQL query:
SELECT *
FROM proprietes
WHERE ville LIKE %MMColParam%
MMColParam defined like this :
Numeric
Request.Form("ville")
default value %
So when it generates sql query, it gives SELECT *FROM proprietes WHERE ville LIKE '%MMColParam%' and testing it, it works (testing recordset in dream) but saving it and reopens recordset the query becomes : SELECT *FROM proprietes WHERE ville LIKE %MMColParam% and testing recordset gives error !!
Someone can help me?
Thanks a lot.Hi thanks a lot
Here my asp form :
Request form "ville" value is coming from access database and is a numeric value (autoid) wich is used to filer recordset on results page.
I done this type of fiter several times with other version of dreamweaver but with CS4 impossible to do it (or i missed something!!)
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!--#include file="Connections/immo.asp" -->
<%
Dim local
Dim local_cmd
Dim local_numRows
Set local_cmd = Server.CreateObject ("ADODB.Command")
local_cmd.ActiveConnection = MM_immo_STRING
local_cmd.CommandText = "SELECT * FROM villes"
local_cmd.Prepared = true
Set local = local_cmd.Execute
local_numRows = 0
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Document sans titre</title>
</head>
<body>
<p> </p>
<p> </p>
<form id="form1" name="form1" method="post" action="resultats3.asp">
<p> </p>
<p>
<label>
<select name="ville" id="ville">
<option value="%" <%If (Not isNull((local.Fields.Item("idville").Value))) Then If ("%" = CStr((local.Fields.Item("idville").Value))) Then Response.Write("selected=""selected""") : Response.Write("")%>>Indifférent</option>
<%
While (NOT local.EOF)
%>
<option value="<%=(local.Fields.Item("idville").Value)%>" <%If (Not isNull((local.Fields.Item("idville").Value))) Then If (CStr(local.Fields.Item("idville").Value) = CStr((local.Fields.Item("idville").Value))) Then Response.Write("selected=""selected""") : Response.Write("")%> ><%=(local.Fields.Item("ville").Value)%></option>
<%
local.MoveNext()
Wend
If (local.CursorType > 0) Then
local.MoveFirst
Else
local.Requery
End If
%>
</select>
</label>
</p>
<p> </p>
<p> </p>
<p>
<label>
<input type="submit" name="button" id="button" value="Envoyer" />
</label>
</p>
</form>
<p> </p>
<p> </p>
</body>
</html>
<%
local.Close()
Set local = Nothing
%>
Here my asp results page:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!--#include file="Connections/immo.asp" -->
<%
Dim Recordset1__MMColParam
Recordset1__MMColParam = "%"
If (Request.Form("ville") <> "") Then
Recordset1__MMColParam = Request.Form("ville")
End If
%>
<%
Dim Recordset1
Dim Recordset1_cmd
Dim Recordset1_numRows
Set Recordset1_cmd = Server.CreateObject ("ADODB.Command")
Recordset1_cmd.ActiveConnection = MM_immo_STRING
Recordset1_cmd.CommandText = "SELECT * FROM proprietes WHERE ville Like ?"
Recordset1_cmd.Prepared = true
Recordset1_cmd.Parameters.Append Recordset1_cmd.CreateParameter("param1", 5, 1, -1, "%" + Recordset1__MMColParam + "%") ' adDouble
Set Recordset1 = Recordset1_cmd.Execute
Recordset1_numRows = 0
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Document sans titre</title>
</head>
<body>
<p><br />
<%
response.write(request.form("ville"))%>
<br />
<br />
SELECT * <br />
FROM proprietes<br />
WHERE ville LIKE '%vil%'
</p>
<p> </p>
<p><br />
<br />
</p>
</body>
</html>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%> -
Create a sales order with reference to another one. (BAPI)
Hi everybody,
I'm trying to create a new sales order with reference to another one (That's important because of the documents flow).
I'm using 'BAPI_SALESORDER_CREATEFROMDAT2' but I couldn´t do it yet. I've read some ideas about this kind of creation in this forum; but I still haven´t found the solution yet.
Some ideas about the BAPI parameters I nedd to complete?
Thanks in advance!!Hi,
Go through this one
*& Report ZSD_R_SALESORDER
report zsd_r_salesorder1 line-size 132 message-id zmmbapi .
*& Created By : shailaja
*& Created on : 13.10.2007
*& Requested By : vardhman
*& Description of program :
Internal table definition *
data: gt_order_header_in like bapisdhead occurs 0 with header line,
gt_return like bapireturn1 occurs 0 with header line, " Return Messages
gt_order_items_in like bapiitemin occurs 0 with header line, " Item Data
gt_salesdocument like bapivbeln-vbeln , "Number of Generated Document
gt_order_partners like bapiparnr occurs 0 with header line, "Document Partner
gt_return1 like bapiret2 occurs 0 with header line.
Data definition *
types: begin of ty_gt_ft_sales ,
partn_numb(10) type n ,"Customer Number 1
partn_role(2) ,"Partner function
sales_org(4) , "Sales Organization
distr_chan(2) , "Distribution Channel
division(002), "DIVISION
doc_type(4) , "Sales Document Type
purch_no(020), "Purchase order
material(18), "MATERIAL
targetquantity(020),"Target quantity
reqqty(020), "Req quantity
reqdate(010), "req date
*REQ_DATE_H(010),
ref_1(012), "Ref
unload_pt(025),
*PARTN_ROLE(2) ,"Partner function
*PARTN_NUMB(10) ,"Customer Number 1
end of ty_gt_ft_sales,
begin of ty_header ,
partn_numb(10) ,"Customer Number 1
partn_role(2) ,"Partner function
sales_org(4) , "Sales Organization
distr_chan(2) , "Distribution Channel
division(002), "DIVISION
doc_type(4) , "Sales Document Type
purch_no(020), "Purchase order
unload_pt(025),
req_date_h(010),
end of ty_header,
begin of ty_item,
material(18), "MATERIAL
targetquantity(020),"Target quantity
reqqty(020), "Req quantity
reqdate(010), "req date
ref_1(012), "Ref
*UNLOAD(025),
end of ty_item.
data : msg(240) type c, " Return Message
e_rec(8) type c, " Error Records Counter
rec_no(8) type c, " Records Number Indicator
s_rec(8) type c, " Successful Records Counter
t_rec(8) type c, " Total Records Counter
v_matnr like mara-matnr,
v_parvw type parvw.
data : gt_ft_sales type standard table of ty_gt_ft_sales with header line.
data : wa_gt_ft_sales type ty_gt_ft_sales,
wa_order_items_in like gt_order_items_in,
wa_gt_ft_sales1 type ty_gt_ft_sales,
wa_header type ty_header,
salesdocument like bapivbeln-vbeln.
selection block for EXCEL UPLOAD FILE
selection-screen begin of block b1 with frame title text-000.
parameters file type ibipparms-path obligatory.
selection-screen end of block b1.
*<<<<AT SELECTION-SCREEN ON VALUE-REQUEST FOR FILE .
at selection-screen on value-request for file .
perform getname.
form getname.
call function 'F4_FILENAME'
exporting
program_name = syst-cprog
dynpro_number = syst-dynnr
importing
file_name = file.
endform.
*TOP-OF-PAGE.
top-of-page.
skip 3.
format color col_heading inverse on.
write 40 text-001.
format color col_heading inverse off.
skip 1.
format color col_negative inverse on.
write :/ text-002, 13 sy-mandt , 104 text-003, 121 sy-uname,
/ text-004, 13 sy-datum , 104 text-005, 121 sy-uzeit.
format color col_negative inverse off.
skip 3.
*START-OF-SELECTION.
start-of-selection.
perform get_data.
perform bapi.
*end-of-page.
perform result.
form result.
t_rec = e_rec + s_rec.
skip 3.
format color col_total inverse on.
write: /38 text-007, t_rec.
format color col_total inverse off.
format color col_negative inverse on.
write: /38 text-008, e_rec.
format color col_negative inverse off.
format color col_total inverse on.
write: /38 text-009, s_rec.
format color col_total inverse off.
endform.
*& Form get_data
text
--> p1 text
<-- p2 text
form get_data .
call function 'WS_UPLOAD' "#EC *
exporting
filename = file
filetype = 'DAT'
tables
data_tab = gt_ft_sales
exceptions
conversion_error = 1
file_open_error = 2
file_read_error = 3
invalid_type = 4
no_batch = 5
unknown_error = 6
invalid_table_width = 7
gui_refuse_filetransfer = 8
customer_error = 9
no_authority = 10
others = 11.
if sy-subrc 0 .
message e000.
endif.
endform. " get_data
*& Form BAPI
form bapi .
loop at gt_ft_sales into wa_gt_ft_sales.
wa_gt_ft_sales1 = wa_gt_ft_sales.
at new partn_numb.
wa_header-doc_type = wa_gt_ft_sales1-doc_type..
wa_header-sales_org = wa_gt_ft_sales1-sales_org . "'0001'
wa_header-distr_chan = wa_gt_ft_sales1-distr_chan. "'01'
wa_header-division = wa_gt_ft_sales1-division. " '01'
wa_header-purch_no = wa_gt_ft_sales1-purch_no.
wa_header-req_date_h = wa_gt_ft_sales1-reqdate.
call function 'CONVERSION_EXIT_PARVW_INPUT'
exporting
input = wa_gt_ft_sales1-partn_role
importing
output = v_parvw.
wa_header-partn_role = v_parvw.
wa_header-partn_numb = wa_gt_ft_sales1-partn_numb.
wa_header-unload_pt = wa_gt_ft_sales1-unload_pt.
move-corresponding wa_header to gt_order_partners.
move-corresponding wa_header to gt_order_header_in.
append gt_order_header_in.
append gt_order_partners.
endat.
call function 'CONVERSION_EXIT_CCMAT_INPUT'
exporting
input = wa_gt_ft_sales1-material
importing
output = v_matnr.
gt_order_items_in-material = v_matnr .
gt_order_items_in-target_qty = wa_gt_ft_sales1-targetquantity . "'1000'
gt_order_items_in-req_qty = wa_gt_ft_sales1-reqqty.
gt_order_items_in-req_date = wa_gt_ft_sales1-reqdate.
*GT_ORDER_ITEMS_IN-BILL_DATE = wa_GT_FT_SALES1-REQDATE.
gt_order_items_in-ref_1 = wa_gt_ft_sales1-ref_1.
append gt_order_items_in.
clear : wa_gt_ft_sales1,wa_header.
at end of partn_numb.
call function 'BAPI_SALESORDER_CREATEFROMDAT1'
exporting
order_header_in = gt_order_header_in
WITHOUT_COMMIT = ' '
CONVERT_PARVW_AUART = 'X'
importing
salesdocument = salesdocument
SOLD_TO_PARTY =
SHIP_TO_PARTY =
BILLING_PARTY =
return = gt_return
tables
order_items_in = gt_order_items_in
order_partners = gt_order_partners.
ORDER_ITEMS_OUT =
ORDER_CFGS_REF =
ORDER_CFGS_INST =
ORDER_CFGS_PART_OF =
ORDER_CFGS_VALUE =
ORDER_CCARD =
ORDER_CFGS_BLOB =
ORDER_SCHEDULE_EX =
if gt_return-type eq 'E' .
e_rec = e_rec + 1.
read table gt_return with key id = 'V1'.
format color col_negative inverse on.
rec_no = e_rec + s_rec.
concatenate text-006 rec_no ':'
gt_return-message into msg separated by space .
condense msg.
write: / msg.
format color col_negative inverse off.
elseif gt_return-number = '000'.
s_rec = s_rec + 1.
format color col_positive inverse on.
msg = 'SUCCESS'.
condense msg.
write: / msg .
format color col_positive inverse off.
write :/ salesdocument, 'Has been created'.
perform commit_mm.
endif.
clear: gt_return[], msg.
endat.
endloop.
endform. " SLALE_UPLOAD_DATA
*& Form COMMIT_MM
text
--> p1 text
<-- p2 text
form commit_mm .
call function 'BAPI_TRANSACTION_COMMIT'
exporting
wait = 'X'
importing
return = gt_return1.
clear: gt_order_items_inhttp://].\"GT_ORDER_CONDITIONS_IN[.
endform. " COMMIT_MM
inthis pass re_doc field in header...
Edited by: Naresh kumar -
'*' in the recordset structure resulting no val's for fieldFixedLengths
'*' in one of the recordset structure resulting no values for fieldFixedLengths
Dear All, I have a strange (at least, strange to me) problem in file content conversion in sender file adapter.
I have Data type with following structures
DT_FLAT_IN
-Struc1 (0..1)
--FKEY
--FVAL
-Struc2 (0..1)
--FKEY
--FVAL
-Struc3 (0..1)
--FKEY
--FVAL
-Struc4 (0..Unbounded)
--FKEY
--FLD1
--FLD2
--FLD3
Flat File i get is like this
KEY1 1234567
KEY2 2343434
KEY345 XVD
102003171979SS^^
in the content conversion, i have 2 sets of parameters (this is FTP and ContentConv)
ignoreRecordsetName -> true
Struc1.fieldFixedLengths -> 8,12
Struc1.fieldNames -> FKEY,FVAL
Struc1.processConfiguration ->FromConfiguration
Struc1.keyFieldValue -> KEY1
Struc1.lastFieldsOptional -> YES
Struc1.keyFieldInStructure ->ignore
Struc1.endSeparator ->'nl'
Pretty much same for Struc2 and Struc3 but the struc4 has different set of parameters as this
has the separator instead of fixed length.
Struc4.fieldSeparator -> ^
Struc4.fieldNames -> FKEY,FLD1,FLD2,FLD3
Struc4.processConfiguration ->FromConfiguration
Struc4.keyFieldValue -> 1020
Struc4.lastFieldsOptional -> YES
Struc4.keyFieldInStructure ->ignore
Struc4.endSeparator ->'nl'
The problem is if I specify * in recordset structure field then i don't see any of the
Struc1, Struc2, Struc3 values in inbound message payload.
for example: Struc1,1,Struc2,1,Struc3,1,Struc4,*
or
Struc1,1,Struc2,*,Struc3,1,Struc4,1
If i change it to 1 then i see the values in inbound payload for everything in the file.
For example: Struc1,1,Struc2,1,Struc3,1,Struc4,1
I have gone through the blogs,SDN forum, SAP Help for parameters as well as google but i couldnt find
anything that solves this problem.
Please let me know what i am missing or is there any order in Parameter specifications?
I have added/removed parameters (Trial and error) but couldnt figured it out on my own.
Any help regarding this is appreciated.
Thanks in advance.Dear All,
Thanks for sharing your thoughts. After a long struggle, i was able to figure it out the problem and the solution may not be appropriate but at least working for me.
fixedFieldLengths was 8,12 but i have changed it to the length of the value... in my scenario, for example, the value is 'YES' - though the length will be 8 including spaces, i have changed it to 3 from 8.
Somehow, this worked and i am, now, able to use * for other structures.
Just in case, if anyone has the problem. -
Can we use Result from another query in Webi using Bex uery universe?
Hi,
Can we use Result from another query filter option in Webi to create a report using a Bex Query universe?
I need to create a report using two universes, one is Bex Query Universe and the other is Orcle universe. I have two queries, one is using Oracle universe; the other using Bex Query universe. I need to pass the Oracle data from the Oracle query to the Bex Query query to get the matched data from SAP Bex query.
I used Result from another query in the query filter panel for the query using Bex query universe. But I got an error saying that 'A filter contains a wrong value. you cannot run this query. (Error: WIS 00007). The data used in the filter on both sides are the same. they are char.
I have tested by using two queries from the same Bex query universe to see if the Result from another query filter option works. And I got the same error.
Has anyone run into the same issue and if this is possible and what should be the solution?
Thanks in advance!
Edited by: BO_Haiyan on Oct 6, 2010 3:47 PMIn that situation:
Create two queries : Oracle and BW query.
@ Report:
As you have to see result set from both the Dataproviders, correct? To achieve thise one must have common dimension objects to merge them at report and use Objects those are coming from both queries to use them in single Table/Report.
Unless you don't use Merge Dimensions, you don't get a chane to use both queries objects in single Table/Report. (It will give tooltip saying: You can't drop here -- Incompatable Objects)
In case, if you don't have common dimensions, change object definitions to Detail objects, for those required.
Hope it helps you.
Thank You!! -
Query on results from another query
Post Author: Duncan1980
CA Forum: Crystal Reports
Is it possible to query on the results from another query. I have a query that produces a list of document numbers. I want to use the output from that query as the filter criteria in a another query in the same Universe.
The output from the first query can be as much as 2000, so it would be very time consuming to cut and paste these into a filter.
Both reports are built, but can not figure out how to link the first report output to the filtering criteria on the second report. I
I am using business objects XI release 2 web intelligence 11.5.3.417 enterprise.Hi Vivek,
It was not directly solved but I applied alternate logic to over come the issue.
Here's what I did to overcome:
I used a sub query in place of the whole result from another query.
For Ex:
Dim1 inlist result from another query1
I made it as
Dim1 inlist (Dim0)
where Conditions.
Here Dim0 is the object which we use for Result from another query and Conditions will be the necessary filter conditions to arrive proper Dim0. Make sure proper context is formed for the sub query.
Even though it resolved my problem, It introduces an new issue. It causes increase in query run time when huge set of data is returned from sub query.
Please let me know if i haven't explained clearly.
Hi Aris_BO,
Sorry for not responding earlier. The logic would probably make more queries null & not null. Thats why I was not advised to use it.
Thanks
LN
Maybe you are looking for
-
Camera Raw 6.7 update failed
I tried to update my camera raw to 6.7 for my CS5, but halfway through it keep telling me to close adobe bridge. Its not open. I even tried opening it and closing it and still I get the same message ever time I hit the continue button in the update w
-
Errorcode 25600 during adcfgclone.pl
Hi, I'm configuring a clone on and RHEL 5 environment. When I run adcfgclone.pl on the dbTier, it's exiting with an error at 70%. Extracts from the logs are as follows: ApplyDBTier log -------------------ADX Database Utility Finished--------------- R
-
Using Form Settings In A SDK Form
Hi I am creating a form using SDK and one of the requirements for it if possible is to utilize the Business One Form Settings window with the form so that columns contained inside of a matrix, which is located on the form can be made visible/invisibl
-
Hi, Issue - Web service not responding when we deploye the .ear file in prod instance. Same web service working fine in test instance. We are using Oracle Enterprise Manager 10g server. It is urgent for us. Thanks,
-
X2200 iLom and Watchdog timer...
I have setup our x2200 and have the iLom working great for most things. I have two specific problems going on with it though.... First, sometimes the iLom just stops responding, I can't SSH, use the WebGUI or anything. I'm using the same mgmt. port f