ALV表头样式

例图.png


"最后一列要用

  g_text = &3.
  call method document->add_text  "插入文本
    exporting
      text         = g_text
      sap_emphasis = &2.
  call method document->add_gap "插入位置
    exporting
      width = &1.
END-OF-DEFINITION.```

```DATA:g_text TYPE sdydo_text_element.
  DATA:lv_p TYPE i.
  DATA:lv_string TYPE string.
  DATA:lv_string1 TYPE string.```

``  lv_string = '<html>'.``

  ```  CALL METHOD document->html_insert
    EXPORTING
      contents = lv_string
    CHANGING
      position =  lv_p.``

  ``` CONCATENATE '<DIV STYLE="padding-left:350px">'
              'xxxx ' '</div>'  INTO lv_string. "自定义样式
    CALL METHOD document->html_insert
    EXPORTING
      contents = lv_string
    CHANGING
      position =  lv_p.```

```CONCATENATE  '<H3 STYLE="padding-left:400px">' '利 润 表 ' '</H3>'  INTO lv_string1.
    CALL METHOD document->html_insert
    EXPORTING
      contents = lv_string1
    CHANGING
      position =  lv_p.```


  ```lv_string1 = '报表编号 Z2 ' .
    CALL METHOD document->html_insert
    EXPORTING
      contents = lv_string1
    CHANGING
      position =  lv_p.```

```  " CALL METHOD document->new_line.""换行
   CALL METHOD document->new_line.
   mcr_html_field 2   ' '  '单位:'.
   mcr_html_field 55   'KEY'  gs_t001-butxt.```

 ```  mcr_html_field 2   ' '  '日期:'.
   mcr_html_field 55   'KEY'  zdata4.``

  ``` mcr_html_field 2   ' '  '单位:元'."STRONG 加粗  EMPHASIS 斜体
   mcr_html_field 70   'KEY'  ' '.```
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容