on 06-23-2009 6:18 AM
Hi Abapers,
I designed a 'Purchase recommendation note' form (zprn),by using smartforms.
To assign this to the output type, i want the print program for this form.
I want to know whether, i want to write the print program or the form itself created a print program.
If for mitself created the print program, then tell me how to find it.
If i want to write the print prorgam, suggest me how to write.....
I searched sdn before posting this, but i can't find it...
Thanks & Regards,
BDK.
Thnx for all the replies....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Take your output type name and then go to NACE TCODE and then with your output type you will find list of another output types just open them and then select any output type. Then double click on the Processing Routines there you will find the program name in the Standard Program column you can take that one as your standard program for your Output type.
Hope this will help you,
Regards,
Venkat.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
To find the print program and output type;
1) You can ask your MM consultant.
2) Check tcode NACE
3) Check table TNAPR with original smartform name.
Regards
Karthik D
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
You have to use standard print program or create your own.
One can find example of print program from the program attached to the Output type in NACE Transaction.
Regards
Vijai
Edited by: Vijai Dixit on Jun 23, 2009 7:34 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
you need to write the print program for the smart form
it just creates a function module which you need to call in the print program..
you need to write the print program in this way
DATA: fm_name TYPE rs38l_fnam.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZPRN' "-->Give your smartform name here
IMPORTING
fm_name = fm_name
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.
" Call the function module here that is the function module generated by smartform.
"You can get the name of the function module by going to
" environment in the menubar in the smartform -> function module name
"change the function module name to variable declared above
CALL FUNCTION fm_name
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
[Check this link for knowing more |https://wiki.sdn.sap.com/wiki/x/mAc]
Thanks & Regards
Sarves
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sarves,
Thnx for ur reply....
I had writen the print program with the form name & function module name...
But while executing it displaying error like ' form zpurchase doesn't exist'..... I dont know wat mistake i done.... So clarify my for this....
REPORT ZPO.
tables: ekko,pekko,ekpo,ekpa,eket,ekkn,ekek,komk.
data : fm_name type rs38l_fnam.
data: it_ekpo like standard table of ekpo,
it_ekpa like standard table of ekpa,
it_pekpo like standard table of pekpo,
it_eket like standard table of eket,
it_tkomv like standard table of komv,
it_ekkn like standard table of ekkn,
it_ekek like standard table of ekek,
it_komk like standard table of komk.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = 'zpurchase'
* VARIANT = ' '
* DIRECT_CALL = ' '
IMPORTING
FM_NAME = fm_name
* 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.
code as follows.....
CALL FUNCTION fm_name
EXPORTING
* ARCHIVE_INDEX =
* ARCHIVE_INDEX_TAB =
* ARCHIVE_PARAMETERS =
* CONTROL_PARAMETERS =
* MAIL_APPL_OBJ =
* MAIL_RECIPIENT =
* MAIL_SENDER =
* OUTPUT_OPTIONS =
* USER_SETTINGS = 'X'
IS_EKKO = ekko
IS_PEKKO = pekko
* IS_NAST =
* IV_FROM_MEM =
* IV_DRUVO = druvo
* IMPORTING
* DOCUMENT_OUTPUT_INFO =
* JOB_OUTPUT_INFO =
* JOB_OUTPUT_OPTIONS =
TABLES
IT_EKPO = it_ekpo
IT_EKPA = it_ekpa
IT_PEKPO = it_pekpo
IT_EKET = it_eket
IT_TKOMV = it_tkomv
IT_EKKN = it_ekkn
IT_EKEK = it_ekek
IT_KOMK = it_komk
* EXCEPTIONS
* FORMATTING_ERROR = 1
* INTERNAL_ERROR = 2
* SEND_ERROR = 3
* USER_CANCELED = 4
* OTHERS = 5
.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Hi Ankur,
Thnx for ur reply... Now form has executed.....
But i got a dump error stating tat "one of the parameter missing, i.e.., 'druovo'".....
One more thing, how to give declare this parameter druvo in program.,
and i want to give the purchase order number in runtime, so tat the user can give the PO number after executing this program and to get the print out of this form.....
Hi Ankur,
I had checked as optional in form interface, and now i got the output...
i want to give the purchase order number in runtime, so tat the user can give the PO number after executing this program and to get the print out of this form.....
I had declared the parameter for ebeln as,
parameters: iv_ekko like ekko-ebeln.
But after giving the PO number in runtime, i m getting only the empty layout, not with the values of tat PO number....
So, guide me how to do this...
Thanks,
BDK....
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.