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!!!

Similar Messages

  • 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 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 submit a report ,Passing the internal tables from parent report

    How to submit a report ,Passing the internal tables from the parent report ?

    The SUBMIT statement executes a report from within a report. i.e. you could have a drill-down which
    calls another report. Can only execute reports of type '1'.
    *Code used to execute a report
    SUBMIT Zreport.
    *Code used to populate 'select-options' & execute report
    DATA: seltab type table of rsparams,
          seltab_wa like line of seltab.
      seltab_wa-selname = 'PNPPERNR'.
      seltab_wa-sign    = 'I'.
      seltab_wa-option  = 'EQ'.
    load each personnel number accessed from the structure into
    parameters to be used in the report
      loop at pnppernr.
        seltab_wa-low = pnppernr-low.
        append seltab_wa to seltab.
      endloop.
      SUBMIT zreport with selection-table seltab
                                    via selection-screen.
    *Code used to populate 'parameters' & execute report
    SUBMIT zreport with p_param1 = 'value'
                    with p_param2 = 'value'.
    Other additions for SUBMIT
    *Submit report and return to current program afterwards
    SUBMIT zreport AND RETURN.
    *Submit report via its own selection screen
    SUBMIT zreport VIA SELECTION-SCREEN.
    *Submit report using selection screen variant
    SUBMIT zreport USING SELECTION-SET 'VARIANT1'.
    *Submit report but export resultant list to memory, rather than
    *it being displayed on screen
    SUBMIT zreport EXPORTING LIST TO MEMORY.
    Once report has finished and control has returned to calling
    program, use function modules LIST_FROM_MEMORY, WRITE_LIST and
    DISPLAY_LIST to retrieve and display report.
    *Example Code (Retrieving list from memory)
    DATA  BEGIN OF itab_list OCCURS 0.
            INCLUDE STRUCTURE abaplist.
    DATA  END OF itab_list.
    DATA: BEGIN OF vlist OCCURS 0,
            filler1(01)   TYPE c,
            field1(06)    TYPE c,
            filler(08)    TYPE c,
            field2(10)    TYPE c,
            filler3(01)   TYPE c,
            field3(10)    TYPE c,
            filler4(01)   TYPE c,
            field4(3)     TYPE c,
            filler5(02)   TYPE c,
            field5(15)    TYPE c,
            filler6(02)   TYPE c,
            field6(30)    TYPE c,
            filler7(43)   TYPE c,
            field7(10)    TYPE c,
          END OF vlist.
    SUBMIT zreport EXPORTING LIST TO MEMORY.
    CALL FUNCTION 'LIST_FROM_MEMORY'
      TABLES
        listobject = itab_list
      EXCEPTIONS
        not_found  = 4
        OTHERS     = 8.
    CALL FUNCTION 'LIST_TO_ASCI'
      EXPORTING
        list_index         = -1
      TABLES
        listasci           = vlist
        listobject         = itab_list
      EXCEPTIONS
        empty_list         = 1
        list_index_invalid = 2
        OTHERS             = 3.
    IF sy-subrc NE '0'.
      WRITE:/ 'LIST_TO_ASCI error !! ', sy-subrc.
    ENDIF.
    Submit report as job
    *Submit report as job(i.e. in background)
    data: jobname like tbtcjob-jobname value
                                 ' TRANSFER TRANSLATION'.
    data: jobcount like tbtcjob-jobcount,
          host like msxxlist-host.
    data: begin of starttime.
            include structure tbtcstrt.
    data: end of starttime.
    data: starttimeimmediate like btch0000-char1.
    Job open
      call function 'JOB_OPEN'
           exporting
                delanfrep        = ' '
                jobgroup         = ' '
                jobname          = jobname
                sdlstrtdt        = sy-datum
                sdlstrttm        = sy-uzeit
           importing
                jobcount         = jobcount
           exceptions
                cant_create_job  = 01
                invalid_job_data = 02
                jobname_missing  = 03.
      if sy-subrc ne 0.
                                           "error processing
      endif.
    Insert process into job
    SUBMIT zreport and return
                    with p_param1 = 'value'
                    with p_param2 = 'value'
                    user sy-uname
                    via job jobname
                    number jobcount.
      if sy-subrc > 0.
                                           "error processing
      endif.
    Close job
      starttime-sdlstrtdt = sy-datum + 1.
      starttime-sdlstrttm = '220000'.
      call function 'JOB_CLOSE'
           exporting
                event_id             = starttime-eventid
                event_param          = starttime-eventparm
                event_periodic       = starttime-periodic
                jobcount             = jobcount
                jobname              = jobname
                laststrtdt           = starttime-laststrtdt
                laststrttm           = starttime-laststrttm
                prddays              = 1
                prdhours             = 0
                prdmins              = 0
                prdmonths            = 0
                prdweeks             = 0
                sdlstrtdt            = starttime-sdlstrtdt
                sdlstrttm            = starttime-sdlstrttm
                strtimmed            = starttimeimmediate
                targetsystem         = host
           exceptions
                cant_start_immediate = 01
                invalid_startdate    = 02
                jobname_missing      = 03
                job_close_failed     = 04
                job_nosteps          = 05
                job_notex            = 06
                lock_failed          = 07
                others               = 99.
      if sy-subrc eq 0.
                                           "error processing
      endif.

  • 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 the primary key from a report to multiple forms

    I am trying to build an application that tracks a person's training records. I have a report and 3 forms (all tabbed). From the report I can click the edit link to modify a person. Is there a way I can pass the primary key of the person (from the report) to the other forms? Hope what I'm trying to do is clear.
    Thanks.

    Hi,
    You can specify items from other pages also.
    Did you use that popup to pick item ?
    Did you noticed that it filter by page where your link point. You can remove filter from popup and then select other items.
    Or just manually type your item names
    Br, Jari
    Edited by: jarola on Nov 11, 2009 1:08 AM

  • 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

  • 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 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.

  • Pass the internal table with different structures to the class module

    Hi ,
    I have created a class method to fill up the data in XML format. the method can be called from various programs with internal table with different structures. I want to pass it as dynamic How can I do that.
    I tried to declare that as type any.
    but not working.
    regards,
    Madhuri

    Hi,
    You could work with data reference.
    Use GET REFERENCE OF itab INTO data_ref for passing the internal table to your method, and dereference it within the method with ASSIGN statement...
    DATA: lr_data TYPE REF TO data.
    GET REFERENCE OF itab INTO lr_data.
    CALL METHOD meth EXPORTING pr_data = lr_data.
    METHOD meth.
      FIELD-SYMBOLS <fs> TYPE ANY TABLE
      ASSIGN pr_data->* TO <fs>.
    ENDMETHOD.
    Kr,
    Manu.

  • 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

  • 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 import the internal table into subroutine as parameter

    how to import the internal table into subroutine as parameter, and its structure can be recognized inside the subroutine

    Hi Yong,
    try this:
    parameters: p_tabnm like dd03l-tabname.
    field-symbols: <fs_tabname> type standard table.
    data: itab_ref type ref to data.
    create data itab_ref type standard table of (p_tabnm)
                         with default key.
    assign itab_ref->* to <fs_tabname>.
    select * from (p_tabnm) into table <fs_tabname>.
    perform subroutine tables <fs_tabname>
                       using p_tabnm.
    *&      Form  subroutine
          text
         -->P_<FS_TABNAME>  text
         -->P_P_TABNM  text
    form subroutine  tables   p_tabname type standard table
                     using    p_tabnm.
    Here p_tabname already has the structure of the table you gave as input
    parameter
    endform.                    " subroutine

  • How to Read the internal table for the data download from the spool

    HI all,
    I have one issue regarding the spool ,we are getting the correct output as per requirement of  user but when we send the same to the user in pdf format they did notget the same.
    they are telling that the due date is missing from the pdf.
    Please advice me how to track the internal  table for the spool data converted intopdf in a readable format.
    the FM used for the above task is : 
    call function 'CONVERT_OTFSPOOLJOB_2_PDF'
    Please reply if any one worked on the same.
    Thanks in advance.
    Gaurav,

    Hi Wang,
    Please let me know how you solved your question.
    Points will be rewarded.
    Thanks,
    Arun.

  • How to structure the internal table issue I want to download to excel

    Hi ,
    I am trying to download the data from the internal table whose structure was
    i HAVE ONE INTERNAL TABLE WHICH IS
    123 ABC MIKE
    123 ABC DALLAS
    123 ABC BOMBAY
    345 BCD MEENAL
    345 BCD SHINDE
    345 BCD UJWALA
    I want the output the i WANT THE INTERNAL TABLE TO STRUCTURE IN THIS WAY
    123 ABC  MIKE
                   DALLAS
                   BOMBAY
    345 BCD  MEENAL
                   SHINDE
                   UJWALA

    U have to fill internal table as ..
    Loop at ITAB. <-- contains all the values
      at new field2.
        itab1 = itab.
        append itab1.
        clear itab1.
        continue.
      endat.
      clear : itab-field1 , itab-field2.
      itab1 = itab.
      append itab1.
      clear itab1.
    endloop.
    Now download ITAB1.

Maybe you are looking for