태터데스크 관리자

도움말
닫기
적용하기   첫페이지 만들기

태터데스크 메시지

저장하였습니다.

'임시전표'에 해당되는 글 1건

  1. 2009.03.09 임시전표 Table에 대한 고찰
ERP_Work/ABAP2009.03.09 11:50

VBSEGA 전표임시저장에 대한 전표세그멘트 - 자산 데

VBSEGD 고객전표임시저장에 대한 전표세그멘트

VBSEGK 구매처전표임시저장에 대한 전표세그멘트

VBSEGS 전표임시저장에 대한 전표세그멘트 - G/L계정

   

   

VBKPF 전표임시저장에 대한 전표헤더

KOARS        KOARS_003 계정 유형 허용

에 최대 5자로 ADKSM 이 들어가게됨

   

5자리 케릭터의 이니셜이 위에 임시전표테이블이며

해당 라인을 읽는다..

   

M의 경우에는 모듈별로 들어가게 되며 VBSEG* 류에는 들어가지 않는다.

   

PRELIMINARY_POSTING_DOC_READ

   

*-----------------------------------------------------------------------

* FORM VBKPF_LESEN

*-----------------------------------------------------------------------

*

*-----------------------------------------------------------------------

form vbkpf_lesen.

refresh: t_vbkpf, xvbkpf1.

* select * from vbkpf into table xvbkpf1 where

* ausbk eq bukrs and

* gjahr eq gjahr and

* belnr eq belnr.

* if sy-subrc ne 0.

* message id 'FP' type 'A' number 045

* with 'VBKPF' bukrs gjahr belnr

* raising document_not_found.

* endif.

* loop at xvbkpf1.

* move-corresponding xvbkpf1 to t_vbkpf.

* append t_vbkpf.

* endloop.

* ----------------------------------------------------------------------

* Replaced for performance reasons: Note 529771

* ----------------------------------------------------------------------

select * from vbkpf into corresponding fields of table t_vbkpf

where ausbk eq bukrs and

gjahr eq gjahr and

belnr eq belnr.

if sy-dbcnt eq 0.

message id 'FP' type 'A' number 045

with 'VBKPF' bukrs gjahr belnr

raising document_not_found.

endif.

* ----------------------------------------------------------------------

loop at t_vbkpf where "Ausgangsbuchungskreis

ausbk eq bukrs and "mu?erster Eintrag sein

bukrs eq bukrs.

if sy-tabix ne 1.

hlp_i = sy-tabix.

delete t_vbkpf index hlp_i.

insert t_vbkpf index 1.

endif.

exit.

endloop.

endform. "vbkpf_lesen

   

*eject

*-----------------------------------------------------------------------

* FORM VBSEG_LESEN

*-----------------------------------------------------------------------

*

*-----------------------------------------------------------------------

form vbseg_lesen.

refresh: t_vbseg, xvbsega1, xvbsegk1, xvbsegs1.

if t_vbkpf-koars ca 'A'.

clear t_vbseg.

* select * from vbsega into table xvbsega1 where

* ausbk eq bukrs and

* gjahr eq gjahr and

* belnr eq belnr.

* if sy-subrc ne 0.

* message id 'FP' type 'A' number 045 with

* 'VBSEGA' bukrs gjahr belnr

* raising document_line_not_found.

* endif.

* loop at xvbsega1.

* move-corresponding xvbsega1 to t_vbseg.

* t_vbseg-koart = 'A'.

* append t_vbseg.

* endloop.

* endif.

* ----------------------------------------------------------------------

* Replaced for performance reasons: Note 529771

* ----------------------------------------------------------------------

select * from vbsega into corresponding fields of table t_vbseg

where ausbk eq bukrs and

gjahr eq gjahr and

belnr eq belnr.

if sy-dbcnt eq 0.

message id 'FP' type 'A' number 045

with 'VBSEGA' bukrs gjahr belnr

raising document_line_not_found.

endif.

t_vbseg-koart = char_a.

modify t_vbseg transporting koart where koart eq space.

endif.

* ----------------------------------------------------------------------

if t_vbkpf-koars ca 'D'.

clear t_vbseg.

* select * from vbsegd into table xvbsegd1 where

* ausbk eq bukrs and

* gjahr eq gjahr and

* belnr eq belnr.

* if sy-subrc ne 0.

* message id 'FP' type 'A' number 045 with

* 'VBSEGD' bukrs gjahr belnr

* raising document_line_not_found.

* endif.

* loop at xvbsegd1.

* move-corresponding xvbsegd1 to t_vbseg.

* t_vbseg-koart = 'D'.

* append t_vbseg.

* endloop.

* endif.

* ----------------------------------------------------------------------

* Replaced for performance reasons: Note 529771

* ----------------------------------------------------------------------

select * from vbsegd appending corresponding fields of table t_vbseg

where ausbk eq bukrs and

gjahr eq gjahr and

belnr eq belnr.

if sy-dbcnt eq 0.

message id 'FP' type 'A' number 045

with 'VBSEGD' bukrs gjahr belnr

raising document_line_not_found.

endif.

   

t_vbseg-koart = char_d.

modify t_vbseg transporting koart where koart eq space.

endif.

* ----------------------------------------------------------------------

if t_vbkpf-koars ca 'K'.

clear t_vbseg.

* select * from vbsegk into table xvbsegk1 where

* ausbk eq bukrs and

* gjahr eq gjahr and

* belnr eq belnr.

* if sy-subrc ne 0.

* message id 'FP' type 'A' number 045 with

* 'VBSEGK' bukrs gjahr belnr

* raising document_line_not_found.

* endif.

* loop at xvbsegk1.

* move-corresponding xvbsegk1 to t_vbseg.

* t_vbseg-koart = 'K'.

* append t_vbseg.

* endloop.

* endif.

* ----------------------------------------------------------------------

* Replaced for performance reasons: Note 529771

* ----------------------------------------------------------------------

select * from vbsegk appending corresponding fields of table t_vbseg

where ausbk eq bukrs and

gjahr eq gjahr and

belnr eq belnr.

if sy-dbcnt eq 0.

message id 'FP' type 'A' number 045

with 'VBSEGK' bukrs gjahr belnr

raising document_line_not_found.

endif.

   

t_vbseg-koart = char_k.

modify t_vbseg transporting koart where koart eq space.

endif.

   

* ----------------------------------------------------------------------

* Following lines of source code haven't been changed by Note 529771 !

* ----------------------------------------------------------------------

if t_vbkpf-koars ca 'S'.

clear t_vbseg.

select * from vbsegs into table xvbsegs1 where

ausbk eq bukrs and

gjahr eq gjahr and

belnr eq belnr.

if sy-subrc ne 0.

message id 'FP' type 'A' number 045 with

'VBSEGS' bukrs gjahr belnr

raising document_line_not_found.

endif.

loop at xvbsegs1.

move-corresponding xvbsegs1 to t_vbseg.

if t_vbkpf-tcode(2) eq 'MR'.

clear t_vbseg-buzid.

endif.

t_vbseg-hkont = t_vbseg-saknr.

t_vbseg-koart = xvbsegs1-koart.

append t_vbseg.

endloop.

endif.

sort t_vbseg by buzei.

   

* correct wrong authority flag

loop at t_vbseg where xskfb = char_a.

if t_vbseg-koart co 'DK' and

t_vbseg-umskz eq space and

t_vbseg-skfbt is initial.

* try to rebuild cash discount calculated flag

t_vbseg-xskfb = 'X'.

else.

clear t_vbseg-xskfb.

endif.

modify t_vbseg.

endloop.

   

endform. "vbseg_lesen

   

   

   

   

   

'ERP_Work > ABAP' 카테고리의 다른 글

SAP Shotcut EnablePassword  (0) 2011.08.03
전화번호 Conversion Exit  (0) 2010.08.26
공급가액에 따른 부가세 자동계산 (KR)  (0) 2010.08.09
주민등록번호 외국인등록번호 Check 프로그램  (0) 2009.03.20
임시전표 Table에 대한 고찰  (0) 2009.03.09
FIEB_PASSWORD  (0) 2009.02.27
Posted by 프랭크리

댓글을 달아 주세요