Help - using table as RFC input

Dear all,
  I'm new to web dynpro.I've just created a program to create PI doc. I had already import the module as well as configure the JCO.
Bapi_Matphysinv_Create_Input input = new Bapi_Matphysinv_Create_Input();
wdContext.nodeBapi_Matphysinv_Create_Input().bind(input);
input.setHead(new Bapi_Physinv_Create_Head());
how should i declare the table as input for RFC? any example for using table as RFC input? i had already look into the TutWD_Flighlist...but it seems doesnt do me any good.. pls help and advice. Thank you.

Hi Joan,
1. Create a value node in your context.
2. Add value attributes to this all those required for your input to BAPI(Keep its  
    type same).
3. Bind this node to table UI element and keep all the column type as input field
    so that you can enter value in that at runtime.
4. Now in you action where you execute BAPI just before that set all these values from node to model node.
eg.
Bapi_Matphysinv_Create_Input input = new Bapi_Matphysinv_Create_Input();
Bapi_Physinv_Create_Head() head =new Bapi_Physinv_Create_Head();
for(int i=0; i<wdContext.node<valueNode>().size();i++)
head.set<Attribute>(wdContext.<valueNode>().get<ValueNode>ElementAt(<index>).get<attributeName>);...
input.addHead(head);
wdContext.nodeBapi_Matphysinv_Create_Input().bind(input);
    try
    wdContext.currentBapi_Matphysinv_Create_InputElement().modelObject().execute();
    wdContext.nodeOutput().invalidate();
    catch(Exception e)
Regards,
Murtuza

Similar Messages

  • Using table rows for input

    Hi,
    Is it possible to use rows of table for input? Table binded to a RFC model table parameter. The rows of table is looking readonly. 
    Best regards,
    Altug Bayram

    Hi,
    Did u check if the  attributes set to read only. ?
    What is the cardinality of the node.
    And when it is a input for the RFC , i think you have missed the createElement part...!
    P.S : It will be gain more attention when it is a seperate question.
    Regards
    Bharathwaj
    Message was edited by: Bharathwaj R

  • Using table comparison can we use multiple tables as source?

    Using table comparison can we use multiple tables as source?
    Thank you very much for the helpful info.

    Table Comparison
    1) Input Data coming in
    2) Comparison table (table to which the data is compared)
    3) Output (input rows with respective opcodes based on the comparison result of input dataset with the comparison table)
    If your question is whether table comparison can accept union/join of multiple table sources, you can achieve by using merge/query transforms and then feeding to table comparison. Here, you have to be careful about choosing the primary keys inside table comparison

  • Perl SAP::Rfc - input tables - The specified type Typ rfcdes is unknown.

    I am pretty new to SAP and am working to understand the guts of it while also trying to do something useful, especially understanding how we could use Perl Sap::RFC.  I've been looking for days and making a little progress over time, but now I'm stuck.
    Problem Summary:
    I want to read the RFCDES table using RFC_READ_TABLE to get a dump of what's in there.   It is apparently too large for a plain RFC_READ_TABLE, but I discovered that by defining the fields that I want, I can get out what I need.  I did this by successfully executing RFC_READ_TABLE in SE37 for the RFCDES table by defining entries in the FIELDS table, but I can't figure out the right way to send a table as input to SAP via SAP::Rfc.
    Background:
    I am using SAP::Rfc v 1.55 on linux with 640,0,303 release of the rfcsdk.
    I am getting the error:
    RFC call failed: EXCEPT SYSTEM_FAILURE  GROUP   104     KEY     RFC_ERROR_SYSTEM_FAILURE        MESSAGE The specified type Typ rfcdes is unknown. at /home/<userid>/local/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/SAP/Rfc.pm line 1055.
    Here is my code block (minus connect info):
    my $it = $rfc->discover("RFC_READ_TABLE");
    $it->QUERY_TABLE("rfcdes");
    $it->ROWCOUNT( 30 );
    $it->OPTIONS( ["NAME LIKE 'SAP%'"] );
    my $str = $it->tab('FIELDS')->structure; # I think this line is extraneous
    $it->FIELDS([{ FIELDNAME => "RFCDEST", OFFSET=> "000000", LENGTH => "000000",  FIELDTEXT=> ""}]);
    $rfc->callrfc( $it );
    $rfc->close();
    The parameters to FIELDS are what worked in SE37.  I would eventually like to return more than just rfcdest (such as RFCOPTIONS) but at this point, anything working would be good
    I have successfully done an RFC_READ_TABLE with SAP::Rfc (using the tables.pl example) so I'm pretty sure I have that working but I think the FIELDS input/output table is throwing me off.  Maybe I'm not understanding the array of hashes correctly?
    I have looked at the thread SAP-::Rfc with Perl which got me this far but I'm still missing something.  Can anyone please help?
    Thank you for your time.

    You might want to check out the newer SAPNW::Rfc.  Not sure what version system you're connecting to.
    Anyway, here's how I did RFC_READ_TABLE with SAP::Rfc years ago:
    my $IT = $RFC->discover("RFC_READ_TABLE");
    $IT->QUERY_TABLE('TBTCO');
    $IT->OPTIONS( ["ENDDATE = '$MAXDATE' AND ENDTIME > '$MAXTIME' OR ENDDATE > '$MAXDATE'"] );
    my @FLDARRAY = qw(JOBNAME JOBCOUNT JOBCLASS PERIODIC REAXSERVER RELUNAME SDLUNAME
    AUTHCKMAN EVENTID SDLSTRTDT SDLSTRTTM STRTDATE STRTTIME ENDDATE ENDTIME STATUS);
    $IT->FIELDS([@FLDARRAY]);
    $RFC->callrfc( $IT );
    print "Num Rows in PRD matching selection criteria: ".$IT->tab('DATA')->rowCount()." \n";
    for my $ROW ( $IT->DATA ) {
       #do stuff;
    $RFC->close();
    Cheers,
    David.
    For reference, here's my wiki profile, where you can find my blogs on SAPNW::Rfc, and some sample scripts.
    http://wiki.sdn.sap.com/wiki/display/profile/David+Hull
    Edited by: David Hull on Mar 28, 2010 10:05 AM

  • How to pass table in RFC and use that table to populate fields in Mapping?

    Hi,
    I have a requirement FIle to CSV, the file consists of thousand lines...
    What I did first is to put RFC look up per line. It is taking too long to process the message.
    One work around that I could think of is to pass all the values to a table then pass the table to RFC then RFC returns another table, so only one RFC call is required.
    How am I going to use the table returned by the RFC? Please advise how to achieve this scenario.

    Hi,
    I use an ABAP RFC function, which has a parameter that contains many rows.
    In ABAP, I create a two types. First is a ROW - contains some fields, for example, param1, param2, etc.
    Second is a TABLE - contains multiple count of ROW.
    Then I create a Remotecallable Function that has this TABLE-type as parameter (you can make this parameter as INPUT and OUTPUT). So in my mapping program after import RFC Function, I see a message looks like this:
    MY_TABLE_PARAM (Occurences: 1)
    item (Occureces: 0..unbounded)
    param1 (Occureces: 1)
    param2 (Occureces: 1)
    etc (Occureces: 1)
    Regards.

  • Java dynpro - bind a table in the input parameters of an RFC

    Hi ,
      JAVA Webdynpro -  I have to bind a table in the input parameters of an RFC.
      The code below is taking in the N num of rows but is repeating the last row N times and
    sending it to the RFC.
    Ztsgt_Pos_Name postionTab = new Ztsgt_Pos_Name();     
    Ztsgt_Pos_Name.Ztsgt_Pos_Name_List positionTabList = new Ztsgt_Pos_Name.Ztsgt_Pos_Name_List();
             int e = wdContext.nodePosition_List_update().size();
             int f = 0;
             for( f = 0; f < e; f = f+1 )
                  wdContext.nodePosition_List_update().setLeadSelection( f );
         postionTab.setPosition_Nm( wdContext.nodePosition_List_update().currentPosition_List_updateElement().getPosition_Nm() );
                   postionTab.setPosition_Dscr( wdContext.nodePosition_List_update().getPosition_List_updateElementAt(f).getPosition_Dscr());
                  positionTabList.addZtsgt_Pos_Name( postionTab );
                   UpdatePosit.setPosition_List( positionTabList );
            try {
                  wdContext.nodeZRFC_3318_UPDATE_VEND_POSITION().nodePosition_List5().invalidate();
                   wdContext.currentZRFC_3318_UPDATE_VEND_POSITIONElement().modelObject().execute();     
                   wdContext.nodeOutput5().invalidate();
              } catch (WDDynamicRFCExecuteException e1) {
                   // TODO Auto-generated catch block
                   e1.printStackTrace();

    Hi SMI SAP Project Team,
    Please check the code for loop and lead selection when you setting the values.
    for( f = 0; f < e; f++)
    Refer to below documents:
    initializing AbstractList Model in Custom Controller
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/761eba66-0401-0010-b982-d5f5bd9e8f90?quicklink=index&overridelayout=true
    Hope it will helps
    Regards
    Arun

  • Using Table types in RFC

    Hi All,
    I am trying to create one RFC. But in that RFC, I wish to use Table types as import and export parameters completly avoiding Tables tab. Will that effect the performance of RFC if I use Table types. If Yes, Please give clear clarification where it effects the performance.
    Also please let me know how the performance of the RFC is effected if we use Tables tab.
    Thanks,
    Ravee..

    "I wish to use Table types as import and export parameters completly avoiding Tables tab."
      I'm not sure if Tables can be avoided, if just using regular ABAP. I know that the Importing tab would not work when I tried it (under vrs 4.6b).
      Because you are launching separate processes, in separate memory areas: any parameter you use in RFC has to be known by the calling and the callee functions/programs. This means that you need a common reference. If you have more than one function module in a function group, you can use the TOP file and a 'Z' data dictionary structure.
    I hope that this helps,
    Dan Perecky

  • Error in Java Program when passing table to RFC function . JCO is used

    Hai All,
    I developed a JAVA application to update data into SAP using JCO via RFC. When i pass table to the function module i am getting the below error
    com.sap.mw.jco.JCO$Exception: (104) RFC_ERROR_SYSTEM_FAILURE: Conversion from type T to D not supported.
    Please let me know how to solve this.
    Below is my code
    IRepository m_Repository;
    IFunctionTemplate ftemplate;
    JCO.Table PwdReq;
    JCO.Function function;
    m_Repository = JCO.createRepository("MYRepository", client);
                ftemplate = m_Repository.getFunctionTemplate("Z_GESEFM_UPD_PWD_RESET_REQUEST");
    // Create a function from the template
    function = new JCO.Function(ftemplate);
    // Feeding in input parameters
    PwdReq = function.getTableParameterList().getTable("RESULT2");
    String userid = "PATCHTEST14 ", reqDate = "",reqNo = "01",reqStatus = "03", boxID = "09",ind2 = "X",
                        lcode = "abcd",rem = "One record testing";
    PwdReq.appendRow();
                    PwdReq.setValue(userid, "USERID");
                    PwdReq.setValue(reqNo,"REQ_NO");
                    PwdReq.setValue(reqStatus,"REQ_STATUS");
                    PwdReq.setValue(boxID,"BOX_ID");
                    PwdReq.setValue(ind2,"IND2");
                    PwdReq.setValue(lcode,"LCODE");
                    PwdReq.setValue(rem,"OTHER_REMARKS");
                // execute the function with the input parameters
                client.execute(function);
    Thanks & Regards,
    H.K.Hayath Basha.

    hi,
    I am not very good in Java.
    but try this code to giving input parameter.
    function.getImportParameterList().setValue(userid, "USERID");
    if you are not using Try and Catch blok then use Try and Catch blok,
    Regards
    Manoj

  • Problem with RFC to XI - using tables

    Hi experts,
    I have a RFC function module in R/3 which uses table - the table has 2 components PartNumber and ComptiaCode. But when the RFC call is made, in XI, the value of ComptiaCode is always blank. This is despite the table in the FM has been populated correctly with values for PartNumber and ComptiaCode. Pls see below xml from XI.
      <?xml

    Hi,
    This is despite the table in the FM has been populated correctly with values for PartNumber and ComptiaCode
    Check in R3 if the value for this field is being populated and sent out to PI. Your debug investigation should start at R3.
    Regards,
    Neetesh

  • How to create Search Help using more than 1 table

    Hi all,
    I need to create a search help using more than 1 table.
    Eq:-   Itable1 contains the data and Table2 contains the description of a field.
    In my search help i require A field from Table1 and For the corresponding field description from Table2.

    Hi,
    You can do this with the help of collective search help.
    Collective search helps:- Combination of elementary search helps. When we need to fetch data based on multiple selection criteriau2019s. More than one tables are Selection from multiple tables 
    Steps for creating collective search help.
    1) Enter the search help name and click on create.
    2) Choose Collective search help radio button option as the search help type.
    3) Enter the search help parameters.
    Note that there is no selection method to be entered for a collective search help.
    4) Instead of the selection method, we enter the included search helps for the collective search help.
    5)We need to assign parameters for each of the included search helps.
    6) Complete the parameter assignment by clicking on the push button.
    7) Collective search help offers the user to obtain F4 help using any of the included search helps.
    Hope this will help you:
    Reagrds:
    Alok

  • I am using pages '09. I have been trying to put together a report and I am using tables to help keep my data in line. My data is free text and would like to footnote certain data as to it origin, but footnoting is grey-out. How can I footnote on table mod

    I am using pages '09. I have been trying to put together a report and I am using tables to help keep my data in line. My data is free text and would like to footnote certain data as to it origin, but footnoting is grey-out. How can I footnote in table mode inpages '09?

    Footnotes can only be inserted in the main text area between the margins on a Word Processing document.
    Peter

  • Using tables parameters for RFC

    Hi All
    I am trying to use tables parameter for a Remote Function Call.
    It says it is obsolete and not working, we are using ECC6.0 version of SAP.
    Any help??

    Instead, you should use a table type in a IMPORTING or EXPORTING parameter.  Create the table type in SE11 and then reference this table type in your parameter in the IMPORTING/EXPORTING tab.  The use of TABLES parameters section is obselete.
    Regards,
    Rich HEilman

  • Help: Jbo Exception non blocking when using table cell renderer?

    Hi,
    JClient 9.5.2.
    When using Table Cell Renderer on an table cell attribute that is defined mandatory and activating the insert button, the (oracle.jbo.AttrValException) JBO-27014 exception is caught but it is not blocking and a new row is still inserted.
    The JClient component demo, table attribute list, has the same behaviour.
    You can add multiple rows even if not all required attributes have been documented.
    Can a Swing specialist help me on this one?
    Example of Table Cell Renderer:
    public class TableBasicStatusRenderer extends DefaultTableCellRenderer
    public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus,
    int row, int column)
    JLabel lb = new JLabel((String) StaticData.getStatusName(value)); // retrieves label from Map
    return lb;
    Regards
    Frederic

    Hi,
    I found something interesting, it could be a WORKAROUND!
    I noticed that in another detail panel with table layout the JBO exception was blocking and adding another row before completing the row was NOT possible.
    In the create method of the entity object of the displayed View Object I iterate over the detail row iterator to retrieve a maximum value.
    By the end of the method the pointer is positionned after the last row.
    So I added to the detail panel that doesn't block following code:
    In create method of detail Entity Object Impl (only one entity object involved for this View)
    // Retrieve master EntityObjectImpl from association:
    PostalTariffImpl postalTariffImpl = getPostalTariffAssoc();
    // Retrieve detail default row iterator
    RowIterator ri = postalTariffImpl.getPostalDetailGroupAssoc();
    // Position pointer after last row
    ri.last();
    ri.next();
    Question: Why does this solve the problem?
    Regards
    Frederic
    PS Les mysteres de l'informatique!

  • Itunes will no longer accept any of my credit cards.  Says security code doesn't match with any card I use.  I have inputted new card info in the apple store area and it still says the same thing in itunes.  Customer service is no help at all.

    Itunes will no longer accept any of my credit cards.  It says vcode doesn't match when it does.  Customer service is no help.  I have re-inputted the info in the account section of the apple store and in itunes--still says vcode doesn't match.

    Itunes will no longer accept any of my credit cards.  It says vcode doesn't match when it does.  Customer service is no help.  I have re-inputted the info in the account section of the apple store and in itunes--still says vcode doesn't match.

  • SOAP sync to RFC - Multiple lines in the RFC 'input'

    Hello everyone!
    I need a little 'insight help'/opinion.
    I had a cenario that was working just fine, SOAP Async to iDoc. In the cenario I received 1:n lines and send it to the iDoc. No problem at all.
    Now,  the analyst asked us to change this cenario to: SOAP Sync to RFC (I opposed that but.. it's their decision..)
    So, I created a RFC with NO IMPORTING AND EXPORTING and 2 TABLES. One table to receive 1:n lines as inputs of the data, and other table to give 1:n line as response of the process of that line.(the RFC is remote, so can be used by PI)
    When I test this RFC in R3 using transaction SE37, I am able to enter 1:n line in the input table, and get the 1:n line in the response table. And also, the data is inserted in my table. Perfect.
    When I import and use this RFC in PI, everything seems to be fine during mapping procedures and such, but when I execute the SOAP call, I get an mapping error. I was able to see that:
    1 - The Response from the RFC using PI is 'blank'. I mean, the mapping from the response of the RFC to my SOAP is 'null', that's why I´m getting the error mapping.
    2 - Tha data WAS NOT inserted into the table using PI. This worries me more.
    So, my question is, does PI understand the use of 2 tables (one as 'input' and other as 'output') from the RFC? - the RFC has no importing and exporting, only tables, as I've mentioned.
    Also, is this what I am trying to achieve here, possible? I mean, can I expect to use a RFC with multiple line as 'input' or PI only accepts 'parameters' as input?
    Thanks for the insight help!
    Ricardo Sancio Lóra
    Brazil

    but when I map anything from the response to my output, I get the mapping error, but if I map something constant it
    worked
    Did you test the mapping in IR using the Test tab of Interface/ Message mapping? If it is working for Constant and not for runtime (or other) values then it means that the mapping logic is not proper.
    But did you see when I say that the item was NOT inserted into the table in R3?
    Now the last check-point in XI.....is your RFC channel showing proper payload in RWB --> Component Monitoring --> Adapter Engine --> CC Monitoring?
    Regards,
    Abhishek.

Maybe you are looking for

  • Sql table query,

    Hi I am new to, sql queries. I have two tables say table A, table B. Table A has column 1, column2, ......and same for table B. They can have any number of rows. I will take table B and will go row by row, compare the combination of column1, 2, 3 wit

  • Check cube data

    I have web query that i want to run. It's asking for certain variables eg : date. How can i check cube data to see what valid dates have been posted in the cube? so then I can put this in for the variable date ? thanks

  • Convert JPanel to buffered Image

    Hi, i have a JPanel,I override the paintComponent() method to do a lot of painting. the size of this panel is about 2500 X 2500 i want to convert it to a buffered image, but i dont get image of total panel, but only the image of what is displayed on

  • Tv adobe videos do not run

    I've seen this problem posted in several places in the forums, with any number of fixes suggested, which I have tried. I just purchased LR5 and am attempting to view the tutorials on tv adobe and get only a black screen -no error messages, the vids s

  • Service level agagements

    hi. its regarding the sla. what r the service level aggrements companys usvally have with their client. can anyone explain about the service level aggrements