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

ABAP - Get invoice on function module / report

c_c2
Participant
0 Likes
1,828

Hi all,

I'm facing a little problem. I need to provide the ability to download some invoices in PDF using one RFC. The problem is that i can't find anything to return me that information (in raw, or something else).

Anyone knows a method to get invoice data raw based on invoice nr?

Regards,

Carlos

10 REPLIES 10
Read only

Former Member
0 Likes
1,575

Why dont you use some BAPI which gives you the Invoice details and convert that to PDF in the calling side?

Also you can make use of RFC_READ_TABLE and read the Invoice tables.

Read only

0 Likes
1,575

Because I need the invoice with the correct format (smart form) and the correct values, that are not available that way.

Read only

0 Likes
1,575

You want to download a smartform output remotely?

Read only

0 Likes
1,575

I want to output the binary from the smartform generated pdf.

Read only

0 Likes
1,575

You have to design a custom RFC for this.

This RFC will take the invoice number as input, execute the smartform inside this and convert the output to binary content using CONVERT_OTF FM.

Check this link to convert to OTF.

http://help.sap.com/saphelp_nw04/helpdata/en/27/67443cc0063415e10000000a11405a/content.htm

Read only

0 Likes
1,575

That's not the problem... The problem is that to generate that smart form we cannot use it directly. It has to be called from RLB_INVOICE, on the VF03 Tcode...

Read only

0 Likes
1,575

Hi,

Can you explain the requirement?

You can send PDF's via output types in VF03.

Thanks,

Shambu

Read only

0 Likes
1,575

I know that, but i need to return that PDF through RFC call.

Read only

0 Likes
1,575

I think you need to copy the RLB_INVOICE and add the logic for calling the FM after the smartform is called.

Read only

0 Likes
1,575

I can't call the RLB manually, it has field needs that i don't have on the moment...