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 question for create the billing

Former Member
0 Likes
2,353

Hi all,

I used the bapi BAPI_BILLINGDOC_CREATEFROMDATA to create billing document.

after processed the this bapi , i want to find out the billing document and proccess to printout the invoice automtically.

but it seem can't find out the billing document after processed the bapi.

Can anyone know what happen ?

Regards,

Luke

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,203

Have you checked the output table SUCCESS? Please check.

You can also check this thread, same concern as yours.

BAPI_BILLINGDOC_CREATEMULTIPLE Billing Doc not created

Regards,

Jake

10 REPLIES 10
Read only

Former Member
0 Likes
2,203

Luke

You should be getting the message log in the Tables Parameter  RETURNLOG_OUT  of the particular BAPI you are talking about ..Did you take a look at that in debugging mode ? 

Read only

0 Likes
2,203

Hi Rakhunathan,

if you look in the debug mode, i can find out the billing document no.

if i not trigger the background mode, it can't find out the billing document no.

do you know what happen on it?

Regards,

Luke

Read only

0 Likes
2,203

Luke

Sever al questions

1 . Are you calling the FM as CALL FUNCTION IN BACKGROUND TASK ??

2.  Is your RFC Destination is implicity "NONE" or  are you calling to another system???

If your answer is Yes to Point 1 ,  then  your FM will not executed untill a COMMIT work is executed

as when you call a FM as a BACKGROUND TASK it will be registered in SAP LUW and will be

executed only if a COMMIT WORK is executed !!!

Read only

0 Likes
2,203

Hi Ramachandran,

I am using the BAPI BAPI_BILLINGDOC_CREATEMULTIPLE and i also used the function COMMIT WORK AND WAIT. But still can't find out the Billing document. Do you know why ?

Regards,

Luke

Read only

0 Likes
2,203

Luke ,

Did u set a break point within the BAPI and see??

Enable Update debugging and once the COMMIT WORK is executed your BAPI should execute ..Also i believe you are  checking  the Return Parameter after the execution of the COMMIT WORK AND WAIT , and not before

Read only

0 Likes
2,203

Hi Ramachandran,

I already set the break point after the COMMIT WORK and WAIT. I checked the return table, it contains the Billing Document. But i don't know why if i have the SQL statement for check this Billing document is it exist in our database, it return the subrc code is 4.

Do you know what happen ?

Regards,

Luke

Read only

0 Likes
2,203

Luke

I hope you have used BAPI_TRANSACTION_COMMIT with the Parameter  wait = 'X'   RATHER THAN commit work and wait  Directly... BAPI_TRANSACTION_COMMIT  uses COMMIT WORK AND WAIT internally ,however additionally it clears the memory .

Also , hope you have ensured  the ' testrun '  parameter is blank .... ...Post your code so you might get a solution fom some of use

Read only

0 Likes
2,203

Hi All,

I already check those table and the return message contain Billing document no. .
but i delay 1 second then can process to printout.

Read only

venkateswaran_k
Active Contributor
0 Likes
2,203

Hi

Please paste your BAPI calling statements block.?  Did you put the Commit Statemetns?   What is the value it is returning in RETURN table?

Regards,

Venkat

Read only

Former Member
0 Likes
2,204

Have you checked the output table SUCCESS? Please check.

You can also check this thread, same concern as yours.

BAPI_BILLINGDOC_CREATEMULTIPLE Billing Doc not created

Regards,

Jake