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

Facing issue with GN_INVOICE_CREATE.

Former Member
0 Likes
2,600

Hi,

   As per my requirement before saving the billing document I need to display the tax amount and net value. For that i am using GN_INVOICE_CREATE function module. It is giving the tax amount and net value. But here my problem is Billing document is getting generated. I don't to generate the billing document. So can anyone kindly suggest me what are all the mandatory fields should i pass for that function module. And please provide the sample code also.

Thanks & Best Regards,

Yohan.Kanna

1 ACCEPTED SOLUTION
Read only

former_member188827
Active Contributor
0 Likes
1,838

Please check BAPI_BILLINGDOC_SIMULATE to see if this fulfills your requirement.

Regards

3 REPLIES 3
Read only

former_member188827
Active Contributor
0 Likes
1,839

Please check BAPI_BILLINGDOC_SIMULATE to see if this fulfills your requirement.

Regards

Read only

0 Likes
1,838

Hi Mehwish Haq,

                        Can you please send me sample code related to BAPI_BILLINGDOC_SIMULATE. Now with reference to delivery number i am going to create Invoice. For that I am using BAPI_BILLINGDOC_CREATEMULTIPLE. Before calling this fm i need yo display the tax amount and net value. for that purpose i am using GN_INVOICE_CREATE. but it is generating billing document number..But i don't want to generate billing document number. Kindly suggest me to overcome this issue.

Thanks & Best Regards,

Yohan.Kanna

Read only

0 Likes
1,838

Hi,

   Now i got the solution for that issue. here is my code. Please check

   CALL FUNCTION 'GN_INVOICE_CREATE'
       EXPORTING
         vbsk_i            = lw_vbsk_in
         with_posting      = 'H'
         i_without_refresh = 'X'
         id_no_enqueue     = 'X'
         id_no_dialog      = 'X'
       IMPORTING
         vbsk_e            = lw_vbsk
       TABLES
         xkomfk            = lt_komfk
         xkomfkgn          = lt_komfkgn_in
         xkomfkko          = lt_xkomfkko
         xkomv             = lt_komv
         xthead            = lt_thead
         xvbfs             = lt_vbfs
         xvbpa             = lt_vbpa
         xvbrk             = lt_vbrk
         xvbrp             = lt_vbrp
         xvbss             = lt_vbss.

If we pass with_posting as 'H' it won't generate the billing document number. These are the mandatory fields for that(PRSDT,FKDAT,KWMENG,VGBEL,VGPOS,VGTYP,AUBEL and AUPOS)


Thanks & Best Regards,

Yohan.Kanna