Skip to Content
author's profile photo Former Member
Former Member

display service ac03 upload

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Apr 23, 2007 at 02:17 PM

    Hi Siva,

    That may not be a problem . The comit_text fm is already called inside the create_text fm.

    I am doubtfu about this statement.

    concatenate '00000000000' itab-asnum into dl_name..

    What are you trying to here?

    If want to add zeroes infront of asnum, use the fm CONVERSION_EXIT_ALPHA_INPUT instead of that concatenate statement.

    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

    EXPORTING

    input = itab-asnum

    IMPORTING

    output = dl_name.

    Regards,

    Ravi

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      hi ravi,

      i dont want any leading zeros for asnum.

      i commented that concatenate statement.now wen i check the stxh table there it is not displaying asnum . but its showing it was created.

      in the above code wat i pasted i dont want to display the leading zeros,wen i comment it is not displaying the asnum input data wat i gave in text file in stxh.

      can u help me in this regard.

  • Posted on Apr 23, 2007 at 02:05 PM

    Hi siva,

    Did you use the COMMIT_TEXT FM once the creation of text is successful?

    Regards,

    Ravi

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      hi ravikanth,

      thanks for ur quick response. i didnt use commit_text function module. the code provided there is the thing i used. can u help me in this regard, and modify the above program to include commit _text function module.sinc e i am new to bdc.

      thanks in advance

      siva

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.