Passing multiple tables of varing types to a form statement.

Note the itab table type varies, and for my application the perform will be executed many times. 
Perform xxx  tables itab[].
Form xxx   TABLES    p_tab.
  loop at p_tab.
    write:/ p_tab-eqart.
  endloop.
Endform.
The syntax error is.
The data object "P_TAB" has no structure and therefore no component
called "EQART".
I know that changing the form to
Form xxx   TABLES    p_tab type (name)
where name is the table type works, but is this forces me to create
many modules.  I am also looking at very large tables so assigning field symbols for each component is not any better.
What I am looking for is a way to pass the type for the table, or get p_tab to represent the structure, by passing the structure or assigning it to a structured variable field string.

Hi,
You can also modify the data..
Check this example..
DATA: ITAB LIKE MARA OCCURS 0 WITH HEADER LINE.
ITAB-MATNR = 'ASDF'.
APPEND ITAB.
PERFORM sub1 TABLES ITAB.
LOOP AT ITAB.
  WRITE: / ITAB-MATNR, ITAB-MTART.
ENDLOOP.
FORM SUB1 TABLES ITAB_LCL.
FIELD-SYMBOLS: <FS>.
LOOP AT ITAB_LCL.
  ASSIGN COMPONENT 'MTART' OF STRUCTURE ITAB_LCL TO <FS>.
  IF SY-SUBRC = 0.
    <FS> = 'TEST'.
  ENDIF.
  MODIFY ITAB_LCL.
ENDLOOP.
ENDFORM.
Please let me know if this is not you are looking for..
Thanks,
Naren

Similar Messages

  • Passing Multiple table row from one view to another view

    Hi,
    How to Passing Multiple table row from one view to another view in Web Dynpro Abap. (Table UI Element)
    thanx....

    Hi Ganesh,
    Kindly do search before posting.. this discussed many times..
    First create your context in component controller, and do context mapping in two views so that you can get values from
    one veiw to any views.
    and for multiple selection, for table we have property selection mode.. set as multi and remember context node selection
    selection cardinality shoud be 0-n.
    so, select n no of rows and based on some action call sec view and display data.( i think you know navigation between veiw ).
    Pelase check this...for multi selection
    Re: How to copy data from one node to another or fromone table to another table
    for navigation.. check
    navigation between the views
    Cheers,
    Kris.

  • How to create table with row type in smart forms

    How to create table with row type in smart forms with out line type
    please explain me the procedure

    HI,
    A table type describes the structure and functional attributes of an internal table in ABAP. In ABAP programs you can reference a table type TTYP defined in the ABAP Dictionary with the command DATA <inttab> TYPE TTYP. An internal table <inttab> is created in the program with the attributes defined for TTYP in the ABAP Dictionary.
    A table type is defined by:
    its line type, that defines the structure and data type attributes of a line of the internal table
    the options for managing and accessing the data ( access mode) in the internal table
    the key ( key definition and key category) of the internal table
    The row type is defined by directly entering the data type, length and number of decimal places or by referencing a data element, structured type ( structure, table or view) or other table type. Or the row type can be a reference type.
    <b>for more info :</b> http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb366d358411d1829f0000e829fbfe/content.htm
    Internal table
    Regards
    Sudheer

  • Passing multiple table entries to web service

    Hi,
    I have a requirement (in Offline Scenario) to pass multiple rows in a Table(Dynamic) data from Adobe forms to a Web Service.
    Multiple rows are added in the Form, but only the first row is getting passed to the Web service tables parameter.
    Please suggest.
    Regards,
    Jayapal.

    Hi,
    if you warp the proxy class in a JavaBean and expose this JavaBean as a datacontrol then you could have a method that takes username and password to set it on the proxy. This way you can pass the connect information through the binding layer
    e.g.
    OperationBinding oper = (OperationBinding ) bindings.get(myAuthMethod);
    oper.getParamMap("username",username);
    oper.getParamMap("password",password);
    oper.execute();
    Note that the method arguments can also be bound to EL in th epageDef file so they read directly from the session scope
    Frank

  • Passing multiple parameters (caption and textbox) to another form failing to pick up Caption

    I have an Microsoft Access application that is more like a form than a database. Users complete the form and then submit it to us for review. There are many questions and memo fields on the different forms (sections). Some of the memo forms are small due
    to the limitation of the size of the form (22 inches) therefore there is a lot of scrolling. I want to include a button on each question so that when users click on it will display a form where I pass the label caption (question) and the answer to this form.
    Alternatively I can have a expanded form for each question but that would require over 50 forms. The Application is quite large. I wanted to have one form and just call the different questions/answers.
    The below is working for the text box (AnswerTxt). However the CaptionTxt is not holding it's value when it gets to the new form. It's only displaying the name of the variable name, CaptionTxt
    On the form where the data resides I have:
    Private Sub test_Click()
    Dim CaptionTxt As String
    Dim AnswerTxt As String
    CaptionTxt = Me.lblSect11_5.Caption
    AnswerTxt = Me.Section11_5.Value
    Debug.Print CaptionTxt
    Debug.Print AnswerTxt
    DoCmd.OpenForm "Form1", OpenArgs:="CaptionTxt|" & AnswerTxt
    End Sub
    On the new form with an expanded memo field
    Private Sub Form_Load()
    Dim intPos As Integer
    Dim strControlName As String
    Dim strValue As String
    If Len(Me.OpenArgs) > 0 Then
    ' Position of the pipe
    intPos = InStr(Me.OpenArgs, "|")
    If intPos > 0 Then
    strControlName = Left$(Me.OpenArgs, intPos - 1)
    Debug.Print strControlName
    strValue = Mid$(Me.OpenArgs, intPos + 1)
    Debug.Print strValue
    ' Retrieve Control Name from the first part of the string
    Me.lblText11.Caption = Left$(Me.OpenArgs, intPos - 1)
    ' strControlName = Left$(Me.OpenArgs, intPos - 1)
    ' Retrieve Value to Assign from the end of the string
    Me.txt_Section11.Value = Mid$(Me.OpenArgs, intPos + 1)
    ' strValue = Mid$(Me.OpenArgs, intPos + 1)
    ' Assign the value to the control
    ' Me(strControlName) = strValue
    End If
    End If
    End Sub
    jim neal

    The below is working for the text box (AnswerTxt). However the CaptionTxt is not holding it's value when it gets to the new form. It's only displaying the name of the variable name, CaptionTxt
    It will, because you are passing it as a literal string with:
        DoCmd.OpenForm "Form1", OpenArgs:="CaptionTxt|" & AnswerTxt
    In this "CaptionTxt|" is a literal string, whereas AnswerTxt references the variable.  It should be:
        DoCmd.OpenForm "Form1", OpenArgs:=CaptionTxt & "|" & AnswerTxt
    You might be interested in the file Args.zip in my public databases folder at:
    https://onedrive.live.com/?cid=44CC60D7FEA42912&id=44CC60D7FEA42912!169
    If you have difficulty opening the link copy its text (NB, not the link location) and paste it into your browser's address bar.
    This little demo file illustrates how to pass multiple arguments, using a module originally developed by Stuart McCall and later expanded by me to allow the passing of named arguments.
    Ken Sheridan, Stafford, England

  • How to Pass internal table from a program to Samrt form

    Hi Pals
    I want to pass an internal table which I have declared in the program to Smartform..can you please help
    me asap.
    Regards
    Praveen

    Hai.
    check link.
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVSCRSF/BCSRVSCRSF.pdf
    check this.
    How to create a New smartfrom, it is having step by step procedure
    http://sap.niraj.tripod.com/id67.html
    step by step good ex link is....
    http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html
    Here is the procedure
    1. Create a new smartforms
    Transaction code SMARTFORMS
    Create new smartforms call ZSMART
    2. Define looping process for internal table
    Pages and windows
    First Page -> Header Window (Cursor at First Page then click Edit -> Node -> Create)
    Here, you can specify your title and page numbering
    &SFSY-PAGE& (Page 1) of &SFSY-FORMPAGES(Z4.0)& (Total Page)
    Main windows -> TABLE -> DATA
    In the Loop section, tick Internal table and fill in
    ITAB1 (table in ABAP SMARTFORM calling function) INTO ITAB2
    3. Define table in smartforms
    Global settings :
    Form interface
    Variable name Type assignment Reference type
    ITAB1 TYPE Table Structure
    Global definitions
    Variable name Type assignment Reference type
    ITAB2 TYPE Table Structure
    4. To display the data in the form
    Make used of the Table Painter and declare the Line Type in Tabstrips Table
    e.g. HD_GEN for printing header details,
    IT_GEN for printing data details.
    You have to specify the Line Type in your Text elements in the Tabstrips Output options.
    Tick the New Line and specify the Line Type for outputting the data.
    Declare your output fields in Text elements
    Tabstrips - Output Options
    For different fonts use this Style : IDWTCERTSTYLE
    For Quantity or Amout you can used this variable &GS_ITAB-AMOUNT(12.2)&
    5. Calling SMARTFORMS from your ABAP program
    REPORT ZSMARTFORM.
    Calling SMARTFORMS from your ABAP program.
    Collecting all the table data in your program, and pass once to SMARTFORMS
    SMARTFORMS
    Declare your table type in :-
    Global Settings -> Form Interface
    Global Definintions -> Global Data
    Main Window -> Table -> DATA
    Written by : SAP Hints and Tips on Configuration and ABAP/4 Programming
    http://sapr3.tripod.com
    TABLES: MKPF.
    DATA: FM_NAME TYPE RS38L_FNAM.
    DATA: BEGIN OF INT_MKPF OCCURS 0.
    INCLUDE STRUCTURE MKPF.
    DATA: END OF INT_MKPF.
    SELECT-OPTIONS S_MBLNR FOR MKPF-MBLNR MEMORY ID 001.
    SELECT * FROM MKPF WHERE MBLNR IN S_MBLNR.
    MOVE-CORRESPONDING MKPF TO INT_MKPF.
    APPEND INT_MKPF.
    ENDSELECT.
    At the end of your program.
    Passing data to SMARTFORMS
    call function 'SSF_FUNCTION_MODULE_NAME'
    exporting
    formname = 'ZSMARTFORM'
    VARIANT = ' '
    DIRECT_CALL = ' '
    IMPORTING
    FM_NAME = FM_NAME
    EXCEPTIONS
    NO_FORM = 1
    NO_FUNCTION_MODULE = 2
    OTHERS = 3.
    if sy-subrc <> 0.
    WRITE: / 'ERROR 1'.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    call function FM_NAME
    EXPORTING
    ARCHIVE_INDEX =
    ARCHIVE_INDEX_TAB =
    ARCHIVE_PARAMETERS =
    CONTROL_PARAMETERS =
    MAIL_APPL_OBJ =
    MAIL_RECIPIENT =
    MAIL_SENDER =
    OUTPUT_OPTIONS =
    USER_SETTINGS = 'X'
    IMPORTING
    DOCUMENT_OUTPUT_INFO =
    JOB_OUTPUT_INFO =
    JOB_OUTPUT_OPTIONS =
    TABLES
    GS_MKPF = INT_MKPF
    EXCEPTIONS
    FORMATTING_ERROR = 1
    INTERNAL_ERROR = 2
    SEND_ERROR = 3
    USER_CANCELED = 4
    OTHERS = 5.
    if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    Smartform
    you can check this link here you can see the steps and you can do it the same by looking at it..
    http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html
    SMARTFORMS STEPS.
    1. In Tcode se11 Create a structure(struct) same like the Internal table that you are going to use in your report.
    2. Create Table type(t_struct) of stracture in se11.
    3. In your program declare Internal table(Itab) type table of structure(struct).
    4. Define work area(wa) like line of internal table.
    5. Open Tcode Smartforms
    6. In form Global setting , forminterface Import parameter define Internal table(Itab) like table type of stracture(t_struct).
    7. In form Global setting , Global definitions , in Global data define Work area(wa) like type stracture(struct).
    8. In form pages and window, create Page node by default Page1 is available.
    9. In page node you can create numbers of secondary window. But in form there is only one Main window.
    10. By right click on page you can create windows or Go to Edit, Node, Create.
    11. After creating the window right click on window create table for displaying the data that you are passing through internal table.
    12. In the table Data parameter, loop internal internal table (Itab) into work area(wa).
    13. In table there are three areas Header, Main Area, Footer.
    14. Right click on the Main area create table line by default line type1 is there select it.
    15. Divide line into cells according to your need then for each cell create Text node.
    16. In text node general attribute. Write down fields of your work area(wa) or write any thing you want to display.
    17. Save form and activate it.
    18. Then go to Environment, function module name, there you get the name of function module copy it.
    19. In your program call the function module that you have copied from your form.
    20. In your program in exporting parameter of function pass the internal table(itab).
    SAP Smart Forms is introduced in SAP Basis Release 4.6C as the tool for creating and maintaining forms.
    SAP Smart Forms allow you to execute simple modifications to the form and in the form logic by using simple graphical tools; in 90% of all cases, this won't include any programming effort. Thus, a power user without any programming knowledge can
    configure forms with data from an SAP System for the relevant business processes.
    To print a form, you need a program for data retrieval and a Smart Form that contains the entire from logic. As data retrieval and form logic are separated, you must only adapt the Smart Form if changes to the form logic are necessary. The application program passes the data via a function module interface to the Smart Form. When activating the Smart Form, the system automatically generates a function module. At runtime, the system processes this function module.
    You can insert static and dynamic tables. This includes line feeds in individual table cells, triggering events for table headings and subtotals, and sorting data before output.
    You can check individual nodes as well as the entire form and find any existing errors in the tree structure. The data flow analysis checks whether all fields (variables) have a defined value at the moment they are displayed.
    SAP Smart Forms allow you to include graphics, which you can display either as part of the form or as background graphics. You use background graphics to copy the layout of an existing (scanned) form or to lend forms a company-specific look. During printout, you can suppress the background graphic, if desired.
    SAP Smart Forms also support postage optimizing.
    Also read SAP Note No. 168368 - Smart Forms: New form tool in Release 4.6C
    What Transaction to start SAP Smart Forms?
    Execute transaction SMARTFORMS to start SAP Smart Forms.
    Key Benefits of SAP Smart Forms:
    SAP Smart Forms allows you to reduce considerably the implementation costs of mySAP.com solutions since forms can be adjusted in minimum time.
    You design a form using the graphical Form Painter and the graphical Table Painter. The form logic is represented by a hierarchy structure (tree structure) that consists of individual nodes, such as nodes for global settings, nodes for texts, nodes for output tables, or nodes for graphics.
    To make changes, use Drag & Drop, Copy & Paste, and select different attributes.
    These actions do not include writing of coding lines or using a Script language.
    Using your form description maintained in the Form Builder, Smart Forms generates a function module that encapsulates layout, content and form logic. So you do not need a group of function modules to print a form, but only one.
    For Web publishing, the system provides a generated XML output of the processed form.
    Smart Forms provides a data stream called XML for Smart Forms (XSF) to allow the use of 3rd party printing tools. XSF passes form content from R/3 to an external product without passing any layout information about the Smart Form.
    SmartForms System Fields
    Within a form you can use the field string SFSY with its system fields. During form processing the system replaces these fields with the corresponding values. The field values come from the SAP System or are results of the processing.
    System fields of Smart Forms
    &SFSY-DATE&
    Displays the date. You determine the display format in the user master record.
    &SFSY-TIME&
    Displays the time of day in the form HH:MM:SS.
    &SFSY-PAGE&
    Inserts the number of the current print page into the text. You determine the format of the page number (for example, Arabic, numeric) in the page node.
    &SFSY-FORMPAGES&
    Displays the total number of pages for the currently processed form. This allows you to include texts such as'Page x of y' into your output.
    &SFSY-JOBPAGES&
    Contains the total page number of all forms in the currently processed print request.
    &SFSY-WINDOWNAME&
    Contains the name of the current window (string in the Window field)
    &SFSY-PAGENAME&
    Contains the name of the current page (string in the Page field)
    &SFSY-PAGEBREAK&
    Is set to 'X' after a page break (either automatic [Page 7] or command-controlled [Page 46])
    &SFSY-MAINEND&
    Is set as soon as processing of the main window on the current page ends
    &SFSY-EXCEPTION&
    Contains the name of the raised exception. You must trigger your own exceptions, which you defined in the form interface, using the user_exception macro (syntax: user_exception <exception name >).
    Example Forms Available in Standard SAP R/3
    SF_EXAMPLE_01
    Simple example; invoice with table output of flight booking for one customer
    SF_EXAMPLE_02
    Similar to SF_EXAMPLE_01 but with subtotals
    SF_EXAMPLE_03
    Similar to SF_EXAMPLE_02, whereby several customers are selected in the application program; the form is called for each customer and all form outputs are included in an output request
    check this:
    http://help.sap.com/saphelp_nw04s/helpdata/en/a5/de6838abce021ae10000009b38f842/content.htm
    http://www.sapbrain.com/ARTICLES/TECHNICAL/SMARTFORMS/smartforms.html
    http://www.sapbrain.com/TUTORIALS/TECHNICAL/SMARTFORMS_tutorial.html
    check this linkls------>
    https://www.sdn.sap.com/irj/sdn/collaboration
    http://help.sap.com/saphelp_erp2004/helpdata/en/a9/de6838abce021ae10000009b38f842/frameset.htm
    http://www.sap-img.com/smartforms/sap-smart-forms.htm
    http://www.sap-img.com/smartforms/sap-smart-forms.htm
    Insert Images in smartforms
    regards.
    sowjanya.b.

  • Table Overflow - Page Break - Multiple tables in Body page in Adobe forms

    Hi,
    I have to do a payslip in Adobe forms. I am using only Adobe for print forms.
    Please redirect me to correct category if this is wrong category.
    I am customizing standard form PYXXFO_SAP_PAYSLIP_IN01. (payslip for india through hrforms)
    The standard form is entirely positional. So, if the contents of the table overflow, they are overwritten on the contents below.
    So, I have to make corrections to adjust the payslip for table overflows.
    My changes:
    1. There are total 8 tables in form. I created content areas for each of them and assigned the subforms/tables to those content areas.
    2. I converted the body page from positional to flowed, and applied the related pagebreak settings.
    The problem I am facing:
    When the earnings table overflows, the rest of the content is displayed on second page, in a continuous manner.
    eg.
    The structure of the form is:
    Header details
    earnings table   deductions table   form16 table
    Other tables
    leave details
    now, if the earnings table overflows -
    page 1:
    Header details
    earnings table (page break)
    Page2:
    (continued)earnings table
    page3:
    (continued)earnings table   deductions table   form16 table
    Other tables
    leave details
    In this, the deduction table and form16 table is shown on 3rd page. I wish to show them on the first page as they have not overflown.
    I am sure, I am missing something very small, but I am unable to understand what.
    I tried all the possible combinations.
    Does the main subform needs to be "positional"?
    They way I expect it is:
    page 1:
    Header details
    earnings table (page break)    deductions table   form16 table
    Other tables
    leave details
    Page2:
    {Header details - It would be great if I could have this}
    (continued)earnings table
    page3:
    {Header details}
    (continued)earnings table
    Also, If this is successful, I would like to apply the same feature to rest 6-7 tables.
    Edited by: chinmay kulkarni on Aug 17, 2011 3:04 PM

    This was a duplicate question.
    Kindly remove this thread if possible.
    The solution for this thread is as follows:
    I was sort of hoping that there should be some standard functionality available for this, it being Adobe, but there is not.
    So, I had to run a work around. Quite a lengthy one.
    What the problem was:
    I needed to print around 4-5 tables adjacent to each other in single page and in verticals. What Adobe does is: it fills 1st table, then 2nd then 3rd and so on. So, if there is a page break due to large entries in the adobe, the contents breaks with rest of the tables being blank, but the content being filled sequentially.
    What I did was:
    I created a grand table with the structure having all the tables embedded in it. eg.
    data: begin of grand_table occrs 0,
    table_A type table_a_table_type,
    table_B type table_b_table_type,
    table_c type table_c_table_type,
    end of grand_table.
    Hence, I could include all the data in a one single grand table, and put the data in sequential manner.

  • DBMS_FGA.add_policy .. How to handle multiple tables and multiple users

    Dear All,
    My database is 11gR1 and Linux is the platform.
    I have more then 50 very important tables and around 15 database users.
    I want to implement fine grained auditing on these important tables.
    This is how I am going to implement it:
    SQL>BEGIN
    DBMS_FGA.add_policy(
    object_schema     =>     'Scott',
    object_name     =>     'SAL',
    policy_name     =>     'SALARY_CHK_AUDIT',
    audit_condition     =>     NULL,
    handler_schema     =>     'imran',
    statement_types     =>     'SELECT,INSERT,UPDATE,DELETE',
    audit_column     =>     NULL);
    END;
    what is i have to pass multiple tables in object_schema and multiple users in handler_schema.
    I hope i am able to clear my question, any doubts please let me know.
    Regards, Imran

    Hi,
    object_schema - The schema of the object to be audited. (If NULL, the current log-on user schema is assumed.)
    in case if you like to audit for multiple users - then try to test by holding a null value and test access the important tables -where the relevant auditing records are generated as per your requirement or not. i have not tested.. try it
    - Pavan Kumar N

  • JDBC/Multiple Table References

    I've got a procedure that works through Quest's SQL Navigator, yet gives me exceptions when I try to run it through Java. I have narrowed the problem down to a select statement within the stored procedure that looks like this...
    SELECT
    FROM
    request potential,
    request my_request,
    The problem is arising from the fact that I use a table twice in the from clause, so I can use it in different ways in the where clause later on. Has anyone experienced a similar problem? Any help will be much appreciated, thanks...
    aj

    Hi All,
    I am still getting Mapping Error can you pls help me reslove this. i am using like this in JDBC request
    This is how i am passing SQL qurey in action
    <MT_Base_JDBC_REQ>
    <STATEMENT>
    <TABLENAME  anyName action=u201DSQL_QUERYu201D>
    <ACCESS> here is my SQL Qurary</ACCESS> </anyName></TABLENAME></STATMENT></MT_Base_JDBC_REQ>
    This is i am passing the table name: i have multiple tables so i have create the duplicate Statement structure
    in mappting and i am giving sql statment for every structure and after i am passing the table name
    <STATEMENT>
    <TABLENAME action=u201DSQL_QUERYu201D>
    <table>Table 1</table>
    <access></access>
    </TABLENAME></STATMENT>
    <STATEMENT>
    <TABLENAME action=u201DSQL_QUERYu201D>
    <table>Table 2</table>
    <access></access>
    </TABLENAME></STATMENT>
    like this i have mapped while i have treid to execute the scenario i am getting error in Mapping
    a com.sap.aii.utilxi.misc.api.BaseRuntimeException was thrown: RuntimeException in Message-Mapping transformatio
    Can any one help me to reslove this problem.
    Thanks,
    Venkat.

  • Inserting data from jsp form to multiple tables !

    Hi,
    I want to insert data from jsp form to two tables
    tables are
    (1) Form
    formId (PK)
    deptName
    (2) Data
    formId (FK)
    sNo
    description
    itemCode
    and the problem is that i want to save information form a jsp form to above two tables and i have only one form.
    so how do i insert data from a jsp form to multiple tables.

    You already know what your form in the jsp will be and what fields they are. You also already know what your database looks like. Using one form, you should be able to break the data down, and give it certain ids and/or names, so that when the form is submitted, you retrieve the correct values corresponding to a specific field and insert it.
    Unless there is something else I am not catching, this seems pretty straight forward.

  • Using plsql table and ref cursor in oracle forms 10g

    Hi all,
    Can anyone give me an example of a scenario where we need to create a form manually based on a database stored procedures.
    And in that procedure i have created a pl/sql table and a ref cursor in data base level.
    CREATE OR REPLACE PACKAGE SCOTT.BONUS_PKG IS TYPE bonus_rec
    IS RECORD(
    empno     bonus_EMP.empno%TYPE,
    ename     bonus_EMP.ename%TYPE,
    job     bonus_EMP.job%TYPE,
    sal     bonus_EMP.sal%TYPE,
    comm     bonus_EMP.comm%TYPE);
    TYPE b_cursor IS REF CURSOR RETURN bonus_rec;
    TYPE bontab IS TABLE OF bonus_rec INDEX BY BINARY_INTEGER;
    PROCEDURE bonus_refcur(bonus_data IN OUT b_cursor);
    PROCEDURE bonus_query(bonus_data IN OUT bontab);
    END bonus_pkg;
    CREATE OR REPLACE PACKAGE BODY SCOTT.BONUS_PKG IS
    PROCEDURE bonus_query(bonus_data IN OUT bontab) IS
    ii NUMBER;
    CURSOR bonselect IS
    SELECT empno, ename, job, sal, comm FROM bonus_EMP ORDER BY empno;
    BEGIN
    OPEN bonselect;
    ii := 1;
    LOOP
    FETCH bonselect INTO
    bonus_data( ii ).empno,
    bonus_data( ii ).ename,
    bonus_data( ii ).job,
    bonus_data( ii ).sal,
    bonus_data( ii ).comm;
    EXIT WHEN bonselect%NOTFOUND;
    ii := ii + 1;
    END LOOP;
    END bonus_query;
    PROCEDURE bonus_refcur(bonus_data IN OUT b_cursor) IS
    BEGIN
    OPEN bonus_data FOR SELECT empno, ename, job, sal, comm FROM bonus_EMP ORDER BY empno;
    END bonus_refcur;
    END bonus_pkg;
    i want to populate the data in forms manually not using forms data block wizard and programmatically.
    please reply...

    Can anyone give me an example of a scenario where we need to create a form manually based on a database stored procedures.Typically, you would use a procedure based block when you have a collection of data from multiple tables presented in a Form and your user needs to be able to update the information displayed.
    From your code example, it looks like you are using Oracle Support document "Basing a Block on a Stored Procedure - Sample Code [ID 66887.1]". If this is the case, keep following the document - it walks you through all of the steps. There is no need to Manually configure things that the Data Block Wizard will perform for you!
    i want to populate the data in forms manually not using forms data block wizard and programmatically. Why? Let the Data Block Wizard take care of configuring your block based on a procedure for you. There is no need to manually loop through the data! I've actually done what you are attempting and it was more work than was needed. Let Forms do the work for you. :)
    If you absolutely must do things manually, I recommend you use the PROCEDURE bonus_query(bonus_data IN OUT bontab) instead of the bonus_refcur(bonus_data IN OUT b_cursor) . Then, in your code create a variable of type BONTAB and then call the bonus_query procedure. Then it is a simple case of looping through the table of records returned by the bonus_query procedure. For example:
    DECLARE
       t_bonus    bonus_pkb.bontab;
    BEGIN
       bonus_pkg.bonus_query(t_bonus);
       FOR i in 1 .. t_bonus.count LOOP
          :YOUR_BLOCK.EMPLOYEE_NUMBER := t_bonus(i).empno;
          :YOUR_BLOCK.EMPLOYEE_NAME := t_bonus(i).ename;
          :YOUR_BLOCK.EMPLOYEE_JOB := t_bonus(i).job;
          :YOUR_BLOCK.EMPLOYEE_SALARY := t_bonus(i).sal;
          :YOUR_BLOCK.EMPLOYEE_COMMISSION := t_bonus(i).comm;
       END LOOP;
    END;This code sample demonstrates the basics, but as it is sample code - you will have to adapt it to your situation.
    Also, I strongly recommend you look at the article InoL listed. This is a very comprehensive discussion on REF CURSORs. If you are set on using a procedure based data source - it is more efficient to pass the table of records back to your form than it is to pass a ref cursor. Using a ref cursor, you might as well just using a standard named cursor and loop through your named cursor. The effect is the same (one row returned at a time creating lots of network traffic). Using the table of records is more efficient because the entire data set is returned so network traffic is reduced.
    Hope this helps,
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

  • Create object type from multiple tables for select statement

    Hi there,
    I have 3 tables as given below and I wish to create an object type to group selected columns as 'attribute' from multiple tables. 
    I need to create 2 input parameters to pass in - 'attribute' and 'attribute value'  in PL/SQL and these 2 parameters will be
    passing in with 'column name' and 'column value'.  e.g. 'configuration' - the column name, 'eval' - the column value.
    Then, the PL/SQL will execute the select statement with the column and column value provided to output the record. 
    Pls advise and thank you.
    table ccitemnumber
    name                           null     type                                                                                                   
    ccitemnumber                   not null varchar2(20)                                                                                                                                                                                    
    configuration                           varchar2(20)
    item_type                               varchar2(30)
    table productmodel
    productmodelnumber             not null varchar2(6)                                                                                            
    description                             varchar2(60)  
    accesstimems                            number                                                                                                 
    numberofheads                           varchar2(2)
    generation                              varchar2(10)
    numberofdiscs                           varchar2(2)
    factoryapplication                      varchar2(150)
    table topmodel
    stmodelnumber                  not null varchar2(30)                                                                                           
    productfamily                           varchar2(60
    formfactor                              varchar2(10)                                                                                           
    modelheight                             varchar2(10)                                                                                           
    formattedcapacity                       number                                                                                                 
    formattedcapacity_uom                   varchar2(20)
    object type in database
    configuration                           varchar2(20)
    item_type                               varchar2(30)
    numberofheads                           varchar2(2)
    generation                              varchar2(10)
    numberofdiscs                           varchar2(2)
    factoryapplication                      varchar2(150)
    modelheight                             varchar2(10)
    formattedcapacity                       number                                                                                                 
    formattedcapac

    user12043838 wrote:
    Reason to do this as these fields are required to be grouped together as they are created in different tables. They are treated as 'attribute' (consists of many columns) of the part number. So, the PL/SQL is requested to design in a way able for user to pass in the column name and column value or part number, then the select statement should be able to query for the records. Another reason is a new column can be added easily without keep modifying those effected programs. Reuseable too.This basically equates to ... hard to code, hard to maintain, and poor performance.
    Are you really sure you want to do this? This isn't going to be easy-street as you seem to think it is, but it's a one way street to a poorly performing system with security vulnerabilities (google SQL Injection).
    I would highly recommend you reconsider your design decision here.

  • How can I pass multiple condition in where clause with the join table?

    Hi:
    I need to collect several inputs at run time, and query the record according to the input.
    How can I pass multiple conditions in where clause with the join table?
    Thanks in advance for any help.
    Regards,
    TD

    If you are using SQL-Plus or Reports you can use lexical parameters like:
    SELECT * FROM emp &condition;
    When you run the query it will ask for value of condition and you can enter what every you want. Here is a really fun query:
    SELECT &columns FROM &tables &condition;
    But if you are using Forms. Then you have to change the condition by SET_BLOCK_PROPERTY.
    Best of luck!

  • How to pass multiple selected values of a table to RFC

    Hi all,
    My scenerio is that user selects multiple rows and click a button. i want to pass a unique id of the row to rfc.
    means there are userid is unique in the table.
    i want to paas the userids of all the selected rows to rfc.
    Can any one help me to implement that??
    regards
    Anoop

    Hi
    In the context view the properties of the model node for which you have to pass the table data.
    In the properties you will find a property called Structure from where you can get the structure name..in my example scenario the structre name is
    Zdp_Str_Shopping_Cart
    After adding all the datas to the model node, finally add that instance to the root node....
    You want to pass only the selected data in the table right, for that refer the looping concept suggested by of Ayyapparaj KV
    Zdp_Str_Shopping_Cart shoppingCart;
    for(int i=0;i<wdContext.nodeChnIt_Shopping_Cart().size();i++)
                   shoppingCart = new Zdp_Str_Shopping_Cart();
                   shoppingCart.setEquipment_No(wdContext.nodeChnIt_Shopping_Cart().getChnIt_Shopping_CartElementAt(i).getEquipment_No());
                   shoppingCart.setIbase(wdContext.nodeChnIt_Shopping_Cart().getChnIt_Shopping_CartElementAt(i).getIbase());
                   shoppingCart.setKbetr(wdContext.nodeChnIt_Shopping_Cart().getChnIt_Shopping_CartElementAt(i).getKbetr());
                   shoppingCart.setMaktx(wdContext.nodeChnIt_Shopping_Cart().getChnIt_Shopping_CartElementAt(i).getMaktx());
                   shoppingCart.setMatnr(wdContext.nodeChnIt_Shopping_Cart().getChnIt_Shopping_CartElementAt(i).getMatnr());
                   shoppingCart.setQuantity(wdContext.nodeChnIt_Shopping_Cart().getChnIt_Shopping_CartElementAt(i).getQuantity());
                   shoppingCart.setSerial_No(wdContext.nodeChnIt_Shopping_Cart().getChnIt_Shopping_CartElementAt(i).getSerial_No());
                   shoppingCart.setUnit(wdContext.nodeChnIt_Shopping_Cart().getChnIt_Shopping_CartElementAt(i).getUnit());
                   shoppingCart.setUnit_Of_Wt(wdContext.nodeChnIt_Shopping_Cart().getChnIt_Shopping_CartElementAt(i).getUnit_Of_Wt());
                   shoppingCart.setWaers(wdContext.nodeChnIt_Shopping_Cart().getChnIt_Shopping_CartElementAt(i).getWaers());
                   shoppingCart.setWeight(wdContext.nodeChnIt_Shopping_Cart().getChnIt_Shopping_CartElementAt(i).getWeight());
                   createProductOrder.addIt_Shopping_Cart(shoppingCart);           
              wdContext.nodeZdp_Bapi_Create_Product_Order_Input().bind(createProductOrder);
    Let me know whether you got an idea and your problem get solved......
    Regards
    Chandran S

  • Reg : Passing multiple rows of table data to the RFC

    Hi,
    I am passing one row of data from webdynpro table to table of RFC.
    How to pass multiple rows of data.
    Please help me out.
    Thanks
    Risha

    hi
    Person--->node(cardinality 1..n)
    FirstName-->Attribute
    LastName-->Attribute.
    Person1-->RFC table node.(cardinality 1..n)
    FName-->Attribute
    LName-->Attribute
    for(int i=0;i<wdContext.nodePerson().size();i++)
    //Retrieving values from table
       IPrivate<View>.IPersonElement    element1=wdContext.nodePerson().createPersonElement();
       String fname=element1.getFirstName();
       String lname= element1.getLastName();
       wdContext.nodePerson().addElement(element1);
    //Inserting into table of RFC
       IPrivate<View>.IPerson1Element element2=wdContext.nodePerson1().createPerson1Element();
       element2.setFname(fname);
       element2.setLname(lname);
       wdContext.nodePerson1().addElement(element2);
    Regards
    sowmya.

Maybe you are looking for

  • Enterprise Project Connection 2.0 - Architecture

    Hi, We are implementing EPC 2.0 to link between Oracle Primavera & SAP PM for turnaround scheduling. We have 1 ECC instance that used by different users from our offices around the globe. I couldn't find here SAP Enterprise Project Connection 2.0 – S

  • Mac OS X 10.6 with Firefox 30. Issues with LI Dropdown menus. Menus do not display at all.

    We have a horizontal navigation menu in our application. The dropdowns are constructed using a UI LI menu. This used to work in all browsers up until a few days ago. Now the dropdown will not display. Only the top level menu. The user has Mac OS X Se

  • Importing / Transferring Keyboard Shortcuts into Photoshop CS5

    Hello, i am testing out Photoshop 5 and it looks good so far, yet some obstacles are left to solve. For example i wonder how to get the keyboard shortcuts from my old Photoshop (the .kys file) into the PS5? There is no import. I would even manually t

  • Exchange variant context menu option in Process Chains

    Hello Masters, I would like to know about the context menu option Exchange variant in Process Chains. Could you please educate me on this. Thanks and best wishes, i-bi

  • ListView keyboard access

    Hello Dave, i have to use the Enter-Button in all my Application. The second part of your message is the right solution. You have to create an <enter_button> - widget. 1. Create an Enter-Button Widget in the Windows-Workshop and set it to the default