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

Help on Table Contents which are getting inserted from SAP Tcode

Former Member
0 Likes
634

Hello

I debugged the whole MM01 and MM02 but in vain. I could not understand how the tables are getting updated with a combination of values.

These are the steps.

1) Create Material from MM01 by selecting the 2-3 views(pls select the Sales Text view compulsorily).

2) It asks for Sales Org and Distribution Channel

3) Enter any Sales Org and Distribution Channel

4) At Sales Text View - Enter the Material Description.

My question is STXH table will be updated with a new record (when u create a material) which is the combination of MaterialNumberSalesOrgdistributionchannel.

The field STXH-TDNAME is equal to MaterialNumberSalesOrgDistributionchannel.

Now I have to understand how this comibination is getting attached to each other and how this has been done in SAP.

Any inputs will be useful.

Regards,

SK

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
613

Well, all long text is stored this way in R/3. You can see all of the object and ids in transaction SE75. You use the READ_TEXT function module to retrieve the text based on the OBject, ID, and Name. Usually the Name field is a concatenation of a few fields. IN your case, it is, so all you need to do is concatenate the material number field, sales org, and distch into the TDNAME field. You can also use the SAVE_TEXT funciton module to save text as well, but sometimes certain business objects do not handle the SAVE_TEXT so good, material master is one of them. So I would suggest to update any texts using the BAPI_MATERIAL_SAVEDATA.

Regards,

Rich Heilman

Hello

I debugged the whole MM01 and MM02 but in vain. I could not understand how the tables are getting updated with a combination of values.

These are the steps.

1) Create Material from MM01 by selecting the 2-3 views(pls select the Sales Text view compulsorily).

2) It asks for Sales Org and Distribution Channel

3) Enter any Sales Org and Distribution Channel

4) At Sales Text View - Enter the Material Description.

My question is STXH table will be updated with a new record (when u create a material) which is the combination of MaterialNumberSalesOrgdistributionchannel.

The field STXH-TDNAME is equal to MaterialNumberSalesOrgDistributionchannel.

Now I have to understand how this comibination is getting attached to each other and how this has been done in SAP.

Any inputs will be useful.

Regards,

SK

4 REPLIES 4
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
614

Well, all long text is stored this way in R/3. You can see all of the object and ids in transaction SE75. You use the READ_TEXT function module to retrieve the text based on the OBject, ID, and Name. Usually the Name field is a concatenation of a few fields. IN your case, it is, so all you need to do is concatenate the material number field, sales org, and distch into the TDNAME field. You can also use the SAVE_TEXT funciton module to save text as well, but sometimes certain business objects do not handle the SAVE_TEXT so good, material master is one of them. So I would suggest to update any texts using the BAPI_MATERIAL_SAVEDATA.

Regards,

Rich Heilman

Read only

0 Likes
613

Yes . READ_TEXT can be used.

I wanted to create some custom table for some business process with the same combination as key fields which are MaterialNumberSalesOrgdistributionchannel.

I wanted to check what is the logic behind concatenating these 3 fields . If ay logic or condition is involved - then I want to make use of this logic if needed in my ABAP program which involves this new custom table.

Any further inputs?

Read only

0 Likes
613

Ok, the logic is simple, if you know that the name consists of those fields, then all you need to do is concatenate these values together into one field, then pass this value to TDNAME field. That's it. Sorry that it is not more complex than that.

Regards,

RIch Heilman

Read only

0 Likes
613

Just remember that the concatenation of values is done in their internal format representation. So you have to use the material number in its internal format, sales organization and the distribution channel. So the total length will be 1822.