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

Wrong pricing condition values when using GN_INVOICE_CREATE

Former Member
0 Likes
1,042

Hi all,

I am currently handling a program where I have to display all the materials in a given sales area and some corresponding values that depend on pricing conditions. I am using FM GN_INVOICE_CREATE to extract table komv. However, I am experiencing a problem because the values I am getting are different from those in table konv. I am getting the price conditions without the value of field KNUMV.

I would like to ask if anybody has any idea on how to go about this or maybe another function module that I can use to get the data I need.

Thanks a lot..

Regards,

jac

4 REPLIES 4
Read only

Former Member
0 Likes
719

Hi jac,

I cant help you on FM to be used but try reading KONV-KSTAT = SPACE only because kstat with 'X' is for statistical data use only and not consider as part of the billing amount. From there you can have correct amount for a certain material. hope it helps.. and please reward points..

regards,

booh

Read only

Former Member
0 Likes
719

Hi,

Thanks for your reply. I only have the field AUART for checking on the pricing conditions.

Here is a the part of my code

CALL FUNCTION 'GN_INVOICE_CREATE'

EXPORTING

vbsk_i = i_vbsk

id_kvorg = ''

id_no_dialog = c_exis

invoice_date = p_datum

pricing_date = p_datum

IMPORTING

vbsk_e = i_vbsk

TABLES

xkomfk = i_komfk

xkomfkgn = i_komfkgn

xkomfkko = i_komfkko

xkomv = i_komv

xthead = i_thead

xvbfs = i_vbfs

xvbpa = i_vbpa

xvbrk = i_vbrk

xvbrp = i_vbrp

xvbss = i_vbss

EXCEPTIONS

OTHERS = 1.

The only parameters in those that have values are c_exis = X, p_datum = given date, and xkomfkgn. The other parameters are all initial when passed to the function module. I get a resulting komv table however, values are incorrect.

Thanks again for the help..

Regards,

jac

Read only

Former Member
0 Likes
719

HI,

try below function module...

'pricing'.

-Prabhu

Read only

Former Member
0 Likes
719

Hi,

Thanks for your reply, however, I cannot use pricing as it imports table KOMK, which I do not have...