‎2009 Jun 25 10:58 AM
Hi Experts,
i have to create a smartform in which there is two type credit and second is invoice.If the type is invoice then open a different form in size also and if it is credit then open a different form . Is it possible that we can craete two different forms in one program.can hide the form according to type.
‎2009 Jun 25 11:04 AM
Hi,
Yes. You can do that.
Please check the standard INVOICE form L_BIL_INVOICE and see how they have achieved it.
‎2009 Jun 25 11:06 AM
Hi,
Yes you can do it.
Depending upon the type call the different smartforms or sapscripts in the driver program.
You will just have to use a normal IF statement.
Regards,
Ankur Parab
‎2009 Jun 25 11:15 AM
Hi,
Create the two smartforms and call them in the driver program based on the requirement with a simple conditional statement (eg IF Endif. )
Cheers
Manoj
‎2009 Jun 25 11:54 AM
Hi
Yes u can just simply
START-OF-SELECTION.
PERFORM CHECK_INVOICE.
For Credit Memo
IF W_DOC_CAT = 'O'.
PERFORM GET_HEADER_DATA1.
PERFORM GET_DATA_ITEM1.
PERFORM GET_FOOTER_DETAIL1.
PERFORM GET_HEADER_TEXTS1.
PERFORM DISPLAY_SMARTFORM_CREDIT.
ENDIF.
For Debit Memo
IF W_DOC_CAT = 'P'.
PERFORM GET_HEADER_DATA2.
PERFORM GET_DATA_ITEM2.
PERFORM GET_FOOTER_DETAIL2.
PERFORM GET_HEADER_TEXTS2.
PERFORM DISPLAY_SMARTFORM_DEBIT.
ENDIF.
try and