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 for quotation

Former Member
0 Likes
790

Hi All,

Iam using the BAPI ' BAPI_QUOTATION_CREATEFROMDATA ' to create quotation with item condition types and condition values. But the bapireturn structure does not getting any data as output ( quotation not getting generated). Can anyone please tell me where it is going wrong.

Iam passing all the necessary data to the bapi like

header data, item data and partner data.



      CALL FUNCTION 'BAPI_QUOTATION_CREATEFROMDATA'
        EXPORTING
          order_header_in           = t_head
          without_commit            = ' '
          convert_parvw_auart       = 'X'
 IMPORTING
          salesdocument             = salesdocument
          sold_to_party             = t_sold_to_party
*   ship_to_party             =
*   billing_party             =
          return                    = t_return
        TABLES
          order_items_in            = t_item
          order_partners            = t_partner
          order_items_out           = t_order_items_out
          order_cfgs_ref            = t_order_cfgs_ref
          order_cfgs_inst           = t_order_cfgs_inst
          order_cfgs_part_of        = t_order_cfgs_part_of
          order_cfgs_value          = t_order_cfgs_value
                .

      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
       EXPORTING
         wait          = ' '

iam passing partner role also as 'AG'.

4 REPLIES 4
Read only

Former Member
0 Likes
722

Hi all,

Problem solved.

But only initial condition type and condition value is getting updated. But Iam having more than one condition types and values.

Can anyone please suggest me.

Thanks

Murali.

Read only

0 Likes
722

Hi Murali,

Try checking the same through entering test data in SE37. There it'll be easier for you to identify the problem.

Execute BAPI_QUOTATION_CREATEFROMDATA in se37. In another session (same client) execute BAPI_TRANSACTION_COMMIT after your BAPI_QUOTATION_CREATEFROMDATA.

Debugging will also be easier. I tried doing the same for another BAPI I was using and it proved helpful.

I hope it helps.

Regards,

Shraddha

Read only

0 Likes
722

Hi Shraddha,

Thanks for your reply.

I have tried through SE37 by passing values to the bapi tables and It is generating the quotation properly.

But my requirement is :-

My client needs to pass several Condition types and condition values (say maximum 10 different condition

types and 10 condition values). But this BAPI had provided only 4 fields in the item table using which we can update only 4

condition types and 4 condition values.

Finally the System should update all the 10 different condition types and condition values while creating the quotation.

Please guide me in this regard.

Thanks,

Murali.

Read only

0 Likes
722

Hi all,

Can anybody suggest me in achieving this function?

Thanks & Regards,

Murali