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: 

Read long text in CS03 transaction

bala_krishna007
Participant
0 Kudos

Hi,

I have a material , plant and BOM usage in CS03 transaction, for a particular line item I want long text in an abap program.

I know we can use READ_TEXT fm, and we can check in SE75 for the text ids.

My question is what value should be passed to READ_TEXT fm importing parameter NAME.

Thanks,

Bala

1 ACCEPTED SOLUTION

raymond_giuseppi
Active Contributor
0 Kudos

Try concatenate mandt+stlty+stlnr. Else set a brea-point at start of READ_TEXT and when reached in debug, navigate to previous code that build the keys.

Regards,

Raymond

18 REPLIES 18

Former Member
0 Kudos

In any transaction you can find out these details as :

Go to that transaction & text edit screen.

click on Menu > Goto > Header

shows details as follows:.

Text Name       xxxxxxxxx

Language        EN

Text ID         xxxx xxxxxxx xxxxx

Text object     XXXXX   XXXXXXXXXXX

Normally text id/name you need to build concatenating object id & item no etc.

0 Kudos

Hello Ashish,

Thanks for your reply.

I want to know what is combination that should be passed to importing  parameter  NAME in fm READ_TEXT for reading the item texts in CS03 transaction.

Have you tried with concatenating object id and item no. I have tried concatenating material no plant and item no  and different combinations.

Thanks,

Bala

0 Kudos

I am passing the ID as DPO and object as BOM

0 Kudos

Hi,

Just concatenate material number and item number.

I hope you are using complete 18 digit of materail number and 4 digit of item number.

Regards,

Ashish

former_member185414
Active Contributor
0 Kudos

Hello Bala,

As suggested by Ashish, you have to go to edit mode of the transaction and try saving the text. In the Long text editor, you can follow as -> Goto -> Header and pick values from there.Screenshots are below -

(Unfortunately I do not have change rights in CS02 for my system)

SO10 - Create/Edit

CS02-

BR.

0 Kudos

javascript:;Hi Ankit,

Thanks for your reply.

I had tried the way suggested by you.  I am asking what is the combination value that should be passed to NAME importing parameter in  READ_TEXT fm.

Thanks,

BALA

0 Kudos

Hello Bala,

It should a concatenation of 18 characters if material number and 4 characters of the item number.

for example:

Material Number - 7700

Item - 0010

Name to be passed should be 0000000000000077000010.

Check and revert.

BR.

0 Kudos

Hello Bala,

In fact I viewed the screen-shot before you posted. I did not reply because the value in the Text Name field here is very unconventional, thereby making the retrieval of this longtext an unknown issue.

Perhaps you are getting this value in the Short Title1. Try with this value.

Good luck

KJogeswaraRao

raymond_giuseppi
Active Contributor
0 Kudos

Try concatenate mandt+stlty+stlnr. Else set a brea-point at start of READ_TEXT and when reached in debug, navigate to previous code that build the keys.

Regards,

Raymond

0 Kudos

Hello Raymond,

This combination will be inadequate because, these texts are line itemwise. There should be line item representation too in this concatenation. This is the field STLKN from STPO table)


Regards

KJogeswaraRao

0 Kudos

Hi Experts,

Tried material and item number combination.. still not working ... I had given complete 18 characters material no. Also checked material + plant + item , mat+plant+item combination still no luck.

Thanks,

Bala Krishna 

0 Kudos

Then debug as suggested by Raymond and see how the standard program is creating the key and passing it. You can put a break point on READ_TEXT FM while in debug mode.

BR.

0 Kudos

Could you paste a copy of screen where you see this text ?

0 Kudos

0 Kudos

clicking on the text with glasses symbol over here takes me to the long text. It is in CS03 after entering material no plant and BOM usage, double click on the line  item and status/lng text tab.

0 Kudos

I tried debugging the READ_TEXT fm its checking whether the NAME parameter is * or space initially and if its not its importing catalog from memory id SAPLSTXD which is blank in our case.

IMPORT CATALOG FROM MEMORY ID 'SAPLSTXD'.


after importing the sy-subrc is 4 so its failed to import.


after this its reading table catalog with the fields passed.


CATALOG_KEY-TDOBJECT = OBJECT.

  CATALOG_KEY-TDNAME   = NAME.

  CATALOG_KEY-TDID     = ID.

  CATALOG_KEY-TDSPRAS  = LANGUAGE.

  READ TABLE CATALOG WITH KEY CATALOG_KEY.

  IF SY-SUBRC = 0.

     CATALOG_INDEX = SY-TABIX.

     MEMORY_ID+8(6) = CATALOG-ID.

Please suggest .

0 Kudos

Okay so the actual NAME seems to be concatenation of

  • MANDT
  • STLTY
  • STLNR
  • STLKN
  • STPOZ

Try with READ_TEXT for MPO / BOM once data saved.

Regards,

Raymond

0 Kudos

Hi Raymond,

Thanks for your reply its combination of the fields mentioned by you which we can see in STPO table . the name which we are passing to FM should be in STXH table.

Thanks,

Bala