Report zcomprasreporte abap

510 views

Published on

Es un reporte en abap

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
510
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
24
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Report zcomprasreporte abap

  1. 1. REPORT ZCOMPRASREPORTENO STANDARD PAGE HEADING LINE-SIZE 255 LINE-COUNT 65 MESSAGE-ID ZR .************************************************************************ This program extracts documents from SAP R/3, (A/P module),* to generate three (3) reports for the PUSCHASE REPORT.* This a Peruvian legal requirement and have a specific format for each* report.** All the documents (invoices, credit memos) that have been* posted between the initial date and the final date, and have at least* one line item with tax code begining with C or R, will be selected* and written on the report.* The records are chosen according to the selection-criteria the* user shows on the screen.** The documents with the document type 38 or A5 are* printed under the title "POLIZAS DE IMPORTACION"* (custom certificate of importations). It has a different* report layout than the other documents.************************************************************************TABLES: BKPF, " Accounting document header BSEG, " Accounting document segment LFA1. " Vendor master (general section)* YFCTAPOLI. "FAE2000.02.18DATA: TOTAL_HWBAS LIKE BSEG-DMBTR, TOTAL_DIF TYPE P DECIMALS 2, TOTAL_RET_OTROS LIKE BSEG-DMBTR, TOTAL_IGV LIKE BSEG-DMBTR, TOTAL_VENDOR LIKE BSEG-DMBTR, TOTAL_CIF LIKE BSEG-DMBTR, TOTAL_AD_VAL LIKE BSEG-DMBTR, TOTAL_REINTEGRO LIKE BSEG-DMBTR, SAVE_DOCTYP(3) TYPE C, SAVE_TOTAL_DOCTYP(3) TYPE C, SAVE_BKTXT(21) TYPE C, DOCNAME(30) TYPE C, COUNT TYPE I, RAD TYPE I, SAVE_PAGE TYPE I, LIN TYPE I, FLAGGA(2) TYPE C, W_LIFNR_FLAG(1) TYPE C, W_MWSKZ_FLAG(1) TYPE C, TEMP_BELNR LIKE BSEG-BELNR.selection-screen: begin of block 1 with frame title text-001.SELECTION-SCREEN SKIP .parameters: P_COMP LIKE T001-BUKRS OBLIGATORY DEFAULT PE02.SELECT-OPTIONS:S_BUDAT FOR BKPF-BUDAT OBLIGATORY,S_DOCTYP FOR BKPF-BLART ,S_VENDOR FOR LFA1-LIFNR ,S_TCODE FOR BKPF-TCODE.selection-screen end of block 1.SELECTION-SCREEN: BEGIN OF BLOCK 2 WITH FRAME TITLE TEXT-022.SELECTION-SCREEN SKIP .PARAMETERS: P_REP_DT AS CHECKBOX DEFAULT X, P_REP_SM AS CHECKBOX, P_REP_CS AS CHECKBOX.SELECTION-SCREEN SKIP .PARAMETER: P_PRINT AS CHECKBOX.SELECTION-SCREEN SKIP .SELECTION-SCREEN END OF BLOCK 2.DATA: DOCTYP(35) TYPE C, DOCNR(10) TYPE C, TOTAL LIKE BSEG-DMBTR, DIF LIKE BSEG-DMBTR, SUMMA(1) TYPE C.DATA: BEGIN OF LIST2 OCCURS 0, DOCTYP(3) TYPE C, BELNR LIKE BKPF-BELNR, GJAHR LIKE BKPF-GJAHR, BLART LIKE BKPF-BLART, BLDAT LIKE BKPF-BLDAT, BUDAT LIKE BKPF-BUDAT, XBLNR LIKE BKPF-XBLNR, BKTXT LIKE BKPF-BKTXT, SHKZG LIKE BSEG-SHKZG, HWBAS LIKE BSEG-HWBAS, RET_OTROS LIKE BSEG-DMBTR, IGV LIKE BSEG-DMBTR, TOTAL LIKE BSEG-DMBTR, DIF LIKE BSEG-DMBTR,
  2. 2. HKONT LIKE BSEG-HKONT, LIFNR LIKE BSEG-LIFNR, MWSKZ LIKE BSEG-MWSKZ, STCD1 LIKE LFA1-STCD1, NAME1 LIKE LFA1-NAME1, CIF LIKE BSEG-DMBTR, AD_VAL LIKE BSEG-DMBTR, REINTEGRO LIKE BSEG-DMBTR, TCODE LIKE BKPF-TCODE, STBLG LIKE BKPF-STBLG, STJAH LIKE BKPF-STJAH, END OF LIST2.DATA: BEGIN OF LIST3 OCCURS 0, BELNR LIKE BSEG-BELNR, SHKZG LIKE BSEG-SHKZG, HWBAS LIKE BSEG-DMBTR, DMBTR LIKE BSEG-DMBTR, SGTXT(20) TYPE C, HKONT LIKE BSEG-HKONT, LIFNR LIKE BSEG-LIFNR, MWSKZ LIKE BSEG-MWSKZ, TOTAL LIKE BSEG-DMBTR, END OF LIST3.DATA: BEGIN OF LIST4 OCCURS 0. INCLUDE STRUCTURE LIST2.DATA: END OF LIST4.DATA: BEGIN OF LIST5 OCCURS 0. INCLUDE STRUCTURE LIST2.DATA: END OF LIST5.DATA: BEGIN OF TOTAL_LIST OCCURS 0, DOCTYP(3) TYPE C, DOCNAME(30) TYPE C, HWBAS LIKE BSEG-DMBTR, DIF LIKE BSEG-DMBTR, RET_OTROS LIKE BSEG-DMBTR, IGV LIKE BSEG-DMBTR, VENDOR LIKE BSEG-DMBTR, END OF TOTAL_LIST.DATA: SAVE_BELNR LIKE BSEG-BELNR.* Modified begin by FAE2000.02.18DATA ACCT8(8) TYPE C.RANGES R_ACCT FOR ACCT8.INITIALIZATION. REFRESH R_ACCT. MOVE I TO R_ACCT-SIGN. MOVE EQ TO R_ACCT-OPTION.* SELECT * FROM YFCTAPOLI.* CONCATENATE 0000 YFCTAPOLI-ACCT4 INTO R_ACCT-LOW.* APPEND R_ACCT.* ENDSELECT.* Modified end by FAE2000.02.18*$*$----------------- M A I N R O U T I N E ------------------------ *START-OF-SELECTION. IF P_PRINT = X. NEW-PAGE PRINT ON. ENDIF. PERFORM SELECT_DATA_FROM_TABLES. PERFORM ADJUST_TO_REPORT. IF P_REP_DT EQ X. FLAGGA = dt. PERFORM WRITE_DETAILED_REPORT. ENDIF. IF P_REP_SM EQ X. FLAGGA = sm. PERFORM WRITE_SUMMARY_REPORT. ENDIF. IF P_REP_CS EQ X. FLAGGA = cs. PERFORM WRITE_CUSTOMER_REPORT. ENDIF.END-OF-SELECTION.*---------------------------------------------------------------------** FORM SELECT_DATA_FROM_TABLES **---------------------------------------------------------------------** ........ **---------------------------------------------------------------------*FORM SELECT_DATA_FROM_TABLES. SELECT BELNR GJAHR BLART BLDAT BUDAT XBLNR BKTXT TCODE STBLG STJAH
  3. 3. FROM BKPF INTO CORRESPONDING FIELDS OF LIST2 WHERE BUKRS = P_COMP AND BUDAT IN S_BUDAT AND BLART IN S_DOCTYP AND TCODE IN S_TCODE AND ( TCODE <> FB05 AND TCODE NOT LIKE FBZ% AND TCODE NOT LIKE FB1% ). IF LIST2-TCODE = FB08. "FA19990608 SELECT SINGLE * FROM BKPF WHERE BUKRS = P_COMP AND BELNR = LIST2-STBLG AND GJAHR = LIST2-STJAH AND TCODE = FB01. IF SY-SUBRC NE 0. CONTINUE. ELSE. IF BKPF-BLART EQ A5 OR BKPF-BLART EQ 38. MOVE BKPF-BLART TO LIST2-BLART. ENDIF. ENDIF. ENDIF. "FA19990608 clear: w_lifnr_flag, w_mwskz_flag. SELECT BELNR MWSKZ LIFNR FROM BSEG INTO CORRESPONDING FIELDS OF LIST2 where bukrs eq p_comp and belnr eq list2-belnr and gjahr eq list2-gjahr. IF LIST2-LIFNR IN S_VENDOR AND LIST2-LIFNR NE SPACE. w_lifnr_flag = X. endif. IF LIST2-MWSKZ(1) = C OR LIST2-MWSKZ(1) = R. w_mwskz_flag = X. endif. ENDSELECT. if w_lifnr_flag = X and w_mwskz_flag = X. MOVE LIST2-XBLNR(3) TO LIST2-DOCTYP. IF LIST2-DOCTYP NE FAC AND LIST2-DOCTYP NE NCR AND LIST2-DOCTYP NE NDR AND LIST2-DOCTYP NE BVT AND LIST2-DOCTYP NE RCB AND LIST2-DOCTYP NE PAD AND LIST2-DOCTYP NE NCD AND "FAE200.02.18 LIST2-DOCTYP NE NCC. "FAE200.02.18 MOVE 000 TO LIST2-DOCTYP. ENDIF. append list2. ENDIF. ENDSELECT.ENDFORM.*---------------------------------------------------------------------** FORM ADJUST_TO_REPORT **---------------------------------------------------------------------** ........ **---------------------------------------------------------------------*FORM ADJUST_TO_REPORT. LOOP AT LIST2. MOVE LIST2 TO LIST4. SELECT HWBAS DMBTR HKONT LIFNR MWSKZ SGTXT SHKZG FROM BSEG INTO CORRESPONDING FIELDS OF LIST3 WHERE BUKRS EQ P_COMP AND BELNR = LIST2-BELNR AND GJAHR = LIST2-GJAHR . IF LIST3-SHKZG = H. LIST3-DMBTR = LIST3-DMBTR * -1. ENDIF. IF LIST3-SHKZG = S. LIST3-HWBAS = LIST3-HWBAS * -1. ENDIF. IF LIST4-DOCTYP = RCB AND LIST3-HKONT = 0000255090 AND LIST3-MWSKZ <> R0. LIST3-TOTAL = ( LIST3-HWBAS + LIST3-DMBTR ). MOVE LIST3-TOTAL TO LIST4-TOTAL. ENDIF. IF LIST3-LIFNR NE . MOVE LIST3-MWSKZ TO LIST4-MWSKZ. MOVE LIST3-LIFNR TO LIST4-LIFNR. MOVE LIST3-DMBTR TO LIST4-TOTAL. ENDIF.
  4. 4. IF LIST3-HKONT = 0000264101 OR LIST3-HKONT = 0000255090. MOVE LIST3-HWBAS TO LIST4-HWBAS. ENDIF. IF LIST3-HKONT = 0000264102 OR LIST3-HKONT = 0000255090. MOVE LIST3-DMBTR TO LIST4-RET_OTROS. ELSEIF LIST3-HKONT = 0000264101. MOVE LIST3-DMBTR TO LIST4-IGV. ENDIF.* if ( list3-hkont(8) eq 00001483 or "FAE19990716* list3-hkont(8) eq 00001681 or "FAE19990716* list3-hkont(8) eq 00001689 or "FAE19990716* list3-hkont(8) eq 00005420 or "FAE19990716* list3-hkont(8) eq 00005440 or "FAE19990716* list3-hkont(8) eq 00005511 or "FAE19990716* list3-hkont(8) eq 00005570 or "FAE19990716* list3-hkont(8) eq 00005720 or "FAE19990716* list3-hkont(8) eq 00005932 or "FAE19990716* list3-hkont(8) eq 00006010 or "FAE19990716* list3-hkont(8) eq 00006098 or "FAE19990716* list3-hkont(8) eq 00006110 or "FAE19990716* list3-hkont(8) eq 00006592 or "FAE19990716* list3-hkont(8) eq 00006992 ). "FAE19990716 IF LIST3-HKONT(8) IN R_ACCT. IF LIST3-SGTXT(3) EQ CIF. MOVE LIST3-DMBTR TO LIST4-CIF. ELSEIF LIST3-SGTXT(10) EQ AD-VALOREM. MOVE LIST3-DMBTR TO LIST4-AD_VAL. ELSEIF LIST3-SGTXT(9) EQ REINTEGRO. MOVE LIST3-DMBTR TO LIST4-REINTEGRO. ENDIF. ENDIF. ENDSELECT. IF LIST4-DOCTYP EQ RCB. LIST4-DIF = LIST4-TOTAL - LIST4-HWBAS - LIST4-RET_OTROS + LIST4-IGV. ELSE. LIST4-DIF = LIST4-TOTAL - LIST4-HWBAS + LIST4-RET_OTROS + LIST4-IGV. ENDIF. SELECT NAME1 STCD1 FROM LFA1 INTO CORRESPONDING FIELDS OF LIST4 WHERE LIFNR = LIST4-LIFNR. ENDSELECT. APPEND LIST4. CLEAR LIST4. ENDLOOP. SORT LIST4 BY DOCTYP XBLNR BUDAT BLART.ENDFORM.*&---------------------------------------------------------------------**& Form WRITE_COLUMN_NAME*&---------------------------------------------------------------------** text **----------------------------------------------------------------------** --> p1 text* <-- p2 text*----------------------------------------------------------------------*FORM WRITE_COLUMN_NAME. SKIP. WRITE:/ TEXT-004, 13 TEXT-004, 26 TEXT-007, 58 TEXT-009, 76 TEXT-011, 98 TEXT-013, 116 TEXT-015, 136 TEXT-017, 153 TEXT-019, "total 171 TEXT-020. " origen referencia WRITE:/ TEXT-005, 13 TEXT-006, 26 TEXT-008, 58 TEXT-010, 76 TEXT-012, 98 TEXT-014, 116 TEXT-016, 136 TEXT-018, 153 TEXT-005, 181 TEXT-021. ULINE.ENDFORM. " WRITE_COLUMN_NAME*&---------------------------------------------------------------------**& Form WRITE_DETAILED_REPORT*&---------------------------------------------------------------------** text **----------------------------------------------------------------------** --> p1 text* <-- p2 text*----------------------------------------------------------------------*FORM WRITE_DETAILED_REPORT. DESCRIBE TABLE LIST4 LINES RAD. IF RAD LT 1. MESSAGE E102. ENDIF. CLEAR RAD. NEW-PAGE . REFRESH LIST5.
  5. 5. LOOP AT LIST4 WHERE BLART NE A5 AND BLART NE 38.* if list4-mwskz ne CN. "FAE09071999 MOVE LIST4 TO LIST5. APPEND LIST5.* endif. "FAE09071999 ENDLOOP.*BREAK-POINT. LOOP AT LIST5. CASE LIST5-DOCTYP. WHEN FAC. DOCNAME = TEXT-039. "FAE2000.02.18 WHEN NDR. DOCNAME = TEXT-040. "FAE2000.02.18 WHEN NCR . DOCNAME = TEXT-041. "FAE2000.02.18 WHEN BVT. DOCNAME = TEXT-044. "FAE2000.02.18 WHEN RCB. DOCNAME = TEXT-042. "FAE2000.02.18 WHEN PAD. DOCNAME = TEXT-043. "FAE2000.02.18 WHEN NCD. DOCNAME = TEXT-045. "FAE2000.02.18 WHEN NCC. DOCNAME = TEXT-046. "FAE2000.02.18 WHEN 000. DOCNAME = OTROS. ENDCASE. AT NEW DOCTYP. NEW-PAGE. SAVE_DOCTYP = LIST5-DOCTYP. PERFORM WRITE_GENERAL_TITLE. SKIP. WRITE: /73 TEXT-003, 93 DOCNAME. SKIP . PERFORM WRITE_COLUMN_NAME. ENDAT.DATA: CAD(20) TYPE C, NAN(3) TYPE C, UNE(10) TYPE C.NAN = AÑO.CONCATENATE NAN LIST5-BLDAT+0(4) INTO UNE.CONCATENATE LIST5-NAME1+0(4) UNE INTO CAD SEPARATED BY _. IF LIST5-DOCTYP = SAVE_DOCTYP.* WRITE : / LIST5-XBLNR+4,* 13 LIST5-STCD1,* 26 LIST5-NAME1,* 58 LIST5-BLDAT,* 70 LIST5-HWBAS,* 92 LIST5-DIF,* 111 LIST5-RET_OTROS,* 129 LIST5-IGV,* 148 LIST5-TOTAL,* 171 LIST5-MWSKZ. WRITE : / LIST5-XBLNR+4, 13 LIST5-STCD1, 22 LIST5-NAME1, 58 LIST5-BLDAT, 71 CAD, 93 LIST5-HWBAS, 112 LIST5-DIF, 130 LIST5-RET_OTROS, 149 LIST5-IGV, 172 LIST5-TOTAL, 190 LIST5-MWSKZ. IF ( LIST5-XBLNR(3) EQ NDR OR LIST5-XBLNR(3) EQ NCR ). WRITE: 178 LIST5-BKTXT. ELSEIF LIST5-DOCTYP EQ 000. WRITE: 178 Doc.SAP:, LIST5-BELNR, P_COMP, LIST5-GJAHR. ENDIF. ADD LIST5-HWBAS TO TOTAL_HWBAS. ADD LIST5-DIF TO TOTAL_DIF. ADD LIST5-IGV TO TOTAL_IGV. ADD LIST5-TOTAL TO TOTAL_VENDOR. ADD LIST5-RET_OTROS TO TOTAL_RET_OTROS. ENDIF. AT END OF DOCTYP. SKIP 2. WRITE: /10 TOTAL, DOCNAME, 70 TOTAL_HWBAS, 91 TOTAL_DIF, 111 TOTAL_RET_OTROS, 129 TOTAL_IGV, 148 TOTAL_VENDOR. CLEAR: TOTAL_HWBAS, TOTAL_DIF, TOTAL_RET_OTROS, TOTAL_IGV, TOTAL_VENDOR,
  6. 6. SAVE_DOCTYP. ENDAT. ENDLOOP.ENDFORM. " WRITE_DETAILED_REPORT*&---------------------------------------------------------------------**& Form WRITE_SUMMARY_REPORT*&---------------------------------------------------------------------** text **----------------------------------------------------------------------** --> p1 text* <-- p2 text*----------------------------------------------------------------------*FORM WRITE_SUMMARY_REPORT. NEW-PAGE. DESCRIBE TABLE LIST4 LINES RAD. IF RAD LT 1. MESSAGE E102. ENDIF. PERFORM WRITE_GENERAL_TITLE. WRITE: /87 TEXT-032. SKIP. ULINE. SKIP.WRITE: / TEXT-033, 27 TEXT-034, 52 TEXT-035, 77 TEXT-036, 100 TEXT-037, 125 TEXT-038. SKIP. SORT LIST4 BY DOCTYP. REFRESH LIST5. LOOP AT LIST4 WHERE BLART NE A5 AND BLART NE 38.* if list4-mwskz ne CN. "FAE09071999 MOVE LIST4 TO LIST5. APPEND LIST5.* endif. "FAE09071999 ENDLOOP. LOOP AT LIST5. AT NEW DOCTYP. SAVE_DOCTYP = LIST5-DOCTYP. ENDAT. IF LIST5-DOCTYP EQ SAVE_DOCTYP. MOVE SAVE_DOCTYP TO SAVE_TOTAL_DOCTYP. ADD LIST5-HWBAS TO TOTAL_HWBAS. ADD LIST5-DIF TO TOTAL_DIF. ADD LIST5-IGV TO TOTAL_IGV. ADD LIST5-TOTAL TO TOTAL_VENDOR. ADD LIST5-RET_OTROS TO TOTAL_RET_OTROS. ENDIF. AT END OF DOCTYP. MOVE LIST5-DOCTYP TO TOTAL_LIST-DOCTYP. CASE TOTAL_LIST-DOCTYP. WHEN 000. MOVE TEXT-047 TO TOTAL_LIST-DOCNAME. WHEN FAC. MOVE TEXT-039 TO TOTAL_LIST-DOCNAME. WHEN NDR. MOVE TEXT-040 TO TOTAL_LIST-DOCNAME. WHEN NCR . MOVE TEXT-041 TO TOTAL_LIST-DOCNAME. WHEN BVT. MOVE BOLETA DE VENTA TO TOTAL_LIST-DOCNAME. WHEN RCB. MOVE TEXT-042 TO TOTAL_LIST-DOCNAME. WHEN PAD. MOVE TEXT-043 TO TOTAL_LIST-DOCNAME. WHEN NCD. MOVE TEXT-045 TO TOTAL_LIST-DOCNAME. WHEN NCC. MOVE TEXT-046 TO TOTAL_LIST-DOCNAME. ENDCASE. MOVE TOTAL_HWBAS TO TOTAL_LIST-HWBAS. MOVE TOTAL_DIF TO TOTAL_LIST-DIF. MOVE TOTAL_IGV TO TOTAL_LIST-IGV. MOVE TOTAL_VENDOR TO TOTAL_LIST-VENDOR. MOVE TOTAL_RET_OTROS TO TOTAL_LIST-RET_OTROS. WRITE: /1 TOTAL_LIST-DOCNAME, 25 TOTAL_LIST-HWBAS, 50 TOTAL_LIST-DIF, 75 TOTAL_LIST-RET_OTROS, 100 TOTAL_LIST-IGV,
  7. 7. 125 TOTAL_LIST-VENDOR. APPEND TOTAL_LIST. CLEAR: TOTAL_HWBAS, TOTAL_DIF, TOTAL_RET_OTROS, TOTAL_IGV, TOTAL_VENDOR. ENDAT. ENDLOOP. " loop at list5 LOOP AT TOTAL_LIST. AT LAST. SUM. SKIP. WRITE: / TEXT-050, 25 TOTAL_LIST-HWBAS, 50 TOTAL_LIST-DIF, 75 TOTAL_LIST-RET_OTROS, 100 TOTAL_LIST-IGV, 125 TOTAL_LIST-VENDOR. ENDAT. ENDLOOP. SKIP 2.ENDFORM. " WRITE_SUMMARY_REPORT*&---------------------------------------------------------------------**& Form WRITE_CUSTOMER_REPORT*&---------------------------------------------------------------------** text **----------------------------------------------------------------------** --> p1 text* <-- p2 text*----------------------------------------------------------------------*FORM WRITE_CUSTOMER_REPORT. SORT LIST4 BY BLART. NEW-PAGE. LOOP AT LIST4 WHERE BLART = A5 OR BLART = 38. WRITE: / LIST4-BKTXT+4, 30 LIST4-NAME1, 65 LIST4-XBLNR, 85 LIST4-BLDAT, 95 LIST4-CIF, 114 LIST4-AD_VAL, 135 LIST4-RET_OTROS, 155 LIST4-IGV, 175 LIST4-REINTEGRO, 195 LIST4-TOTAL. ADD LIST4-CIF TO TOTAL_CIF. ADD LIST4-AD_VAL TO TOTAL_AD_VAL. ADD LIST4-IGV TO TOTAL_IGV. ADD LIST4-TOTAL TO TOTAL_VENDOR. ADD LIST4-REINTEGRO TO TOTAL_REINTEGRO. ADD LIST4-RET_OTROS TO TOTAL_RET_OTROS. ENDLOOP. SKIP. WRITE: /20 TOTAL COMPANIA:, 95 TOTAL_CIF, 115 TOTAL_AD_VAL, 135 TOTAL_RET_OTROS, 155 TOTAL_IGV, 175 TOTAL_REINTEGRO, 195 TOTAL_VENDOR. SKIP.ENDFORM. " WRITE_CUSTOMER_REPORT*&---------------------------------------------------------------------**& Form WRITE_GENERAL_TITLE*&---------------------------------------------------------------------** text **----------------------------------------------------------------------** --> p1 text* <-- p2 text*----------------------------------------------------------------------*FORM WRITE_GENERAL_TITLE. SKIP TO LINE 2. WRITE : /73 TEXT-002, S_BUDAT-LOW. IF S_BUDAT-HIGH IS INITIAL. ELSE. WRITE: AL . WRITE: S_BUDAT-HIGH. ENDIF.ENDFORM. " WRITE_GENERAL_TITLE*&---------------------------------------------------------------------**& Form WRITE_COLUMN_REP2
  8. 8. *&---------------------------------------------------------------------** text **----------------------------------------------------------------------** --> p1 text* <-- p2 text*----------------------------------------------------------------------*FORM WRITE_COLUMN_REP2. WRITE: / TEXT-004, 30 TEXT-007, 65 TEXT-004, 143 TEXT-024, 204 TEXT-019. WRITE:/ TEXT-025, 30 TEXT-008, 65 TEXT-027, 85 TEXT-009, 105 TEXT-028, 119 TEXT-029, 143 TEXT-030, 165 TEXT-017, 181 TEXT-031, 204 TEXT-027. ULINE.ENDFORM. " WRITE_COLUMN_REP2**********************************************************************TOP-OF-PAGE. SKIP TO LINE 2. WRITE : /177 PAG. : , SY-PAGNO. WRITE : /177 FECHA: , SY-DATUM. WRITE : /177 HORA : , SY-UZEIT. SKIP. CASE FLAGGA. WHEN cs . SKIP TO LINE 2. PERFORM WRITE_GENERAL_TITLE. SKIP. WRITE: /73 TEXT-023. SKIP. PERFORM WRITE_COLUMN_REP2. WHEN dt. SKIP TO LINE 2. PERFORM WRITE_GENERAL_TITLE. SKIP. WRITE: /73 TEXT-003, 93 DOCNAME. SKIP. PERFORM WRITE_COLUMN_NAME.ENDCASE.DOCUMENTANDO:LISTA4: ES UNA TABLA QUE CONTIEN UNA ETSRUCTURA LLAMADA LIST2 TAL COMO SE MUESTRA EN EL CODIGO. DATA: BEGIN OF LIST4 OCCURS 0. INCLUDE STRUCTURE LIST2. DATA: END OF LIST4.LOS CAMPOS QUE TIENE LA ESTARUCTURA LIST2 INCLUDIA EN LA TABLA LISTA4 SON: DATA: BEGIN OF LIST2 OCCURS 0, DOCTYP(3) TYPE C, BELNR LIKE BKPF-BELNR, GJAHR LIKE BKPF-GJAHR, BLART LIKE BKPF-BLART, BLDAT LIKE BKPF-BLDAT, BUDAT LIKE BKPF-BUDAT, XBLNR LIKE BKPF-XBLNR, BKTXT LIKE BKPF-BKTXT, SHKZG LIKE BSEG-SHKZG, HWBAS LIKE BSEG-HWBAS, RET_OTROS LIKE BSEG-DMBTR, IGV LIKE BSEG-DMBTR, TOTAL LIKE BSEG-DMBTR, DIF LIKE BSEG-DMBTR, HKONT LIKE BSEG-HKONT, LIFNR LIKE BSEG-LIFNR, MWSKZ LIKE BSEG-MWSKZ, STCD1 LIKE LFA1-STCD1, NAME1 LIKE LFA1-NAME1, CIF LIKE BSEG-DMBTR, AD_VAL LIKE BSEG-DMBTR, REINTEGRO LIKE BSEG-DMBTR,
  9. 9. TCODE LIKE BKPF-TCODE, STBLG LIKE BKPF-STBLG, STJAH LIKE BKPF-STJAH, END OF LIST2.EN EL REPORTE DE COMRPAS QUE SE MUESTRA TENEMOS LOS SIGUIENTES CAMPOSCOMO SON POR ORDEN DE IZQUIERDA A DERECHA LOS SGTES: • LIST5-STCD1: HEREDA DE LFA1-STCD1 STCD1 ES UN CAMPO QUE ES EXTRAIDO DE LA TABLA LFA1 Y DEL CAMPO STCD1, LFA1 ES LA TABLA MAESTRA DE PROVEEDORES Y STCD1 ALMACENA EL NUMERO DE IDENTIFICACION FISCAL. • LIST5-NAME1: HEREDA DE LFA1-NAME1 NAME1 ES UN CAMPO QUE ES EXTRAIDO DE LA TABLA LFA1 Y DEL CAMPO NAME1, LFA1 ES LA TABLA MAESTRA DE PROVEEDORES Y NAME1 ALMACENA EL NOMBRE DEL PROVEEDOR. • LIST5-BLDAT: HEREDA DE BKPF-BLDAT BLDAT ES UN CAMPO QUE ES EXTRAIDO DE LA TABLA BKPF Y DEL CAMPO BLDAT, BKPF ES LA TABLA DE CABECERA DEL DOCUMENTO DE CONTABLIDAD Y BLDAT ES EL CAMPO QUE ALMACENA LA FECHA DEL DOCUMENTO. • LIST5-HWBAS: HEREDA DE LIKE BSEG-HWBAS HWBAS ES UN CAMPO QUE ES EXTRAIDO DE LA TABLA BSEG Y DEL CAMPO HWBAS, BSEG ES LA TABLA DE DETALLE DEL DOCUMENTO DE CONTABLIDAD Y HWBAS ES EL CAMPO QUE ALMACENA IMPORTE BASE DEL IMPUESTO EN MONEDA LOCAL. • LIST5-DIF: HEREDA DE LIKE BSEG-DMBTR DMBTR ES UN CAMPO QUE ES EXTRAIDO DE LA TABLA BSEG Y DEL CAMPO DMBTR, BSEG ES LA TABLA DE DETALLE DEL DOCUMENTO DE CONTABLIDAD Y DMBTR ES EL CAMPO QUE ALMACENA IMPORTE BASE DEL IMPUESTO EN MONEDA LOCAL. • LIST5-RET_OTROS: HEREDA DE LIKE BSEG-DMBTR DMBTR ES UN CAMPO QUE ES EXTRAIDO DE LA TABLA BSEG Y DEL CAMPO DMBTR, BSEG ES LA TABLA DE DETALLE DEL DOCUMENTO DE CONTABLIDAD Y DMBTR ES EL CAMPO QUE ALMACENA IMPORTE BASE DEL IMPUESTO EN MONEDA LOCAL. • LIST5-IGV: HEREDA DE LIKE BSEG-DMBTR DMBTR ES UN CAMPO QUE ES EXTRAIDO DE LA TABLA BSEG Y DEL CAMPO DMBTR, BSEG ES LA TABLA DE DETALLE DEL DOCUMENTO DE CONTABLIDAD Y DMBTR ES EL CAMPO QUE ALMACENA IMPORTE BASE DEL IMPUESTO EN MONEDA LOCAL. • LIST5-TOTAL: HEREDA DE LIKE BSEG-DMBTR DMBTR ES UN CAMPO QUE ES EXTRAIDO DE LA TABLA BSEG Y DEL CAMPO DMBTR, BSEG ES LA TABLA DE DETALLE DEL DOCUMENTO DE CONTABLIDAD Y
  10. 10. DMBTR ES EL CAMPO QUE ALMACENA IMPORTE BASE DEL IMPUESTO EN MONEDA LOCAL.• LIST5-MWSKZ: HEREDA DE LIKE BSEG-MWSKZ MWSKZ ES UN CAMPO QUE ES EXTRAIDO DE LA TABAL BSEG Y DEL CAMPO MWSKZ, BSEG ES LA TABLA DE DETALLE DEL DOCUMENTO DE CONTABLIDAD Y DMBTR ES EL CAMPO QUE ALMACENA EL INDICADOR IVA.

×