‎2012 Jun 25 7:44 AM
Hello All,
I am Running quotation creation BAPI to create quotation with configurable material. This default configuration of material is saved in variant configuration.
When I run BAPI_quotation_createfromdata, it successfully creates quotation but it doesn' fetch default configuration of material. As a result,created quotation only has header and item data ,but its item does not have deadult configuration data. However, if I create quotation manually through va21, it does create quotation successfully and its line item material also has default configuration .
Here is part of code which specify kind of input to BAPI.
CALL FUNCTION 'BAPI_QUOTATION_CREATEFROMDATA'
EXPORTING
order_header_in = ls_quot_header_in
* WITHOUT_COMMIT = ' '
* CONVERT_PARVW_AUART = ' '
IMPORTING
SALESDOCUMENT = gf_SALESDOCUMENT
* SOLD_TO_PARTY = SOLD_TO_PARTY
* SHIP_TO_PARTY = SHIP_TO_PARTY
* BILLING_PARTY = BILLING_PARTY
RETURN = gs_quot_RETURN
TABLES
order_items_in = lt_quot_items_in
order_partners = lt_quot_partners
order_items_out = lt_quot_items_out "table is initial
order_cfgs_ref = lt_quot_cfgs_ref
order_cfgs_inst = lt_quot_cfgs_inst
order_cfgs_part_of = lt_quot_cfgs_part_of "table is initial
order_cfgs_value = lt_quot_cfgs_value.
Can anybody suggest me solution on this as I have search all post on SDN, also gone through number of SAP note but could not get proper solution.
Helpfull answers will be awarded!
‎2012 Jun 25 8:13 AM
Hi Nilima,
After creating quotation go to va22 and check on incomplete log it will pick all the configuration data.Other option is pass the default characteristics and it values in the table then it will create with the configuration with out incomplete.I created the same way quotation and order.Post if there is nay issues.
Regards,
madhu.
‎2012 Jun 25 8:13 AM
Hi Nilima,
After creating quotation go to va22 and check on incomplete log it will pick all the configuration data.Other option is pass the default characteristics and it values in the table then it will create with the configuration with out incomplete.I created the same way quotation and order.Post if there is nay issues.
Regards,
madhu.
‎2012 Jun 25 8:38 AM
Hi Madhu,
We have hundread's of characteristics which are default ones. We can't take all this hundread default characteristics in input excel sheet as it reduces performace treamendously. I just want to know why BAPI is not fetching default characteristics values internally.
In this scenario, customer will give only some characteristics in excel whereas default one should always keep up to BAPI fetch. If in worst case I convience user to put all default values in excel sheet,
then everytime I have to pass characteristics to every line item more that 100 which affects performace
a lot. With this default characteristices ,system nealry take 30 mins to create one single quotation with 100 line items in it.
Do you know any BADI/user exit/enhacement which will help BAPI to consider default chara.
Or any provision in BAPI paramter which will condiser default values too
Thanks,
Nilima
‎2012 Jun 25 9:55 AM
Hi Nilima,
We have hundread's of characteristics which are default ones. We can't take all this hundread default characteristics in input excel sheet as it reduces performace treamendously. I just want to know why BAPI is not fetching default characteristics values internally.
There are some bapi bapi_class* give here class no and model you will get all of that.When you seeing in cl01 maintain there tick for default characteristics and make a custom bapi of existing one use it.This will pick default characteristics and it is values.
In this scenario, customer will give only some characteristics in excel whereas default one should always keep up to BAPI fetch. If in worst case I convience user to put all default values in excel sheet,
then everytime I have to pass characteristics to every line item more that 100 which affects performace
a lot. With this default characteristices ,system nealry take 30 mins to create one single quotation with 100 line items in it.
Do you know any BADI/user exit/enhacement which will help BAPI to consider default chara.
Or any provision in BAPI paramter which will condiser default values too
I do not think there is a badi exist for that.
Regards,
Madhu.
‎2012 Jun 26 6:13 AM
‎2012 Jun 26 6:30 AM
Hi Madhu,
Can you please elaborate your logic of fetching default characteristics.
Let me explain you my problem one more time. We are maintaing some charactristics in at class level and makring some values of it to default. Now BAPI is not reading those defualt characteristics value at class level.
Your input will always be helpfull.
Thanks,
Nilima
‎2012 Jun 26 7:14 AM
Hi,
Still it is not clear.Please correct if there is any wrong.You are using bapi to create quotation with variant material having some characteristics.Which bapi you are using to get .If you use this BAPI_CLASS_GET_CHARACTERISTICS you will get two tables.Just check.This is like cl03.
Regards,
Madhu.
‎2012 Jun 27 10:08 AM
Hello All,
At last I have got solution. I would like to share this with all , if incase anyone get same issue in future , this post might help u to solve it.
The solution is as follows.
In our SAP system, one note had already implemented. The SAP note was 350407. It gives previlage to set/reset default values of characteristics through BAPI/IDOC. In our case, it was reseting default characteristics.The below code is implemented through note 350407 which actually checks if the calling program is idoc/BAPI. and if its IDOC/BAPI then it does not consider defaults.
ENHANCEMENT-SECTION ce_i_configure_05 SPOTS es_saplcei0.
IF NOT iv_idoc_mode IS INITIAL AND "350407
gc_use_defaults_in_idocs IS INITIAL. "350407
g_i-no_defaults = 'X'. " defaults are not picked up if its IDOC/BAPI
MODIFY g_i
FROM g_i
INDEX g_i_index
TRANSPORTING no_defaults.
ENDIF. "end 322045
END-ENHANCEMENT-SECTION.
Just to avoid this IDOC mode ,one custome has implemented at beginging of FM ce_i_configure as below.
ENHANCEMENT 1 ZDEFAULTCONFIG. "active version
data : gc_bapi type c.
import gc_bapi from MEMORY id 'ZSD_UPL_TEMP'. " this BAPI is called from custome report
if gc_bapi is not initial.
iv_idoc_mode = ' '. " IDOC mode is changed to blank
endif.
ENDENHANCEMENT.
This enhancment point change IDOC mode and it considers all default values.
‎2012 Jun 27 10:09 AM
‎2012 Jun 27 10:14 AM