Printing text depending on condition satisfied

Hi all,
Here I need to print text depending on condition satisfied.print this &GS_IT_GEN-SHORT_TEXT& or print this &gwa_equi-groes&  &gwa_equi-herst&  &gwa_t370k-eartx&.how to use variable in smartform and print program to print either of the text.if possible provide sample code to achieve this.as i am new to form printing section i don't know much about it's programming.
Thanks in advance.
Regards,
Harshada

Hi,
you can define variables in the Global definitions node,
and we can create program lines in the smartform and in that program lines you can write ABAP code,
so, here based on the conditions we can assign. for eg:
l_var1 should be defined in the global definitions node.
if condiion 1.
l_var1 = g_value1.
elseif condition 2.
l_var1 = g_value2
endif.
and then you can print &l_var1&.
Edited by: Radha Vineela Aepuru on Aug 10, 2010 4:10 PM

Similar Messages

  • How to print the Terms and Condition page ine the sap-script

    Hi experts,
                             i got the requirement that how to print the Terms and condition page in the script,i have the three pages, having the same main window, in the last of the main window(all three pages)  i have called the hard coded text(i.e so10 text), but when i am displaying the output  data get printed in the first page but i am getting the second page heading on the top of  the terms and condiions page. In all the three pages i  have the same main window, if i  make change in any window i will affect all the other main  windows.  so please suggest me how i need to go.HOW TO GET GRID OF THE TEXT ON THE TOP OF THE SECOND PAGE OF THE TERMS AND CONDITONS.
    like this i have called in the MAIN WINDOW
    /E : LAST ( IN ALL THREE PAGES)
           INCLUDE ZSD_INVOICE_TERMS TEXT OBJECT TEXT LANGUAGE EN.
    IN THE TCODE SO10
    NEW PAGE TERMS.
    1) TERM MS AND CONDITONS  TEXT.................................................
    FIRST->NEXT, NEXT->NEXT,,   TERMS--->TERMS.

    Hi,
    1. Create a new page by Name : LAST
    2. Identify the text element which will be the last element in the form in the debug mode.
    Mostly Ex: SUM, TOTAL, LAST etc.,
    3. the page linking should be
    First --> Next
    Next --> Next
    4. In the Text element identified in the step 3.
    Write the following code
    /: NEW PAGE  LAST
    /: INCLUDE the standard text created for the terms and conditions in SO10
    Check the syntax for the command but the logic will be the same.
    It should resolve your problem.

  • How to print text in paper format iin smartforms

    Hi all,
      I want a question that  how to print text in paper format like  paper divides into 2 parts and if the firstpart is full of text i.e., it exceeds the first page the text will be displyed in the second part of the first page.
    Usefull answers will be awarded.
    Thanks all...

    Hi,
    U create two windows in the page and same as like second page.
    but in first page first window select the condition print only on first page.
    in second window select conditin print only on second page.
    first try without creating a secondpage. if that doesn't workout create secondpage and try.
    Assign points if useful.
    Regards
    (YUGANDHAR.P)

  • Print text on back side of last page in sap script

    Hi All,
    In Script PO i have to print 'Terms and Conditions' text only on the back side of last page of the PO.
    Presently script contains two pages ( FIRST, NEXT).
    FIRST  with attributes :
       next page as  NEXT , Print mode T.
    NEXT  with attributes :
       next page as NEXT and print mode T
    Please help us in solving issue.
    Thanks and Regards
    Venkata Swamy

    Hi ,
    In Script PO i have to print 'Terms and Conditions' text only on the back side of last page of the PO.
    Presently script contains THREE pages ( FIRST, NEXT, TERMS).
    FIRST with attributes :
    next page as NEXT , Print mode T.
    NEXT with attributes :
    next page as NEXT and print mode T
    TERMS with attributes :
    next page as ' '.
    I Created 'TERMS AND CONDITION' window.For TERMS page i selected 'TERMS AND CONDITION' window only.
    So page window of 'TERMS'  is 'TERMS AND CONDITION'  and i included standard text in 'TERMS AND CONDITION' window.
    If PO contains 9 pages( that means MAIN WINDOW data flows up to 9th page with footer also ).
    So i have to print standard text(Terms and conditions) back side of 9th page only not on all pages.
    So total PO contians 9 pages with 10 prints.
    Please help to solve the issue
    Thanks and Regards
    Venkata swamy

  • Is it possible to add text field in condition type in PO?

    Dear Guru,
    Please kindly advice. Is it possible to add text field in condition type?
    I mean I have seen condition type "FRB1" Freight value in the condition detail we can input vendor code.
    So I would like to know is it possible to add text field in condition detail and how to set it up.
    Thank you very much.

    We would like to maintain some text in condition because of we would like to get that text to PO print out and we don't want to do enhancement.
    Ex: Condition Type: ZZZZ  Insurance  
    PO Print out show
    Item No.          Desc                                                  Qty  Unit Price  Amount
    10                 Item description                                  10000   10         100000
    20                 Item description                                  10000   10         100000
    30                 Item description                                  10000   10         100000
                         Insurance <<Description about insurance>>                  9,999
    Edited by: Saiyaman on Oct 1, 2009 1:35 PM
    Edited by: Saiyaman on Oct 1, 2009 1:36 PM

  • How to set hyperlink on a text depending on a flag

    Hi All,
    Can any one help in setting a Hyperlink on a text depending on a flag which is being set in backing bean.
    Thanks in Advance.

    Not sure what you exactly mean, but you at least can use the rendered attribute of the component or conditional statements in EL.
    <h:outputLink value="http://google.com" rendered="#{myBean.booleanValue}" />
    <h:outputLink value="#{myBean.booleanValue ? 'http://google.com' : 'http://sun.com'}" />

  • PDF Form Printing Text, but no Form

    I have an accountant trying to print a PDF Form.  It cannot be saved, but only printed.  When the form is completed and printed, it only prints out the entered text, and nothing else.  All other PDF docs print fine
    IT conditions:
    She prints to an older Panasonic Copy machine
    Her printer connection is Shared
    Another PC can print the same form 100% fine and that machine goes through here PC to the printer.
    Completed Troubleshooting:
    First discovered she was on Reader 10.1.3 and the other PC was 10.1.1
    Did a complete uninstall of 10.1.3 to include deleting from registry
    Installed 10.1.1 with same issue.
    Verified all a printer and reader settings are the same for both PCs
    Attempted work arounds:
    Installed doPDF virtual printer to try and save the completed form as PDF
    PDF prints text and form text, but not the field borders for each block
    Installed Nitro PDF as default PDF reader, same issue.  Will not print out the field borders.
    Additional Troubleshooting:
    Ran full virus and malware/spyware scans with no issues.
    Specific Form:
    https://forms.in.gov/Download.aspx?id=4722
    Searched all over the internet with Google and have had no luck finding any suggestions

    When you print it, the box that pops up should say, under the Comments and Forms box, "document and markups".  Hope that helps.

  • Different text depending on number of copies (RLB_INVOICE)

    Dear SDN community,
    I need to print the sales invoice in three copies, in which the first copy says "Original", the second "Duplicate" and the third "Triplicate".
    Looking at RLB_INVOICE coding, I noticed that the Smartform is called three times. I copied standard Smartforms LB_BIL_INVOICE and created inside the reapeat window three different text elements with the conditions query the SFSY-COPYCOUNT variable. In every call, the variable is 1.
    Is there any way to archive this requisite without changing standard report RLB_INVOICE?
    Naturally, changing standard report I can pass sy-tabix variable inside SF and query this variable. But shouldn´t it be possible without changing standard report?!
    Thanks in advance,
    MPM

    Dear José,
    In your solution I need to copy standard program to a Z, right?!
    Since I need to create a copy, I would rather prefer to pass the sy-index variable as parameter into my SF like shown below.
    Data: ld_index like sy-index.
    DO nast_anzal TIMES.
    * In case of repetition only one time archiving
          IF sy-index > 1 AND nast-tdarmod = 3.
            nast_tdarmod = nast-tdarmod.
            nast-tdarmod = 1.
            ls_composer_param-tdarmod = 1.
          ENDIF.
          IF sy-index NE 1 AND repeat IS INITIAL.
            repeat = 'X'.
          ENDIF.
    * call smartform invoice
    * MPM move sy-index to local variable
         move sy-index to ld_index.
          CALL FUNCTION lf_fm_name
               EXPORTING
                          archive_index        = toa_dara
                          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        = space
                          is_bil_invoice       = ls_bil_invoice
                          is_nast              = nast
                          is_repeat            = repeat
    * MPM include index parameter
                          is_index             = ld_index
               importing  job_output_info      = ls_job_info
    *                     document_output_info =
    *                     job_output_options   =
               EXCEPTIONS formatting_error     = 1
                          internal_error       = 2
                          send_error           = 3
                          user_canceled        = 4
                          OTHERS               = 5.
          IF sy-subrc <> 0.
    *   error handling
            cf_retcode = sy-subrc.
            PERFORM protocol_update.
    * get SmartForm protocoll and store it in the NAST protocoll
            PERFORM add_smfrm_prot.
          ENDIF.
        ENDDO.
    Since it seems to me that my requirement is quite normal, I was looking for way to solve it using the standard program. Somebody surely had the same problem?!
    To Satyajit: Yes, I used a copy window and I am checking SFSY-COPPYCOUNT. But value is always 1. I have three text elements with conditions checking SFSY_COPYCOUNT, but all copies are always original since the value of SFSY-COPYCOUNT is always 1.
    To sam_ins: I will check nast structure again, but I am quite sure I checked it already and the problema is the same as SFSY-COPYCOUNT.
    Thanks anyway,
    MPM
    Edited by: Marcelo Moreira on Dec 21, 2010 11:23 AM

  • Print text standard in several content

    Hi,
    I want to print in  purchasing adobe form the PO condition in one page but in several content.(subform).
    The po condition is saved in text standard but should be  print in column. A solution is to split the text standard in several text one for each column. But it's heavy to maintain.
    Do you have another solution to allow print text in several content ?
    thanks a lot for your help !
    Stéphane.

    Hello,
    the PO condition is save as a text standard like this with many lines (transaction SO10)
    1 - Essential conditions / acceptance
    FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
    FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
    FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
    2 - Progress undertaking / changes
    HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
    HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
    HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
    3.
    I want to split this text for edit in column like this in adobe form
    1 - Essential conditions / acceptance    2 - Progress undertaking / changes
    FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF    HHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
    FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF   HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
    FFFFFFFFFFFFFFFFFFFFFFFFFFFFF     HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
    Without create one text by column.
    Stéphane

  • How to remove fire action to image field depending on condition

    Hi,
    I have one field as Image and having fireaction event in table and all remaining fields are Mesagestyled text
    Requirement is need to remove fire action for action some rows depending on condition.
    Pls help, how to do this?..
    Thanks in advance,
    Hanimi..

    Hanimi,
    You need to make use of switcher Region, for achieving your requirement. Refer Developer Guide for more details on Switcher Region.
    Regards,
    Gyan

  • Print text vertically in SAPScript

    Hi,
    How to print text vertically in SAPScript?
    Can we use controls for it?
    Please help its urgent.
    Thanks,
    Madhura

    You can print horizantally. using the following code
    You know the total length of your text right.
    You need to have conditions to avoid unnecessary spaces.
    If &v_text(1)& is not initial.
    ph &v_text(1)&
    endif.
    if &v_text+1(1) is not initial.
    ph &v_text+1(1)
    enddif.
    if &v_text+2(1) is not initial.
    ph &v_text+2(1)
    enddif.
    But we cant rotate letters to left . Not sure . Will explore on it and let you know.
    Reward points if useful.
    Regards,
    Nageswar

  • How to print text vertically in smart forms

    hi,
    Can any one tell how to print text vertically in smartforms
    ADVANCE THANKS
    GUHAPRIYAN

    HI,
    Chk out  this thread.Maybe it proves helpful.
    Re: vertical writing in smartforms
    Regards,
    Gayathri

  • Print Text File in NW 3.12?

    I have to admit some ignorance regarding NetWare printing, so my
    apologies in advance...
    I work for a document management company, and am trying to find a
    solution for a customer running a fairly archaic, DOS 6.22-based
    application that utilizes a NetWare 3.12 server for file and print
    services. My need is to retrieve print output from their application,
    in the form of a text file, and then reprocess it for automated faxing
    through a fax server device.
    My problem is this: their application seems to print directly to a
    printer by defining what it calls a "network port" (which seems to map
    to a spooler, 0 through 5) or LPT1, and by referencing a printer
    definition. As far as I can tell, the files that are deposited in the
    print queue are byte streams, i.e., they're not human-readable (they
    have extra characters that I'm assuming are control characters). They
    therefore aren't usable by my print distribution software.
    I've tried using CAPTURE to send to a text file, but the application
    seems to conflict with the command. If I set CAPTURE, then start the
    application and send a job to LPT1, the application returns an error
    that the printer is unavailable. Upon exiting the application the port
    is no longer being captured (although I've tried all of the options I
    can think of to keep it so). Oddly enough, the application does
    successfully print a text file to LPT2 (for a barcode printer), which
    is CAPTUREd via a command in the system autoexec.bat. This is done a
    different part of the application.
    If anyone can help me figure out a way to generate a text file in this
    environment, or to work with the print file that's currently being sent
    to the queue (e.g, can it be translated somehow to a simple text file?),
    that would be much, much appreciated. This customer is in a tight spot,
    with an unsupported application that they can't presently afford to
    upgrade. My solution would save them enough money over time to replace
    the system.
    Again, thanks in advance for any help!
    wynand32

    If the Dos app has no print drivers included, then indeed it is relying
    on NW and PRINTDEF/PRINTCON to do the formatting stuff. That must have
    already been set up for it to be successfully printing now, it's just a
    matter of adding a definition that doesn't do anything to the print text.
    >In fact, given my ignorance of the NetWare environment, I'm not sure
    how the term "driver" even applies, unless it would refer to the
    printer definition.
    I was referring to a driver within the Dos app, nothing to do with
    NetWare. For instance Word Perfect for Dos came with Dos drivers for all
    sorts of printers, one of which was a generic text driver.
    >I wonder: is there a setting in PRINTDEF that could be changed for one
    of the printer configs that would influence the output? Or, would
    PRINTCON apply in this environment?
    Not supplied, AFAICS, but either one of the simpler print drivers
    supplied such as Diablo will do, or you'd need to set one up. Hopefully
    http://www.novell.com/documentation/...a/fm19724.html
    will help you enough as it's been too long since I did it to remember
    the details.
    Andrew C Taubman
    Novell Support Forums Volunteer SysOp
    http://support.novell.com/forums
    (Sorry, support is not provided via e-mail)
    Opinions expressed above are not
    necessarily those of Novell Inc.

  • How to print text/data in flex 3 using printer???Plz help...

       Hi,
              plz tell me the way to print text/data using printer in flex.  I tried the FlexPrintJob class. but it takes object of a container to be printed & prints the visible content of that container(along with scrollbars), bt i want to print all contents of the container(including invisible).
          I have tried to print bitmap image through FlexPrintJob but it takes lot of time for spooling... So plz help me out in printing(fast with all content) in flash
    I am using flex 3 (flex Builder 3 IDE).
      Thanks in advance!!!

    Hi Sagar,
    Don't worry You can use the below work around to print all the contents of the Container including the invisible contents under scrolll with out scroll bar..
    So what the idea here is we are seeting the container height to full size with out scrolls before sending the container object to printer and as soon as you print the object you are restoring it to the original height with scrolls...so that you can print the full contents without scrolls...
    You may have doubt that by chnaging and restoring the size the user may see momentary resize of the container but it is not so as it is a fraction of a second and user cannot notice this change... Give it a try ..I had already run into this problem recently and I have found a work around for this which is as below:
    // Here mainContainer is the container or box id the contents of which you want to print
       private function doPrintContainer():void
        var printJob:FlexPrintJob = new FlexPrintJob();
        if(printJob.start() != true) return;
        try
         var mainContainerHeight:int = mainContainer.height;
         //Increasing the height of the desired component to be printed.
         mainContainer.height = mainContainer.measuredMinHeight;
         mainContainer.verticalScrollPolicy = "off";
         //Adding the resized Component to our FlexPrintjob and then sending the print request
         printJob.addObject(this,FlexPrintJobScaleType.MATCH_WIDTH);    
         printJob.send();
         //Resizing the component back to normal size
         mainContainer.height = mainContainerHeight;
         mainContainer.verticalScrollPolicy = "auto";    
        catch(error:Error)
                     trace("Error : " + error.message);
    If this post answers your question or helps, please kindly mark it as such.
    Thanks,
    Bhasker Chari

  • How can i print text messages from my htc amaze to my deskjet 3050A

    how can i print text messages from my htc amaze to my hp deskjet 3050A

    Hi,
    I believe the phone uses Android OS, v2.3.4 (Gingerbread) therefore you can use one of these applications:
       http://www.printeron.com/apps/androidprinting.html
       https://market.android.com/details?id=com.pauloslf​.cloudprint&hl=en
    Regards.
    BH
    **Click the KUDOS thumb up on the left to say 'Thanks'**
    Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem.

Maybe you are looking for