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

bapi "BAPI_INQUIRY_CREATEFROMDATA2" error for configurable items

Former Member
0 Likes
961

Dear Experts,

I am uploading customer inquiry through bapi " BAPI_INQUIRY_CREATEFROMDATA2"  , Without passing configurable items it is uploading

successfully, but when we are passing configurable items in this bapi (for this we are passing PO_ITEM_NO = 000010 as item number)

it is giving erros,

1. Internal error: 000010, 000010, NOT_ALL_INPUT_DATA_PROCESSED_AND_INCONSISTENT,

2. Error in SALES_ITEM_IN 000010

please help me in this.

4 REPLIES 4
Read only

Former Member
0 Likes
836

Dear Experts ,

I am pasting my code , please correct me .

the problem is when i am uploading through variant configuration it is not uploading ,but when i am uploading without variant configuraton it is uploading suucessfully , i am trying past 1 week ,and i am checking sdn forums but i didn't get the solution.

data : wa_header TYPE BAPISDHD1,
it_items
TYPE TABLE OF BAPISDITM ,
wa_items
TYPE BAPISDITM,
it_partners
TYPE TABLE OF BAPIPARNR,
wa_partners
TYPE BAPIPARNR,
it_schedules
TYPE TABLE OF  BAPISCHDL,
wa_schedules
TYPE  BAPISCHDL,
it_conditions
TYPE TABLE OF BAPICOND ,
wa_conditions
TYPE BAPICOND,

it_ref
TYPE TABLE OF BAPICUCFG,
wa_ref
TYPE BAPICUCFG,
it_inst
TYPE TABLE OF BAPICUINS,
wa_inst
TYPE BAPICUINS,
it_part
TYPE TABLE OF BAPICUPRT,
wa_part
TYPE BAPICUPRT,
it_value
TYPE TABLE OF BAPICUVAL ,
wa_value
TYPE BAPICUVAL,
it_refinst
TYPE TABLE OF BAPICUREF,
wa_refinst
TYPE BAPICUREF,
wa_headerx
type BAPISDHD1X,
it_itemx
TYPE TABLE OF  BAPISDITMX,
wa_itemx
TYPE  BAPISDITMX,
it_conditionx
TYPE TABLE OF BAPICONDX ,
wa_conditionx
TYPE BAPICONDX ,
it_schedulex
TYPE TABLE OF  BAPISCHDLX ,
wa_schedulex
TYPE  BAPISCHDLX .
data return type table of BAPIRET2.

DATA:
*lta_inq_bapiret2 TYPE STANDARD TABLE OF bapiret2,
*lta_inq_items TYPE STANDARD TABLE OF bapisditm,
*lta_inq_itemsx TYPE STANDARD TABLE OF bapisditmx,
*lta_inq_sched TYPE STANDARD TABLE OF bapischdl,
*lta_inq_schedx TYPE STANDARD TABLE OF bapischdlx,
*lta_inq_partners TYPE STANDARD TABLE OF bapiparnr,
*lta_inq_cfgs_ref TYPE STANDARD TABLE OF bapicucfg,
*lta_inq_cfgs_inst TYPE STANDARD TABLE OF bapicuins,
*lta_inq_cfgs_part_of TYPE STANDARD TABLE OF bapicuprt,
*lta_inq_cfgs_value TYPE STANDARD TABLE OF bapicuval,
lta_inq_cfgs_blob
TYPE STANDARD TABLE OF bapicublb,
lta_inq_cfgs_vk
TYPE STANDARD TABLE OF bapicuvk.
*lta_inq_cfgs_refinst TYPE STANDARD TABLE OF bapicuref.


data: conf_id type char6 value '000001',
inst_id
type char8 value '00000001',
salesordernumber
type vbeln.

*  data: conf_id type char6 value '000001',
*        inst_id type char8 value '00000001',
*        salesordernumber type vbeln.

.
wa_header
-doc_type = 'ZSIN'.
wa_header
-sales_org = '1000'.
wa_header
-division = '10'.
wa_header
-distr_chan = '13'.

WA_HEADER
-QT_VALID_T = sy-datum.

wa_partners
-partn_role = 'AG'.
wa_partners
-partn_numb = '0004000490'.
*       WA_PARTNERS-ITM_NUMBER = '000010'.
APPEND wa_partners to it_partners.

wa_partners
-partn_role = 'WE'.
wa_partners
-partn_numb = '0004000490'.
*       WA_PARTNERS-ITM_NUMBER = '000010'.
APPEND wa_partners to it_partners.

wa_partners
-partn_role = 'ZM'.
wa_partners
-partn_numb = '0000000216'.
*       WA_PARTNERS-ITM_NUMBER = 0.
APPEND wa_partners to it_partners.

wa_items
-itm_number = '000010'.
wa_itemS
-material = '000000000000600331'.
WA_ITEMS
-PLANT = '1100'.
wa_items
-PO_ITM_NO = '000010'.
wa_itemS
-target_qty = '1'.
WA_ITEMS
-TARGET_QU = 'EA'.
APPEND WA_ITEMS TO IT_ITEMS.

wa_itemx
-itm_number = '000010'.
wa_itemx
-UPDATEFLAG = 'I'.
wa_itemx
-material = 'X'.
wa_itemx
-PLANT = 'X'.
wa_itemx
-TARGET_QTY = 'X'.
wa_itemx
-TARGET_QU = 'X'.
WA_ITEMX
-PO_ITM_NO = 'X'.
APPEND WA_ITEMX TO IT_ITEMX.

wa_ref
-posex = '000010'.
wa_ref
-root_id = '00000001'.

wa_ref
-config_id = conf_id.
wa_ref
-complete = '1'.
wa_ref
-consistent = '1'.
APPEND wa_ref to it_ref.
*  insert wa_quote_ref into table tab_quote_ref.
**Refinst
wa_refinst
-posex = '000010'.
wa_refinst
-config_id = conf_id.
wa_refinst
-inst_id = inst_id.
APPEND wa_refinst to it_refinst.
*  insert wa_quote_refinst into table tab_quote_refinst.
*
wa_inst
-inst_id = inst_id.
wa_inst
-config_id = conf_id.
wa_inst
-obj_type = 'MARA'.
wa_inst
-class_type = '300'.
wa_inst
-obj_key = '000000000000600331'.
wa_inst
-quantity = '1'.
APPEND wa_inst to it_inst.
*  insert wa_quote_inst into table tab_quote_inst.
*
**Attribute values
wa_value
-config_id = conf_id.
wa_value
-inst_id inst_id.
wa_value
-charc = 'MODEL_TYPE'.
wa_value
-value = 'GD'.
APPEND wa_value to it_value.

  CALL FUNCTION 'BAPI_INQUIRY_CREATEFROMDATA2'
EXPORTING
*     SALESDOCUMENTIN               =
INQUIRY_HEADER_IN            
= wa_header
*     INQUIRY_HEADER_INX            =
*     SENDER                        =
*     BINARY_RELATIONSHIPTYPE       =
*     INT_NUMBER_ASSIGNMENT         =
*     BEHAVE_WHEN_ERROR             =
*     LOGIC_SWITCH                  =
*     TESTRUN                       =
*     CONVERT                       = ' '
IMPORTING
SALESDOCUMENT                
= salesordernumber
TABLES
RETURN                        = return
INQUIRY_ITEMS_IN             
= it_items
INQUIRY_ITEMS_INX            
= IT_ITEMX
INQUIRY_PARTNERS             
= it_partners
INQUIRY_SCHEDULES_IN         
= it_schedules
INQUIRY_SCHEDULES_INX        
= IT_SCHEDULEX
*     INQUIRY_CONDITIONS_IN         =
*     INQUIRY_CONDITIONS_INX        =
INQUIRY_CFGS_REF             
= it_ref
INQUIRY_CFGS_INST            
= it_inst
INQUIRY_CFGS_PART_OF         
= IT_PART
INQUIRY_CFGS_VALUE           
= it_value
INQUIRY_CFGS_BLOB            
= lta_inq_cfgs_blob
INQUIRY_CFGS_VK              
= lta_inq_cfgs_vk
INQUIRY_CFGS_REFINST         
it_refinst
*     INQUIRY_TEXT                  =
*     INQUIRY_KEYS                  =
*     EXTENSIONIN                   =
*     PARTNERADDRESSES              =
.

if salesordernumber ne ''.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
else.
CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
endif.

Read only

0 Likes
836

Dear Experts,

Please help me the inquiry upload with variant configuration.

Read only

0 Likes
836

Hi Ram,

Try with passing INQUIRY_HEADER_INX

as like u filled the Itemx

Read only

0 Likes
836

Hi Gowtham,

Thank u for giving immediate response,

I tried using INQUIRY_HEADER_INX also it is it not uploading,

I am facing problem when uploading through configuration tables only.

please help me in this.