Sie sind auf Seite 1von 3

*&---------------------------------------------------------------------*

*& include zoppc_data_dec


*&---------------------------------------------------------------------*

tables : mara.
type-pools :slis.

*&---------------------------------------------------------------------*
*& selection screen parameters
*&---------------------------------------------------------------------*
** parameter : p_file type rlgrap-filename default '' obligatory. "parameter
to select a file name.

*-------------------------------------------------------
* selection screen
*-------------------------------------------------------
selection-screen skip.
selection-screen skip.

selection-screen begin of block a with frame title text-100.

parameters: p_pres radiobutton group rad1 default 'x'.

*selection-screen begin of line.


*selection-screen comment (15) text-003.
*selection-screen position 25.
parameters: p_inpf like rlgrap-filename obligatory default 'e:/'.
*selection-screen end of line.

parameters:p_appl radiobutton group rad1 .

*selection-screen begin of line.


*selection-screen comment (15) text-003.
*selection-screen position 25.
parameters: p_l_inpf like rlgrap-filename obligatory default
'/cidata/conversion/pp/'.
*selection-screen end of line.

selection-screen end of block a.

*&---------------------------------------------------------------------*
*& internal tables
*&---------------------------------------------------------------------*

types: begin of ty_record,

matnr(18) type c, "material number


werks(4) type c, "plant
profidnetz(4) type c, "profile
statu(1) type c, "status
verwe(1) type c, "usage
losvn(12) type c, "charge quantity range
losbs(12) type c, "charge quantity range

vornr(4) type c, "operation number


phflg(1) type c, "phase flag
pvznr(4) type c, "superordinate operation
phseq(3) type c, "control recipe destination
arbpl(8) type c, "resource
steus(4) type c, "control key
ltxa1(40) type c, "description

bmsch(12) type c, "base quantity


meinh(3) type c, "unit of measurement

vgw01(12) type c, "duration


vge01(3) type c, "unit of measurement

vgw02(12) type c, "duration


vge02(3) type c, "unit of measurement
lar02(6) type c, "activity

vgw03(12) type c, "duration


vge03(3) type c, "unit of measurement
lar03(6) type c, "activity

costr_1(8) type c, "process instructions


costr_2(8) type c, "process instructions
costr_3(8) type c, "process instructions
end of ty_record.

types: begin of ty_opr,


matnr(18) type c, "material number
werks(4) type c, "plant
profidnetz(4) type c, "profile
vornr(4) type c, "operation number
phflg(1) type c, "phase flag
pvznr(4) type c, "superordinate operation
phseq(3) type c, "control recipe destination
arbpl(8) type c, "resource
steus(4) type c, "control key
ltxa1(40) type c, "description

bmsch(12) type c, "base quantity


meinh(3) type c, "unit of measurement

vgw01(12) type c, "duration


vge01(3) type c, "unit of measurement

vgw02(12) type c, "duration


vge02(3) type c, "unit of measurement
lar02(6) type c, "activity

vgw03(12) type c, "duration


vge03(3) type c, "unit of measurement
lar03(6) type c, "activity

costr_1(8) type c, "process instructions


costr_2(8) type c, "process instructions
costr_3(8) type c, "process instructions
end of ty_opr.

types: begin of ty_audit,


"internal table for generating audit report.
matnr(18) type c,
status(15) type c,
message(250) type c,
end of ty_audit.

data :int_opr type table of ty_opr with header line.


data: int_record type table of ty_record with header line.
data :int_audit type table of ty_audit with header line.
data: int_messtab type table of bdcmsgcoll with header line.
"used for collecting messages.

*&---------------------------------------------------------------------*
*& alv report varialbes
*&---------------------------------------------------------------------*

data: wf_file type string.


data: int_fieldcat type slis_t_fieldcat_alv.
data: wa_fieldcat type slis_fieldcat_alv .
data: int_header type slis_t_listheader.
data: wf_line(250) type c.
"string varialble used for making header.
data: int_record_tmp like int_record occurs 0 with header line.

*&---------------------------------------------------------------------*
*& variables
*&---------------------------------------------------------------------*
data: wa_string(255) type c.
constants: con_tab type c value cl_abap_char_utilities=>horizontal_tab.

data: wf_fnam(40) type c.


"variable u#ed for concatenation in table control fields
data: wc_valfail(3) type n,
"counter for number of validation failures
wc_postfail(3) type n ,
"counter for number of posting failures
wc_pro(3) type n,
"counter for number of processed records
wc_record(3) type n,
"counter for total number of records
wc_idx(2) type c value '1',
wc_index(2) type c value 1,
wc_cntr1(2) type c value 1,
wc_cntr2(2) type c value 1.
data wf_records_read type i value 0.
at selection-screen on value-request for p_inpf. "fm
for giving the file name
call function 'f4_filename'
exporting
program_name = syst-cprog
dynpro_number = syst-dynnr
field_name = 'p_inpf'
importing
file_name = p_inpf.
at selection-screen on value-request for p_l_inpf.

perform f_getserverfile.

Das könnte Ihnen auch gefallen