金税打印abap

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
VTWEG = VTWEG
SPART = SPART
WAERK = WAERK
CHANGING
RC = RC
EXCEPTIONS
OTHERS = 1.
TABLES
FKART = FKART
KUNRG = KUNRG
VSBED = VSBED
BZIRK = BZIRK
VKORG = VKORG
TEMP_KUNRG-OPTION.
SELECT * FROM KNVV
WHERE KUNNR IN KUNRG
AND VKORG IN VKORG
AND VTWEG IN VTWEG
*& Author *
*& Description : 将增值税发票数据按照金税系统接口要求整理 *
*& Modifications : *
AND VSBED IS INITIAL AND KUNRG IS INITIAL AND BZIRK IS INITIAL
AND VKORG IS INITIAL AND VTWEG IS INITIAL AND SPART IS INITIAL.
MESSAGE E001.
AND SPART IN SPART
AND BZIRK IN BZIRK.
MOVE KNVV-KUNNR TO TEMP_KUNRG-LOW.
MOVE KNVV-VKORG TO TEMP_VKORG-LOW.
MOVE KNVV-VTWEG TO TEMP_VTWEG-LOW.
ELSE.
REFRESH: KUNRG, VKORG, VTWEG, SPART.
APPEND LINES OF: TEMP_KUNRG TO KUNRG,
TEMP_VKORG TO VKORG,
TEMP_VTWEG TO VTWEG,
MOVE KNVV-SPART TO TEMP_SPART-LOW.
COLLECT: TEMP_KUNRG, TEMP_VKORG, TEMP_VTWEG, TEMP_SPART.
ENDSELECT.
IF SY-SUBRC <> 0.
MESSAGE E005.
*&---------------------------------------------------------------------*
*& Report ZBILLEXP_03 *
*&---------------------------------------------------------------------*
ENDFORM. " INITIALIZATION
*&---------------------------------------------------------------------*
*& Form CHECK_INPUT
PERFORM WRITE_BODY.
TOP-OF-PAGE.
SET LEFT SCROLL-BOUNDARY COLUMN 32.
PERFORM WRITE_TOPPAGE.
TOP-OF-PAGE DURING LINE-SELECTION.
SET LEFT SCROLL-BOUNDARY COLUMN 32.
REPORT ZBILLEXP_03 NO STANDARD PAGE HEADING
MESSAGE-ID ZA LINE-SIZE 313.
INCLUDE ZBILLTOP_03.
INCLUDE ZSELECT_03.
INITIALIZATION.
PERFORM INITIALIZATION.
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM INITIALIZATION.
* FKART-LOW = 'ZF2'.
SPART = SPART
WAERK = WAERK
FKDAT = FKDAT
CHANGING
COMBINE = COMBINE
EXCEPTIONS
OTHERS = 1.
AT USER-COMMAND.
CASE SY-UCOMM.
WHEN 'SEL'.
PERFORM SELECT_ALL.
WHEN 'DSEL'.
PERFORM DESELECT_ALL.
WHEN 'PSEL'.
PERFORM SELECT_PARTIAL.
AT SELECTION-SCREEN.
PERFቤተ መጻሕፍቲ ባይዱRM CHECK_INPUT.
PERFORM AUTHORITY_CHECK USING '04' RC VKORG FKART.
* User exit 001 for authority check.
CALL CUSTOMER-FUNCTION '001'
PERFORM WRITE_TOPPAGE.
AT LINE-SELECTION.
CHECK NOT LIST_VBRK-VBELN IS INITIAL.
SET PARAMETER ID 'VF' FIELD LIST_VBRK-VBELN.
CALL TRANSACTION 'VF03' AND SKIP FIRST SCREEN.
* FKART-SIGN = 'I'.
* FKART-OPTION = 'EQ'.
* APPEND FKART.
WAERK-LOW = 'CNY'.
WAERK-SIGN = 'I'.
WAERK-OPTION = 'EQ'.
APPEND WAERK.
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM CHECK_INPUT.
IF VBELN IS INITIAL AND FKDAT IS INITIAL AND FKART IS INITIAL
CHECK RC = 0.
START-OF-SELECTION.
* Get billing document header
PERFORM GET_VBRK.
END-OF-SELECTION.
SET PF-STATUS 'LIST'.
SET TITLEBAR 'LIST'.
TEMP_SPART-SIGN,
TEMP_KUNRG-SIGN.
MOVE 'EQ' TO: TEMP_VKORG-OPTION,
TEMP_VTWEG-OPTION,
TEMP_SPART-OPTION,
FKDAT-LOW = ''. "SY-DATUM.
FKDAT-HIGH = SY-DATUM.
FKDAT-SIGN = 'I'.
FKDAT-OPTION = 'BT'.
APPEND FKDAT.
CLEAR P_SGTXT.
*\ REV_TYPE-LOW = 'RE'.
FKART = FKART
KUNRG = KUNRG
VSBED = VSBED
BZIRK = BZIRK
VKORG = VKORG
VTWEG = VTWEG
WHEN 'DNLD'.
* Download billing document to file
PERFORM DOWNLOAD.
ENDCASE.
*&---------------------------------------------------------------------*
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
*& Form INITIALIZATION
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
*& Date Programmer Description *
*& YYYY/MM/DD 修改人员名 说明 *
*&---------------------------------------------------------------------*
ENDIF.
IF FKDAT IS INITIAL AND VBELN IS INITIAL.
MESSAGE W002.
ENDIF.
IF NOT BZIRK IS INITIAL.
MOVE 'I' TO: TEMP_VKORG-SIGN,
TEMP_VTWEG-SIGN,
*\ REV_TYPE-SIGN = 'I'.
*\ REV_TYPE-OPTION = 'EQ'.
*\ APPEND REV_TYPE.
MOVE 'X' TO COMBINE.
CALL CUSTOMER-FUNCTION '006'
TABLES
VBELN = VBELN
相关文档
最新文档