cancel
Showing results for 
Search instead for 
Did you mean: 

problem uploading standard texts

Former Member
0 Kudos
217

I am uploading standard texts from text file onto SAP.

I recorded it properly with the data, but while uploading I face this problem. For example the foll text

"Price will be NY's posted price at Slaugxxxx Bio Plant on the day of deliveries."

It is uploading only till "del" of deliveies", i.e everything other than 'iveries." is getting uploaded into the first line of the transaction so10. The rest of the text is not going to the next line. How do I solve this problem. Can you help me out.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

U r doing batch input for this ?

It is better to Use save_text..in that u have one internal table called lines..just set the lines there..

Former Member
0 Kudos

Which program are you using for the upload?

Message was edited by: barca23

Former Member
0 Kudos

I am not using any standard program for uploading.

Is there any standard program for uploading 'Standard Text' onto SAP?

However it is just a recording that I did, and its my own custom BDC program for uploading data. If you read my previous message carefully you'll konw my problem well. I am sure someone over here would have faced the same problem

Former Member
0 Kudos

Use lsmw for uploading with the following object type:

Object 0001 Long texts

Method 0001 (No selection)

Program Name /SAPDMC/SAP_LSMW_IMP

Program Type D Direct Input

Former Member
0 Kudos

I don't think I can use LSMWs.

Former Member
0 Kudos

Ok,

Use Function module "SAVE_TEXT".

It's the easier solution.

Former Member
0 Kudos

Can you tell me how to use this module SAVE_TEXT

Former Member
0 Kudos

CALL FUNCTION 'SAVE_TEXT'

EXPORTING

HEADER = ITAB_HEADER

SAVEMODE_DIRECT = 'X'

TABLES

LINES = ITAB_LINES.

ITAB_HEADER-TDNAME = <obj name>

ITAB_HEADER-TDID = <object id>

ITAB_HEADER-TDSPRAS = SY-LANGU.

ITAB_HEADER-TDLINESIZE = 72.

ITAB_LINES-TDFORMAT = '*'.

ITAB_LINES-TDLINE = < first 72 char>

append ITAB_LINES.

ITAB_LINES-TDFORMAT = '/'.

ITAB_LINES-TDLINE = < 2nd 72 char>

append ITAB_LINES.

ITAB_LINES-TDFORMAT = '/'.

ITAB_LINES-TDLINE = < 3rd 72 char>

append ITAB_LINES.

.....

Former Member
0 Kudos

Hey i figured out a different solution using some logic

*This is the internal table having the list of

*standard texts to be *uploaded from a *source file.

LOOP AT tb_stdtext.

DATA : lv_textline(40) TYPE c.

DATA : lv_zero TYPE i VALUE 0,

lv_seven2 TYPE i VALUE 72,

lv_loopcount(2) TYPE n VALUE '02',

lv_loopvalue TYPE i,

lv_data(1000) TYPE c,

lv_buff(72) TYPE c,

lv_strlen TYPE i.

lv_textline = 'RSTXT-TXLINE( )'.

MOVE lv_loopcount0(2) TO lv_textline13(2).

PERFORM bdc_dynpro USING 'SAPLSTXX' '1100'.

PERFORM bdc_field USING 'BDC_CURSOR'

lv_textline.

PERFORM bdc_field USING 'BDC_OKCODE'

'=EDNP'.

lv_loopvalue = lv_strlen / 72 + 1.

DO lv_loopvalue TIMES.

MOVE lv_loopcount0(2) TO lv_textline13(2).

MOVE lv_data+lv_zero(lv_seven2) TO lv_buff.

PERFORM bdc_field USING lv_textline lv_buff.

lv_loopcount = lv_loopcount + 1.

lv_zero = lv_seven2 .

lv_seven2 = lv_seven2 + 72.

IF lv_seven2 > lv_strlen.

lv_seven2 = lv_strlen.

ENDIF.

ENDDO.

lv_loopcount = lv_loopcount - 1.

MOVE lv_loopcount0(2) TO lv_textline13(2).

PERFORM bdc_dynpro USING 'SAPLSTXX' '1100'.

PERFORM bdc_field USING 'BDC_CURSOR'

lv_textline.

PERFORM bdc_field USING 'BDC_OKCODE'

'=TXBA'.

PERFORM bdc_dynpro USING 'SAPLSPO1' '0100'.

PERFORM bdc_field USING 'BDC_OKCODE'

'=YES'.

PERFORM bdc_dynpro USING 'SAPMSSCE' '1100'.

PERFORM bdc_field USING 'BDC_CURSOR'

'RSSCE-TDNAME'.

PERFORM bdc_field USING 'BDC_OKCODE'

'=TXBA'.

PERFORM bdc_field USING 'RSSCE-TDNAME'

tb_stdtext-tdname.

PERFORM bdc_field USING 'RSSCE-TDID'

tb_stdtext-tdid.

PERFORM bdc_field USING 'RSSCE-TDSPRAS'

tb_stdtext-tdspras.

ENDIF.

lv_zero = 0.

lv_seven2 = 72.

lv_loopcount = '02'.

lv_loopvalue = 0.

PERFORM bdc_transaction USING 'SO10'.

ENDLOOP.

Former Member
0 Kudos

Sorry in the earlier message

LOOP AT tb_stdtext should be written after the data declaration and initialization.