Can't we pass custom defined internal table in SMARTFORM Interface

Hi,
     I have a scenario, that my internal table from the program is is not dictionary type, but combination of some fields. Can't I directly pass this table to my smartform.
Thank U 4 Ur time.
Cheers,
Sam

hi,
We can not pass the Internal tables to a Smartforms, you need to create the Structure and give the Structure in the Smartform, and declare the the internal table of that structure type and pass it
Regards
Sudheer

Similar Messages

  • How to Define Internal Table in Smartform

    Hello,
    I have some problem on define Internal Table in Smartform
    I define a Temp_IT_Gen Type LBBIL_IT_GEN in Global Definiations
    but i find that it is not available for me to append data into it,
    the error message is Temp_IT_Gen is not a Internal Table - the Occurs n Specification is missing
    so how can i solve it?
    i want to use the internal table in the hold program.
    Thanks a lot in advance.

    Hi,
    First U define the Table type in 'TYPES' tab of Global Definitions and then assing that table type to Internal table in 'Global Data' tab.
    Eg:
    define the Table Type like below in TYPES tab.
    TYPES:BEGIN OF ty_TEMP.
            INCLUDE STRUCTURE XXXXXXX.
    TYPES:END OF ty_TEMP.
    TYPES: g_t_temp TYPE STANDARD TABLE OF ty_TEMP .
    Now, define the Internal table in Global Data tab like below:
    Variable Name    Type assignment    Associated Type
    G_T_ITEM_1       TYPE                    G_T_TEMP
    NOTE: whatever U define in Global Definitions can be used only in SMARTFORM, if u want to use it in Program U must define in Form Interface.
    Hope it helps!!
    Rgds,
    Pavan

  • How to define internal table in smartform(urgent)

    Hi all,
    How can i define a internal table <b>with header line </b> in global data ???
    i defined like
    In Types,
    TYPES : BEGIN OF T_XVBPLP2 ,
             VENUM(10),
             VEPOS(10),
             POSNR(6),
             VEMNG LIKE LIPS-LFIMG,
             MATNR LIKE LIPS-MATNR,
             CHARG LIKE LIPS-CHARG,
             ARKTX LIKE LIPS-ARKTX,
             END OF T_XVBPLP2.
    TYPES: T_XVBPLP TYPE TABLE OF T_XVBPLP2.
    In Global Data,
    T_XVBPLP TYPE T_XVBPLP.
    Still, i am getting error message that, Internal table is not with header line.
    can u plz give me some examples , to  define internal table with header line in smartform ???
    any correct answers will be rewarded??
    Regards
    pabitra

    Hi
    define WA_ITAB  in Global variables
    variable name          type assin      associated type
    t_text                      like                     zstc_text
    you cannot define a internal table with header line in SMART Forms. Declare a internal table and a work area separately both referring to the same structure.
    Then you can use the work area. So, in this case WA_ITAB is declared as a global variable of TYPE ZSTC_TEXT.
    Regards
    Pavan

  • Passing internal tables into smartforms

    Hi All,
    I am testing a smartform for PO. But the smartform is already designed and it has two internal tables of type EKKO and EKPO. When i run the smartform its displaying the layout correctly but with no data ,which is true as the two internal tables have no data. So i want to fill those two internal tables based on the purchase order number/ numbers. So that i can test the smartform with those purchase order numbers.
    I want to create a parameter / select option in smartform so that when we enter the PO number those internal tables will be filled. How to create those options in the smartform.
    If i have to create through an ABAP program then i want to know how to pass those two internal tables to smartform. (Shall i have to call the FM couple of times and then pass those two internal tables).
    Thanks in Advance

    You fill the tables in the print program and pass the tables to the SmartForm function module under the tables section.  See the FM call below (CALL FUNCTION lf_fm_name)  and note that I am only passing in one internal table.  If you wish you may pass in more than one table.
    *&      Form  smartform_print
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM smartform_print .
      DATA: lf_fm_name            TYPE rs38l_fnam.
      DATA: ls_control_param      TYPE ssfctrlop.
      DATA: ls_composer_param     TYPE ssfcompop.
      DATA: ls_recipient          TYPE swotobjid.
      DATA: ls_sender             TYPE swotobjid.
      DATA: lf_formname           TYPE tdsfname.
      DATA: ls_addr_key           LIKE addr_key.
      PERFORM set_print_param USING      ls_addr_key
                                CHANGING ls_control_param
                                         ls_composer_param
                                         ls_recipient
                                         ls_sender
                                         retcode.
    *Get the Smart Form name.
      IF NOT tnapr-sform IS INITIAL.
        lf_formname = tnapr-sform.
      ELSE.
        MESSAGE e001(/smb40/ssfcomposer).
      ENDIF.
      IF vbdkr-vkorg = '0035'.
        IF w_regio = 'QC'.
          tnapr-fonam = 'ZPCC_INVOICE_FR'.
        ENDIF.
      ENDIF.
    *  IF NOT tnapr-sform IS INITIAL.
    *    lf_formname = tnapr-sform.
    *  ELSE.
    *    MESSAGE e001(/smb40/ssfcomposer).
    *  ENDIF.
    * determine smartform function module for invoice
      CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
           EXPORTING  formname           = lf_formname
    *                 variant            = ' '
    *                 direct_call        = ' '
           IMPORTING  fm_name            = lf_fm_name
           EXCEPTIONS no_form            = 1
                      no_function_module = 2
                      OTHERS             = 3.
      IF sy-subrc <> 0.
    *   error handling
        retcode = sy-subrc.
        IF sy-subrc = 1.
          MESSAGE e001(/smb40/ssfcomposer).
        ENDIF.
        IF sy-subrc = 2.
          MESSAGE e002(/smb40/ssfcomposer).
        ENDIF.
        PERFORM protocol_update.
      ENDIF.
      CALL FUNCTION lf_fm_name
        EXPORTING
           archive_index              = toa_dara
    *   ARCHIVE_INDEX_TAB          =
           archive_parameters         = arc_params
           control_parameters         = ls_control_param
    *   MAIL_APPL_OBJ              =
           mail_recipient             = ls_recipient
           mail_sender                = ls_sender
           output_options             = ls_composer_param
           user_settings              = ' '
           vbdkr                      = vbdkr
           temp_jmval                 = temp_jmval
           temp_agval                 = temp_agval
           w_ship                     = w_ship
           w_ktgrd                    = w_ktgrd
           likp                       = likp
           w_trlrnbr                  = w_trlrnbr
           w_sealnbr                  = w_sealnbr
           w_booknbr                  = w_booknbr
           w_lc                       = w_lc
           w_shippoint                = w_shippoint
           billto_fedid               = billto_fedid
           soldto_fedid               = soldto_fedid
           shipto_fedid               = shipto_fedid
           vbco3                      = vbco3
           w_z4_address               = w_z4_address
           w_stawn                    = w_stawn
           w_herkl                    = w_herkl
           new_rate                   = new_rate
           vblkp                      = vblkp
          TABLES
           vbdpr                      = tvbdpr
    *       t_containers               = t_containers
    *       tdomvd                     = tkomvd
    *       da_xfplt                   = da_xfplt
    *       payment_split              = payment_split
    *       komk                       = komk
    *       frt_conditions             = frt_conditions
    * IMPORTING
    *   DOCUMENT_OUTPUT_INFO       =
    *   JOB_OUTPUT_INFO            =
    *   JOB_OUTPUT_OPTIONS         =
    EXCEPTIONS
    formatting_error           = 1
    internal_error             = 2
    send_error                 = 3
    user_canceled              = 4
    OTHERS                     = 5
      IF sy-subrc <> 0.
        retcode = sy-subrc.
        PERFORM protocol_update.
    * get SmartForm protocoll and store it in the NAST protocoll
        PERFORM add_smfrm_prot.
      ENDIF.
    ENDFORM.                    " smartform_print
    Davis

  • Declaring an internal table in smartform

    hi,
       can anyone tell how to declare   internal table in smartform.
       the internal table contains fields from 2 or more data dictionary tables(eg.kna1 
       and adrc). after this from the print program(internal table containing data in print
       program) internal table should be passed to the smartform.
    thanks.

    hi laxya,
    if u want to pass the data from internal table in print program to Smartform.. there is only way.. that is using form interface..
    1. goto se11, create a structure same as the itab in the print program.ex. <b>z_itab</b>
    2. create line type... se11>select radio button-DATA type><b>z_it_itab</b> >press create>then select>TABLE Type> then entrer some text--> in the line type Field in giveth Str name u have created in STEP 1. activate it.
    3. got SMARTFORMS-> form inteface>tables tabe--> give some name ex <b>IT_tab type z_it_itab</b>.
    then acivate it.. then in the driver progam pass this table data.
    Exapmpel
    CALL FUNCTION fp_v_fm_name
        EXPORTING
          archive_index      = toa_dara
          archive_parameters = arc_params
          control_parameters = fp_st_control_parameters
          user_settings      = space
          output_options     = fp_st_output_options
          wa_vbdkr           = fp_st_vbdkr
        IMPORTING
          job_output_info    = l_it_ssfcrescl
          job_output_options = l_it_ssfcresop
        TABLES
    <b>      IT_tab  = z_it_itab (or table in driver program)</b>
      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.
    Another way is cteate a type in Globaldifination-->types tab..
    ex:
    types: begin of ty_itab,
       matnr type matnr,
       meins type meins
       vrkme  type vrkme,
    end of ty_itab,
    ty_it_itab type standard table of ty_itab.
    then GLOBAL DIFINATION>GLOBAL DATA TAB>IT)ITAB TYPE TY_IT_ITAB.
    BUT In this u can't pass the data from the print Program.. if u want to populate data in to this table... u have to write the Select query in the GLOBAL DIFINATIONS-->INITILIZATIONS TAB.
    Please Close this thread.. when u r problem is solved
    Reward if Helpful
    Regards
    Naresh Reddy K
    Message was edited by:
            Naresh Reddy

  • How to Import customized internal table to smartform from Print Program

    Hi Gurus,
    I want to Import customized internal table to smartform from print program, Can anybody tell me how it is possible.
    With regards,
    S.Saravanan

    There is no problem passing an internal table to a smarforms, smartforms have the same interface as a function module ([Defining the Form Interface|http://help.sap.com/saphelp_nw70/helpdata/en/1c/f40c5bddf311d3b574006094192fe3/frameset.htm] in [Smart Forms|http://help.sap.com/saphelp_nw70/helpdata/en/a5/de6838abce021ae10000009b38f842/frameset.htm]) so could you elaborate a little more on your requirement (is it a standard a custom forms, etc.)
    Regards,
    Raymond

  • Defining internal table dynamcially...

    Hello Gurus,
    Currently I am defining internal table as follows. The custom table name is ZCUST.
    data: itab LIKE ZCUST OCCURS 1 WITH HEADER LINE.
    But I have a situation where I have to define a internal table dynamcially based on the
    table name defined in configuration table.
    How can I define itab dynamically where custom table name will be selected at runtime ?
    Regards,
    Rajesh.

    This question has been asked and answered many times before. Please search the forum before asking.
    Rob

  • Passing the Dynamic Internal Table as the Output Parameter of the FM...

    Hi,
    How can we pass the internal table as the output from the Function Module TABLES parameter.
        SELECT * FROM TVRO BYPASSING BUFFER INTO TABLE <ltable>.
    Now I need to pass the dynamic internal table <ltable> as the output in the function module.
    Thanks!
    Puneet.

    I can't use TVRO as the table type. The Table name is as the Input. This program will download the contents of the table and create an app server file. It can be for any database table.
    so i want the output of this FM should be the data from that table. So what should be the TABLE type.
    like in  a program i will use:::
      FIELD-SYMBOLS: <ltable> TYPE ANY TABLE,
                     <l_line> TYPE ANY,
                     <l_field> TYPE ANY.
        SELECT * FROM (p_table) BYPASSING BUFFER INTO TABLE <ltable>.
    That is my requirement.

  • How do we pass values and Internal tables to Sub-routines

    how do we pass values and Internal tables to Sub-routines

    Hi,
    You can use the USING..or TABLES..or Changing addition..
    Check this example.
    DATA: T_MARA TYPE STANDARD TABLE OF MARA.
    PERFORM DISPLAY USING T_MARA.
    FORM DISPLAY USING LT_MARA LIKE T_MARA.
    DATA: WA TYPE MARA.
    LOOP AT LT_MARA INTO WA.
      WRITE: / WA-MATNR.
    ENDLOOP.
    ENDFORM.
    Thanks
    Naren

  • Can we apply select statement on internal table.

    can we apply select statement on internal table.if yes thrn let me know how to do.

    Dear Sachin,
    You cannot use SELECT statement on internal table.
    If you want to select some rows from internal table you can LOOP the table or you can READ the table.
    <u>Please check the following links for your kind reference:</u>
    <b>http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb35de358411d1829f0000e829fbfe/content.htm
    http://www.sap-img.com/ab009.htm
    http://www.itsmarc.com/crs/Clas0302.htm
    http://www.sapdevelopment.co.uk/tips/tips_itab.htm
    http://searchsap.techtarget.com/search/1,293876,sid21,00.html?query=whatisinternaltable&bucket=ALL</b>
    Cheers !
    Moqeeth.

  • Issue in display format of a internal table in SMARTFORM

    I m printing an internal table in smartform.when a particular field exceeds the coloumn's length.the rest of the texts come down to the next line.It can be shown in the below example.i m printing "+ text to be printed" in that particular coloumn.
    Because of the size of the coloumn in table ,"ed." comes down as shown.
    +  text to be print
    ed.
    I dont want ed to come directly down '+'.I want it to start from where 't' of 'text'
    starts in the above line.
    Notice that the requirement is to print "ed"  after '4' spaces.
    Please suggest what i need to do to get the desired result...
    Regards
    Rudra

    Unfortunately there is no such way.

  • Issue in display format of internal table in smartform

    I m printing an internal table in smartform.when a particular field exceeds the coloumn's length.the rest of the texts come down to the next line.It can be shown in the below example.i m printing "+ text to be printed" in that particular coloumn.
    Because of the size of the coloumn in table ,"ed." comes down as shown.
    <b>+ text to be print
    ed. </b>
    its coming by default.
    I want it like  <b>+ text to be print
    ed</b>
    I dont want ed to come directly down '+'.I want it to start from where 't' of 'text'
    starts in the above line.
    Notice that the requirement is to print "ed" after '2' spaces.And we can not use the string length concept bcoz not of characters after which the line comes down is not fixed.May be some change of setting in smartform will do the trick.
    Please suggest what i need to do to get the desired result...
    Regards
    Rudra

    Unfortunately there is no such way.

  • Passing a program defined internal table to an abap object

    Hi. I have an internal table that was previously defined and created by SAP that I need to process in a user exit. The table is defined exactly as shown below.
    Is it possible to pass a table that was defined in this manner (not in the ABAP dictionary) as an argument to a method of an ABAP object?
    If so, what would the data type of the itab parameter have to be when defining the object's method parameter list? Is it necessary to somehow "cast it" to the KNA1 table type once I receive the table into the method? If so, what is the data type of the object's receiving variable/attribute?
    data: begin of lkna1 occurs 0001.
            include structure kna1 .
    data:
          end of lkna1 .
    Just as one additional piece of information, I am using version 4.5B and I am trying to do this through se24.
    Thanks so much!

    Hi again,
    <b>This kind of simple approach,
    we can pass ANY KIND OF TABLE
    WITHOUT HAVING TO DEFINE
    LINE TYPE IN SE11.</b>
    1. doing this simply u will achieve what u want.
      ( i just tried the same)
    2. in se24,
      give like this
    ITAB     Importing     Type     <b>STANDARD TABLE</b>
    3. in the calling program,
      call like this,
    report abc.
    data: begin of lkna1 occurs 0001.
    include structure kna1.
    data: end of lkna1.
    data: testobj type ref to zsdtest.
    select * from kna1
    into table lkna1.
    lkna1-kunnr  = '000234'.
    create object testobj.
    <b>call method testobj->testreceive
    exporting itab = lkna1[].</b>
    4.
    then in the class, source code,
    just use like this
    (so that u can accesss the fields of the itab,
    using myitab)
    <b>method TESTRECEIVE .
    data : myitab type table of kna1.
    myitab[] = itab[].
    break-point.
    endmethod.</b>
    5. thats all !
    regards,
    amit m.

  • Define internal table depending on parameter

    Hello,
    does anybody know how internal tables can be defined when tablename is passed as parameter ?
    I have p_table and want to define an internal table depending on its value (e.g. KNA1, MARA, LFA1 ) dynamically, so for example if p_table= MARA
    DATA:
    l_tab_table TYPE STANDARD TABLE OF MARA.
    l_str_table TYPE MARA.
    Has anybody done this before ?
    Thank you!

    Hi
    U have to use field-symbols:
    PARAMETERS: P_TABLE(30).
    DATA: DYN_TAB TYPE REF TO DATA.
    FIELD-SYMBOLS: <TAB> TYPE TABLE.
    CREATE DATA DYN_TAB TYPE TABLE OF (P_TABLE).
    ASSIGN DYN_TAB->* TO <TAB>.
    I believe the option CREATE DATA ... TYPE TABLE is available from release 4.7.
    If you use a lower release you have to use the method
    CREATE_DYNAMIC_TABLE of class CL_ALV_TABLE_CREATE:
    CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
      EXPORTING
         I_STRUCTURE_NAME = P_TABLE
      CHANGING
         CT_FIELDCAT      = GT_FIELDCAT.
    call method cl_alv_table_create=>create_dynamic_table
        exporting it_fieldcatalog = gt_fieldcat
        importing ep_table        = DYN_TAB.
    ASSIGN DYN_TAB->* TO <TAB>.
    Max

  • PASSING INTERNAL TABLE IN SMARTFORM

    HI' I M NEW TO SMARTFORMS, MY PROBLEM IS =THAT
    I'VE CREATED A NEW TYPE(SAY TY_BKPF) IN THE DRIVER PROGRAM.
    THEN I'VE DECLARED AN INTERNAL TABLE OF THIS TYPE.
    TO PASS THIS INTERNAL TABLE INTO MY SMARTFORM I'VE PASSED THE INTERNAL TABLE'S NAME INTO THE FUNCTION MODULE UNDER THE TABLES PARAMETER.
    BUT I'M NOT ABLE TO UNDERSTAND AS TO WHAT TYPE SHOULD I GIVE IT IN THE FORM INTERFACE IN THE TABLES TAB.
    PLZ HELP.

    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
    Also have a look at below sample code. It will give you idea abt the same.
    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
    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.
    Have a look at below link for more help on smart forms.
    http://sap.ionelburlacu.ro/sap0/sapsf001.htm
    http://help.sap.com/saphelp_erp2004/helpdata/en/a9/de6838abce021ae10000009b38f842/frameset.htm
    I hope it helps.
    Best Regards,
    Vibha
    *Please mark all the helpful answers

Maybe you are looking for

  • Wireless not working , please help .

    well ive been having this problem for a while with my linksysE2000 for a while . it wont let my ps3 connected wireless and when it does it stays for a while then it disconnnect after 1 hours . sometimes my wife is strong and stay for a whole day and

  • Why do all of my iPhoto photo stream photos no appear on my iPhone photo stream?

    I have a MAC that I use to store my images on in iphoto.   I have manually put several photos (jpg) into iCloud in iPhoto in order to access them from my iphone but some of them will not appear on my photo stream on my iphone.  I have an iphone 5 wit

  • AQ DEQUEUE_ARRAY issue

    I have this error I was hoping someone might be able to point me in the right direction. Basically I need to dequeue messages from a queue in batch (as one at a time will be too slow). The follow error is related to my TYPE I've defined at schema lev

  • Business Intelligence SDK

    In which forum Business Intelligence SDK Application Development questions should be posted? Can you send me the link, please?

  • Mac os x 10.9.4 and HP Deskjet 3050

    Spent forever connecting printer to wifi, connected and printed with a pc no problem. My mac can identify the printer initially but when I try to print it can't find the printer. I have tried everything usb printing doesn't work either. It is just no