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

To get item category


I want to create the sales order programatically such that i will enter order type, plant, division, distribution channel, and sold to party, ship to party in the header level and item, quantity units and plant in the item level information then i want to pick item category automatically can any one help me regarding this

rewarding points guaranteed.....

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Nov 21, 2007 at 06:55 AM

    use bdc with table control

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Jagadish Konjarla

      no we cant fetch the item category from vbap as we are creating sales order itself after complete completion of the creation only tht data will be saved in vbap but here we want item category to create a sales order it self

      here i am giving how am i fetching the data i am using one subroutine

      FORM sales_fill_data changing P_HEADER like fs_header

      P_HEADERX like fs_headerx

      Pt_ITEM like t_item[]

      Pt_ITEMX like t_itemx[]

      P_LT_SCHEDULES_IN like t_schedules_in[]

      P_LT_SCHEDULES_INX like t_schedules_inx

      Pt_PARTNER like t_partner[].

      p_header-doc_type = w_auart.

      p_headerx-doc_type = c_x.

      p_header-sales_org = w_vkorg.

      p_headerx-sales_org = c_x.

      p_header-distr_chan = w_vtweg.

      p_headerx-distr_chan = c_x.

      p_header-division = w_spart.

      p_headerx-division = c_x.

      p_headerx-updateflag = c_i.

      fs_patnr-partn_role = c_ship.

      fs_patnr-partn_numb = w_sold.

      APPEND fs_patnr to pt_partner.

      fs_patnr-partn_role = c_sold.

      fs_patnr-partn_numb = w_ship.

      APPEND fs_patnr to pt_partner.

      loop at it_item.

      CLEAR fs_ITEM.

      fs_item-material = it_item-matnr.

      fs_item-plant = it_item-plant.

      fs_item-target_qty = it_item-menge.

      fs_item-target_qu = c_quant.

      fs_item-item_categ = it_item-itcat.

      • Updating the x tables .

      fs_itemx-updateflag = c_i.

      fs_itemx-material = c_x.

      fs_itemx-plant = c_x.

      fs_itemx-target_qty = c_x.

      fs_itemx-target_qu = c_x.

      fs_itemx-item_categ = c_x.

      APPEND fs_itemx to pt_itemx.

      APPEND fs_item to pt_item.

      W_COUNTER = W_COUNTER + 1.

      CLEAR fs_sin.

      fs_sin-itm_number = w_num.

      fs_sin-sched_line = w_LINE.

      fs_sin-req_qty = it_item-menge.

      APPEND fs_sin to p_lt_schedules_in.

      CLEAR fs_sinx.

      fs_sinx-itm_number = w_num.

      fs_sinx-sched_line = w_line.

      fs_sinx-updateflag = c_x.

      fs_sinx-req_qty = c_x.

      APPEND fs_sinx to p_lt_schedules_inx.

      w_num = w_num + 10.

      w_line = w_line + 1.

      endloop. " Loop at it_item

      ENDFORM. " sales_fill_data

      here i want it-cat to be filled automatically so tht in the selection screen i dont want to enter the item category just in transaction VA01 we will not enter it-cat but it will be taken auotmatically in the same way i want to do it

      thanks and regards

      sunil kumar mutyala

  • Posted on Nov 21, 2007 at 07:01 AM

    Hi Sunil,

    There are different types of methodology to create an sales order by passing u r mentioned things. U can use BAPI_SALESORDER_CREATEFROMDAT1 for u r requirement or u can write a BDC program to do this.


    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.