on 01-09-2007 9:24 AM
Hi,
I have managed to convert my sapscript to smartfiorm, but my question is about the print program of the sapscript.
Is it possible to convert it also or i must to change it maually??
If i must to change manually, what kind of change are to be done to convert this print program??
I have cheched the other thread but no really answer of this question.
Tanks a lot
Hi,
Framing the print program for smartform is easy.
Just copy the function module once you generated the smartform.
Paste the fm name in pattern in ABAP editor.
Pass the necessary parameters to it.
Activate it.
Check this link for sample program.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Tanks for your response.
I found the function module name (a name like /1BCDWB/SF00000050). Is it well this kind of fm that you mean.
"Paste the fm name in pattern in ABAP editor."
What would you like to mean with this sentence. Create a new Zprogram and call this fm or create a pattern in my print program of the sapscript.
because when i created a pattern, it must be under 100 lines of code and the fm is longer than that.
Thanks
Hi,
u have to make a few changes in ur smartform print program yar. u need not to change the whole code but replace the statements of start_form,open_form,write_form,end_form,close_form. by the following code.
u have used following stmt.
CALL FUNCTION '/1BCDWB/SF00000001'
but replace it by following code.
DATA: gv_fm_name TYPE rs38l_fnam, "DV1K909057 PRASADDX
gv_formname TYPE tdsfname. "DV1K909057 PRASADDX
Calling the layout set
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = gv_formname
IMPORTING
fm_name = gv_fm_name
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
IF sy-subrc <> 0.
PERFORM protocol_update.
ENDIF.
IF gv_fm_name IS NOT INITIAL.
Below function module is used to show the Smart form
CALL FUNCTION gv_fm_name
also understand the concept by checking the following link.hope this works helpful
Message was edited by:
Durgaprasad Kare
Thanks
My print program is quite long (2000 line) and i found start_form,open_form,write_form,end_form or close_form many times.
A write_form per element.
So i suppose that i must replace all of these by the below code one time at the beginning of the programm?
Is it not more easy for me to just call the smartform from the print rpogramm and do the code on the initilization tab of the smartform?
Just a last question, if I do that what about the information pass betwwen sap,printprogram and smartfornm. Information ; My smartform is the outpout document of the shippment number... Resume :How I can retrieve the information about the shippment??
Thanks a lot to all
i understand that bu the logic u use here is we dont require all the includes of the print program.jst copy the print program to a Z program and only use the top include where all the tables are declared and then use two custom includes for calling the smart form and updating the nast function protocol update.
rest u can delete it .
ur smartform will retrieve data from print program using DOC and NAST.
this is the include
INCLUDE zme_print_forms. "Custom include to achieve the requirement
inside the include write the following code.
CHECK xscreen = space.
Call Function for Protocol Update
CALL FUNCTION 'NAST_PROTOCOL_UPDATE'
EXPORTING
msg_arbgb = syst-msgid
msg_nr = syst-msgno
msg_ty = syst-msgty
msg_v1 = syst-msgv1
msg_v2 = syst-msgv2
msg_v3 = syst-msgv3
msg_v4 = syst-msgv4
EXCEPTIONS
MESSAGE_TYPE_NOT_VALID = 1
NO_SY_MESSAGE = 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.
hope this is helpful
Hello, I thought I would use this thread instead of starting my own. I am looking for a pdf document on converting sapscript to smartforms. I found it doing a forum search but I can't find it again. It was hosted by another site and it was 11 pages long. I believe it dealt with the print program (that's what I'm having trouble with).
Regards,
Davis
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.