cancel
Showing results for 
Search instead for 
Did you mean: 

Smart Form-Driver Program

Former Member
0 Kudos

Hi All,

I have created a driver program and I have two smart forms , The thing is like from one driver program i want to executed two smart forms where logic is almost same for the both the forms.So put me some code lines if possible .

with regards,

Swathi.K

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi swathi,

Yes based on conditions you can print the smartform in the driver program.

SELECTION-SCREEN BEGIN OF BLOCK block  WITH FRAME.
PARAMETERS:
p_vintag  RADIOBUTTON GROUP rad1,
p_contag RADIOBUTTON GROUP rad1,
p_rmctag  RADIOBUTTON GROUP rad1,
p_rfrtag  RADIOBUTTON GROUP rad1.
SELECTION-SCREEN END OF BLOCK block.
 

   IF sy-subrc EQ 0.
*"For Vintag smartform................................................
    IF p_vintag EQ 'X'.
      w_form = 'Y_HFA_VINTAG'.
*"For Containertag smartform..........................................
    ELSEIF p_contag EQ 'X'.
      w_form = 'Y_HFA_CONTTAG'.
*"For Remanufacturedtag smartform.....................................
    ELSEIF p_rmctag EQ 'X'.
      w_form = 'YH_HFA_REMAC'.
*"For Reefertag smartform.............................................
    ELSEIF p_rfrtag EQ 'X'.
      w_form = 'YH_HFA_REEFER'.

Regards,

Sravanthi

Former Member
0 Kudos

Hi Swathi,

There will be one unique condtion for each fron.Give that in IF condtion and call the the smart function modules in that if condtion and your samrt form will trigger where the condtion satisfies with only one out put type.

Regards

Rasheed

Former Member
0 Kudos

must be there some different on you forms, without different no need to develop 2 forms..

ex : if you take invoice based on billing type diffrent forms is there with some dieerent chnages.

if FKART = 'F2'

Invoice

if FKART = 'WIA'

Plants abroad.

Former Member
0 Kudos

Hi,

U can print two forms with one driver program.

Eg : if u have two radio buttons(R1,R2).

If R1 = 'X'.

Print first form.

else.

Print second form.

endif.

Former Member
0 Kudos

So you need to print either one or both the smartforms?

If you want only one, code a condition before calling the smartform otherwise call the smartforms one by one.

You can call it after the first smartform call or using a program line at the end of the first smartform.

Regards

Karthik D