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

Can we create two different forms in one program

Former Member
0 Likes
606

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.

4 REPLIES 4
Read only

former_member192467
Active Participant
0 Likes
574

Hi,

Yes. You can do that.

Please check the standard INVOICE form L_BIL_INVOICE and see how they have achieved it.

Read only

Former Member
0 Likes
574

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

Read only

Former Member
0 Likes
574

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

Read only

Former Member
0 Likes
574

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