cancel
Showing results for 
Search instead for 
Did you mean: 

sapscript include command

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

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

Former Member
0 Kudos

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