Re. condition on text element

Hi friends
I have text elements within which i am displaying many fields.But i need to impose condition only one field. only when the field has the value it should be displayed otherwise no blank line should be displayed for that field. can any one help regarding this.. its urgent ya..
thanks in advance

Hi ,
this is very simple in smartforms
for every text elemet there is an conditiobs tab
in that tab specifify the condition as <var> NE ' ' .
and in scripts also it is the same

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,How to display different standard Text in a Text element.

    In smartform,if I want to according to the different conditions,display one of the serveral different standard Text objects which all  maintained in SO10 in a same text element,how to do it?
    if i put them in serval text elements, each condition only display the corresponding text element,but the text content can not display in the same position.
    Is there anyone can tell me?
    thanks.

    use Alternative to control it no problem
    for example you want to display the different SO10 to same position TEMPLATE's row 1 col2
    TEMPLATE1
    Alternative case1
    YES
    INCLUDE TEXT1(display SO10) [set output option line1 column2]
    NO
    Alternative case2
    YES
    INCLUDE TEXT2(display SO10) [set output option line1 column2]
    NO
    Alternative case3
    every case your SO10's text is always display at line2 column2
    just try to test it ,you can know

  • How to display standard text element of main window in next page

    hi all
    In scripts we have standard script medruck for purchase order.
    i want to pull text elements ( terms and payment terms ) in to main window of next page.
    i have included main window in page windows of next page ,but im unable to print text elements of terms and payment terms in next page...
    any one give your valuable inputs.
    Thanks
    deepika.

    Hi deepika,
    First copy standard MEDRUCK to ZMEDRUCK and do the necessary changes.
    Then check in driver program when exactly Terma and condition text element is called. Generaly its after printing all items but just check once to confirm.
    If TERMS and condition element is called ate end just put a NEW-PAGE  command at end of the text element which is called before terms.
    Hope this will help You.
    Thanks
    Dhiraj.

  • The main window of third page will not display the text element

    Hey, smartform guru,
    I am working on the smartform to print PO data.
    The smartform has first page and next page as usual.
    I created a third page P_TERMS to print the terms and conditions for PO printout.
    I used commend node to assign the page P_TERMS as the "Go to new page" and it did go to the P_TERMS page but the text element will not print in the main window in P_TERMS page.
    The text element will print in the secondary window.Since the terams and conditions are 4 pages long, I expected it to print in the main window, so I do not have to define several extra pages to print them.
    Any idea?
    Thanks in advance!
    Fisher Li

    Hi Fisher,
    Unfortunately, In a smartform, only single main window is continued to all pages even though you can declare windows under each page as main window, but it actually acts as the same window for all pages. It just means that if text from 1st page is overflowed, it will continue to the next page with main window.
    Command line to go to next page will create an extra page but since text is not flowed in main window, it won't print the text element you have included in main window on third page.
    The solution to your problem as I see is that either you include your terms and conditions in the main window of your first page and just before your text element for T&Cs, use Command to go to third page.
    Hope it helps.
    Ravi

  • How to end a text element

    Hi,
    Iam having a text element which holds the data of an internal table which has 15 records and it prints those records in the main window. Once all these 15 records got printed i need to print a standard text.
    for me what happens is it prints one record and then it prints standrad text then 2nd record and standard text klike this it goes for all 15records. Can any one tell me why this happend and how to correct it.
    the code which i have written is
         /E     E1
         P1   &IT_BKPF-BELNR&     &IT_BKPF-BLDAT&     &IT_BKPF-BUDAT&
         /:      INCLUDE ZTEXT_TEST OBJECT TEXT ID ST LANGUAGE EN.
    Please help.Thanks
    Regards,
    Rose.
    Edited by: camila phyrose on Feb 18, 2009 7:08 AM

    Hi,
    Create a window below main window  and write the standard text there.
    After every record,it will write the standard text there as u have written in the text editor
    without any condition.
    This is bcoz, the text elements only ends when there is another text element.
    If u are sure that only after 15 records it should print the text,then give condition.
    /E E1
    P1 &IT_BKPF-BELNR& &IT_BKPF-BLDAT& &IT_BKPF-BUDAT&
    /: If &w_temp& eq 15.
    /: INCLUDE ZTEXT_TEST OBJECT TEXT ID ST LANGUAGE EN.
    /: Endif.

  • Space left in the printout after hiding the text element in smartform

    Hi
    In my smartform there is space left in the printout after hiding the text element with condition.
    Is there any way by which we can remove the space in the smartform,
    Thanks
    Ank

    Hi ,
    I am displaying the text in table with two columns and in one column i am giving the text elemnt and in other the value.
    I had given the condition that if the data is not present then the text elemnt should not be shown in the form .My form is working perfectly except that its leaving the space for that text element.
    thanks
    Ank

  • How to change general attribute of text element

    hi
    who now how to change general attribute of text element on screen dinamically? I wish to change text value dinamically for example.

    Hi Denis,
    I am not too sure on what you want.
    If you require that the text value be different based on some conditions you can declare as many text elements as conditions and call the relevant text element.
    But I dont think that you can assign dynamic texts to a single text element.
    Regards,
    Saurabh

  • Use of Text elements

    Hi all,
    I have created a window and giving text elements in that window.Now i m Adding a lin of type /E in change editor to use text element.i needed it it to specify text elements in SPRO transaction.
    So for that i want to add text elements in Form in SPRO transaction.
    Also want to know that is it possible to use condiitons in Text elements?
    Suggess me it's Urgent for implement.
    <b><REMOVED BY MODERATOR></b>
    Thanks
    Sanket sethi
    Message was edited by:
            Alvaro Tejada Galindo

    Hi
    Text elements in SAPscript are the individual text components of a form. In the different windows, you can define text elements with different attributes. For printout, the print program accesses them. Text elements can also contain variables (symbols) and SAPscript control statements.
    In simple words, Text Elements are the only way to transfer the data from report program to FORM using WRITE _FORM FM.
    Check this link(Very Helpful) :
    http://help.sap.com/saphelp_nw04/helpdata/en/d6/0db38b494511d182b70000e829fbfe/frameset.htm
    You can define the text elements in sap script to group the texts that you want to display...like a condition..
    Ex..
    /E TEXT1
    P1 This is a first text element..
    Then use WRITE_FORM function module to call the text element
    CALL FUNCTION 'WRITE_FORM'
    ELEMENT = 'TEXT1'.
    You can also call the write_form function module within a loop..
    Check this link(Very Helpful) :
    http://help.sap.com/saphelp_nw04/helpdata/en/d6/0db38b494511d182b70000e829fbfe/frameset.htm

  • For the checking the conditions in script element

    Hi,
          I have one element in medruck script like item.in that i have some conditions.how can i check that conditions in that?
    whether in script or print program?
    Rgs,
    Venkat

    Hi,
    You need to check the condition in the text element of the script.
    Regards,
    Raj.

  • Need logic in sap script text elements.

    Hi experts
    I need a logic for the below requirement in text elements.
    I am giving IF condition for some tax codes against to C - Form., But my condition given in second line is getting failed  .
    my condition logic
    /:       IF &EKPO-MWSKZ& = 'CA' OR &EKPO-MWSKZ& = 'CC' OR &EKPO-MWSKZ& = 'CD'
    /:        &EKPO-MWSKZ& = 'DA' OR &EKPO-MWSKZ& = 'DE'.
    T2     ,,SALES TAX/VAT&V_VAT_PER& u201CAGAINST C FORM",,,,,,,,,,&V_VAT_sum(C)&
    /:        ELSE
    T2       ,,SALES TAX/VAT&V_VAT_PER&,,,,,,,,,,&V_VAT_sum(C)&
    Please let me know what is to be given TAG COLUMN  for second line in IF condition .
    and i am getting correct output for tax codes CA CC CD which are given in first line, But no getting the correct out for tax codes DA and DE.
    Thanks & Regards
    Suresh
    Edited by: suribabu124 on Apr 21, 2010 5:19 PM

    Hi,
    in the below i feel that you forgot to mention the OR condition.
    /: &EKPO-MWSKZ& = 'DA' OR &EKPO-MWSKZ& = 'DE'.
    soultion like.
    /: IF &EKPO-MWSKZ& = 'CA' OR &EKPO-MWSKZ& = 'CC' OR &EKPO-MWSKZ& = 'CD' OR
    /: &EKPO-MWSKZ& = 'DA' OR &EKPO-MWSKZ& = 'DE'.

  • Text element of sales order form

    I have a question about the text element of sales order printing form.
    i run a sales order with some price condition (ZKFA) -  VA03 and want to print it out
    before i print it without ZKFA price, it's correct when printing , after input the ZKFA price, all the item detail are missing
    I've checked the SAPScript form ..and see there are many /E (text element) .to control. and i think it's the key ~
    but i don't know how I can debug it step by step in SE71 ...and show the foreground process to know and find where is the problem...
    i don't know which system program is run to control the form text element...

    I'VE CHECKED THE SYSTEM PROGRAM RVADOR01..AND KNOW WHERE IS THE KEY POINT....
    I STILL DON'T KNOW WHY ....IF THE ITEM HAVE THE CONDITION "ZKFA" - AIR FREIGHT ...THEN THAT ITEM DETAIL CAN'T BE SHOW...
    IF I ADD THE CONDITION - ZDI2 - DISCOUNT, IT'S OK FOR SHOWING IN THE FORM.
    I DON'T KNOW WHY CAN'T GET INTO THE ELEMENT ='ITEM_LINE_PRICE_QUANTITY' IF THE ITEM HAS SUBCHARGE - ZKFA
    I SEE THIS CODE IN RVADOR01:
    FORM ITEM_PRICE_PRINT.
      LOOP AT TKOMVD.
        KOMVD = TKOMVD.
        IF SY-TABIX = 1 AND
         ( KOMVD-KOAID = CHARB OR
           KOMVD-KSCHL = SPACE ).
          CALL FUNCTION 'WRITE_FORM'
               EXPORTING
                    ELEMENT = 'ITEM_LINE_PRICE_QUANTITY'.
        ELSE.
          IF KOMVD-KNTYP NE 'f'.
            CALL FUNCTION 'WRITE_FORM'
                 EXPORTING
                      ELEMENT = 'ITEM_LINE_PRICE_TEXT'.
          ELSE.
            CALL FUNCTION 'WRITE_FORM'
                 EXPORTING
                      ELEMENT = 'ITEM_LINE_REBATE_IN_KIND'.
          ENDIF.
        ENDIF.
      ENDLOOP.
    ENDFORM.

  • URL in Formatted Text element

    I am using URL hyperlinks in a Formatted Text element. But, in runtime configurator, they open in the parent window although I have included the target=_blank directive in the a href element. I want to open them in a separate window. How can I achieve this? Text link element can achive this, but I will have to create many Formatted Text and Text Link elements for a single text display and this will affect the alignment as well. Any advice appreciated. Thanks.

    Thanks Guys.
    I am trying to create a declaration text like the below.
    "I understand that this application does not in itself constitute any form of approval for any service and does not place us under any obligation to grant such an approval.
    <br>
    <br>
    I understand and agree that the information submitted through this application form, shall, upon payment of all fees, and issuance of a receipted invoice by us, constitute part of our standard terms and conditions for the relevant service type as follows: <a href=http://www.website.com/terms target="_blank">Terms</a>
    <br>
    <br>
    I certify that all of the information submitted in the application form above is correct, that I am over 18 years old and able to enter into a legal contract in the service.
    <br>
    <br>
    I also confirm that I have read and agree to <a href=http://www.website.com/Terms-and-Conditions/ target="_blank">Privacy Policy</a>"
    I created the above as a formatted link with a style associated since this section needs to be of specific style.
    I tried to create a Raw text element, but it is not available inside a cell format (which is where the above formatted text element is currently placed).
    If I have to include the links as Text link element, it will be a cumbersome process to create many FT and TL elements and format them properly.
    Any ideas appreciated. Thanks.

  • Standard Text and Text element

    Hi Everyone,
                      Hope you all doing great.
    What is the difference between SAP Stadard text and Text elements? When and where to use these?
    I have got Terms and condition text for my quote O/P Document, Is it okay if i go with Standard text?
    What is the Text ID i have to use?
    Thank you
    Kris

    Hi
    Difference between  SAP Standard text and Text elements :
    SAP Standard text : The standard texts which have been already created and can be created
    Text Elements :  They are the elements which are available in VOTXN and are assigned while configuring text determination
    Regards
    Srinath

  • Sourcetable for text elements

    Hi there, could You tell me which table keeps application texts?
    I've got such problem, that I'd like to determine text language by code, so for example:
    IF ( condition1 ) .
      text-001 will be taken in language A .
    ELSEIF ( condition 2 ) .
      text-002 will be taken in language B .
    ENDIF .
    I tried
    IF ( condition1 ) .
      langu = 'A' .
    ELSEIF ( condition 2 ) .
      langu = 'B' .
    ENDIF .
    but it has no effect, because when sy-langu in one line is set to new value ... in the next line in debuger it takes the old value
    So maybe I could ... SELECT texts directly from database with language key, according to some code-condition ... is it make any sense?
    DATA: langu LIKE sy-langu .
    IF ( condition1 ) .
      langu = 'A' .
    ELSEIF ( condition 2 ) .
      langu = 'B' .
    ENDIF .
    SELECT text FROM text_table WHERE language = langu .
    Which table are text kept in? I'd be thankful for some tip, greetings. P.

    HI,
    Use this Statement to get the text elements of the program..
    READ TEXTPOOL prog INTO itab LANGUAGE lang.
    For more help press F1.

Maybe you are looking for

  • **How to call a report from a form by passing a specfic value?????

    Hi Expert, I want to call a report from a form.My problem scenario like, a user is login to his account and there is a option called ADMIT CARD(Push Button).Now when he pressed the button a report will generate.I want that when he pressed the button

  • SQL Developer 1.5 - how to get stuff to develop extensions

    Sorry all, I'm sure this has been covered before but I can't find it: I'd like to write an extension or two for SQL Developer 1.5, but I can't get things off the ground using JDeveloper 11g preview 3. The stumbliung block seems to be getting the ESDK

  • Connect to router but cannot connect to the internet

    i set up a wireless network from my desktop, the desktop works great connects to the internet and is the pc that the router is on..i have a laptop and search the wireless networks..i find the one i made and connect to it, my laptop says im connected

  • Advanced Search in 902

    I have created a custom search page with custom search portlets that perform an autoquery. One portlet is configured as an basic search portlet and the other as an Advanced Search portlet. This is then used as the default page for searching in my Por

  • Black lit screen and unresponsive on start up

    My mid-'13 (purchased October '13) 11" MacBook Air turns on but only to a black lit screen (no curser etc), the keyboard seems unresponsive and when I close it, the Apple is still lit up. Been like this for 4 days and no change. Fully charged. Runnin