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

select Query for smart form-invoice

kiran_k8
Active Contributor
0 Likes
507

Hi Folks,

I have to fetch the following fields as per the requirement for desiging a invoice smartform.I had copied lb_bill_invoice smartform into z format.

Can anyone here please give me the select query for the same.

fields to fetched are as follows:-

1.vbrp-arktx,

2.vbrp-fkimg,

3.konv-kbetr with respect to vbrk-knumv

4.konv-kwert.

And also what all I have to give in format interface and global definitions of the smartform.

please help me in this regard.

Points will be given.

K.Kiran.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
475

Hi,

Take the billing doc(invoice field) and fetch the

vbrp-arktx(material Description) and the Qty(vbrp-fkimg).

take the VBRK-KNUMV field and fetch the

konv-kbetr and Konv-kwert.fields.

You can create PROGRAM_Lines in the smart form and can write the select statement.

reward if useful

regards,

Anji

Hi Folks,

I have to fetch the following fields as per the requirement for desiging a invoice smartform.I had copied lb_bill_invoice smartform into z format.

Can anyone here please give me the select query for the same.

fields to fetched are as follows:-

1.vbrp-arktx,

2.vbrp-fkimg,

3.konv-kbetr with respect to vbrk-knumv

4.konv-kwert.

And also what all I have to give in format interface and global definitions of the smartform.

please help me in this regard.

Points will be given.

K.Kiran.

3 REPLIES 3
Read only

Former Member
0 Likes
476

Hi,

Take the billing doc(invoice field) and fetch the

vbrp-arktx(material Description) and the Qty(vbrp-fkimg).

take the VBRK-KNUMV field and fetch the

konv-kbetr and Konv-kwert.fields.

You can create PROGRAM_Lines in the smart form and can write the select statement.

reward if useful

regards,

Anji

Read only

0 Likes
475

Hi Anji,

Can you please give me the exact select statement ?

K.Kiran.

Read only

0 Likes
475

Hi,

declare the variables V_arktx(40) and v_Qty like vbrp-fkimp and other varaibles for Kbetr, kwert, knumv on the global definitions.

select single arktx fkimg into (v_arktx, v_qty) from vbrp

where vbeln = LBBIL_IT_REFPURORD-BIL_NUMBER.

select single knumv into v_knumv from vbrk where where vbeln = LBBIL_IT_REFPURORD-BIL_NUMBER.

this select has to fire in the item level and in the loop.

so have to write in the correct place.

select kbetr kwert into (v_kbetr, v_kwert) from konv

where where knumv = v_knumv and kposn = LBBIL_IT_REFPURORD-ITM_NUMBER.

regards,

anji