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: 

function read_text for dispute management

Former Member
0 Kudos

We are in SAP R/3 enterprise 4.7. We are trying to find out how to get the text from Dispute Case Notes. I found CASE_GUID field in SCMG_T_CASE_ATTR table. Looks like there is correlation between this CASE_GUID field with TDNAME in STXH table. However, I couldn't find the correct link. As you know, when we run function READ_TEXT, this TDNAME will be used in Import Parameter-NAME.

Do you know how to find out the correct TDNAME in STXH table for Dispute Case Management?

Thank you.

Daud Hadi

1 ACCEPTED SOLUTION

john_flynn
Member
0 Kudos

To read the texts for a Dispute case you can use function module BDM_DISPUTE_NOTES_GET.

To use it just pass the GUID of the case. It will return the Notes in and internal table. You can then loop through that itab and read the text lines.

There are more functions related to Dispute cases in function group DISPUTE.

12 REPLIES 12

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

One thing that always seems to work for me is....

1) Create the text via the standard SAP transaction.

2) Go to SE16, enter STXH, and query the file for any text that was created by you, on today's date.

This should pull up the record for the text that you just created, now you can see the OBJECT, the ID and the NAME that was used. Sometimes the NAME is a concatenate of a couple fields. You should be able to "decode" with your knowledge of the functionality that you are working with.

Regards,

Rich Heilman

0 Kudos

Hi Rich,

Thank you for the quick response. Unfortunately, the problem is how to decode the TDNAME. I thought there is a correlation between CASE_GUID field with TDNAME, however, I couldn't find the correct link. Below is a snapshot of STXH table based on a dispute case note. The Dispute Case note number is actually 32. The Case_GUID is 3FC4501BDCF000BC000000000A360416. So, I thought it must be the first 7 char. However, it is not always the case.

Snapshot of STXH table:

MANDT 142

TDOBJECT SCMG_CASE

TDNAME 3FC4501CDCF000BC000000000A36041620060330223414

TDID 0001

Language E

TDTITLE

TDFRELES 620

Created by USHADIDA

TDFDATE 30.03.2006

TDFTIME 22:34:14

TDLRELES 620

Changed by USHADIDA

TDLDATE 30.03.2006

TDLTIME 22:34:14

How to find out the correct TDNAME value in STXH table?

Daud Hadi

0 Kudos

Well you can see the the CASE_GUID is part of it.

<b>3FC4501CDCF000BC000000000A360416</b>20060330223414

then it looks to be some date.

3FC4501CDCF000BC000000000A360416<b>20060330</b>223414

and of course, I don't know what this is

3FC4501CDCF000BC000000000A36041620060330<b>223414</b>

The key here is to find out what date that is and what 223414 might be. Use the standard transaction to see if there is any thing there that will point it out.

REgards,

Rich Heilman

0 Kudos

The last six digits are time. The date and time is basically recorded in STXH when there is an update to the dispute case note. However, a dispute case can change for various reasons (e.g. change in note, or change in an attribute). Only when there is a change in the note, this STXH table is updated. Thus, when there are changes in the dispute case, by looking at the last change date, we won't know whether the text is changed or an attribute is changed.

The issue is actually on this number:

3FC4501CDCF000BC000000000A360416

If we can figure out how SAP generate this number, it should solve the puzzle. The problem is, sometimes for different dispute case notes, it may have almost the same number, perhaps with only 2 or 3 chars difference. I couldn't find the pattern that SAP uses. In other words, for different dispute notes, sometimes the first 7 char is the same, and sometimes the first 6 char is the same. Is there a table which we can track where TDNAME in STXH is from? I assume that there must be a corresponding link between TDNAME in STXH and CASE_GUID in SCMG_T_CASE_ATTR.

0 Kudos

>>>and what 223414 might be.

it could be the timestamp..

Regards,

Suresh Datti

0 Kudos

Wow, I see your problem very clearly. Not sure why SAP forces a timestamp here.

Regards,

Rich Heilman

0 Kudos

Hi,

Can't you see this text in the TEXT EDITOR in the STANDAR TRANSACTION? If you can see that, put the editor in full screen mode.

In the Menu option Go TO, there will be a HEADER option, which will display the values for the parameters - TDNAME, TDOBJECT and TDID. Once you get that using READ_TEXT will be easy.

Regards,

Ravi

0 Kudos

In most of these cases, the TDNAME will be the key field values of the corresponding table, put together. Let us say you are talking about material texts, then it will be material number, becuase that is the key field for the material master main table MARA(of course you have to ignore MANDT here). You will typically see this table name in the CDPOS table. Alternatively, if you already know which table stores the Case data, then you can verify if this value corresponds to the key field values.

0 Kudos

Hi Ravikumar,

Could you explain more about how to see the text in Text Editor. Is there any t-code I should use? I'm hoping this will lead to the TDNAME that I am looking for. If you can give me the step by step info, that would be great.

Thank you,

Daud Hadi

naimesh_patel
Active Contributor
0 Kudos

Hello,

Go to the place where you text is.

then change the editor to SAPScript editor.

Then go to Goto > Header.

Here you can find out all related information for Read_text.

Regards,

Naimesh

john_flynn
Member
0 Kudos

To read the texts for a Dispute case you can use function module BDM_DISPUTE_NOTES_GET.

To use it just pass the GUID of the case. It will return the Notes in and internal table. You can then loop through that itab and read the text lines.

There are more functions related to Dispute cases in function group DISPUTE.

0 Kudos

This message was moderated.