If Condition in Smartform - window text- without program lines

Hi,
   I have faced one problem in smartforms. In smartforms i have a window (main.) It has five lines. For Fifth line only i need to check one condition. if it is true then print the Line otherwise i need one Blank line to print.
How i write if condition in smartforms window - text. 
Mahesh.

Hi Mahesh,
You need to create and alternative node and put your text into that.  An alternative will check a condition, and process one of two nodes depending if it is true or false.  Based on your condition, on true you can have your current text element and on false a text element containing a blank line.
Regards,
Nick

Similar Messages

  • Issue with if condition in smartform text elements

    Hi all.
    iam having a problem in smart forms
    itab has 3 fields
    id   matnr    werks
    1 a p1
    1 b p2
    1 c p3
    2 b l1
    2 c l2
    3 q u1
    3 l u2
    i neead output like in the smart form
    -id = 1-
    a p1
    b p2
    c p3
    -id = 2-
    b l1
    c l2
    -id = 3-
    q u1
    l u2
    I have aloop in main window
    itab into wa_itab.
    then i have program lines
    iam writing any perform statment insted iam write the code in here
    input paramters wa_itab-id
    output paramters id
    i declared id type zabc-id under global data in global definations
    CLEAR : ID.
    ON CHANGE OF WA_itab-ID.
    *BREAK point.
    ID = WA_ITab-iD.
    ENDON.
    after the program lines i have a text
    /: if &id& ne ' '.
    ---id = &id& ---
    /: endif
    &wa_itab-matnr&  &wa_itab-werks&
    now i see the output
    -id = 1-
    a p1
    -id=-  i don't need this (&id& has no value)
    b p2
    -id=-  i don't need this
    c p3
    -id = 2-
    b l1
    -id=-  i don't need this
    c l2
    -id = 3-
    q u1
    -id=-  i don't need this
    l u2
    I checked my code if two items have same id the id has no value and you can see the output also
    but for some reason its still goinng into the if condition
    And also is there away that i can debugg my text elements like in scripts. my break point doesn't take me to the text elements
    Thanks

    1. Move only the ID into one internal table say i_id,
    2. Now in your smartform,  create a table and loop at i_id into wa_id.
    3.Print your ID in a text, &wa_id-id&
    3. Now in main area  of the table Create a loop with the internal table you mentioned above with 3 elements, say, i_data into wa_data  give CONDITION as wa_data-id = wa_id-id.
    4. Print your other values &wa_data-matnr& &wa_data-werks&
    5. outside main area, clear the work areas.
    This should work fine as i use the same logic in one of my current developments!!!

  • Smartforms: Window on Condition

    HI Experts,
                    In my PO under smartforms, I have table in main and couple of windows below that. I want to show the below window on particular condition. If the rows in table greater that 9, below window will show on next page else on first page. Should I have to write a condition ( True / false ) for that window. where should I have to write a condition. Plz describe me in brief. Thanks.
    KHan.

    Hi
    Declare a global variable, say g_lines of type integer and describe the table lines into the variable in Initialization if you are importing the table from the print program or after the table is populated.
    You need to creat 2 windows, one in the first page and other in the second page.
    For the window in first page, give the condition if g_lines < 9 and in second page give the condition as g_lines > 9.
    When table lines are less than 9, the first page condition will be and will be displayed and second page window will be false and will be hidden and vice-versa when the lines greater than 9.
    Regards
    Navneet

  • Using if condition in smartforms

    Hi,
    I have a requirement like the following in smartforms
    if condition satisfy display one set of text or else some other text.(or don't display)
    how we can write code in smartforms (not in driver program).If any body knows tell me.
    Thanks
    Regards,
    Nandha

    Right click on the window you want to implement the code
    Choose Create-> Flow Logic -> Alternative
    In the true part -> Right Click (Choose)
        Create the Text Elements to be displayed
    To implement the code block choose
    ((( Create -> Flow Logic -> Programs Lines (write your ABAP Code here) ))
    Message was edited by: Kanthimathi Krishnan

  • Putting condition in Graphic WIndow in SAPSCRIPT

    I created 2 Graphic Windows for Company Logos. Each will appear/ hide according to the company code. I was planning to put a condition onto the window's code but it seems like it doesn't allow edit mode. Just the blue background. Is it possible to edit the graphic code? Are there other alternatives to post the 2 logos?
    POints will be given thanks!

    Hi,
    You need to make use of PERFORM-FORM concept to solve your problem.
    For eg:
    In your text editor of SAP script:
    write the following code:
    PERFORM SET_FLAG IN PROGRAM ZFI1_CHECKFORM
    USING &REGUH-ZBUKR&
    CHANGING &V_FLAG&
    ENDPERFORM
    Now, in the subroutine PROGRAM 'ZFI1_CHECKFORM' write the below code:
    FORM SET_FLAG TABLES in_tab STRUCTURE itcsy
                        out_tab STRUCTURE itcsy.
    Data Declaration
      DATA:zbukrs        TYPE bukrs.
      READ TABLE in_tab INDEX 1.
      zbukrs = in_tab-value.
      READ TABLE out_tab INDEX 1.
    IF NOT zbukrs IS INITIAL.
          out_tab-value = '1'.
        ELSE.
          out_tab-value = '0'.
        ENDIF.
    MODIFY out_tab INDEX 1.
    Try your requirement referring this piece of code.
    Reward points if helpful.
    Thanks,
    Asha

  • Remove Blank Page conditionally in Smartforms

    Hi  Experts this is Arun,
    I have Requirement in such a way that, Form should contain three different pages which display three different records using three different internal tables.My problem is I have to avoid second and third page if it does not contain any records in it.How can i conditionally skip those two pages.1st page always contain records in it.Thanks in advance.

    Hi,
    Please follow the below steps.
    1. in your 2nd page, After your first node (any window, text etc...). Create-> Flow Logic -> Program lines.
    In that program lines, Write code as below (First create a variable in Global seettings-> w_flag type flag).
    if i_tab[] is initial.
    w_flag = 'X'.
    endif.
    2. On same node create->Flow logic-> command. In Command node, First, Check the box for "GOto New Page".  Give your next page that is your 3rd page. And in Condition tab put following:
    Field name -> w_flag ,,,, Rlation operator -> = ,,,, Com value 'X'.
    It will directly take you to your 3rd page if i_tab is initial. Do the same for 3rd page..
    Must be solving your problem
    Regards,
    lokesh.
    Edited by: Lokesh Tarey on Apr 20, 2010 7:43 AM

  • ERROR IN OUTPUT WITH  CONDITIONS IN SMARTFORM

    I have   two conditions in smartform.
    if i_final-konrth NE g_temp9.
       i_final-ssign eq g_temp10.
    then we need to print text1 in the output. There are no program lines in the  text.
    g_temp9 and g_temp10 are passed from the program. text1 is not getting outputted. Could anybody help in this issue ?

    hI,
        i have written break username in program lines but the cursor is not stopping. please tell me why

  • Smartforms Dynamic Text option (Change standard texts dyanamically)

    Hi,
    My requirement is to change standard texts dynamically in the smartform. i.e. Standard texts names are stored in a custom table, based on condition I have to print different standard texts.
    Thanks in Advance.

    You can use the variable as the name of your text name.
    Create a program lines to populate the variable. Use this variable as the text name. Like:
    &W_TEXT_NAME&
    Regards
    Naimesh Patel

  • How to comment in smartform for text value in abap

    how to comment in smartform for text value in abap.
    i want to comment text value which is coming in output
    From drag and drop option i had dropped an item text in text window and now i dont want to delete it i just want to comment it so can any one help me in commenting the text value.
    Advance Thanks for your help

    hi
    open the text element in the smartform.
    on the left corner, we have text editor button.
    open that and change the editor (goto-->change editor)
    on the new line, give the format as comment line /*. and you can write the comments as required.
    such lines doesnt reflect in the output layout.
    thanks
    pavan

  • How can I get an Extension's toolbar icon to display image without text (without universally affecting other icons)? How can I edit the icons text (save space)?

    "From the Show dropdown menu, you can choose what to display in the toolbars: icons, text, or icons and text together. By default, Firefox shows icons only." Is there a way to choose an individual setting for a specific toolbar icon to be icon only (no text) without universally affecting all other icons on the toolbars?
    Second, is there a way to edit the text on a specific toolbar button from an extension (because it occupies too much horizontal space on the toolbar due to the amount of text)? I do know how to locate the xpi file & open it with notepad, but then it's mainly code (not English) & FIND doesn't locate the button's text (to edit it).
    These 2 questions should apply to Extension buttons in general. However IF it makes any difference I'm referring to the Toolbar Button in Back To Top 7.0 which says "Go to top/bottom". I'd at least like to edit out "Go to", but my questions apply to other Extension buttons too. I do realize it may be necessary to redo any fix/change each time there is an update? THANK YOU.

    We use the DOM Inspector to find the IDs and Class Names of elements.
    * DOM Inspector: https://addons.mozilla.org/firefox/addon/dom-inspector-6622/
    The DOM Inspector (DOMi) has a menu item (Edit > Select Element By Click) and a toolbar button "Find a node to inspect by clicking on it" (left icon on the toolbar in the DOMi).
    * open the browser window in the DOMi (File > Inspect <b>Chrome</b> Document) and choose the first from the list.
    * click the "Find a node to inspect by clicking on it" button and use the keyboard (Alt Tab) or the Task bar to go back to the browser window (do not click in the browser window other than the title bar).
    * click that element with the mouse and keep the button pressed until you see a red border to indicate the the DOMi has located that element in the DOM tree.
    * https://developer.mozilla.org/en/DOM_Inspector/Introduction_to_DOM_Inspector

  • How to Install Windows 7 Without the Disc

    1a)  Here is very useful article from PCWorld.com. The article is entitled "How to Install Windows 7 Without the Disc" and means just what it says. The article also has links to Magical Jelly Bean Keyfinder and legitimate Windows 7 ISOs from Digital River, a licensed distributor of Microsoft software. The article lists "Step 1" as;
    "Find your Windows 7 product key: Typically this 25-character alphanumeric string is printed on a sticker affixed to your PC or on documentation included with your PC. Alternatively, you can use a keyfinder program such as Magical Jelly Bean Keyfinder to pull your product key from the Registry. You need your product key to reinstall Windows."
    1b)  Using a key finder, however, is only useful if the Windows 7 product key was printed on a sticker (Microsoft Certificate of Authenticity) affixed to your PC, on documentation included with your PC, or sent via email by Microsoft. Assuming your computer came from one of the big brand computer manufacturers... HP, Sony, Dell, Gateway, etc... as most do, it uses a generic "mass activation" OEM SLP key. Trying to use this key by itself isn't going to work. This OEM SLP key needs to be mated with an OEM SLP certificate and an appropriate OEM BIOS with a proper SLIC table.
    1c)  Here is where ABR Beta With Windows 7 Support comes to the rescue. Follow the "How to use it" section of ABR for Windows Vista for information and instructions on how to use ABR. The steps listed for Vista apply to Windows 7 as well. Perform the "activation backup" to "backup" and save the OEM SLP key and OEM SLP certificate. Save the entire ABR folder to an external location for later use. This will allow you to pre-activate your "clean" Windows 7 install on the computer you pulled the key and certificate from.
    1d)  Now install Windows 7 from your new "Windows 7" disc or USB stick, following all prompts as needed. Don't enter a Windows 7 product key if request. Also, don't allow Windows to try to auto-activate. Once Windows is fully installed, run ABR "activation restore" to "restore" the previously backed up product key and certificate to the new Windows 7 install. Verify that Windows is activated, repeat "activation restore" if needed.
    2)  Here is another useful article, this time from SevenForums.com. This arcticle is entitled "Clean Reinstall - Factory OEM Windows 7" and provides detailed steps required to backup your computer, audit current hardware and software, locate software and drivers, install and activate Windows 7, and create a Windows 7 Backup Image of your fresh install.
    Good luck.
    Links to additional Windows 7 SP1 "Editions" and "Languages" can be found HERE and HERE.
    Link to "ei.cfg Removal Utility". The "ei.cfg Removal Utility" is a simple tool that will remove the ei.cfg  from any Windows ISO disc image, thereby converting the image into a "universal disc" that will prompt the user to select an edition during setup instead of being forced to use different discs for different versions of Windows 7.
    Direct link to Windows 7 USB/DVD Download tool.
    <Cross posted to Notebook Operating Systems and Software for Notebook, Laptop, and Netbook users>
    EDITED by Frank on 8/28/2013
    Please click the white KUDOS star to show your appreciation
    Frank
    {------------ Please click the "White Kudos" Thumbs Up to say THANKS for helping.
    Please click the "Accept As Solution" on my post, if my assistance has solved your issue. ------------V
    This is a user supported forum. I am a volunteer and I don't work for HP.
    HP 15t-j100 (on loan from HP)
    HP 13 Split x2 (on loan from HP)
    HP Slate8 Pro (on loan from HP)
    HP a1632x - Windows 7, 4GB RAM, AMD Radeon HD 6450
    HP p6130y - Windows 7, 8GB RAM, AMD Radeon HD 6450
    HP p6320y - Windows 7, 8GB RAM, NVIDIA GT 240
    HP p7-1026 - Windows 7, 6GB RAM, AMD Radeon HD 6450
    HP p6787c - Windows 7, 8GB RAM, NVIDIA GT 240

    ervis,
    Before formatting the hard drive you should have been able to use the HP Recovery Manager to create your recovery discs or perform a system recovery. This is provided the recovery partition wasn't already corrupt or damaged. If the "D:" HP Recovery partition is missing or damaged and you don't have a set of HP Recovery Discs, you will need to use the information in my previous post to get your computer up and running again.
    The information in the document referred you to applies to several different "types" of installations;
    Using ABRbeta is only needed if you have an active OEM factory SLP (system locked preactivated) installation of Windows. You use ABR to pull the factory key and certificate off the computer, to reuse it on the same computer with a clean Windows install.
    If you are just installing Windows and are going to use the Windows 7 product key on the COA on the side of your computer, all you need to do is download the same version of Windows that your key is for and burn the ISO. Now install Windows answering or following all prompts as needed (except do not enter the Windows product at this time... it will be entered later). Once Windows has completely installed, enter the key and activate it. Your Windows 7 OA key should work on a SP1 install without issue.
    The only thing I see that could mess things up, is the language of the install. If you are still having trouble activating Windows, please reference the ISO you download and a post a photo of your Windows COA
    with the key erased or Xed out.
    Please send KUDOs
    Frank
    {------------ Please click the "White Kudos" Thumbs Up to say THANKS for helping.
    Please click the "Accept As Solution" on my post, if my assistance has solved your issue. ------------V
    This is a user supported forum. I am a volunteer and I don't work for HP.
    HP 15t-j100 (on loan from HP)
    HP 13 Split x2 (on loan from HP)
    HP Slate8 Pro (on loan from HP)
    HP a1632x - Windows 7, 4GB RAM, AMD Radeon HD 6450
    HP p6130y - Windows 7, 8GB RAM, AMD Radeon HD 6450
    HP p6320y - Windows 7, 8GB RAM, NVIDIA GT 240
    HP p7-1026 - Windows 7, 6GB RAM, AMD Radeon HD 6450
    HP p6787c - Windows 7, 8GB RAM, NVIDIA GT 240

  • How do I remove ALL Metro/Modern/Universal/Windows Apps without removing the Start Menu?

    So with three separate builds of WTP I've run the PowerShell command to remove Metro/Modern/Universal/Windows Apps. With each build, it also removes the Start Menu. In the thread below, an MS Support person mentioned that that command was only for Windows
    8.x and shouldn't be run on WTP. What? Then why is that command still available? And, why will it remove some Metro/Modern/Universal/Windows Apps, but not others? Are they marked as System required? Why isn't the Start Menu marked as System required? You'd
    think that the start menu would be pretty important.
    https://social.technet.microsoft.com/Forums/en-US/053f63bc-c174-44f1-8f6c-8ead1ad965fb/spartan-and-start-menu-on-10049?forum=WinPreview2014General
    So, with the start menu being an XAML app, how do I safely remove ALL Metro/Modern/Universal/Windows Apps without removing the Start Menu? I have no use for them and don't want them on my computer. Period. There has to be some command like the one we used
    in Windows 8.x that will allow use to remove ALL Metro/Modern/Universal/Windows Apps without removing the Start Menu.
    Don't give an answer like "just right-click and uninstall". That doesn't work for all of these things, and do you know how long it takes to do that for all of those silly things? Too long! That's also not practical for an Enterprise desktop. It's
    also not practical to leave all of that junk on the desktop, so don't suggest that either.
    Dan

    The problem with PowerShell and all of those scripts is that those particular scripts require a lot of typing, or copy and paste, or having to figure out where all of those apps are stored and then insert their convoluted names into the script. For
    me, scripting is like programming. I have no desire to be a programmer/developer.
    I just want an option in Programs and Features to be able to turn these "features" off. We were able to do it in previous versions of Windows. If we didn't want Internet Games, we uncheck the box. If we don't want our users to be able to print
    documents over the Internet, we uncheck the box. And so on down the line for any other "feature" we didn't want our enterprise users to have.
    Or, we could turn those features off using the System Image Manager. Now we have to write some convoluted script with even more convoluted commands for even more convoluted names for things we don't want.
    The easier script in Windows 8.x was just get-appxpackages -online | remove-appxpackages. That removed the majority of the apps for an individual user. The remove-appxprovisionedpackage command, with the convoluted name of the app, would remove them from
    the hard drive - one app at a time, but that doesn't work in Windows 10.
    So, they came up with a DISM command, but that doesn't work in Windows 10 either. I should say that with my limited developer skills I haven't found a way to make it work.
    Again, I have no desire to be a developer/scripter. They are the same thing in my book. I'm a systems engineer. I do operating systems, not write applications.
    Dan
    So, I guess there is no real answer to this question.

  • Reading Windows text file in Fortran?

    Is there a way to make the f90 compiler read Windows text files properly? I made a simple test with a text file created on a Windows system containing these three lines:
    This is a Windows text file.
    It has some extra control characters.
    Unix does not have those.
    The output I got was:
    <-ext file.
    <-e extra control characters.
    <-se.
    Kevin

    That makes more sense. The problem isn't with the Fortran program, but with the Unix terminal (xterm, or whatever you're using to display the output). If you pipe the output through od like this you'll see all the characters, including the ^M:
    bash-3.00$ fortranread | od -c
    0000000       w   i   n   f   i   l   e       i   s       -   >   T   h
    0000020   i   s       i   s       a       W   i   n   d   o   w   s   
    0000040   t   e   x   t       f   i   l   e   .  \r                   
    0000060                                                               
    0000100                                           <   -  \n       w   i
    0000120   n   f   i   l   e       i   s       -   >   I   t       h   a
    0000140   s       s   o   m   e       e   x   t   r   a       c   o   n
    0000160   t   r   o   l       c   h   a   r   a   c   t   e   r   s   .
    0000200  \r                                                           
    0000220                               <   -  \n       w   i   n   f   i
    0000240   l   e       i   s       -   >   U   n   i   x       d   o   e
    0000260   s       n   o   t       h   a   v   e       t   h   o   s   e
    0000300   .  \r                                                       
    0000320                                                               
    0000340                   <   -  \n
    0000347When the terminal sees the ^M character, it does a carriage return. That means that the next character gets written in the first column. Since the characters after the ^M are spaces, that makes the beginning of the lines appear blank.
    If you want to see the output you expect, you need to pipe it through "tr -d '\015'", or you need to make the Fortran program itself delete the ^M characters. For example, you could write "myline(1:len_trim(myline)-1)" to always strip the last character of the line.
    We should consider making formatted reads strip the ^M by default. I don't know whether any program would actually want them.

  • Smartform window borders not appearing in dot matrix printer Epson FX-1170

    Hi all. I have a smartform with boxes (made out of windows and its borders) and texts inside those boxes. In the print preview, it shows the window borders. However, when the actual printout comes, the window borders do not appear. I have tried to change the 'output options' of the windows - I tried using millimeters, centimeters, point, lines, as well as inches, for the unit and also tried changing the width, but it still doesn't appear. Has anyone encountered a similar problem with dot matrix printers? Please help.

    Hi,
      the dot-matrix printers cannot "draw" lines and pictures, so, it is not capable of drawing the vertical and horizontal lines you have defined in the smartform windows. I think that you need to write the horizontal lines using the '-' or '_' characters but I am not sure about the vertical ones. Of course, as you realize, this requires big development effort.
    Regards,
    George

  • Read field of TextInmput text and to execute referring condition to the informed text

    Post Read field of TextInmput text and to execute referring condition to the informed text, AS3.0 To depend the inserted text for the user, flash will be read by the compiler to player, and a connective if goes to define for which picture will be directed or which page web will be linkada with the URLRequest function, or the function gotoAndPlay () for the pictures of timeline. Ultiliza object of field of dinãmico text or textInput? input I find. ---------------------------------------------------------
    OBJECTS: Object of text entrance: textoEntrada
    button for verification: button link
    All the code is stored in picture 1. we have the function:
    Code:
    stop ();
    function loads (event: MouseEvent): void {
    to var textoEntrada: String;
    if (textoEntrada == " sim"){
          to var link: URLRequest = new URLRequest (" HTTP: \ \ google.com");
          navigateToURL (link);
          } else { gotoAndPlay (2); \ \ the picture where 2ª option is located in timeline }
    to botaolink.addEventListener (MouseEvent: CLICK, loads);
    THIS CODE AND DID NOT FUNCTION!

    made the sujeridas modifications, but it appears the following error: Scene 1, Layer ' Layer 2' , Picture 1, Line 18 1086: Error of syntax: waiting semicolon before port. My objective is when clicar in the button will be verified what he was inserted in the text field, if to contain the word “yes program” it goes to open a URL senão goes for frame 2 of the line of the time.
    where " textE" it is the object of entrance text that this in palco, as well as the button is located in palco, with a name of occurrence of " boto".
    the two elements had been attributed to the name of occurrence through the menu properties of the flash.
    import flash.events.MouseEvent;
    import flash.net.URLRequest;
    function port(event:MouseEvent):void{
                    var textE:String;
                    if(textE.text == "yes"){
                                   trace("primary portfolio to Author");
                                   var indic:URLRequest = new URLRequest ("http://google.com");
                                   navigateToURL(indic);
                    }else{
                                   trace("second page to author");
                                   gotoAndPlay(2);
              boto.addEventListener(MouseEvent.CLICK)port;
    stop();

Maybe you are looking for

  • Windows says the itunes download file is corrupt and will not install

    Im trying to install itunes on my new windows 8 pc.  It seems to recognize my software and takes me to a download the 64 bit file (iTunes64Setup.exe).  Once the download completes, the file appears in my windows download manager with the message "The

  • I restored my iphone 4 but it keeps making me restore it

    I had to reset my iphone 4 to the factory settings and then restore it. Well i have restored it atleast six times and it still is making me restore it. What do i do???

  • Where does Runtime NPE show the line of error?

    When I compile my program it's fine. However, when I try to run it I get a NullPointerException error in the command prompt. Does it say which line the error is occuring on?

  • TS3297 How can I update payment info?

    I am trying to purchase a tv series pass using new Apple tv and tv monitor. It is requesting that I put payment info into my "Computer" which has already been done and in use for quite awhile and on a ,onthly basis. I don't understand how to do this.

  • Tabular form: too many columns

    What can I do with too many columns in a tabular form? I tried modifying the report template behind and put </tr><tr> inside column template, but I'm unable to find current's loop column number. This would work if after every 3rd column in a report I