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_CUSTOMERRETURN_CREATE - Price

Former Member
0 Likes
2,997

Hi,

I am creating orders from a reference invoice using Bapi: BAPI_CUSTOMERRETURN_CREATE.

The problem is happening with the conditions that are being created without reference to invoice.

Anybody have any ideia how to get the price value from invoice?

Any suggestion will be appreciated!

Tks,

Patricia

5 REPLIES 5
Read only

Former Member
0 Likes
1,862

can you read from condition table by condition number from invoice header or item? (table KONP, if I remember correctly)...read with VBRK-KNUMV and VBRP-POSNR or '0'? Hope that's right...doing from memory since no longer have SD.

Read only

0 Likes
1,862

Hi BreakPoint, thanks for the feedback.

I tried to do this, but the BAPI has an error when sending a condition which is calculated by the configuration, you know?

You can only send to the BAPI conditions values that are entered manually ...

Patricia

Read only

Former Member
0 Likes
1,862

hi,

Discovered. It remained to spend the time of pricing conditions.

Read only

0 Likes
1,862

Hi Patricia,

I am also facing similiar problem as you have been.

I am trying to create a return w/ref to an invoice.

However, the BAPI does not copy the reference price from the invoice.

Can you assist?

Thanks

Read only

0 Likes
1,862

Hi Colin Cheong

In my case the function BAPI_CUSTOMERRETURN_CREATE not copied entirely by the conditions that I was not passing the correct date in the field of PRICE_DATE BAPI. This date determines the Price, and this function is created with the current date and it goes bad conditions. Try to pass the same date the document that you are wanting to copy.

It is concluded that the function BAPI_CUSTOMERRETURN_CREATE not copy, but only TIE with the reference flow of the document and it does not guarantee to us what we needed was the identical copy!

I opened a sap called in explaining the problem.

They suggested that the function was used BAPI_SALESDOCUMENT_COPY it works perfectly. Just pass the invoice number that it copies everything correctly, including all items.

In my case I had to use BAPI_SALESORDER_CHANGE also function to eliminate some items that I did not need and change some data in the header.

This was the solution I found. Hope that helps.