Regading smart forms
hi frnds,
How to call a smartform in a ABAP program? what is the function module? give step by step process........
Go through this
*& Report ZQMR_QUALITY_NOTIFICATION
REPORT zqmr_quality_notification NO STANDARD PAGE HEADING .
Table Declaration
TABLES: qmel,
prps,
proj,
afvc,
makt,
qpct,
jest,
jsto,
tj30t,
tq80_t.
Types Declaration
TYPES: BEGIN OF typ_qmel,
qmnum TYPE qmel-qmnum,
qmart TYPE qmel-qmart,
qmtxt TYPE qmel-qmtxt,
erdat TYPE qmel-erdat,
qwrnum TYPE qmel-qwrnum,
psp_nr TYPE qmel-psp_nr,
fertaufnr TYPE qmel-fertaufnr,
ebeln TYPE qmel-ebeln,
ebelp TYPE qmel-ebelp,
matnr TYPE qmel-matnr,
mblnr TYPE qmel-mblnr,
arbpl TYPE qmel-arbpl,
ekorg TYPE qmel-ekorg,
bkgrp TYPE qmel-bkgrp,
objnr TYPE qmel-objnr,
pnlkn TYPE qmel-pnlkn,
fertaufpl TYPE qmel-fertaufpl,
qmcod TYPE qmel-qmcod,
qmnam TYPE qmel-qmnam,
ernam TYPE qmel-ernam,
prueflos TYPE qmel-prueflos,
zz_short_text TYPE qmel-zz_short_text,
END OF typ_qmel.
TYPES: BEGIN OF typ_prps,
psphi TYPE prps-psphi,
END OF typ_prps.
TYPES: BEGIN OF typ_proj,
post1 TYPE proj-post1,
pspnr TYPE proj-pspnr,
END OF typ_proj.
TYPES: BEGIN OF typ_afvc,
vornr TYPE afvc-vornr,
ltxa1 TYPE afvc-ltxa1,
aufpl TYPE afvc-aufpl,
plnkn TYPE afvc-plnkn,
END OF typ_afvc.
TYPES: BEGIN OF typ_makt,
maktx TYPE makt-maktx,
matnr TYPE makt-matnr,
END OF typ_makt.
TYPES: BEGIN OF typ_qpct,
code TYPE qpct-code,
katalogart TYPE qpct-katalogart,
codegruppe TYPE qpct-codegruppe,
kurztext TYPE qpct-kurztext,
END OF typ_qpct.
TYPES: BEGIN OF typ_jest,
stat TYPE jest-stat,
objnr TYPE jest-objnr,
END OF typ_jest.
TYPES: BEGIN OF typ_jsto,
stsma TYPE jsto-stsma,
objnr TYPE jsto-objnr,
END OF typ_jsto.
TYPES: BEGIN OF typ_tj30t,
txt04 TYPE tj30t-txt04,
txt30 TYPE tj30t-txt30,
estat TYPE tj30t-estat,
stsma TYPE tj30t-stsma,
END OF typ_tj30t.
TYPES: BEGIN OF typ_tq80_t,
qmartx TYPE tq80_t-qmartx,
qmart TYPE qmel-qmart,
END OF typ_tq80_t.
Internal table Declaration
DATA: gt_qmel TYPE STANDARD TABLE OF typ_qmel.
DATA: gt_prps TYPE STANDARD TABLE OF prps.
DATA: gt_proj TYPE STANDARD TABLE OF typ_proj.
DATA: gt_afvc TYPE STANDARD TABLE OF typ_afvc.
DATA: gt_makt TYPE STANDARD TABLE OF typ_makt.
DATA: gt_qpct TYPE STANDARD TABLE OF typ_qpct.
DATA: gt_jest TYPE STANDARD TABLE OF typ_jest.
DATA: gt_jsto TYPE STANDARD TABLE OF typ_jsto.
DATA: gt_tj30t TYPE STANDARD TABLE OF typ_tj30t.
DATA: gt_text1 TYPE STANDARD TABLE OF text1.
DATA: gt_tq80_t TYPE STANDARD TABLE OF typ_tq80_t.
DATA: gt_final TYPE STANDARD TABLE OF zqms_qn.
Structure Declaration
DATA:gs_qmel TYPE typ_qmel.
DATA:gs_prps TYPE prps.
DATA:gs_proj TYPE typ_proj.
DATA:gs_afvc TYPE typ_afvc.
DATA:gs_makt TYPE typ_makt.
DATA:gs_qpct TYPE typ_qpct.
DATA:gs_jest TYPE typ_jest.
DATA:gs_jsto TYPE typ_jsto.
DATA:gs_tj30t TYPE typ_tj30t.
DATA:gs_text1 TYPE text1.
DATA:gs_tq80_t TYPE typ_tq80_t.
DATA:gs_final TYPE zqms_qn.
DATA: gv_inspt TYPE char20.
Selection Screen
SELECTION-SCREEN BEGIN OF BLOCK b11 WITH FRAME TITLE text-110.
PARAMETER: p_qmnum TYPE qmel-qmnum OBLIGATORY.
SELECTION-SCREEN END OF BLOCK b11.
Start of Selection
START-OF-SELECTION.
PERFORM zf_fetch_data.
PERFORM zf_final_table.
*End of Selection
END-OF-SELECTION.
PERFORM zf_print_form.
*& Form zf_print_form
text
--> p1 text
<-- p2 text
FORM zf_print_form .
DATA: lv_form_name TYPE rs38l_fnam.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZQMS_QUALITY_NOTIFICATION'
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
fm_name = lv_form_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 FUNCTION lv_form_name
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS =
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
TABLES
gt_final = gt_final
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. " zf_print_form
*& Form zf_fetch_data
text
--> p1 text
<-- p2 text
FORM zf_fetch_data .
REFRESH gt_qmel.
SELECT qmnum
qmart
qmtxt
erdat
qwrnum
psp_nr
fertaufnr
ebeln
ebelp
matnr
mblnr
arbpl
ekorg
bkgrp
objnr
pnlkn
fertaufpl
qmcod
qmnam
ernam
zz_short_text
prueflos
FROM qmel
INTO CORRESPONDING FIELDS OF TABLE gt_qmel
WHERE qmnum EQ p_qmnum.
IF NOT gt_qmel[] IS INITIAL.
SELECT vornr
ltxa1
aufpl
plnkn
FROM afvc INTO CORRESPONDING FIELDS OF TABLE gt_afvc FOR
ALL ENTRIES IN gt_qmel WHERE
aufpl EQ gt_qmel-fertaufpl AND
plnkn EQ gt_qmel-pnlkn.
SELECT maktx
matnr
FROM makt INTO CORRESPONDING FIELDS OF TABLE gt_makt FOR
ALL ENTRIES IN gt_qmel WHERE
matnr EQ gt_qmel-matnr AND
spras EQ sy-langu.
SELECT qmartx
qmart
FROM tq80_t INTO CORRESPONDING FIELDS OF TABLE gt_tq80_t
FOR ALL ENTRIES IN gt_qmel WHERE
qmart EQ gt_qmel-qmart AND
spras EQ sy-langu.
SELECT code
katalogart
codegruppe
kurztext
FROM qpct INTO CORRESPONDING FIELDS OF TABLE gt_qpct
FOR ALL ENTRIES IN gt_qmel WHERE
code EQ gt_qmel-qmcod
AND katalogart EQ 'T'
AND codegruppe EQ 'INSPTYPE'.
SELECT pspnr
psphi
FROM prps INTO CORRESPONDING FIELDS OF TABLE gt_prps
FOR ALL ENTRIES IN gt_qmel WHERE
pspnr EQ gt_qmel-psp_nr.
SELECT stat
FROM jest INTO CORRESPONDING FIELDS OF TABLE gt_jest FOR
ALL ENTRIES IN gt_qmel WHERE
objnr EQ gt_qmel-objnr
AND stat EQ 'E*'
AND inact <> 'X'.
SELECT stsma FROM jsto INTO CORRESPONDING FIELDS OF TABLE gt_jsto
FOR ALL ENTRIES IN gt_qmel WHERE
objnr EQ gt_qmel-objnr.
ENDIF.
IF NOT gt_prps[] IS INITIAL.
SELECT pspnr
post1
FROM proj INTO CORRESPONDING FIELDS OF TABLE gt_proj
FOR ALL ENTRIES IN gt_prps WHERE
pspnr EQ gt_prps-psphi.
ENDIF.
IF NOT gt_jsto[] IS INITIAL.
SELECT txt04
txt30
estat
FROM tj30t INTO CORRESPONDING FIELDS OF TABLE
gt_tj30t FOR ALL ENTRIES IN gt_jsto
WHERE stsma EQ gt_jsto-stsma
AND spras EQ sy-langu.
ENDIF.
ENDFORM. " zf_fetch_data
*& Form zf_final_table
text
--> p1 text
<-- p2 text
FORM zf_final_table .
LOOP AT gt_qmel INTO gs_qmel.
MOVE gs_qmel-qmnum TO gs_final-qmnum .
MOVE gs_qmel-qmart TO gs_final-qmart .
MOVE gs_qmel-erdat TO gs_final-erdat.
MOVE gs_qmel-qwrnum TO gs_final-qwrnum .
MOVE gs_qmel-psp_nr TO gs_final-psp_nr .
MOVE gs_qmel-fertaufnr TO gs_final-fertaufnr.
MOVE gs_qmel-ebeln TO gs_final-ebeln .
MOVE gs_qmel-ebelp TO gs_final-ebelp .
MOVE gs_qmel-matnr TO gs_final-matnr .
MOVE gs_qmel-mblnr TO gs_final-mblnr .
MOVE gs_qmel-arbpl TO gs_final-arbpl .
MOVE gs_qmel-ekorg TO gs_final-ekorg .
MOVE gs_qmel-bkgrp TO gs_final-bkgrp .
MOVE gs_qmel-qmnam TO gs_final-qmnam .
MOVE gs_qmel-ernam TO gs_final-ernam .
MOVE gs_qmel-zz_short_text TO gs_final-zz_short_text.
MOVE gs_qmel-prueflos TO gs_final-prueflos .
MOVE gs_qmel-qmtxt TO gs_final-qmtxt .
READ TABLE gt_makt INTO gs_makt WITH KEY matnr = gs_qmel-matnr.
IF sy-subrc = 0.
MOVE gs_makt-maktx TO gs_final-maktx .
ENDIF.
READ TABLE gt_tq80_t INTO gs_tq80_t WITH KEY qmart = gs_qmel-qmart.
IF sy-subrc = 0.
MOVE gs_qmel-qmart TO gs_final-qmartx .
ENDIF.
READ TABLE gt_afvc INTO gs_afvc WITH KEY aufpl = gs_qmel-fertaufnr
plnkn = gs_qmel-pnlkn.
IF sy-subrc = 0.
MOVE gs_afvc-vornr TO gs_final-vornr .
MOVE gs_afvc-ltxa1 TO gs_final-ltxa1 .
ENDIF.
READ TABLE gt_prps INTO gs_prps WITH KEY pspnr = gs_qmel-psp_nr.
READ TABLE gt_proj INTO gs_proj WITH KEY pspnr = gs_prps-psphi.
IF sy-subrc = 0.
MOVE gs_proj-post1 TO gs_final-post1.
ENDIF.
READ TABLE gt_jest INTO gs_jest WITH KEY objnr = gs_qmel-objnr.
READ TABLE gt_jsto INTO gs_jsto WITH KEY objnr = gs_qmel-objnr.
READ TABLE gt_tj30t INTO gs_tj30t WITH KEY stsma = gs_jsto-stsma
estat = gs_jest-stat.
IF sy-subrc = 0.
MOVE gs_tj30t-txt04 TO gs_final-txt04 .
MOVE gs_tj30t-txt30 TO gs_final-txt30 .
ENDIF.
READ TABLE gt_qpct INTO gs_qpct WITH KEY code = gs_qmel-qmcod.
IF sy-subrc = 0.
CONCATENATE gs_qpct-code '-' gs_qpct-kurztext INTO gv_inspt.
MOVE gv_inspt TO gs_final-insp.
ENDIF.
APPEND gs_final TO gt_final.
ENDLOOP.
CLEAR: gs_qmel,gs_jest,gs_tj30t,gs_afvc,gs_tq80_t,gs_makt .
ENDFORM. " zf_final_table
Similar Messages
-
Regading smart form printpreview to pdf
<<Do not post duplicate questions. >>
i have one smart created with one custem page format . 400 * 1100 . that smart form attached to vfo3 transcation .
when iam seeing printpreviw is ok . but when iam converting this print preview to pdf . the last data missing in page .
but in print preview half page only . but not getting full data .
any one suggest me .
Edited by: Matt on Jul 20, 2010 2:05 PMhi ,
your check with window size and Alignments
Regards,
Ansari -
Regading Including Text in Smart forms
Hi gurus,
In vf02 they are giving some text . that text is going and saving in STXL table. I want to include this text in smart form.
After choosing include text in General attributes. I am giving
text object is vbbk
Text id is time
language en
but i don't know what i want to give in text name.
so plz help me.
S.Murali Naidu
Edited by: Murali Sreerama on Feb 6, 2008 10:12 AMHi,
Please use this code:: (reward pts)
DATA gt_text LIKE tline OCCURS 0 WITH HEADER LINE.
DATA: gt_lines.
REFRESH gt_text.
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
id = 'your text id'
language = sy-langu
name = your billing doc no
object = 'your obj id'
ARCHIVE_HANDLE = 0
LOCAL_CAT = ' '
IMPORTING
HEADER =
tables
lines = gt_text
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
NOT_FOUND = 4
OBJECT = 5
REFERENCE_CHECK = 6
WRONG_ACCESS_TO_ARCHIVE = 7
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CLEAR: gt_line7,
gt_lines.
then to display that
LOOP AT gt_text.
IF NOT gt_text-tdline IS INITIAL.
CONCATENATE gt_line gt_text-tdline INTO gt_line SEPARATED BY space.
ENDIF.
ENDLOOP.
Edited by: rohitaash sharma on Feb 6, 2008 10:22 AM -
LBBIL_INVOICE. Billing Data: Transfer Structure to Smart Forms
Hi...
Can u please help me out in my query regading how the data passes to
LBBIL_INVOICE. Billing Data: Transfer Structure to Smart Forms.
I have an smartform which runs through VF01/VF02/ VF03 while pressing the print preview button.
But if i try to run it directly from driver program, no data wil be displayed. Now i have the requirement to detach from VF03.. and make it to run directly from my driver program.
what shall i have to do to achieve this. Should i have to take all the internal tables saparately or else can i use LBBIL_invoice structure itself.
If i can use that structure itself, how to make the data flow into it. Pls help me.
In my codeing these includes were there. is there anything related , is the data passes because of these includes
INCLUDE rlb_invoice_data_declare.
definition of forms
INCLUDE rlb_invoice_form01.
INCLUDE rlb_print_forms.
Pls clarify my dobut...
Thanks in advance,
Hema1. These are normal structure
2. you can use anywhere but they designed for forms currently.
3. Yes ,it works like it will look at NAST Table -> nast table will connect the TNAPR Table -> tnapr will have smart form print program.
so smart form program calls smartform and it will show output
4. you can create your own structure and use them into anywhere like report program or forms..
5. you can see example simple form name SF_EXAMPLE_01 ,program name is SF_EXAMPLE_01 ,you can design your own form and print program.
Thanks
Seshu -
SMART FORMS: How are they used and how can they be configured/enhanced?
Hi Experts,
I would like to know how are the smart forms used in crm.I know that by using t-code SMARTFORMS we can view/edit standard smart forms . But I am confused about the fact that how are they used.If some one can list me the steps to be followed in simple language that would be of great help.
Any pointers would also be appreciated.
Regards,
AneeshHi Aneesh,
In CRm we use smartforms to send mail to Business partners based on the client requirement. This sending process will be defined using Actions. Through actions we will trigger the smartform and send to the concerned busines partner mail id.
Hope this helps you.
Regads,
Lakshmi.Y -
Month view in smart form depending on date
if the date is 01.01.08 I want it to display as 01 Jan 08..?and if is
02.02.08 I want it as 02 Feb 08..
How to resolve this in smart form field..?
let me know..
Thanks,Hi,
You should write code in order to obtain this,
If v_date is your date field.
In the porgram logic you check for v_date+4(2)
If g_date+4(2) = '01'.
concatenate g_date6(2) 'JAN' g_date0(2) into g_date.
elseif g_date_4(2) = '02'.
concatenate g_date6(2) 'FEB' g_date0(2) into g_date.
elseif...................
then display g_date.
Regards
Madhu G S
Reward Points if usefull -
What is the diff b/w Sap Scripts and Smart Forms
Hi,
Whats the diff b/w SAP Scripts and Smart Forms..
I need the internal explanation for both Smart Forms and SAP Scripts mean when we execute what happens whether Print Program r Forms starts execution 1st and SIMILARLY FOR SMARTFORMS WHETHER FM'S R FORMS.
Thanks & Regards,
Gopi.Hi
Difference with SMARTFORMS vs. SapScript(SE71)
The Following are the differences :-
a) Multiple page formats are possible in smartforms which is not the case in SAPScripts
b) It is possible to have a smartform without a main window .
c) Labels cannot be created in smartforms.
d) Routines can be written in smartforms tool.
e) Smartforms generates a function module when activated.
f) Unlike sapscripts (RSTXSCRP), you cannot upload/download Smartform to your local harddisk.
It was said that it was provided in CRM 3.0 version, but not available in R/3. You can download smartforms into Local PC in a XML format. In the same way you can upload this XML format into Smartform. From the smartform editor itself you can call download option, if you are working in CRM 3.0 environment.
In R3 also, you can download into XML format. However, it's not sure about uploading. Refer to the program 'SF_XSF_DEMO'.
In 4.7 Enterprise, other have seen this utlity which is completey missing in 4.6c. There is functionality to downlaod a complete form or only a particular node. (Utilities -> Download form). It will create a XML file and save it in the hard disk.
For others, if you want to download/upload the Smartforms source, you will need the help from the Basis people. What you can do is to create a Transport and then FTP down to your local harddisk. When you need the Smartform source in another system, you have FTP up the Smartforms file back to the SAP server. Finally, the Basis team, will tp it into your system.
g) The protect and endprotect command in sapscript doesn't work with smartforms. For example on a invoice: First data of position no 80. is printed on page one, other data of position no 80 is printed on page 2. And there's nothing you can do about it. Actually, there is something you can do about it. By using a folder node and checking the 'protect' checkbox, everything in that folder will be page protected.
check out this link:
http://www.sap-img.com/smartforms/sap-smart-forms.htm
Reward points if helpful.
Regards,
Swathi. -
Need to convert a SAP Script to Smart Form
Hello,
I need to convert a SAP script to a Smart form.
I am aware of converting it but have a question abt print program?
Can the print program which is currently attached to the SAP script supprot the Smart form?
Could some one let me know if i can use the same program or need to do some modifications in it?
Pointa rewareded if useful.
Thanks,
Krishnahi
t-code smartforms
utilities->migrate sapscript
check the link below it provides steps to convert sap scripts to smartforms
http://www.ficoexpertonline.com/downloads/Iyer_SmartForms.pdf
Check these threads.
Smartforms -> sapscript
Re: Convert SapScript to Smartforms ?
regards.
Kiran Sure -
Text inversed in the smart form table
Dear all,
I'm new in ABAP and working on a smart form which has a cell in table shows an article description in both Arabic & English
but the Arabic text appears in reversed sequence in the print preview and after printing it shows like this ##### #########.
any idea how to solve this problem
thanksHello,
Please see the following SAP Note about printing Arabic:
587150 - Support of Arabic-script languages
For your Unicode system, then you should be able to print Arabic
characters via device type ARSWIN or device type SWINCF.
The Unicode cascading fonts solution with the device type SWINCF
described in the following SAP Note:
812821 - Cascading Font settings
So you need to configure a Frontend output device that uses device type
ARSWIN and use this to create the print with the Arabic characters.
Regards,
David -
Text element not gettin refreshed in smart form
Hi
Text element does not get refreshed in the smart form preview.
I have a selection screen on which i have a few selection parameters and three application
toolbar buttons. "Save" , "Preview" and "Print". At the end of selection screen I have a
button "text" which when clicked takes me to the text element editor(FM 'TEXT_EDIT' )
I have to enter a project number on the selection screen, enter all other details and
then click on the "Text" button. I would then change /edit some text etc and come back
to sel screen. Now i click on preview , the smart form shows up and the text gets dispalyed
with the modified text.
I am passing the text name by appending "sometext" + project number to the TEXT_EDIT
and while eiditing and as a parameter to the smart form. In the smart form i have given the variable in the "include text".
Now Herez the problem.
I am still in selection screen and clik on the "text" button and it takes me to the
text editor. Now i add more lines, save and come back. Now i clik on preview
button and it displays the old text data.
When i come out of the transaction and renter , clik on the preview it displays data
correctly. Now if i repeat the steps
1.edit text button , add a few lines
2.preview button, shows data as entered in step 1.
3.edit text button, add few more lines
4.preview button .. the text displays is from step 1 and not 3.
I am not sure if this is lot of info for anybody to write an answer straight away but
if u need more info i can provide. I can do a read_text in the smart form but its toooooo
much of a pain for the data i need to display. million adjustments to be taken care of.
What could be the problem ? I have given all the basic settings like save parameter
in edit_text fm , checked all the print preview options in sdn.
Here are my questions
1. Why is the text element not getting refreshed.
2. After a form is displayed for preview , will it store anywhere in the buffer ? if yes
is there any method to clear it ?Hi,
The problem is not with text elements, it might be your size of window which you are using to display the text elements. Check your window size and modify that accordingly.
Cheers,
Bujji -
Service cannot be reached while sending a smart form in html format
Hello,
I'm trying to send a smart form as email in html format and I'm getting the following error message at the beginning of the message:
Service cannot be reached
What has happened?
URL http://localhost/SAP/BC/BSP/SAP/SMART_FORMS/DEFAULT.CSS call was terminated because the corresponding service is not available.
Note
The termination occurred in system XD1 with error code 403 and for the reason Forbidden.
The selected virtual host was 0 .
What can I do?
Please select a valid URL.
If you do not yet have a user ID, contact your system administrator.
Error code:ICF-NF-http-c:100-u:MYUSER-l:D-i:my_test_system:0-s:403-r:Forbidden
HTTP 403 - Forbidden
Your SAP Internet Communication Framework Team
.SYSTEM div#B.par{ font-family : "Courier New" ; font-size : 12pt ; font-weight : normal ; line-height : 4.23mm ; text-decoration : none ; text-align : justify ; clear : both ;}.SYSTEM div#L.par{ font-family : "Courier New" ; font-size : 12pt ; font-weight : normal ; line-height : 4.23mm ; text-decoration : none ; text-align : left ; clear : both ;}.SYSTEM a.SYSTEM span#H.char{ font-weight : bold ;}.SYSTEM span#I.char{ font-style : italic ;}.SYSTEM span#U.char{ text-decoration : underline ;}#PAGE1-001.page@media screen {#MAIN.win{ overflow : auto ;}}@media print {#MAIN.win{ overflow : hidden ;}}#PAGE1-001.page #MAIN.win.AGGR-BILL div#B.par{ font-family : "Arial" ; font-size : 12pt ; font-weight : normal ; line-height : 4.23mm ; text-decoration : none ; text-align : justify ; clear : both ;}.AGGR-BILL div#F.par{ font-family : "Arial" ; font-size : 8pt ; font-weight : normal ; line-height : 3.39mm ; text-decoration : none ; text-align : left ; clear : both ;}.AGGR-BILL div#L.par{ font-family : "Arial" ; font-size : 12pt ; font-weight : normal ; line-height : 4.23mm ; text-decoration : none ; text-align : left ; clear : both ;}.AGGR-BILL div#R.par{ font-family : "Arial" ; font-size : 12pt ; font-weight : normal ; line-height : 4.23mm ; text-decoration : none ; text-align : right ; clear : both ;}.AGGR-BILL a.AGGR-BILL span#H.char{ font-family : "Arial" ; font-size : 12pt ; font-weight : bold ;}.AGGR-BILL span#I.char{ font-family : "Arial" ; font-size : 12pt ; font-style : italic ;}.AGGR-BILL span#K.char{ font-family : "Arial" ; font-size : 8pt ;}.AGGR-BILL span#M.char{ font-family : "Arial" ; font-size : 10pt ;}.AGGR-BILL span#U.char{ font-family : "Arial" ; font-size : 12pt ; text-decoration : underline ;} div#PROJEKTE.tab@media screen { div#PROJEKTE.tab table.tr{ border-collapse : collapse ;}}@media print { div#PROJEKTE.tab table.tr{ border-collapse : collapse ;}}@media screen { div#PROJEKTE.tab table.tr{ margin-top : -1px ;}}@media print { div#PROJEKTE.tab table.tr{ margin-top : 0px ;}} div#PROJEKTE.tab table.tr div#PROJEKTE.tab .topline{ border-top : 1pt solid black ;} div#PROJEKTE.tab .bottomline{ border-bottom : 1pt solid black ;} div#PROJEKTE.tab .leftline{ border-left : 1pt solid black ;} div#PROJEKTE.tab .rightline{ border-right : 1pt solid black ;}#PROJEKTE.tab #sf--LTYPE1.tr td#C1
and here comes the email's body: bla,bla,bla... bla.
Do you have any idea how can I solve the problem with the css file? Any suggestion is welcome!
Regards,
JaimeI just solved the problem by activating the service /SAP/BC/BSP/SAP/smart_forms/ through the transaction SICF. So I close the thread!
Jaime -
Use of NACE after creating print program n smart form
Wat's d purpose of NACE?I hav created my own print program n smart form according to my own requirement.If NACE is necessary 4 my smart from.How can i use NACE i mean navigation steps.
Please help me out.Its urgent.
Thanks & Regards,
Santhosh.Hi Santhosh,
Nace is for message control settings. Say if u want to trigger a Smartform or an Idoc or any other customized program u can do the message control settings.
Say at the time of Sales Order creation or updation u want to trigger a Smartform, then u have to follow the following steps:
Goto NACE
Select application V1 and then click Output Type.
create a new Output type or copy the existing one abd save it with new name
then in Processing Routine Mention the driver program name and in Form routine mention the main subroutine name.
In Smartform mention your SMartform name and also the layout if u have ceated.
Again go to NACE and Select application V1 and press Procedures.
here out of the many procedures u have to select the right one and attach your Output Type to it.
You can also create a condition record..Say if u want to trigger this Smartforms for Sales Order of particular type.
Hope this helps.
Reward Points if useful.
Thanks. -
Linking 3 pages in a smart form.
Hi!
I have created a smartform with about 5 tables in the main window. I need three copies of the same form with only the signatories at the bottom changing. U can say the last two rows of the last window in the smart form. Rest everything will be exactly the same. I created two pages and copied the details from the first page. Just the last window I have freshly created on each page. Now I am not able to link the three pages. Please suggest.
thanks,Hi,
To link the pages just do like this,
right click on your main window of firts page,
select create,
select flow logic,
select command,
here in general attribute tab enable go to new new page check box, in the input give the your second page name,
then for third page do same as above,
finaly save and activate.
seshu. -
i have copied a driver programe of outbound delivery and modified in such a way the layout will convert to pdf and then download to pc, but the driver program is not executing online, so do i need to attache the driver program name and form name in nace t.code or how would i execute the program, when i am placing a break point in driver program and execute form its not stopping at break point, i am new to forms, help me out in this.
i have placed the code below plz verify it and say if any thing is wrong in the code, u will be shurely rewareded.
Print of a delivery note by SAPscript SMART FORMS *
REPORT Z_RLE_DELNOTE1.
declaration of data
INCLUDE Z_RLE_DELNOTE_DATA_DECLARE1.
*INCLUDE RLE_DELNOTE_DATA_DECLARE.
definition of forms
INCLUDE Z_RLE_DELNOTE_FORMS1.
*INCLUDE RLE_DELNOTE_FORMS.
INCLUDE Z_RLE_PRINT_FORMS1.
*INCLUDE RLE_PRINT_FORMS.
FORM ENTRY
FORM ENTRY USING RETURN_CODE US_SCREEN.
DATA: LF_RETCODE TYPE SY-SUBRC.
XSCREEN = US_SCREEN.
PERFORM PROCESSING USING US_SCREEN
CHANGING LF_RETCODE.
IF LF_RETCODE NE 0.
RETURN_CODE = 1.
ELSE.
RETURN_CODE = 0.
ENDIF.
ENDFORM.
FORM PROCESSING *
FORM PROCESSING USING PROC_SCREEN
CHANGING CF_RETCODE.
DATA: LS_PRINT_DATA_TO_READ TYPE LEDLV_PRINT_DATA_TO_READ.
DATA: LS_DLV_DELNOTE TYPE LEDLV_DELNOTE.
DATA: LF_FM_NAME TYPE RS38L_FNAM.
DATA: LS_CONTROL_PARAM TYPE SSFCTRLOP.
DATA: LS_COMPOSER_PARAM TYPE SSFCOMPOP.
DATA: LS_RECIPIENT TYPE SWOTOBJID.
DATA: LS_SENDER TYPE SWOTOBJID.
DATA: LF_FORMNAME TYPE TDSFNAME.
DATA: LS_ADDR_KEY LIKE ADDR_KEY.
*Begin of changes by 67.
DATA: ls_document_output_info TYPE ssfcrespd,
ls_job_output_options TYPE ssfcresop.
*End of changes by 67.
SmartForm from customizing table TNAPR
LF_FORMNAME = TNAPR-SFORM.
determine print data
PERFORM SET_PRINT_DATA_TO_READ USING LF_FORMNAME
CHANGING LS_PRINT_DATA_TO_READ
CF_RETCODE.
IF CF_RETCODE = 0.
select print data
PERFORM GET_DATA USING LS_PRINT_DATA_TO_READ
CHANGING LS_ADDR_KEY
LS_DLV_DELNOTE
CF_RETCODE.
ENDIF.
IF CF_RETCODE = 0.
PERFORM SET_PRINT_PARAM USING LS_ADDR_KEY
CHANGING LS_CONTROL_PARAM
LS_COMPOSER_PARAM
LS_RECIPIENT
LS_SENDER
CF_RETCODE.
ENDIF.
*Begin of changes by 67.
CALL FUNCTION 'SSF_GET_DEVICE_TYPE'
EXPORTING
i_language = v_language
I_APPLICATION = 'SAPDEFAULT'
IMPORTING
E_DEVTYPE = v_e_devtype
st_output_options-tdprinter = v_e_devtype.
*st_output_options-tdprinter = 'locl'.
LS_CONTROL_PARAM-no_dialog = 'X'.
LS_CONTROL_PARAM-getotf = 'X'.
*End of changes by 67.
IF CF_RETCODE = 0.
determine smartform function module for delivery note
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = LF_FORMNAME
variant = ' '
direct_call = ' '
IMPORTING
FM_NAME = LF_FM_NAME
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
error handling
CF_RETCODE = SY-SUBRC.
PERFORM PROTOCOL_UPDATE.
ENDIF.
ENDIF.
IF CF_RETCODE = 0.
call smartform delivery note
CALL FUNCTION LF_FM_NAME
EXPORTING
ARCHIVE_INDEX = TOA_DARA
ARCHIVE_PARAMETERS = ARC_PARAMS
CONTROL_PARAMETERS = LS_CONTROL_PARAM
mail_appl_obj =
MAIL_RECIPIENT = LS_RECIPIENT
MAIL_SENDER = LS_SENDER
OUTPUT_OPTIONS = LS_COMPOSER_PARAM
USER_SETTINGS = ' '
IS_DLV_DELNOTE = LS_DLV_DELNOTE
IS_NAST = NAST
*Begin of changes by 67.
importing
document_output_info = ls_document_output_info "67
job_output_info = tab_otf_data
job_output_options = ls_job_output_options "67
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5.
*End of changes by 67.
IF SY-SUBRC <> 0.
error handling
CF_RETCODE = SY-SUBRC.
PERFORM PROTOCOL_UPDATE.
get SmartForm protocoll and store it in the NAST protocoll
PERFORM ADD_SMFRM_PROT. "INS_HP_335958
ENDIF.
ENDIF.
get SmartForm protocoll and store it in the NAST protocoll
PERFORM ADD_SMFRM_PROT. DEL_HP_335958
--Function modules conversts from otf to pdf format.--
*Begin of chanes by 67.
CALL FUNCTION 'CONVERT_OTF_2_PDF'
EXPORTING
USE_OTF_MC_CMD = 'X'
ARCHIVE_INDEX =
IMPORTING
BIN_FILESIZE = v_bin_filesize
TABLES
otf = v_tab_otf_final
doctab_archive = v_it_docs
lines = v_it_lines
EXCEPTIONS
ERR_CONV_NOT_POSSIBLE = 1
ERR_OTF_MC_NOENDMARKER = 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 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE = v_bin_filesize
filename = 'D:\67.PDF'
FILETYPE = 'BIN'
APPEND = ' '
WRITE_FIELD_SEPARATOR = ' '
HEADER = '00'
TRUNC_TRAILING_BLANKS = ' '
WRITE_LF = 'X'
COL_SELECT = ' '
COL_SELECT_MASK = ' '
DAT_MODE = ' '
CONFIRM_OVERWRITE = ' '
NO_AUTH_CHECK = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
WRITE_BOM = ' '
TRUNC_TRAILING_BLANKS_EOL = 'X'
IMPORTING
FILELENGTH = v_file_size
tables
data_tab = v_pdf_tab
FIELDNAMES =
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6
HEADER_NOT_ALLOWED = 7
SEPARATOR_NOT_ALLOWED = 8
FILESIZE_NOT_ALLOWED = 9
HEADER_TOO_LONG = 10
DP_ERROR_CREATE = 11
DP_ERROR_SEND = 12
DP_ERROR_WRITE = 13
UNKNOWN_DP_ERROR = 14
ACCESS_DENIED = 15
DP_OUT_OF_MEMORY = 16
DISK_FULL = 17
DP_TIMEOUT = 18
FILE_NOT_FOUND = 19
DATAPROVIDER_EXCEPTION = 20
CONTROL_FLUSH_ERROR = 21
OTHERS = 22.
IF sy-subrc <> 0.
MESSAGE i001(z00) WITH 'File not downloaded succesfully'.
else.
MESSAGE i002(z00) WITH 'File 67.PDF downloaded succesfully under D: drive'.
ENDIF.
*End of changes by 67.
ENDFORM.Hi,
Make sure that the output type you are using is configured for your custom-copied program name, form routine, and the form you are using. The output types can be found in transaction NACE.
Award points if found helpful.
Thanks,
Leo -
Email PDF smart form Support Desk
Hi SDN,
I'm working on support desk - solution manager, and i need to send the solution of the support message by email to the final user.
There is an standard action (SLF1 -SMSD_SERVICE_ORDER_DNO_OUTPUT) that sends the solution in pdf format by email, but we couldn't set the receivers online.
So, I'm using an "z" action that executes an smart form, and i would like to send the smart form in pdf format by the internet.
I'd like to use fm SO_DYNP_OBJECT_SEND, because the user must fill the receivers on-line
So far i have de OTF, and i know that i can make a conversion to pdf format, but i've the following problem
- the pdf in attach is empty, it may be because of the format, or may be i'm not using correctly this function.
Thanks in advance,
Maria João Rocha
call function 'CONVERT_OTF'
exporting
format = 'PDF'
importing
bin_filesize = w_pdf_size
tables
otf = es_job_output_info-otfdata[]
lines = t_pdf[]
exceptions
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
err_bad_otf = 4
others = 5.
* header
wa_head-objnam = 'EMAIL'.
wa_head-objdes = ls_output_options-tdtitle.
wa_head-objnam = ls_output_options-tdtitle.
wa_head-objla = sy-langu.
wa_head-objsns = 'O'.
wa_head-file_ext = 'TXT'.
append wa_head to t_head.
wa_packing_list-transf_bin = 'X'.
wa_packing_list-head_start = 1.
wa_packing_list-head_num = 0.
wa_packing_list-body_start = 1.
wa_packing_list-objtp = 'RAW'.
* wa_packing_list-objtp = 'EXT'.
wa_packing_list-objdes = ls_output_options-tdtitle.
wa_packing_list-objla = sy-langu.
wa_packing_list-objlen = w_pdf_size.
wa_packing_list-file_ext = 'PDF'.
append wa_packing_list to t_packing_list.
*---------- enviar o mail
call function 'SO_DYNP_OBJECT_SEND'
exporting
* object_hd_change = ls_output_options-tdtitle
object_type = 'RAW'
* originator_type = 'B'
* originator = sy-uname
outbox_flag = 'S'
tables
* objcont = t_text
* receivers = t_receivers
packing_list = t_packing_list
att_cont = t_cont
att_head = t_head
exceptions
active_user_not_exist = 1
communication_failure = 2
component_not_available = 3
folder_not_exist = 4
folder_no_authorization = 5
forwarder_not_exist = 6
note_not_exist = 7
object_not_exist = 8
object_not_sent = 9
object_no_authorization = 10
object_type_not_exist = 11
operation_no_authorization = 12
owner_not_exist = 13
parameter_error = 14
substitute_not_active = 15
substitute_not_defined = 16
system_failure = 17
too_much_receivers = 18
user_not_exist = 19
x_error = 20
others = 21.
endif.Thanks for your reply.
I'm working on it, and Ive seen the SCOT documentation, so I've change my strategy.
Right now I'm using some of the methods of the BOR.
I think I've to code because I want a popup to introduce the list of the receivers and the mail body, and of course I want to attach a smart form on pdf format.
But I cant send the mail because of the error: Erro interno: SO_OBJECT_MIME_GET Exceção: 2
Can you help me on this? What Im doing wrong? What document class I need to use on the AttachmentType?
Thanks in advance.
Best regards,
Maria João Rocha
FUNCTION Z_MAIL_DIALOGO.
*"*"Interface local:
*" IMPORTING
*" REFERENCE(TITULO) TYPE SOOD1-OBJDES OPTIONAL
*" REFERENCE(FILE_SIZE) TYPE SOOD1-OBJLEN OPTIONAL
*" TABLES
*" OTF TYPE TSFOTF OPTIONAL
*" PDF STRUCTURE TLINE OPTIONAL
*" CONTEXT TYPE SOLI_TAB OPTIONAL
* Makros für Zugriff aufs BOR
include <cntn01>.
*parameters: dialog like sonv-flag.
data: dialog like sonv-flag.
* Datendeklaration
data: message type swc_object.
data: recipient type swc_object.
data: recip_tab type swc_object occurs 1 with header line.
data: objkey like swotobjid-objkey.
data: content like soli-line occurs 0 with header line.
data: title(80).
data: persnumber like adcp-persnumber.
data: sent_to_all like sonv-flag,
object_list like sosndinf occurs 1 with header line.
data: t_otf type standard table of ITCOO.
data: itab like soli occurs 0.
* Deklaration eines Containers
swc_container container.
* Message-Objekt anlegen
* * Neues Message-Objekt generieren
swc_create_object message 'Message' space.
swc_clear_container container.
if dialog = space.
* * Create w/o dialog
concatenate 'Mensagem Support Desk' sy-datum sy-uzeit into title
separated by '/'.
swc_set_element container 'DOCUMENTTITLE' title.
swc_set_element container 'DOCUMENTNAME' 'Support Desk'.
* swc_set_element container 'DOCUMENTTYPE' 'INT'.
* swc_set_element container 'DOCUMENTTYPE' 'SCR'.
swc_set_element container 'DOCUMENTTYPE' 'OTF'.
swc_set_element container 'NO_DIALOG' 'X'.
else.
* * Create with dialog
swc_set_element container 'NO_DIALOG' ' '.
endif.
swc_call_method message 'Create' container.
perform error_handling(rssobcitest11).
* Create attachment (RAW document from internal table)
SWC_CLEAR_CONTAINER CONTAINER.
*att_bor_obj-objtype = 'MESSAGE'.
*swc_set_element container 'ATTACHMENT' pdf.
*swc_set_element container 'ATTACHMENT' otf.
swc_set_element container 'ATTACHMENT' context.
swc_set_element container 'ATTACHMENTTITLE' 'Anexo'.
swc_set_element container 'AttachmentType' 'OTF'.
*swc_set_element container 'DocumentSize' 0.
swc_set_element container 'DocumentSize' file_size.
*swc_set_table container 'DocumentContent' itab.
SWC_CALL_METHOD MESSAGE 'Attach' CONTAINER.
PERFORM ERROR_HANDLING(RSSOBCITEST11).
*SWC_CLEAR_CONTAINER CONTAINER.
*SWC_SET_ELEMENT CONTAINER 'EditorSettings' 'D'.
*SWC_SET_ELEMENT CONTAINER 'STARTING_AT_X' '5'.
*SWC_SET_ELEMENT CONTAINER 'STARTING_AT_Y' '5'.
*SWC_SET_ELEMENT CONTAINER 'EnableApplObjAttachments' 'X'.
*SWC_CALL_METHOD MESSAGE 'EditRecipientList' CONTAINER.
*PERFORM ERROR_HANDLING(RSSOBCITEST11).
* Einen Empfänger (interner Benutzer) automatisch hinzufügen
* Recipient-Objekt anlegen
swc_clear_container container.
swc_create_object recipient 'Recipient' space.
swc_set_element container 'AddressString' sy-uname.
swc_set_element container 'TypeId' 'B'.
swc_call_method recipient 'CreateAddress' container.
perform error_handling(rssobcitest11).
* Kopie des Recipient-Objekts anfügen
swc_clear_container container.
swc_set_element container 'NewRecipient' recipient.
swc_call_method message 'AddCopyOfRecipient' container.
perform error_handling(rssobcitest11).
* Outbox-Flag setzen
swc_clear_container container.
swc_set_element container 'OutboxFlag' 'X'.
swc_call_method message 'SetOutboxFlag' container.
perform error_handling(rssobcitest11).
* Empfängerliste editieren
swc_clear_container container.
swc_call_method message 'EditRecipientList' container.
perform error_handling(rssobcitest11).
swc_get_table container 'RecipientsInfo' object_list.
if sy-subrc = 8.
* Kopiertes Message-Objekt versenden
swc_clear_container container.
swc_call_method message 'Submit' container.
perform error_handling(rssobcitest11).
swc_get_table container 'RecipientsInfo' object_list.
endif.
swc_get_element container 'SentToAll' sent_to_all.
* Kopiertes Message-Objekt sichern
swc_clear_container container.
swc_call_method message 'Save' container.
perform error_handling(rssobcitest11).
* Protokollausgabe:
* Key des Message-Objekts ermitteln
*SWC_GET_OBJECT_KEY MESSAGE OBJKEY.
*WRITE: / 'Key des Messageobjekts', OBJKEY.
* Protokollausgabe:
perform write_recipient_info(rssobcitest11) tables object_list
using sent_to_all.
* Freigeben der Referenzen
* MESSAGE-Objekt
swc_free_object message.
* RECIPIENT-Objekt
swc_free_object recipient.
commit work.
ENDFUNCTION.
Maybe you are looking for
-
Disk Utility short-changed me by 20GB
I partitioned my new Time Machine external drive exactly as per the log below. Upon inspection of the drive afterwards, partition 1 is indeed 455GB but partition 2 is only 10GB instead of the 30GB requested (and delivered according to the log). Anyon
-
Don't remember password and I can't change any settings - PLEASE HELP!!!
Hi, My work is giving an old imac G5 and I can't change the IP address for my home internet because its asking for a password that no one remembers Even my boss is clueless. I tried going into Keychain Assistant, but it seemed not to help at all. We
-
How do I insert music/media player in a webpage?
So you visit places like my space and other musicians websites and you see their songs listing, you click the name of the song and it pops up a player that plays the tunes rather then letting them download to windows media player. Some websites alrea
-
Remove Calendar Entries from iPod
I've unchecked the Syncronize with Microsoft Outlook option within iTunes, but the calendar entries are still on my iPod. How do I get rid of them?
-
SQL developer wont start on Mac OSX Lion
Hi there, hoping someone can help me with this one, I've been running SQL Developer 3 on the macbook no problems for about a year, I recently upgraded to Mac OSX Lion and now when I try to start SQL Developer it will not run. I have downloaded and in