cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to print the third page of sap script.

Former Member
0 Kudos

Hi all,

I have developed a sap script in which i hv got 3 pages.

1st page is used to display the general info.

The main window extends according to the line items to be displayed.

I want to print long texts that are prsent in the sales order soon after the main window.

I hv included dis texts using

Include 'itab-vbeln' Object 'vbbk' ID 'zcc1'.

Like this der r 5 includes that i hv written for each of the text label.

But i m unable to print dem since these texts does not get exteded to the next page.

I m displaying dem in a window called "TEXT" of type VAR.

Plz help me to display dem.

Its urgent.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

Only the texts written in main window can trigger a new page.

So u should write those text in the botton of the main.

Max

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

If you define in a variable window then they will not be extened to next page . So define them in the main window and have some conditions in order to print it in the last page .

The condition like

describe your table(say v_lines) and count one variable in the loop(say v_count)

then in the main window after printing table data put conditio

/: if v_count eq v_lines

include text

/:endif

Reward points if useful.

Regards,

Nageswar

Former Member
0 Kudos

Hi,

But i didnt get wat u want to say abt the count variable.

i hv to put such a condition like i hv to print it only after the line items get displayed.

now i m able to print all the texts but some of the line items r printed in between of the texts.

So cn u help me in dis????

Former Member
0 Kudos

Hi,

Thats why you need to use count variable.

You will be looping the table data in print program right? now declare one count varaible and increment it by 1 in the loop.

see the code below

suppose you have internal table it_tab.

data:v_count type i.

describe it_tab lines v_lines.

loop at it_tab.

v_count = v_count + 1.

open_form.

write_form.

endloop.

endform.

and in the script editor put condition

itab-field1

itab-field2.

if v_lines eq v_count.

include text.

endif.

Regards,

Nageswar

Former Member
0 Kudos

Thanks a lot for the reply.

Help me in solving one more doubt.

I have written commands to print the BOXes in the main window.

It is getting printed but it extends even after all the line items are being displayed.

I want to restrict printing of this box upto the line items only since i hv to print other texts soon after the line items.

These lines n boxes gets extended upto the height dat i hv specified for the window.

Plz help.

Its urgent.

Thanks

Former Member
0 Kudos

Hi,

Box commands are fixed you cant modify them dynamicaly . If you want to have dynamic lines then use one box command with same measurements that main window has like height, width .

and when you print item data use uline command.

if needs use uline with offset for length specification .

I hope you understand.

Regards,

Nageswar.