How to pass a internal table used in one method to another method in a view

hi all,
Is it possible to pass a internal table from one method to another method in a view??
If so , kindly help me.

Hi Bala,
If you want to pass this internal table between different methods of the same view then write the contents of this internal table to a context node of your view using BIND_TABLE. You can then read the contents of this internal table from the other method using the reference of that node & the GET_STATIC_ATTRIBUTES_TABLE method.
However if you want to pass the internal table between methods of different views then create a context node at the COMPONENTCONTROLLER level & then do a context mapping of this node to your local views context in both your views. You can follow the same BIND_TABLE & GET_STATIC_ATTRIBUTES_TABLE methods approach.
Regards,
Uday

Similar Messages

  • How to pass an internal table to  LVC_FIELDCATALOG_MERGE

    Hi Abap'ers
       I want to know how to pass an internal table to the function module LVC_FIELDCATALOG_MERGE, as like we do in the FM REUSE_ALV_FIELDCATALOG_MERGE.
    For Eg
    v_name = 'I_OUTPUT'.
    call function 'REUSE_ALV_FIELDCATALOG_MERGE'
           exporting
                i_program_name         = wrk_repid
                i_internal_tabname     = v_name
                i_inclname             = wrk_repid
           changing
                ct_fieldcat            = wrk_fld_cat
           exceptions
                inconsistent_interface = 1
                program_error          = 2
                others                 = 3.
    Where I_OUTPUT  is the internal table name.

    Re: LVC_FIELDCATALOG_MERGE with internal table
    Check this
    In PBO,
      Building the field catalog
        PERFORM f9001_build_field_cat TABLES i_fieldcat
                                USING 'ZCSA_MARKETIING_EXPENSE_OUTPUT'
    FORM f9001_build_field_cat TABLES   p_fieldcat STRUCTURE lvc_s_fcat
                          USING value(p_structure).
      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
           EXPORTING
                i_structure_name       = p_structure
           CHANGING
                ct_fieldcat            = p_fieldcat[]
           EXCEPTIONS
                inconsistent_interface = 1
                program_error          = 2
                OTHERS                 = 3.
      IF sy-subrc <> 0.
        MESSAGE i013 WITH text-e05."Error in ALV field catalogue creation
        LEAVE LIST-PROCESSING.
      ENDIF.
    ENDFORM.                    " f9001_build_field_cat
    U can create a structure or example pass MARA then it will take the structure of MARA.

  • How to pass an internal table to a SmartForm?

    Hi there!
    I have a program that calls a SmartForm.
    I have a internal table wich I want to print.
    This internal table is based on a custom structure with NO standard includes (e.g., with custom fields).
    How do I declare this internal table in the transaction SMARTFORMS?
    Best Regards,
    Luís.

    Refer below thread..
    How to pass an internal table to smartform.
    hope it will solve ur problem
    Thanks & Regards
    ilesh 24x7

  • How to pass the internal table data to smartforms

    Hi Gurus,
    I have a problem in passing the internal table data to the smartforms. In the print program
    I get the data into one internal table "LT_PRDLBL1". I am passing this internal table to the other in print program by calling the FM_NAME.
    CALL FUNCTION fm_name
      EXPORTING
      ARCHIVE_INDEX              =
      ARCHIVE_INDEX_TAB          =
      ARCHIVE_PARAMETERS         =
        CONTROL_PARAMETERS         = T_SSFCTRLOP
      MAIL_APPL_OBJ              =
      MAIL_RECIPIENT             =
      MAIL_SENDER                =
        OUTPUT_OPTIONS             = T_SSFCOMPOP
        USER_SETTINGS              = ' '
    IMPORTING
      DOCUMENT_OUTPUT_INFO       =
      JOB_OUTPUT_INFO            =
      JOB_OUTPUT_OPTIONS         =
      TABLES
        LT_PRDLBL                 = LT_PRDLBL1
    EXCEPTIONS
       FORMATTING_ERROR           = 1
       INTERNAL_ERROR             = 2
       SEND_ERROR                 = 3
       USER_CANCELED              = 4
       OTHERS                     = 5
    In the print program I had defined the internal tables like
    Data: lt_prdlbl  type standard table of zprdlbl.
    Data: Begin of lt_prdlbl1 occurs 0.
            include structure zprdlbl.
    Data: End of lt_prdlbl1.
    How do I define the internal table in the smartform to get the values printed in the smartform?.
    <REMOVED BY MODERATOR>
    Thanks,
    Edited by: Alvaro Tejada Galindo on Apr 21, 2008 1:01 PM

    Nehal,
    Thanks for quick response.
    In the smartform under the Form Interface->Tables tab
    I had defined
    LT_PRDLBL LIKE ZPRDLBL. If I define TYPE instead of LIKE I get the error message saying "FLAT TYPES may only be referenced using LIKE for table parameters".
    In the main window I have created LOOP, in which I have ticked the internal table and
    LT_PRDLBL INTO LT_PRDLBL. In the text node I am passing the values of this internal table
    &LT_PRDLBL-XXXX&.
    I am able to get the print but the data is not printing.
    Please help me with this.
    Thanks,

  • How to pass the internal table defined in program to ALV

    Hi Friends,
    I have a doubt regaring the ALV's,
    How can we pass the internal table defined in the program to ALV by not filling the attribute (I_STRUCTURE_NAME) in the REUSE_ALV_LIST_DISPLAY.
    I have tried many ways but unable to pass the structure of the internal table. I am getting the error message "Field Catalog Not Specified......" and its terminating and when i am giving the I_STRUCTURE_NAME = 'INTERNAL-TABLE-NAME' then its displaying a blank screen with all the tool-bars and icons...(No output of internal table data is seen on the screen) .
    and when i am passing the DDIC table or structure ( for eg. LFA1) to I_STRUCTURE_NAME then its displaying with any error.
    Plaese help in resolving this problem....
    Regards
    Pradeep Goli

    Hi,
    Check this thread which gives example of ALV. This will give you an idea.
    Interactive ALV
    ashish

  • How to pass a internal table into Java Bean

    Hi Experts,
    I created a JSPDyn page to display Sales orders form R/3 using bapi_sales_order_getlist.
    I used JCO to establish connectivity between JSP Dynpage and R/3. I executed the bapi successfully, i want to move the sales orders retrieved from the Bapi to a Java Bean. So that i can use the bean to populate the value as a table.
    with regards,
    James.
    Valuable answers will be rewarded.....

    Hi Bala,
    If you want to pass this internal table between different methods of the same view then write the contents of this internal table to a context node of your view using BIND_TABLE. You can then read the contents of this internal table from the other method using the reference of that node & the GET_STATIC_ATTRIBUTES_TABLE method.
    However if you want to pass the internal table between methods of different views then create a context node at the COMPONENTCONTROLLER level & then do a context mapping of this node to your local views context in both your views. You can follow the same BIND_TABLE & GET_STATIC_ATTRIBUTES_TABLE methods approach.
    Regards,
    Uday

  • How to Pass the Internal table of a report to Smart Form

    Hi Experts,
    I have one report in which from selection screen i am getting the values from the users, and upon that values i am filling data in to the internal table.
    Now i want to pass that internal table data to the smart form
    and print that data in the smart form.
    So could you pls give me some pseudo code or any steps to achieve it.
    Thanks & Regards,
    DS

    Hi DS,
    First of all you need to create a SF and then need to call the FM generated by the FM in your report.
    In the SF in the form interface>tables tab>mention the name of the table and its type structure.
    Pls note that a new structure has to be created as the same type of your internal table which holds the data.
    And the import and export parameters as just the same as in a FM.
    Now after you create and activate your SF a FM will be generated (wen u execute your SF you will be taken to this SE37 screen with the name of FM so no probs..)
    You can call this FM in your report. Hope this helps.
    Ex:
    say itab has your final data, and you also want to export a variable var1 to the SF.
    after your normal report operations end, call the FM and pass on these data.
    say your FM name is FM1.
    call function FM1
    exporting
    var1 = var1
    tables
    itab1 = itab1.
    pls note that in the SF also i gave the same names, it is not mandatory to give the same names.
    and as you want to print a table in the smartforms, you need to create a table in the smart forms and then display the data which is quite simple.
    Hope this helps...
    if you need any further explanations, pls revert...
    Regards,
    Narendra.
    Reward points if helpful!!!

  • How to Pass the internal table data?

    DearAll,
    How to pass the Data of one internal table on a 1.html page to another html page for output, in BSP Application.
    regards.

    Hi ,
    In the onInputProcessing event of the first page , write the following code...
    call method NAVIGATION->SET_PARAMETER exporting
        name = 'it_filt_cur'
        value = it_filt_cur.
    Here it_filt_cur is internal table.
              NAVIGATION->GOTO_PAGE('next.htm').
    In the next page , you can make the internal table as auto in the attributes.
    Since you have made the itab as auto transfer , you can directly access the itab in the initialization event of the next page if it is stateless.
    Regards,
    Laxman Nayak.
    Message was edited by: Laxman  Nayak

  • How to pass an internal table to "submit job"

    Dear Expert,
    I use open_job & close_job to submit a background job.
    A text file is to be uploaded from local drive.
    Since we cant perform upload during the background,
    I will have to upload the file from local drive in foreground, and then submit to the background job.
    I tried to use Export [internal table] to memory and Import from  the background job, it doesnt work.
    How can I do this ??
    Thank you.

    hi ,
    you can do this using the open dataset...
    i think it is the best one..
    open dataset p_file  for input in text mode encoding default .
    loop at p_file.
    output0(10) = p_file0(10).
    output10(20) = p_file20(10).
    output30(10). = p_file30(10).
    output40(10). = p_file40(10).
    endloop.
    close p_file.
    regards,
    venkat.

  • How to pass an internal table(AbstractList type) as input to RFC??

    Hi,
    I need to call an RFC which accepts a internal table as input(of AbstractList type as input). Please tell me the best and easy way of passing this as input.
    internal table name : Li_mailer
    type structure      : Solisti1
    Please help me in this.
    Regards,
    Narahari

    Hi Narahari,
    I assume you have already populated your table in WebDynpro.
    Your code should be like this
    <ModelNode>_Input input = new <ModelNode>_Input();
    int nodeSize = wdContext.node<Li_mailer>().size();
    for(int index=0; index<nodeSize; index++){
    Solisti1 w_solist = new Solisti1();
    WDCopyService.copyCorresponding(wdContext.node<Li_mailer>().get<Li_mailer>()ElementAt(index), w_solist);
    input.add<Li_mailer>(w_solist);               
    try{
    input.execute;
    wdContext.<ModelNode>_Input.bind(input);
    wdContext.nodeOutput().invalidate();
    catch (WDDynamicRFCExecuteException ex){
    This will work.
    Regards,
    Shubham

  • How to pass a cluster of data from one VI to another

    Hi all,
    I've got a cluster of controls on my main application VI that I am using to accept data of various types from the user.Next I want to pass this cluster to the input cluster control of another VI perfectly on the generation of a user event. That is, if I have 3 numbers, 2 strings and 2 time stamps in the cluster on the main VI, I want to pass on that exact same data to the control input cluster of the second VI in the same sequence, having the same values.
    How do I do this?
    Here is a snapshot showing the cluster controls on my main VI and the code for my second VI.
    I want to pass the data into the input cluster 'data'. I tried calling the second VI into my main VI and directly hardwiring the cluster and then using an 'Unbundle by Name function' to separate the data, as shown. But this doesn't seem to work properly.
    Regards. 
    Solved!
    Go to Solution.

    The 2 clusters much be identical, then it should work smoothly. To ensure that they are, make a type-def of the cluster and use for both. From what i can see of your code it's clean and correct and it really shouldn't cause a hassle. What's (not) happening?
    /Y
    LabVIEW 8.2 - 2014
    "Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
    G# - Free award winning reference based OOP for LV

  • ABAP OO: how to pass a internal table with objects as a method parameter

    Hello all,
    I have a class "ZCL_VEHICLE", this class contains the attribute WHEELS.
    This attribute contains objects of the class ZCL_WHEEL.
    (definition: data WHEELS TYPE TABLE OF REF TO zcl_wheel.).
    I now need a method that gives this table back (as return or export parameter). How can I define a parameter for this method that will contain this table?
    Thanks for the help.
    Best regards,
    Wim

    Hi Wim
    Excuse me! I understood you wanted to define it in a program, not in a class.
    You can define your type into CLASS (use the same statament: go to TYPES (there's a pushbotton on status gui).
    TYPES: MY_WHEELS TYPE TABLE OF REF TO .....
    Now you can use this type to create a parameter like that, but you can use that type for an object of class defined as PRIVATE.
    Infact if your object is public, you'll use it in a your program, so you'll probably have to define a variable like the type defined in the class.
    It shouldn't make sense to define the same type for two times or more (one in the class, the others in each program uses your class). So you should define your type in dictionary (all abap object could use it).
    If you think to have to use your class in few program (perhaps in olny one), you shuold consider to create your class as local class.
    Max
    Message was edited by: max bianchi

  • How to export internal table and pass the internal table to another screen?

    Hi,
    I have a sql SELECT statement that select data from table into internal table. I would like to export out the internal table and pass to another screen and display the data in ALV list. How to export it out? I try but the error given was " The type of "OUT_SELECT_ITAB" cannot be converted to the type of  "itab_result".
    Another question is, how to pass the internal table that i export out from the function module to another screen?
    Here is the code
    ==============================================================
    FUNCTION ZNEW_SELECT_ZSTUD00.
    ""Local Interface:
    *"  IMPORTING
    *"     REFERENCE(IN_SELECT_YEAR) TYPE  ZSTUD00-EYEAR
    *"  EXPORTING
    *"     REFERENCE(OUT_RESULT) TYPE  CHAR9
    *"     REFERENCE(OUT_SELECT_ITAB) TYPE  ZSTUD00
    *& Global Declarations
    DATA: itab TYPE ZSTUD00,
          itab_result TYPE TABLE OF ZSTUD00.
    *& Processing Blocks called by the Runtime Environment
    itab-eyear = IN_SELECT_YEAR.
    SELECT *
    FROM ZSTUD00
    INTO TABLE itab_result
    WHERE eyear = IN_SELECT_YEAR.
    IF sy-subrc = 0.
      out_result = 'Success'.
      OUT_SELECT_ITAB = itab_result.
    ELSE.
      out_result = 'Fail'.
    ENDIF.
    ENDFUNCTION.
    ===============================================================
    Please advise. Thanks
    Regards,
    Rayden

    Hi Nagaraj,
    I try to change it in Tables tab page but it state that TABLES parameters are obsolete. when i "Enter". I try to "Enter" again. it seem to be ok but it stil give me the same error.
    ================================================================
    FUNCTION ZNEW_SELECT_ZSTUD00.
    ""Local Interface:
    *"  IMPORTING
    *"     REFERENCE(IN_SELECT_YEAR) TYPE  ZSTUD00-EYEAR
    *"  EXPORTING
    *"     REFERENCE(OUT_RESULT) TYPE  CHAR9
    *"  TABLES
    *"      OUT_SELECT_ITAB STRUCTURE  ZSTUD00
    *& Global Declarations
    DATA: itab TYPE ZSTUD00,
          itab_result TYPE TABLE OF ZSTUD00.
    *& Processing Blocks called by the Runtime Environment
    itab-eyear = IN_SELECT_YEAR.
    SELECT *
    FROM ZSTUD00
    INTO TABLE itab_result
    WHERE eyear = IN_SELECT_YEAR.
    IF sy-subrc = 0.
      out_result = 'Success'.
      OUT_SELECT_ITAB = itab_result.
    ELSE.
      out_result = 'Fail'.
    ENDIF.
    ENDFUNCTION.
    ===============================================================
    regards,
    Rayden

  • Regarding passing an internal table from print program to smartform....

    Hi All,
    can any body let me how to pass an internal table to the smartform, i have processed the data in the print program then i want to pass the final internal table from the print program to smartform and with that data in the internal table i have to process it in the smartform (i want to get some more data based on the internal table data from the print program) and then i will display finally.
    for example: i have it_qals which contains all the lot numbers which is processed in teh printprogram, now i want to pass all these (it_qals) lotnumbers to smartform , and in the smartform i will use the lotnumbers in the it_qals table and will process other data accordingly 
    can any body help me plzz.. its very urgent

    Chek this code i am coping my whole program here.
    REPORT ZDP_SMARTFORMS_REPORT3 .
    TABLES: MARA,
    MAKT.
    DATA: FNAME TYPE RS38L_FNAM.
    DATA: BEGIN OF ITJOIN OCCURS 0.
    INCLUDE STRUCTURE ZDP_JOIN__IN_SMARTFORM.
    INCLUDE STRUCTURE MARA.
    INCLUDE STRUCTURE MAKT.
    data: END OF ITJOIN.
    *DATA: BEGIN OF ITJOIN OCCURS 0,
    MATNR LIKE MARA-MATNR,
    END OF ITJOIN.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    SELECT-OPTIONS: MAT FOR MARA-MATNR.
    SELECTION-SCREEN END OF BLOCK B1.
    SELECT MARA~MATNR MAKTX "UP TO 5 ROWS
    FROM MARA JOIN MAKT ON MARAMATNR = MAKTMATNR
    INTO TABLE ITJOIN
    WHERE MARAMATNR IN MAT and maktspras eq 'EN'.
    into corresponding fields of table it
    *SELECT MATNR UP TO 5 ROWS FROM MARA INTO TABLE ITJOIN
    WHERE MATNR IN MAT.
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    EXPORTING
    FORMNAME = 'ZDP_SMARTFORMS_3'
    VARIANT = ' '
    DIRECT_CALL = ' '
    IMPORTING
    FM_NAME = FNAME
    EXCEPTIONS
    NO_FORM = 1
    NO_FUNCTION_MODULE = 2
    OTHERS = 3
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    not necessar y above function if u copy function name from
    **- smartforms>environment>function name
    CALL FUNCTION '/1BCDWB/SF00000037'
    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
    ITJ = ITJOIN
    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.
    Also check these links
    Check out this link,
    http://www.erpgenie.com/abap/smartforms.htm
    and also refer these threads,
    Passing table to smartform
    PASSING INTERNAL TABLE IN SMARTFORM
    Hope this helps.
    ashish

  • Passing an internal table WITH HEADER LINE to abap object

    Hi. In another thread, it was explained how to pass an internal table to an abap object method. Is it possible to pass an internal table that has a header line, and RETAIN the header line once the table has been passed?
    My problem is, that I can pass the table, update it, but the read buffer is not populated when returning from the object's method. This is the result of being able to pass a STANDARD TABLE type, but not a STANDARD TABLE WITH HEADER LINE.
    This means that I have to read the table into a work area instead of doing a READ TABLE LKNA1 within the method, which is what I need to do.
    Thanks.

    Please check this sample program, notice that it is modifing the internal table and passing it back modified as well as passing the "work area" or "header line" back thru the exporting parameter.
    report zrich_0001.
    *       CLASS lcl_app DEFINITION
    class lcl_app definition.
      public section.
        types: t_t001 type table of t001.
        class-data: it001 type table of t001.
        class-data: xt001 like line of it001.
        class-methods: change_table
                                    exporting ex_wt001 type t001
                                    changing im_t001 type t_t001.
    endclass.
    data: w_t001 type t001.
    data: a_t001 type table of t001 with header line.
    start-of-selection.
      select * into table a_t001 from t001.
      call method lcl_app=>change_table
                 importing
                     ex_wt001 = w_t001
                 changing
                     im_t001  = a_t001[] .
      check sy-subrc  = 0.
    *       CLASS lcl_app IMPLEMENTATION
    class lcl_app implementation.
      method change_table.
        loop at im_t001 into xt001.
          concatenate xt001-butxt 'Changed'
               into xt001-butxt separated by space.
          modify im_t001 from xt001.
        endloop.
        ex_wt001 = xt001.
      endmethod.
    endclass.
    Regards,
    Rich Heilman

Maybe you are looking for

  • Keywords in Adobe Bridge CC and Lightroom 5 not working

    I recently upgraded to Adobe CC. We use Bridge and Lightroom regularly to tether while shooting, batch process and search for images. I have noticed that files I have keyworded in Bridge will randomly lose the keywords attributed with them. When we s

  • Value of the start in the Select with in a Hierarchical Query

    Exist any way for put in the select the value of the start with in a Hierarchical Query? An example: I'll need sth like CTH@> select n code, level, np code_parent, 1 code_first_parent 2 from demo 3 start with n=1 4 connect by np = prior n 5 ; CODE LE

  • Dynamic recordset for a loop

    Hi, I need to loop into a recordset, but I know in which recordset just at the execution time. I mean, depending on a condition I can loop into different recordset, but executing same code. And I wouldn't write the same code twice. Here a little exam

  • PLEASE HELP! LIVE won't work in LOGIC anymore

    Hi, This is my problem: I happily worked on my MacBook Pro (2.33 GHz Tiger 10.4.11) for a long time, using Ableton LIVE as a ReWire slave to LOGIC and everything worked just fine. I recently got myself a Mac Pro (2 x 3.2 GHz Quad-core 4 GB RAM) and o

  • Higher Secondary Education Cess not flowing in Excise Invoice

    Dear All, When I create my excise invoice the higher secondary education cess is not flowing in my excise invoice.The BED and the Secondary education Cess of 2% is flowing in the excise invoice.Please let me know why this amount is not flowing in the