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

text for code

Former Member
0 Likes
1,510

In trasaction mm02 basic data 2 we have a field in AFS fabric content code when i click on it it shows the fcc code and fcc text , the text is a combination of many different things

I need to display this text .. how do i extract it. I am sure there is a function module that combines many fields to create the text. how to find out what function module it is

1 ACCEPTED SOLUTION
Read only

Former Member
1,415

Hi,

Try giving J_3AFCCOT

Thanks,

Naren

12 REPLIES 12
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
1,415

You may be able to read this using READ_TEXT. You will need to know the text object and id. The NAME should be the material number. You can view the text object ids via transaction SE75.

Regards,

Rich Heilman

Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
1,415

If you can not figure out the text object and id, here is a little trick. Create the text as you do in MM02, just enter some text and save the material. Now go to SE16 and do a query on table STXH. Do a query using today as the creation date and your user id as the person who created it, you should get a hit, the one that you just created via MM02, here you can see the object, id, and the name. Pass these values to the READ_TEXT functino module and you should be good to go.

Of course, this is all assuming that what you are trying to get, is in fact, text. I do not have in MM02, what you are referring to, so I don't know.

Regards,

Rich Heilman

Read only

Former Member
0 Likes
1,415

Hi,

Press F1 on that field...and then press the technical info field..

Then take the data element of that field..

then goto SE12...

Give the data element..Double click on the domain..

It will have a value table..

For the texts add T at the end..

Ex..IF the table name is T005...The text table will be T005T..

Thanks,

Naren

Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
1,415

Or if the values are fix in the domain, you could also do this to retreive them. All you need is the domain name assigned to the data element in the table.


report zrich_0001.


data: idd07v type table of  dd07v with header line.

start-of-selection.




call function 'DD_DOMVALUES_GET'
     exporting
          domname        = 'RFBSK'
          text           = 'X'
          langu          = sy-langu
     tables
          dd07v_tab      = idd07v
     exceptions
          wrong_textflag = 1
          others         = 2.

loop at idd07v.
  write:/ idd07v-domvalue_l, idd07v-ddtext.
endloop.

Regards,

Rich Heilman

Read only

Former Member
0 Likes
1,415

Hi Rich

I do not get a hit

What I have in MM02 is Fabr Code which is a multiple options

0001 - 86% stretch cotton 52% vinyl

0002 - .....

0003 - .....

The code gets selected and inserted into mm02

I need to extract the text. I dont think I am creating any text here. Any ideas ?

Read only

0 Likes
1,415

I misunderstood, I think the text is either coming from a text table like Naren suggested, or by the domain. Can you tell me the field name of the code please?

Regards,

RIch Heilman

Read only

Former Member
0 Likes
1,415

Hi,

Please check my reply..And try that...

Thanks,

Naren

Read only

Former Member
0 Likes
1,415

Narendra, I have tried your solution but it does not work as it takes me to another table that contains mandt and fabric code and not the text

J_3AFCC is the field name in MARA

Read only

Former Member
0 Likes
1,415

Hi,

When you get the table...Just add T at the end of the table...You will get the text table..

Thanks,

Naren

Read only

Former Member
0 Likes
1,415

i was not able to find the text table by adding T to th beginning

J_3AFCCO is the table

Read only

Former Member
1,416

Hi,

Try giving J_3AFCCOT

Thanks,

Naren

Read only

0 Likes
1,415

Make sure that you check the domain, there could be a value range there as well. GO to MARA, on the field in question double click the data element, now double click the domain, click on the "Vales" tab, is there values there? if so, you can get the values and text using the function module mentioned above.

Regards,

Rich HEilman