REPORT zstock_details NO STANDARD PAGE HEADING
MESSAGE-ID zxyz
line-count 62
line-size 256.
* Type-pool decleration for ALV DIsplay
TYPE-POOLS: slis.
* Structure decleration for
TYPES : BEGIN OF ty_mseg_mkpf,
mblnr TYPE mblnr,
mjahr TYPE mjahr,
zeile TYPE mblpo,
bwart TYPE bwart,
matnr TYPE matnr,
werks TYPE werks_d,
insmk TYPE mb_insmk,
shkzg TYPE shkzg,
menge TYPE menge_d,
meins TYPE meins,
budat TYPE budat,
END OF ty_mseg_mkpf,
* Structure decleration for the final output table
BEGIN OF ty_final,
matnr TYPE matnr,
maktx TYPE maktx,
werks TYPE werks_d,
bdate TYPE budat,
edate TYPE budat,
os_menge TYPE menge_d,
os_meins TYPE meins,
gr_menge TYPE menge_d,
gr_meins TYPE meins,
gi_menge TYPE menge_d,
gi_meins TYPE meins,
cs_menge TYPE menge_d,
cs_meins TYPE meins,
END OF ty_final,
* Structure decleration for the material text
BEGIN OF ty_makt,
matnr TYPE matnr,
maktx TYPE maktx,
END OF ty_makt,
* Structure decleration for the material Units
BEGIN OF ty_marc_mara,
matnr TYPE matnr,
meins TYPE meins,
END OF ty_marc_mara,
* Structure decleration for the material current stock
BEGIN OF ty_mard,
matnr TYPE matnr,
werks TYPE werks_d,
labst TYPE labst,
END OF ty_mard,
* Structure decleration for the first and last dates of the months
BEGIN OF ty_year,
bdate TYPE dats,
ldate TYPE dats,
END OF ty_year,
* Internal body decleration for the above structures using types
tt_mseg_mkpf TYPE STANDARD TABLE OF ty_mseg_mkpf ,
tt_marc_mara TYPE STANDARD TABLE OF ty_marc_mara,
tt_makt TYPE STANDARD TABLE OF ty_makt,
tt_mard TYPE STANDARD TABLE OF ty_mard,
tt_final TYPE STANDARD TABLE OF ty_final,
tt_year TYPE STANDARD TABLE OF ty_year.
DATA : l_mfdate TYPE dats, " yyyymmdd
l_mldate TYPE dats,
l_datet TYPE dats,
l_odatet TYPE dats,
l_day TYPE i,
l_month TYPE i,
l_werks TYPE t001w-werks,
l_budat TYPE budat,
l_matnr TYPE mara-matnr,
l_open_stock TYPE menge_d,
l_gr_menge TYPE menge_d,
l_gi_menge TYPE menge_d,
l_gin_menge TYPE menge_d,
l_cs_menge TYPE menge_d,
l_pr_stock TYPE menge_d,
* Work area and body decleration's
w_year TYPE ty_year,
t_year TYPE tt_year,
w_mseg_mkpf TYPE ty_mseg_mkpf,
t_mseg_mkpf TYPE tt_mseg_mkpf,
w_mseg_mkpf_temp TYPE ty_mseg_mkpf,
t_mseg_mkpf_temp TYPE tt_mseg_mkpf,
w_makt TYPE ty_makt,
t_makt TYPE tt_makt,
w_mard TYPE ty_mard,
w_mard_temp TYPE ty_mard,
t_mard TYPE tt_mard,
w_mard1 TYPE ty_mard,
t_mard1 TYPE tt_mard,
w_marc_mara TYPE ty_marc_mara,
t_marc_mara TYPE tt_marc_mara,
w_final TYPE ty_final,
t_final TYPE tt_final,
* Table decleration for titles in xls file
BEGIN OF t_titles OCCURS 0,
text TYPE char20,
END OF t_titles,
*&---------------------------------------------------------------------*
*& ALV Declaration
*&---------------------------------------------------------------------*
* work area Declaration of fieldcat
w_fieldcat TYPE slis_fieldcat_alv,
* Internal table declaration for fieldcat
t_fieldcat TYPE slis_t_fieldcat_alv.
* Selection screen declerations
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS : p_werks TYPE werks_d DEFAULT 'PRUS' OBLIGATORY. " Plant
SELECT-OPTIONS : s_budat FOR l_budat OBLIGATORY NO-EXTENSION, " Posting Date in the Document
s_matnr FOR l_matnr. " Material Number
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
PARAMETERS: r1 RADIOBUTTON GROUP rad USER-COMMAND rr DEFAULT 'X'. " View the report in ALV
SELECTION-SCREEN SKIP.
PARAMETERS:r2 RADIOBUTTON GROUP rad.
PARAMETER p_flname TYPE ibipparms-path DEFAULT 'C:\Stock_Details.xls' MODIF ID sc2. " File path
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 35(50) c_uname MODIF ID sc2.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK b2.
INITIALIZATION.
* Refresh all the Internal tables
REFRESH : t_mseg_mkpf,
t_final,
t_fieldcat,
t_makt,
t_mard,
t_marc_mara,
t_year,
t_titles.
* clear all the work ares
CLEAR : w_mseg_mkpf,
w_final,
w_fieldcat,
w_year,
w_makt,
w_mard,
w_marc_mara.
* Setting the default values at the selection screen
s_budat-low = '20080101'.
s_budat-high = sy-datum.
APPEND s_budat.
CLEAR s_budat.
c_uname = 'Enter the file name with .xls extension'.
***********At Selection Screen**************
AT SELECTION-SCREEN.
* Validating the Plant field
PERFORM sub_validate_werks.
* Validating the date field's
PERFORM sub_validate_budat.
* Validating the Material Number field
PERFORM sub_validate_matnr.
***********At Selection Screen on Value request for download file path**************
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_flname.
* F4 help for the file path
PERFORM sub_get_f4help.
***********At Selection Screen Output**************
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-group1 = 'SC1'.
IF r1 = 'X'.
screen-active = 1.
ELSEIF r2 = 'X'.
screen-active = 0.
ENDIF.
MODIFY SCREEN.
ELSEIF screen-group1 = 'SC2'.
IF r1 = 'X'.
screen-active = 0.
ELSEIF r2 = 'X'.
screen-active = 1.
ENDIF.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
***********Start of Selection**************
START-OF-SELECTION.
* PERFORM sub_get_year_dates.
* Get all the materials and there unit of measure
PERFORM sub_get_material.
* Get the material text
PERFORM sub_get_material_texts.
* Calculate the opening stock for the given period
PERFORM sub_get_present_stock.
* Calculate the Goods Received, Goods Issued and the Closing Stock for the given period.
PERFORM sub_get_mseg_mkpf.
* Display the Output in ALV
PERFORM sub_disp_alv.
* Download the file to the Presentation server
PERFORM sub_download_xls.
*&---------------------------------------------------------------------*
*& Form sub_validate_werks
*----------------------------------------------------------------------*
FORM sub_validate_werks .
CLEAR l_werks.
SELECT SINGLE werks
FROM mseg
INTO l_werks
WHERE werks EQ p_werks.
IF sy-subrc NE 0.
MESSAGE e001 WITH 'No records exists for the given Plant'.
ENDIF.
ENDFORM. " sub_validate_werks
*&---------------------------------------------------------------------*
*& Form sub_validate_budat
*----------------------------------------------------------------------*
FORM sub_validate_budat .
CLEAR l_budat.
IF s_budat-high GT sy-datum.
MESSAGE e001 WITH 'Enter the Dates Less Than:', sy-datum.
ENDIF.
ENDFORM. " sub_validate_budat
*&---------------------------------------------------------------------*
*& Form sub_validate_matnr
*----------------------------------------------------------------------*
FORM sub_validate_matnr .
CLEAR l_matnr.
SELECT SINGLE matnr
FROM marc
INTO l_matnr
WHERE matnr IN s_matnr
AND werks EQ p_werks.
IF sy-subrc NE 0.
MESSAGE e001 WITH 'No records exists for the given Material No.'.
ENDIF.
ENDFORM. " sub_validate_matnr
*&---------------------------------------------------------------------*
*& Form sub_get_material
*----------------------------------------------------------------------*
FORM sub_get_material .
CLEAR : w_marc_mara.
REFRESH : t_marc_mara.
SELECT marc~matnr
mara~meins
INTO TABLE t_marc_mara
FROM marc INNER JOIN mara
ON marc~matnr EQ mara~matnr
WHERE marc~werks EQ p_werks
AND marc~matnr IN s_matnr.
SORT t_marc_mara BY matnr.
IF sy-subrc NE 0.
MESSAGE i001 WITH 'No Materials Available in the Master Material Table'.
LEAVE TO LIST-PROCESSING.
ENDIF.
ENDFORM. " sub_get_material
*&---------------------------------------------------------------------*
*& Form sub_gat_material_texts
*----------------------------------------------------------------------*
FORM sub_get_material_texts .
SELECT matnr
maktx
FROM makt
INTO TABLE t_makt
FOR ALL ENTRIES IN t_marc_mara
WHERE matnr EQ t_marc_mara-matnr.
SORT t_makt BY matnr.
ENDFORM. " sub_gat_material_texts
*&---------------------------------------------------------------------*
*& Form sub_get_present_stock
*----------------------------------------------------------------------*
FORM sub_get_present_stock .
CLEAR : w_mard.
SELECT matnr
werks
labst
FROM mard
INTO TABLE t_mard1
FOR ALL ENTRIES IN t_marc_mara
WHERE matnr EQ t_marc_mara-matnr
AND werks EQ p_werks.
IF sy-subrc NE 0.
MESSAGE i001 WITH 'No Stocks for the materials in master data'.
LEAVE TO LIST-PROCESSING.
ELSE.
CLEAR : l_pr_stock,
w_mard1,
l_matnr.
LOOP AT t_mard1 INTO w_mard_temp. " Calculating the Opening Stock's for all the materials in MSEG
IF l_matnr NE w_mard_temp-matnr.
CLEAR l_pr_stock.
ENDIF.
w_mard1 = w_mard_temp.
l_pr_stock = l_pr_stock + w_mard1-labst.
AT END OF matnr.
w_mard-matnr = w_mard1-matnr.
w_mard-werks = w_mard1-werks.
w_mard-labst = l_pr_stock.
APPEND w_mard TO t_mard.
ENDAT.
l_matnr = w_mard1-matnr.
CLEAR : "l_pr_stock,
w_mard1,
w_mard.
ENDLOOP.
SORT t_mard BY matnr.
ENDIF.
ENDFORM. " sub_get_present_stock
*&---------------------------------------------------------------------*
*& Form sub_disp_alv
*----------------------------------------------------------------------*
FORM sub_disp_alv .
IF t_final IS NOT INITIAL AND r1 EQ 'X'.
SORT t_final BY matnr.
PERFORM sub_create_fieldcat USING: '01' 'MATNR' 'MATERIAL NO.',
'02' 'MAKTX' 'MATERIAL TEXT',
'03' 'WERKS' 'PLANT',
'04' 'BDATE' 'OPENING DATE',
'05' 'EDATE' 'CLOSING DATE',
'06' 'OS_MENGE' 'OPEN STOCK',
'07' 'OS_MEINS' 'UNIT OF QTY',
'08' 'GR_MENGE' 'GOODS RECIPT',
'09' 'GR_MEINS' 'UNIT OF QTY',
'10' 'GI_MENGE' 'GOODS ISSUSED',
'11' 'GI_MEINS' 'UNIT OF QTY',
'12' 'CS_MENGE' 'CLOSING STOCK',
'13' 'CS_MEINS' 'UNIT OF QTY'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-cprog
i_grid_title = 'STOCK'
it_fieldcat = t_fieldcat
TABLES
t_outtab = t_final
EXCEPTIONS
program_error = 1
OTHERS = 2.
ENDIF.
ENDFORM. " sub_disp_alv
*&---------------------------------------------------------------------*
*& Form sub_create_fieldcat
*----------------------------------------------------------------------*
FORM sub_create_fieldcat USING p_col TYPE char2
p_fname TYPE char20
p_text TYPE char30.
w_fieldcat-col_pos = p_col.
w_fieldcat-fieldname = p_fname.
w_fieldcat-seltext_m = p_text.
APPEND w_fieldcat TO t_fieldcat.
CLEAR w_fieldcat.
ENDFORM. " sub_create_fieldcat
*&---------------------------------------------------------------------*
*& Form sub_get_mseg_mkpf
*----------------------------------------------------------------------*
FORM sub_get_mseg_mkpf .
CLEAR : w_mseg_mkpf.
SELECT mseg~mblnr
mseg~mjahr
mseg~zeile
mseg~bwart
mseg~matnr
mseg~werks
mseg~insmk
mseg~shkzg
mseg~menge
mseg~meins
mkpf~budat
INTO TABLE t_mseg_mkpf
FROM mkpf INNER JOIN mseg
ON mkpf~mblnr EQ mseg~mblnr
AND mkpf~mjahr EQ mseg~mjahr
WHERE mkpf~budat BETWEEN s_budat-low AND sy-datum
AND mseg~werks EQ p_werks
AND mseg~matnr IN s_matnr.
IF sy-subrc EQ 0.
CLEAR : w_mseg_mkpf,
l_matnr.
SORT t_mseg_mkpf BY matnr bwart.
LOOP AT t_mseg_mkpf INTO w_mseg_mkpf.
IF l_matnr NE w_mseg_mkpf-matnr.
CLEAR : l_gi_menge,
l_gr_menge,
w_mseg_mkpf_temp.
READ TABLE t_mard INTO w_mard WITH KEY matnr = w_mseg_mkpf-matnr.
LOOP AT t_mseg_mkpf INTO w_mseg_mkpf_temp WHERE matnr EQ w_mseg_mkpf-matnr
AND shkzg EQ 'S'. " Calculating the Good's received
IF w_mseg_mkpf_temp-menge IS NOT INITIAL
AND w_mseg_mkpf_temp-matnr EQ w_mseg_mkpf-matnr.
l_gr_menge = l_gr_menge + w_mseg_mkpf_temp-menge.
ENDIF.
CLEAR w_mseg_mkpf_temp.
ENDLOOP.
LOOP AT t_mseg_mkpf INTO w_mseg_mkpf_temp WHERE matnr EQ w_mseg_mkpf-matnr
AND shkzg EQ 'H'. " Calculating the Good's Issued
IF w_mseg_mkpf_temp-menge IS NOT INITIAL
AND w_mseg_mkpf_temp-matnr EQ w_mseg_mkpf-matnr.
l_gi_menge = l_gi_menge + w_mseg_mkpf_temp-menge.
ENDIF.
CLEAR w_mseg_mkpf_temp.
ENDLOOP.
l_open_stock = w_mard-labst + l_gi_menge - l_gr_menge.
READ TABLE t_makt INTO w_makt WITH KEY matnr = w_mseg_mkpf-matnr.
READ TABLE t_marc_mara INTO w_marc_mara WITH KEY matnr = w_mseg_mkpf-matnr.
w_final-matnr = w_mseg_mkpf-matnr.
w_final-maktx = w_makt-maktx.
w_final-werks = p_werks.
w_final-bdate = s_budat-low.
w_final-edate = s_budat-high.
w_final-os_menge = l_open_stock.
w_final-os_meins = w_marc_mara-meins.
w_final-gr_meins = w_marc_mara-meins.
w_final-gi_meins = w_marc_mara-meins.
w_final-cs_meins = w_marc_mara-meins.
APPEND w_final TO t_final.
CLEAR : w_final,
w_makt,
w_mard.
l_matnr = w_mseg_mkpf-matnr.
ENDIF.
ENDLOOP.
ENDIF.
REFRESH t_mseg_mkpf.
SELECT mseg~mblnr
mseg~mjahr
mseg~zeile
mseg~bwart
mseg~matnr
mseg~werks
mseg~insmk
mseg~shkzg
mseg~menge
mseg~meins
mkpf~budat
INTO TABLE t_mseg_mkpf
FROM mkpf INNER JOIN mseg
ON mkpf~mblnr EQ mseg~mblnr
AND mkpf~mjahr EQ mseg~mjahr
WHERE mkpf~budat BETWEEN s_budat-low AND s_budat-high
AND mseg~werks EQ p_werks
AND mseg~matnr IN s_matnr.
IF sy-subrc EQ 0.
CLEAR : w_mseg_mkpf,
l_matnr.
SORT t_mseg_mkpf BY matnr bwart.
LOOP AT t_mseg_mkpf INTO w_mseg_mkpf.
IF l_matnr NE w_mseg_mkpf-matnr.
CLEAR : l_gi_menge,
l_gr_menge,
w_mseg_mkpf_temp.
LOOP AT t_mseg_mkpf INTO w_mseg_mkpf_temp WHERE matnr EQ w_mseg_mkpf-matnr
AND shkzg EQ 'S'.
IF w_mseg_mkpf_temp-menge IS NOT INITIAL
AND w_mseg_mkpf_temp-matnr EQ w_mseg_mkpf-matnr.
l_gr_menge = l_gr_menge + w_mseg_mkpf_temp-menge.
ENDIF.
CLEAR w_mseg_mkpf_temp.
ENDLOOP.
LOOP AT t_mseg_mkpf INTO w_mseg_mkpf_temp WHERE matnr EQ w_mseg_mkpf-matnr
AND shkzg EQ 'H'.
IF w_mseg_mkpf_temp-menge IS NOT INITIAL
AND w_mseg_mkpf_temp-matnr EQ w_mseg_mkpf-matnr.
l_gi_menge = l_gi_menge + w_mseg_mkpf_temp-menge.
ENDIF.
CLEAR w_mseg_mkpf_temp.
ENDLOOP.
READ TABLE t_final INTO w_final WITH KEY matnr = w_mseg_mkpf-matnr.
w_final-cs_menge = w_final-os_menge + l_gr_menge - l_gi_menge.
w_final-gr_menge = l_gr_menge.
w_final-gi_menge = l_gi_menge.
w_final-cs_menge = w_final-cs_menge.
MODIFY t_final FROM w_final TRANSPORTING "maktx
gr_menge
gi_menge
cs_menge
WHERE matnr = w_mseg_mkpf-matnr.
CLEAR : w_final,
w_makt,
w_mard,
l_gr_menge,
l_gi_menge.
l_matnr = w_mseg_mkpf-matnr.
ENDIF.
CLEAR w_final.
ENDLOOP.
ENDIF.
IF s_matnr-option EQ 'BT'.
LOOP AT t_marc_mara INTO w_marc_mara.
READ TABLE t_final INTO w_final WITH KEY matnr = w_marc_mara-matnr.
IF sy-subrc NE 0.
READ TABLE t_makt INTO w_makt WITH KEY matnr = w_marc_mara-matnr.
READ TABLE t_mard INTO w_mard WITH KEY matnr = w_marc_mara-matnr.
w_final-matnr = w_marc_mara-matnr.
w_final-maktx = w_makt-maktx.
w_final-werks = p_werks.
w_final-bdate = s_budat-low.
w_final-edate = s_budat-high.
w_final-os_meins = w_marc_mara-meins.
w_final-gr_meins = w_marc_mara-meins.
w_final-gi_meins = w_marc_mara-meins.
APPEND w_final TO t_final.
CLEAR w_final.
ENDIF.
CLEAR : w_marc_mara,
w_makt,
w_final,
w_mard.
ENDLOOP.
ENDIF.
IF s_matnr-option EQ 'EQ'.
LOOP AT s_matnr.
READ TABLE t_final INTO w_final WITH KEY matnr = s_matnr-low.
IF sy-subrc EQ 0
AND w_final-os_menge IS NOT INITIAL
AND w_final-gi_menge IS INITIAL
AND w_final-gr_menge IS INITIAL.
w_final-cs_menge = w_final-os_menge.
MODIFY t_final FROM w_final TRANSPORTING cs_menge
WHERE matnr = s_matnr-low.
ENDIF.
CLEAR : w_marc_mara,
w_makt,
s_matnr,
w_final.
ENDLOOP.
ENDIF.
IF s_matnr-low IS INITIAL
AND s_matnr-high IS INITIAL.
LOOP AT t_marc_mara INTO w_marc_mara.
READ TABLE t_final INTO w_final WITH KEY matnr = w_marc_mara-matnr.
IF sy-subrc NE 0.
READ TABLE t_makt INTO w_makt WITH KEY matnr = w_marc_mara-matnr.
READ TABLE t_mard INTO w_mard WITH KEY matnr = w_marc_mara-matnr.
w_final-matnr = w_marc_mara-matnr.
w_final-maktx = w_makt-maktx.
w_final-werks = p_werks.
w_final-bdate = s_budat-low.
w_final-edate = s_budat-high.
w_final-os_menge = w_mard-labst.
w_final-os_meins = w_marc_mara-meins.
w_final-gr_meins = w_marc_mara-meins.
w_final-gi_meins = w_marc_mara-meins.
w_final-cs_menge = w_mard-labst.
w_final-cs_meins = w_marc_mara-meins.
APPEND w_final TO t_final.
CLEAR w_final.
ELSEIF w_final-gi_menge IS INITIAL
AND w_final-gr_menge IS INITIAL.
w_final-cs_menge = w_final-os_menge.
MODIFY t_final FROM w_final TRANSPORTING cs_menge
WHERE matnr = w_marc_mara-matnr.
ENDIF.
CLEAR : w_marc_mara,
w_makt,
w_final,
w_mard.
ENDLOOP.
ENDIF.
ENDFORM. " sub_get_mseg_mkpf
*&---------------------------------------------------------------------*
*& Form sub_download_xls
*----------------------------------------------------------------------*
FORM sub_download_xls .
IF r2 EQ 'X'.
DATA: result_tab TYPE match_result_tab,
w_result_tab TYPE match_result,
l_len TYPE i,
l_len1 TYPE i,
l_string TYPE string.
DATA : f_fname TYPE string.
t_titles-text = 'MATERIAL NO.'.
APPEND t_titles.
CLEAR t_titles.
t_titles-text = 'MATERIAL TEXT'.
APPEND t_titles.
CLEAR t_titles.
t_titles-text = 'PLANT'.
APPEND t_titles.
CLEAR t_titles.
t_titles-text = 'OPENING DATE'.
APPEND t_titles.
CLEAR t_titles.
t_titles-text = 'CLOSING DATE'.
APPEND t_titles.
CLEAR t_titles.
t_titles-text = 'OPEN STOCK'.
APPEND t_titles.
CLEAR t_titles.
t_titles-text = 'UNIT OF QTY'.
APPEND t_titles.
CLEAR t_titles.
t_titles-text = 'GOODS RECIPT'.
APPEND t_titles.
CLEAR t_titles.
t_titles-text = 'UNIT OF QTY'.
APPEND t_titles.
CLEAR t_titles.
t_titles-text = 'GOODS ISSUSED'.
APPEND t_titles.
CLEAR t_titles.
t_titles-text = 'UNIT OF QTY'.
APPEND t_titles.
CLEAR t_titles.
t_titles-text = 'CLOSING STOCK'.
APPEND t_titles.
CLEAR t_titles.
t_titles-text = 'UNIT OF QTY'.
APPEND t_titles.
CLEAR t_titles.
SORT t_final BY matnr.
l_len = STRLEN( p_flname ).
FIND FIRST OCCURRENCE OF '.' IN p_flname
RESULTS result_tab.
IF sy-subrc EQ 0.
READ TABLE result_tab INTO w_result_tab INDEX 1.
l_len1 = l_len - w_result_tab-offset.
l_string = p_flname+w_result_tab-offset(l_len1).
IF l_string NE '.xls'.
REPLACE FIRST OCCURRENCE OF l_string IN p_flname WITH '.xls'.
ENDIF.
ELSE.
CONCATENATE p_flname '.xls' INTO p_flname.
*
ENDIF.
REFRESH result_tab.
CLEAR w_result_tab.
f_fname = p_flname.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
* BIN_FILESIZE =
filename = f_fname
filetype = 'DAT'
write_field_separator = 'X'
confirm_overwrite = 'X'
TABLES
data_tab = t_final
fieldnames = t_titles
EXCEPTIONS
file_write_error = 1
no_batch = 2
gui_refuse_filetransfer = 3
invalid_type = 4
no_authority = 5
unknown_error = 6
header_not_allowed = 7
separator_not_allowed = 8
filesize_not_allowed = 9
header_too_long = 10
dp_error_create = 11
dp_error_send = 12
dp_error_write = 13
unknown_dp_error = 14
access_denied = 15
dp_out_of_memory = 16
disk_full = 17
dp_timeout = 18
file_not_found = 19
dataprovider_exception = 20
control_flush_error = 21
OTHERS = 22.
ENDIF.
ENDFORM. " sub_download_xls
*&---------------------------------------------------------------------*
*& Form sub_get_f4help
*----------------------------------------------------------------------*
FORM sub_get_f4help .
CLEAR p_flname.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
program_name = sy-repid
dynpro_number = '1000'
field_name = ' '
IMPORTING
file_name = p_flname.
ENDFORM. " sub_get_f4help
ALSO READ:
- Coloring A Row & Column In ALV Display Using OOPS Concept.
- Create Unique Handle For ALV Layout (Variant).
- Customizing Toolbar In ALV Tree Using ABAP OO.
- Dropdown in ALV Grid Display.
- Dynamic ALV Grid/List Display.
..... Back To Index On ALV List/ Grid Display.
..... Back To MAIN INDEX.
No comments:
Post a Comment