on 04-29-2008 4:59 AM
hi,
in calltransaction method we can handle screen resolution by passing structure CTU_PARAMS.
1) how to handle in session method.
2)in scripts we use PROTECT..... END PROTECT.
How to use it smart forms.
Thanks in advance.
Satish.
Hi
PROTECT .....ENDPROTECT
While using Scripts, if u don't want to break a
paragraph text which aparts to another page
i.e. if u wanna display the paragraph with out
breaking in between two pages, u have to use
protect...endprotect.
EXAMPLE
let us think u are dispalying the sales order header and sales order item details .
If u want to display the header and item details both together in one page then u go for this statement
/: PROTECT
:
:
/: ENDPROTECT
Reward if helpful
raam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
The protect and endprotect command in sapscript doesn't work with smartforms. For example on a invoice: First data of position no 80. is printed on page one, other data of position no 80 is printed on page 2. And there's nothing you can do about it. Actually, there is something you can do about it. By using a folder node and checking the 'protect' checkbox, everything in that folder will be page protected.
Smartforms: protect lines in main window.
How to protect lines in the main window from splitting between pages?
It was easy with SAPscript, but how to do it with SF's. For 4.7 version if you are using tables, there are two options for protection against line break:
- You can protect a line type against page break.
- You can protect several table lines against page break for output in the main area.
Protection against page break for line types
- Double-click on your table node and choose the Table tab page.
- Switch to the detail view by choosing the Details pushbutton.
- Set the Protection against page break checkbox in the table for the relevant line type. Table lines that use this line type are output on one page.
Protection against page break for several table lines
- Expand the main area of your table node in the navigation tree.
- Insert a file node for the table lines to be protected in the main area.
- If you have already created table lines in the main area, you can put the lines that you want to protect again page break under the file using Drag&Drop. Otherwise, create the table lines as subnodes of the file.
- Choose the Output Options tab page of the file node and set the Page Protection option. All table lines that are in the file with the Page Protection option set are output on one page.
In 4.6, Alternatively in a paragraph format use the Page protection attribute to determine whether or not to display a paragraph completely on one page. Mark it if you want to avoid that a paragraph is split up by a page break. If on the current page (only in the main window) there is not enough space left for the paragraph, the entire paragraph appears on the next page.
reward if helpful
raam
Hi,
Please check this link
[Smartforms|http://hemanth.info/sap/smartforms/SmartForms.doc]
it is clearly given in the above post. Please check this in above post.
Protection against page break for line types
Double-click on your table node and choose the Table tab page.
Switch to the detail view by choosing the Details pushbutton.
Set the Protection against page break checkbox in the table for the relevant line type. Table lines that use this line type are output on one page.
Here is a small example how to use CTU_PRARAMS for table control screen resolution
data: begin of tran_opts,
dismode type ctu_params-dismode value 'N',
updmode type ctu_params-updmode value 'S',
cattmode type ctu_params-cattmode,
defsize type ctu_params-defsize value 'X',
racommit type ctu_params-racommit,
nobinpt type ctu_params-nobinpt,
nobiend type ctu_params-nobiend,
end of tran_opts.
call transaction 'F-02'
using bdcdata
options from tran_opts
messages into bdc_messages.
reward if helpful
raam
Hi Satish,
Sorry yaar,
we can use CTU_PARAMS in session method also.
need to populate the structure and pass it to FUNCTION MODULE BDC_INSERT
data: begin of tran_opts,
dismode type ctu_params-dismode value 'N',
updmode type ctu_params-updmode value 'S',
cattmode type ctu_params-cattmode,
defsize type ctu_params-defsize value 'X',
racommit type ctu_params-racommit,
nobinpt type ctu_params-nobinpt,
nobiend type ctu_params-nobiend,
end of tran_opts.
CALL FUNCTION 'BDC_INSERT'
* EXPORTING
* TCODE = FILLER4
* POST_LOCAL = NOVBLOCAL
* PRINTING = NOPRINT
* SIMUBATCH = ' '
CTUPARAMS = TRAN_OPTS " CTU_PARAMS
TABLES
dynprotab =
* EXCEPTIONS
* INTERNAL_ERROR = 1
* NOT_OPEN = 2
* QUEUE_ERROR = 3
* TCODE_INVALID = 4
* PRINTING_INVALID = 5
* POSTING_INVALID = 6
* OTHERS = 7
.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
reward if helpful
raam
Hi Satish,
If u have created text in smartform, u have a tab Output Options in the text.
Click on it and u will find Page Protection Checkbox under the style
if u have created template then in template also u have Page protection checkbox in the Output options Tab.
please revert back if u have doubts
regards
raam
Hi Satish,
Under a window u can create Window, Graphic, Address, Text, Table, Template.
If u right click on a window u get a popup. In that u can see Create, Cut, Copy, Delete e.t.c.
If u select Create u can see Window, Graphic, Address, Text, Table, Template.
Now select the Text. Now u can see a Text Editor under the window. In this u can find the Output Options Tab. In the Output Options Tab u can find the Page Protection Checkbox.
In the Same way u can also find this Page protection checkbox in the Table and Templete Output Options Tab under the Style Field.
reward if helpful
raam
Hi,
1) BDC Session method we can use
ctuparams-DEFSIZE = 'X'
in BDC_insert function module.
2) In smartforms you can find page protection for text attributes,table and templetes in the output options of each of them we can find the page protection . This is same as protect and endprotect.
Thanks,
Nethaji.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.