cancel
Showing results for 
Search instead for 
Did you mean: 

multiple format for PO print

Former Member
0 Kudos

hi,

In purchase order we want to have two different print out formats for different plants.

ie. PLANT A's purchase order print shud use smartform A

while plant B should use form B.

i have created the forms.

but i am unable to attach both the form at a time.

so my query is how do we achieve the above requirement.

regards

rahul.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hI,

You can follow the below logic. loop at the internal table containing your data which you want to display in smartforms and contains the plant.


loop at itab into wa.
if wa-werks = 'PLANT A'.
call function 'SSF_FUNCTION_MODULE_NAME'
  exporting
    formname                 = 'FORM A' "passing name of form
*   VARIANT                  = ' '
*   DIRECT_CALL              = ' '
 importing
    fm_name                  = fm_name "fn module generated
* EXCEPTIONS
*   NO_FORM                  = 1
*   NO_FUNCTION_MODULE       = 2
*   OTHERS                   = 3.
elseif wa-werks = 'PLANT B'.
call function 'SSF_FUNCTION_MODULE_NAME'
  exporting
    formname                 = 'FORM B' "passing name of form
*   VARIANT                  = ' '
*   DIRECT_CALL              = ' '
 importing
    fm_name                  = fm_name "fn module generated
* EXCEPTIONS
*   NO_FORM                  = 1
*   NO_FUNCTION_MODULE       = 2
*   OTHERS                   = 3.
endif.
endloop.

Former Member
0 Kudos

thanks..it worked.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Your can create another "Output Type" in NACE txn. and create a new conditon type with Plant combination and maintain the Condition records for both the plants in NACE Txn. by this you can achieve.

Regards

GK.

Former Member
0 Kudos

hi,

i tried to maintain condition, but pur. organisation/vendor combination is available. and all my vendors are under same pucrhase organisation.

can u explain a bit more on how do i achieve the desired configuration?.

thanks