Multiple line issue in sap script

Hi All,
There is a window in the sap script.
The window consists of a text element and i am displaying 4 lines of text in that window.
Sap script:
/E   Reason
AC  &LINE&
In the source code, an internal table will have 5 text lines and those 5 lines should be reflected in sap script.
The source code as follows.....
loop at li_tline.
CALL FUNCTION 'TEXT_SYMBOL_SETVALUE'
         EXPORTING
              NAME  = 'LINE'
              VALUE = li_tline-tdLINE.
  CALL FUNCTION 'WRITE_FORM'
       EXPORTING
            ELEMENT = 'REASON'
            WINDOW  = 'REASON'
            function = 'APPEND'.
endloop.
In final output, the last line of the internal table is reflacting..... Hope its getting over written each time in the loop.
How to make the code, so that i can reflect all the lines from internal table to the sap script....??????????????
Please help me, as this issue is very much urgent..........
Regards
Pavan

Hi
Do like this.
declare 5 variables each of 80 char length.
data: v1(80), v2(80), v3(80), v4(80), v5(80).
Read the Internal table li_tline with index and move each line to different variables and write those variables in the script.
if not li_tline[] is initial.
read table li_tline  index 1.
if sy-subrc = 0.
   v1 = li_tline-tdline+0(80).
endif.
read table li_tline  index 2.
if sy-subrc = 0.
   v2 = li_tline-tdline+0(80).
endif.
read table li_tline  index 3.
if sy-subrc = 0.
   v3 = li_tline-tdline+0(80).
endif.
read table li_tline  index 4.
if sy-subrc = 0.
   v4 = li_tline-tdline+0(80).
endif.
read table li_tline  index 5.
if sy-subrc = 0.
   v5 = li_tline-tdline+0(80).
endif.
endif.
write the &V1& &V2& &V3& &V4& &V5& variables ins cript
Reward points if useful
Regards
Anji

Similar Messages

  • Vertical line issue in SAP Script main window

    Hi All,
    I want to draw a vertical line in my main window in SAP Script output.
    But problem is in main window i am printing some texts at the beggining then i am printing line items.
    So this is not fixed line (box). It may increase/decrease based on text available before line items.
    How can i manage this prining vertival line as i don't know height, top of this line!
    Thanks in advance.
    Thanks,
    Deep.

    Hai Deep,
    Use Elements as suggested by Kodarapu.
    Now goto Paragraph Formats create a format for Item lines.
    ex.
    Name Paragraph Format as 'IL' Now click on the Push Button "Tabs" on bottom Right.
    now in "Tab Position" enter the spacing that you need for your item dispaly
    ex.
    Number     Tab position       Alignment
    1               6.00   CH          LEFT
    2               25.00  CH         LEFT
    3               54.00  CH         LEFT
    The above example is for 3 items
    Now in your Script Windows-> Main
    do the following.
    /E           ITEM_LINE_A
    IL           &EKPO-EBELP&,,&EKPO-EMATN&,,,,&EKPO-TXZ01&
    Hope it SOlves your Issue.
    Cheers,
    Suvendu

  • How to leave half line space in SAP Script

    Actually , I have a doubt regarding half line spacing on SAP Script ..
    I am working on Cheque Printing with  fbz5
    Now the issue in  the date, there are 8 box for the date in cheque .
    i.e  0 2 0 7 2 0 1 4
    Currently the date is comming on the cheque box ..like half up the box and half inside
    IF I give one space in cheque  window of my script with  /   its taking complete 1 space
    and result is ,it going down ..with one space
    I want to leave exact half line space ..so date is  adjusted  in the middle .
    I also tried moving my cheque  window from  upper margin in all format(CH , CM , MM  IN ..) above
    But it is taking exact one space .

    Hi Darshit,
    While creating the tab position, you have a option of line spacing.
    make it to 0.5 lines, to make exact half line.
    And also another way out, you can check by moving the 8 box created for the date up by 0.5 lines.
    Regards,
    Ganesh Lathi.

  • Line number in Sap Script

    hi,
    How to get line number in sap script form?
    Regards,
    Sal.

    hi ,
    there is no specific field for this you have to put a counter for that check these links
    Link for SAP Scripts (step by step procedure)
    http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Create_A_SAPSCRIPT_Form/How_to_Create_SAPSCRIPT.html
    SAPScripts
    http://esnips.com/doc/1ff9f8e8-0a4c-42a7-8819-6e3ff9e7ab44/sapscripts.pdf
    http://esnips.com/doc/1e487f0c-8009-4ae1-9f9c-c07bd953dbfa/script-command.pdf
    http://esnips.com/doc/64d4eccb-e09b-48e1-9be9-e2818d73f074/faqss.pdf
    http://esnips.com/doc/cb7e39b4-3161-437f-bfc6-21e6a50e1b39/sscript.pdf
    http://esnips.com/doc/fced4d36-ba52-4df9-ab35-b3d194830bbf/symbols-in-scripts.pdf
    http://esnips.com/doc/b57e8989-ccf0-40d0-8992-8183be831030/sapscript-how-to-calculate-totals-and-subtotals.htm
    SAP SCRIPT FIELDS
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/d1/8033ea454211d189710000e8322d00/content.htm
    scripts easy material
    http://www.allsaplinks.com/sap_script_made_easy.html
    regards,
    venkat.

  • Alignmnet Issues with SAP Script

    Hi All i have an issue with SAP script i have few columns in the script where in the values in the column changes dynamically.For example the value of second column in the first row can be 5 characters and the value of the same in the 2nd row can be of 10 characters and it keeps varying for every row but the max length of it would be 20 characters.
    Now the issues is with the second column as the text in this column keep varying the text in the same row after the second column keep moving either towards right or towards left depending on the text in the second column,Can any one help me as how  can i fix this issue.
    Looking for your valuable inputs.
    Regards
    Hari Krishna.

    Hari,
    http://help.sap.com/saphelp_47x200/helpdata/en/d1/802d91454211d189710000e8322d00/frameset.htm
    Even though it is not the solution,I guess this link will be helpful.
    K.Kiran.

  • How to display the number of line items in sap-script report?

    Hi friends,
    I need a help regarding the SAP Script. In my script (report) I create two pages and created three windows (MAIN, HEADER, FOOTER) for each pages. Now the problem is while displaying the fewer line item which can come under the main window of the 1st page these line items are comming perfectly but for the remaining line items that comes on the second page the table headings and the boexs are not comming.
    Also it is displaying the total and the amount in text in every pages that should be display in last page.
    Here if I eleminate or comments the total and the amount in text for the first page the same is reflected in second page. Also I need to display the page-nor for each pages to displayed.
    I am requesting all the people out there kindly help me to solve this issues.
    Thanks and Regards

    There is no pre built solution for this. But we can show total pages in the report body.
    one way is Create a other column in the report with code sum(count(1))/25. that gives you total number of pages. 25 here is no of rows in each page. The code you can write in narrative "Total pages in the report are @5" and out put may be "Total Pages in the report are 30".
    If you are using pivot tables, you can try this.
    http://oraclebizint.wordpress.com/2008/01/17/oracle-bi-101332-pagination-in-pivot-tables/
    - Madan

  • Find line no in sap script page

    In sap script there are five pages to be printed
    I want to check in each page the first line exists or not.
    as well as to identify the first line of each page.
    How to get a line number for each page in Sap script
    Please revert back asap
    Thanks

    hi ,
    there is no specific field for this you have to put a counter for that check these links
    Link for SAP Scripts (step by step procedure)
    http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Create_A_SAPSCRIPT_Form/How_to_Create_SAPSCRIPT.html
    SAPScripts
    http://esnips.com/doc/1ff9f8e8-0a4c-42a7-8819-6e3ff9e7ab44/sapscripts.pdf
    http://esnips.com/doc/1e487f0c-8009-4ae1-9f9c-c07bd953dbfa/script-command.pdf
    http://esnips.com/doc/64d4eccb-e09b-48e1-9be9-e2818d73f074/faqss.pdf
    http://esnips.com/doc/cb7e39b4-3161-437f-bfc6-21e6a50e1b39/sscript.pdf
    http://esnips.com/doc/fced4d36-ba52-4df9-ab35-b3d194830bbf/symbols-in-scripts.pdf
    http://esnips.com/doc/b57e8989-ccf0-40d0-8992-8183be831030/sapscript-how-to-calculate-totals-and-subtotals.htm
    SAP SCRIPT FIELDS
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/d1/8033ea454211d189710000e8322d00/content.htm
    scripts easy material
    http://www.allsaplinks.com/sap_script_made_easy.html
    regards,
    venkat.

  • How to Draw diagonal lines in a SAP Script

    Hi All,
    I got a requirement to strike out a box with diagonal lines in SAP Script. My client is not interested in just shading out the box. He want atleast 3 or 4 diagonal lines to make feel the customer that the box is striken off.
    How can we do this ?
    Thanks & Regards,
    Bhupal

    Hi B,
    as u have the dimension of  the box..so create a box in paint as bmp.....with digonals as u required.....
    upload this image thru SE78...and call it in ur script.......
    and superimpose that graphic on the text box....
    hopefully this will solve ur problem...
    thnx
    rohit

  • Text display issue in SAP script

    Hi All,
    I have developed a sap script (Invoice) which is having a Footer window.
    The footer window should display page number and some text (address of company). The address data is stored in an internal table and the same will be made to display in sap script.
    Now my problem is the address data is displaying correctly in the second page. But no data is getting displayed in the first page. If the Invoice is of single page, the address data in Footer window is getting printed properly.
    The problem occurs only, when the invoice is of multiple pages....
    What might be the problem in this regard...??????
    Please help me, as this bug need to be fixed as early as possible....
    Regards
    Pavan

    The size of MAIN and FOOTER window are not getting truncated. Both window have designed properly.
    In the first page, the footer window will display Page No data and the address data will be invisible. In debig mode, i can see the value of address will be passed to text symbols of sap script.
    There are no conditions set in the sap script for Footer window.
    one more observation is that after execution (at print preview screen), if i go back and again click for print preview, the address data is getting printed in the first page...!!!
    Regards
    Pavan

  • Issue on Sap Script Forms

    Hi ABAP Experts,
    i got one object on SAP Script Forms, this is first time i am doing sap scripts, my issue is i created a form Debit memo from scratch and now i want to assign this form to standard print program RFK0RD00(PAYMENT NOTICE) and for this print program the standard layout form is F140_PAY_CONF_01.can u please tell what is the output type of this form and where to assign this ?
    Thanks in Advance...

    Hello Srini,
    First thing,how to find output type?
    -Go to table TNAPR and enter your print program name in TNAPR-PGNAM and form name in TNAPR-FONAM.
    -Look for the entry, the field value of TNAPR-KSCHL will give you the output type for your Print program and sap script form.
    -TNAPR-KAPPL will give you the value for Application.
    Second thing,how to assign?
    -Go to transaction NACE
    -Select the application(TNAPR-KAPPL).
    -Press the button 'OUTPUT TYPES'
    -Select the corresponding output type(TNAPR-KSCHL)
    -Now select the folder 'Processing routines' on the left side.
    -Enter your Program name (RFK0RD00), form routine name(mostly it is ENTRY) and then enter your form name (form designed by you from scratch).
    Kinldy reply if this has helped you.

  • Issue regarding sap script pages

    Hi all ,
       my issue is regarding the medruck. when i click on the print preview option on me23n, the sap script attached(that is medurck) will be printed. in my case the sap script is zmm_medruck(the zcopy of medruck). now, the print out of the sap script is 2 or  3 or 5 paged depending upon the p.o. number given.
    for example for a p.o. number 2100001564, the sap script contains 4 pages. now, my issue is , the print out should contain only last 2 pages or only 3 rd page.(that is without all pages, we want only specific pages of the sap script to be printed). how to do this. plz reply fast. points will awarded.
    this is urgent issue.
    thanking u in advance,
    sreenu.

    Hi all ,
       my issue is regarding the medruck. when i click on the print preview option on me23n, the sap script attached(that is medurck) will be printed. in my case the sap script is zmm_medruck(the zcopy of medruck). now, the print out of the sap script is 2 or  3 or 5 paged depending upon the p.o. number given.
    for example for a p.o. number 2100001564, the sap script contains 4 pages. now, my issue is , the print out should contain only last 2 pages or only 3 rd page.(that is without all pages, we want only specific pages of the sap script to be printed). how to do this. plz reply fast. points will awarded.
    this is urgent issue.
    thanking u in advance,
    sreenu.

  • Not Printing Item Schedule line items in SAP Script

    Hi ,
    I modified  copied sap standard script(MEDRUCK) and copied my Zprogram to standard program.
    But here every thing is fine but i am not getting schedule line items and item text  in items data for every item
    thanks,
    sriram

    Hi
    Pls Check in the Line item Ur using the syntax properly or not..In SAP if it ios syntax error it won show..Pls chk the syntax properly ...POr try to debug the script and see whether item text is coming or not.
    If it is not coming check me23n whether tat PO has item text or not..if it is there Problem is in ur Include text.

  • Reg : Box issue in sap script

    Hi Guru's,
    I have got requirement to show 2 boxes in main window so initially i wrote the BOX command in maindow and it was working fine for first page when it goes to more than one page box was not displaying in the output so that i reallized when it goes to every page we needs to trigger box command which is difficult for me in some cases so we decided to create one more window with same size of main window and done the coding for creation of boxes and it is working expect one requirement.
    I need to put one more line inside the maindow ( these line will be adjusted based on the data) bcz it is dynamic so i cant out it in normal window so i have put it in main window it was coming perfect when you are looked in print preview but when im talking print out it is not coming.? Seems like it overlapping but i dont know how to resolve this issue
    Could you please suggest me how to procced further?
    Moderator message: duplicate post locked.
    Edited by: Thomas Zloch on Aug 18, 2011 1:36 PM

    What is the format defined in your sapscript.
    Is it Portrait or Lanscape.
    This you can see in BASIC Settings of a form in SE71.
    Cheers.

  • Box issue in sap script

    Hi Guru's,
    I have got requirement to show 2 boxes in main window so initially i wrote the BOX command in maindow and it was working fine for first page when it goes to more than one page box was not displaying in the output so that i reallized when it goes to every page we needs to trigger box command which is difficult for me in some cases so we decided to create one more window with same size of main window and done the coding for creation of boxes and it is working expect one requirement.
    I need to put one more line inside the maindow ( these line will be adjusted based on the data) bcz it is dynamic so i cant out it in normal window so i have put it in main window it was coming perfect when you are looked in print preview but when im talking print out it is not coming.? Seems like it overlapping but i dont know how to resolve this issue
    Could you please suggest me how to procced further?
    Moderator message: duplicate post locked.
    Edited by: Thomas Zloch on Aug 18, 2011 1:36 PM

    Hi Guru's,
    I have got requirement to show 2 boxes in main window so initially i wrote the BOX command in maindow and it was working fine for first page when it goes to more than one page box was not displaying in the output so that i reallized when it goes to every page we needs to trigger box command which is difficult for me in some cases so we decided to create one more window with same size of main window and done the coding for creation of boxes and it is working expect one requirement.
    I need to put one more line inside the maindow ( these line will be adjusted based on the data) bcz it is dynamic so i cant out it in normal window so i have put it in main window it was coming perfect when you are looked in print preview but when im talking print out it is not coming.? Seems like it overlapping but i dont know how to resolve this issue
    Could you please suggest me how to procced further?
    Moderator message: duplicate post locked.
    Edited by: Thomas Zloch on Aug 18, 2011 1:36 PM

  • Text Issue in sap-script

    Hi All,
    I am using writing the text in script using include object and text-id ,but it is not showing up in the form.Can anybody tell me where the text is maintained.where can i check whether this text is maintained or not.
    Regards
    Lalit

    Hi lalit,
              Use the read_text  function module and pass the object id,object name,language .like as below.
        v_name = it_out-ebeln.
        call function 'READ_TEXT'
          exporting
            client                  = sy-mandt
            id                      = 'F02'
            language                = sy-langu
            name                    = v_name
            object                  = 'EKKO'
          tables
            lines                   = it_tline3
          exceptions
            id                      = 1
            language                = 2
            name                    = 3
            not_found               = 4
            object                  = 5
            reference_check         = 6
            wrong_access_to_archive = 7
            others                  = 8.
        if sy-subrc eq 0.
          read table it_tline3.                                                 "#EC *
          v_info3 = it_tline3-tdline(50).
        endif.
    if helpful give me the points

Maybe you are looking for

  • PO Line Item Issue

    Hi guys, 1. We have this requirement in creating a PO you should this kind of line item: 00001 < mandatory in creating a PO 00010 00011 00020 00012 00030 00013 I'm planning to create a PO first in defining the first line item. Then BAPI_PO_CHANGE for

  • HP5525 - Scan to email

    Hi! My HP5525 is connected to my wifi network and I can print wirelessly no problem. I used to be able to scan to email also without any problems. However, off late, suddenly, my printer gives me the error message "Server connection error : 403. Ther

  • ITunes U down?

    All my iTunes U courses have disappeared. They no longer show in the list in course manager. Also, I'm unable to log in using my iPad. Others within my school (in the Netherlands) are experiencing the same problem. Can anyone help? Is there a server

  • HELP!!! Creating Text using script

    Hi there, I am writing a script which creates a text frame and adds text in it. The problem is, I want to add some information below everytime on many documents. Instead of copying from other sources everytime, I thought of writing a scirpt which by

  • Something is wrong with the Xserve forum

    Hey Guys, For some reason other questions are landing in the xserve forum with the title HT1349 Any idea on this? Do the forums have a support email? https://discussions.apple.com/community/servers_enterprise_software/xserve_and_s ervers