Sapscript: IF statement over multiple lines ?

Hi,
in my sapscript i have to use an IF statement with many OR conditions
/:   IF cond1 OR cond2 OR cond3 OR cond4 OR cond5 ........
But i can't write it on one line. Even with SHIFT-F8 to go to the right the line lenght is too short.
How can i solve this one ?
regards,
Hans

Hi,
This is not a solution, more a workaround but should avoid the line length problem.
Define a flag in your form (/: DEFINE &IF_FLAG&), then you can call an ABAP subroutine to set the value of this flag (take a look at the online help for SAPscript PERFORM if you're not familiar with it).  The subroutine will contain your long IF statement and the SAPscript will just contain
/: IF &IF_FLAG& = 'X'.
Regards,
Nick

Similar Messages

  • SAPScript /: INCLUDE statement, no new line

    dear all, i am sure there is a way of doing this, just cannot see how.
    quite simply, i wish to have a description before the
    /:INCLUDE &T166P-TXNAM& OBJECT &T166...
    gets displayed, but on the same line !
    currently this,
    /E   ITEM_TEXT              
    D1   Material Description   
    /:   INCLUDE &T166P-TXNAM& OB...
    throws a new line, which i know, but dont want
    thanks in advanced
    ps. print program must stay the same, also, no shelling out to other zprogram. want to do this in SAPScript

    Use a subroutine program to get the Include text value. With this you can get your requirement.
    Refer this link
    http://help.sap.com/saphelp_40b/helpdata/en/d1/803279454211d189710000e8322d00/content.htm
    Text Include / Read_TEXT  in Smartforms
    http://www.sap-img.com/abap/use-fm--read-text-to-read-the-various-text.htm
    http://www.sapdevelopment.co.uk/fmodules/fms_readtext.htm
    Edited by: Bala Krishna on Sep 12, 2008 8:36 AM

  • How do I return a match across multiple lines in UNIX?

    How do I return a match over multiple lines in UNIX?
    For example, I want to return the contents within tags across two lines:
    <tag>content content content
    content content content</tag>

    For the Perl example, how does the .. work?
    Range Operator:
    <http://www.perl.com/doc/manual/html/pod/perlop.html#Range_Operators>
    ...The operator is bistable, like a flip-flop, and emulates the line-range (comma) operator of sed, awk, and various editors. Each "..'' operator maintains its own boolean state. It is false as long as its left operand is false. Once the left operand is true, the range operator stays true until the right operand is true, AFTER which the range operator becomes false again....

  • Having trouble with multiple lines

    I'm trying to fill out this form for an application that is a read/enter/print only PDF, and I got to a multiple line box and instead of being able to enter text in line for line, when you try to enter text it shows as one big format which I can't change. Illustration below:
    http://i.imgur.com/Yukk8.jpg
    I don't know if it's some setting I have wrong or they didn't make the text box right or what, but I need to know if there's anything I can do to fix it because they mandated that the form be filled out electronically. Thanks in advance.

    I can't say for certain without looking at the actual PDF but it does appear that they created one large text box over multiple lines. For a fillable form it may have been smarter to remove the lines and create a box with smaller text that supports multiple lines.
    At any rate, nothing you can do about it with the free Reader (and depending on the security, maybe nothing with Acrobat either.)

  • Interactive report - multiple lines

    Hi,
    I saw a thread on here where people used custom <something> to make reports spread over multiple lines (ATD example). However, that was a normal report. Is there a way to make a column spread over two rows in an interactive report? An app has just been released for testing but the description field is causing headaches in the report.
    Mike

    Nevermind it seems to have started adjusting itself now :o
    Mike

  • Multiple line printing in SAPscript

    Hello Friends,
    I have problem in printing multiple lines on sap script. I have created a window. and i have creted a text eliment 'MULTIPLE it. Under this Text eliment i have code as below.
    /E    MULTIPLE
    AS  & internalTABLE-FIELD&
    I have fetched data into TABLE in the driver program.
    I looped at the table and and called the WRITE_form FM specifying the Element and Window.
    In the ourput i am seeng only the last entry in the internal table, not all the entries.
    Please advice.
    Thanks,
    Mohammed.

    Hi
    I hope you passing the entire internal table instead of that you loop to the WRITE_FORM for example
    LOOP AT itab INTO Wa.
    WRITE_FORM
    EXPORTING
        ELEMENT = 'WA'.
    ENDLOOP.
    in the driver program
    Regards
    Pavan

  • Maintianing multiple line items in main window  in scripts

    Hi folks,
      i want to print multiple line items in main window of script for eg 50 line items then my main window should continue in second page also. how to maintain this.
    can u provide me sample code for this..
    Thx in advance,
    Neelima.N

    You have an internal table with 50 lines, is it correct?
    Let's say, there's a MATNR field in your internal table.
    First do, what I wrote in my previous comment.
    The create an element in yout main window, like this:
    /E LINE_ITEMS
    /  &GS_MAIN-MATNR&
    In your printer program you have to code the following:
    LOOP AT gt_main INTO gs_main.
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
    WINDOW = 'MAIN'
    ELEMENT = 'LINE_ITEMS'.
    ENDLOOP.
    This code will loop all 50 of your table entries.
    In the MAIN window will fit 30 entries.
    When the LOOP is reaching the 30th entry, SAP will automatically create a new page (because of the NEXT PAGE statement you set in the page settings in the SAPScript) and will continue the printing.
    Regards
    Tamá

  • Problem in printing multiple line items

    Hi,
       i designed a SAPSCRIPT FORM.When i execute the t-code MB01 by giving PO which has multiple line items ,  output type is invisible.
    But when i iexecute the t-code MB01 by giving PO which has single item , output type is visible and form is printing.
    Do i need to copy the print program and make changes in there or if i change elements in the form will that helps in printing multiple line items.
    thanks.

    HI,
    wat i understand is u r trying to loop at a variable window .but tht is not suggestable.
    write a loop in program lines. read the values in to different variables and the try printing them as text elements that will solve the problem.
    or else in other way use a template and that can also solve the problem.

  • Is it possible multiple line items debit & single line item credit and different cost centers and different profit centers in fbcj

    Hi all ,
    I have a requirement to Post Cash Journal Document using FBCJ tcode.
    Is it possible multiple line items debit & single line item credit and different cost centers and different profit centers
    for exp:
    pk   GL a/c   description       amount   cost center  profit center
    40  400101  telephone exp   500        1403            P 1000
    40  400101  telephone exp    100       1404            P 2000
    50  200100  cash in hand      600-                             
       This is My requirement  is it possible in fbcj
        Please suggest me.ASAP.
    Regards
       Naresh.

    Hi,
      This you can do it in two ways:
    1. Make three header under top level....one Product A, 2nd Product B ( as Billing element) and third as Common expense ( only cost). Now 1st & 2 nd WBS, you have to have sales order linking with individual lint item, for third you will accumulate all the common expense till the period end then make a reposting of the same in desired proportion to both products WBS hierarchy
    (This is if you want to have a track on the common expense as well.......like planning, budgeting & control)
    After this reposting, run RA for individual billing element and hence you will all the complement detailing and control over Revenue and expense with respect to Product A and Product B individually.
    2. If you don't want to maintain that kind of detailing the common expense and keep track of it through project, then have cost centers accordingly and make an assesment/ distribution with respect to expenses accumulated at those cost centers for the period to the respective WBS under each product. Then execute the period end processes for the project.
    Or
    You can try with have two more line items in the costing sheet as an overhead against common expenses with respect each product.
    I hope this should help you.
    Regards
    Avisek Bhardwaj

  • One order with multiple lines in OM is creating multiple invoices

    Application: Oracle 11i (11.5.3)
    Modules implemented: GL, OM, AR, AP, PO and CM
    Business Requirement:
    Our client would like to create Order consisting of multiple lines in Order Management.
    The Orders created in OM with multiple lines could be booked, picked, released and transferred
    over to Accounts Receivable. On transferring over the Orders from Order Management to Accounts
    Receivables using Auto Invoice process the Order should create ONE invoice with multiple lines.
    Moreover, for the multiple lines created on an invoice deferred revenue could be applied.
    ( eg. An order is placed for software and support. The support is to be invoiced all at once but revenue deferred to 1/12
    recognized each month as revenue is earned.)
    Right now we are getting two invoices. It is putting the deferred revenue item on a seperate invoice. Is this normal
    functionality? How can I get both on one invoice.
    thanks

    Hello Monique,
    Well you can have one invoice generated for an order with multiple lines. This is possible by changing some rules in Account Receivables. Use the grouping rules under setups->autoinvoice in AR. You can club your invoices based on any of the columns of ra_interface_lines_all. Hope this works for you.
    Arvind

  • Text with multiple lines limit each line to 10 digits

    Im trying to create a Numeric Field with multiple lines and limit the character per line to 10
    ideally I want the users to be able to paste in a 10 digit number similar to this:
    0001234567
    0001234568
    0001234569
    I can set my pattern to num{zzzzzzzzzz} but not sure how to allow multiple lines
    Im using Adobe LC ES2 Verison 9.0
    Thanks!

    better option is to use INCLUDE statement in SCRIPTS. its a script control command and you no need to use READ_TEXT and to loop it and send each line to script.
    if you use the above INCLUDE control command, SAP will take care of printing total text of that Object.
    here is the syntax :
    <b>/: INCLUDE name [OBJECT o] [ID i] [LANGUAGE l] [PARAGRAPH p] [NEW-PARAGRAPH np]</b>
    here /: indicates its an Control command.
    you have to use NAME, ID, LANGUAGE adn OBJECT here.
    if you give these details in the Text editor of script layout,automatically data will be printed on the screen.
    ex:
    /: INCLUDE &EKKO-EBELN& OBJECT EKKO ID X LANGUAGE E
    Hope you got the Idea.
    <b>here is brief help about INCLUDE:</b>
    Use INCLUDE to include the contents of another text into your text. The text to be included exists separately from yours and is only copied at the time of the output formatting. With INCLUDE, since the text is only read and inserted during the output formatting, the most current version of the required text is always available.
    and IF you are very specific about using READ_TEXT to display the contents,
    then you have to LOOP that table and call the WRITE_FORM to print the line on the layout.
    LOOP AT IT_TDLINES.
      CALL FUNCTION 'WRITE_FORM'
    ENDLOOP.
    Regards
    Srikanth
    Message was edited by: Srikanth Kidambi

  • String with multiple lines

    hi
    i have a string with multiple lines inside it eg.
    hello this is
    my string with
    mutiple lines inside it
    how could i get it to print out line by line
    iv used "\n" so it detects the new lines but it doesnt seem to work
    this is my following code that doesnt seem to detect the newline
    if(multiString.equals("\n")){
    }

    nicchick wrote:
    i have a string with multiple lines inside it eg.
    hello this is
    my string with
    mutiple lines inside itWhere do you have this String? In a file? in a JTextArea of a Swing GUI? Details are important.
    if(multiString.equals("\n")){But the whole string isn't an "\n" so this won't do. Again, much will depend on the current state of the String. You may need to split it based on the current line separator.

  • IDOC segment with multiple lines

    Hi,
    I have a requirement where I need to populate the multiple lines in one segment without getting created multiple segment.
    I am generating material with multiple line data in the additional data using MATMAS05 IDOC for segment E1MTXHM but its generating multiple sub segments. I need to have multiple lines in one segment and not multiple segment.
    Please let me know how to achieve multiple lines in one segment.
    Thanks & Regards,
    Rayan

    Hi Subas,
    I haven written any code as I am triggering IDOC through BD10. This is a testing requirement and we need any IDOC irresepective of MATMAS, DEBMAS, CREMAS etc etc which can have multiple lines in a single segemnt.
    Sample IDOC:
    Z2XXXXD000                                       00002300002203CTDI-PA
    90210 Testing Address
    CA
    Beverly Hills
    United States                                                             
    Z2XXXD000                                       00002400002203ON TESTING
    303 308 5319                                                                               
    Z2XXXXC000                                       00002500000102Z004E          
    Actually every IDOC I am generating is getting multiple segment and each segment holding one line and my requirement is that all the lines should be get accomadated in a single segment like the above sample IDOC.
    Actually each segment has segment name and IDOC no. followed by field values but my requirement is within one segment name and IDOC no. all the field values get accomadated. Hope you got the understanding of what my requirement is? Please guide me how to trigger multiple line in a segment.
    Thanks & Regards,
    Rayan

  • IDOC to JDBC, problem with the multiple line items structure and mapping

    Hi,
    I have a scenario where the ORDERS data need to update the SQL table. for the idoc which consists one line item its ok but for multiple line item its just updating one line item. In the destination side we have only one table for purchase order which consists of lineitem as a field.(no different tables for Header data and Line item data)
    Can anyone suggest me how to create a structure for target side and how to map them.
    Regards,
    CJ

    Hi Rajan,
    The table structure is
    [PO_DATE]
          ,[VENDOR_NO]      ,[PAYMENT_TERM]      ,[MATERIAL_CODE]      ,ORDERED_QTY]      ,RECEIVED_QTY]                                 
          ,[UOM]       ,[RATE]       ,[CURRENCY]       ,[PO_EXCRATE]       ,[TAX_CODE]       ,[BASE_VALUE]       ,[TAX_VALUE]
          ,[TOTAL_VALUE]       ,[ADVANCE_PAYAMT]       ,[TOTAL_QTY]        ,[SNO]       ,[POLINEITEM]
    Datatype structure:
    PO_XI_MT_ORDERS05 1-1
    STATEMENT   1-UNBOUN
      TABLENAME 1-1
        ACTION   optional
        TABLE    1-1
        ACCESS  1-1
           PO_NO   0-1
           PO_DATE 0-1
    Correct me if im wrong.
    Regards,
    CJ
    Edited by: kuncjy on May 5, 2011 11:32 AM

  • Creating multiple Line Graph having common values..

    Hi...
    I've created one application process for creating Multiple Line Graph.
    And i've integreted two tables in this graph, where values may be common for both the tables. In this case, for common values, instead of getting overlapped I'm getting scattered graph(its totally abnormal). Please help me if you 've any idea about this issue.....?
    Please go through the App Process and the output of the SQL query.
    In output of the query, in the NAME column "Feb-2010" is common.
    This is the SQL query OUTPUT:_
    TABLE 1
    NAME VALUE
    Sept-2009 100
    Oct-2009 95
    Nov-2009 98
    Feb-2010 97
    TABLE 2
    NAME VALUE
    Jan-2010 93
    Feb-2010 100
    Mar-2010 98
    Application Process :_
    DECLARE
    BEGIN
    OWA_UTIL.mime_header ('text/xml', FALSE);
    OWA_UTIL.http_header_close;
    HTP.p ('<?xml version = "1.0" encoding="utf-8" standalone = "yes"?>');
    HTP.p ('<anychart>');
    HTP.p ('<settings>');
    HTP.p ('<animation enabled="True"/>');
    HTP.p ('</settings>');
    HTP.p ('<charts>');
    HTP.p ('<chart plot_type="CategorizedVertical">');
    HTP.p ('<data_plot_settings default_series_type="Line">');
    HTP.p ('<line_series>');
    HTP.p ('<marker_settings>');
    HTP.p ('<marker type="None" />');
    HTP.p ('<states>');
    HTP.p ('<hover>');
    HTP.p ('<marker type="Diamond" />');
    HTP.p ('</hover>');
    HTP.p ('</states>');
    HTP.p ('</marker_settings>');
    HTP.p ('<tooltip_settings enabled="True">');
    HTP.p ('<format>Year {%Name}{enabled:false} {%SeriesName} - {%Value}{numDecimals:0}%</format>');
    HTP.p ('</tooltip_settings>');
    HTP.p ('<effects enabled="True">');
    HTP.p ('<drop_shadow enabled="False" />');
    HTP.p ('<bevel enabled="true" distance="1" blur_x="2" blur_y="2" />');
    HTP.p ('</effects>');
    HTP.p ('<line_style>');
    HTP.p ('<line thickness="3" /> ');
    HTP.p ('</line_style>');
    HTP.p ('</line_series>');
    HTP.p ('</data_plot_settings>');
    HTP.p ('<chart_settings>');
    HTP.p ('<title enabled="true">');
    HTP.p ('<text>Avg. %App. Uptime per month </text>');
    HTP.p ('</title>');
    HTP.p ('<axes>');
    HTP.p ('<y_axis>');
    HTP.p ('<title>');
    HTP.p ('<text>Value</text> ');
    HTP.p ('</title>');
    HTP.p ('<scale minimum="90" maximum="101" major_interval="1" />');
    HTP.p ('<labels>');
    HTP.p ('<format>${%Value}{numDecimals:0}</format>');
    HTP.p ('</labels>');
    HTP.p ('<axis_markers>');
    HTP.p ('</axis_markers>');
    HTP.p ('</y_axis>');
    HTP.p ('<x_axis tickmarks_placement="Center">');
    HTP.p ('<title enabled="False" /> ');
    HTP.p ('</x_axis>');
    HTP.p (' </axes>');
    HTP.p ('</chart_settings>');
    HTP.p ('<data>');
    FOR ObjRecord IN (select DISTINCT(K_OBJECT.OBJECT_ID) as OBJECT_ID,name from K_OBJECT, K_OBJ_TYPE_ASP_REL where K_OBJECT.OBJECT_ID=K_OBJ_TYPE_ASP_REL.OBJECT_ID and K_OBJ_TYPE_ASP_REL.OBJECT_TYPE_ID=1)
    LOOP
    HTP.p ('<series name="'|| ObjRecord.name ||'">');
    FOR MonthlyValueRecord IN (select NAME,VALUE
    from K_REPORT_RUN,K_ASPECT_VALUES,K_ASP_TIM_RPT_REL
    where K_REPORT_RUN.RUN_ID=K_ASP_TIM_RPT_REL.RUN_ID
    and
    K_ASPECT_VALUES.ASPECT_VALUE_ID=K_ASP_TIM_RPT_REL.ASPECT_VALUE_ID
    and
    K_ASP_TIM_RPT_REL.ASPECT_ID=1
    and
    K_ASP_TIM_RPT_REL.OBJECT_ID=ObjRecord.OBJECT_ID
    order by K_REPORT_RUN.STARTTIME)
    LOOP
    HTP.p ('<point name="'|| MonthlyValueRecord.name ||'" y="'|| MonthlyValueRecord.value ||'" />');
    END LOOP;
    HTP.p ('</series>');
    END LOOP;
    HTP.p ('</data>');
    HTP.p ('</chart>');
    HTP.p ('</charts>');
    HTP.p ('</anychart>');
    htmldb_application.g_unrecoverable_error := true;
    END;
    Edited by: user12873839 on Apr 9, 2010 3:58 AM
    Edited by: user12873839 on Apr 9, 2010 4:02 AM
    Edited by: user12873839 on Apr 9, 2010 8:00 AM

    >
    Help Needed Urgent.....
    >
    That is one surefire way to not get any help and certainly not urgently. I suggest that you amend the title of your post to something that reflects the actual issue. This will also help anyone with similar issues to find the thread.
    When posting code please put {noformat}{noformat} (with the curly brackets and the word code in lower case) above and below it to preserve formatting like this...
    {noformat}{noformat}
    SELECT *
    FROM emp
    {noformat}{noformat}
    This will be displayed on the forum like this...SELECT *
    FROM emp
    Cheers
    Ben                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Maybe you are looking for

  • Problem accessing https Web service from behind proxy

    Hi all, I have this constant timeout issue which occurs whenever I try to access the Web service from behind a proxy. Find below the error logs - AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: fault

  • I do not have a firefox button so I can't get the securety information I need how can I get it ?

    on your information page it shows a firefox button in the left hand upper corner I don't have that button.

  • Help with Skip Level dimensions in OWB 10.2 (Paris)

    Hi all, I'm trying to understand how to set up and use a skip level dimension in OWB 10.2. A simplified version of my hierarchy would be: Plant - Equipment - Assembly - Item Where Some Items connect directly to equipment and others connect to assembl

  • Acrobat X Standard locking MS Office 2007 Clipboard on Windows 7

    Acrobat X Standard locks Office 2007 Clipboard on Windows 7 Enterprise 32bit Version after a few copy and pastes from Acrobat X into MS Word, Excel etc As soon as I close Acrobat X Clipboard is released in Office and I am able to paste again. I can c

  • Upgrade query

    Suppose I have a single license Master Collection CS5.5 suite. Can I purchase 3 upgrades to CS6(one in Home, second in Office and third on my Laptop)? I know that Upgrade from retail version to Volume Licensing is valid, but can I upgrade under Retai