cancel
Showing results for 
Search instead for 
Did you mean: 

how to use protect and endprotect in smart form

Former Member
0 Kudos

hi to all experts,

im still begineer in smart form , i have two headings like

company_code: purchase doc no:

after this i have a table to be displayed with four columns

what i want is the whole data should not be split by a page break

i know this can be achieved by using protect and end protect in sap scripts how to implement in smart form

Accepted Solutions (0)

Answers (7)

Answers (7)

Former Member
0 Kudos

Hi,

You can get the functionality of protect -- endprotect in Smartform by

1. At table line type select checkbox page break

2. text level --> provide style and check page protection.

3. Create folder under main node adn place the table node under folder.

This may sometimes doesnt work if you use any one of them... try all the three and check

it will definitely work

regards

padma

Former Member
0 Kudos

Hi,

If you are trying to page protect a table loop of information then it is not possible in smartforms.

As a workaround if it is not an issue then print the entire information to be page protected in a new page using a command with a condition.

We had such an issue earlier and tried to find out other ways to get the remaining height at a particular location and to push the information to the next page but it did not work as expected.

Incase of further doubts please let me know.

Regards,

Ram

Former Member
0 Kudos

Hi,

You cannot use a table loop inside a folder with page protection.

However, all other node types you can use.

I mean a template and other text nodes....

Try once to put a loop inside a folder with page protection...

Moreover if you are using a table loop then you have to make sure that you are looping only a certain rows.

Like LOOP AT itab INTO ls_itab FROM ROWS 1 TO 6 WHERE .....

I hope now it is clear for you.

Regards,

Ram

Former Member
0 Kudos

>

> Hi,

>

> You cannot use a table loop inside a folder with page protection.

>

> However, all other node types you can use.

>

> I mean a template and other text nodes....

>

> Try once to put a loop inside a folder with page protection...

>

> Moreover if you are using a table loop then you have to make sure that you are looping only a certain rows.

>

> Like LOOP AT itab INTO ls_itab FROM ROWS 1 TO 6 WHERE .....

>

> I hope now it is clear for you.

>

> Regards,

> Ram

i got it ram but my requirement is to achieve page protection for any number of rows

Former Member
0 Kudos

see my reply above..it might help u

Former Member
0 Kudos

Hi,

One sentence correction.

Moreover, you cannot page protect a table loop of information in smartforms.

Regards,

Ram

Former Member
0 Kudos

Hi,

If you use a table loop inside a folder with page protection checked then it will not allow.

The checked page protection will be unchecked.

You can use a template instead if you have to display fixed no of rows.

Page protection works only when the rows to be displayed is fixed.

I hope this is clear.

Moreover, you can page protect a table loop of information.

Regards,

Ram

Former Member
0 Kudos

>

> Hi,

>

> If you use a table loop inside a folder with page protection checked then it will not allow.

>

> The checked page protection will be unchecked.

>

> You can use a template instead if you have to display fixed no of rows.

>

> Page protection works only when the rows to be displayed is fixed.

>

> I hope this is clear.

>

> Moreover, you can page protect a table loop of information.

>

> Regards,

> Ram

it means that if the no of rows are not fixed then we cannot page protect ,if yes how can we ?

Former Member
0 Kudos

hi

u do not write ne separate code for page protection...

u have various check boxes for page protection..u just need to check those boxes...

Folder, tables, templates more or less all have this option.

reward points if helpful

Former Member
0 Kudos

hi pratik the check boxes for table are disabled

Former Member
0 Kudos

probably u have the table inside a loop or a folder or something....

see this

Page protection attribute

Switch for page protection.

Use

Page protection switch.

In some cases you may want to avoid that text is divided by a page break. Therefore, you can protect text sections with a page protection.

Page protection can extend to

a paragraph

a text node

all output within a folder, for example, several text nodes combined in this folder.

a line type (table node)

If on the current page there is not enough space left for the protected text, it is displayed entirely on the next page.

So u can page protect a line in table...

in the table node..goto tables tab and click the details tab-->select the line type and check the 'no page break'

check box

Former Member
0 Kudos

Hi,

Create a folder and in the output options check the Page Protect check box.

Under the folder use all the nodes which need to be page protected.

Make sure you do not a table loop inside the folder.

Regards,

Ram

Former Member
0 Kudos

>

> Hi,

>

> Create a folder and in the output options check the Page Protect check box.

>

> Under the folder use all the nodes which need to be page protected.

>

> Make sure you do not a table loop inside the folder.

>

> Regards,

> Ram

i have alread tried that

Make sure you do not a table loop inside the folder.

can elaborate on the above line a little bit