IF statement in SMARTFORMS

Hi ,
My IF statement dosnt seems to work in smartforms.I have the following code in window-text element .
if &adrc-name1& ne ' '.
&adrc-name1&
endif.
if &adrc-name2 ne ' '.
&adrc-name2&
endif
But still its creating the blank lines on script output.I cannot use the Condition tab as im using much code inside this text element. Any suggestion on How to use the IF condition INSIDE the Smartforms to avoid the blank lines of address to be generated on the output.
Thanks for your augegstion.
Rgds

Hi,
Inside the Address Window-> create->Flowlogic->Alternative.
Alternative:ADRC
Description: <>SPACE?
General Attributes:
Field name
ADRC-NAME1   notequal to SPACE.
In the true condition:
&adrc-name1&
In the false condition:
&adrc-name2&
I am not sure if this is your requirement. Let me know if this works fine.
You can also use programming lines to put in your code.
Regards,
Anjali

Similar Messages

  • Select statements in smartform

    Hi All,
    what happens if u use lot of select statements in smartform rather than in driver program...
    regards,
    P.Ramesh.

    Ramesh,
    You wrote :hi amit,
    then wat the purpose we have driver program....everything can be done in smartforms..
    yes i was expecting this questiong from you next.
    let me explain why we need driver program!
    major reason we cant create Transaction for smartform.so how can you give your smartform to your enduser?they are not suppose to run every time smartform by smartforms trasaction itself.
    so we must need to attach smartform to our driver program and we create a transaction for that driver program.than user supposr to run only that transaction every time.
    I hope your doubt clear.
    Amit.

  • HOW TO USE PERFORM STATEMENT IN SMARTFORMS

    Hi,
    Can anyone tell me how to use call subroutine in smartform?
    Thanks & Regards,
    Gauarv.

    Hi,
    Hope this helps you..
    You can use the PERFORM command to call an ABAP subroutine
    (form) from
    any program, subject to the normal ABAP runtime
    authorization
    checking. You can use such calls to subroutines for
    carrying out
    calculations, for obtaining data from the database that is
    needed at
    display or print time, for formatting data, and so on.
    PERFORM commands, like all control commands, are executed
    when a
    document is formatted for display or printing.
    Communication between a
    subroutine that you call and the document is by way of
    symbols whose
    values are set in the subroutine.
    The system does not execute the PERFORM command within
    SAPscript
    replace modules, such as TEXT_SYMBOL_REPLACE or
    TEXT_INCLUDE_REPLACE.
    The replace modules can only replace symbol values or
    resolve include
    texts, but not interpret SAPscript control commands.
    Syntax in a form window:
    /: PERFORM <form> IN PROGRAM <prog>
    /: USING &INVAR1&
    /: USING &INVAR2&
    /: CHANGING &OUTVAR1&
    /: CHANGING &OUTVAR2&
    /: ENDPERFORM
    INVAR1 and INVAR2 are variable symbols and may be of any of
    the four
    SAPscript symbol types.
    OUTVAR1 and OUTVAR2 are local text symbols and must
    therefore be
    character strings.
    The ABAP subroutine called via the command line stated
    above must be
    defined in the ABAP report prog as follows:
    FORM <form> TABLES IN_TAB STRUCTURE ITCSY
    OUT_TAB STRUCTURE ITCSY.
    ENDFORM.
    The values of the SAPscript symbols passed with /: USING...
    are now
    stored in the internal table IN_TAB . Note that the system
    passes the
    values as character string to the subroutine, since the
    field Feld
    VALUE in structure ITCSY has the domain TDSYMVALUE (CHAR
    80). See the
    example below on how to access the variables.
    The internal table OUT_TAB contains names and values of the
    CHANGING
    parameters in the PERFORM statement. These parameters are
    local text
    symbols, that is, character fields. See the example below
    on how to
    return the variables within the subroutine.
    From within a SAPscript form, a subroutine GET_BARCODE in
    the ABAP
    program QCJPERFO is called. Then the simple barcode
    contained there
    ('First page', 'Next page', 'Last page') is printed as
    local variable
    symbol.

  • My loop statement in smartforms seems not to be working...

    Hello Experts,
    I am currently practicing smartforms and I am trying to display the records of my internal table.
    What I did was in my table under MAIN window I have put the statement:
    it_spfli into wa_spfli and also in my main area of my table I have a loop statement. Now, in one of my text
    i put wa_spfli-carrid, wa_spfli-countryfr, etc. But it still does not show any data.Help would be greatly appreciated.

    u will be getting a function module name for the smartform then
    goto se37-->enter the FM name -->search for the ITAB you r using then put a break point.
    come back to u r program the run.. controle will stops over there then check whether the data is populating or not.
    INPUT and OUTPUT patameters are for program line and INITIALIZATION tabs.. when you want to modify some data in these you need to give the veriable or ITABs u r using inside. so that system will determine the global declarations(veriable or ITAbs).
    for more info refer these links
    http://www.sap-img.com/smartforms/sap-smart-forms.htm
    http://www.sap-img.com/smartforms/smartform-tutorial.htm
    http://www.sapgenie.com/abap/smartforms.htm

  • How to create a 'At New' like statement in smartforms...

    Hello Experts,
    IN my smartform, I created a table in my main window that displays
    records in spfli namely countryfr, cityfrom, countryto and cityto. Now,
    I sorted it by countryfr in ascending order. What I want is that when a
    new country is detected it will create a horizontal line(seperator) before
    the new countryfr is printed. Any help would be greatly appreciated and rewarded.
    Thank you guys and take care!
    Example:
    Country From:
    America
    America
    America
       <--draw underline for seperator
    Bahrain
    Bahrain

    hi
    for u r info...
    in the table
    DATA tab u will find sort criteria..
    SAP Smart Forms: General flag
    Use
    Within a loop for data retrieval, the entries of an internal table can be sorted either in ascending or in descending order.
    In addition, you can determine particular events for control group processing by marking the relevant checkboxes. Control groups within an internal table indicate that adjacent table lines can be divided into groups according to the contents of certain fields. The division into groups in an internal table statically depends on the sequence of the fields in the table control. The first field determines the top control group in the hierarchy, and so on. At a control break an event for form printing is triggered.
    Smart Forms knows two different events at a control break: at the beginning of a sort term (AT NEW) and at the end of a sort term (AT END). As soon as you mark a sort term, the system dynamically creates an event node in the tree structure of the form; if you unmark it, the event node is deleted. The event nodes "at sort begin" and "at sort end" of a table field appear in pairs in the tree. You can add subnodes to the event nodes, for example, text nodes to display headings or subtotals at a control break.
    Dependencies
    The control break in Smart Forms, which is executed using events, does not correspond to the control break processing in ABAP, which uses special control structures (see also: AT command: Control break at internal tables).
    See also: The Data Tab

  • Select statement in a smartform

    Hi
    is it possible to write a select stmt in a smartform?
    what is the use of convert data (step) in lsmw?
    thanks,
    sap-abap.

    hi,
    u can write select statement in smartforms
    <b>what is the use of convert data (step) in lsmw?</b>
    this step is used to convet the legacy system data into sap format based upon conversion rules
    if u find it useful mark the points
    Regards,
    Naveen

  • Convert smartform to PDF Convert_OTF - Performance Issue

    Hi gurus,
    We have a custom development for Compensation statement developed smartform that could have easily been done in Adobe PDF. The downside of this is ithat whenever we want to download to PDF, the program first coverts this smart form to PDF usinf funciton module "Convert_OTF" and then downloads it.
    Did any one face this performance issue. Is the convert to OTF a major time consuming process
    We are having system performance issue when downloading the comp statement and want to analysize how big this CONVERT_OTF is a factor.
    please suggest

    Ok
    Iìve never had particular performance problem with that function, so:
    have you tried to measure the time for the printing (smartform), for the convertion (convert_otf) and for the downloading separatly?
    Max

  • Control break statements in smart forms

    Hi,
    Can we use control break statements(at new,at end of) in smart forms?
    if no why?
    if yes, how?
    Regards,
    Sonika

    you can use control block statements in smartforms by using the SORT events.
    In TABLES go to to the SORT section.Here you can give the field by which you want the table to be sorted.There are two radio buttons available for sort : SORT BEGIN and SORT end.
    On selecting any one sort event are generated automatically and event nodes are created in smartforms.Inside these event nodes you can add text nodes or code nodes and write your code.
    SORT BEGIN works like AT NEW
    SORT END works like AT END OF.

  • Smartforms Debugging

    How to attach break point at loop statement in smartforms.

    Hi Manmeet,
    Follow these steps.
    1. Execute the smartform.It will open a FM in se37 screen.
    2. Press Display.
    3. Press find(CTRL+F).
    4. Enter command here at which you want to put the break point.
    5. Select the radio button 'in main program'.It will open the point at which you want to put the breakpoint.
    6. Put the breakpoint here and execute the smartform again.It will stop at the point where you put the breakpoint.
    If you face any problem reply this thread.
    Regards,
    Mukesh Kumar

  • Smartforms: Option of Printing Specific Pages Only

    Dear forum-ers,
    I have a requirement to print several agent statements in smartform based on the logic from the print program. Each of the page for the single form have a unique statement. Under different scenarios, the form must print out different page combinations as stated below:
    Scenario 1: Page 1, Page 3
    Scenario 2: Page 1, Page 2, Page 3
    Scenario 3: Page  3, Page 4
    Can the above be achieved using one single form? There is no option found in smartform to print only selected pages based on certain conditions. Please advice.

    Take for example, my smartform should have 4 pages. Each page represents different statement. So each page will have its own main window to cater for the data to be printed out.
    Page 1: Statement 1
    Page 2: Statement 2
    Page 3: Statement 3
    Page 4: Statement 4
    Page & Windows
    ============
      Page1
        Window1 [Attributes: Next Page = Page2]
           Command Node1 [Attributes: Goto New Page = Page2]
      Page2
        Window2 [Attributes: Next Page = Page3]
           Command Node2  [Attributes: Goto New Page = Page3] 
      Page3
        Window3 [Attributes: Next Page = Page4]
           Command Node3  [Attributes: Goto New Page = Page4]
      Page4
        Window4 [Attributes: Next Page = Page4]
           Command Node4  [Attributes: Goto New Page = Page4]
    The problem is the smartform only prints page 1 and page 2 only. I want the smartform to print out all four pages in sequence.

  • Printing Time Statement in Smarforms DUPPLEX

    Hello experts,
    I have a little problem with our Time Statement in SmartForms. We want to print it in dupplex mode.
    But the problem ist that smartforms shoul recognize if the Pernr is different to the prievious pernr and print the actual pernr on a new side. I will give you an example for better understand what I exactly mean.
    Page No.:      PERNR:
    1                   123
    2                   123 (backside Page1)
    3                   123
    1                   456
    1                   777
    2                   777 (backside Page1)
    1                   888
    1                   999
    Would be great if anyoby could help me with this Issue.
    Many Thanks
    Marco

    Hi,
    You can print the smartform in loop and check pernr, i mean for each new pernr a new spool is generated.
    I hope by this way you can acheive what you want.
    Regards.

  • Salary Statement With Smarforms

    Good Afternoon.
    In the company the ABAP created the Salary Statement using Smartforms.
    They did not work with the T.Codes PE51, HRFORMS.
    The question is: How can display the Salary Statement in the ESS?
    This is posible using functionality standard?
    Kind Regards

    Set the feature HRFOR?
    In that feature you can specify the hrform name under the report class
    CESS.
    1. HRFOR  - This feature decides whether to use HRFORMS or CEDT forms
    (configured in PE51) for the payslip. If HRFORMS, the name of HRFORM has
    to be mentioned here. If PE51 needs to be used then $CEDT$ should be
    specified.
    2. EDTIN - This should hold the value of the variant to be executed in
    the CEDT program (payslip program). The variant should be proper with
    the with the correct CEDT (payslip) form name and other parameters.
    3. EDPDF - The name of the smartform (standard smartform
    HR_ESS_PAYSLIP_TO_PDF or customer specific form) used to show the output
    in the ESS.

  • Statements - tables for terms 30 days etc.

    HI guys and girls,
    ( I do not have an example of a STD Statement on my system)
    I am quite new to ABAP - only 7 months old , and I want to create a Statement in Smartforms.  I have drawn up all my windows where the fields must go (as you can see it's a Custom Development), and I would like to know where to find the following data fields:
    Terms for "still owe us" : current, 30 days, 60 days, 90 and 120 days.
    The Total amount owed (or balance).
    The address of the company.
    The address of the Client.
    Which table keeps the data of the Credit and Debits to create the table with all those amounts.
    It is a All in One system I'm working on - if you need that info.
    Hope you can help.  Thanx to all who share their knowledge in here.

    HI guys and girls,
    ( I do not have an example of a STD Statement on my system)
    I am quite new to ABAP - only 7 months old , and I want to create a Statement in Smartforms.  I have drawn up all my windows where the fields must go (as you can see it's a Custom Development), and I would like to know where to find the following data fields:
    Terms for "still owe us" : current, 30 days, 60 days, 90 and 120 days.
    The Total amount owed (or balance).
    The address of the company.
    The address of the Client.
    Which table keeps the data of the Credit and Debits to create the table with all those amounts.
    It is a All in One system I'm working on - if you need that info.
    Hope you can help.  Thanx to all who share their knowledge in here.

  • At new in Samrtforms

    Hi! All
             Is it possible to use AT NEW statement in Smartforms-->Program Lines?
             i,e i need to display in such a way ( format the key should not be repeated.) for example i need to display the packing details for a particular Invoice based on the Packing.
            If Box no. 1 has 5 part nos. (part1 - part5) & box No.2 has 5 nos (part6 - part 10). so the Box nos should bot be repeated.
            How to display this using smartforms.
    Thanks in advance.
    Regards,
    Nagulan

    >
    Neha Shukla wrote:
    > Try this link :
    >
    > https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/905e3788-6b1f-2b10-0f81-c8f745cd8b1d
    >
    > Regards
    > Neha
    ....And even in above link I'm not able to find Program lines/At end...!Please check links before posting.
    Thank you.Happy Positing.
    @Nagual:Why don't you use Control break statements In Driver program and Pass desired result to Form?
    But we can use in Smartforms also.While looping the Tables>from DATA tab of tables>Place loop here.
    Amit.

  • How to create line in smart form

    dear all,
            i hv to create lines in smartform.
    BOX XPOS '0' MM YPOS '6' MM HEIGHT '0' MM WIDTH '190' MM FRAME 1 PT
    by using above statement i can create line in SAPSCRIPT.
    is there any similar statement in smartform to create lines
    if So plz send me a code.
    regards
    Vinod.

    create window and provide these parameters  in the output options to get the line. and  in  line  select check box line with                                                                               
    Left margin          0.00      CH    Width           80.00       CH   
      Upper margin     12.50      LN    Height             0.05       LN                                                                               
    line
       check the box  line with                                                                               
    Gray value       0   %     
       Width                     1.00       TW                       (0% = not filled)          
       vertical spacing       0.00       CM                                
       horizontal spacing   0.00       CM

Maybe you are looking for

  • I would like to take the time to...

    I find it absolutely necessary to share this with you, the reader - the community! I would like to thank you, Firefox developers and all the rest, for: helping feed the poor in Africa; helping to end global terrorism; helping to keep children safe; h

  • Set thumbnail view as default in the File open dialog box

    When I hit File/Open in PS, the dialog box always opens in"details" and I have to hit the select view icon and chose "thumbnails". I've looked in preferences but can't find anything to change the default to Thumbnails. Is it that you have to do this

  • Mac OS X 10.8.3 Bluetooth Keyboard entry challenges

    I am having a reoccuring problem when entering information into a downlaoded PDF form that my keyboard types the wrong character into the PDF.  It happens very randomly and without any apparent pattern. For instance, I will beattempting to type a dol

  • Help Finding an Animated Transition

    Does anyone know where I can find an animated transition or a photo album opening and transitioning in to a picture. I've seen one where the first page of the book zooms in to a photo, but I cannot remember where I saw it. I've got a deadline and the

  • Restoring version database history

    Hi, We had performed a system refresh of a DEV system months earlier but had done a mistake of not exporting/importing the version database. Though we had corrected that mistake in our future refresh activities but the problem is now all the version