cancel
Showing results for 
Search instead for 
Did you mean: 

Sales Order type

Former Member
0 Kudos

Hello,

I need to get order type by passing sales document number(VBELN). I am getting Order number from VBFA table but I am unable to get order type.

If we chack in vf03 by giving doc.number under menu GOTO->Header->Texts Here we can see the License Type in Description.

I need to pick that value by passing S.doc number and this text for some function module.

I am not sure which function module is useful here.

Please help me in this.

Thanks,

Srini

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Srinivas,

If you are trying to read the text of a document, then the function module is READ_TEXT. You need to pass the TEXT ID, OBJECT, TEXT NAME to get the text.

Let me know if this solves your problem.

Regards,

Ravi

Note : If this helps you, please reward points.

Former Member
0 Kudos

Hi Ravi

Please let me know the parameter values for this function module like what is TEXT ID,OBJECT, TEXT NAME.

Thanks for your help.

Srinivas

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Oh, sorry, I thought you were talking about the order type. Yes, use the READ_TEXT function module. You will need to find the ID and OBJECT of the text. You can use SE75 to figure this out. Then look at one of these objects/ids in STXH table to see what the structure of the NAME is. Probably sales document number.

The object is probably VBBK, I'n not sure what the ID wouid be.

Regards,

Rich Heilman

Former Member
0 Kudos

Srinivas,

Can you tell me what SALES document you are using (ORDER / DELIVERY etc)?

Actually, when you go to long TEXT screen, MENU option GOTO--> HEADER should work. Remember, you will have to be in the full mode of the TEXT edit option. For example if its a sales order 191 and you are editing Header text, the values will be

Text Name 0000000191

Language EN

Text ID 0001 -


Form Header

Text object VBBK -


Sales Header texts

Hope this solves the issue.

Regards,

Ravi

note : Please reward points of this helps you.

Former Member
0 Kudos

Hi Sri,

Seems you are confusing . VF03 is for billing doc display whereas in you initial post you mention sales order number.

For Sales Order Header Text

Text ID - VBBK

Text Name - <ORDER_NUM>

Text ID - Depends on which header text you are looking at . in Se16 see valid values in TTXID table giving text object as VBBK.

( You can also cehck directly in table STXH , using VBBK / <ORDER_NUM> to find the id. ).

Cheers

Former Member
0 Kudos

Hi Heilman and Ravi,

Your answers are very helpfull to me. I am using sales Order.

But stil I am not able to get the order text.

what might me the problem, I am passin all values as you said.

Thanks,

Srinivas

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Please post your code. Thanks.

Regards,

Rich Heilman

Former Member
0 Kudos

Hi Sri

A sales order has a number of header texts . Just goto Se16 -> STXH . In text object -> VBBK , Text name -> Sales Order Number . Excute -> you will find the corresponding text IDs . For each type of header text there is an ID . In STXH you will only see the IDs which are maintained for a particular order. To see all valid text ids for sales order goto table TTXID with object -> VBBK.

Cheers

Answers (3)

Answers (3)

0 Kudos

Sales order type ZDM1 (Only Considering the order for which the delivery is not completed/Shipment not fulfilled) can you please suggest what should I do in this case?

Former Member
0 Kudos

Srinivas,

Your requirement is little confusing here. You used three different words/phrases here, <b>order type, sales document number and VF03</b>.

If you want to know the order type, go to VBAK with your sales order number and you will find the order type in AUART. If you want the header texts from the billing document, but you have only sales order number, then you need to do the following: Go to VBFA where VBELV = your sales document number, POSNV = your sales order item number(if you have one invoice for one order, then you don't need this), VBTYP_N = 'M' and VBTYP_V = 'C'. This should give you the invoice number in the field VBFA-VBELN.

Using this invoice number, you call READ_TEXT as already explained to you by others here. <b>Please don't forget to use the internal representation of invoice number/order number when you are calling the function module.</b>

Please let us know if you are still facing the problem and if resolved, please reward and close.

Srinivas

Former Member
0 Kudos

Hello All,

My problem solved, Thanks for your help.

Regards,

Srinivas

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Just do a select against VBAK.

report zrich_0002.


data: xvbak type vbak.
data: xtvakt type tvakt.
parameters: p_vbeln type vbak-vbeln.


select single * into xvbak
           from vbak
                where vbeln = p_vbeln.

select single * from tvakt into xtvakt
                   where spras = sy-langu
                     and auart = xvbak-auart.

write:/ p_vbeln, xvbak-auart, xtvakt-bezei.

Regards,

Rich Heilman