阅读文章

Smart forms Frequently Asked Questions

[日期:2006-10-22] 来源:sap-img  作者:sapsky [字体: ]

Forcing a page break within table loop

Create a loop around the table. Put a Command node before the table in the loop that forces a NEWPAGE on whatever condition you want. Then only loop through a subset of the internal table (based on the conditions in the Command node) of the elements in the Table node. 

Font style and Font size

Goto Transaction SMARTSTYLES. 
There you can create Paragraph formats etc just like in sapscript. 

Then in your window under OUTPUT OPTIONS you include this SMARTSTYLE and use the Paragraph and character formats. 

Line in Smartform

Either you can use a window that takes up the width of your page and only has a height of 1 mm. 

Then you put a frame around it (in window output options). 
Thus you have drawn a box but it looks like a line. 

Or you can just draw "__" accross the page and play with the fonts so that it joins each UNDER_SCORE. 

Difference between 'forminterface' and 'global definitions' in global settings of smart forms

The Difference is as follows. 

To put it very simply: 

Form Interface is where you declare what must be passed in and out of the smartform (in from the print program to the smartform and out from the smartform to the print program). 

Global defs. is where you declare data to be used within the smartform on a global scope. 
ie: anything you declare here can be used in any other node in the form. 

Smartforms function module name 

Once you have activated the smartform, go to the environment -> function module name. There you can get the name of funtion module name. 

The key thing is the program that calls it. for instance, the invoice SMARTFORM LB_BIL_INVOICE is ran by the program RLB_INVOICE. 

This program uses another FM to determine the name of the FM to use itself. The key thing is that when it calls this FM (using a variable to store the actual name), that the parameters match the paramters in your smartform.

Another thing to note is that the FM name will change wherever the SF is transported to. 

So you need to use the FM to determine the name of the SF. 

Here is the code that can be use to determine the internal name of the function module: 

Code: 

    if sf_label(1) <> '/'.    " need to resolve by name 
      move sf_label to externalname. 
      call function 'SSF_FUNCTION_MODULE_NAME' 
           exporting 
                formname           = externalname 
           importing 
                fm_name            = internalname 
           exceptions 
                no_form            = 1 
                no_function_module = 2 
                others             = 3. 
      if sy-subrc <> 0. 
        message 'e427'. 
      endif. 
      move internalname to sf_label. 
    endif. 

It checks to see if the sf_label starts with a '/', which is how the internal names start. if it does, the name has already been converted. If not, it calls the FM and converts the name. 

You would then CALL FUNCTION sf_label. 



阅读:
录入:sapsky

评论 】 【 推荐 】 【 打印
上一篇:[推荐]A Sample Program Calling Smartforms
下一篇:Smartforms FAQ Part Two
相关文章      
本文评论       全部评论
发表评论


点评: 字数
姓名:

  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款