2016 Sep 29 12:34 PM
hello Gurus,
i have query please can any one help me with the book code of taxinn to taxing.....
TYPE-POOLS : SLIS.
TABLES : BSis.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-011.
SELECT-OPTIONS : S_BUKRS FOR BSIS-BUKRS,
S_HKONT FOR BSIS-HKONT.
PARAMETERS : RB1 RADIOBUTTON GROUP RB,
RB2 RADIOBUTTON GROUP RB.
SELECTION-SCREEN END OF BLOCK B1.
TYPES :BEGIN OF TY_FINAL,
BUKRS TYPE BUKRS , "bsis company code
HKONT TYPE HKONT , "bsis general ledger account
BELNR TYPE BELNR_D, "bsis account document number
BUDAT TYPE BUDAT, "bsis posting date
BSCHL TYPE BSCHL , "bsis posting key
DMBTR TYPE DMBTR, "bsis amount in local currency
WRBTR TYPE WRBTR, "bsis amount in document currency
END OF TY_FINAL.
DATA : LV_FNAME TYPE STRING,
T_FINAL TYPE TABLE OF TY_FINAL,
WA_FINAL TYPE TY_FINAL,
IT_FCAT TYPE SLIS_T_FIELDCAT_ALV ,
WA_FCAT TYPE SLIS_FIELDCAT_ALV.
START-OF-SELECTION.
PERFORM GET_DATA.
IF WA_FINAL IS INITIAL.
PERFORM F_FIELDCAT_DATA.
PERFORM F_DISPLAY_DATA.
PERFORM F_DOWNLOAD_DATA.
ENDIF.
FORM GET_DATA .
SELECT
BUKRS "bsis company code
HKONT "bsis general ledger account
BELNR "bsis account document number
BUDAT "bsis posting date
BSCHL "bsis posting key
DMBTR "bsis amount in local currency
WRBTR "bsis amount in document currency
FROM BSIS INTO TABLE T_FINAL WHERE BUKRS IN s_BUKRS AND HKONT IN S_HKONT.
ENDFORM.
FORM F_FIELDCAT_DATA .
REFRESH : IT_FCAT.
CLEAR : WA_FCAT.
WA_FCAT-ROW_POS = '1'.
WA_FCAT-COL_POS = '1'.
WA_FCAT-FIELDNAME = 'BUKRS'.
WA_FCAT-TABNAME = 'T_FINAL'.
WA_FCAT-SELTEXT_M = TEXT-001.
APPEND WA_FCAT TO IT_FCAT.
CLEAR WA_FCAT.
WA_FCAT-ROW_POS = '1'.
WA_FCAT-COL_POS = '2'.
WA_FCAT-FIELDNAME = 'HKONT'.
WA_FCAT-TABNAME = 'T_FINAL'.
WA_FCAT-SELTEXT_M = TEXT-002.
APPEND WA_FCAT TO IT_FCAT.
CLEAR WA_FCAT.
WA_FCAT-ROW_POS = '1'.
WA_FCAT-COL_POS = '3'.
WA_FCAT-FIELDNAME = 'BELNR'.
WA_FCAT-TABNAME = 'T_FINAL'.
WA_FCAT-SELTEXT_M = TEXT-003.
APPEND WA_FCAT TO IT_FCAT.
CLEAR WA_FCAT.
WA_FCAT-ROW_POS = '1'.
WA_FCAT-COL_POS = '4'.
WA_FCAT-FIELDNAME = 'BUDAT'.
WA_FCAT-TABNAME = 'T_FINAL'.
WA_FCAT-SELTEXT_M = TEXT-004.
APPEND WA_FCAT TO IT_FCAT.
CLEAR WA_FCAT.
WA_FCAT-ROW_POS = '1'.
WA_FCAT-COL_POS = '5'.
WA_FCAT-FIELDNAME = 'BSCHL'.
WA_FCAT-TABNAME = 'T_FINAL'.
WA_FCAT-SELTEXT_M = TEXT-005.
APPEND WA_FCAT TO IT_FCAT.
CLEAR WA_FCAT.
WA_FCAT-ROW_POS = '1'.
WA_FCAT-COL_POS = '6'.
WA_FCAT-FIELDNAME = 'DMBTR'.
WA_FCAT-TABNAME = 'T_FINAL'.
WA_FCAT-SELTEXT_M = TEXT-006.
APPEND WA_FCAT TO IT_FCAT.
CLEAR WA_FCAT.
WA_FCAT-ROW_POS = '1'.
WA_FCAT-COL_POS = '7'.
WA_FCAT-FIELDNAME = 'WRBTR'.
WA_FCAT-TABNAME = 'T_FINAL'.
WA_FCAT-SELTEXT_M = TEXT-007.
APPEND WA_FCAT TO IT_FCAT.
CLEAR WA_FCAT.
ENDFORM. " F_FIELDCAT_DATA
FORM F_DISPLAY_DATA .
IF RB1 = 'X' .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
I_CALLBACK_USER_COMMAND = 'DISPLAY_ITEMS'
IT_FIELDCAT = IT_FCAT
I_SAVE = 'A'
TABLES
T_OUTTAB = T_FINAL
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
ENDIF.
ELSEIF RB2 = 'X' .
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
I_CALLBACK_USER_COMMAND = 'DISPLAY_ITEMS'
IT_FIELDCAT = IT_FCAT
I_SAVE = 'A'
TABLES
T_OUTTAB = T_FINAL
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
ENDIF.
ENDIF.
ENDFORM. " F_DISPLAY_DATA
FORM F_DOWNLOAD_DATA .
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = LV_FNAME
FILETYPE = 'ASC'
WRITE_FIELD_SEPARATOR = ','
TABLES
DATA_TAB = T_FINAL
EXCEPTIONS
OTHERS = 22.
IF SY-SUBRC <> 0.
ENDIF.
ENDFORM.
this is my program for generating FI Document but i am not able to print GL Description in the output can anyone help me with the same
...
2016 Sep 30 10:26 AM
Hello
Please follow below logic:
SELECT
BUKRS "bsis company code
HKONT "bsis general ledger account
BELNR "bsis account document number
BUDAT "bsis posting date
BSCHL "bsis posting key
DMBTR "bsis amount in local currency
WRBTR "bsis amount in document currency
FROM BSIS INTO TABLE T_FINAL WHERE BUKRS IN s_BUKRS AND HKONT IN S_HKONT.
Select TXT20 TXT50 from SKAT into IT_SKAT
For All Enteries in T_FINAL
Where SPRAS = Sy-Langu
AND SAKNR = T_FINAL-HKONT.
TXT20 (G/L account short text)
TXT50 (G/L Account Long Text)
Hope it will help You
Regards
Ashraf Usmani
2016 Sep 30 10:26 AM
Hello
Please follow below logic:
SELECT
BUKRS "bsis company code
HKONT "bsis general ledger account
BELNR "bsis account document number
BUDAT "bsis posting date
BSCHL "bsis posting key
DMBTR "bsis amount in local currency
WRBTR "bsis amount in document currency
FROM BSIS INTO TABLE T_FINAL WHERE BUKRS IN s_BUKRS AND HKONT IN S_HKONT.
Select TXT20 TXT50 from SKAT into IT_SKAT
For All Enteries in T_FINAL
Where SPRAS = Sy-Langu
AND SAKNR = T_FINAL-HKONT.
TXT20 (G/L account short text)
TXT50 (G/L Account Long Text)
Hope it will help You
Regards
Ashraf Usmani
2016 Oct 03 10:12 AM
thanks ashraf sir but still i m unable to print the description can you help me with the same coding
2016 Oct 04 7:20 AM
thanks ashraf for your precious expertise i m done with the reports thanks a lot have a great day
2016 Sep 30 11:04 AM
2016 Oct 03 1:17 PM
sir i have tried each every possiblities throwing error can u help me wioth the code please