cancel
Showing results for 
Search instead for 
Did you mean: 

select statement

Former Member
0 Kudos

im developing invoice smartform.after giving invoice number in VF02 ,the user will go for print.how to write select statement for this in my driver program.for ex:in reports.we retrieve data by designing selection-screen using 'parameters' option.we pass this in select statement and get the data for particular invoice number.in smartform,how to code it in my program for particular invoice number that user gives it in VFO2.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Srinivas,

You no need to vary at all, as already smartform and driver program has been attached in NACE transaction.

when you trigger from invoice transaction, in backend invoice number gets stored in the NAST structure. field is NAST-OBJKEY. Defaultly smartforms has this sturcture if you check in form interfaces you will find the nace structure.

But one thing i am not sure whether you have written from and endform in your driver program. Becasue when you configure program name and smartform name in nace, then when you trigger printout from VF02 it will link to the program runtime using perform statement in background. So, for it we need to write:

Form Entry

endform.

in your program and inside form entry and endform you use the smartform function modules.

If its all done the value of the invoice no is stored in NAST structure. even you dont need to write the select in driver program, you can write it in Smartform.

Hope it should work out.

Regards,

Hemanth

Answers (3)

Answers (3)

former_member480923
Active Contributor
0 Kudos

hi please see the details from the program list avaialble in table TNAPR with applivation = V3 and NACHA = 1. You can see some standard program which has been used for the output .

Hope That Helps

Anirban M.

Former Member
0 Kudos

Hi Srinivas,

The standard program for VF02 is "rlb_invoice" you can use this and write your piece of code (Select quieries) within "FORM ENTRY". Do data declaration in the data declaration part.

This need to be put in NACE transaction so use the standard Smartform or create your own.

This should solve your query.

Reward Points if useful.

Thanks,

Tej.

Former Member
0 Kudos

hi srinivas,

u just define one <itab> in smartforms form interface with same structure of <itab> in driver program,

then equal these two <itabs> in program lines of smartfroms.

try this it works.

reward points if helpful.

regards,

seshu.