cancel
Showing results for 
Search instead for 
Did you mean: 

How can add two forms in same driver program and same output type?URGENT!!

Former Member
0 Kudos

Hi

For same output type LD00(BOL), I need to create two layouts as per the requirement. I am checking one flag in driver program.

if flag is checked.

driver program -> form1

else

driver program ->form 2.

This is my requirement. how can I go ahead? It is rgent !!

Could any one please answer it??

Rupu.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi,

You have to configure the NACE transaction with a different output type.

Output type is a key field where you connect your report and scirpt to this output type and corresponing script gets pulled and used by the report program based on the output type. You can also check the details in TNAPR table.

Hope this helps.

Regards,

Richa.

0 Kudos

Hi,

How can we add two output type in same driver program. Urgent.

former_member751591
Participant
0 Kudos

Thanks for coming to SAP Community for answers. Please post your question as a new question here: https://answers.sap.com/questions/ask.html

Since you're new in asking questions here, check out our tutorial about asking and answering questions (if you haven't already), as it provides tips for preparing questions more effectively, that draw responses from our members. Please note, that your post here won't be answered.

Answers (4)

Answers (4)

Former Member
0 Kudos

in addition to Ravi ,

based on the conditions u can call diff layouts , by dynamically providing Form name and etc.

in these case no need to do settings in NACE .

Regards

Prabhu

Former Member
0 Kudos

hi,

i am sending u the code which i have written in my print program 4 same situation.

we simply declare a table 'TNAPR'.

then on some condition in TNAPR-SFORM initialise different smartforms and pass this in function module .

DATA : inv_code LIKE vbak-vbeln.

BILL_DOC_EXP-SPRAS = 'E'.

BILL_DOC_EXP-VBELN = nast-objky(10).

inv_code = nast-objky(10).

SELECT SINGLE WERKS INTO L_WERKS FROM J_1IEXCHDR WHERE RDOC =

inv_code.

select * from vbrp into table i_vbrp where vbeln = inv_code.

      • lf_formname = tnapr-sform.

  • IF L_WERKS = '2000'.

tnapr-sform = 'ZSD_FACTORY_INVOICE'.

  • ELSE.

  • tnapr-sform = 'ZSD_FACTORY_EXCISE_INVOICE_PAT'.

  • ENDIF.

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

FORMNAME = tnapr-sform

  • VARIANT = ' '

  • DIRECT_CALL = ' '

IMPORTING

FM_NAME = L_FMNAME

  • EXCEPTIONS

  • NO_FORM = 1

  • NO_FUNCTION_MODULE = 2

  • OTHERS = 3

.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

revert points if useful.

Regards,'

santosh.

Former Member
0 Kudos

Hi,

You can call two forms by write form by checking the flag by if condition... like..

if Flag is initial

call open form form1

call write form form1

call close form form 1

else

call open form form2

call write form form2

call close form form2

endif.

Thanks

Giridhar

former_member181962
Active Contributor
0 Kudos

Hi Shiva,

the TNAPR table has the key fields as

Output Type

Message transmission medium

Application

since the Message transmission medium

and Application will not change, you canot configure two drivers for the same output type.

You can configure another ouput type for another layout though.

Regards,

ravi