GetList Parameter in SyncBO type T01 or T51

Hi all,
This is Abap code for my GetList :
function zpm_po_getlist .
""Interfaccia locale:
*"  EXPORTING
*"     VALUE(RETURN) TYPE  BAPIRET2
*"  TABLES
*"      ZBAPIEKKO STRUCTURE  ZBAPIEKKO
  tables: ekko,lfa1,zutenti.
break-point.
SELECT * FROM zutenti WHERE nome EQ uname.
    select * from ekko where bstyp = 'F'    and
                             bukrs = '1000' and
                              submi = zutenti-project AND
                             loekz = space.
      select single * from lfa1 where lifnr eq ekko-lifnr.
      select  single * from zutenti where project = ekko-submi.
      zbapiekko-uname = zutenti-nome.
      zbapiekko-po_number   = ekko-ebeln.
      zbapiekko-created_on  = ekko-aedat.
      zbapiekko-vendor      = ekko-lifnr.
      zbapiekko-coll_no     = ekko-submi.
      zbapiekko-vend_name   = lfa1-name1.
      zbapiekko-doc_date    = ekko-bedat.
      collect zbapiekko.
    endselect.
ENDSELECT.
  commit work and wait.
endfunction.
The question is:
is possible add a "username" parameter   in this bapi wrapper for to filter the data in the backend system and to return (of the backend system) only data of the value in the "username"?

Hello Rocco,
there is one more way to achieve this functionality,
during syncbo creation ,
in the case of getlist function module ,
add one more import parameter .(suppose username is the import parameter),
in the import tab , against this fieldname(username) , create one value id. after the creation of this syncbo, you will have to set default value for this value id that u have created.
here u will have to set SY-UNAME as default value.
   at the time of synchronization , this import parameter value contains the user from which u have started synchronization. (this value u can use as filter in the abap code).
                                    Regards
                                      Kishor Gopinathan

Similar Messages

  • About SyncBO type T51

    Hi, i´m doing a SyncBO of type T51... I create a field ME_ACTION in the table, and i enable the SyncBO and restart the replicator. But when I execute de application, not appear the data... Why? Have i do developer anything more?
    The code in Bapi Get List is:
    DATA: lds_return LIKE bapireturn1.
    SELECT * FROM Z1CUSTOMER INTO CORRESPONDING FIELDS OF TABLE T_TOP.
    The code work fine, because i have another syncbo of type T01 and work perfectly...
    Thanks,

    Hi Victor,
    well, where is the problem exactly!
    The problemis the process of T51 - as I said in a previous post, T51 is not the straight forward one.
    First of all the complete handling is different. In T01 it is like: give me all data for this BO, then take one after the other and do its replication to the middleware.
    In T51 you have to write your own code to do the initial replication. When you do a select * I suppose you get some items. Can be 10, can bie several million, no problem. The problem is: this getlist is not really called in T51 - as I said: you have to create your own Initial replicator and you have to store the keys of the SyncBO - the same list you get while calling the getlist handler - via MEREP_DELTABO in the table MEREP_DELTABO in the middleware. From there a process is started - you have defined this in table MEMSD_DEP I think - and this process calls the GETDETAIL handler for every sindle ID in the table and stores the information in MEREP_207.
    Well, then there is the problem with the delta handlers. For delta handling you have to register the delta handler in FIBF and there you have to make sure that each and every key from the changed item get replicated into MEREP_DELTABO the same way as with the initial replication.
    You have the note form one of the previous posts. There the process is exactly described. The getlist handlöer you have defined does not really help you in this case - even it is necessary and correct.
    So to answer your question again. Yes, you need to do some more development.
    Hope this helps you to do a step forward.
    Regards,
    Oliver

  • Cannot assign an empty string to a parameter with JDBC type VARCHAR

    Hi,
    I am seeing the aforementioned error in the logs. I am guessing its happening whenever I am starting an agent instance in PCo. Can somebody explain whats going on?
    Regards,
    Chanti.
    Heres the complete detail from logs -
    Log Record Details   
    Message: Unable to retreive path for , com.sap.sql.log.OpenSQLException: Failed to set the parameter 1 of the statement >>SELECT ID, PARENTID, FULLPATH, CREATED, CREATEDBY, MODIFIED, MODIFIEDBY, REMOTEPATH, CHECKEDOUTBY FROM XMII_PATHS WHERE FULLPATH =  ?  <<: Cannot assign an empty string to a parameter with JDBC type >>VARCHAR<<.
    Date: 2010-03-12
    Time: 11:32:37:435
    Category: com.sap.xmii.system.FileManager
    Location: com.sap.xmii.system.FileManager
    Application: sap.com/xappsxmiiear

    Sounds like a UI browsing bug (when no path is selected from a catalog tree folder browser) - I would suggest logging a support ticket so that it can be addressed.

  • Switch datetime type parameter to date type

    Hello expert,
            I created crystal report by oracle procedure directly ,   but a date parameter for this procedure is mapped to datatime type parameter in crystal report, its format is dd/mm/yyyy hh:mm:ss.  instead of this datatime format, I need date format as "dd/mm/yyyy", but I found I can't change data type for this procedure parameter in crystal report.  I know I can't choose data type for procedure parameter if I use procedure in  command.  but over here, I have to use this procedure directly instead of using command as data connection for this report.  Can I change this procedure parameter for datetime type to date type in the crystal report. Apprecaite very much.

    You can get crystal to treat the datetime field as a date field by addressing it as 
    date({datetime})
    when ever you refer to it. You may even be able to address your parameter as
    date({?datetimeparameter})
    Debi

  • Error :  parameter "REPORT_DATA_BINDING" of type "OL" occurs with index 0

    Hi,
        We tried to execute a Web Report by clicking on Push button by generating a Javascript code using wizard in Javascript Web Item. Here is the full description of the error,
    com.sap.ip.bi.webapplications.runtime.controller.MessageException: The parameter "REPORT_DATA_BINDING" of type "OL" occurs with index 0:
    <parameterList>
    <param name="REPORT_DATA_BINDING" value="">  
    <param name="DATA_PROVIDER_REF" value="DP_1"/> 
    </param>
    </parameterList>     
    com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    Caused by: com.sap.ip.bi.base.exception.BIBaseRuntimeException:
    The parameter "REPORT_DATA_BINDING" of type "OL" occurs with index 0:
    <parameterList> 
    <param name="REPORT_DATA_BINDING" value="">   
    <param name="DATA_PROVIDER_REF" value="DP_1"/>  </param></parameterList>
    We suspect the error is with the SAP generated Javascript code, if anyone facing the same issue and solved the problem please share your information.
    Thanks,
    Vijay

    To add more to what Vijay has described, we are trying out the following.
    We have a Web template that has 4 drop downs, an execute button and a report item. Based on the values in the drop down, we would like to set the report dynamically in the report item.
    We have tried this using the Command Instructions and it has worked successfully. If the execute button has a command instruction to set the report in the report item at runtime, this works perfectly. If we replace the command instruction with a Javascrip generated by the wizard, we get the error described by Vijay.
    From what we could gather, the addParameter and setChildList set of Javascript APIs are generated correctly to build the hierarchy as described by the command instructions. Unfortunately at one level that has the REPORT_DATA_BINDING node, the generated Javascript results in the following
    <param name="REPORT_DATA_BINDING" value="">
    whereas SAP requires the following
    <param name="REPORT_DATA_BINDING" value="" index="1">
    As this is all generated by the Javascript Wizard, we feel it is a bug.
    It would be great if somebody can try this out on their system (We are using SP11) to indicate it its a consistent problem or something that we are only facing.
    Please let us know if you would like more information.

  • Can't see RETURN parameter in SyncBO

    Hi
    I have made a mobile application with smartsync, SyncBo type U01. I would like to show the error messages (that I can se when I test the BAPI wrapper) in the mobile application. I can't se any info about the RETURN type BAPIRET2 when I am mapping the datatypes in the SyncBO.
    Is there a way to do this?
    Best Regards
    Morten

    hello morten.
    the field defined in the BAPI are only the fields that
    you can map into your SyncBo.
    if you want to get the information of the return text
    (execution result from BAPIRET2), i think the MW will
    send you this info thru a certain message types in the
    client.
    for any technical errors which hindered the synchronizer
    to process the messages,  a MessageReply message is sent
    from the MW. if your BAPI returned an error or
    successfully updated the updates, it will be in the form
    of a SyncReply.
    your application should be implementing a
    MessageReplyObserver and SyncReplyObserver, then register
    them into the framework thru the InboxNotifier. your
    observers will be notified on every synchronization.
    please refer to javadocs on the details of this interfaces.
    regards
    jg

  • Procedure expects parameter '@statement' of type 'ntext/nchar/nvarchar'."

    Hi,
    When i executed the following query i am getting following error "Msg 214, Level 16, State 2, Procedure sp_executesql, Line 1
    Procedure expects parameter '@statement' of type 'ntext/nchar/nvarchar'."
    I have to store value in @EndDate variable.
    Please advise
    Declare @SQL varchar(max)
    Declare @Prd varchar(2)
    Declare @Year varchar(4)
    Declare @Wk varchar(2)
    Declare @EndDate  varchar(100)
    Declare @EndDate1  varchar(100)
    select  @Prd = RIGHT('0' + cast(AS_OF_PRD AS varchar(2)),2),
            @Year = AS_OF_YR,
            @Wk = RIGHT('0' + cast(AS_OF_WK AS varchar(2)),2)
      from SCP_HEADER
      set @SQL = 'SELECT @EndDate = WK ' + @Wk +'_END_DATE  from dbo.SCP_CAL_YEAR where CAL_YR =' + @Year
    execute SP_EXECUTESQL @SQL,N'@EndDate varchar(100) OUTPUT',@EndDate OUTPUT
      print @EndDate
    Regards,
    Amit

    Hallo Amit,
    the bug is here
    Declare @SQL nvarchar(4000)
    set @SQL = N'SELECT @EndDate = WK ' + @Wk +'_END_DATE  from dbo.SCP_CAL_YEAR where CAL_YR =' + @Year
    BTW: I'm wondering why you concatenate the SQL String but didn't put them as variables to sp_executeSQL
    Exactly that's one of the essentials of sp_executeSQL
    http://msdn.microsoft.com/en-us/library/aa933299(v=sql.80).aspx
    Uwe Ricken
    MCITP Database Administrator 2005
    MCITP Database Administrator 2008
    MCITS Microsoft SQL Server 2008, Database Development
    db Berater GmbH
    http://www-db-berater.de

  • How to execute a procedure if out parameter is table type

    Hi,
    I need to execute a procedure, output parameter of the procedure is table type.
    Oracle version I am using is 9.2.0.8 . I am using SQL*Plus
    Procedure declaration
    PROCEDURE current_open_cycle (p_ban IN repl_cust2.billing_account.ban%TYPE,
    v_bill_seq_rec OUT bill_seq_table) ;
    Table type declaration
    TYPE bill_seq_table IS
    TABLE OF bill_seq_rectype INDEX BY BINARY_INTEGER ;
    TYPE bill_seq_rectype IS RECORD (v_cycle_run_year repl_cust2.bill.cycle_run_year%TYPE,
    v_cycle_run_month repl_cust2.bill.cycle_run_month%TYPE,
    v_cycle_code repl_cust2.bill.cycle_code%TYPE,
    v_open_cycle BOOLEAN, -- An open cycle
    v_billed_cycle BOOLEAN, --
    v_invoice_number VARCHAR2(13),
    v_start_date DATE,
    v_end_date DATE,
    v_root_ban repl_cust2.bill.root_ban%TYPE) ;
    I tried executing using this script, but it failed. When I execute this oracle lost connection to data base.
    declare
    r_bill_seq_rec ss_invoice_utilities.bill_seq_table;
    begin
    ss_invoice_utilities.current_open_cycle(934018003,r_bill_seq_rec);
    end;
    Please help me how I should write declare block to execute this procedure and also print output of the procedure.
    Regards
    Raghu

    I don't see anything wrong with the anonymous block, assuming ss_invoice_utilities is the correct package name. Perhaps a simplified test case would show up what's not working there.
    As for printing the contents of an associative array, you'll have to write some code to loop through it and construct a string per row to output via dbms_output, assuming the text will fit within dbms_output's size restrictions in 9i. dbms_output is a debugging tool though - is that the requirement?
    btw "pls_integer" is less to type than "binary_integer" ;)
    Edited by: William Robertson on Apr 16, 2009 8:35 AM

  • Oracle Instant Client and OUT Parameter of custom type in Stored Procedures

    Hi @ all!
    I try to set up a simple client application, that calls a stored procedure via Instant Client from C#.
    The stored procedure and assiciated types looks like this:
    TYPE MYVALUE AS OBJECT
          Id      INTEGER,
          value     FLOAT
    TYPE MYVALUELIST AS TABLE OF MYVALUE;
    PROCEDURE ReadValues( ID IN INTEGER,
                                        RESULTSET OUT MYVALUELIST)
                                           IS
    ...I created an Oracle Command executing this SP and added OracleParameters for ID and (where I got stuck) the RESULTSET.
    Is it possible to pass a parameter with a custom type from C# in some way?
    I already tried it as a function with SELECT * FROM TABLE(ReadValues(1));
    With my parameter RESULTSET as the RETURN type. But since I use DML within the procedure, this does not work inside of a query...
    Any suggestions?
    Thanks in advance!

    Hi Greg!
    Sorry, I misunderstood the forum topic then. =(
    Anyway, in the example you provided in the link, this is nearly exactly my situation. But there the Oracle.DataAccess.Client is used, where the OracleDBType can be called to initialize an object of type person. I use the instant client libraries called by using System.Data.OracleClient. There is only the OracleType enum, that does not contain an object or something similar.
    So I do it right now after trying a bit with a ref cursor parameter and an OracleDataAdapter - the ref cursor is passed back from Oracle as a DataReader, so die DataAdapter is able to use it for a .Fill():
    OracleCommand cmd = new OracleCommand();
    cmd.Parameters.Add("RESULTSET", OracleType.Cursor).Direction = ParameterDirection.Output;
    OracleDataAdapter odr = new OracleDataAdapter(cmd);
    DataTable result = new DataTable();
    odr.Fill(result);Within my stored procedure I just added the following OUT parameter:
    PROCEDURE ReadValues( ID IN INTEGER,
                                        RESULTSET OUT sys_refcursor)
                                           IS
    currentlist MYVALUELIST;
    ... [Adding elements to that list] ...
    OPEN resultset for select * from TABLE(currentlist);It works now, but I don't like that solution that much since I'm always afraid that there are lots of opened cursors idyling around. Do I have to close this one explicitly after filling my table by the DataAdapter?
    Regards

  • When/How to use - "search" parameter type in parameter like other types.

    We recently upgraded BI Publisher to 10.1.3.4. I saw new parameter type "search" in parameter section, when creating report. whats the use of it? How to use it ? like other parameter type Text, Menu,Hidden, Date.
    I couldn't find any help or release notes on this !
    Thanks
    Ayaps

    I started looking into this parameter type when our drop-down for customer numbers went from 13,000 (manageable) to 45,000 (completely unmanageable).
    I imagine this is supposed to mimic the effects of a "Long List" type LOV in Oracle Applications (as I had inquired about in [this thread|http://forums.oracle.com/forums/thread.jspa?threadID=895521&stqc=true|Large List of Values (LoV) hangs. Is there an equivalent for a long list?]), but performance-wise, "Search" does not seem to be any more efficient that using the "Menu" type LOV. Even with the help of having a partial string with a wildcard to match, the "Search" still takes too long to pull up to be of any use to us.

  • What is use of defining SELECTION PARAMETER in MOVEMENT TYPE

    Hi All ,
    Can u pls tell me the reason of defining SELECTION PARATEMETER in MOVEMENT TYPE.
    REGARDS
    Sandeep

    May be I couldn't explain my question well , sorry for that.
    When I define a new Movement code using T code OMJJ ( in IMG) , there is a field for SELECTION PARAMETER.
    I wanted to know the impact of this field value.
    Pavan , you are right that value is like a searching criteria but I am just wondering how can I check whether system is working as per the SELECTION PARAMETER defined for a movement type.
    For example , in movement type 101 defined selection parameter is WE101 (Open Goods Receipts) , so where I should check (in which list ) whether system is taking it as default value or not.
    I know for you people might find it a stupid question but I have no other option than u people )
    Pls let me know if my question is still not clear
    REGARDS
    SANDEEP

  • How to change heading text  for parameter field of type date

    Hi,
        After creating a parameter field with the type " Date Time" when I open the report for entering the parameter then it displays  the given parameter with the following text:
    " Please enter Date in format "yyyy-mm-dd". "
    I want to change it to some other text like as:
    " You have to enter the date and time in format yyyy-mm-dd . "
    Is there any way by which I can change this given header to some other text.
    Let me know if anyone needs some more information in this regard so as to solve my given query soon.

    Hi Garrett,
                  Well first of all I can change only the prompt text that is user defined. I cannot change any parameter as of now whose type is let suppose Date. Since in this case the Business Object itself shows the text which is something like this " Please enter Date in format "yyyy-mm-dd". " .
       Here I want to change this given text to some other format like " You have to enter the date in the format yyyy-mm-dd" or in any other manner.
    Also the current Crystal Report version which I am using is 11.0.0.1282.

  • Calling oracle API having parameter as record type throughPL/SQL WebService

    Hi All,
    I dont know whether this is the right forum to put this query, but as i am using a pl/sql web service , putting the query on this forum.
    My requirement is to call oracle API which in turh creates a single Invoice(using Ar_Invoice_Api_Pub.create_single_invoice )
    But the issue is this API in turn has some of the input parameters as Record type and table type, my concern is how to pass this data(record type or table type) as parameter thorugh java code .. If i use Collection or Hashmap will it work , I dont think so , some intermediate conversion will require.
    Subsequently the other requirement is fetch this record/table type data and return it to the java code
    Please correct me if i am wrong and suggest a proper solution if anybody is aware off or tried such things before.
    Thanks in advance.
    Regards,
    Anant.

    Hi,I'm new comer of this world,
    I've a pl/sql like this:
    package MY_WS_API is
    type record_set is ref cursor;
    PROCEDURE Get_User_Info(p_user_id VARCHAR2,
    p_rep_id VARCHAR2,
    p_flag out number,
    p_msg out varchar2,
    p_recordset out record_set);
    end MY_WS_API;
    when I using jdeveloper trying to publish it as a webservice, in the step 4 of the wizzard poping me choose the program unit to expose, the PROCEDURE Get_User_Info is not available and told me "Ref cursor Type is not supported due to a jdbc limitation and Ref Cursor Types are only supported for use of return type".
    THE QUESTION is:
    1.the cursor I used is of return type,I'm not very understanding the "why not" message upon.
    2.in such case , need I trans the return cursor into Object[] if have to?
    3.any other limitation for generating WS from PL/SQL using jdeveloper?
    Thanks!

  • Passing parameter of object type between Oracle & VB

    Hello,
    I want to pass parameters of ref cursor type variable between oracle 8i routines and Vb routines. It will be very helpfull for me if you can help in telling me about how to do it.
    Regards
    Rakesh Banerjee

    1. On the Oracle side, you may need to do the following:-
    (a) define a ref cursor of the desired type in a package specification
    (b) define a procedure that returns the ref cursor type as an out parameter, or alternately a function that returns the ref cursor type as a return value.
    (c) associate a select statement in the definition of the procedure or function using the synrtax OPEN ref_cursor_name FOR "select XYZ from abc"
    (d) compile and debug the package
    2. On the VB side one can:-
    (a) call the stored procedure or function using the ODBC call syntax for calling stored procedures
    (b) bind the output parameter or return value to a resultset variable in VB.
    3. The critical step would be using an ODBC driver that supports this syntax and functionality. If the driver available at your site does not work you may need to buy a third party driver that does.
    Hope that helps ...
    Regards,
    Narayan.

  • Oracle ORAOLEDB Provider removes trailing blanks in parameter values of Type IN CHAR

    Hi,
    I often use StoredProcedures With Ref_Cursor parameters to read data from an Oracle 11g DB.
    Because we use VARCHAR2 columns in our tables, we have to pad blanks for an exact match, the Input Parameter has to contain For example "WW2 ",
    This was working fine over the years using the Microsoft-Ado Provider MSDAORA ( with Excel 10, VBA ).
    Now we want to use the Oracle ORAOLEDB Provider. In our tests all resultsets were empty(rs.EOF/rs.BOF)
    The reason is, that inside the StoredProcedure  the ParameterValue was trimmed ( "WW2" ), and so the Where-Clause doesn't match.
    Is it possible to change this behaviour( bug or bad feature ? ) by setting a property of an object , in registry or somewhere else ?
    I am aware of the differences between the two character types VARCHAR2 / CHAR ( blankpadded / no blankpadded compare ).
    But the parameters of the stored procedure is CHAR (fixed length). and in this case strings are usually padded with blanks, and so I think, that no component has to modify a fixed length object,
    especially if the length of the parameter is a hard setting in vba code( Set Param = SqlCmd.CreateParameter("strAnlage", adChar, adParamInput, 4) , and in PL/SQL : strAnlage IN CHAR ).
    Thanks.
    Best regards
    Dirk

    Can you post how you are trying to call the procedure from a package body?
    Check this:
    SQL> create or replace package hits_11 as
      2  procedure my_process(a number);
      3  end;
      4  /
    Package created.
    SQL> create or replace package body hits_11 is
      2  procedure my_process(a number) is
      3  begin
      4  dbms_output.put_line(a);
      5  end;
      6  end;
      7  /
    Package body created.
    SQL> exec hits_11.my_process;
    BEGIN hits_11.my_process; END;
    ERROR at line 1:
    ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'MY_PROCESS'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    SQL> exec hits_11.my_process(1);
    1
    PL/SQL procedure successfully completed.
    SQL>

Maybe you are looking for