Skip to Content
avatar image
Former Member

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

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • Best Answer
    avatar image
    Former Member
    Apr 20, 2007 at 04:46 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 19, 2007 at 02:58 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 20, 2007 at 04:55 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 20, 2007 at 05:57 AM

    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.

Add comment
10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 20, 2007 at 06:02 AM

    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

    Add comment
    10|10000 characters needed characters exceeded