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

creating contract reference with Quotation - using bapi or fm

Former Member
0 Likes
1,738

Hi Friends

Currently I am creating contract using function module sd_saleorder_create function module.But as per new requirement we have to create contract referenced with quotation number.

Please suggest the suitable bapi or function module.if you suggest some thing ..kindly let me know?

how to create contract referenced with particular line item in the quotation.

where I need to pass the referenced line items...if you need any inputs..will reply by tomorrow...

thanks

Gowrishankar

1 ACCEPTED SOLUTION
Read only

former_member191735
Active Contributor
0 Likes
1,207

Hi Friends

>

> Currently I am creating contract using function module sd_saleorder_create function module.But as per new requirement we have to create contract referenced with quotation number.

>

> Please suggest the suitable bapi or function module.if you suggest some thing ..kindly let me know?

>

> how to create contract referenced with particular line item in the quotation.

>

> where I need to pass the referenced line items...if you need any inputs..will reply by tomorrow...

>

> thanks

> Gowrishankar

is it really SD_SALEORDER_CREATE? if yes, which version are you in?

Have you thought about 'BAPI_CONTRACT_CREATEFROMDATA'. Documentation available for this bapi.

If not, just an FYI, REF_DOC field in (BAPISDHD1) -Contract_header_in structure can be used to pass the ref document and check for the type. You will also need to pass the type for this ref_doc.

Assuming you have the configuration in place already.

Search forum for this BAPI to get the sample code.

7 REPLIES 7
Read only

former_member191735
Active Contributor
0 Likes
1,208

Hi Friends

>

> Currently I am creating contract using function module sd_saleorder_create function module.But as per new requirement we have to create contract referenced with quotation number.

>

> Please suggest the suitable bapi or function module.if you suggest some thing ..kindly let me know?

>

> how to create contract referenced with particular line item in the quotation.

>

> where I need to pass the referenced line items...if you need any inputs..will reply by tomorrow...

>

> thanks

> Gowrishankar

is it really SD_SALEORDER_CREATE? if yes, which version are you in?

Have you thought about 'BAPI_CONTRACT_CREATEFROMDATA'. Documentation available for this bapi.

If not, just an FYI, REF_DOC field in (BAPISDHD1) -Contract_header_in structure can be used to pass the ref document and check for the type. You will also need to pass the type for this ref_doc.

Assuming you have the configuration in place already.

Search forum for this BAPI to get the sample code.

Read only

0 Likes
1,207

Hi Sampath..

Thanks for your reply..currently I am using r/3 4.7.if I use reference document details in that BAPISDHD1.where I need to pass line item details.

For example I am going to create a contract referenced with line item 10 in Quotation.Totally quotation have three line items 10,20 and 30.I should pick the values from Quote only referenced with line item 10.

So plz give me an idea..where I have to give the line item details..

thanks

Gowrishankar

Read only

0 Likes
1,207

Well, as far as i know, you cannot control the items from reference document. this is all or nothing. Experts correct me if i am wrong. At least, i have never come across.

Read only

0 Likes
1,207

Hi Sampath

its ok if I create using SD_SALESDOCUMENT_CREATE, its showing quotation number in Contract document flow.But against quote its shows "Archieve" , if I checked the same quotation in VA23, its showing "Open status".

Totally I am confused.if I searched with quotation,I am not able to find entires in VBFA table.But I searched with contract its showing entries in VBFA table.

is there any field we need to pass to update the status of document flow part...

Hi Friends..if anyone come acroos this kind of scenario..please let me know.

Thanks

Gowrishankar

Read only

0 Likes
1,207

Well, I dont know any kind of parameter you need to pass it to the FM. I doubt there is one.

When you check VBFA, you are checking in both the fields right? I mean, VBELV and VBELN for the quote.

Why do you use this RFC where there is no documentation on it. there is documentation for the bapi.

Read only

0 Likes
1,207

Yes Sampath I checked both the fields in VBFA.Actually we already creating contract using that RFC...so I am trying with that.

Inside BAPI also they used same RFC.so there is not much difference..But anyway tomorrow I will try with that...

if you have any clue..reply to this..

hello friend :-if anybody have solution..kindly send the details..

Thanks

Gowrishankar

Read only

Former Member
0 Likes
1,207

passed reference variable in line item level.Now its working fine.