text FI质量变更的附加字段+清算的附加字段

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了text FI质量变更的附加字段+清算的附加字段相关的知识,希望对你有一定的参考价值。

form screen_detail.

  data: zusatzbild,
        dynnr_save like bdcdata-dynpro.
  data: ld_buzid   like bseg-buzid,
        ld_ktosl   like bseg-ktosl.                        "Note 0430101

  clear bdcdata.
  bdcdata-program  = 'SAPMF05L'.

  select single mwart umskz buzid ktosl from bseg
         into (it_buztab-mwart, it_buztab-umskz, ld_buzid, ld_ktosl)
                      where bukrs = it_buztab-bukrs
                      and   belnr = it_buztab-belnr
                      and   gjahr = it_buztab-gjahr
                      and   buzei = it_buztab-buzei.

*... determine screen number:
  call function 'NEXT_DYNPRO_SEARCH'
       exporting
            i_bschl  = it_buztab-bschl
            i_bukrs  = it_buztab-bukrs
            i_mwart  = it_buztab-mwart
            i_bstat  = it_buztab-bstat
            i_mwskzs = it_buztab-mwskz
            i_tcode  = 'FB02'
            i_umskz  = it_buztab-umskz
            i_buzid  = ld_buzid
            i_winfk  = space
            i_ktosl  = ld_ktosl                            "Note 0430101
       importing
            e_dynnra = dynnr_save.
  bdcdata-dynpro   = dynnr_save.
  bdcdata-dynbegin = 'X'.
  append bdcdata.
  clear bdcdata.
*... marker field for 'more':
  if dynnr_save = 300 or dynnr_save = 305 .
    bdcdata-fnam = 'DKACB-FMORE'.
    bdcdata-fval = space.
    append bdcdata.
    clear bdcdata.
  endif.
*... fields to be changed:
  loop at fldtab.
    clear bdcdata.
    case fldtab-fname.
      when 'BVTYP'.
        zusatzbild = 'X'.
        continue.
      when 'CESSION_KZ'.
        zusatzbild = 'X'.
        continue.
      when 'HBKID'.
        zusatzbild = 'X'.
        continue.
      when 'XREF3'.
        zusatzbild = 'X'.
        continue.
      when 'MABER'.
        if it_buztab-koart = 'D' and it_buztab-umskz is initial.
          bdcdata-fnam = 'BSEG-MABER'.
          bdcdata-fval = s_bseg-maber.
        else.
          zusatzbild = 'X'.
          continue.
        endif.
      when 'MADAT'.
        if it_buztab-koart = 'D' and it_buztab-umskz is initial.
          bdcdata-fnam = 'BSEG-MADAT'.
          if not s_bseg-madat is initial.
            write s_bseg-madat to bdcdata-fval.
          endif.
        else.
          zusatzbild = 'X'.
          continue.
        endif.
      when 'MANSP'.
        if it_buztab-koart = 'D' and it_buztab-umskz is initial.
          bdcdata-fnam = 'BSEG-MANSP'.
          bdcdata-fval = s_bseg-mansp.
        else.
          zusatzbild = 'X'.
          continue.
        endif.
      when 'MANST'.
        if it_buztab-koart = 'D' and it_buztab-umskz is initial.
          bdcdata-fnam = 'BSEG-MANST'.
          bdcdata-fval = s_bseg-manst.
        else.
          zusatzbild = 'X'.
          continue.
        endif.
      when 'MSCHL'.
        if it_buztab-koart = 'D' and it_buztab-umskz is initial.
          bdcdata-fnam = 'BSEG-MSCHL'.
          bdcdata-fval = s_bseg-mschl.
        else.
          zusatzbild = 'X'.
          continue.
        endif.
      when 'RSTGR'.
        zusatzbild = 'X'.
        continue.
      when 'SGTXT'.
        bdcdata-fnam = 'BSEG-SGTXT'.
        bdcdata-fval = s_bseg-sgtxt.
      when 'ZLSPR'.
        bdcdata-fnam = 'BSEG-ZLSPR'.
        bdcdata-fval = s_bseg-zlspr.
      when 'ZLSCH'.
        if it_buztab-koart = 'D' and it_buztab-umskz is initial.
          zusatzbild = 'X'.
          continue.
        else.
          bdcdata-fnam = 'BSEG-ZLSCH'.
          bdcdata-fval = s_bseg-zlsch.
        endif.
      when 'ZFBDT'.
        bdcdata-fnam = 'BSEG-ZFBDT'.
        write s_bseg-ZFBDT to bdcdata-fval.
      when 'ZBD1T'.
        bdcdata-fnam = 'BSEG-ZBD1T'.
        write s_bseg-zbd1t to bdcdata-fval left-justified.
      when 'ZBD1P'.
        bdcdata-fnam = 'BSEG-ZBD1P'.
        write s_bseg-zbd1p to bdcdata-fval left-justified.
      when 'ZBD2T'.
        bdcdata-fnam = 'BSEG-ZBD2T'.
        write s_bseg-zbd2t to bdcdata-fval left-justified.
      when 'ZBD2P'.
        bdcdata-fnam = 'BSEG-ZBD2P'.
        write s_bseg-zbd2p to bdcdata-fval left-justified.
      when 'ZBD3T'.
        bdcdata-fnam = 'BSEG-ZBD3T'.
        write s_bseg-zbd3t to bdcdata-fval left-justified.
      when 'ZUONR'.
        bdcdata-fnam = 'BSEG-ZUONR'.
        bdcdata-fval = s_bseg-zuonr.
    endcase.
    append bdcdata.
  endloop.
  clear bdcdata.
*... fields on extra screen:
  if zusatzbild ne space.
    clear bdcdata.
    bdcdata-fnam     = 'BDC_OKCODE'.
    bdcdata-fval     = 'ZK'.
    append bdcdata.
    clear bdcdata.
    bdcdata-program  = 'SAPMF05L'.
    if it_buztab-umskz is initial.
      case it_buztab-koart.
        when 'S'. bdcdata-dynpro = '1300'.
        when 'D'. bdcdata-dynpro = '1301'.
        when 'K'. bdcdata-dynpro = '1302'.
      endcase.
    else.
      bdcdata-dynpro = '1303'.
    endif.
    bdcdata-dynbegin = 'X'.
    append bdcdata.
    loop at fldtab.
      clear bdcdata.
      case fldtab-fname.
        when 'CESSION_KZ'.
          bdcdata-fnam = 'BSEG-CESSION_KZ'.
          bdcdata-fval = s_bseg-cession_kz.
          append bdcdata.
        when 'HBKID'.
          bdcdata-fnam = 'BSEG-HBKID'.
          bdcdata-fval = s_bseg-hbkid.
          append bdcdata.
        when 'XREF3'.
          bdcdata-fnam = 'BSEG-XREF3'.
          bdcdata-fval = s_bseg-xref3.
          append bdcdata.
        when 'ZLSCH'.
          if it_buztab-koart = 'D' and it_buztab-umskz is initial.
          bdcdata-fnam = 'BSEG-ZLSCH'.
          bdcdata-fval = s_bseg-zlsch.
          append bdcdata.
          endif.
        when 'BVTYP'.
          bdcdata-fnam = 'BSEG-BVTYP'.
          bdcdata-fval = s_bseg-bvtyp.
          append bdcdata.
        when 'MABER'.
          if not ( it_buztab-koart = 'D' and
                   it_buztab-umskz is initial ).
          bdcdata-fnam = 'BSEG-MABER'.
          bdcdata-fval = s_bseg-maber.
          append bdcdata.
          endif.
         when 'MADAT'.
          if not ( it_buztab-koart = 'D' and
                   it_buztab-umskz is initial ).
          bdcdata-fnam = 'BSEG-MADAT'.
          if not s_bseg-madat is initial.
            write s_bseg-madat to bdcdata-fval.
          endif.
          append bdcdata.
          endif.
        when 'MANSP'.
          if not ( it_buztab-koart = 'D' and
                   it_buztab-umskz is initial ).
          bdcdata-fnam = 'BSEG-MANSP'.
          bdcdata-fval = s_bseg-mansp.
          append bdcdata.
          endif.
        when 'MANST'.
          if not ( it_buztab-koart = 'D' and
                   it_buztab-umskz is initial ).
          bdcdata-fnam = 'BSEG-MANST'.
          bdcdata-fval = s_bseg-manst.
          append bdcdata.
          endif.
        when 'MSCHL'.
          if not ( it_buztab-koart = 'D' and
                   it_buztab-umskz is initial ).
          bdcdata-fnam = 'BSEG-MSCHL'.
          bdcdata-fval = s_bseg-mschl.
          append bdcdata.
          endif.
        when 'RSTGR'.
          bdcdata-fnam = 'BSEG-RSTGR'.
          bdcdata-fval = s_bseg-rstgr.
          append bdcdata.
      endcase.
    endloop.
    clear bdcdata.
    bdcdata-fnam     = 'BDC_OKCODE'.
    bdcdata-fval     = 'ENTR'.
    append bdcdata.
    clear bdcdata.
    bdcdata-program  = 'SAPMF05L'.
    bdcdata-dynpro   = dynnr_save.
    bdcdata-dynbegin = 'X'.
    append bdcdata.
*... Marker field for Coding Block:                        "Note 324855
    if dynnr_save = 300.                                   "Note 324855
      clear bdcdata.                                       "Note 324855
      bdcdata-fnam = 'DKACB-FMORE'.                        "Note 324855
      bdcdata-fval = space.                                "Note 324855
      append bdcdata.                                      "Note 324855
    endif.                                                 "Note 324855
  endif.
  clear bdcdata.
  bdcdata-fnam     = 'BDC_OKCODE'.
  bdcdata-fval     = 'AB'.
  append bdcdata.
  clear bdcdata.

endform.                               " SCREEN_DETAIL

Steps:
- OB32 (Permitir Alterar)
- OBC4 (Field Status)
- Layout FBL3N
- O7F1 (Compensação)
- FM FI_ITEMS 
https://launchpad.support.sap.com/#/notes/640908

FI_ITEMS https://launchpad.support.sap.com/#/notes/640908
--> Chave de Objeto
38940949100213097513

- screen 0100
- process logic screen 0100
- include LFI_ITEMS01
- form screen_detail


&---------------------------------------------------------------------
*& Module REQ_MABER
&---------------------------------------------------------------------
module req_xref3.
fldtab-fname = 'XREF3'.
fldtab-aenkz = 'M'.
collect fldtab.
endmodule. " REQ_MABER


以上是关于text FI质量变更的附加字段+清算的附加字段的主要内容,如果未能解决你的问题,请参考以下文章

使用 div 的值附加输入文本字段

为啥带有附加字段“指定”的字段始终为空?

为啥没有附加结构的切片字段?

按附加字段“日期”排序的条目

dedecms dede:list获取附加字段

Django Rest Frame API:ModelSerializer 中的附加字段