Skip to Content
0
Former Member
Apr 23, 2007 at 02:03 PM

display service ac03 upload

72 Views

Hi all,

i need clarification on long text upload for ac02 (display service. in this transaction i had to upload the following fields.

asnum,astyp,bklas,meins,..etc. and also long text field.

i developed seperate program for uploading asnum,astyp,bklas,meins.

and seperate program to upload long text.

i uploaded long text based on asnum.

both the programs are working fine.

when i check in the transaction ac03 for my input data give asnum. i am not able to see the long text field data to that corresponding asnum.

below is the code wat i used to upload long text.

REPORT Z_DISPLAY_SERVICE1.

  • Internal Table for Upload of Long Texts Data

DATA: BEGIN OF itab OCCURS 0,

asnum like asmd-asnum, " Service No

text LIKE tline-tdline, " Long Text

END OF itab.

  • To create Long Text lines for CREATE_TEXT function module

DATA:BEGIN OF dt_lines OCCURS 0.

INCLUDE STRUCTURE tline. " Long Text

DATA:END OF dt_lines.

  • Variable declarations for CREATE_TEXT function module

DATA : dl_name TYPE thead-tdname, " Object Name

dl_lan TYPE thead-tdspras. " Language

  • Constants

  • Object ID for Long Text of Service Master

CONSTANTS:c_best TYPE thead-tdid VALUE 'LTXT',

c_material TYPE thead-tdobject VALUE 'ASMD'. " Object

PARAMETERS p_file LIKE rlgrap-filename."input file

  • At selection-screen on Value Request for file Name

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.

  • Get the F4 Values for the File

CALL FUNCTION 'F4_FILENAME'

EXPORTING

program_name = syst-cprog

dynpro_number = syst-dynnr

IMPORTING

file_name = p_file.

  • Start Of Selection

START-OF-SELECTION.

*To Upload Flat file

CALL FUNCTION 'UPLOAD'

EXPORTING

filename = p_file

filetype = 'DAT'

TABLES

data_tab = itab

EXCEPTIONS

conversion_error = 1

invalid_table_width = 2

invalid_type = 3

no_batch = 4

unknown_error = 5

gui_refuse_filetransfer = 6

OTHERS = 7.

  • Upload the Texts

SORT itab BY asnum.

LOOP AT itab.

dt_lines-tdformat = 'ST'.

dt_lines-tdline = itab-text.

APPEND dt_lines.

dl_lan = sy-langu.

concatenate '00000000000' itab-asnum into dl_name.

  • Call the Function Module to Create Text

CALL FUNCTION 'CREATE_TEXT'

EXPORTING

fid = c_best

flanguage = dl_lan

fname = dl_name

fobject = c_material

save_direct = 'X'

fformat = '*'

TABLES

flines = dt_lines

EXCEPTIONS

no_init = 1

no_save = 2

OTHERS = 3.

IF sy-subrc <> 0.

WRITE:/ 'Long Text Creation failed for Service No'(001),

itab-asnum.

ELSE.

WRITE:/ 'Long Text Created Successfully for Service No'(002),

itab-asnum.

ENDIF.

AT END OF asnum.

REFRESH dt_lines.

ENDAT.

ENDloop.

can any body help me in this regard y its not displaying long text for corresponding asnum. please provide solution for this.

thanks in advance.

siva