‎2007 May 21 7:06 AM
Hoz exactly we use Protect-EndProtect command to avoide output text which should not spilt in two pages. Plz explain with example of Codes.
Thanks.
‎2007 May 21 7:14 AM
Hi
It is used to protect the address or info to print in one page only
If the space in one page is not sufficient it will print in the second page
see the sample
/: PROTECT
/: ADDRESS PARAGRAPH AS
/: TITLE &LFA1-ANRED&
/: NAME &LFA1-NAME1&, &LFA1-NAME2&, &LFA1-NAME3&,
/: STREET &LFA1-STRAS&
/: POBOX &LFA1-PFACH& CODE &LFA1-PSTL2&
/: CITY &LFA1-ORT01&, &LFA1-ORT02&
/: POSTCODE &LFA1-PSTLZ&
/: COUNTRY &LFA1-LAND1&
/: REGION &LFA1-REGIO&
/: FROMCOUNTRY &T001-LAND1&
/: ENDADDRESS
/: ENDPROTECT
Reward points if useful
Regards
Anji
‎2007 May 21 2:19 PM
hi!
some one told me that If I want to display the paragraph at one place i mean with out any page break then first use control_form for protect then u r required element then end protect.
CALL FUNCTION 'CONTROL_FORM'
EXPORTING
command = 'PROTECT'.
call function 'WRITE_FORM'
exporting
window = 'MAIN'
element = 'ITEM_LINE'
CALL FUNCTION 'CONTROL_FORM'
EXPORTING
command = 'ENDPROTECT'.
*********************************************************
How much the above method is useful?
Thanks.
‎2007 May 21 7:15 AM
hi..
Protect and Endprotect is used to prevent the page-breaks during that text.Suppose we want to display data regarding particular sales order in a single page instead of spreading it to multiple page we use protect and endprotect to avoid spreading of data to multiple pages.
eg:
protect
&carrid&,,&connid&
,,&fldate&,,&seatmax&
endprotect
If we give as above then for every carrid and connid, fldate and seatmax are displayed in the same page .Otherwise carrid and connid will be displayed in one page and their fldate and seatmax are displayed in another page.If we use protect and protect then carrid and connid and fldate and seat max will be displayed in the same page with out any break.
regards,
veeresh
‎2007 May 21 7:37 AM
Hi Khan,
Let me share my points with u:
If u want to display the paragraph at one place i mean with out any page break then first use control_form for protect then u r required element then end protect.
CALL FUNCTION 'CONTROL_FORM'
EXPORTING
command = 'PROTECT'.
call function 'WRITE_FORM'
exporting
window = 'MAIN'
element = 'ITEM_LINE'
CALL FUNCTION 'CONTROL_FORM'
EXPORTING
command = 'ENDPROTECT'.
Hope this helps you. Reply for queries, shall post the updates.
Regards.
Kumar.