adspace


send coding to write a program to create customer quotation
using
BAPI 'BAPI_QUOTATION_CREATEFROMDATA2/BAPI_QUOTATION_CREATEFR
OMDATA'

Answer Posted / Rajendra Kumar Akela

The function modules BAPI_QUOTATION_CREATEFROMDATA2 and BAPI_QUOTATION_CREATEFROMDATA are similar, with the latter being an older version. Here's an example using BAPI_QUOTATION_CREATEFROMDATA:n
```abap
DATA: lt_quote_data TYPE STANDARD TABLE,
wa_quote TYPE bapi_quotation_createfromdata_input.
SELECT * INTO TABLE lt_quote_data FROM zz_quote_table.
LOOP AT lt_quote_data ASSIGNING FIELD-SYMBOL(<ls_quote>)." Prepare data for the quotation header and items."
CLEAR wa_quote.
wa_quote-bapi_header = VALUE #( ( bapivbeln = <ls_quote>-quote_number )
( bapivslag = 'X' ) )." Set the quotation type to X for sales order."
wa_quote-bapi_items = VALUE #( ( bapi_item = VALUE #( ( matnr = <ls_quote>-material )
( menge = <ls_quote>-quantity ) ). ). )." Add the quotation items."
CALL FUNCTION 'BAPI_QUOTATION_CREATEFROMDATA' EXPORTING iv_quotation = wa_quote IMPORTING et_return = DATA(lv_status)." Call the BAPI to create the quotation."
IF lv_status IS NOT INITIAL AND lv_status = '000'." Successful execution of BAPI. Perform any additional tasks here."" ELSE.""Unsuccessful execution of BAPI. Handle the error here.".
ENDLOOP.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Hi every one ! You people are doing a great job here , Im going to attend Tata Technologies interivew on this sunday,Can anyone who has already attended this company interivew or other companies interivews in abap pls share ur experience with me and help me to get into job my id ushareddyabap@gmail.com. Thankyou verymcuh

2008


How can we handle table control in bdc? : abap bdc

1189


what comes in Timkein written test I hope some body can tell me at this id plz tell it before 9 pm 19 march

2233


How do you get the number of lines in an internal table? How to use a specific number occurs statement?

1026


Did you create secondary index?

1239


1/ How do u apprach if error occur in sending idocs ? 2/ where u assigned process code ?

2070


What work you have done in HR module

1455


What is your current client number?

1139


please give the remaining answers.

2307


What is the project you are currently working and work that you are doing

1606