03-01-2010 1:25 PM
Hi,
I am trying to create inquiries using BAPI_INQUIRY_CREATEFROMDATA2. I am getting error messages in RETURN Table as
1)'Please enter sold-to party or ship-to party' and 2)'Sales document was not changed'. I passed sold-to party (name) value in
INQUIRY_HEADER_IN-NAME and in INQUIRY_PARTNERS-PARTN_NUMB . i didnt find any sold-to-party field in INQUIRY_HEADER_IN and i have no clue about second error. Please guide me in solving the issue.i have passed the following tables.
CALL FUNCTION 'BAPI_INQUIRY_CREATEFROMDATA2'
EXPORTING
INQUIRY_HEADER_IN = W_ENQUIRY_THEAD
IMPORTING
SALESDOCUMENT = W_NUMBER
TABLES
RETURN = W_RETURN
INQUIRY_ITEMS_IN = W_ENQUIRY_ITEM
INQUIRY_PARTNERS = T_INQUIRY_PARTNERS
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'
IMPORTING
RETURN = W_RETURN1.
Regards
K Srinivas
03-01-2010 1:32 PM
Did you fill table INQUIRY_PARTNERS with correct values for PARTN_ROLE, there is a conversion exit on this field. (eg: AG "internal format" and not SP "external format" if language is "EN")
(Also check )
Regards,
Raymond
03-01-2010 1:32 PM
Did you fill table INQUIRY_PARTNERS with correct values for PARTN_ROLE, there is a conversion exit on this field. (eg: AG "internal format" and not SP "external format" if language is "EN")
(Also check )
Regards,
Raymond
03-01-2010 1:57 PM
Thankyou for the reply. i gave 'AG' as the partner role and executed the program. i am getting 2 errors
'Terms of delivery exw are not defined' and 'Sales document was not changed'. Why this error has come which was not there previously. Please guide in resolving the issue.
Data : W_ENQUIRY_THEAD LIKE BAPISDHD1 OCCURS 0 WITH HEADER LINE,
W_ENQUIRY_ITEM LIKE BAPISDITM OCCURS 0 WITH HEADER LINE,
W_RETURN LIKE BAPIRET2 OCCURS 0 WITH HEADER LINE,
T_INQUIRY_PARTNERS LIKE BAPIPARNR OCCURS 0 WITH HEADER LINE.
W_ENQUIRY_THEAD-DOC_TYPE = THEAD-DOC_TYPE.
W_ENQUIRY_THEAD-SALES_ORG = THEAD-SALESORG. .
W_ENQUIRY_THEAD-DISTR_CHAN = THEAD-DIST_CHAN. .
W_ENQUIRY_THEAD-DIVISION = THEAD-DIVISION.
W_ENQUIRY_THEAD-NAME = THEAD-NAME.
W_ENQUIRY_THEAD-INCOTERMS1 = THEAD-INCOTERMS1.
W_ENQUIRY_THEAD-INCOTERMS2 = THEAD-INCOTERMS2.
W_ENQUIRY_THEAD-SD_DOC_CAT = 'A'.
W_ENQUIRY_ITEM-ITM_NUMBER = THEAD-ITEMNO.
W_ENQUIRY_ITEM-CUST_MAT22 = THEAD-CUSTOMER_MTL .
W_ENQUIRY_ITEM-PLANT = THEAD-PLANT.
W_ENQUIRY_ITEM-REASON_REJ = THEAD-REASON_REJ.
T_INQUIRY_PARTNERS-PARTN_ROLE = 'AG'.
T_INQUIRY_PARTNERS-PARTN_NUMB = '0001800001'..
T_INQUIRY_PARTNERS-NAME = THEAD-NAME.
APPEND W_ENQUIRY_THEAD.
APPEND W_ENQUIRY_ITEM.
APPEND T_INQUIRY_PARTNERS.
03-01-2010 2:28 PM
The BAPI seems to stop at first error, then send the 'Sales document was not changed' as soon as one error is checked. The first error is gone, now a second one rises.
When incoterm1 is EXW, you need an incoterm2 value (named place where the merchandise is at disposal) - Also check your Customizing, or check via SE16 on table LIKP.
Regards,
Raymond