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

Error when creating sales order using BAPI_SALESORDER_CREATEFROMDAT2

Former Member
0 Likes
3,698

Hello!

I am using BAPI_SALESORDER_CREATEFROMDAT2 for creating the Sales order. But I have a problem when Iu2019m trying to create configuration. I think that parameter order_items_in-material should be generated before calling BAPI described above. I try to use order_items_in-mat_entrd, but BAPI return error message id = V1, number = 320 (No item category available (Table T184 ZAPC TEXT )).

Help me please, How I can solve this problem?

37 REPLIES 37
Read only

Former Member
0 Likes
3,194

You can solve it by understanding the error message you mentioned.

Read only

0 Likes
3,194

I checked this entry "ZAPC" in the table t184. This entry exists. Moreover, When I create sales order with the same parameters from VA01 this message didn't appear.

Read only

0 Likes
3,194

Did you check the long text of said message?

Read only

0 Likes
3,194

Yes, I checked long text. But when I'm trying to use the field order_items_in-material instead order_items_in-mat_entrd this message didn't display. But in this case, configuration is not created.

Read only

0 Likes
3,194

So in fact you have a totally different problem? You're not able to asve the configuration? In that case check the documentation on the function. There is a areference to an OSS note.

Read only

0 Likes
3,194

I read note 93091 but I didn't get any useful information. May be you know FM which gets the configuration on the entered criteria.

Read only

0 Likes
3,194

Hi Sergey,

Are you creating a sales order with configurable item.Give me more details in this.

Regards,

Madhu.

Read only

0 Likes
3,194

I use the follow code:

Unformatted code removed.

Edited by: Rob Burbank on Nov 24, 2011 10:19 AM

Read only

0 Likes
3,194

I read note 93091 but I didn't get any useful information. May be you know FM which gets the configuration on the entered criteria.

Ok.. are you creating the configuration or are you retrieving the configuration.

As for the note: it clearly describes (under section II) how to populate the internal tables to pass the configuration data. So.. unless you forgot your glasses when reading the note or were blinded by the sun reflection on your screen, i guess you didn't even read the note.

edit: i used that same note to find out how to pass the proper contents to the BAPI for the configuration.

Edited by: Maen Anachronos on Nov 24, 2011 8:05 AM

Read only

0 Likes
3,194

Hi Sergey,

Please paste your code in code format.If it is a configurable material where is the characteristics and its values .

wa_order_ref-posex = '000010'.

wa_order_ref-root_id = inst_id.

wa_order_ref-config_id = conf_id.

INSERT wa_order_ref INTO TABLE tab_order_ref

Regards,

Madhu.

Edited by: madhurao123 on Nov 24, 2011 12:37 PM

Edited by: madhurao123 on Nov 24, 2011 12:38 PM

Read only

0 Likes
3,194

What is even worse: if you scroll down that OSS note, you'll see another OSS note with a fully written out example how to build your configuration tables.

Read only

0 Likes
3,194

Unformatted code removed.

Edited by: Rob Burbank on Nov 24, 2011 10:19 AM

Read only

0 Likes
3,194

<P><STRONG>FUNCTION Z_SD_GET_TEH_COST.<BR>"----


<BR>"&nbsp; IMPORTING<BR>"&nbsp;&nbsp;&nbsp;&nbsp; REFERENCE(IS_COST_ORDER) TYPE&nbsp; ZWCLIF_COST_ORDER<BR>"&nbsp; EXPORTING<BR>"&nbsp;&nbsp;&nbsp;&nbsp; REFERENCE(EV_KBETR) TYPE&nbsp; KBETR<BR>"----


</STRONG></P>

<P><STRONG>&nbsp; DEFINE fill_prizn.<BR>&nbsp;&nbsp;&nbsp; IF is_cost_order-&amp;1 IS NOT INITIAL.<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CLEAR: ls_cfgs_value-charc,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ls_cfgs_value-value.<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ls_cfgs_value-charc = &amp;2.<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ls_cfgs_value-value = is_cost_order-&amp;1.<BR>*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ls_cfgs_value-valcode = '1'.<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; APPEND ls_cfgs_value TO lt_cfgs_value.<BR>&nbsp;&nbsp;&nbsp; ENDIF.<BR>&nbsp; END-OF-DEFINITION.</STRONG></P>

<P><STRONG>DATA: ls_header_in TYPE bapisdhd1,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ls_header_inx TYPE bapisdhd1x,</STRONG></P>

<P><STRONG>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lt_partners TYPE TABLE OF bapiparnr,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ls_partners TYPE bapiparnr,</STRONG></P>

<P><STRONG>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lt_items_in TYPE TABLE OF bapisditm,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lt_items_inx TYPE TABLE OF bapisditmx,</STRONG></P>

<P><STRONG>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ls_items_in TYPE bapisditm,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ls_items_inx TYPE bapisditmx,</STRONG></P>

<P><STRONG>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ls_cfgs_ref TYPE bapicucfg,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lt_cfgs_ref TYPE TABLE OF bapicucfg,</STRONG></P>

<P><STRONG>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lt_cfgs_value TYPE TABLE OF bapicuval,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ls_cfgs_value TYPE bapicuval,</STRONG></P>

<P><STRONG>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lt_schedules_in TYPE TABLE OF bapischdl,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ls_schedules_in TYPE bapischdl,</STRONG></P>

<P><STRONG>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lt_schedules_inx TYPE TABLE OF bapischdlx,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ls_schedules_inx TYPE bapischdlx,</STRONG></P>

<P><STRONG>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lt_cfgs_inst TYPE TABLE OF bapicuins,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ls_cfgs_inst TYPE bapicuins,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lt_cfgs_partof TYPE TABLE OF bapicuprt,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ls_cfgs_partof TYPE bapicuprt,</STRONG></P>

<P><STRONG>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lv_vbeln TYPE bapivbeln-vbeln,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lt_return TYPE TABLE OF bapiret2.</STRONG></P>

<P><STRONG>* fill header<BR>&nbsp; ls_header_in-doc_type = 'ZAPC'.<BR>&nbsp; ls_header_in-sales_org = is_cost_order-vkorg.<BR>&nbsp; ls_header_in-distr_chan = is_cost_order-vtweg.<BR>&nbsp; ls_header_in-division = '01'.<BR>&nbsp; ls_header_in-sales_off = '1011'.</STRONG></P>

<P><STRONG>&nbsp; ls_header_inx-updateflag = 'I'.<BR>&nbsp; ls_header_inx-doc_type = 'X'.<BR>&nbsp; ls_header_inx-sales_org = 'X'.<BR>&nbsp; ls_header_inx-distr_chan = 'X'.<BR>&nbsp; ls_header_inx-division = 'X'.<BR>&nbsp; ls_header_inx-sales_off = 'X'.</STRONG></P>

<P><STRONG>* fill partners<BR>&nbsp; ls_partners-partn_role = 'AG'.<BR>&nbsp; ls_partners-partn_numb = '1000000031'.&nbsp;&nbsp; " фиктивный заказчик<BR>&nbsp; APPEND ls_partners TO lt_partners.</STRONG></P>

<P><STRONG>*&nbsp; ls_items_in-material = is_cost_order-matnr.<BR>&nbsp; ls_items_in-mat_entrd = is_cost_order-matnr.<BR>&nbsp; ls_items_in-target_qty = '1'.<BR>&nbsp; ls_items_in-itm_number = '000001'.<BR>&nbsp; ls_items_in-po_itm_no = '000001'.<BR>&nbsp; ls_items_in-item_categ = 'ZCRM'.<BR>&nbsp; SELECT SINGLE meins INTO ls_items_in-target_qu<BR>&nbsp;&nbsp;&nbsp; FROM mara<BR>&nbsp;&nbsp;&nbsp; WHERE matnr = is_cost_order-matnr.<BR>&nbsp; APPEND ls_items_in TO lt_items_in.</STRONG></P>

<P><STRONG>&nbsp; ls_items_inx-itm_number = '000001'.<BR>&nbsp; ls_items_inx-item_categ = 'X'.<BR>&nbsp; ls_items_inx-po_itm_no = 'X'.<BR>*&nbsp; ls_items_inx-material = 'X'.<BR>&nbsp; ls_items_inx-mat_entrd = 'X'.<BR>&nbsp; ls_items_inx-target_qty = 'X'.<BR>&nbsp; ls_items_inx-target_qu = 'X'.<BR>&nbsp; ls_items_inx-updateflag = 'I'.<BR>&nbsp; APPEND ls_items_inx TO lt_items_inx.</STRONG></P>

<P><STRONG>* fill configuration<BR>&nbsp; ls_cfgs_ref-posex = '000001'.<BR>&nbsp; ls_cfgs_ref-config_id = '000001'.<BR>&nbsp; ls_cfgs_ref-root_id = '00000001'.<BR>&nbsp; APPEND ls_cfgs_ref TO lt_cfgs_ref.</STRONG></P>

<P><STRONG>&nbsp;ls_cfgs_value-config_id = '000001'.<BR>&nbsp; ls_cfgs_value-inst_id = '00000001'.</STRONG></P>

<P><STRONG>&nbsp; fill_prizn kod_prod 'KOD_PROD'.<BR>&nbsp; fill_prizn tlot_min 'TLOT_MIN'.<BR>&nbsp; fill_prizn tlot_max 'TLOT_MAX'.<BR>&nbsp; fill_prizn shot_min 'SHOT_MIN'.<BR>&nbsp; fill_prizn shot_max 'SHOT_MAX'.<BR>&nbsp; fill_prizn dlot_min 'DLOT_MIN'.<BR>&nbsp; fill_prizn dlot_max 'DLOT_MAX'.<BR>&nbsp; fill_prizn marka 'MARKA'.<BR>&nbsp; fill_prizn stndrt_marka 'STNDRT_MARKA'.<BR>&nbsp; fill_prizn stndrt_prod&nbsp; 'STNDRT_PROD'.<BR>&nbsp; fill_prizn tprk 'TPRK'.<BR>&nbsp; fill_prizn grot 'GROT'.<BR>&nbsp; fill_prizn vityazhka 'VITYAZHKA'.<BR>&nbsp; fill_prizn krom 'KROM'.<BR>&nbsp; fill_prizn chisl_st_pokr 'CHISL_ST_POKR'.<BR>&nbsp; fill_prizn kls_tol_pokr&nbsp; 'KLS_TOL_POKR'.<BR>&nbsp; fill_prizn proch_izg_t_lic_max 'PROCH_IZG_T_LIC_MAX'.<BR>&nbsp; fill_prizn priz_zasch_pov 'PRIZ_ZASCH_POV'.<BR>&nbsp; fill_prizn vid_pokr&nbsp; 'VID_POKR'.<BR>&nbsp; fill_prizn mark_pokr 'MARK_POKR'.<BR>&nbsp; fill_prizn mat_pokr_lic 'MAT_POKR_LIC'.<BR>&nbsp; fill_prizn plsk 'PLSK'.<BR>&nbsp; fill_prizn vid_postavki 'VID_POSTAVKI'.<BR>&nbsp; fill_prizn dressir 'DRESSIR'.<BR>&nbsp; fill_prizn travl&nbsp;&nbsp; 'TRAVL'.<BR>&nbsp; fill_prizn fsfr_min 'FSFR_MIN'.<BR>&nbsp; fill_prizn fsfr_max 'FSFR_MAX'.<BR>&nbsp; fill_prizn krmn_min 'KRMN_MIN'.<BR>&nbsp; fill_prizn krmn_max 'KRMN_MAX'.<BR>&nbsp; fill_prizn mrgn_min 'MRGN_MIN'.<BR>&nbsp; fill_prizn mrgn_max 'MRGN_MAX'.<BR>&nbsp; fill_prizn almn_min 'ALMN_MIN'.<BR>&nbsp; fill_prizn almn_max 'ALMN_MAX'.<BR>&nbsp; fill_prizn cugl_min 'CUGL_MIN'.<BR>&nbsp; fill_prizn cugl_max 'CUGL_MAX'.</STRONG></P>

<P><STRONG>&nbsp; ls_schedules_in-itm_number = '000001'.<BR>*&nbsp; ls_schedules_in-req_date = sy-datum.<BR>&nbsp; ls_schedules_in-sched_line = '0001'.<BR>&nbsp; ls_schedules_in-req_qty = '1'.<BR>&nbsp; APPEND ls_schedules_in TO lt_schedules_in.</STRONG></P>

<P><STRONG>&nbsp; ls_schedules_inx-itm_number = '000001'.<BR>&nbsp; ls_schedules_inx-sched_line = '0001'.<BR>*&nbsp; ls_schedules_inx-req_date = 'X'.<BR>&nbsp; ls_schedules_inx-req_qty = 'X'.<BR>&nbsp; ls_schedules_inx-updateflag = 'I'.<BR>&nbsp; APPEND ls_schedules_inx TO lt_schedules_inx.</STRONG></P>

<P><STRONG>&nbsp; ls_cfgs_partof-parent_id = '00000001'.<BR>&nbsp; ls_cfgs_partof-inst_id = '00000001'.<BR>&nbsp; ls_cfgs_partof-class_type = '300'.<BR>&nbsp; ls_cfgs_partof-obj_type = 'MARA'.<BR>&nbsp; ls_cfgs_partof-obj_key = is_cost_order-matnr.<BR>&nbsp; APPEND ls_cfgs_partof TO lt_cfgs_partof.</STRONG></P>

<P><STRONG>&nbsp; ls_cfgs_inst-config_id = '000001'.<BR>&nbsp; ls_cfgs_inst-inst_id = '00000001'.<BR>&nbsp; ls_cfgs_inst-obj_type = 'MARA'.<BR>&nbsp; ls_cfgs_inst-class_type = '300'.<BR>&nbsp; ls_cfgs_inst-obj_key = is_cost_order-matnr.<BR>&nbsp; APPEND ls_cfgs_inst TO lt_cfgs_inst.</STRONG></P>

<P><STRONG>&nbsp; CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'<BR>&nbsp;&nbsp;&nbsp; EXPORTING<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; order_header_in&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = ls_header_in<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; order_header_inx&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = ls_header_inx<BR>*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; testrun&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =<BR>&nbsp;&nbsp;&nbsp; IMPORTING<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; salesdocument&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = lv_vbeln<BR>&nbsp;&nbsp;&nbsp; TABLES<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = lt_return<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; order_items_in&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = lt_items_in<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; order_items_inx&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = lt_items_inx<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; order_partners&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = lt_partners<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; order_schedules_in&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = lt_schedules_in<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; order_schedules_inx&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = lt_schedules_inx<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; order_cfgs_ref&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = lt_cfgs_ref<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; order_cfgs_inst&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = lt_cfgs_inst<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; order_cfgs_part_of&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = lt_cfgs_partof<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; order_cfgs_value&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = lt_cfgs_value<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .</STRONG></P>

<P><STRONG>&nbsp; READ TABLE lt_return TRANSPORTING NO FIELDS WITH KEY type = 'E'.<BR>&nbsp; IF sy-subrc = 0.<BR>&nbsp;&nbsp;&nbsp; CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .<BR>&nbsp; ELSE.<BR>&nbsp;&nbsp;&nbsp; CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EXPORTING<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wait&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = 'X'<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .<BR>&nbsp; ENDIF.</STRONG></P>

<P><STRONG>ENDFUNCTION.</STRONG></P>

<P><STRONG></STRONG>&nbsp;</P>

<P><STRONG></STRONG>&nbsp;</P>

Read only

0 Likes
3,194

Hi Sergey,

DATA: conf_id TYPE char6 VALUE '000010', "changed

inst_id TYPE char8 VALUE '00000001',

  • configuration

wa_order_ref-posex = '000010'.

wa_order_ref-root_id = inst_id.

wa_order_ref-config_id = conf_id.

INSERT wa_order_ref INTO TABLE tab_order_ref. "BAPICUCFG

*Refinst

wa_order_refinst-posex = '000010'.

wa_order_refinst-config_id = conf_id.

wa_order_refinst-inst_id = inst_id.

INSERT wa_order_refinst INTO TABLE tab_order_refinst. "BAPICURE

*Attribute values

wa_order_value-config_id = conf_id.

wa_order_value-inst_id = inst_id. "changed

wa_order_value-charc = 'COOLANT_CHIP_DX200'. "cawn-atwrt

"wa_order_value-charc = '0000000004'.

wa_order_value-value = '2'. "cawn-atinn

INSERT wa_order_value INTO TABLE tab_order_value. "BAPICUVAL

CLEAR wa_order_value

Regards,

Madhu.

Edited by: madhurao123 on Nov 24, 2011 12:56 PM

Read only

0 Likes
3,194

Hi, Madhu.

You wrote:

wa_order_ref-root_id = inst_id.

wa_order_ref-config_id = conf_id.

Say me please, how I get inst_id and conf_id?

Read only

0 Likes
3,194

Hi Sergey,

These values i hard coded and created sales order with the required variants and its characteristics and it is working.Can you explain how you are going to pass these characteristics.You take the bapi and create a sales order from se38 by using all the parameters.

Regards,

Madhu.

Read only

0 Likes
3,194

Madhu,

I tried to do this way. This error was repeated.

No item category available (Table T184 ZAPC TEXT )

May be required to fill ls_items_inx-material instead ls_items_inx-mat_entrd? But I tried that too without result.

P.S. Did you see my code in code format?

Read only

0 Likes
3,194

I take my function module Z_SD_GET_TEH_COST and create a sales order from se37 by using follow parameters

AUART= ZAPC

VKORG= 1010

VTWEG= 02

SPART= 01

VKBUR= 1011

KUNNR = 1000000031

MATNR= HR_0103100

KWMENG= 1

KOD_PROD= ВР_971

TLOT_MIN =5

TLOT_MAX

SHOT_MIN= 1500

SHOT_MAX

DLOT_MIN =6000

DLOT_MAX

MARKA =B

STNDRT_MARKA

STNDRT_PROD= ГОСТ Р 52927-2008

TPRK =Б

GROT

VITYAZHKA

KROM =О

CHISL_ST_POKR

KLS_TOL_POKR

PROCH_IZG_T_LIC_MAX

PRIZ_ZASCH_POV

VID_POKR

MARK_POKR

MAT_POKR_LIC

PLSK

VID_POSTAVKI

DRESSIR

TRAVL

FSFR_MIN

FSFR_MAX

KRMN_MIN

KRMN_MAX

MRGN_MIN

MRGN_MAX

ALMN_MIN

ALMN_MAX

CUGL_MIN

CUGL_MAX

Read only

0 Likes
3,194

Hi Sergey,

Keep your details here.I will send you the code to create sales order with this bapi.

Regards,

Madhu.

Read only

0 Likes
3,194

Hi, Madhu,

What details do you need?

Read only

0 Likes
3,194

Hi Sergey,

I do not know whether it is against forum rules.Send me a test mail to me.I will send the code.

Regards,

Madhu

Read only

0 Likes
3,194

Hi Mudhu,

Forum rules forbid me to spread my mail.

Read only

0 Likes
3,194

Hi Sergey,

It is fine.Can you pass simple header data,item data,customer and see.Check with any material whicc is already used in existed sales order.

Regards,

Madhu.

Read only

0 Likes
3,194

When I create sales order from VA01 I see that field vbap-matnr = 'MAT1_1', vbap-matwa = 'MAT1'. Therefore 'MAT1_1' is already configurated material. When I'm using VA01 I enter 'MAT1'. Then I fill configuration parameters. As result I get sales order with 'MAT1_1'.

If I pass simple header data,item data (where item-material = 'MAT1'),customer, a sales order will create. But I want to get sales order with 'MAT1_1'. How to do this?

Read only

0 Likes
3,194

Hi ,

I did not understand your business requirement.Are you creating sales order with material and what is this MATWA.

Regards,

Madhu.

Read only

0 Likes
3,194

Hi Mudhu,

See my alternative e-mail in my business card. Can you send the code in this mail?

Read only

0 Likes
3,194

MATWA is the field of the table VBAP. In my case the fields VBAP-MATNR and VBAP-MATWA are different.

Read only

0 Likes
3,194

I try to do your way, in result I get follow return message:

S V4 233 SALES_HEADER_IN has been processed successfully

A CU 13 Internal error: 000010, 000010, NOT_ALL_INPUT_DATA_PROCESSED,

E V4 248 Error in SALES_ITEM_IN 000010

Read only

0 Likes
3,194

Hi Sergey,

Did you pass all the characteristics.Using the same code i am able to create sales order successfully.

Regards,

Madhu.

Read only

0 Likes
3,194

Hi Mudhu,

I pass all the characteristics. Say me please, in VBAP table the field matnr = matwa = 'C100000' after create sales order?.

Read only

0 Likes
3,194

Hi Sergey,

I do not know the importance of this field.I did not pass that and i am able to create it.You also try with out that field and see.

Regards,

Madhu.

Edited by: madhurao123 on Nov 25, 2011 11:52 AM

Read only

0 Likes
3,194

Hi Madhu,

I tried to fill parameters BAPI as you advised.

Can you see VBAP table and say me please values of fields MATWA and MATNR after creating your sales order?

Read only

0 Likes
3,194

Hi Sergey,

I have seen this.The file filled automatically in vbap with the same material.I think you can also see by leaving that field.

Regards,

Madhu.

Read only

0 Likes
3,194

Thank you Madhu!

May be our business requirements do not allow to create sales order in this way.

Read only

0 Likes
3,194

Hi Sergey,

That is fine.Please check once again and see.

Regards,

Madhu.

Read only

0 Likes
3,194

Hi Madhu,

Did you use FM CUSE_SELECT_MATERIAL_VARIANTS ever?

Read only

0 Likes
3,194

Hi,

I did not use before but we can get all characteristics and it is values from there.

Regards,

Madhu.