Application Development 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: 

upload long field

Former Member
0 Kudos

hi guys,

I am uploading the data for open AR items. In that for one field ie LONGDESCRIPTION the length of the field is 4000 charecters. How to handle this filed. How to read this field and upload the data for this field.

In the spec it is clearly mentioned not to split the field.

How to handle it can anyone guide me plzzzzzzzzzz

give you the points for best answers..........

Thanks,

SRI

7 REPLIES 7

Former Member
0 Kudos

Hi,

Create standard text SO10 and store the text name in the field you need.

You can sccess the text wherever you need by READ_TEXT

0 Kudos

Hi Sree,

can you explain me clealry.... plz

I don't have any idea about it

SRI

Former Member
0 Kudos

Hi,

You need to create the Long texts fieds in the SO10, then you can use the READ_TEXT function module to read the long text in to a Internal tabel

Regards

Sudheer

0 Kudos

sudheer,

I am getting the data in the flat file. only for one file i am getting the long text like this. So if i create one field in SO10, how to read the long text data into that particular field and how to relate that to my uploding data....

do u have any sample code like that.....

SRI

Former Member
0 Kudos

Hi Sri,

Goto tcode SO10. Give a name for your text . in the next screen you can type in the long text you want to store. This will be stored in that standard text variable in the system.

There is a FM available to read this READ_TEXT, where you have to give the text name as input and which will return the result into an internal table of type txline.

I hope this is your requirement. let me know if u need any more info

0 Kudos

Sree,

I am not asking about the reading of the text only...

I have to upload the text also...

Like reading the text upto 255 charecters then appending to one variable then calling the save_text like that

can u give the clear idea if you understood what i said...

One more thing this standard text field is already created...

SRI

0 Kudos

Hi,

You can split the text and upload after the call transaction directly.

DATA : V_START TYPE I VALUE 0.

DATA : V_LENGTH TYPE I VALUE 132.

DATA : V_LEN TYPE I.

DATA : V_EXIT.

DATA : V_TMP TYPE I.

V_LEN = STRLEN( P_DESC ).

DO.

IF SY-INDEX EQ 1.

MOVE : C_FORMAT TO TLINE-TDFORMAT.

IF V_LEN LT V_LENGTH.

MOVE V_LEN TO V_LENGTH.

MOVE C_YES TO V_EXIT.

ENDIF.

IF V_LENGTH > 0.

MOVE : P_DESC+V_START(V_LENGTH) TO TLINE-TDLINE.

ENDIF.

ELSE.

ADD V_LENGTH TO V_START.

V_TMP = V_START + V_LENGTH.

IF V_TMP GE V_LEN.

V_LENGTH = V_LEN - V_START.

MOVE C_YES TO V_EXIT.

ENDIF.

MOVE : C_EXTEND TO TLINE-TDFORMAT.

IF V_LENGTH > 0.

MOVE : P_DESC+V_START(V_LENGTH) TO TLINE-TDLINE.

ENDIF.

ENDIF.

APPEND TLINE TO IT_LNS.

IF NOT V_EXIT IS INITIAL.

EXIT.

ENDIF.

ENDDO.

Thanks,

Chaitanya.