on 01-23-2008 8:26 AM
Hi Experts
Could you please send me some report some report coding ?
(For tax e.g Tax and VAT)
I have gone through the wiki.
But I could not able to find the exact result
Points will be rewarded
Thanks
Raziq
Hi Raziq,
Try this vat report.
G/L Account Line Item and Vendor Details - G/L Account Numberand Proit Center
*as an input and Output as G/L Account Number,Profit Center,Vendor Number,
*Vendor Name,Purchase Doc No.,Reference Number,Document Number,Document Date,
*Poasting Date,Amount and Text.
************************************************************************
TABLE DECLARATIONS
*
************************************************************************
TABLES: BSIS,
EKKO,
LFA1,
BSIP.
************************************************************************
DATA DECLARATIONS
*
************************************************************************
DATA: V_FLAG,
V_DATA(50).
DATA: L_REPID LIKE SY-REPID.
************************************************************************
INTERNAL TABLES DECLARATIONS
*
************************************************************************
TYPES: BEGIN OF T_BSIS,
bldat LIKE BSIS-bldat,
budat LIKE BSIS-budat,
xblnr LIKE BSIS-xblnr,
belnr LIKE BSIS-belnr,
BUKRS LIKE BSIS-BUKRS,
GJAHR like BSIS-GJAHR,
hkont like bsis-hkont,
PRCTR LIKE BSIS-PRCTR,
WRBTR LIKE BSIS-WRBTR,
SGTXT LIKE BSIS-SGTXT,
bschl like bsis-bschl,
END OF T_BSIS.
TYPES: BEGIN OF T_BSEG,
lifnr LIKE bseg-lifnr,
PRCTR LIKE BSEG-PRCTR,
wrbtr LIKE bseg-wrbtr,
sgtxt LIKE bseg-sgtxt,
belnr LIKE BSEG-belnr,
HKONT LIKE BSEG-HKONT,
SAKNR LIKE BSEG-SAKNR,
BUKRS LIKE BSEG-BUKRS,
bschl like bseg-bschl,
SHKZG LIKE BSEG-SHKZG,
ZUONR like BSEG-ZUONR,
MWSKZ LIKE BSEG-MWSKZ,
GJAHR like BSEG-GJAHR,
AUGDT like bseg-AUGDT,
END OF T_BSEG.
TYPES: BEGIN OF T_LFC1,
LIFNR LIKE LFC1-LIFNR,
BUKRS LIKE LFC1-BUKRS,
GJAHR like LFC1-GJAHR,
END OF T_LFC1.
TYPES: BEGIN OF T_LFA1,
lifnr LIKE LFA1-lifnr,
NAME1 LIKE LFA1-NAME1,
END OF T_LFA1.
TYPES: BEGIN OF T_EKKO,
LIFNR LIKE EKKO-LIFNR,
EBELN LIKE EKKO-EBELN,
END OF T_EKKO.
TYPES: BEGIN OF T_BSIP,
LIFNR LIKE BSIP-LIFNR,
BELNR LIKE BSIP-BELNR,
SHKZG LIKE BSIP-SHKZG,
BUKRS LIKE BSIP-BUKRS,
xblnr LIKE BSIP-xblnr,
GJAHR like bsip-GJAHR,
END OF T_BSIP.
TYPES: BEGIN OF t_final,
bldat LIKE bkpf-bldat,
budat LIKE bkpf-budat,
xblnr LIKE bkpf-xblnr,
belnr LIKE bkpf-belnr,
lifnr LIKE bseg-lifnr,
PRCTR LIKE BSEG-PRCTR,
wrbtr LIKE bseg-wrbtr,
sgtxt LIKE bseg-sgtxt,
SAKNR LIKE BSEG-SAKNR,
HKONT LIKE BSEG-HKONT,
GJAHR like bseg-GJAHR,
AUGDT like bseg-AUGDT,
NAME1 LIKE LFA1-NAME1,
SHKZG LIKE BSIP-SHKZG,
BUKRS LIKE BSIP-BUKRS,
wrbtr1 LIKE bseg-wrbtr,
bschl like bseg-bschl,
ZUONR like BSEG-ZUONR,
MWSKZ LIKE BSEG-MWSKZ,
EBELN LIKE EKKO-EBELN,
END OF t_final.
DATA: IT_bseg TYPE STANDARD TABLE OF T_bseg INITIAL SIZE 0 WITH HEADER LINE,
WA_bseg TYPE T_bseg.
DATA: IT_BSIS TYPE STANDARD TABLE OF T_BSIS INITIAL SIZE 0 WITH HEADER LINE,
WA_BSIS TYPE T_BSIS .
DATA: IT_LFC1 TYPE STANDARD TABLE OF T_LFC1 INITIAL SIZE 0 WITH HEADER LINE,
WA_LFC1 TYPE T_LFC1 .
DATA: IT_EKKO TYPE STANDARD TABLE OF T_EKKO INITIAL SIZE 0 WITH HEADER LINE,
WA_EKKO TYPE T_EKKO .
DATA: IT_LFA1 TYPE STANDARD TABLE OF T_LFA1 INITIAL SIZE 0,
WA_LFA1 TYPE T_LFA1 .
DATA: IT_BSIP TYPE STANDARD TABLE OF T_BSIP INITIAL SIZE 0 WITH HEADER LINE,
WA_BSIP TYPE T_BSIP.
DATA: IT_FINAL TYPE STANDARD TABLE OF T_FINAL INITIAL SIZE 0,
WA_FINAL TYPE T_FINAL, wa_fintemp TYPE t_final .
DATA: vr_ndet TYPE i.
************************************************************************
TYPE DECLARATIONS FOR ALV
*
************************************************************************
TYPE-POOLS : SLIS.
*Type Declarations for Field Catalog
DATA : I_FLDCAT_HEAD TYPE SLIS_T_FIELDCAT_ALV,
WA_FLDCAT_HEAD TYPE SLIS_FIELDCAT_ALV.
*Type Declarations for ALV Events
DATA : I_EVENTS TYPE SLIS_T_EVENT,
WA_EVENT LIKE LINE OF I_EVENTS.
*Type Declarations for Layout Design
DATA : WA_LAYOUT TYPE SLIS_LAYOUT_ALV.
*Type Declarations for Sorting Fields
DATA: IT_SORT TYPE SLIS_SORTINFO_ALV OCCURS 0 WITH HEADER LINE.
*Type Declarations for Displaying Images on Grid
DATA : I_COMMENT TYPE SLIS_T_LISTHEADER,
WA_COMMENT TYPE SLIS_LISTHEADER.
*Type Declarations for Grouping fields
DATA : WA_GROUP TYPE SLIS_SP_GROUP_ALV,
I_GROUP TYPE SLIS_T_SP_GROUP_ALV.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS: S_HKONT FOR BSIS-HKONT OBLIGATORY .
SELECT-OPTIONS: S_budat FOR BSIS-budat OBLIGATORY.
SELECTION-SCREEN END OF BLOCK B1.
************************************************************************
Event INITIALIZATION
*
************************************************************************
INITIALIZATION.
MOVE 'Developed by'(020) TO V_DATA.
************************************************************************
Event START-OF-SELECTION
*
************************************************************************
START-OF-SELECTION.
PERFORM GET_DATA.
PERFORM GENERATE_LAYOUT.
PERFORM GENERATE_EVENTS.
PERFORM GENERATE_FLDCAT.
PERFORM DISPLAY_REPORT.
&----
*& Form GET_DATA
&----
Getting the Needed Data
----
FORM GET_DATA .
SELECT BLDAT BUDAT XBLNR BELNR BUKRS GJAHR HKONT PRCTR WRBTR SGTXT BSCHL
FROM BSIS INTO TABLE IT_BSIS
where BUDAT IN S_BUDAT AND HKONT IN S_HKONT.
SELECT LIFNR BUKRS GJAHR
FROM LFC1 INTO TABLE IT_LFC1
FOR ALL ENTRIES IN IT_BSIS
WHERE bukrs EQ IT_BSIS-bukrs .
SELECT LIFNR EBELN
FROM EKKO INTO TABLE IT_EKKO
FOR ALL ENTRIES IN IT_BSIP
WHERE LIFNR EQ IT_BSIP-LIFNR .
SELECT LIFNR BELNR SHKZG BUKRS XBLNR
FROM BSIP INTO TABLE IT_BSIP
FOR ALL ENTRIES IN IT_BSIS
WHERE BELNR EQ IT_BSIS-BELNR .
IF SY-SUBRC EQ 0.
SELECT LIFNR NAME1 FROM LFA1
INTO TABLE IT_LFA1
FOR ALL ENTRIES IN IT_BSIP
where LIFNR EQ IT_BSIP-LIFNR.
ENDIF.
loop at it_BSIS into wa_BSIS .
MOVE WA_BSIS-BELNR TO WA_FINAL-BELNR.
MOVE WA_BSIS-HKONT TO WA_FINAL-HKONT.
MOVE WA_BSIS-SGTXT TO WA_FINAL-SGTXT.
MOVE WA_BSIS-BSCHL TO WA_FINAL-BSCHL.
MOVE WA_BSIS-PRCTR TO WA_FINAL-PRCTR.
MOVE WA_BSIS-WRBTR TO WA_FINAL-WRBTR.
MOVE WA_BSIS-BLDAT TO WA_FINAL-BLDAT.
MOVE WA_BSIS-BUDAT TO WA_FINAL-BUDAT.
READ TABLE IT_BSIP INTO WA_BSIP WITH KEY BELNR = WA_BSIS-BELNR.
MOVE WA_BSIP-XBLNR TO WA_FINAL-XBLNR.
READ TABLE IT_LFC1 INTO WA_LFC1 WITH KEY BUKRS = WA_BSIS-BUKRS.
LOOP AT it_BSIP INTO wa_BSIP where BELNR eq wa_BSIS-BELNR.
READ TABLE IT_LFA1 INTO WA_LFA1 WITH KEY LIFNR = WA_BSIP-LIFNR .
MOVE WA_LFA1-LIFNR TO WA_FINAL-LIFNR.
MOVE WA_LFA1-NAME1 TO WA_FINAL-NAME1.
READ TABLE IT_EKKO INTO WA_EKKO WITH KEY LIFNR = WA_BSIP-LIFNR.
MOVE WA_EKKO-EBELN TO WA_FINAL-EBELN.
endloop.
APPEND WA_FINAL TO IT_FINAL .
endloop.
LOOP AT it_final INTO wa_final.
if wa_final-budat eq '00000000' .
delete it_final .
endif.
IF wa_final-bschl eq '50'.
wa_final-wrbtr = -1 * wa_final-wrbtr.
READ TABLE it_final INTO wa_fintemp from wa_final .
MOVE wa_final-wrbtr TO wa_final-wrbtr.
MODIFY it_final from wa_final.
endif.
endloop.
ENDFORM. " GET_DATA
&----
*& Form GENERATE_LAYOUT
&----
Generating the Layout
----
FORM GENERATE_LAYOUT .
WA_LAYOUT-COLWIDTH_OPTIMIZE = 'X'. "OPTIMIZING FIELD WIDTH
WA_LAYOUT-ZEBRA = 'X'. "PUTTING ZEBRA COLORS
WA_LAYOUT-CONFIRMATION_PROMPT = 'X'. "DISPLAYS CONFIRMATION
EXIT.
WA_LAYOUT-INFO_FIELDNAME = 'COLOR'(017). "APPLYING COLORS TO ROWS
ENDFORM. " GENERATE_LAYOUT
&----
*& Form GENERATE_EVENTS
&----
Generating the ALV Events
----
FORM GENERATE_EVENTS .
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = I_EVENTS
EXCEPTIONS
LIST_TYPE_WRONG = 1
OTHERS = 2
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
IF NOT I_EVENTS[] IS INITIAL.
READ TABLE I_EVENTS INTO WA_EVENT WITH KEY NAME = 'TOP_OF_PAGE'.
WA_EVENT-FORM = 'GENERATE_USERCOMMAND'.
MODIFY I_EVENTS FROM WA_EVENT INDEX SY-TABIX.
ENDIF.
ENDFORM. " GENERATE_EVENTS
&----
*& Form GENERATE_FLDCAT
&----
Generating the field catalog
----
FORM GENERATE_FLDCAT .
WA_FLDCAT_HEAD-FIELDNAME = 'HKONT'(003).
WA_FLDCAT_HEAD-COL_POS = '1'.
WA_FLDCAT_HEAD-JUST = 'C'.
WA_FLDCAT_HEAD-OUTPUTLEN = '18'.
WA_FLDCAT_HEAD-SELTEXT_M = 'G/L Account'(004).
WA_FLDCAT_HEAD-DDICTXT = 'M'.
WA_FLDCAT_HEAD-REF_TABNAME = ' '.
APPEND WA_FLDCAT_HEAD TO I_FLDCAT_HEAD.
WA_FLDCAT_HEAD-FIELDNAME = 'PRCTR'(003).
WA_FLDCAT_HEAD-COL_POS = '1'.
WA_FLDCAT_HEAD-JUST = 'C'.
WA_FLDCAT_HEAD-OUTPUTLEN = '18'.
WA_FLDCAT_HEAD-SELTEXT_M = 'Profit Center'(004).
WA_FLDCAT_HEAD-DDICTXT = 'M'.
WA_FLDCAT_HEAD-REF_TABNAME = ' '.
APPEND WA_FLDCAT_HEAD TO I_FLDCAT_HEAD.
WA_FLDCAT_HEAD-FIELDNAME = 'LIFNR'(003).
WA_FLDCAT_HEAD-COL_POS = '1'.
WA_FLDCAT_HEAD-JUST = 'C'.
WA_FLDCAT_HEAD-OUTPUTLEN = '18'.
WA_FLDCAT_HEAD-SELTEXT_M = 'Vendor No'(004).
WA_FLDCAT_HEAD-DDICTXT = 'M'.
WA_FLDCAT_HEAD-REF_TABNAME = ' '.
APPEND WA_FLDCAT_HEAD TO I_FLDCAT_HEAD.
WA_FLDCAT_HEAD-FIELDNAME = 'NAME1'(003).
WA_FLDCAT_HEAD-COL_POS = '1'.
WA_FLDCAT_HEAD-JUST = 'C'.
WA_FLDCAT_HEAD-OUTPUTLEN = '18'.
WA_FLDCAT_HEAD-SELTEXT_M = 'Vendor Name'(004).
WA_FLDCAT_HEAD-DDICTXT = 'M'.
WA_FLDCAT_HEAD-REF_TABNAME = ' '.
APPEND WA_FLDCAT_HEAD TO I_FLDCAT_HEAD.
WA_FLDCAT_HEAD-FIELDNAME = 'EBELN'(003).
WA_FLDCAT_HEAD-COL_POS = '1'.
WA_FLDCAT_HEAD-JUST = 'C'.
WA_FLDCAT_HEAD-OUTPUTLEN = '18'.
WA_FLDCAT_HEAD-SELTEXT_M = 'Purchace Doc No.'(004).
WA_FLDCAT_HEAD-DDICTXT = 'M'.
WA_FLDCAT_HEAD-REF_TABNAME = ' '.
APPEND WA_FLDCAT_HEAD TO I_FLDCAT_HEAD.
WA_FLDCAT_HEAD-FIELDNAME = 'XBLNR'(003).
WA_FLDCAT_HEAD-COL_POS = '1'.
WA_FLDCAT_HEAD-JUST = 'C'.
WA_FLDCAT_HEAD-OUTPUTLEN = '18'.
WA_FLDCAT_HEAD-SELTEXT_M = 'Reference No'(004).
WA_FLDCAT_HEAD-DDICTXT = 'M'.
WA_FLDCAT_HEAD-REF_TABNAME = ' '.
APPEND WA_FLDCAT_HEAD TO I_FLDCAT_HEAD.
WA_FLDCAT_HEAD-FIELDNAME = 'BELNR'(003).
WA_FLDCAT_HEAD-COL_POS = '1'.
WA_FLDCAT_HEAD-JUST = 'C'.
WA_FLDCAT_HEAD-OUTPUTLEN = '18'.
WA_FLDCAT_HEAD-SELTEXT_M = 'Doc No'(004).
WA_FLDCAT_HEAD-DDICTXT = 'M'.
WA_FLDCAT_HEAD-REF_TABNAME = ' '.
APPEND WA_FLDCAT_HEAD TO I_FLDCAT_HEAD.
WA_FLDCAT_HEAD-FIELDNAME = 'BLDAT'(003).
WA_FLDCAT_HEAD-COL_POS = '1'.
WA_FLDCAT_HEAD-JUST = 'C'.
WA_FLDCAT_HEAD-OUTPUTLEN = '18'.
WA_FLDCAT_HEAD-SELTEXT_M = 'Doc Date'(004).
WA_FLDCAT_HEAD-DDICTXT = 'M'.
WA_FLDCAT_HEAD-REF_TABNAME = ' '.
APPEND WA_FLDCAT_HEAD TO I_FLDCAT_HEAD.
WA_FLDCAT_HEAD-FIELDNAME = 'BUDAT'(003).
WA_FLDCAT_HEAD-COL_POS = '1'.
WA_FLDCAT_HEAD-JUST = 'C'.
WA_FLDCAT_HEAD-OUTPUTLEN = '18'.
WA_FLDCAT_HEAD-SELTEXT_M = 'Pos Date'(004).
WA_FLDCAT_HEAD-DDICTXT = 'M'.
WA_FLDCAT_HEAD-REF_TABNAME = ' '.
APPEND WA_FLDCAT_HEAD TO I_FLDCAT_HEAD.
WA_FLDCAT_HEAD-FIELDNAME = 'WRBTR'(003).
WA_FLDCAT_HEAD-COL_POS = '1'.
WA_FLDCAT_HEAD-JUST = 'C'.
WA_FLDCAT_HEAD-OUTPUTLEN = '18'.
WA_FLDCAT_HEAD-SELTEXT_M = 'Amount'(004).
WA_FLDCAT_HEAD-DDICTXT = 'M'.
WA_FLDCAT_HEAD-REF_TABNAME = ' '.
APPEND WA_FLDCAT_HEAD TO I_FLDCAT_HEAD.
WA_FLDCAT_HEAD-FIELDNAME = 'SGTXT'(003).
WA_FLDCAT_HEAD-COL_POS = '1'.
WA_FLDCAT_HEAD-JUST = 'C'.
WA_FLDCAT_HEAD-OUTPUTLEN = '18'.
WA_FLDCAT_HEAD-SELTEXT_M = 'Text'(004).
WA_FLDCAT_HEAD-DDICTXT = 'M'.
WA_FLDCAT_HEAD-REF_TABNAME = ' '.
APPEND WA_FLDCAT_HEAD TO I_FLDCAT_HEAD.
ENDFORM. " GENERATE_FLDCAT
&----
*& Form DISPLAY_REPORT
&----
Generating the ALV Grid
----
FORM DISPLAY_REPORT .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER = ' '
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = 'ZFIGLS6514'
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = 'GENERATE_USERCOMMAND'
I_CALLBACK_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = 'gealogo.gif'
I_GRID_TITLE = ''
I_GRID_SETTINGS =
IS_LAYOUT = WA_LAYOUT
IT_FIELDCAT = I_FLDCAT_HEAD
IT_EXCLUDING =
IT_SPECIAL_GROUPS = I_GROUP
IT_SORT = IT_SORT[]
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_EVENTS = I_EVENTS
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IT_ALV_GRAPHICS =
IT_HYPERLINK =
IT_ADD_FIELDCAT =
IT_EXCEPT_QINFO =
I_HTML_HEIGHT_TOP =
I_HTML_HEIGHT_END =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = IT_FINAL
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " DISPLAY_REPORT
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi Dv ns
Thanks
I have worked out the pgm
I have few query
I have modified the select-option to profit centre(PRCRT)
but u have mention as BUDAT. Is it ok ?
And the other question
What is the logic beside this***
LOOP AT it_final INTO wa_final.
if wa_final-budat eq '00000000' .
delete it_final .
endif.
IF wa_final-bschl eq '50'.
wa_final-wrbtr = -1 * wa_final-wrbtr.
READ TABLE it_final INTO wa_fintemp from wa_final .
MOVE wa_final-wrbtr TO wa_final-wrbtr.
MODIFY it_final from wa_final.
endif.
endloop.
I don't find any difference even after commenting this what's the use of this ***
WA_LAYOUT-CONFIRMATION_PROMPT = 'X'. "DISPLAYS CONFIRMATION
EXIT.
WA_LAYOUT-INFO_FIELDNAME = 'COLOR'(017). "APPLYING COLORS TO ROWS
Please reply this qurey
For sure I will reward you points
Thanks
Raziq
Function Modules for Tax Calculation:
CALCULATE_TAX_FROM_GROSSAMOUNT
CALCULATE_TAX_FROM_NET_AMOUNT
CALCULATE_TAX_DOCUMENT_START
CALCULATE_TAXES_GROSS
CALCULATE_TAX_DOCUMENT
all these are related to tax which is available in functiongroup TAX1
Check this report for service tax
&----
*& Report ZFIRP00001_NEW *
*& *
&----
*& *
*& *
&----
REPORT ZFIRP00001_NEW no standard page heading line-size 250.
Tables : BSIK,BSAK,bkpf,bseg,skat,LFA1,adrc.
data : int_bsik like bsik occurs 0 with header line. "open item
data : int_bsak like bsak occurs 0 with header line. "clear item
data : int_bsak_n like bsak occurs 0 with header line. "clear item
data : int_bsak_all like bsak occurs 0 with header line.
types : begin of ty_invoice,
bukrs like bsak-bukrs,
ind, " indicator C-Clear,O-Open
lifnr like bsak-lifnr,
name1 like LFA1-name1,
name2 like adrc-addrnumber,
street like adrc-street,
street1 like adrc-str_suppl1,
street2 like adrc-str_suppl2,
city1 like adrc-city1,
belnr like bsak-belnr, "document no
augbl like bsak-augbl, "clearing document
rebzg like bsak-rebzg, "invoice no
augdt like bsak-augdt,
gjahr like bsak-gjahr,
rev, "Reversal
shkzg like bsak-shkzg, "debit/credit ind.
dmbtr like bsak-dmbtr, "document amount
idmbtr like bsak-dmbtr, "invoice amount
itax like bsak-dmbtr, "invoice tax,
icess like bsak-dmbtr, "invocie cess.
ihkont like bseg-hkont, "g/L account
txt50 like skat-txt50, "g/L account Text
ptax like bsak-dmbtr,
pcess like bsak-dmbtr,
rem_dmbtr like bsak-dmbtr," Remain document amount
com_dmbtr like bsak-dmbtr," Combine document amount
ori , " Original invoice
ibudat like bsak-budat, "invoice posting date
pbudat like bsak-budat, "payment posting date
end of ty_invoice.
data : int_invoice_out type ty_invoice occurs 0.
data : begin of int_invoice occurs 0,
bukrs like bsak-bukrs,
ind, " indicator C-Clear,O-Open
lifnr like bsak-lifnr,
name1 like LFA1-name1,
name2 like adrc-addrnumber,
street like adrc-street,
street1 like adrc-str_suppl1,
street2 like adrc-str_suppl2,
city1 like adrc-city1,
belnr like bsak-belnr, "document no
augbl like bsak-augbl, "clearing document
rebzg like bsak-rebzg, "invoice no
augdt like bsak-augdt,
gjahr like bsak-gjahr,
rev, "Reversal
shkzg like bsak-shkzg, "debit/credit ind.
dmbtr like bsak-dmbtr, "document amount
idmbtr like bsak-dmbtr, "invoice amount
itax like bsak-dmbtr, "invoice tax,
icess like bsak-dmbtr, "invocie cess.
ihkont like bseg-hkont, "g/L account
txt50 like skat-txt50, "g/L account Text
ptax like bsak-dmbtr,
pcess like bsak-dmbtr,
rem_dmbtr like bsak-dmbtr," Remain document amount
com_dmbtr like bsak-dmbtr," Combine document amount
ori, "Original invoice
ibudat like bsak-budat, "invoice posting date
pbudat like bsak-budat. "payment posting date
data : end of int_invoice.
data : int_invoice_temp like int_invoice occurs 0 with header line.
data : begin of int_clear occurs 0,
augbl like bsak-augbl,
dmbtr like bsak-dmbtr, "clear document amount
cdmbr like bsak-dmbtr. "total invoice amount
data : end of int_clear.
data : begin of int_temp occurs 0.
include structure int_bsak.
data : flag,
ibudat like bsak-budat.
data : end of int_temp.
data : int_full like int_Temp occurs 0 with header line.
Total Payment befor given period
data : begin of int_pay occurs 0,
rebzg like bsak-rebzg,
dmbtr like bsak-dmbtr.
data : end of int_pay.
ranges : mwskz for bseg-mwskz.
data : ws_date_1(10),ws_date_2(10).
Variables for Grid
data : wc_container type ref to cl_gui_custom_container,
grid1 type ref to cl_gui_alv_grid,
g_repid like sy-repid,
gs_print type lvc_s_prnt,
gs_sort type lvc_t_sort,
gs_layout type lvc_s_layo,
gs_fcatalog type lvc_s_fcat occurs 0,
ok_code like sy-ucomm.
*
data: v_addrnr like lfa1-adrnr.
****
selection-screen : begin of block b1 with frame title text-000.
parameter : bukrs like bsik-bukrs obligatory.
select-options : budat for bsik-budat obligatory no-extension,
lifnr for bsik-lifnr.
selection-screen : end of block b1.
start-of-selection.
perform f0000_read_data.
*perform f0000_read_invoice.
perform f0000_read_invoice_new.
perform f0000_disp_invoice.
&----
*& Form f0000_read_data
&----
FORM f0000_read_data .
Tax code harcoded
mwskz-low = '00'. "b1
mwskz-high = 'ZZ'. "bz
mwskz-option = 'BT'.
mwskz-sign = 'I'.
append mwskz.
loop at budat.
if budat-high is initial.
budat-high = budat-low.
modify budat.
endif.
endloop.
Read Open Item
select * into corresponding fields of table int_bsik
from bsik
where budat in budat
and bukrs = bukrs
and lifnr in lifnr
and blart not in ('KR','RE').
select * into corresponding fields of table int_bsak
from bsak
where bukrs = bukrs
and lifnr in lifnr
and mwskz in mwskz.
loop at int_bsak.
select * appending corresponding fields of table int_temp
from bsak
where ( augdt in budat or budat in budat )
and bukrs = bukrs
and lifnr in lifnr
and ( augbl = int_bsak-augbl or rebzg = int_bsak-belnr )
and belnr int_bsak-belnr.
if int_bsak-budat not in budat.
continue.
else.
if int_bsak-rebzg is initial and
int_bsak-rebzt is initial.
int_bsak-rebzg = int_bsak-belnr.
modify int_bsak.
endif.
move-corresponding int_bsak to int_bsak_n.
append int_bsak_n.
clear int_bsak_n.
endif.
endloop.
sort int_Temp by rebzg belnr buzei.
delete adjacent duplicates from int_temp.
int_bsak_all] = int_bsak[.
int_bsak] = int_bsak_n[.
loop at int_temp.
if int_temp-rebzg is initial and int_temp-rebzt is initial.
int_temp-rebzg = int_temp-belnr.
modify int_temp.
endif.
endloop.
ENDFORM. " f0000_read_data
FORM f0000_disp_invoice .
call screen '100'.
ENDFORM. " f0000_disp_invoice
&----
*& Form f0000_read_invoice_new
&----
FORM f0000_read_invoice_new .
data : ws_tot_amt like bseg-dmbtr,ws_belnr like bseg-belnr,
WS_AUGDT LIKE BSAK-AUGDT, ws_no_of_invoice(3) type n,
ws_com_amt like bsak-dmbtr,ws_pbudat like bsak-budat.
Find invoice from clear item.
sort int_bsak by belnr.
loop at int_bsak.
Pick up Partial clearing document(Which has invoice reference)
loop at int_temp where rebzg = int_bsak-belnr and
mwskz not in mwskz.
if int_temp-shkzg = 'H'.
int_temp-dmbtr = int_temp-dmbtr * '-1'.
endif.
int_invoice-bukrs = int_bsak-bukrs.
int_invoice-augbl = int_bsak-augbl.
int_invoice-lifnr = int_bsak-lifnr.
int_invoice-belnr = int_temp-belnr.
int_invoice-gjahr = int_bsak-gjahr.
int_invoice-ind = 'C'.
INT_INVOICE-AUGDT = INT_TEMP-AUGDT.
int_invoice-dmbtr = int_temp-dmbtr.
int_invoice-rebzg = int_bsak-belnr.
int_invoice-pbudat = int_temp-budat.
int_invoice-ibudat = int_bsak-budat.
append int_invoice.
clear int_invoice.
int_temp-flag = 'X'.
modify int_temp.
endloop.
ws_tot_amt = 0.
CLEAR : ws_belnr,WS_AUGDT,ws_pbudat.
Pick up remain clearing document which has refrence of invoice's
clearing document.
loop at int_temp where augbl = int_bsak-augbl and
rebzg int_bsak-belnr and
mwskz not in mwskz.
To Check document number in inv. ref field is not other invoice.
if it is invoice then not to include.
select single * from bseg where bukrs = int_temp-bukrs
and belnr = int_temp-rebzg
and gjahr = int_temp-gjahr.
if bseg-mwskz in mwskz.
int_temp-flag = 'O'. "other Invoice ref.
modify int_temp.
continue. "if other invoice ref.
endif.
if int_temp-shkzg = 'H'.
int_temp-dmbtr = int_temp-dmbtr * '-1'.
endif.
if int_temp-belnr = int_temp-rebzg and
int_temp-belnr = int_temp-augbl.
ws_tot_amt = ws_tot_amt + int_temp-dmbtr.
ws_belnr = int_temp-belnr.
WS_AUGDT = INT_TEMP-AUGDT.
ws_pbudat = int_temp-budat.
int_temp-flag = 'X'.
modify int_temp.
continue.
endif.
int_invoice-bukrs = int_bsak-bukrs.
int_invoice-augbl = int_bsak-augbl.
int_invoice-lifnr = int_bsak-lifnr.
int_invoice-belnr = int_temp-belnr.
int_invoice-gjahr = int_bsak-gjahr.
int_invoice-ind = 'C'.
int_invoice-dmbtr = int_temp-dmbtr.
int_invoice-augdt = int_TEMP-AUGDT.
int_invoice-rebzg = int_bsak-belnr.
int_invoice-pbudat = int_temp-budat.
int_invoice-ibudat = int_bsak-budat.
append int_invoice.
clear int_invoice.
int_temp-flag = 'X'.
modify int_temp.
endloop.
if ws_tot_amt 0.
int_invoice-bukrs = int_bsak-bukrs.
int_invoice-augbl = int_bsak-augbl.
int_invoice-lifnr = int_bsak-lifnr.
int_invoice-belnr = ws_belnr.
int_invoice-gjahr = int_bsak-gjahr.
int_invoice-ind = 'C'.
INT_INVOICE-AUGDT = WS_AUGDT.
int_invoice-pbudat = ws_pbudat.
int_invoice-ibudat = int_bsak-budat.
int_invoice-dmbtr = ws_tot_amt.
int_invoice-rebzg = int_bsak-belnr.
int_invoice-ori = 'X'.
append int_invoice.
clear int_invoice.
endif.
endloop.
Find Multiple document clearing
loop at int_temp where flag is initial and
mwskz not in mwskz and budat in budat.
**if invoice created in same period
loop at int_bsak where augbl = int_temp-augbl.
move-corresponding int_temp to int_full.
int_full-rebzg = int_bsak-belnr.
int_full-gjahr = int_bsak-gjahr.
int_full-ibudat = int_bsak-budat.
append int_full.
endloop.
if invoice not created in same period
if sy-subrc 0.
loop at int_bsak_all where augbl = int_temp-augbl.
move-corresponding int_temp to int_full.
int_full-rebzg = int_bsak_all-belnr.
int_full-gjahr = int_bsak_all-gjahr.
int_full-ibudat = int_bsak_all-budat.
append int_full.
endloop.
endif.
endloop.
loop at int_full where flag is initial and
mwskz not in mwskz and budat in budat.
if int_full-shkzg = 'H'.
int_full-dmbtr = int_full-dmbtr * '-1'.
endif.
int_invoice-bukrs = int_full-bukrs.
int_invoice-rebzg = int_full-rebzg.
int_invoice-belnr = int_full-belnr.
int_invoice-dmbtr = int_full-dmbtr.
int_invoice-lifnr = int_full-lifnr.
int_invoice-gjahr = int_full-gjahr.
int_invoice-pbudat = int_full-budat.
int_invoice-ibudat = int_full-ibudat.
int_invoice-ori = 'X'.
int_invoice-ind = 'C'.
if int_full-xragl = 'X'.
int_invoice-rev = 'X'.
int_invoice-shkzg = int_full-shkzg.
endif.
append int_invoice.
clear int_invoice.
endloop.
Open Item
loop at int_bsik.
if int_bsik-shkzg = 'H'.
int_bsik-dmbtr = int_bsik-dmbtr * '-1'.
endif.
int_invoice-bukrs = int_bsik-bukrs.
int_invoice-rebzg = int_bsik-rebzg.
int_invoice-belnr = int_bsik-belnr.
int_invoice-dmbtr = int_bsik-dmbtr.
int_invoice-lifnr = int_bsik-lifnr.
int_invoice-gjahr = int_bsik-gjahr.
int_invoice-pbudat = int_bsik-budat.
int_invoice-ind = 'O'.
if int_bsik-xragl = 'X'.
int_invoice-rev = 'X'.
int_invoice-shkzg = int_bsik-shkzg.
endif.
select single budat into int_invoice-ibudat from bkpf
where belnr = int_bsik-rebzg
and gjahr = int_bsik-gjahr
and bukrs = int_bsik-bukrs.
append int_invoice.
clear int_invoice.
endloop.
Read Invoice Amount / Tax.
loop at int_invoice.
select * from bseg where bukrs = int_invoice-bukrs
and belnr = int_invoice-rebzg
and gjahr = int_invoice-gjahr
and mwskz in mwskz.
if BSEG-lifnr = int_invoice-lifnr.
int_invoice-idmbtr = bseg-dmbtr.
elseif BSEG-HKONT = '0004703150' or bseg-hkont = '0002810360'.
"service tax
int_invoice-itax = bseg-dmbtr.
elseif BSEG-HKONT = '0004703160' or bseg-hkont = '0002810370'.
int_invoice-icess = bseg-dmbtr. "cess
elseif bseg-koart = 'S' and bseg-buzid 'T'.
int_invoice-ihkont = bseg-hkont. " G/L account
select single txt50 into int_invoice-txt50 from skat
where SAKNR = bseg-hkont
and spras = sy-LANGU.
endif.
endselect.
if sy-subrc 0.
delete int_invoice.
continue.
else.
modify int_invoice.
clear int_invoice.
endif.
endloop.
finding out if Same Clear document Cleared Multiple Invoice
If Yes then Propose net Amount Calculation.
Find out Remain Amount of invoice.
int_invoice_temp] = int_invoice[.
sort int_invoice by augbl.
loop at int_invoice where not ori is initial.
loop at int_invoice_temp where augbl = int_invoice-augbl.
ws_no_of_invoice = ws_no_of_invoice + 1.
endloop.
if ws_no_of_invoice > 1.
select * from bsak where rebzg = int_invoice-rebzg
and XRAGL = ' '.
ws_tot_amt = ws_tot_amt + bsak-dmbtr.
endselect.
int_invoice-rem_dmbtr = int_invoice-idmbtr - ws_tot_amt.
modify int_invoice.
clear int_invoice.
clear : ws_tot_amt.
endif.
clear : ws_com_amt.
endloop.
Find out Total Combine amount of multiple Invoice Clearing Document.
i.e Invoice 1 Remain Amount + invoice 2 reamin Amount ....
int_invoice_temp] = int_invoice[.
sort int_invoice by augbl.
loop at int_invoice where not ori is initial.
loop at int_invoice_temp where augbl = int_invoice-augbl.
ws_no_of_invoice = ws_no_of_invoice + 1.
ws_com_amt = ws_com_amt + int_invoice_temp-rem_dmbtr.
endloop.
if ws_no_of_invoice > 1.
int_invoice-com_dmbtr = ws_com_amt.
modify int_invoice.
clear int_invoice.
endif.
clear : ws_com_amt.
endloop.
data : ws_dmbtr like bsak-dmbtr.
loop at int_invoice.
If multiple clearing Document
if int_invoice-rem_dmbtr > 0.
ws_dmbtr = int_invoice-dmbtr * int_invoice-rem_dmbtr /
int_invoice-com_dmbtr.
int_invoice-ptax = ws_dmbtr * int_invoice-itax /
int_invoice-idmbtr.
int_invoice-pcess = ws_dmbtr * int_invoice-icess /
int_invoice-idmbtr.
if int_invoice-rev = 'X' and int_invoice-shkzg = 'H'. "Reversal
int_invoice-dmbtr = int_invoice-dmbtr * '-1'.
int_invoice-ptax = int_invoice-ptax * '-1'.
int_invoice-pcess = int_invoice-pcess * '-1'.
endif.
else.
One Clearing Document per one invoice
int_invoice-ptax = int_invoice-dmbtr * int_invoice-itax /
int_invoice-idmbtr.
int_invoice-pcess = int_invoice-dmbtr * int_invoice-icess /
int_invoice-idmbtr.
if int_invoice-rev = 'X' and int_invoice-shkzg = 'H'. "Reversal
int_invoice-dmbtr = int_invoice-dmbtr * '-1'.
int_invoice-ptax = int_invoice-ptax * '-1'.
int_invoice-pcess = int_invoice-pcess * '-1'.
endif.
endif.
select single adrnr into v_addrnr from LFA1
where lifnr = int_invoice-lifnr.
select single * from adrc where addrnumber = v_addrnr.
int_invoice-name1 = adrc-name1.
int_invoice-name2 = adrc-name2.
int_invoice-street = adrc-street.
int_invoice-street1 = adrc-str_suppl1.
int_invoice-street2 = adrc-str_suppl2.
int_invoice-city1 = adrc-city1.
modify int_invoice.
endloop.
int_invoice_out] = int_invoice[.
ENDFORM. " f0000_read_invoice_new
&----
*& Module pbo OUTPUT
&----
text
-
MODULE pbo OUTPUT.
data : ls_SORT like gs_SORT with header line.
set pf-status 'MAIN100'.
set titlebar 'MAIN100'.
CREATE OBJECT WC_CONTAINER
EXPORTING
PARENT =
CONTAINER_NAME = 'W_CTRL'
STYLE =
LIFETIME = lifetime_default
REPID =
DYNNR =
NO_AUTODEF_PROGID_DYNNR =
EXCEPTIONS
CNTL_ERROR = 1
CNTL_SYSTEM_ERROR = 2
CREATE_ERROR = 3
LIFETIME_ERROR = 4
LIFETIME_DYNPRO_DYNPRO_LINK = 5
others = 6
.
IF SY-SUBRC 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Grid1 instance creation of class cl_gui_alv_grid
CREATE OBJECT GRID1
EXPORTING
I_SHELLSTYLE = 0
I_LIFETIME =
I_PARENT = wc_container
I_APPL_EVENTS = space
I_PARENTDBG =
I_APPLOGPARENT =
I_GRAPHICSPARENT =
I_NAME =
EXCEPTIONS
ERROR_CNTL_CREATE = 1
ERROR_CNTL_INIT = 2
ERROR_CNTL_LINK = 3
ERROR_DP_CREATE = 4
others = 5.
Display
refresh : gs_fcatalog ,gs_sort.
perform f0004_fill_fieldcatalog.
Ls_sort-spos = '1'.
Ls_sort-fieldname = 'LIFNR'.
LS_SORT-UP = 'X'.
ls_sort-SUBTOT = 'X'.
APPEND LS_SORT TO GS_SORT.
CLEAR LS_SORT.
*Ls_sort-spos = '2'.
*Ls_sort-fieldname = 'REBZG'.
*LS_SORT-UP = 'X'.
*ls_sort-SUBTOT = 'X'.
*
*APPEND LS_SORT TO GS_SORT.
*CLEAR LS_SORT.
write budat-low to ws_date_1 dd/mm/yyyy.
if not budat-high is initial.
write budat-high to ws_date_2 dd/mm/yyyy.
else.
write budat-low to ws_date_2 dd/mm/yyyy.
endif.
concatenate bukrs 'Vendor Service Tax Report From'
ws_date_1 'To' ws_date_2
into gs_layout-grid_title separated by ' '.
CALL METHOD GRID1->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
I_BUFFER_ACTIVE =
I_BYPASSING_BUFFER =
I_CONSISTENCY_CHECK =
I_STRUCTURE_NAME =
IS_VARIANT =
I_SAVE =
I_DEFAULT = 'X'
IS_LAYOUT = gs_layout
IS_PRINT =
IT_SPECIAL_GROUPS =
IT_TOOLBAR_EXCLUDING =
IT_HYPERLINK =
IT_ALV_GRAPHICS =
IT_EXCEPT_QINFO =
CHANGING
IT_OUTTAB = int_invoice_out
IT_FIELDCATALOG = gs_fcatalog
IT_SORT = GS_SORT
IT_FILTER =
EXCEPTIONS
INVALID_PARAMETER_COMBINATION = 1
PROGRAM_ERROR = 2
TOO_MANY_LINES = 3
others = 4
.
IF SY-SUBRC 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*call method cl_gui_control=>set_focus exporting control = grid1.
CALL METHOD grid1->set_toolbar_interactive.
ENDMODULE. " pbo OUTPUT
&----
*& Form f0004_fill_fieldcatalog
&----
FORM f0004_fill_fieldcatalog .
data : ls_fcatalog like gs_fcatalog with header line.
data : m_col(2) type n.
ls_fcatalog-fieldname = 'LIFNR'.
ls_fcatalog-tabname = 'INT_INVOICE_OUT'.
ls_fcatalog-col_pos = m_col.
ls_fcatalog-ref_table = 'BSAK'.
ls_fcatalog-outputlen = '10'.
ls_fcatalog-key = 'X'.
append ls_fcatalog to gs_fcatalog.
m_col = m_col + 1.
clear ls_fcatalog.
ls_fcatalog-fieldname = 'NAME1'.
ls_fcatalog-tabname = 'INT_INVOICE_OUT'.
ls_fcatalog-col_pos = m_col.
ls_fcatalog-ref_table = 'ADRC'.
ls_fcatalog-key = 'X'.
append ls_fcatalog to gs_fcatalog.
m_col = m_col + 1.
clear ls_fcatalog.
ls_fcatalog-fieldname = 'NAME2'.
ls_fcatalog-tabname = 'INT_INVOICE_OUT'.
ls_fcatalog-col_pos = m_col.
ls_fcatalog-ref_table = 'ADRC'.
*ls_fcatalog-outputlen = '10'.
ls_fcatalog-COLTEXT = 'Name 2'.
append ls_fcatalog to gs_fcatalog.
m_col = m_col + 1.
clear ls_fcatalog.
ls_fcatalog-fieldname = 'BELNR'.
ls_fcatalog-tabname = 'INT_INVOICE_OUT'.
ls_fcatalog-col_pos = m_col.
ls_fcatalog-ref_table = 'BSAK'.
ls_fcatalog-outputlen = '10'.
append ls_fcatalog to gs_fcatalog.
m_col = m_col + 1.
clear ls_fcatalog.
ls_fcatalog-fieldname = 'STREET'.
ls_fcatalog-tabname = 'INT_INVOICE_OUT'.
ls_fcatalog-col_pos = m_col.
ls_fcatalog-ref_table = 'ADRC'.
*ls_fcatalog-outputlen = '10'.
*ls_fcatalog-COLTEXT = 'Invoice'.
append ls_fcatalog to gs_fcatalog.
m_col = m_col + 1.
clear ls_fcatalog.
ls_fcatalog-fieldname = 'STREET1'.
ls_fcatalog-tabname = 'INT_INVOICE_OUT'.
ls_fcatalog-col_pos = m_col.
ls_fcatalog-COLTEXT = 'Street 2'.
*ls_fcatalog-ref_table = 'BSAK'.
*ls_fcatalog-outputlen = '10'.
append ls_fcatalog to gs_fcatalog.
m_col = m_col + 1.
clear ls_fcatalog.
ls_fcatalog-fieldname = 'STREET2'.
ls_fcatalog-tabname = 'INT_INVOICE_OUT'.
ls_fcatalog-col_pos = m_col.
ls_fcatalog-COLTEXT = 'Street 3'.
append ls_fcatalog to gs_fcatalog.
m_col = m_col + 1.
clear ls_fcatalog.
ls_fcatalog-fieldname = 'CITY1'.
ls_fcatalog-tabname = 'INT_INVOICE_OUT'.
ls_fcatalog-col_pos = m_col.
ls_fcatalog-COLTEXT = 'City'.
*ls_fcatalog-outputlen = '13'.
append ls_fcatalog to gs_fcatalog.
m_col = m_col + 1.
clear ls_fcatalog.
ls_fcatalog-fieldname = 'IHKONT'.
ls_fcatalog-tabname = 'INT_INVOICE_OUT'.
ls_fcatalog-col_pos = m_col.
ls_fcatalog-ref_table = 'BSAK'.
ls_fcatalog-outputlen = '10'.
ls_fcatalog-COLTEXT = 'G/L Code'.
append ls_fcatalog to gs_fcatalog.
m_col = m_col + 1.
clear ls_fcatalog.
*ls_fcatalog-fieldname = 'PBUDAT'.
*ls_fcatalog-tabname = 'INT_INVOICE_OUT'.
*ls_fcatalog-col_pos = m_col.
*ls_fcatalog-COLTEXT = 'Payment Posting Date'.
*ls_fcatalog-outputlen = '13'.
append ls_fcatalog to gs_fcatalog.
*m_col = m_col + 1.
*clear ls_fcatalog.
ls_fcatalog-fieldname = 'DMBTR'.
ls_fcatalog-tabname = 'INT_INVOICE_OUT'.
ls_fcatalog-col_pos = m_col.
ls_fcatalog-ref_table = 'BSAK'.
ls_fcatalog-do_sum = 'X'.
ls_fcatalog-COLTEXT = 'Clearing Amount'.
append ls_fcatalog to gs_fcatalog.
m_col = m_col + 1.
clear ls_fcatalog.
ls_fcatalog-fieldname = 'IDMBTR'.
ls_fcatalog-tabname = 'INT_INVOICE_OUT'.
ls_fcatalog-col_pos = m_col.
ls_fcatalog-COLTEXT = 'Invoice Amount'.
append ls_fcatalog to gs_fcatalog.
m_col = m_col + 1.
clear ls_fcatalog.
ls_fcatalog-fieldname = 'REM_DMBTR'.
ls_fcatalog-tabname = 'INT_INVOICE_OUT'.
ls_fcatalog-col_pos = m_col.
ls_fcatalog-no_out = 'X'.
ls_fcatalog-COLTEXT = 'Invoice Remain Amount'.
append ls_fcatalog to gs_fcatalog.
m_col = m_col + 1.
clear ls_fcatalog.
ls_fcatalog-fieldname = 'ITAX'.
ls_fcatalog-tabname = 'INT_INVOICE_OUT'.
ls_fcatalog-col_pos = m_col.
ls_fcatalog-COLTEXT = 'Invoice Tax'.
append ls_fcatalog to gs_fcatalog.
m_col = m_col + 1.
clear ls_fcatalog.
ls_fcatalog-fieldname = 'ICESS'.
ls_fcatalog-tabname = 'INT_INVOICE_OUT'.
ls_fcatalog-col_pos = m_col.
ls_fcatalog-COLTEXT = 'Invoice Cess'.
append ls_fcatalog to gs_fcatalog.
m_col = m_col + 1.
clear ls_fcatalog.
ls_fcatalog-fieldname = 'PTAX'.
ls_fcatalog-tabname = 'INT_INVOICE_OUT'.
ls_fcatalog-col_pos = m_col.
ls_fcatalog-COLTEXT = 'Pra. Tax'.
ls_fcatalog-do_sum = 'X'.
ls_fcatalog-datatype = 'CURR'.
ls_fcatalog-outputlen = '13'.
append ls_fcatalog to gs_fcatalog.
m_col = m_col + 1.
clear ls_fcatalog.
ls_fcatalog-fieldname = 'PCESS'.
ls_fcatalog-tabname = 'INT_INVOICE_OUT'.
ls_fcatalog-col_pos = m_col.
ls_fcatalog-COLTEXT = 'Pra. Cess'.
ls_fcatalog-do_sum = 'X'.
ls_fcatalog-datatype = 'CURR'.
ls_fcatalog-outputlen = '13'.
append ls_fcatalog to gs_fcatalog.
m_col = m_col + 1.
clear ls_fcatalog.
ENDFORM. " f0004_fill_fieldcatalog
&----
*& Module pai INPUT
&----
text
-
MODULE pai INPUT.
case ok_code.
when 'EXIT'.
perform f0003_exit_program.
endcase.
clear ok_code.
ENDMODULE. " pai INPUT
&----
*& Form f0003_exit_program
&----
text
-
--> p1 text
<-- p2 text
-
FORM f0003_exit_program .
call method wc_container->free.
call method cl_gui_cfw=>flush.
leave to screen '0'.
ENDFORM. " f0003_exit_program
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.