Skip to Content
author's profile photo Former Member
Former Member

Sales Order type

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Oct 10, 2005 at 03:45 PM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      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

  • Posted on Oct 10, 2005 at 03:44 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 10, 2005 at 04:48 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.