Application Development 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: 

BAPI_SALESORDER_CREATEFROMDAT2 configure error information

Former Member
0 Kudos
1,522

hi every body:

I use BAPI_SALESORDER_CREATEFROMDAT2 to creat a SO ,when i need to configure it's item, the thing come out

"S V4 233

SALES_HEADER_IN has been processed successfully

A CU 013

Internal error: 10, 000010, NOT_ALL_INPUT_DATA_PROCESSED,

E V1 331

Item 000010 does not exist"

I don't know the reason,

I Have used 'va01' to creat one so and used

"BAPISDORDER_GETDETAILEDLIST" get the corresponding configure parameters,

I don't know the reasn now.

6 REPLIES 6

FredericGirod
Active Contributor
0 Kudos
141

Hi Leibnitz,

Are you sure that you have put ITEM 10 into others tables ?

Rgd

Frédéric

0 Kudos
141

hi, i post my main code ,

DEFINE fill_upd.

if &1 ne space.

&2 = 'X'.

endif.

END-OF-DEFINITION.

DEFINE convert_matnr.

call function 'CONVERSION_EXIT_MATN1_INPUT'

exporting

input = &1

importing

output = &1

exceptions

length_error = 1

others = 2.

if sy-subrc <> 0.

message e398 with 'transfer error'.

endif.

END-OF-DEFINITION.

  • the header

wa_order_header_in-doc_type = doc_type.

CALL FUNCTION 'CONVERSION_EXIT_AUART_INPUT'

EXPORTING

input = wa_order_header_in-doc_type

IMPORTING

output = wa_order_header_in-doc_type.

fill_upd wa_order_header_in-doc_type wa_order_header_inx-doc_type.

wa_order_header_in-sales_org = sales_or.

fill_upd wa_order_header_in-sales_org wa_order_header_inx-sales_org.

wa_order_header_in-distr_chan = distr_ch.

fill_upd wa_order_header_in-distr_chan wa_order_header_inx-distr_chan.

wa_order_header_in-division = division.

fill_upd wa_order_header_in-division wa_order_header_inx-division.

wa_order_header_in-req_date_h = sy-datum.

fill_upd wa_order_header_in-req_date_h wa_order_header_inx-req_date_h.

wa_order_header_in-date_type = '1'.

fill_upd wa_order_header_in-date_type wa_order_header_inx-date_type.

wa_order_header_in-purch_no_c = '1234567'.

fill_upd wa_order_header_in-purch_no_c wa_order_header_inx-purch_no_c.

wa_order_header_in-ord_reason = ord_reas.

fill_upd wa_order_header_in-ord_reason wa_order_header_inx-ord_reason.

  • the item

wa_order_items_in-material = material.

convert_matnr wa_order_items_in-material.

fill_upd wa_order_items_in-material wa_order_items_inx-material.

wa_order_items_in-short_text = maktx.

fill_upd wa_order_items_in-short_text wa_order_items_inx-short_text.

wa_order_items_in-target_qty = '2'.

fill_upd wa_order_items_in-target_qty wa_order_items_inx-target_qty.

wa_order_items_in-target_qu = target_q. "

fill_upd wa_order_items_in-target_qu wa_order_items_inx-target_qu.

wa_order_items_in-po_itm_no = '000010'.

fill_upd wa_order_items_in-po_itm_no wa_order_items_inx-po_itm_no.

wa_order_items_in-target_qty = '1'.

APPEND wa_order_items_in TO i_order_items_in.

APPEND wa_order_items_inx TO i_order_items_inx.

wa_order_partners-partn_role = 'AG'.

wa_order_partners-partn_numb = sp.

APPEND wa_order_partners TO i_order_partners.

wa_order_partners-partn_role = 'WE'.

wa_order_partners-partn_numb = sh.

APPEND wa_order_partners TO i_order_partners.

wa_order_schedules_in-itm_number = 10.

wa_order_schedules_inx-itm_number = 10.

wa_order_schedules_in-req_date = sy-datum.

fill_upd wa_order_schedules_in-req_date

wa_order_schedules_inx-req_date.

wa_order_schedules_in-req_qty = '2'.

fill_upd wa_order_schedules_in-req_qty

wa_order_schedules_inx-req_qty.

APPEND wa_order_schedules_inx TO i_order_schedules_inx.

APPEND wa_order_schedules_in TO i_order_schedules_in.

wa_order_conditions_in-itm_number = 10.

wa_order_conditions_inx-itm_number = 10.

wa_order_conditions_in-cond_type = cond_ty.

wa_order_conditions_inx-cond_type = cond_ty.

wa_order_conditions_in-applicatio = 'V'. "Application

wa_order_conditions_in-condorigin = 'C'. "Condit.origin

wa_order_conditions_in-condclass = 'B'. "Condition class

  • Calculation type for condition

wa_order_conditions_in-calctypcon = 'C'.

*Condition control Changed manually

wa_order_conditions_in-condcntrl = 'C'.

wa_order_conditions_in-condchaman = 'X'. "Changed manual

wa_order_conditions_in-cond_value = cond_v.

fill_upd wa_order_conditions_in-cond_value

wa_order_conditions_inx-cond_value.

wa_order_conditions_in-currency = currency.

fill_upd wa_order_conditions_in-currency

wa_order_conditions_inx-currency.

wa_order_conditions_in-cond_p_unt = '1'.

fill_upd wa_order_conditions_in-cond_p_unt

wa_order_conditions_inx-cond_p_unt.

wa_order_conditions_in-cond_unit = target_q.

fill_upd wa_order_conditions_in-cond_unit

wa_order_conditions_inx-cond_unit.

*for later ersion

  • WA_ORDER_CONDITIONS_IN-ACCOUNTKEY = 'ERL'.

wa_order_conditions_inx-updateflag = 'U'.

APPEND wa_order_conditions_inx TO i_order_conditions_inx.

APPEND wa_order_conditions_in TO i_order_conditions_in.

  • WA_ORDER_CFGS_REF-POSEX = WA_ORDER_ITEMS_IN-PO_ITM_NO.

wa_order_cfgs_ref-posex = '000010'.

wa_order_cfgs_ref-config_id = '000001'.

wa_order_cfgs_ref-root_id = '00000001'.

APPEND wa_order_cfgs_ref TO i_order_cfgs_ref.

wa_order_cfgs_inst-config_id = '000001'.

wa_order_cfgs_inst-inst_id = '00000001'.

wa_order_cfgs_inst-obj_type = 'MARA'.

wa_order_cfgs_inst-class_type = '300'.

wa_order_cfgs_inst-obj_key = material.

APPEND wa_order_cfgs_inst TO i_order_cfgs_inst.

  • wa_order_cfgs_part_of-config_id = '000001'.

  • wa_order_cfgs_part_of-parent_id = '000001'.

  • wa_order_cfgs_part_of-inst_id = '000001'.

  • wa_order_cfgs_part_of-part_of_no = '000001'.

  • APPEND wa_order_cfgs_part_of TO i_order_cfgs_part_of.

*

wa_order_cfgs_value-config_id = '000001'.

wa_order_cfgs_value-inst_id = '00000001'.

wa_order_cfgs_value-charc = 'Z_DEMO_BP'.

wa_order_cfgs_value-value = '01'.

APPEND wa_order_cfgs_value TO i_order_cfgs_value.

  • wa_order_cfgs_value-config_id = '000001'.

  • wa_order_cfgs_value-inst_id = '00000001'.

  • wa_order_cfgs_value-charc = 'Z_DEMO_CBR'.

  • wa_order_cfgs_value-value = '2005.11.03'.

  • APPEND wa_order_cfgs_value TO i_order_cfgs_value.

wa_order_cfgs_value-config_id = '000001'.

wa_order_cfgs_value-inst_id = '00000001'.

wa_order_cfgs_value-charc = 'Z_DEMO_DL'.

wa_order_cfgs_value-value = '02'.

APPEND wa_order_cfgs_value TO i_order_cfgs_value.

wa_order_cfgs_value-config_id = '000001'.

wa_order_cfgs_value-inst_id = '00000001'.

wa_order_cfgs_value-charc = 'Z_DEMO_DY'.

wa_order_cfgs_value-value = '01'.

APPEND wa_order_cfgs_value TO i_order_cfgs_value.

0 Kudos
141

my version IS 4.6c

anyone know the reason ,system's bug or my program's problem?

0 Kudos
141

Hi!

First of all refer to SAP Note 774346 - Composite SAP Note Configuration. Here you can find note links to rules for populating configuration structures for BAPI.

Then, as you've mentioned you proceed as BAPISDORDER_GETDETAILEDLIST returuns configuration structures. That's right, but here you have to check that SAP Note 821191 is implemented in your system - otherwise BAPISDORDER_GETDETAILEDLIST returns incorrect results in some cases.

As I can see from your source you missed some structures.

Generally you have to provide:

ORDER_ITEMS_IN

ORDER_SCHEDULES_IN

ORDER_CFGS_REF

ORDER_CFGS_REFINST

ORDER_CFGS_INST

ORDER_CFGS_VALUE

and ORDER_CFGS_PART_OF if you have configuration with multilevel BOM explosion.

Corresponding links between structures are described in notes mentioned above.

And finally you can use transaction CUTRC which is described in SAP Note 800863 for tracing internal errors in variant configuration through BAPI (if this is your case).

Regards,

Maxim.

0 Kudos
141

Hi,

thanks all of you I have resolved my problem.

the reason is i did not fill the configure parameter wholly, I try to use BAPISDORDER_GETDETAILEDLIST and get it's wholly configure table

order_cfgs_curefs_out = lt_curefs

order_cfgs_cucfgs_out = lt_cucfgs

order_cfgs_cuins_out = lt_cuins

order_cfgs_cuprts_out = lt_cuprts

order_cfgs_cuvals_out = lt_cuvals

then use move-corresponding to the structure of

BAPI_SALESORDER_CREATEFROMDAT2

then it ran well!!

0 Kudos
141

Now occurs a new things It can not be used as RFC in nonew sap system just like IBM Lotous Notes

that is to say ,in none sapsystem, configuration can not be generate for a salesorder.but it runs well in sap use this function.