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

Regarding i tab

Former Member
0 Likes
405

hI,

We need to download an internal table to the Presentation Server(local workstation). Whenever we run the program, the

same file has to be saved as a separate file in sequential order. Ex: 0001.txt, 0002.txt etc. Where can we store the last file

number?

Thanks in advance,

Rachita.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
377

Hi,

SAP has a table TVARV for storing the variants.

A record may be created in TVARV for all the programs that require this kind of incremental records.

For Ex: the record could be 100Zmm10001 MM sequence rec where first part consists of client code and the program being

run. Client code is required because TVARV does not has a field for client code. The second part is the description indicating

the purpose what the record is created. This entire string may be posted in the Name field (char - 30).

The Type field ( char- 1) may be populated with P or S (Parameter or Selection)

Low field (char- 45) may be populated with '0001' when run first time and increment it by one in your program for

downloading of the internal table

Reward points if found helpful...

Cheers,

Siva Ramakrishna.

2 REPLIES 2
Read only

Former Member
0 Likes
377

you can use these function modules to download

the files and store where ever you want.

CALL FUNCTION 'F4_FILENAME'

EXPORTING

program_name = syst-cprog

dynpro_number = syst-dynnr

IMPORTING

file_name = g_fname.

IF g_fname IS NOT INITIAL.

p_efile = g_fname.

CALL FUNCTION 'GUI_DOWNLOAD'

EXPORTING

FILENAME = 'C:\test.xls'

FILETYPE = 'ASC'

WRITE_FIELD_SEPARATOR = 'X'

TABLES

DATA_TAB = itab.

Reward if usefuol.

Read only

Former Member
0 Likes
378

Hi,

SAP has a table TVARV for storing the variants.

A record may be created in TVARV for all the programs that require this kind of incremental records.

For Ex: the record could be 100Zmm10001 MM sequence rec where first part consists of client code and the program being

run. Client code is required because TVARV does not has a field for client code. The second part is the description indicating

the purpose what the record is created. This entire string may be posted in the Name field (char - 30).

The Type field ( char- 1) may be populated with P or S (Parameter or Selection)

Low field (char- 45) may be populated with '0001' when run first time and increment it by one in your program for

downloading of the internal table

Reward points if found helpful...

Cheers,

Siva Ramakrishna.