12-07-2007 1:44 PM
hi experts,
do you have sample code using FM GUI_FILE_SAVE_DIALOG?
thank you.
12-07-2007 2:09 PM
Hello March
For these kinds of frontend interactions you should use the static methods of class <b>CL_GUI_FRONTEND_SERVICES</b>.
Regards,
Uwe
12-07-2007 2:02 PM
Hello,
You could do a where-used search; one of examples you will find is FM LIST_CONVERT_TO_DAT.
Regards,
John.
12-07-2007 2:09 PM
Hello March
For these kinds of frontend interactions you should use the static methods of class <b>CL_GUI_FRONTEND_SERVICES</b>.
Regards,
Uwe
12-07-2007 2:10 PM
12-07-2007 2:14 PM
report ZBDCPGM
no standard page heading line-size 255.
include bdcrecx1.
data : begin of itab occurs 0,
matnr like mara-matnr,
mbrsh like mara-mbrsh,
mtart like mara-mtart,
meins like mara-meins,
maktx like makt-maktx,
end of itab.
DATA: rc TYPE i,
flag TYPE i VALUE 1,
it_files TYPE filetable,
bdc_data TYPE STANDARD TABLE OF bdcdata WITH HEADER LINE.
SELECTION-SCREEN : BEGIN OF BLOCK b1 WITH FRAME TITLE text-002.
PARAMETERS: p_file(1024) TYPE c OBLIGATORY.
SELECTION-SCREEN : END OF BLOCK b1.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
CALL METHOD cl_gui_frontend_services=>file_open_dialog
CHANGING
file_table = it_files
rc = rc.
READ TABLE it_files INDEX 1 INTO p_file.
start-of-selection.
perform getdata.
perform open_group.
loop at itab.
perform bdc_dynpro using 'SAPLMGMM' '0060'.
perform bdc_field using 'BDC_CURSOR'
'RMMG1-MTART'.
perform bdc_field using 'BDC_OKCODE'
'=AUSW'.
perform bdc_field using 'RMMG1-MATNR'
itab-matnr.
perform bdc_field using 'RMMG1-MBRSH'
itab-mbrsh.
perform bdc_field using 'RMMG1-MTART'
itab-mtart.
perform bdc_dynpro using 'SAPLMGMM' '0070'.
perform bdc_field using 'BDC_CURSOR'
'MSICHTAUSW-DYTXT(01)'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_field using 'MSICHTAUSW-KZSEL(01)'
'X'.
perform bdc_dynpro using 'SAPLMGMM' '3004'.
perform bdc_field using 'BDC_OKCODE'
'=BU'.
perform bdc_field using 'MARA-MEINS'
itab-meins.
perform bdc_field using 'MARA-MTPOS_MARA'
'NORM'.
perform bdc_field using 'BDC_CURSOR'
'SKTEXT-MAKTX(01)'.
perform bdc_field using 'SKTEXT-MAKTX(01)'
itab-maktx.
perform bdc_transaction using 'MM01'.
endloop.
perform close_group.
*&---------------------------------------------------------------------*
*& Form getdata
*&---------------------------------------------------------------------*
form getdata.
DATA: file TYPE string.
file = p_file.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = file
has_field_separator = 'X'
TABLES
data_tab = itab
EXCEPTIONS
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
OTHERS = 17.
*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. " getdata
Hello March ,
Use this above code, your problem gets resolved!!
reward points if useful.
Thanks,
Naveena.
12-07-2007 2:15 PM