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

Getting Error while uploading item text for VA01

Former Member
0 Likes
580

Hi Experts ,

Am trying to upload text for multiple line items using FM INIT_TEXT and SAVE_TEXT.

it's working for fine for single line item but for multiple line items some times it works fine.

But most of the times am getting I/O error for VBBP and salesordernumber with item number .

may i know how to solve this issue ?

3 REPLIES 3
Read only

former_member404244
Active Contributor
0 Likes
522

Hi,

Use the FM 'CREATE_TEXT'.U have to call this in a LOOP.

The values to be passed are...

ALL FUNCTION 'CREATE_TEXT'

EXPORTING

fid = lwa_text-id

flanguage = sy-langu

fname = lv_fname

fobject = lc_ekko

save_direct = c_x

fformat = lc_f

TABLES

flines = li_flines.

for each line item the lv_fname will be concatnated with order number and should be passed.

U have to fill the internal table li_flines with text values.

Regards,

Nagaraj

Read only

Former Member
0 Likes
522

First get the what are the line items numbers are exists in sales order and keep in one internal table by ascending order.

In loop put the above function module.

Each time in loop pass the existed line items with sales order number to those function module.

this will work fine.

Read only

0 Likes
522

Hi ,

I have used CREATE_TEXT even though am getting error.

for first three times the text as been created but in fourth time am getting error as

I/O error for text VBBP 0201000473000020 0001 EN .

here is my code .. how to solve this issue?

w_tdname like stxl-tdname.

data: begin of tlinetab occurs 10.

include structure tline.

data: end of tlinetab.

refresh t_fline.

  • concatenate w_sales_order '000010' into w_tdname.

loop at itab.

LOOP AT lt_itab WHERE customer = itab-customer AND

group_code = itab-group_code .

concatenate w_sales_order w_item into w_tdname.

  • Initialize the Text

call function 'INIT_TEXT'

EXPORTING

id = '0001' "Text ID

language = sy-langu

name = w_tdname

object = 'VBBP'

IMPORTING

header = fheader

TABLES

lines = tlinetab

EXCEPTIONS

id = 01

language = 02

name = 03

object = 04.

*

      • Need to fill fheader with title.

fheader-tdmacode2 = 'CREATE_TEXT'.

fheader-tdtitle = ''.

concatenate s_date lt_itab-s_date into t_fline-tdline." separated

append t_fline.

clear t_fline.

call function 'SAVE_TEXT'

EXPORTING

header = fheader

insert = ' '

savemode_direct = 'X'

IMPORTING

newheader = fheader

TABLES

lines = t_fline

EXCEPTIONS

id = 01

language = 02

name = 03

object = 04.

call function 'COMMIT_TEXT'

EXPORTING

object = 'VBBP'

name = w_tdname.

  • delete t_fline.

refresh t_fline.

clear w_tdname.

endloop.

endloop.