Execute BAPI for different input values and dispaly data in a table

Hi all,
I have a specific problem about executing BAPI multiple times for different input values and didplay result in a table.
I am using the code similar to the following logic.
Bapi_Mydata_Input in = new Bapi_Mydata_Input();
wdContext.nodeBapi_Mydata_Input().bind(in);
String in = wdContext.currentperdataElement.getnumber();
in.setDestination_From(10)
wdThis.wdGetMydataComponentController().executeBapi_Mydata_Input();
in.setDestination_From(20)
wdThis.wdGetMydataComponentController().executeBapi_Mydata_Input();
in.setDestination_From(30)
wdThis.wdGetMydataComponentController().executeBapi_Mydata_Input();
And I want to display the data in a single table. I want the result in a table for Bapi execution based on input parameters passed 10,20 30.
But I am getting the table data only for the input parameter 30.I mean its actually display the data in table only for the last input parameter.
So May I ask you all if you know the solution for this problem.PLease advise me with some tips .or sample code is very much appreciated.I promise to award points to the right answer/nice advises.
Regards
Maruti
Thank you in advance.

Maruti,
It seems that WDCopyService replaces content of node, rather then adds to content.
Try this:
Bapi_Persdata_Getdetailedlist_Input frelan_in = new Bapi_Persdata_Getdetailedlist_Input();
wdContext.nodeBapi_Persdata_Getdetailedlist_Input().bind(frelan_in);
final Collection personalData = new ArrayList();
String fr1 = wdContext.currentE_Lfa1Element().getZzpernr1();
frelan_in.setEmployeenumber(fr1);
wdThis.wdGetFreLanReEngCompController().executeBapi_Persdata_Getdetailedlist_Input();
WDCopyService.copyElements(wdContext.nodePersonaldata(), wdContext.nodeNewPersonaldata());
for (int i = 0, c = wdContext.nodePersonaldata().size(); i < c; i++)
  personalData.add( wdContext.nodePersonaldata().getElementAt(i).model() );
String fr2=wdContext.currentE_Lfa1Element().getZzpernr2();
frelan_in.setEmployeenumber(fr2);
wdThis.wdGetFreLanReEngCompController().executeBapi_Persdata_Getdetailedlist_Input();
WDCopyService.copyElements(wdContext.nodePersonaldata(), wdContext.nodeNewPersonaldata());
for (int i = 0, c = wdContext.nodePersonaldata().size(); i < c; i++)
  personalData.add( wdContext.nodePersonaldata().getElementAt(i).model() );
wdContext.nodeNewPersonalData().bind( personalData );
Valery Silaev
EPAM Systems
http://www.NetWeaverTeam.com

Similar Messages

  • How can I run the report for different input values at the same time?

    Reports version: Report Builder 6.0.8.13.1
    Oracle version: Oracle8i Enterprise Edition Release 8.1.7.0.0
    I want to run the same report for different input parameter values and spool each o/p to different file and ftp to a server. For this, as a first step, I am spooling different input values in to a file, reading those values through a loop and calling the report for that input values. Each report run/execution is taking 15 minutes. Total report execution is taking approximately 4 hours (assuming 16 different input values) to complete. So I have to wait 4 hours to see ALL outputs.
    I would like to run the report parallel for ALL the input values and I should be able to see the ALL outputs with in 15 or 16 minutes.
    In my shell script, I added & symbol at the end of the report call to start/run the job in the background. Due to this the control passed to the next step after the report call. At this place I have an ftp command to send the output file to a different server and it is giving error some thing like “o/p file is not available/created yet". This is due to the fact that report writer is NOT yet completely started/initiated or it is NOT completed the spooling.
    How can I run the report at the same time for all the input values and save the time?
    Thanks in advance.
    Kishore.

    Increase the number of server engines running right now it seems there is only one engine running ,increase it to 4 or 6
    and then atleast 4 or 6 reports will run simultaneously.
    For FTPing the output add to your sript to check whether it is locked and if not then only try to ftp .
    Also for more better functionality read the document (chapter 15 ) for 10g reports for its new fuinctionality.
    http://download.oracle.com/docs/cd/B14099_17/bi.1012/b14048/toc.htm
    Thanks
    Subodh

  • Several identical descriptions for different characteristics values in TC04

    Dear all,
    I need to maintain several identical language-dependent descriptions for different characteristics values and one unique characteristic. I would like to nkow if that is posible.
    Thanks in advance.
    Sebastiá

    Thanks for your replies,
    In fact my problem consists that I can not use the same description for different master values of same characteristic as below:
    charact    descrip
    1              one
    2              one
    The sistem returns Nº mensaje: C1223
    S.

  • Easy Question:Select many rows from a table and execute BAPI for these rows

    Hi Experts,
    I have created one WD project. The WD project fetches some records of backend using BAPI and displays in a table. I have to select some rows from the table and then execute BAPI for selected rows.
    How I can select multiple records from the table and then execute another BAPI for selected rows.
    Regards,
    Gary

    Hi,
    In the Node which you binded to the table create one more attribute of type boolean.
    For example your node is as below:
    //Table Node
    TableNode
    > Att1
    > Att2
    > isSelected(boolean) - Newly created attribute for this requirement.
    //Result Node contains the elements selected in TableNode
    ResultNode
    >Att1
    >Att2
    Now in the table create one more Column with Checkbox as tablecell editor. Now bind this boolean attribute to that check box.
    Now in the code you can get the selected rows by user as below:
    for(int i=0;i<TableNode().size();i++)
      if(wdContext.nodeTableNode().getTableNodeElementAt(i).getIsSelected()==true)
        IPrivateTestView.IResultNode element=wdContext.createResultNodeElement();
        element.setAtt1(wdContext.nodeTableNode().getTableNodeElementAt(i).getAtt1());
        element.setAtt2(wdContext.nodeTableNode().getTableNodeElementAt(i).getAtt2());
       wdContext.nodeResultNode().addElement(element);
    Regards,
    Charan

  • Ora_hash - Same hash value for different inputs (Urgent)

    Hi,
    Trying to use ora_hash to join between tables but i noticed that in some cases, when working on different input value the ora_hash function generates same results.
    select ora_hash('oomeroe03|6NU3|LS006P|7884|1|17-JUL-13 13.18.22.528000|0005043|'),ora_hash('GSAHFFXTK|GCQ3|A6253S|12765|1|17-JUL-13 17.26.26.853000|0136423|')
    from dual
    Output value : 1387341941
    Oracle version is 11gR2.
    Thanks

    Why would anyone limit the hash distribution to three buckets ?
    However, one must understand that the default seed is 0.  So one input repeated gets the same hash value unless the seed is changed.
    SQL> select ora_hash(rn) , rn
      2  from
      3  (Select rownum as rn from dual connect by level < 11)
      4  order by rn;
    ORA_HASH(RN)         RN
      2342552567          1
      2064090006          2
      2706503459          3
      3217185531          4
       365452098          5
      1021760792          6
       738226831          7
      3510633070          8
      1706589901          9
      1237562873         10
    10 rows selected.
    SQL> l
      1  select ora_hash(rn) , rn
      2  from
      3  (Select rownum as rn from dual connect by level < 11)
      4* order by rn
    SQL> /
    ORA_HASH(RN)         RN
      2342552567          1
      2064090006          2
      2706503459          3
      3217185531          4
       365452098          5
      1021760792          6
       738226831          7
      3510633070          8
      1706589901          9
      1237562873         10
    10 rows selected.
    SQL> /
    ORA_HASH(RN)         RN
      2342552567          1
      2064090006          2
      2706503459          3
      3217185531          4
       365452098          5
      1021760792          6
       738226831          7
      3510633070          8
      1706589901          9
      1237562873         10
    10 rows selected.
    SQL>
    Hemant K Chitale

  • Function Module or BAPI for Sales price calculation and Pricing worklist

    Hi Retail experts,
    We frequently change purchase conditions, but not that frequently for cases like perishables, so sales price calculations needs to be done each time. This means pricing worklist generation and release is done often and then sales price recalculation is done each time article wise and for various organization level.
    We have 15000 articles for which purcahse conditions changes, it is impossible to generate and release pricing worklist and do sales price calculation for each article
    So solution may be to find a FM/BAPI for the following transactions and automate them.
    Do you know FM/BAPI for VKP5/VKBP or VKP6, WVN0, WVN1 transactions.
    Regards
    Bob

    HI Madhu,
             Thanks for the reply,
    I am looking for BAPI or FM which will check all pricing condition types( like MRP of the Material(table A304), discounts(A800,A802,A803,A804) for that customer and Tax) and give me the value(KONP-KBETR).
    I can only pass Customer, material, quantity etc.. so that BAPI or FM has do all standred checks/ validation and give the
    KONP-KBETR for all condition types like MRP, discounts, Tax. we are developing the custom program for sales order creation so we require the all this before saving the sales order.
    Regards,
    Nagesh
    Edited by: nageshdb4u on Mar 5, 2011 12:05 PM

  • UDF Required for checking input value.

    Hi,
         I'm in need of an UDF for checking the input value and pass constant based on that.
    Requirement.
                        We are having 1 field on the source side which need to be checked.
                        If the first character of the input is alphabet (No case sensitive)
                        then pass a constant "X" to the output field.
                        Other wise donot create that particular element.
    Example : If INPUT = A12345 then OUTPUT = X
                    If INPUT = 12345D then OUTPUT element must not be created.
    Regards,
    Swapna

    use the following code in a udf and then pass the result to createIf standard function to help you with the requirement.
    String chkValue = input.subString(0,1);
    String flag = "false";
    if ((chkValue >= 'A' && chkValue <= 'Z') || (chkValue >= 'a' && chkValue <= 'z')) {
    flag = "true";
                          return flag;
    else
    {return flag;}

  • NEED BAPI FOR  SALES CONTRACT CREATION AND EXTRACTION FOR Trans- PA41& PA43

    Hi All,
    I need the BAPI for T-code PA41 and PA43 for sales contract.
    i would like to extract all the contract details for Contract data contains Table VEDA. And need to create contract.
    Any body please help me out...
    Please give me code if any one have how to do mapping ..
    Thank you,
    Vishnu.

    Hi Vichu,
    Please search on SCN.
    Regards
    Abhii

  • How to use execute immediate for character string value 300

    how to use execute immediate for character string value > 300 , the parameter for this would be passed.
    Case 1: When length = 300
    declare
    str1 varchar2(20) := 'select * from dual';
    str2 varchar2(20) := ' union ';
    result varchar2(300);
    begin
    result := str1 || str2 ||
    str1 || str2 ||
    str1 || str2 ||
    str1 || str2 ||
    str1 || str2 ||
    str1 || str2 ||
    str1 || str2 ||
    str1 || str2 ||
    str1 || str2 ||
    str1 || str2 ||
    str1 || ' ';
    dbms_output.put_line('length : '|| length(result));
    execute immediate result;
    end;
    /SQL> 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
    length : 300
    PL/SQL procedure successfully completed.
    Case 2: When length > 300 ( 301)
    SQL> set serveroutput on size 2000;
    declare
    str1 varchar2(20) := 'select * from dual';
    str2 varchar2(20) := ' union ';
    result varchar2(300);
    begin
    result := str1 || str2 ||
    str1 || str2 ||
    str1 || str2 ||
    str1 || str2 ||
    str1 || str2 ||
    str1 || str2 ||
    str1 || str2 ||
    str1 || str2 ||
    str1 || str2 ||
    str1 || str2 ||
    str1 || ' ';
    dbms_output.put_line('length : '|| length(result));
    execute immediate result;
    end;
    /SQL> 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
    declare
    ERROR at line 1:
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    ORA-06512: at line 6

    result varchar2(300);Answer shouldn't be here ? In the greater variable ?
    Nicolas.

  • BAPI for Transaction Codes FMV1 and FMZ1

    hi,
    is there any bapi for transaction codes FMV1 and FMZ1?!
    please advice!
    thanks JE

    HI,
    For FMZ1
    use this
    FMFR_CREATE_FROM_DATA
    FMFR_CHANGE_FROM_DATA
    FMFR_CHANGE_COMPLETION_FLAG
    Regards
    Hiren K.Chitalia

  • Customize Alert messages for checking duplicate value and Success alert

    Hi All,
    I want to show two alert against the same "Submit" button to--
    1. Alert messages for checking duplicate value and show the Duplicate value found alert and
    2. Success Alert if the form is success to commit and no duplicate value found.
    I did all thing but when alert-1 shows and i pressed the ok button of the alert then the second alert also shows which i don't want to show.
    Which i can do in this issue? Have there anyone to help me!
    Arif

    Hi Manu,
    I have placed the following code
    1. against the Submit button--
    if error_code=40508 then
         commit_form;
    elsif :USERDELETION.CANCELLATION_USERID is not null then
    do_key('COMMIT_FORM');
    else null;
    end if;
    2. Code against the key-commit trigger in the form level--
    commit_form;
    DECLARE
    vAlert NUMBER;
    BEGIN
    set_alert_property('ALERT_TO_VERIFY',ALERT_MESSAGE_TEXT, 'Your Form has successfully submitted and your Reference id is '||:USERDELETION.REF_NO);
    vAlert:=SHOW_ALERT('ALERT_TO_VERIFY');
    END;
    3. Code against the on-error trigger in the form level--
    DECLARE
    vAlert NUMBER;
    BEGIN
         if ERROR_CODE = 40508 then
    set_alert_property('ERROR_ALERT',ALERT_MESSAGE_TEXT, 'This user deletion request has already submitted of the user named '||'"'||:USERDELETION.FULLNAME||'"');
    vAlert:=SHOW_ALERT('ERROR_ALERT');
    elsif
              ERROR_CODE = 40202 then
    set_alert_property('ERROR_ALERT',ALERT_MESSAGE_TEXT, 'Existing userid must be filled-up !');
    vAlert:=SHOW_ALERT('ERROR_ALERT');
    else
                   message(error_type||to_char(error_text)||': '||error_text);
    end if;
    END;
    If there have any confusion, please ask me.
    Arif

  • How to Assign a default value and Increement in my Target table ........?

    Hi,
    In my target table I want to Increment a value and store it in the table ........
    the increement shud start frm ...........5001,5002,5003..................etc
    How can I achieve this...........?
    I created an numeric Variable and in assigned the default as 5000 nad action as Historize.........
    In the target Datastore ......I assigned VAR+1.......
    but in the Target column I got 5001 for all the columns........
    Which way is the best way to deal with the Variables.......
    Thanks
    AK
    Message was edited by:
    AK2008

    Hi Gurusank and Micropole,
    Thanks for reply and info.....
    I am trying out one of the solutions first........
    Gurusank,
    I have created a sequence........whether I need to mention the schema and table name ,column.........also ( I gave all the information) and Increement column =1 and saved it .......
    Then I follwed the procedure as u have mentioned .....
    And in the Target field also I gave the same the same.......for tat column I gave choose (target for execution).
    And I directly ran the interface ..........
    I got the folowing Error:
    287 : 42000 : java.sql.SQLException: ORA-02287: sequence number not allowed here
    java.sql.SQLException: ORA-02287: sequence number not allowed here
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:316)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:282)
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:639)
         at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:185)
         at oracle.jdbc.driver.T4CPreparedStatement.execute_for_rows(T4CPreparedStatement.java:633)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1086)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2984)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3057)
         at com.sunopsis.sql.SnpsQuery.executeUpdate(SnpsQuery.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execStdOrders(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSqlI.treatTaskTrt(SnpSessTaskSqlI.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
         at com.sunopsis.dwg.cmd.e.i(e.java)
         at com.sunopsis.dwg.cmd.g.y(g.java)
         at com.sunopsis.dwg.cmd.e.run(e.java)
         at java.lang.Thread.run(Thread.java:534)
    Could u plz let me know where I am doing the mistake
    Thanks
    AK

  • Reference Library for Converting Between LabVIEW and XML Data (GXML)

    Please provide feedback, comments and questions on the Reference Library for Converting Between LabVIEW and XML Data (GXML) in this thread.
    The latest version of the NI GXML Library is availble in VIPM on the NI LabVIEW  Tools Network repository.

    Francesco, Thank you for the feedback.  With this component it was my intention to make a more "terse" version of the LabVIEW Flatten to XML VI that was also supported on RT and that gave the user more flexbility regarding the structure of the parsing type definition. I think you are right that the XML parser is not compliant to section 2.11 of the XML spec.  The parser does specifically looking for a #D#A and this appears to be an oversight on my part.  Please confirm for me, the specifcation is saying that the XML parser should be able to recognize three possibilities as an "end of line" character: #D#A, #D, or #A.  Am I reading this right?There are more efficient (and in some cases much more efficient) ways of sharing data between LabVIEW and LabVIEW: some examples are flattened binary strings and the datalog binary format.  XML is slower than these optons but the upside is that it is human readable.  Furthermore XML is inherently hierarchical which is convenient for complex data structures like clusters of arrays of clusters, etc.  If you don't care about human readability then you are correct XML doesn't make as much sense.I will return to the GXML source code and try to fix this in the near future but I would hope that instead of creating yet another custom VI from scratch that you could reuse what I have provided for you.  I included enough documentation in the source code so that users could make some modificiations themselves. The target application for this reference library was LabVIEW to LabVIEW communication.  As such I documented the schema on the dev zone document from a LabVIEW perspective.  It includes all the supported datatypes and all the supported data structures (cluters, arrays, multidimensional arrays, clusters of multidimensional arrays, etc.)  I do see some value in making a more conventional XML spec but the time investment required didn't really line up with my intended use case. Were there any other downsides to GXML that I have missed?  Best Regards, Jeff TippsSystems Engineer - Sound and VibrationMessage Edited by Jeff T. on 04-21-2010 10:09 AM

  • Creating a external content type for Read and Update data from two tables in sqlserver using sharepoint designer

    Hi
    how to create a external content type for  Read and Update data from two tables in  sqlserver using sharepoint designer 2010
    i created a bcs service using centraladministration site
    i have two tables in sqlserver
    1)Employee
    -empno
    -firstname
    -lastname
    2)EmpDepartment
    -empno
    -deptno
    -location
    i want to just create a list to display employee details from two tables
    empid firstname deptno location
    and same time update  in two tables
    adil

    When I try to create an external content type based on a view (AdventureWorks2012.vSalesPerson) - I can display the data in an external list.  When I attempt to edit it, I get an error:
    External List fails when attached to a SQL view        
    Sorry, something went wrong
    Failed to update a list item for this external list based on the Entity (External Content Type) 'SalesForce' in EntityNamespace 'http://xxxxxxxx'. Details: The query against the database caused an error.
    I can edit the view in SQL Manager, so it seems strange that it fails.
    Any advice would be greatly GREATLY appreciated. 
    Thanks,
    Randy

  • How to use for all entires clause while fetching data from archived tables

    How to use for all entires clause while fetching data from archived tables using the FM
    /PBS/SELECT_INTO_TABLE' .
    I need to fetch data from an Archived table for all the entries in an internal table.
    Kindly provide some inputs for the same.
    thanks n Regards
    Ramesh

    Hi Ramesh,
    I have a query regarding accessing archived data through PBS.
    I have archived SAP FI data ( Object FI_DOCUMNT) using SAP standard process through TCODE : SARA.
    Now please tell me can I acees this archived data through the PBS add on FM : '/PBS/SELECT_INTO_TABLE'.
    Do I need to do something else to access data archived through SAP standard process ot not ? If yes, then please tell me as I am not able to get the data using the above FM.
    The call to the above FM is as follows :
    CALL FUNCTION '/PBS/SELECT_INTO_TABLE'
      EXPORTING
        archiv           = 'CFI'
        OPTION           = ''
        tabname          = 'BKPF'
        SCHL1_NAME       = 'BELNR'
        SCHL1_VON        =  belnr-low
        SCHL1_BIS        =  belnr-low
        SCHL2_NAME       = 'GJAHR'
        SCHL2_VON        =  GJAHR-LOW
        SCHL2_BIS        =  GJAHR-LOW
        SCHL3_NAME       =  'BUKRS'
        SCHL3_VON        =  bukrs-low
        SCHL3_BIS        =  bukrs-low
      SCHL4_NAME       =
      SCHL4_VON        =
      SCHL4_BIS        =
        CLR_ITAB         = 'X'
      MAX_ZAHL         =
      tables
        i_tabelle        =  t_bkpf
      SCHL1_IN         =
      SCHL2_IN         =
      SCHL3_IN         =
      SCHL4_IN         =
    EXCEPTIONS
       EOF              = 1
       OTHERS           = 2
       OTHERS           = 3
    It gives me the following error :
    Index for table not supported ! BKPF BELNR.
    Please help ASAP.
    Thnaks and Regards
    Gurpreet Singh

Maybe you are looking for

  • Problem during IS-OIL activation transport: "ERROR during DD ACTIVATION"

    Dear All, On Development system, is-oil was previously activated with SFW5 transaction (notes 908007, 874541); afterwards transport was created on development system and imported on the production system, but unsuccessfully! On Production system, we

  • Can't Move Around in my Recordset

    Hi, From a beginner, the issue is that Recordset.MoveNext and .MovePrevious aren't working, though .MoveFirst and MoveLast are.  If I exchange MoveLast for MoveNext and MovePrevious to MoveNext, the output will be 8 repetitions of the last record as

  • HP 7510 cannot print UK Royal Mail postage from Web!

    Hello, Need some help here. I have some postage from the UK Royal Mail website ready to print. So I'm clicking PRINT while a Safari window is open. Done it a million times before on other printers and a dozen times on this HP 7510 without any trouble

  • Smtp; 551 5.7.1 relaying denied - new secondary domain does not receive email from internet

    Exchange 2007 smpt error "smtp; 551 5.7.1 relaying denied" Inbound email sender gets this error when trying to send to secondary domain. This is a single server exchange setup. Here is what we have done: #1 We have added a new policy for the new doma

  • Error in Process Chain From ODS to InfoCube

    Hi There What variants should follow to load data from ods to infocube in process chains? I created Process Chain,first delete content of ods and data load,Activate ods , further update ods , delete index , load from ods to IC and generate index and