Skip to Content
author's profile photo Former Member
Former Member

sapscript include command

I am printing text lines via INCLUDE statement in Invoice(ZFKORD50). Each text has more than one lines. Just after printing first line it needs to print figures on the same line and then continue with rest of the lines.

Output should be,

Line 1 | xxxx | xxxx|

Line 2

Line 3

.........

If I write below code

INCLUDE lv_name' OBJECT lv_obj ID lv_id' LANGUAGE 'E' PARAGRAPH 'MD'

= &WRSHB_POS& &WRSHB_DISC&

It shows figures at last line of text, (gives below output)

Line 1

Line 2

Line 3

......... | xxxx | xxxx|

How can I achive first out put?

I have tried using READ_TEXT via subroutine. In that case its not possible to retrive all the text lines in the script. (what if they are in 100s)

Regards

K

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Nov 10, 2009 at 01:07 PM

    hi

    try calling the ELEMENT inside a LOOP in the driver program and then call the Subrotuine in that element

    example

    driver program Script

    Loop

    WRITE_FORM --->element # which will have the Text and line items... then u can print side by side....

    endloop

    surya

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Calling through subroutine, means using READ_TEXT function module to get text data?

      I am already calling WRITE_FORM within loop and then calling subroutine withing that element. For one line item I will have few text lines to print. Amount for that line item should print against 1st line of each line item.

      If I am using read_text via subroutine it prints above format. But when I use subroutine with USING AND CHANGING command, how can I bring all the lines of that text line as USING AND CHANGING doesn't accept internal table. So if I have to get just one line or fixed line it can be called by passing fix number of CHANGING in subroutine.

      In this case number of lines of text are not fixed. It can be n.

      Thanks

      K

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.