Pass Input Parameter to MBO
I have a SAP BAPI (Y_GET_APPR_LIST), which takes an import paramter (USER) and returns a structure. I have created the MBO (GetApprList)
I have also generated a CREATE operation (setGetList) with the same input and out parameters.
I have generated the code for BlackBerry, imported the code into Eclipse.
My question is how do I pass the the input parameter and get the result set back in Eclipse.
GetApprList obj = new GetApprList();
obj.setGetListUSER("XXXXXX");
Hi please make sure you have done these steps before generating the code.
1.create the sync parameter and map that sync parameter to the your list field.
2. Please link this sync parameter to the load parameter(this is your input parameter ).
3. Generate your code.
in the generation code you can find the yourListSyncParameter Class.
Now in your blackberry application before calling the appDB.synchronize() method.
YourListSynchronizationParameters synParm=YourList.getSynchronizationParameters();
synParm.setSyncValue("value");
synParm.save();
appDB.synchronize("syncGroup");
Regards,
Ram
Similar Messages
-
Passing input parameter to a oData service
Hi,
I am trying to develop a simple application using sapui5 and data comes from OData service. I am trying to pass input parameter to OData service in sapui5 Application.
how i do it ...
please help me..............................I too have a such requirement, any help ?
Thanks. -
Pass Input Parameter With Blank To SSIS Get Strange Result
Hi! I stuck for a while when executing SSIS from stored procedure with input parameter. My input value is not consistent with output one. If I pass value with blank , SSIS seems gets second part. For example , if I pass "CALL FROM SP", SSIS get
"FROM" only.
I use Execute SQL Task to store input parameter. Here is the SSIS snapshot.
And here is the sp snippet
DECLARE @Path VARCHAR(200),
@Cmd VARCHAR(4000),
@ReturnCode INT,
@QUERY_STRING VARCHAR(70),
@BATCH_NO VARCHAR(14)
SELECT @Path = 'xxxxxx'
SELECT @QUERY_STRING = 'CALL FROM SP'
--BatchNo = YYYYMMDDHHMMSS
SELECT @BATCH_NO = CONVERT(VARCHAR(10),GETDATE(),112) + REPLACE(CONVERT(VARCHAR(8),GETDATE(),108),':','')
SELECT @Cmd = 'DTexec /FILE "' + @Path + 'Package1.dtsx" /MAXCONCURRENT 1 /CHECKPOINTING OFF /REPORTING EW ' + '/Decrypt ALCM '
+ ' /SET \Package.Variables[User::BATCH_NO].Properties[Value];' + @BATCH_NO
+ ' /SET \Package.Variables[User::QUERY_STRING].Properties[Value];' + @QUERY_STRING
My test are
input parameter
write to TESTTB correctly ?
any error?
execute SSIS in design mode
CALL FROM SSIS
YES
execute SSIS by sp
CALL FROM SP
NO
Option "FROM" is not valid.
execute SSIS by sp
CALL_FROM_SP
YES
Anyone could give me some hint ?
Thank you so much!!Hi Nick,
It occurs because an argument of the DTExec commands must be enclosed in quotation marks if it contains a space. From the dtexe (SSIS Tool): Syntax Rules section of the
dtexec Utility (SSIS Tool) document, we can see:
All options must start with a slash (/) or a minus sign (-). The options that are shown here start with a slash (/), but the minus sign (-) can be substituted.
An argument must be enclosed in quotation marks if it contains a space. If the argument is not enclosed in quotation marks, the argument cannot contain white space.
Doubled quotation marks within quoted strings represent escaped single quotation marks.
Options and arguments are not case-sensitive, except for passwords.
So, you need to make the value of the variable @QUERY_STRING within double quotes in the value of the variable @Cmd or remove the space within the @QUERY_STRING value.
Regards,
Mike Yin
TechNet Community Support -
How to pass input parameter (parameterized mapping) to java mapping program
Hello
I have a question about the parameterized mapping with Java (PI 7.1).
In the operation mapping (using Java-class) I defined a inputer parameter (string). I think I am supposed to retrieved the value using:
arg0.getInputParameters().getString("myInputParameterName");
where arg0 is the TransformationInput object.
However I am not able to get the value, I got runtime exception saying the inputer parameter doesn't exit.
Then I figured out maybe I need to bind the OM input parameter to Java mapping parameter, just like in case of message mapping, you need to bind OM parameter to MM parameter. However there is no way to define input parameter for the java mapping program.
Anybody has done java mapping with parameterized mapping?
Anybody can give any hint for this?
Thanks
JaysonInputParameters params = container.getInputParameters();
DynamicConfiguration conf = (DynamicConfiguration) params.getValue(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File", "Directory");
http://help.sap.com/saphelp_nwpi71/helpdata/en/43/03612cdecc6e76e10000000a422035/content.htm
Edited by: Anand on Dec 10, 2008 4:13 PM -
Passing input parameter to User Defined Procedures in ODI
Hi
I have to develop a procedure with an update query as follows
Update Rec_Count set status as 'Y' where TableName = 'Name of the table'
Here the 'name of the table' should be sent as input parameter while executing the package and this has 9 values.
Kindly help me resolve this issue.
ThanksHi,
Create a variable
eg :- VarName
and your query should be
Update Rec_Count set status as 'Y' where TableName = '#VarName'
Steps in package:
step 1 :-
refresh the variable ,
or assign the variable while executing the package.
Step 2
Your procedure
This will take the variable value dynamically while executing
Regards,
Rathish
Edited by: Rathish on Aug 18, 2009 3:38 PM -
Passing input parameter to an standard search help
Hi all.
I have the following code into my Z report:
PARAMETERS:
p_bukrs TYPE t8jv-bukrs OBLIGATORY,
p_vname TYPE t8jv-vname OBLIGATORY MATCHCODE OBJECT h_t8jv.
The SHLP H_T8JV has the field BUKRS as an import parameter. When the user executes the SHLP (press F4), I would like for it to reflect the value indicated by the user into the selection parameter P_BUKRS.
How can I do this?
Regards.
Gregory.I guess you want to allow F4 to both parameters p_bukrs and p_vname, and both values have to be passed to the search help forth and back?
I also guess that vname is the first parameter of this search help?
In that case, you must not use MATCHCODE OBJECT at all, because it will link only one field at a time.
Instead, you must find out a structure (or create it) that have these 2 fields, each having the H_T8JV search help assigned (with correct parameter assignment too), and the selection screen parameters must refer to this structure. -
How do I pass my input parameters from a query.jsp page to a static NamedQuery ???
@NamedQuery(name = "Patient.findByPatName", query = "SELECT p FROM Patient p WHERE p.patfname = :patfname and p.patlname = :patlname")my query.jsp would then have to inputText fields 'patfname' and 'patlname'
Generally I would like to add a query page to a CRUD application to give the user conrtol over the data that are being retrieved.I have this working code; it may be helpful for other java beginners
public class Login extends HttpServlet {
private Object user;
protected void processRequest(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException {
response.setContentType("text/html;charset=UTF-8");
HttpSession session = request.getSession(true);
PrintWriter out = response.getWriter();
out.println("<html>");
out.println("<head>");
// get user inputs
String uid = request.getParameter("user");
String pwd = request.getParameter("password");
String grp = request.getParameter("office");
// check details entered not null
out.println("<title>Login</title>");
if (uid == null || pwd == null){
// prompt the user for their username and password
out.println("<h1>Enter User Name And Password</h1>");
} else{
Connection con = null;
PreparedStatement psm = null;
ResultSet rs = null;
try{
Class.forName("com.mysql.jdbc.Driver");
con = DriverManager.getConnection("jdbc:mysql://localhost:3306/echo6","","");
psm = con.prepareStatement("select password, user from user where user = ?");
psm.setString(1,uid);
rs = psm.executeQuery();
if(rs.next()){
String dbuid = rs.getString("user");
session.setAttribute("user",dbuid);
String dbpwd = rs.getString("password");
if(pwd.equals(dbpwd))
response.sendRedirect("index.jsp");
else
out.println("<style type=\"text/css\" title=\"currentStyle\" media=\"screen\">");
out.println("@import \""+uid+".css\"; ");
out.println("</style>");
out.println("</head>");
out.println("<body>");
out.println("<div id=\"hide\">");
out.println("<h1>"+uid+" you entered the incorrect password</h1>");
out.println("</div>");
} else
out.println("<h1>Username Incorrect</h1>");
} catch(Exception e){
out.println("<h1>Error connecting to database</h1><br/>"+e.toString());
} finally{
try{
if(rs != null)
rs.close();
if(psm != null)
psm.close();
if(rs != null)
rs.close();
} catch(Exception e){
out.println("<body>");
out.println("<html>");
out.flush();
out.close();
protected void doGet(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException {
processRequest(request, response);
protected void doPost(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException {
processRequest(request, response);
}as far as I understand, this has nothing to do with persistence, though.
The wizard creates a Patient.java, PatientController.java and PatientConverter.java.
Do I place my code for into any of these or do I write a new class like Query.java similar to the one above with the use of 'em'? -
Passing multiple values to a single input parameter
Hi folks,
I have a Microstrategy query successfully passing input parameter to a calculation view. For example I can pass a movement type to a material movements calculation view input parameter. However if I try to pick more than one movement type the query then fails;
Generated SQL that works looks like this;
select
sum(a11.TOTALQUANTITY) WJXBFS1
from
"_SYS_BIC"."MyPackage/CA_TEST_PASS_PARAMETER"
('PLACEHOLDER' = ('$$MoveType$$', '101')
a11
When choosing more than one value in Microstrategy the SQL now fails and looks like this;
select
sum(a11.TOTALQUANTITY) WJXBFS1
from
"_SYS_BIC"."MyPackage/CA_TEST_PASS_PARAMETER"
('PLACEHOLDER' = ('$$MoveType$$', '101'),
'PLACEHOLDER' = ('$$MoveType$$', '103'))
a11
If I cut and paste the SQL and run directly in HANA studio the error is;
Could not execute 'select sum(a11.TOTALQUANTITY) WJXBFS1 from "_SYS_BIC"."MyPackage/CA_TEST_PASS_PARAMETER" ...' in 66 ms 361 µs .
SAP DBTech JDBC: [2048]: column store error: search parameter error: [2018] A received argument has an invalid value;TABLE/VIEW parameter: ( 'PLACEHOLDER'='$$MoveType$$, 103') not supported
Is it possible to pass multiple values in a single parameter? I'm using SP67 for this test.
Thanks,
-PatrickRavi, also to answer one of your questions about how this will work in Microstrategy; I just heard back from my Microstrategy developer and he is trying MSTR Freeform SQL query with syntax like this;
select (sumPAR_TEST.TOTALQUANTITY TOTALQUANTITY
from "_SYS_BIC"."MyPackage/CA_TEST_PASS_PARAMETER"
('PLACEHOLDER' =('$$MoveType$$', '[Movement Type]')) PAR_TEST
In this example [Movement Type] is the microstrategy prompt. Unfortunately though it translates like this which is missing extra single quotes around each value;
select sum(PAR_TEST.TOTALQUANTITY) TOTALQUANTITY
from "_SYS_BIC"."development.pr1959/CA_TEST_PASS_PARAMETER"
('PLACEHOLDER' = ('$$MoveType$$', ''101', '102'')) PAR_TEST
instead of what we need which is;
('PLACEHOLDER' = ('$$MoveType$$', '''101'', ''102''')) PAR_TEST
So at this point we are not sure if this will be possible or not.
-Patrick -
How to pass input value to the IN parameter in a function
Hi ,
I'm new to pl/sql programming.
The below function is used inside a package and the package is invoked in visual studio.
The function uses 2 input parameters.
Out of which 'in_report_parameter_id' value comes thru job processor service 's job request.
The second IN paramter values are hard coded in the function.
I'm not able to understand this.
If the values are hard coded , how to make sure that only the hard coded values are the right ones?
Please anyone could explain to me?
I really dont have good idea about how to pass INPUT parameter to the functions or procedure
Is there any nice document which could give me good understanding about what are the ways or types we could pass values to the input parameter in subprograms?
thanks in advance.
CREATE OR REPLACE FUNCTION get_class_text_str
in_report_parameter_id IN NUMBER,
in_which IN VARCHAR2 DEFAULT 'SELECT'
RETURN VARCHAR2
IS
end_text VARCHAR2 (50) := '';
my_class_text_str VARCHAR2(10000) := '';
my_class_value_str VARCHAR2(10000) := '';
CURSOR class_text(c_1_text VARCHAR2, c_2_text VARCHAR2) IS
SELECT c_1_text || report_parameters.report_parameter_value
|| c_2_text
|| report_parameters.report_parameter_value
|| '" '
FROM report_parameters
WHERE report_parameters.report_parameter_id = 3690
AND report_parameters.report_parameter_group = 'CLASS'
AND report_parameters.report_parameter_name = 'CLASS'
GROUP BY report_parameters.report_parameter_value
ORDER BY CAST(report_parameters.report_parameter_value AS NUMBER);
BEGIN
IF (in_which = 'SUM') THEN
OPEN class_text ( 'SUM(NVL("Class ', '", 0)) "Class ' );
ELSIF (in_which = 'PERC')THEN
OPEN class_text ( 'ROUND((("Class ', '" / "Total") * 100), 2) "Class ' );
end_text := ', DECODE("Total", -1, 0, 100) "Total" ';
ELSE
OPEN class_text ( 'SUM(DECODE(bin_id, ', ', bin_value, 0)) "Class ' );
END IF;
LOOP
FETCH class_text INTO my_class_value_str;
EXIT WHEN class_text%NOTFOUND;
my_class_text_str := my_class_text_str || ', ' || my_class_value_str;
END LOOP;
CLOSE class_text;
my_class_text_str := my_class_text_str || end_text;
RETURN my_class_text_str;
END get_class_text_str;
/Edited by: user10641405 on Nov 19, 2009 8:16 AM
Edited by: user10641405 on Nov 19, 2009 8:30 AMThis is not a design I would use, but should work if coded properly. I would probably build a reference cursor query as text and use one open fetch and close.
You have 2 input parameters, in_report_parameter_id and in_which. I could not find where in_report_parameter_id was used in the program, but the value passed in for in_which is being used in IF logic to decide how to open the cursor. After the cursor is open rows are being fetched and eventually the cursor is closed.
The values in_which are compared to are hard-coded. It is the programmer's job to make sure the values listed are the right values and the actions taken are also correct. Your program is assuming that if the first 2 values are not encountered the third one listed is the one you want.
To pass input values to a procedure you merely provide the values as a literal or variable in the call, something like
whatever := get_class_text_str(1,'SELECT'); -
Hi,
How can i pass input parameter dynamically.
I need pass column called valid_no as a input parameter(only one input parameter)
Based up on these i update the table called wvfl_acct and do other validations.
Update table name set column1 = 1 where valid_no = Input parameter.(how to present the variable here in input parameter)
Need to use EXCUTE IMMEDITE also fot this.
Pls Help..
Thanks visit my thread.Here is my code
create or replace procedure (valid_no IN number) as
Begin
select valid_no from table2 where valid_no = ?(How to
give the input parameter here)
Update ----
end;
My valid_no comes from diferent work flows.so i need
it to take as dynamicFirstly, don't name your parameters the same as your table columns otherwise it'll confuse things.
i.e. it's more readable like:
create or replace procedure (p_valid_no IN number) as
v_valid_no number;
Begin
select valid_no
into v_valid_no
from table2
where valid_no = p_valid_no;
Update ----
end;Although you would be more likely to select something other than valid_no from the query as you already know that from your input parameter.
Now if you have multiple input values to pass in, that's a different matter. -
Multible MBO's with input parameter's how to pass them?
Hello gurus i'm currently working on native app that based on BAPI MBO's and each MBO takes input parameter and return some values
at the first MBO i made the input parameter is personalization key but after adding a second MBO and make the same to the second MBO when i generated the code and passing the PK values only for the first MBO i got an error
any help on how to pass input parameters for native app that based on BAPI for multiple MBO and i will not pass all the parameters at the same time depend on the screen that i'm in i will call MBO
thanks in advanceSteps to do a sync from MBO is given below (android native app):
Create MBO and PK.
Map MBO load parameter with PK.
Create Second MBO and another PK (or use existing PK if the input parameter of first MBO is same as second MBO).
Map Second MBO load parameter with second PK.
Sample native code (android):
//Assing Values to PK
PersonalizationParameters param = CustomersDB.getPersonalizationParameters();
param.setPK_CustomerInput("1001");
param.save();
CustomersDB.subscribe();
//Make a blocking synchronize call to Unwired Server to pull in all MBO data
CustomersDB.synchronize();
//Finall is the query generated by SUP to get the data from the table Customers.
//Customers is the MBO name in SUP and table name in Device DB
Customers.findAll()
Give the steps you performed with relevant screen shots to help you further.
More info, Developing SAP Android Mobile app from scratch - Part 4
Midhun VP -
How can I pass dynamic value as a user input parameter in discoverer?
Hi,
I have a requirement for a discoverer report like this: The report will display only details for Suppliers that have expired (or soon to be) Insurance details. That is the Expiration Date is less than or equal to the day the report is being run plus any days specified in the Number of Days in the Future Parameter.
The sample code as:
SELECT s.segment1 vendor_number
,s.vendor_name
,flv1.meaning classification
,pca.certificate_number
,pca.certifying_agency
,pca.expiration_date
,flv2.meaning status
FROM ap_suppliers s
,pos_bus_class_attr pca
,fnd_lookup_values flv1
,fnd_lookup_values flv2
WHERE pca.vendor_id = s.vendor_id
AND flv1.lookup_code = pca.lookup_code
AND flv1.lookup_type = pca.lookup_type
AND flv2.lookup_code = pca.class_status
AND flv2.lookup_type = 'POS_BUS_CLASS_STATUSES'
AND pca.expiration_date <= trunc(sysdate) + <No. of Days in the Future>
order by pca.expiration_date asc
Now the parameter is Number of Days in the Future (Enter the number days in the future to extract the data. This will default to 0).
Is it possible in discoverer to do so as in query i do that like a condition as pca.expiration_date <= trunc(sysdate) + <No. of Days in the Future>.
How can I pass <No. of Days in the Future> as a user input parameter in discoverer?
Please help.Hi,
All you need to do is to create the condition in the discoverer instead of in the query.
Create a custom folder containing the following sq (note that i removed the condition)l:
SELECT s.segment1 vendor_number
,s.vendor_name
,flv1.meaning classification
,pca.certificate_number
,pca.certifying_agency
,pca.expiration_date
,flv2.meaning status
FROM ap_suppliers s
,pos_bus_class_attr pca
,fnd_lookup_values flv1
,fnd_lookup_values flv2
WHERE pca.vendor_id = s.vendor_id
AND flv1.lookup_code = pca.lookup_code
AND flv1.lookup_type = pca.lookup_type
AND flv2.lookup_code = pca.class_status
AND flv2.lookup_type = 'POS_BUS_CLASS_STATUSES'
Then create a discoverer report using this folder using all fields.
Create a new calculation as (use this exact syntax):
Sysdate + :No_of_Days_in_the_Future
Create a new condition:
pca.expiration_date <= <your calculation>
To complete it add a sort as you did in the SQL.
That's it.
Tamir -
Passing the same input parameter twise in execute sql task
Hi All, I want to insert some values to 3 different tables in sql server. Execute sql task is used to populate three tables. Here is the sql statement.
DECLARE @Dt AS DATE
SET @Dt = ?
INSERT INTO TABLE1 SELECT ?, COL2, COL3 FROM TABLE_A
INSERT INTO TABLE2 SELECT ?, COL2, COL3 FROM TABLE_B
Input parameter is mapped as follows :
Variable name : User::EffectiveDate
Direction : Input Data Type :
Date Parameter name :0
Parameter size :-1
User::EffectiveDate is datetime variable.
When the package is executed, it throws an error.
[Execute SQL Task] Error: Executing the query " " failed with the following error: "Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.". Possible failure reasons: Problems
with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly. I am not sure what I am doing wrong here. If anyone could point me to the right direction, I really appreciate.
Thanks
shamenTo expand on the other answers.
Your SQL command
DECLARE @Dt AS DATE
SET @Dt = ?
INSERT INTO TABLE1 SELECT ?, COL2, COL3 FROM TABLE_A
INSERT INTO TABLE2 SELECT ?, COL2, COL3 FROM TABLE_B
It using 3 input variables. I assume you didn't pass 3 variables and you want @DT to be column 1 in each. In that case you would use:
DECLARE @Dt AS DATE
SET @Dt = ?
INSERT INTO TABLE1 SELECT @Dt, COL2, COL3 FROM TABLE_A
INSERT INTO TABLE2 SELECT @Dt, COL2, COL3 FROM TABLE_B -
Pass multiple values as single input parameter into pipelined function
Hi all,
My need is to pass multiple values as single input parameter into pipelined function.
For example - "2" and "3" are values of input parameter "t":
with data as (
select 1 as t from dual union all
select 2 as t from dual union all
select 3 as t from dual union all
select 4 as t from dual union all
select 5 as t from dual
select * from data where t in (2,3)Is it possible at all?Not exactly sure, but usually 'multiple values'+'pipelined function' = some IN-LIST related approach?
See:
SQL> create table data as
2 select 1 as t from dual union all
3 select 2 as t from dual union all
4 select 3 as t from dual union all
5 select 4 as t from dual union all
6 select 5 as t from dual;
Table created.
SQL> --
SQL> CREATE OR REPLACE FUNCTION in_list (p_in_list IN VARCHAR2)
2 RETURN sys.odcivarchar2list PIPELINED
3 AS
4 l_text VARCHAR2(32767) := p_in_list || ',';
5 l_idx NUMBER;
6 BEGIN
7 LOOP
8 l_idx := INSTR(l_text, ',');
9 EXIT WHEN NVL(l_idx, 0) = 0;
10 PIPE ROW (TRIM(SUBSTR(l_text, 1, l_idx - 1)));
11 l_text := SUBSTR(l_text, l_idx + 1);
12 END LOOP;
13
14 RETURN;
15 END;
16 /
Function created.
SQL> --
SQL> select *
2 from data
3 where t in ( select *
4 from table(in_list('1,2'))
5 );
T
1
2
2 rows selected.http://www.oracle-base.com/articles/misc/dynamic-in-lists.php
or
http://tkyte.blogspot.nl/2006/06/varying-in-lists.html -
How to pass process flow input parameter to unix script external process
Hi,
I'm trying to pass a process flow input paramter (string) to an external process which is a unix script. I've been working on this for the last 2 days but can't get it to work. Here is the design. I have a process flow with 3 maps that create a file in the unix file system. I have a suffix, which is an input parameter to the process flow, that will need to be passed to the unix script to rename the file appending the suffix to the filename. I've tried different things and nothing works for me. Has anyone done something similar in OWB?
Thanks much!I tried using useBean inside the Jsp for this.
But following error comes:
OracleJSP error: oracle.jsp.parse.JavaCodeException: Line # 13, oracle.jsp.parse.JspParseTagExpression@102e37e
Error: Java code in jsp source files is not allowed in ojsp.next mode.
Please explain why?
How can set POST request params when calling to an external servlet?
Maybe you are looking for
-
Files Will Not Open in Contribute
This topic has been discussed breifly but not with my specific combinations of software so if anyone has had, fixed or knows this issue is a dead end I would appreciate your input. Our office uses Contribute 3 and is in the process of converting ever
-
Dear Guru, I want to no from which table I can get the data of Pick Qty. When I go to VL02N Pick Qty, their I can find Structure : - LIPSD Feild : - PIKMG. But when I am searching in PIKGM I am not getting any data. So, will u help me to get the ta
-
Hello Everyone I have scenario, where in ECC is sending PAYEXT IDOC's to PI, and PI collects the IDOC's. As soon as summary IDOC(EUPEXR) is recieved in PI the collection of PAYEXT stops and we have a workflow starting in ECC. This is accomplished by
-
Hello , when i login my account everything is grey , even ECHO sound sercive is offline (evrything offline) , when my friend log in his accout evrything is working . What should i do ? can anyone say skipe support @mail or smth ?
-
Whats new in Firefox 5.0 says that Do-Not-Track Header has been moved to increase the discoverability.. Does this mean that there would not be option to enable do-not-track anymore? Does this sacrifice privacy? or also it means that you will be alway