Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Update some fields in Internet

Former Member
0 Likes
1,074

Hi to all,

customer having some fields display in his homepage(internet)..

he wants to update somemore fields to that....so ill create a internal table with fields below what he wants..

ABLES: MARD, /UPM/GTB10.

DATA: BEGIN OF ABCD OCCURS 0,

EXTMATLGRP TYPE /UPM/GTB10-EXTMATLGRP,

LAGERORT TYPE /UPM/GTB10-LAGERORT,

MATERIAL TYPE /UPM/GTB10-MATERIAL,

LAGERPLATZ TYPE /UPM/GTB10-LAGERPLATZ,

BESCHREIBUNG TYPE /UPM/GTB10-BESCHREIBUNG,

VIN TYPE /UPM/GTB10-VIN,

HERSTELLER TYPE /UPM/GTB10-HERSTELLER,

VCOLOR TYPE /UPM/GTB10-VCOLOR,

KILOMETER TYPE /UPM/GTB10-KILOMETER,

ENOTIZ TYPE /UPM/GTB10-ENOTIZ,

NETPR TYPE /UPM/GTB11-NETPR,

BEDAT TYPE EKKO-BEDAT,

  • LABST TYPE MARD-LABST,

LABST TYPE /UPM/GTB10-QUANTITY,

MATNR TYPE MARD-MATNR,

END OF ABCD.

DATA: LABST LIKE MARD-LABST.

select single MATNR from MARD into MARD-MATNR where LABST > 0.

select * from /UPM/GTB10 INTO CORRESPONDING FIELDS OF TABLE ABCD FOR ALL

ENTRIES IN ABCD WHERE LABST > 0.

and correct the select option.............

And,...

in the report i have write coding for downloading the data with

OPEN DATASET and

CALL FUNCTION 'GUI-DOWNLOAD'...

so tell me or give me an example idea to write the DOWNLOADING CODING...

RAJU

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,046

Hi If you are Using OPEN DATSET ..

DATA: P_FNAME  TYPE RLGRAP-FILENAME.
OPEN DATASET P_FNAME IN TEXT MODE ENCODING DEFAULT FOR OUTPUT.
if sy-subrc = 0.
loop at itab.
transfer itab to P_FNAME.
endloop.
endif.

close dataset P_FNAME.
if sy-subrc = 0.

endif.

check this ...

this will store in AL11.

regards

vijay.

Hi to all,

customer having some fields display in his homepage(internet)..

he wants to update somemore fields to that....so ill create a internal table with fields below what he wants..

ABLES: MARD, /UPM/GTB10.

DATA: BEGIN OF ABCD OCCURS 0,

EXTMATLGRP TYPE /UPM/GTB10-EXTMATLGRP,

LAGERORT TYPE /UPM/GTB10-LAGERORT,

MATERIAL TYPE /UPM/GTB10-MATERIAL,

LAGERPLATZ TYPE /UPM/GTB10-LAGERPLATZ,

BESCHREIBUNG TYPE /UPM/GTB10-BESCHREIBUNG,

VIN TYPE /UPM/GTB10-VIN,

HERSTELLER TYPE /UPM/GTB10-HERSTELLER,

VCOLOR TYPE /UPM/GTB10-VCOLOR,

KILOMETER TYPE /UPM/GTB10-KILOMETER,

ENOTIZ TYPE /UPM/GTB10-ENOTIZ,

NETPR TYPE /UPM/GTB11-NETPR,

BEDAT TYPE EKKO-BEDAT,

  • LABST TYPE MARD-LABST,

LABST TYPE /UPM/GTB10-QUANTITY,

MATNR TYPE MARD-MATNR,

END OF ABCD.

DATA: LABST LIKE MARD-LABST.

select single MATNR from MARD into MARD-MATNR where LABST > 0.

select * from /UPM/GTB10 INTO CORRESPONDING FIELDS OF TABLE ABCD FOR ALL

ENTRIES IN ABCD WHERE LABST > 0.

and correct the select option.............

And,...

in the report i have write coding for downloading the data with

OPEN DATASET and

CALL FUNCTION 'GUI-DOWNLOAD'...

so tell me or give me an example idea to write the DOWNLOADING CODING...

RAJU

7 REPLIES 7
Read only

Former Member
0 Likes
1,046

CALL FUNCTION 'GUI_DOWNLOAD'

EXPORTING

filename = filename

filetype = 'ASC'

TABLES

data_tab = file_tab

  • 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

.

pass the data internal table and the fil;ename to this fm..

Read only

0 Likes
1,046

THANK U AND ALSO SEND ME THE

how can write the

OPEN DATA SET.

raju

Read only

0 Likes
1,046

HI Raju,

For download you should do three steps,

1) open the dataset in write mode

OPEN DATASET dset FOR access IN mode [position]

[ os_addition]

[error_handling].

2) transfet the data to the file.

TRANSFER dobj TO dset [LENGTH len]

[NO END OF LINE].

3) close the datset

close dataset.

PLease reward with points if helpful.

Regards,

Ravi

Read only

Former Member
0 Likes
1,047

Hi If you are Using OPEN DATSET ..

DATA: P_FNAME  TYPE RLGRAP-FILENAME.
OPEN DATASET P_FNAME IN TEXT MODE ENCODING DEFAULT FOR OUTPUT.
if sy-subrc = 0.
loop at itab.
transfer itab to P_FNAME.
endloop.
endif.

close dataset P_FNAME.
if sy-subrc = 0.

endif.

check this ...

this will store in AL11.

regards

vijay.

Read only

Former Member
0 Likes
1,046

One more example.

DATA: file TYPE string VALUE `flights.dat`,

wa TYPE spfli.

FIELD-SYMBOLS TYPE x.

OPEN DATASET file FOR OUTPUT IN BINARY MODE.

SELECT *

FROM spfli

INTO wa.

ASSIGN wa TO CASTING.

TRANSFER TO file.

ENDSELECT.

CLOSE DATASET file.

Read only

Former Member
0 Likes
1,046

Hi Raju,

<b>One more Important thing,,,

if you are using Transfer dataset there is one problem

Currency field will not transffer, for that you need to convert them to Char and use transfer.

while declaring itself you take them as char field and populate the data and use TRANSFER DATASET.</b>

regards

vijay

Read only

Former Member
0 Likes
1,046

Hi,

check this it may help you.

http://www.sapdevelopment.co.uk/file/file_updown.htm

regards,

venu.