‎2007 Aug 16 7:02 AM
Hi all,
I have pasted my SMART FORM in V/30 so that when sales order VA02 is saved then it is printed automatically.
please look what i have done here in V/30.
Transaction NACE --> Select Application V1(Sales) --> Click on Output Types --> Select the output type as BA00 (as generally BA00 is the output type associated with Sales Order ) --> Double click on the Processing Routines folder on the left and it will display the Form name and the corresponding driver programs name.
As Mentioned by you on the top i have already done this thing. Still i am having problem in printing, like the standard program name and form routine are the same and i added my SMARTFORM into it.
When i goto va02 to print the form then it sayz that WRITE_FORM or START_FORM is missing. i have seen both of these function modules but they are used to print sap Script, i mean not smart form.
Can anyone please tell what i am missing in my FROM in V/30.
Thanks
‎2007 Aug 16 12:21 PM
Which program are you using, RVADOR01?
This one is for the Sapscript, you need to use the program for the Smartforms. In our 4.7 release it came with some sort of support package and was called /SMB40/RVADOR01 (if I remember correctly).
When we upgraded to ECC 6.0 this program was gone. We had troubles with installing the package so I've just copied the program from the old release as Z... and changed the name in V/30.
If you're on 4.7 check the OSS notes - there are instructions on where to get the Smartform programs.
‎2007 Aug 16 1:14 PM
it was nice to have ur reply. Finally i got the solution.
ur right bout all what u have mentioned in the answer but ii wanted to put own smartform and with my own program. It is done by making ur own program in ABAP and then make an ENTRY Routine. Put this routine in V/30 but dont call this routine in ur program i mean by calling perform entry (dont do this).
After that i called my smartform from the function module. The best thing in my program is that i am fetching the Order Number automatically and the code is very simple.
GET PARAMETER ID 'AUN' FIELD my_vbeln.
So this was all the thing and my whole day was gone in searching for this but atlast succesful. i am sharing this so that all other people who visit here would know about this solution.
Thanks....
Usman Malik
‎2007 Aug 16 2:36 PM
Hi,
Hi usman first u have to check in your smart forms function module is called or not i am coping my zprogram for service entry sheer printing i copied from standard and changed it according to my need.
i hope it will help u.
Ckeck it.
FORM ENTRY_NEW USING ENT_RETCO ENT_SCREEN.
*&----
*
*& Form ENTRY_NEW *
*&----
*
Neudruck *
*----
*
*DATA : FORMNAME1 TYPE TDSFNAME.
*DATA : FNAME1 TYPE RS38L_FNAM.
*XSCREEN = ENT_SCREEN.
*IF NAST-AENDE EQ SPACE.
XDRUVO = '1'.
*ELSE.
XDRUVO = '2'.
*ENDIF.
*- Anstoß Verarbeitung -
*
*CLEAR ENT_RETCO.
*PERFORM READ_DATA USING NAST-OBJKY.
*MOVE RETCO TO ENT_RETCO.
*BREAK AAB_ABAP3.
*ENDFORM.
*FORM READ_DATA USING LES_LBLNI.
DATA: LES_LBLNI TYPE ESSR-LBLNI.
DATA : FORMNAME1 TYPE TDSFNAME.
DATA : FNAME1 TYPE RS38L_FNAM.
FORMNAME1 = 'ZMMFORM070'.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = FORMNAME1
IMPORTING
FM_NAME = FNAME1
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 FUNCTION FNAME1 " '/1BCDWB/SF00000079'
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS =
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
V_LBLNI = NAST-OBJKY
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
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.
ENDFORM.
Reward points if it is helpful.