cancel
Showing results for 
Search instead for 
Did you mean: 

How to copy excel sheet to pdf form?

Former Member
0 Kudos

Hello,

I have created a table in the adobe form.I am required to copy the data of the excel sheet to the form.

When I am trying to copy the data from excel to pdf ,the whole data gets filled in the single block of the table..

Please help me how to resolve it.

Thanks,

Rosalin

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

First write code for Upload excel to internal table .

This internal table has to be passed in generated function module through the print program.

Ex) Excel to Internal table

TYPE-POOLS: truxs.

PARAMETERS: p_file TYPE rlgrap-filename.

TYPES: BEGIN OF t_datatab,

col1(30) TYPE c,

col2(30) TYPE c,

col3(30) TYPE c,

END OF t_datatab.

DATA: it_datatab type standard table of t_datatab,

wa_datatab type t_datatab.

DATA: it_raw TYPE truxs_t_text_data.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.

CALL FUNCTION 'F4_FILENAME'

EXPORTING

field_name = 'P_FILE'

IMPORTING

file_name = p_file.

START-OF-SELECTION.

CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'

EXPORTING

  • I_FIELD_SEPERATOR =

i_line_header = 'X'

i_tab_raw_data = it_raw " WORK TABLE

i_filename = p_file

TABLES

i_tab_converted_data = it_datatab[] "ACTUAL DATA

EXCEPTIONS

conversion_failed = 1

OTHERS = 2.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

END-OF-SELECTION.

LOOP AT it_datatab INTO wa_datatab.

WRITE:/ wa_datatab-col1,

wa_datatab-col2,

wa_datatab-col3.

ENDLOOP.

Then use this fn module

CALL FUNCTION 'FP_JOB_OPEN'

LOOP AT INTERNAL TABLE.

CALL FUNCTION 'GENERATED FUNCTION MODULE NAME'

ENDLOOP.

CALL FUNCTION 'FP_JOB_CLOSE'.

Thanks

Former Member
0 Kudos

hi chanshini,

My requirement is that the user can copy and paste(ctrl c and ctrlv) from the excel sheet to the adobe form as all his data is in the excel sheet.

He should simply copy it from excel and paste it in adobe form.

Is it feasible?

Thanks,

Neha

Edited by: NehaSaluja on Mar 17, 2011 12:40 PM

Edited by: NehaSaluja on Mar 17, 2011 1:07 PM