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

Similar Messages

  • How can i give conditions in smartform text editor

    Hi all,
    i want to display something based on some condition using text element in smartforms , how can i do it.
    in SAP Scripts normally we give conditions in text element using command line(/:)
    but it wont work in smartforms , how can i give the same in smartforms ?
    please help me soon.
    thank you.

    Hi,
    You can use the Conditions tab for the corresponding text.
    ex: in the text-editor consider you are displaying a name field based on a variable
    <b>
    ws_name
    ws_variable</b>
    In the text give the field to be displayed
    &ws_name&
    In the conditions tab give
    ws_variable = 'X'
    This will print the value from ws_name only when ws_Variable = 'X'.
    Regards,
    Tushar

  • How to use if condition in XML Publisher Desk Top

    Hi..,
    How to use if condition in XML Publisher desk Top.
    Please guide me.
    Thanks,
    Suresh.

    What kind of condition you want to use?
    You can use Condition like this:
    <?xdofx:if condition then value1
    else if condition then Value2
    else Value3
    end if?>
    Please go thru XML Publisher User Guide.
    Thanks
    Ravi
    [email protected]

  • Using OR condition in RTF Template

    Hi,
    How to use OR condition in RTF?
    say for example,consider the EMP table.
    I want to show the employees of department 10 and 20 in my XML Publisher report.
    How can i write --
    if deptno = 10 or deptno =20 in RTF template

    you can add the condition in RTF template
    <?if:XMLfield=30 or XMLfield=10 ?> to display <?end if?>

  • Can we use control events in smartforms

    Hi all,
    I am srinivas. can we use control events in smartforms, I mean at new, at end of ..... if these are not used can you suggest me any alternative....
    Actually my requirement is like a classical report, for which I need to display subtotal and grand totals based on two fields....
    Please help me out in this issue as it is very urgent.
    <b><REMOVED BY MODERATOR></b>
    Thanks in advance....
    Regards,
    Sri...
    Message was edited by:
            Alvaro Tejada Galindo

    Hi Nick,
            Thanks for the reply... it is really very useful for me.
    As I discussed in my earlier mail regarding the output sequence, which should be in the below format.
                                           number       quantity uom      unitprice        amount curr
    plant
           material
                   date
                                             x                 y                    z                      A           
                                             e                 f                     g                      h
                                             p                 q                     r                      s
                   subtotal date..... 1                   2                    3                       4
                   subtotal  material.5                  6                    7                       8
    As you said when I using <b>event of Begin</b> its working fine. but while using the <b>event of end</b>,  I am specifying date and then matnr (sort) its taking(nodes are created mean first matnr and then date) in the reverse order and when I am taking matnr and date it is placing the events(nodes) in the right order but the order date is not triggering.
    can please tell me how to proceed here..
    waiting for your reply..
    Regards,
    Srinivas

  • Can we use select options in smartform

    can we use select options in smartform if so can any one send me a sample code...
    Thanks
    bhaskhar

    Hi ,
    Can u explain why u want to use select options in smartforms . U can try it in program lines .
    Its better to use select options in the driver program and fetch data accordingly in the driver program or passing the selected values from select options to the smatfrom and fdetching the data there in smartform .
    Regards

  • 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

  • Using If condition in For EACH Group

    Hi all,
    I want to use if condition in for-each-group. Basically my requirement is that i want to use dynamic grouping. There will be two groups and the upper group and lower group will be selected on the basis of a report parameter.
    I hope i made it clear enough. So please help me in this. Any ideas will be highly appreciable.
    Thanks and regards
    Naveed

    You can add a If condition filed after the for-each field
    for EG : <?if:ADDRESS_TYPE = 'Employee Address'?>
    and then add anothet field which has <?end if?>
    Hope this helps.
    Thanks,

  • Transformation issue while using IF condition.

    hi everyone,
    i am using bpel transformation based on the condition of field using IF condition.
    A       B          C          D
    10     20          30          40
    20     20          30          50
    30     30          20          60
    40     40          20          70
    now i need to apply IF condition in transformation on the filed B. if B = 20 transfer the data to one table or B NE 20 to other table
    now my issue is, it is able to differentiate the rows, but the data in the field in second table remains same 20.
    as i hope its storing the data in buffer location and writing it. after mapping with the fields in source.
    can anyone suggest, how to get the actual value after differentiating the records.

    Declare an internal table with two fields lar and another field for seconds.
    IF v_lar01 = 'MSTD' and v_vge01 = 'MIN'.
    it_time-lar         = lar1
    it_time-seconds = t_plpo-vgw01 * 60  " minutes to seconds
    else.
    it_time-lar         = lar1
    it_time-seconds = t_plpo-vgw01 " second
    endif.
    append it_time.
    IF v_lar02 = 'MSTD' and v_vge02= 'MIN'.
    it_time-lar         = lar2
    it_time-seconds = t_plpo-vgw02 * 60  " minutes to seconds
    else.
    it_time-lar         = lar2
    it_time-seconds = t_plpo-vgw02 " seconds
    endif.
    append it_time.
    and so on...at the end sum it_time-seconds and do the calculate to get hrs n minutes from seconds
    Mathews

  • SAPFM06P - Can this program be used for triggering a Smartform Output??

    Hi Experts!
    I researched a lot and came to a conclusion that Program SAPFM06P can only be used trigger either a SAP SRIPT Output or a PDF FORM output. It cannot be used to trigger a SMARTFORM output directly as there is no code in it to trigger a SMARTFORM.
    My understanding:
    I will have to either create an Enhancement to the Program or a Zcopy of SAPFM06P where I need to write the logic in form routine ENTRY_NEU to call a SMARTFORM.
    Please tell me if my understanding is correct and please guide me if there is any easier way to achieve the same functionality.
    Thanks for help!
    Greetings,
    Amit

    Hi,
        U can Copy this standard Program to ZProgram and Insert the FM SSF_FUNCTIONMODULE_NAME and call ur smartform and assign the same combination to the Output type Given to u in NACE Transaction..
    This is the Driver Program which I used for PO Smartform
    [http://vjkvijaya.blogspot.com/2009/03/puchace-order-smartform-driver-program.html]
    Regards,
    Vijaya Lakshmi.T

  • 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.

  • How to use HTML Tags in Smartforms

    Hi,
    Can you please help me out in knowing how to use HTML tags in Smartforms,
    suppose i want to display some text in BOLD i should use the tag </b> as shown
    </b>  Header Information <b>
    regards
    Ranveer

    Hi Ranveer ,
        check this following links,
      hope this wil helps you
    <a href="http://sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/smartforms/smartform%20in%20abap.pdf">check this link,to know abt HTML in smartforms</a>
    rgds,
    shan

  • How to use standard texts in smartforms

    Hi Friends,
          How to use standard texts in smartforms, ie in scripts we are using standard texts using tr so10.
    thanks in advance,
    regards,
    sharma.

    For long text
    method1
    Create TEXT node- general attributes change text type to include text
    then you can input text name/text object/text id/language
    method2
    create PROGRAM LINE node - use FM READ_TEXT to read it to a internal table
    then use LOOP or TABLE node to display it
    For TEXT module(For foreign language)
    Tr-code:smartforms -- choose Text module(not choose form)--create a text module object
    then enter smartform Create TEXT node- general attributes change text type to text module
    input the text module name which created by above
    btw SO10 is just for Scriptform, in smartforms we use text module to replace SO10

  • Problem using a conditional suppress in a cross-tab ?

    is there a problem using a conditional suppress in a cross-tab on a row  or summarized field  in crystal XI?
    I am using the following conditional suppress on a summarized field and its rows
             If {@SortCode}=4 then true;
    Sortcode is a group sorting formula field
    the summarized field is a formula field as well.
    All of the summarized fields are suppressed although the cross- tab performs correctly on @Sortcode  and the summarized field when not using the condition        
    it seems to me to be a reporting flow issue although i've included "whileprintingrecords" and "evaluateafter" with no success.
    i have also moved the cross-tab from the report header to group header and applied a conditional suppress on the group header through section expert.
    this supresses the group i dont want but includes grand totals for each group and also varys the number of columns
    i can't filter on sortcode because one of the grand total calculations requires those records and a subreport or second cross-tab does not contain the same number of columns
    the cross-tab is necessary as a client may have columns spanning one to many pages
    thanks for your help

    Hi I have a similar problem,
    I have an clock in solution, where i have some dates with data such as, various entries for a date eg, 01/11/2010 1hr, 01/11/2010 3 hrs etc, 03/11/2010 2hrs , 05/11/2010 4.5hrs, 05/11/2010 4 hrs so i need total for each day and highlight only those days, where total is less than 4.5, including days which donu2019t have records eg 02/11/2010 & 04/11/2010, I summarise in totals using a cross tab, to get summarised output for each day as,
                Totals
    01/11/2010    4
    03/11/2010    2
    05/11/2010    8.5
    in order to get the dates which didnu2019t have records, i added a dataset from Excel spreadsheet where i just have a sequential dates for the year , and use record selection to select only those dates in range which i need to display, so the result i get
    01/11/2010    4
    02/11/2010    0
    03/11/2010    2
    04/11/2010    0
    05/11/2010    8.5
    so far so good, all using cross tab, now i want to suppress rows which have total > 4.5 so the result should be
    01/11/2010    4
    02/11/2010    0
    03/11/2010    2
    04/11/2010    0
    How can i do that?

  • Use Global Conditions when Deploying an Application to a User

    Hi,
    Use Global Conditions when Deploying an Application to a User:
    I would like to deploy App-V Application with User centic in mind. The problem is that when the user login to a specefic typ of desktop the application shall be deployed. But if the use login on there primary device or some other
    device with same SLA the Application shall not be deployed.
    I think I can use Global Conditions to solve this. I have read about GC and it looks like I could greate a GC rule that deploy the software if the computer is in an AD-group or maybe becas all this computer starts with same prefix, sp maybe
    if the computernamn starts with PC the application will get deployed.
    The issue is that there is differant SLA on the computers that the User login to. 
    Or what mor can I do?
    /SaiTech

    Just keep in mind this puts a load on AD, a Domain Controller can get tickled silly by these Global Conditions running from each of your Clients, depending on the scale of your environment it can have an impact. It's a great idea GC's, just need to consider
    what load you are putting on the infra when they run.
    Might not be an issue for\to you, worth nothing all the same.
    Robert Marshall | This forum post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs

Maybe you are looking for

  • How do I save a document in rtx format in Lion if the document is already saved

    I'm having trouble saving my document as a rich text format in pages.  I think I could do it had I not already saved the document.  It seems that after I save a document the save as option disappears and it will only let me save it as a version or  a

  • Link to my Photos

    The laptop went thru a update recently with Adobe Flash Player 9, it was an auto update and pretty much did it by itself. My problem is, before this, as of yesterday, I was using my spaces at MSN to host photos and the linking them to an ad. I ws upl

  • What are objects in SMARTFORM?

    HEllo firends,                     I want to know wht are objects in SMARTFORMS. And wht is the role of golobal settings in SMARTFORM?

  • Validation provider in CSV GTC in OIM

    Hi, We are trying to restrict status code coming from the feed file to 0,1,2,3 only. So, I am including a validation check - "Is in Range" and provide max limit as '3' and min limit as '0' and data type as 'integer'. But even if I provide status code

  • HT5262 my ipad mini screen is going crazy

    My ipad mini screen has started going crazy. It's zooms in and out, changes pages and moves all by itself.