BAPI_QUOTATION_CREATEFROMDATA2
Hi all,
I use fm BAPI_QUOTATION_CREATEFROMDATA2 to create a quotation from a program. I have problems with schedules line: if i pass to bapi a value for quantity greater then material availibility in va22 (for quotation just created) I see 0 in bmeng under tab of schedulations. When I try with a value less then availability in va22 bmeng has the same value of wmeng.
For Schedule lines these are the structures that I use to call BAPI:
QUOTATION_SCHEDULES_IN- ITM_NUMBER = '000010'
QUOTATION_SCHEDULES_IN-SCHED_LINE = '0001'
QUOTATION_SCHEDULES_IN-REQ_QTY= same qty of QUOTATION_ITEMS_IN-TARGET_QTY
QUOTATION_SCHEDULES_INX-ITM_NUMBER = '000010'
QUOTATION_SCHEDULES_INX-SCHED_LINE = '0001'
QUOTATION_SCHEDULES_INX-UPDATEFLAG = 'X'
QUOTATION_SCHEDULES_INX-REQ_QTY = 'X'
Have you got any idea???
Thanks in advance!!!
Have you used commit fm for the BAPI - 'BAPI_TRANSACTION_COMMIT'?
Also Check the reply from Brian in this thread:
Configure Materials using BAPI
Regards,
Naimesh Patel
Similar Messages
-
Error in updating pricing using BAPI_QUOTATION_CREATEFROMDATA2
Hi,
I am using the BAPI function module BAPI_QUOTATION_CREATEFROMDATA2. I am calling BAPI_TRANSACTION_COMMIT subsequently
I need to change an existing pricing condition ZMLT which is
automatically determined by the config while creating a sales quotation
Also I need to add ZFR1 and ZFR2 which are 2 freight condition types
(Condition Class = 'F')
Case 1
If I set the LOGIC-SWITCH-COND_HANDL = 'X', then I can correctly update
ZMLT using CONDITIONS_IN parameter, but I can't update ZFR1 and ZFR2
since they are freight condition types (as per Note 593246)
Case 2
If I set LOGIC-SWITCH-COND_HANDL = ' ', then I can correctly update
ZFR1 and ZFR2 freight condition types using the parameters
CONDITIONS_IN and CONDITIONS_INX. But when I try to update ZMLT, it
deactivates the existing line in the pricing and adds a new line with
same condition type ZMLT. Why does it do this...?
Here are the parameters that I am using as per Note 593246, Point 4
CONDITIONS_IN-ITM_NUMBER = '000010'
CONDITIONS_IN-COND_COUNT = '01'
CONDITIONS_IN-COND_TYPE = 'ZMLT'
CONDITIONS_IN-COND_VALUE = 12.00
CONDITIONS_IN-CURRENCY = ' ' (This is a percentage)
CONDITIONS_INX-ITM_NUMBER = '000010'
CONDITIONS_INX-COND_COUNT = '01'
CONDITIONS_INX-COND_TYPE = 'ZMLT'
CONDITIONS_INX-UPDATEFLAG = 'U'
CONDITIONS_INX-COND_VALUE = 'X'
CONDITIONS_INX-CURRENCY = 'X'
Please advise on this. Although the Total Value in the pricing is
correctly updated, why does it deactivate one line and insert a new one
for the same condition type.
Please note that my requirement is to add condition types ZFR1, ZFR2
and update ZMLT
Thanks and Regards,
Aditya PalekarHi!
You have very well prepared this example!
...and you analyzed it completely, this behavior is just the restriction you have to live with.
Old style condition handling couldn't change values, so workaround with adding new line and inactive existing line was done. New condition handling has restrictions, too - so no freights.
Why does it do this... it's a buggy feature or whatever you would like to call it. At least it was done by purpose, what internal reasons lead to this, I can't say.
One workaround would be possible for you: create quotation with cond_handl = A, change afterwards with cond_handl = B.
If you start with A = X and B = space or A = space and B = X should be the same in the end.
Regards,
Christian -
Prblm in Extnsn of VBAK : Quotation creation BAPI_QUOTATION_CREATEFROMDATA2
Hi ALL,
Problem in Extension of VBAK during Quotation creation Using BAPI BAPI_QUOTATION_CREATEFROMDATA2.
I have some Custom field of VBAK in Addional data tab B of transaction VA22.
I am populating these fields using BAPI_QUOTATION_CREATEFROMDATA2.
Passing table parameter EXTENSIONIN as shown below.
some of the fields are getting updated with these BAPI but some are not.
Say for example I added two custom field ZRORD and ZEON in table VBAK and Addional data tab B screen as well.
To get these field updated by BAPI I appended these two fields in structure VBAKKOZ ,VBAKKOZX and BAPE_VBAK.
Field ZRORD is getting updated but facing problem with ZEON.Please help.
For ur info,If I run transaction VA22 and enter some value in ZEON and click on SAVE then its getting updated.
w_bapiparex-structure = 'BAPE_VBAK'.
w_bape_vbak-zrord = 'xxX'.
w_bape_vbak-zeon = 'x'.
w_bapiparex-valuepart1 = w_bape_vbak.
APPEND w_bapiparex TO t_bapiparex.
RoshanHi singh,
Try with this code.
data: w_bapi_vbak_in type bape_vbakx.
w_bapi_vbak_in-zrord = 'X'.
w_bapi_vbak_in-zeon = 'X'.
w_bapiparex-structure = 'BAPE_VBAKX'.
w_bapiparex-valuepart1 = w_bapi_vbak_in.
append w_bapiparex to t_bapiparex.
Regards,
Raji. -
In BAPI ' BAPI_QUOTATION_CREATEFROMDATA2'
Hi all,
In BAPI ' BAPI_QUOTATION_CREATEFROMDATA2', I given all manditory parameters ( QUOTATION_HEADER_IN -import parameter and QUOTATION_PARTNERS - tables ).
But If I execute, its returning below messages.
VP 112 Please enter sold-to party or ship-to party
V4 219 Sales document was not changed.
Can u please tell me where to specify the sold-to and ship-to in this BAPI.
Thanks,
HP.Hi,
We have also encountered the same problem while loading contract orders which is similar to quotation.
We have done a recording for the Tcode VA42 with some document numberand written the same BDC program for the (change the quotation) immediately after the BAPI function call.
So the target quantity got loaded properly through BDC.
Please revert if you need any help.
Regards,
Soumya. -
Problem with "BAPI_QUOTATION_CREATEFROMDATA2"
Hi all
I am creating Quotation Using "BAPI_QUOTATION_CREATEFROMDATA2"
created quotation giving error of incomplition log of Shipping point ....
and if i try to enter shipping point trough va22 system gives message no possible entries
for this field...
Whether this is configuration problem or BAPI problem
..AshishHi,
Check settings in OVL2. We assign shipping points with combination of shipping conditions,loading group and delivery plant.
shipping point will be determined in sales document based on the OVL2 settings.
System takes shipping conditions from customer master / sales document type
Loading group from material master
Delivery plant from cusotmer/material/Customer material info record.
If any of these entries are missing, system will not determine shipping point automatically in sales document.
Regards,
Chandra -
BAPI_QUOTATION_CREATEFROMDATA2 pricing condition question
I am using XI to pass sales data from SQL Server into IDOC QUOTATION_CREATEFROMDATA201 to be processed by BAPI BAPI_QUOTATION_CREATEFROMDATA2 for the purpose of created new sales quotations.
I am having a problem with pricing. I am populating a PR00 condition value within QuotationConditionsIn and the corresponding entries in QuotationConditionsInx. The data makes it into the new quotation, but there is a problem...there are 2 PR00 conditions. An existing one created by SAP automatically and the one from the IDOC, which has the proper value but is in state "inactive".
Is there a way to tell SAP to use the incoming PR00 condition value and/or remove or deactivate the auto-generated PR00 condition record?
Any help would be greatly appreciated.
Thanks,
NathanHi Thomas!
Then we can go further in note 593246:
you should
1. Switch for activating the new condition item handling:
Import parameter LOGIC_SWITCH-COND_HANDLE = 'X'.
6. Addition of a condition with amount '0.00':
ORDER_CONDITIONS_IN-ITM_MUMBER = '000010'
ORDER_CONDITIONS_IN-COND_TYPE = 'PR00'
ORDER_CONDITIONS_IN-COND_VALUE = '0,0000'
ORDER_CONDITIONS_IN-CURRENCY = 'EUR'
ORDER_CONDITIONS_INX-ITM_MUMBER = '000010'
ORDER_CONDITIONS_INX-COND_TYPE = 'PR00'
ORDER_CONDITIONS_INX-UPDATEFLAG = 'I'
ORDER_CONDITIONS_INX-COND_VALUE = 'X'
ORDER_CONDITIONS_INX-CURRENCY = 'X'
Result: The condition is created with amount '0.00'.
Regards,
Christian -
Reg 'bapi_quotation_createfromdata2'
Hi,
We are moving from <b>45B to ECC6.0.</b>.
I am facing a problem while creating a booking using the <b>'bapi_quotation_createfromdata2'.</b>
Inside the BAPI,there is a function call <b>SD_SALESDOCUMENT_CREATE</b>, which is returning the salesdocument for us.
Function call is returning the BAPI but that document number is not exported to the bapi.
This is the call i am talking about.
<b>sales document number</b> is not imported from this bapi call.
<b> CALL FUNCTION 'BAPI_QUOTATION_CREATEFROMDATA2'
EXPORTING
salesdocument = wa_qt_salesdocument_cre
QUOTATION_HEADER_IN = WA_QT_ORDER_HEADER_IN_CRE
QUOTATION_HEADER_INX =
SENDER =
BINARY_RELATIONSHIPTYPE = ' '
INT_NUMBER_ASSIGNMENT = ' '
BEHAVE_WHEN_ERROR = ' '
LOGIC_SWITCH = ' '
testrun =
IMPORTING
SALESDOCUMENT_EX = WA_QT_SALESDOCUMENT_EX_CRE
TABLES
RETURN = IT_QT_RETURN_CRE
QUOTATION_ITEMS_IN = IT_QT_ORDER_ITEMS_IN_CRE
QUOTATION_ITEMS_INX =
QUOTATION_PARTNERS = IT_QT_ORDER_PARTNERS_CRE
QUOTATION_SCHEDULES_IN = IT_QT_SCHEDULES_IN_CRE
QUOTATION_SCHEDULES_INX =
QUOTATION_CONDITIONS_IN = IT_QT_CONDITIONS_IN_CRE
QUOTATION_CFGS_REF = IT_QT_CFGS_REF_CRE
QUOTATION_CFGS_INST = IT_QT_CFGS_INST_CRE
QUOTATION_CFGS_PART_OF = IT_QT_CFGS_PART_OF_CRE
QUOTATION_CFGS_VALUE = IT_QT_CFGS_VALUE_CRE
QUOTATION_CFGS_BLOB = IT_QT_CFGS_BLOB_CRE
QUOTATION_CFGS_VK = IT_QT_CFGS_VK_CRE
QUOTATION_CFGS_REFINST = IT_QT_CFGS_REFINST_CRE
QUOTATION_TEXT = IT_QT_TEXT_CRE
QUOTATION_KEYS = IT_QT_KEYS_CRE
extensionin =
.</b>
what might be the problem?this call was working fine with 45B.
Kindly help me in fixing this.
Thanks,
Vijaya.Hi Daniel,
I am not sure on which release of SAP you are running, Have you looked at the OSS Note: 195768, if not this should be a good starting point.
Regards,
Chen -
Hi All,
I am using bapi for quotation creation BAPI_QUOTATION_CREATEFROMDATA2
I want to know how to use structure QUOTATION_CFGS_VALUE in BAPI_QUOTATION_CREATEFROMDATA2.
This structure is used for Variant Configuration.
Can you please help me.
Thanks in advance.
Mohan kumarHi
I am also looking for same code(Create quotation using BAPI)..could you please share the code
Thanks a lot -
Problem in creating configuration bapi BAPI_QUOTATION_CREATEFROMDATA2
Hi Gurus,
I am creating quotation for config material using bapi BAPI_QUOTATION_CREATEFROMDATA2.
Quotation is getting created without configuration.
I am passing data to following bapi tables for configuration.
QUOTATION_CFGS_REF STRUCTURE BAPICUCFG OPTIONAL
QUOTATION_CFGS_INST STRUCTURE BAPICUINS OPTIONAL
QUOTATION_CFGS_PART_OF STRUCTURE BAPICUPRT OPTIONAL
QUOTATION_CFGS_VALUE STRUCTURE BAPICUVAL OPTIONAL
Please help.
Thanks in advanceHi,
I am not able to create Quotation with incomplete configuration using BAPI_QUOTATION_CREATEFROMDATA2. I am able to save quotation with incomplete configuration in system but not with above mentioned BAPI. Can you help me out?
Thanks -
Problem with Condition Type in BAPI_QUOTATION_CREATEFROMDATA2 for Txn VA21
Hi All,
I am using BAPI_QUOTATION_CREATEFROMDATA2 for Sales Quotation by txn VA21.
In this txn,There are 22 condition types available in my system.
The problem is,it is updating every condition type twice.
Pls give me the solution.
Regards,
Shiv KantHi,
I am giving billing document code, we are using BAPI to upload billing documents into SAP.
you can check pricing conditions code. we are using only two pricing condition types. our technical consultant hardcoded condition types.
wa_billingdata-salesorg = wa_bill5-sorg.
wa_billingdata-distr_chan = wa_BILL5-dist.
wa_billingdata-division = wa_BILL5-div.
wa_billingdata-doc_type = 'ZSO5'.
wa_billingdata-ordbilltyp = 'FX'.
wa_billingdata-bill_date = wa_BILL5-BDATE.
wa_billingdata-sold_to = wa_BILL5-CUSTNO.
* wa_billingdata-price_date = WA_BILL1-BDATE.
wa_billingdata-country = wa_BILL5-CNTRY.
wa_billingdata-bill_to = wa_BILL5-custno.
wa_billingdata-currency = WA_BILL5-CURR.
wa_billingdata-wbs_elem = wa_bill5-wbsele.
wa_billingdata-xblnr = wa_bill5-billno.
wa_billingdata-zuonr = wa_bill5-invoiceno.
flag1 = 1.
endif.
translate wa_bill5-matdesc to upper case.
SELECT MATNR FROM MARA INTO IT_MARA up to 1 rows WHERE MATNR = WA_BILL5-MATDESC.
endselect.
if sy-subrc = 0.
wa_billingdata-plant = wa_BILL5-PLANT.
wa_billingdata-NO_MATMAST = ' '.
wa_billingdata-material = WA_BILL5-MATDESC.
wa_billingdata-REQ_QTY = '1'.
wa_billingdata-ACCTASGNMT = '05'.
else.
wa_billingdata-ACCTASGNMT = '05'.
wa_billingdata-NO_MATMAST = 'X'.
wa_billingdata-SHORT_TEXT = 'ADAGE MATERIAL'.
wa_billingdata-TAXCL_1MAT = '0'.
wa_billingdata-SALES_UNIT = 'EA'.
wa_billingdata-material = WA_BILL5-MATDESC.
wa_billingdata-REQ_QTY = '1'.
endif.
flag = flag + 1.
wa_billingdata-ref_item = flag.
append wa_billingdata to billingdata.
wa_conditiondata-data_index = flag.
wa_CONDITIONDATA-cond_value = WA_BILL5-ADVERTISCOST.
wa_conditiondata-cond_type = 'EK01'.
append wa_conditiondata to conditiondata.
clear wa_conditiondata.
wa_conditiondata-data_index = flag.
wa_conditiondata-cond_value = WA_BILL5-COMM.
wa_conditiondata-cond_type = 'ZCOM'.
append wa_conditiondata to conditiondata.
clear wa_conditiondata.
IF TESTRUN IS INITIAL.
move-corresponding wa_bill5 to wa_bill2.
wa_bill2-status = 'P'.
append wa_bill2 to it_bill2.
modify zzbilling from table it_bill2.
commit WORK.
ENDIF.
REFRESH IT_BILL2.
endloop.
flag1 = 0.
flag = 0.
IF TESTRUN IS INITIAL.
CALL FUNCTION 'BAPI_BILLINGDOC_CREATEMULTIPLE'
* EXPORTING
* CREATORDATAIN = creaord
* TESTRUN = 'X'
* POSTING = 'X'
TABLES
BILLINGDATAIN = billingdata
CONDITIONDATAIN = conditiondata
* CCARDDATAIN =
* TEXTDATAIN =
* ERRORS =
RETURN = bapiret
SUCCESS = succ.
Regards,
Chandra -
Get Pricing Condition Result: BAPI_QUOTATION_CREATEFROMDATA2
Hi Experts,
I need to get the pricing condition data in BAPI_QUOTATION_CREATEFROMDATA2, under the table QUOTATION_CONDITIONS_IN when in TESTRUN mode, is it possible?
I have tried in several time but it cannot work. It prompt me info message 'For the currency code MYR ALE communication is not allowed'. The reason I use test-run is because I don't want the quotation being created.
Or any other way for me to get all pricing condition based on material and ship-to party ??? Thanks.
Cheers,
IsaacHi Isaac,
Please create Bapi using your repective Progamme and try to give the Resepective conditions related to pricing from XML file.as you are saying you are doing this for testing.hope aware that while creation of BAPI if the certain condition are not matching or if the data is incomlepte you will get this kind of errors.
Please Reward If Really Helpful,
Thanks and Regards,
Sateesh.Kandula -
BAPI_QUOTATION_CREATEFROMDATA2 : Multiple line for same Characteristics
Hi ALL,
Hi Thomas,
I am using BAPI "BAPI_QUOTATION_CREATEFROMDATA2" to create quotation.I have one question on Configuration part.
I am able to update configuration but I need MULTIPLE line for the same CHARECTERISTICS.
Below is the code.
Please notice the record of table " i_quotation_cfgs_value". I want to show TWO record for Char 'Z_COIL_THICKNESS' with value 0.2 and 0.3.Do I need to increment Instance ID or Confid ID or do I need fill table QUOTATION_CFGS_PART_OF.Please help.
CONSTANTS:
conf_id TYPE char6 VALUE '000010',
inst_id TYPE char8 VALUE '00000001'.
w_quotation_schedules_in-req_qty = '5'.
w_quotation_schedules_in-itm_number = '000010'.
w_quotation_schedules_in-sched_line = 1.
APPEND w_quotation_schedules_in TO i_quotation_schedules_in.
CLEAR w_quotation_schedules_in.
w_quotation_cfgs_ref-posex = '000010'.
w_quotation_cfgs_ref-root_id = inst_id.
w_quotation_cfgs_ref-config_id = conf_id.
APPEND w_quotation_cfgs_ref TO i_quotation_cfgs_ref.
w_quotation_cfgs_refinst-posex = '000010'.
w_quotation_cfgs_refinst-config_id = conf_id.
w_quotation_cfgs_refinst-inst_id = inst_id.
APPEND w_quotation_cfgs_refinst TO i_quotation_cfgs_refinst.
w_quotation_cfgs_value-config_id = conf_id .
w_quotation_cfgs_value-inst_id = inst_id .
w_quotation_cfgs_value-charc = 'Z_COIL_THICKNESS'.
w_quotation_cfgs_value-value = '0.2'.
APPEND w_quotation_cfgs_value TO i_quotation_cfgs_value.
CLEAR w_quotation_cfgs_value.
w_quotation_cfgs_value-config_id = conf_id .
w_quotation_cfgs_value-inst_id = inst_id .
w_quotation_cfgs_value-charc = 'Z_COIL_THICKNESS'.
w_quotation_cfgs_value-value = '0.3'.
APPEND w_quotation_cfgs_value TO i_quotation_cfgs_value.
CLEAR w_quotation_cfgs_value.
Code Formatted by: Alvaro Tejada Galindo on Jan 5, 2010 10:26 AMHi Madhu,
Pass below four table.
i_quotation_cfgs_ref
i_quotation_cfgs_refinst
i_quotation_cfgs_inst
i_quotation_cfgs_value
"config_id" should be same as Item number.
To define the connection between the sales order item and the configuration you must pass match this-->(ORDER_ITEMS_IN-PO_ITM_NO = ORDER_CFGS_REF-POSEX)
Let me know if you need any other info
Code :
CONSTANTS:
lc_conf_id TYPE char6 VALUE '000010',
lc_inst_id TYPE char8 VALUE '00000001',
lc_item_no TYPE cu_posex VALUE '000010',
w_quotation_cfgs_ref-posex = lc_item_no. "'000010'.
w_quotation_cfgs_ref-root_id = lc_inst_id.
w_quotation_cfgs_ref-config_id = lc_conf_id.
APPEND w_quotation_cfgs_ref TO i_quotation_cfgs_ref.
CLEAR w_quotation_cfgs_ref.
w_quotation_cfgs_refinst-posex = lc_item_no. "'000010'.
w_quotation_cfgs_refinst-config_id = lc_conf_id.
w_quotation_cfgs_refinst-inst_id = lc_inst_id.
APPEND w_quotation_cfgs_refinst TO i_quotation_cfgs_refinst.
w_quotation_cfgs_inst-inst_id = lc_inst_id.
w_quotation_cfgs_inst-config_id = lc_conf_id.
w_quotation_cfgs_inst-obj_type = 'MARA'. "wa_zrvs_mat_char_h-obtab
w_quotation_cfgs_inst-class_type = 300. "wa_zrvs_mat_char_h-klart.
w_quotation_cfgs_inst-obj_key = "Material number"
w_quotation_cfgs_inst-quantity = 1.
APPEND w_quotation_cfgs_inst TO i_quotation_cfgs_inst.
CLEAR w_quotation_cfgs_inst.
w_quotation_cfgs_value-config_id = lc_conf_id .
w_quotation_cfgs_value-inst_id = lc_inst_id .
w_quotation_cfgs_value-charc = wa_zrva_tdccodes-zzcharcteristics.
w_quotation_cfgs_value-value = wa_zrva_tdccodes-zvalue.
w_quotation_cfgs_value-valcode = 1.
APPEND w_quotation_cfgs_value TO i_quotation_cfgs_value.
CLEAR w_quotation_cfgs_value.
w_quotation_items_in-po_itm_no = lc_item_no. "'000010'."Imp for config
w_quotation_items_in-itm_number = lc_item_no. "'000010'.
APPEND w_quotation_items_in TO i_quotation_items_in.
CLEAR w_quotation_items_in.
Roshan -
Question on 'BAPI_QUOTATION_CREATEFROMDATA2'
Hello Friends
I am trying to create a quote using 'BAPI_QUOTATION_CREATEFROMDATA2' in the test mode.
I am entering the bear minimum required (without opening any parameters other than the default
which are QUOTATION_HEADER_IN and QUOTATION_PARTNERS.
The problem that I am seeing is with QUOTATION_PARTNERS-ITM_NUMBER.
When I give QUOTATION_PARTNERS-ITM_NUMBER = '0000000' and run, I get a bogus
message that the quote (with a number assigned) is created. But when I try to open using VA23
it is not and even the table 'VBAK' doesn't have an entry for this.
However when I change QUOTATION_PARTNERS-ITM_NUMBER = '0000020' where 000020 is a valid value, I get a message that says "112 Please enter sold-to party or ship-to party".
What I don't understand is how this ITM_NUMBER "item number of SD document" is connected
to ship-to variable. How can I make sure that these two have proper relationship in the database.
Any suggestions or comments will be highly appreciated.
Thanks
RamHi Ansberry Kevin,
Pass QUOTATION_PARTNERS-ITM_NUMBER = '0000000'.
And pass customers like this.
QUOTATION_PARTNERS-PARTN_NUMB = '1000000'.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = QUOTATION_PARTNERS-PARTN_NUMB
IMPORTING
OUTPUT = QUOTATION_PARTNERS-PARTN_NUMB -
'BAPI_QUOTATION_CREATEFROMDATA2' behaves different while called from SE38
Dear Friends
I am trying to run the bapi 'BAPI_QUOTATION_CREATEFROMDATA2' and 'BAPI_TRANSACTION_COMMIT' in proper sequence as recommended by SAP.
I am entering the minimum data recommended by SAP help on this BAPI.
When I run the above senario manually from transaction SE37 and selecting
from the menu Function Module -> Test -> Test Sequence,
everything works fine and this also creates a quote and when I check, it
is adding lots of extra related data.
However, when I call the same two functions from another program (SE38),
even though I am entering the same Data, I get different behaviour and
also the quote is not getting created. When I check the ls_return value,
it says that 'sold-to-party' is missing. I don't know why this problem
doesn't arise when I run the BAPI manually from SE37.
I would appreciate if you can please give me any feedback or some expert comments.
Please see the SE38 program that I am using to test these two BAPIs.
==========================================================
*& Report ZQUOTECREATE_TEST
report zquotecreate_test.
data: ls_quotation_header_in type bapisdhd1,
ls_behave_when_error type bapiflag-bapiflag,
ls_quotation_partners like bapiparnr occurs 1 with header line,
ls_return like bapiret2 occurs 1 with header line.
ls_quotation_header_in-distr_chan = '12'.
ls_quotation_header_in-division = '00'.
ls_quotation_header_in-sales_org = '1000'.
ls_quotation_header_in-doc_type = 'AG'.
ls_behave_when_error = 'P'.
ls_quotation_partners-partn_role = 'SP'.
ls_quotation_partners-partn_numb = '1012'.
call function 'BAPI_QUOTATION_CREATEFROMDATA2'
exporting
quotation_header_in = ls_quotation_header_in
BEHAVE_WHEN_ERROR = ls_BEHAVE_WHEN_ERROR
importing
salesdocument = ls_salesdocument
tables
return = ls_return
quotation_partners = ls_quotation_partners
call function 'BAPI_TRANSACTION_COMMIT'
exporting
wait = ' '
IMPORTING
RETURN =Dear friends
I figured out the conversion problem involving 'QT' and 'AG'.
There is this flag 'CONVERT' which doesn't affect while running manually but while calling from SE38, I have to turn it on by putting a value 'X" and so the AG-QT issue is resolved
So if you can please respond to the other problem with error 'Please enter sold-to-party or ship-to-party', I would appreciate.
Again with the same test data, the above error message doesn't show up while running the BAPI manually from SE37 and QUOTE gets created successfully. However, when the same BAPI is called from SE38 program I get the above error message and QUOTE doesnt get created. -
Need field details for BAPI_QUOTATION_CREATEFROMDATA2
hi,
i am using BAPI_QUOTATION_CREATEFROMDATA2 (BUS2031) for loading data using LSMW.
My mapping sheet shows field VBAK-NETWR which is mandatory field.
But i am not able to find this field in any of the Structures of this FM.
This field NETWR is present in the Attribute of this BUS2031.
Please help me map this field with the BAPI. Also plz explain what is the purpose of Attribute of a BAPI? Cant we use to map fields to the attributes?
thanks,
ags.Hi ags,
Field VBAK-NETWR is calculated by the system.
This field show the sum of the NETWR of the items.
You not have to fill this field in the creation of the quotation. You have to fill the structure QUOTATION_CONDITIONS_IN and QUOTATION_CONDITIONS_INX with the price conditions for each item.
Regards,
Pepe
Maybe you are looking for
-
Using a delimiter in a flat file
Hi People, If I am writing a file to the PC and I have to use a delimiter '~' to seperate the values, what should I do? Can somebody give me some example or syntax? Thanks, AM
-
How to import Hierarchy Data in MDM 7.1
Hi All, I am trying to import the hierarchy data to SAP MDM 7.1 I have the data in the Excel sheet in the following structure Parent Code Parent Name Child Code Child Name A1 Printer P1 Inkjet A1
-
Jelly Bean Rolling out in Phases To the Original Razr / Razr Maxx
I usually don't like to Start new thread's unless there is a Definite need and this one is: As it says above Jelly Bean is Going out in Phases! Owners Go on your Devices to About Phone and See if the Update is There if so Make sure you have a Fully
-
I created a beatiful website using iWeb - don't get me wrong, .Mac is great, but not what I am needing to promote my business. What are my options for getting my iWeb site onto the WWW? What hosts are out there that are compatible with iWeb? Thanks,
-
Hello, I am trying to use audacity. Can someone help me? I keep getting this error: ryanvade@ryan-linuux-desktop:~$ audacity -v ALSA lib pcm_dsnoop.c:618:(snd_pcm_dsnoop_open) unable to open slave ALSA lib pcm_dmix.c:1022:(snd_pcm_dmix_open) unable