給PO分配自定义的表格(SmartForm)和输出程序 5

*eject
*----------------------------------------------------------------------*
* Angebotsabsage
*----------------------------------------------------------------------*
form. entry_absa using ent_retco ent_screen.

  data: l_druvo like t166k-druvo,
        l_nast  like nast,
        l_from_memory,
        l_doc   type meein_purchase_doc_print.

  l_druvo = '4'.
  clear ent_retco.
  call function 'ME_READ_PO_FOR_PRINTING'
    exporting
      ix_nast        = nast
      ix_screen      = ent_screen
    importing
      ex_retco       = ent_retco
      ex_nast        = l_nast
      doc            = l_doc
    changing
      cx_druvo       = l_druvo
      cx_from_memory = l_from_memory.
  check ent_retco eq 0.
  call function 'ME_PRINT_PO'
    exporting
      ix_nast        = l_nast
      ix_druvo       = l_druvo
      doc            = l_doc
      ix_screen      = ent_screen
      ix_from_memory = l_from_memory
      ix_toa_dara    = toa_dara
      ix_arc_params  = arc_params
      ix_fonam       = tnapr-fonam                          "HW 214570
    importing
      ex_retco       = ent_retco.
endform.                    "entry_absa
*eject
*----------------------------------------------------------------------*
* Lieferplaneinteilung
*----------------------------------------------------------------------*
form. entry_lpet using ent_retco ent_screen.

  data: l_druvo like t166k-druvo,
        l_nast  like nast,
        l_from_memory,
        l_doc   type meein_purchase_doc_print.

  clear ent_retco.
  if nast-aende eq space.
    l_druvo = '5'.
  else.
    l_druvo = '8'.
  endif.

  call function 'ME_READ_PO_FOR_PRINTING'
    exporting
      ix_nast        = nast
      ix_screen      = ent_screen
    importing
      ex_retco       = ent_retco
      ex_nast        = l_nast
      doc            = l_doc
    changing
      cx_druvo       = l_druvo
      cx_from_memory = l_from_memory.
  check ent_retco eq 0.
  call function 'ME_PRINT_PO'
    exporting
      ix_nast        = l_nast
      ix_druvo       = l_druvo
      doc            = l_doc
      ix_screen      = ent_screen
      ix_from_memory = l_from_memory
      ix_toa_dara    = toa_dara
      ix_arc_params  = arc_params
      ix_fonam       = tnapr-fonam                          "HW 214570
    importing
      ex_retco       = ent_retco.
endform.                    "entry_lpet
*eject
*----------------------------------------------------------------------*
* Lieferplaneinteilung
*----------------------------------------------------------------------*
form. entry_lpfz using ent_retco ent_screen.

  data: l_druvo like t166k-druvo,
        l_nast  like nast,
        l_from_memory,
        l_doc   type meein_purchase_doc_print.

  clear ent_retco.
  if nast-aende eq space.
    l_druvo = '5'.
  else.
    l_druvo = '8'.
  endif.

  call function 'ME_READ_PO_FOR_PRINTING'
    exporting
      ix_nast        = nast
      ix_screen      = ent_screen
    importing
      ex_retco       = ent_retco
      ex_nast        = l_nast
      doc            = l_doc
    changing
      cx_druvo       = l_druvo
      cx_from_memory = l_from_memory.
  check ent_retco eq 0.
  call function 'ME_PRINT_PO'
    exporting
      ix_nast        = l_nast
      ix_druvo       = l_druvo
      doc            = l_doc
      ix_screen      = ent_screen
      ix_from_memory = l_from_memory
      ix_xfz         = 'X'
      ix_toa_dara    = toa_dara
      ix_arc_params  = arc_params
      ix_fonam       = tnapr-fonam                          "HW 214570
    importing
      ex_retco       = ent_retco.
endform.                    "entry_lpfz
*eject
*----------------------------------------------------------------------*
* Mahnung
*----------------------------------------------------------------------*
form. entry_lpma using ent_retco ent_screen.

  data: l_druvo like t166k-druvo,
        l_nast  like nast,
        l_from_memory,
        l_doc   type meein_purchase_doc_print.

  clear ent_retco.
  l_druvo = '6'.
  call function 'ME_READ_PO_FOR_PRINTING'
    exporting
      ix_nast        = nast
      ix_screen      = ent_screen
    importing
      ex_retco       = ent_retco
      ex_nast        = l_nast
      doc            = l_doc
    changing
      cx_druvo       = l_druvo
      cx_from_memory = l_from_memory.
  check ent_retco eq 0.
  call function 'ME_PRINT_PO'
    exporting
      ix_nast        = l_nast
      ix_druvo       = l_druvo
      doc            = l_doc
      ix_screen      = ent_screen
      ix_from_memory = l_from_memory
      ix_toa_dara    = toa_dara
      ix_arc_params  = arc_params
      ix_fonam       = tnapr-fonam                          "HW 214570
    importing
      ex_retco       = ent_retco.
endform.                    "entry_lpma
*ENHANCEMENT-POINT FM06PE02_02 SPOTS ES_SAPFM06P STATIC .
*&---------------------------------------------------------------------*
*&      Form  CURRENCY_CONVERTING
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
form. currency_converting  using u_waers u_netpr changing c_netpr.
**& Local data declaration.
  data: lv_factor type p decimals 3.
**& CURRENCY CONVERTING FACTOR.
  call function 'CURRENCY_CONVERTING_FACTOR'
    exporting
      currency          = u_waers
    importing
      factor            = lv_factor
    exceptions
      too_many_decimals = 1
      others            = 2.

  c_netpr = u_netpr * lv_factor.
  clear: lv_factor.

endform.                    " CURRENCY_CONVERTING
*&---------------------------------------------------------------------*
*&      Form  READ_TEXT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
form. read_text using u_ebeln u_ebelp changing c_text.
**& Local data declaration.
  data: lt_lines  like tline occurs 0 with header line.
  data: lv_object type c length 10.   "Texts: Application.
  data: lv_name type tdobname.        "name.
  data: lv_text type char4000.        "Text.

**& Name.
  if u_ebelp = '0'.
    lv_name   = u_ebeln.
    lv_object = 'EKKO'.
  else.
    concatenate u_ebeln u_ebelp into lv_name.
    lv_object = 'EKPO'.
  endif.

**& Get text.
  call function 'READ_TEXT'
    exporting
      client                  = sy-mandt
      id                      = 'F01'
      language                = sy-langu
      name                    = lv_name
      object                  = lv_object
    tables
      lines                   = lt_lines
    exceptions
      id                      = 1
      language                = 2
      name                    = 3
      not_found               = 4
      object                  = 5
      reference_check         = 6
      wrong_access_to_archive = 7
      others                  = 8.

**& Text.
  loop at lt_lines.
    concatenate lv_text lt_lines-tdline into lv_text.
    clear: lt_lines.
  endloop.
  condense lv_text.
  c_text = lv_text.
  clear:lv_name, lv_object, lv_text, lt_lines[].

endform.                    " READ_TEXT

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/13547743/viewspace-630970/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/13547743/viewspace-630970/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值