Smartforms ITAB problem

Hi experts,
Iam working on smartforms to display INVOICE using
VF02>Billing document>Issue_Output to....
Here i need to display Material sales text.I got it into ITAB using Read text in the program lines.
Now, may problem is how to define ITAB globally <b>with header line?</b>
So that i can loop it and display the data.Any suggestions pls....
Reward guaranteed,
thanks,
kaki

Hi Kaki,
If you are using a program to pass value to smartform, you cannot use internal table with header line. For that you have to go to Interface and there in the tables tab, give the name of the internal table. Now define a structure in the Global Definitions.Now in the tables node (or in the loop node) ,loop internal table into structure. Now use this structure for displaying the values.
If you are not using a program, then you can use an internal table with header line as explained in the previous post. Now create the structure in the Global definitions . Now in the global definitions, go to Initialization tab and give the select statement to pass the value into the structure. NOw in the table node(or in the loop node), loop internal table into structure and use the structure to display the values.
You can refer to this link and view my post for more details.
declaring IT in smartform
Hope my point is clear.
Regards,
SP.
Message was edited by: Sylendra Prasad

Similar Messages

  • Error while activating smartforms:'itab' is neither specified under table.

    Hi,
        I got an error while activating smartforms,
    'ITAB' is not specified under tables nor defined as an internal table.
    This comes under loop - Data tab.
      itab into wa.
    Please rectify this error.

    Hi Jana,
      I already declared itab in global definitions as follows,
    Variable     Type            Associated type
    T_VBAP       TYPE         TYPES_VBAP
    (itab)             (type)          (str - structure)
    But still i m getting the error.
    Can u suggest some other soln.
    thanks for ur reply.

  • Smartform upload problem (within same Version)

    i have download smartforms from 4.7 first and than uploading it in same 4.7 but error occurs as below:
    first:  "A serious error has occurred
    The transaction had to be terminated".
    than second: Internal error (illegal structure of data storage)
    Message no. SMARTFORMS002.
    i can uplodad smartform successfully than and check also successfully,
    but while i do final activation it causes above error.
    what can be problem, is due to smartforms style problem, but i tried removing all style of text elements, thought it creat that errors,
    if any can knhow how to upload smartform successfully and solve above error.
    regards,

    L.S.
    I just encounter a similar error when activating a smartforms. I had made some changes, maybe by copy nodes through memeory into another smartforms and/or deleting one %GRAPHICS1 and making another.... smartforms got confused somehow and gave me an abort error 002.
    I debugged the coding of activating smartforms and found out that ( in my case ) sap coding tries to insert duplicate entries in table stxfobjt.
    Here is the part of coding where you can put your breakpoint and adjust the internal table tobjt if you have the same problem.
    I made the line  insert stxfobjt from table t_objt.  BOLD ( in plain text with * : it s  not a remarked coding line )
    SAPLSTXBX                      / LSTXBXU36
    FUNCTION                       / SSF_SAVE_FORM      
    Speichern der Tabellen
      if i_active = space.                         " gesicherte Fassung
        export t_ntokens t_objt t_ltext t_noltext
               to database stxfconts(xx) id i_formname.
      else.                                        "     aktive Fassung
        delete from stxfobjt where formname = i_formname.
        try.
          insert stxfobjt from table t_objt.
        catch cx_sy_sql_error into l_exception.
          get reference of t_objt[] into l_dref.
          raise exception type cx_ssf_fb
                exporting textid     = cx_ssf_fb=>err_on_insert
                          table_dref = l_dref.
        endtry.
        perform save_ltext using i_formname t_ltext.
        export t_noltext t_ntokens unchecked = i_header-unchecked
               to database stxfcont(xx) id i_formname.
        delete from database stxfconts(xx) id i_formname.
      endif.
    Good luck all with debugging SAP's bugs
    Regards,
    Edwin Glaser
    doubleclickyourprogrammer [at] sap4u.nl

  • Smartform upload problem

    i have download smartforms from 4.7 first and than uploading it in same 4.7 but error occurs as below:
    first:  "A serious error has occurred
    The transaction had to be terminated".
    than second: Internal error (illegal structure of data storage)
    Message no. SMARTFORMS002.
    i can uplodad smartform successfully than and check also successfully,
    but while i do final activation it causes above error.
    what can be problem, is due to smartforms style problem, but i tried removing all style of text elements, thought it creat that errors,
    if any can knhow how to upload smartform successfully and solve above error.
    regards,

    i have tried deleting one by one elements and found that problem in address element,
    i have just delete it and active it that it got activated,
    and again after deletion i have put sam variable in address element for displaying adress dynamicaly and set length and width all same that it fot activated!
    than what the problem at first time activation?
    is there any runtime conflict or what?
    regards,

  • Smartforms with itab problem

    Hi
    I must only have a header on first page
    and after this header in the 1-st page must be have a table (with unknown size)
    In second page must be yet only this long table without header.
    And on the last page must be footer.
    I done this but on the first page I have a table in 6cm of top page and on every page is it also but
    in next pages must be in 1cm of top page.
    How to do this?

    Hi,
    You mean to say that if the header is 4 cm from top, in next page the table starts leaving the 4 cm header sapce.
    In this case you can over lap the table window over the header window ONLY IN NEXT PAGE.
    Eg. Header display settings on 1st page
    Header coordinates:
    1 cm from top                 width 4 cm
    table window coordinated:
    4cm from top                  width 8 cm
    On next page:
    Header coordinates:
    1 cm from top                 width 4 cm
    table window coordinated:
    1cm from top                  width 8 cm
    this will definitely work
    regards,
    Gaurav

  • Smartform Printing Problem in SAP ECC 6.0 with Ehp6

    Hi Sap Expert,
    Our Sap System has been upgraded from ECC 6.0 to ECC 6.6 ( Ehp6). now we are  facing  problem in to print smart forms .
    I have a smart form with one page and three copies are there.
    On first it was written ORIGINAL, on second DUPLICATE and third one is TRIPLICATE.
    When I see the print preview it shows all the three pages ( ORIGINAL,  DUPLICATE and  TRIPLICATE. ). but when i give the command to print.  it will only 3 copies
    ORIGINAL. and when i convert into PDF it shows only one page ORIGINAL.
    I want ORIGINAL,  DUPLICATE and  TRIPLICATE printout in single command.
    Note : Before Up gradation of sap system it worked fine.
    Guide me.........

    Hi Marques,
    Yes, my problem has solved,
    Write the code Driver Program:
    Declare Internal Table as:
    DATA : BEGIN OF ITAB OCCURS 0,
              I TYPE I,
              TEXT TYPE CHAR20,
              END OF ITAB.
    and Append 3 time this Itab with the no of copies of form ( Original, Duplicate and Triplicate ) as
        ITAB-I = 1.
       ITAB-TEXT = 'Original'.
       APPEND ITAB.
       CLEAR ITAB.
    Now,
    LOOP AT ITAB.
    call function module of smartforms as
    CALL FUNCTION fm_name
       EXPORTING
        CONTROL_PARAMETERS         = CO
        OUTPUT_OPTIONS             = OT
    *   USER_SETTINGS              = 'X'
         L_***                      =  L_***
         V_INDX                     = ITAB-I
    * IMPORTING
       TABLES
         IT                         = IT
    and modify the smart form as
    write the code in window
    IF V_INDX = '1'.
    v_text = 'Original'.
    ELSEIF V_INDX = '2'.
    v_text = 'Duplicate'.
    ELSEIF V_INDX = '3'.
    v_text = 'Triplicate'.
    ENDIF.

  • SMARTFORMS Printing Problem ?

    hi
    friends ..
    iam doing a smartform i had defined 2 linetype of same outputoptions
    using it one for header main area.The problem is when iam printing it
    suppose there are 20 records then iam getting 14 on one page and the 14th
    record doesnot contain full data for ex. if mat, matdesc then meins field is
    empty and after that iam getting one complete empty line .
    In next page getting data from 15th line but getting a blank line before
    15th line.
    The data in itab is ok no problem while fetching data .
    regards
    farukh

    hi,
    check this thread..
    how to start printing data from a new page in smartforms!

  • Smartforms display problem

    Hi experts,
    Iam working on smartforms.
    I have header and details tables.In the header table(T_HDR) i have 2 different VBELNs .
    In the details table iam getting details for each VBELN.
    So first loop iam getting 3 details & in the second loop
    iam getting 2 details records like this.
      loop at t_hdr into g_hdr
       select * into ....vbap.. t_det where t_hdr-vbeln.
        CALL FUNCTION 'SF function module'
        EXPORTING
          CONTROL_PARAMETERS = CONTROL
        TABLES
          T_HDR              = <b>G_HDR</b>
          T_DET              = <b>T_DET</b>
      endloop.  " t_hdr
    Since customer number is same in t_hdr, i want to display t_hdr values only one time in the smartforms first page.
    In the next page i want to display all the details using t_det.
    I got the all the details and it is fine.
    Only problem is iam getting FIRST page is getting repeated.
    How can i reistrict to display first page <b>only one time</b>?And how to get all the details in the next pages?
    Output options are not working.
    reward guaranteed
    thanks
    kaki

    Hi Kaki,
    How have you defined your "Next Page" in smartform?
    The Main Window shud be there in Next Page too.
    Regards,
    Anjali
    Also, Pls close your previous posts as "solved/V.Helpful/helpful" or solved it on your own. This would <b>only</b> encourage others to help you with your queries.
    Re: itab spaces
    Rules of Engagement:
    Welcome and Rules of Engagement

  • Smartform output problem in dunning

    Hi
    I've done a search for this problem in the forums and found what I thought was the answer but it still doesn't work...
    My dunning FM passes paramter IS_SFPARAM to the smartform (which is a copy of the standard SAP form F150_DUNN_SF). the initialisation in the form then calls FM GET_SF_DUNN_DATA in order to populate all the data from the IS_SFPARAM parameter.
    However, as far as I can see, inside FM GET_SF_DUNN_DATA, a method is called to populate h_mhnk and use that to check that the parameters like gs_sf_mhnk are populated. If they are not, it raises exception no_parameters_found. I thought the FM set those parameters in the first place! How can I set parameters gs_sf_mhnk, gs_sf_fsabe and all the others in there? i am always getting the no_parameters_found exception at the moment!
    Any help appreciated.
    Jon

    use smartform_trace transaction to trace ur smartform for errors.
    also open ur smartform goto environment and get fm name now in the end some number wud be thr like this \...\SF000091 modify it and use it in se38 like this \...\LSF000091F01
    it will open the code insert session break points and now check by running the smartform
    кu03B1ятu03B9к

  • Smartform: Formatting Problem with QUAN-Field

    I want to print a smartform and get exception 1 (formatting error). With function SSF_READ_ERRORS I get an error table. There is on entry: errnumber = 020011, msgid = SSFCOMPOSER, msgty = E, msgno = 601, msgv1 = wa_outtab-menge.
    It seems to be a formatting problem with field WA_OUTTAB-MENGE. But in the structure this field is referenced correctly.
    Does anybody know a solution?

    I solve this kind of problem in my SmartForm.
    Try this:
    Go to "Global Definitions" Node, then "Current/Quant.Fields" tab and set these values:
    Field Name:      WA_OUTTAB-MENGE
    Reference Field: WA_OUTTAB-MEINS
    Data Type:       QUAN
    Best Regards,
    Eduardo Ribeiro.

  • Smartform style  problem

    Hello friends,
         I am getting problem in smartforms style. i had created my own style for one of my Tax invoice form because i want fonts in smaller and for heading i want to increase font size. But when i am applying my own style to paragraph the changes are not accepted after SAVE & ACTIVATION. If any one know solution for this problem than please give reply as soon as possible.
    Thanx & Regards,
    Rahul Talele

    Hi,
    Once I came across the problem as yours.
    This happens becoz certain properties of the fonts when applied will override other formats.
    For eg. If u have chosen bold character format before, but when u want to change it to normal it will not change at all.
    In that case, I have deleted the text as a whole and applied normal format at first. Then I applied bold character format
    whereever applicable.
    Which style u applied to the header in your form? Is it Paragraph format or Character Format.
    Could u give more clear description?
    Regards
    Vadi

  • BAR CODES in smartforms - conversion problems to PDF

    Hello,
    I have a problem. Have a look at the following points and see what I have done:
    1. I generated several different system bar codes using SM73
    2. I added those system bar codes to a smartformstyle
    3. and built a smartform using smartformstyle of system-bar codes.
    4. then I made some examples of bar codes in the smartform as text.
    5. next I sent this smartform via email as an pdf attachment using smartform mail functionality.
    6. shocking - all bar codes in the pdf-file are not readable. You can see that there is a barcode placed, but all barcodes looks like the same.
    Has somebody got a idea on what is going on here?
    I already had a look at OSS Notes 430887 and 645158.
    Greetings
    daniel

    Hi,
    Please can you have a look at Sap OSS Note 197177.
    Regards,
    Sudheer.

  • WHERE clause in a SMARTFORM loop, problems with parenthesis

    Hi all gurus,
    a simple question: I'm coding a LOOP in the form builder for a smartform ... this simple loop should bind text elements to every position of a purchase order. The WHERE clause should be as follows:
    WHERE GUID = WA_ITEM-GUID
    AND ( TDID EQ 'ZDES' OR TDID EQ 'ZDST' ).
    Anyway, in the Form Builder I didn't find a way to add parenthesis; I workarounded the problem with the following query:
    (conditions in lines are in AND conjunction)
    GUID EQ     WA_ITEM-GUID
    TDID      EQ   'ZDES'
    OR
    GUID EQ     WA_ITEM-GUID                                                                               
    TDID      EQ 'ZDST'.
    It's quite a 'bad' way, but it works. I wonder if there's a way to express "complex" WHERE clauses (with addiction of parenthesis) in Form Builder.
    Thanks in advance

    In this case, your solution is the one that works. However in more complex cases with more variables, this can proove difficult to make or mantain.
    What I usually do is use the first part of the condition in the where and then add a condition to the printing area with the rest of the formula. Just remember to document this so that you'll find it easy and it's way more amintainable.
    In this case the loop would contain WHERE GUID = WA_ITEM-GUID and the inside condition TDID EQ 'ZDES' OR TDID EQ 'ZDST. This creates the and between the two blocks.

  • Smartform : Printing Problem , Urgent Please

    Dear All,
    When I tried to print a smartform, I am Getting message 'Spool Request (number xxxxxx ) is created' .
    but It is not printing.
    I am facing this problem only with this form. I could print other forms / Scripts.
    What might be the error ? Please Let me Know ..
    Thanks & Regards
    Venkat
    Message was edited by: venkat Kumbham
    Message was edited by: venkat Kumbham

    Venkat,
    You can do that in two ways. Once is to set it in the USER DEFAULTS. Go to SU01 and you can see a tab for DEFAULTS.. There will be a check box for PRINT IMMEDIATELY.
    Or you can do that in the SMART Form parameters also. In the OUTPUT_OPTIONS parameters ther is a field TDIMMED. Set that to 'X'. That should print the form immediately.
    Regards,
    Ravi
    Note : Please close the thread, and mark the helpful answers if this solves your problem.

  • Smartform-Funny Problem

    Dear all,
    In an existing smartform I had to make the following changes:-
    1:-Include the Sec Education Cess @ 1 %   and display its value
    2:-For multiple line items the sales tax (@ some %)  value must be addition of both the line items sales tax value.
    3:-Finally in the grand total Sec Education Cess value will have to be included.
    Points 1 and 3 are fine.
    But in point 2,while in debugging altough i can see the addition of both the line items sales tax value (which I have taken in the v_sstax),in the output,i can see only the sales tax value of 1st line item.
    eg:-
    Sales Tax @ 4% for 1st line item is 152.59
    Sales Tax @ 4% for 2nd line item is 174.31.
    Desired output should be 152.59 + 174.31 = 326.9 (which I can see while debugging).This 326.9 is taken into consideration for the grand total and hence grand total is correctly displayed
    But i am getting only 152.59 in the output of salestax
    There is no other code involved in between 152.59 + 174.31 = 326.9 and its printing.
    Where might be the problem?Plz give me some suggestions.
    I have been at it since yesterday but have not yet found out a solution

    Hi,
       Have you written the sales tax text in loop. check it once if yes, then write the text separatly.
    Rgds,
    Bujji

Maybe you are looking for