cancel
Showing results for 
Search instead for 
Did you mean: 

Invoice Smartfrom

Former Member
0 Kudos

Hi Leads,

I am working on Smartform for invoice. In that I need to print Sales order number (VBAK-VBELN) and Order Quantity (VBAP-KWMENG).

The importing structure in the Samrt Form is : LBBIL_INVOICE.

So, from this how can I get Order num and Quantity.

Pleas let me know.

Regards

Sandeep

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi ,

once u get the importing structure 'LBBIL_INVOICE' to smartform.

u can do it like below to print VBELN & KWMENG like below:

data : gs_hd_gen TYPE LBBIL_HD_GEN,

gv_vbeln TYPE vbeln,

gs_IT_GEN TYPE LBBIL_IT_GEN,

gv_fkimg TYPE fkimg.

**Printing Sales Order No

gs_hd_gen = LBBIL_INVOICE-HD_GEN.

gv_vbeln = gv_hd_gen-vbeln.

**Printing Order Quantity

gs_IT_GEN = LBBIL_INVOICE-IT_GEn.

gv_fkimg = gs_IT_GEN-fkimg.

Rgds,

Pavan

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Sandeep,

In this structure, there is the table IT_GEN. Read this table line by line and take the field FKIMG (Quantity).

The sales order number you find it in structure HD_REF, field ORDER_NUMB.

If you are having inconsistencies between the invoice quantity and the order quantity, then I suggest that with the order number (ORDER_NUMB) to do a SELECT on table VBAP somewhere in SmartForm or in the print program and then pass it on.

Best regards,

George