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

Validate Text Object/Id for sales Docs

Former Member
0 Likes
3,031

Hi,

WE have aprogram that updates header and item texts for sales documents. The problem is that the users sometimes give the wrong Object/Id combinations for sales docs and the BAPI is not giveng any error messages. Is there any method to validate if a Textobject/Id is valid for a particular sales document type?

Regards,

Hari.

Hi,

WE have aprogram that updates header and item texts for sales documents. The problem is that the users sometimes give the wrong Object/Id combinations for sales docs and the BAPI is not giveng any error messages. Is there any method to validate if a Textobject/Id is valid for a particular sales document type?

Regards,

Hari.

20 REPLIES 20
Read only

Former Member
0 Likes
2,607

I am afraid not. Because it will be the same TEXT OBJECT and TEXT ID for a given TEXT (HEADER / ITEM ...) for all the documents.

What I am unable to understand is why is that user is manually choosing the TDOBJECT and TDID. It should more like VA02, where in he chooses HEADER TEXT / ITEM TEXT / ITEM DELIVERY NOTE, then you internall set the values for the parameters

Regards,

Ravi

Read only

0 Likes
2,607

Hi Ravi,

This is a batch program that reads in a file and updates the texts for orders. I think you got my question wrong. For e.g if the input file contains texts for ZFOR ( this is a custom type we have for forecasts) type orders, and the user put in VBBK/01 which is not there in the text determintaion procedure for that document type, i need to give an error message.

Regards,

Hari.

Read only

0 Likes
2,607

If that is the case you can validate against the TTXID table where in you check for the combination and existence of the TDOBJECT and TDID.

Regards,

Ravi

NOte : Please mark all the helpful answers and close the thread if the question is answered

Read only

0 Likes
2,607

Hi Ravi,

This table does not have the information at a order type level. I need to do the validation, i.e if a text object/id is valid for a particular order type.

Read only

0 Likes
2,607

If you are modifying existing tables, In that case STXH and STXL are the only table that you can help you.

Else, fire a READ_TEXT and then see the output to see if its a valid parameter and do the SAVE_TEXT / BAPI whichever one you are doing.

Again, these paramaters are not specific to the ORDER TYPE.

Regards,

Ravi

Message was edited by: Ravikumar Allampallam

Read only

0 Likes
2,607

Is there any configuration table where i can get all valid textobject/Id's that are maintaied for an order type?

Regards,

Hari.

Read only

0 Likes
2,607

Attaching a TEXT OBJECT / ID to a specific order is a transaction and not a configuration. At the same time as I said the texts are attached to a order type, as the texts will have to be valid for all the order types.

So, if at all there is any config, that is in TTXID table.

Regards,

Ravi

Note : Please mark the helpful answers

Read only

0 Likes
2,607

Hi Ravi,

Yes, that is what i am looking for. The table that can give me the text objects (not transaction data) valid for a order type. like we define that VBBK/001 is a valide text for TA order type.

Read only

Former Member
0 Likes
2,607

Hi harikrishnan,

If it is a slaes order header text, then the text object /id can be validated against VBAK table.

select single *

from VBAK

where vbeln = <Text Object>.

For Item texts you can validate against VBAP.

select single *

from VBAP

where vbeln = <10 characters or Text Object>

and posnr = <Remaining characters of Text Object>.

Regards,

ravi

Read only

Former Member
0 Likes
2,607

Hi Hari,

Have you looked table <b>TTXG</b> and <b>TTXGT</b>?

Hope this will help.

Regards,

Ferry Lianto

Read only

0 Likes
2,607

The link is through the document type. TVAK has the order type information. Associated to it is a text procedure which is stored in TTXG. Associated with each text procedure, are text objects and text ids, which are stored in TTXS.

Read only

0 Likes
2,607

Hi Srini,

Thanks for the Info. But i found that TTXS contains all the text ids, but TTXER contain the ones that actually appear on VA02. I THINK that the missing step here is that you should look at the field on the TTXER table called "Reference/dupl.".

If there is an X in that field, then those are REALLY the only Text IDs that are active in a particular Text procedure. Am i correct in assumnng this?

Read only

0 Likes
2,607

TTXER is the one that stores what text ids are relevant to a text determination procedure. So here, if I give a text determination procedure of 01(=sales header), object = VBBK, I get all the texts associated with the sales order header. The field you are referring to will only tell whether the text is referenced or duplicated (copied).

Read only

Former Member
0 Likes
2,607

Access sequence table TTXZ also comes into picture here.

Read only

0 Likes
2,607

I see that TVAK has '08' as the text determination procedure for one order type. Header texts when i checked is correct . But item texts is VBBP 01 as seen from transaction VOTXN. Can you please tell me which table gives the item procedure?

Read only

0 Likes
2,607

Oh sorry, it is TVAP, i got it thanks.

Read only

0 Likes
2,607

Same TTXER, TDOBJECT = VBBP and TXTGR = 01. Why you are not getting the text ids like this?

What is your requirement? Why are you reading config?

Read only

0 Likes
2,607

Ok, yes, item text procedures are tied to item categories. That is why you need to take the item category to find the procedure assigned to it.

Read only

0 Likes
2,607

Hi Srini,

We have a batch Job that updates texts for sales documents. The program takes an input file that has order no/line/text object/id and text. Some times users put the wrong text object/id. So we need to validate before using the BAPI if that object/id is valid for that order/line and give an error message if not found

Read only

0 Likes
2,607

See if SD_TEXTID_TEXTPROCEDURE_CHECK will help.