PRINT MULTIPLE FORM
Hi Guys,
I have Created a Business Object (Eg- Preview) .
Can anybody help me out in creating a solution for providing more than one preview option to the end user in the Purchase order/Sales order Scenario.
Like, while looking at the Purchase Order preview, we get two options- Cancelled PO, & Changed PO.
thanks & regards
Manoj Kannaujiya.
Hi Thomas,
i want to print two different print form from a single preview button .
i have added some extension field in sales order through adaptation.
Now my customer want to print default sales order form as well as extended field with default sales order form.
these two form would be available on choices like a purchase Order Preview button in the system .
is it possible ..?
thanks
Manoj Kannaujiya.
Similar Messages
-
Print multiple forms between FP_JOB_OPEN and FP_JOB_CLOSE
I am aware, that there are questions regarding "Printing Multiple forms", but I didn't find answers there.
Still my system is not working as expected:
1. FP_JOB_OPEN is called
2. the generated Adobe Forms function is called multiple times
3. FP_JOB_CLOSE is called
This program doesn't deliver all the pages, but just the first call. How shall I solve this problem?
(Coding should work anywhere with copy-pase.)
data: fm_name type rs38l_fnam,
fp_docparams type sfpdocparams,
fp_outputparams type sfpoutputparams.
parameters: p_fpname type fpname default 'FP_TEST_02'.
* Get the name of the generated function module
call function 'FP_FUNCTION_MODULE_NAME'
exporting
i_name = p_fpname
importing
e_funcname = fm_name.
* Sets the output parameters and opens the spool job
call function 'FP_JOB_OPEN'
changing
ie_outputparams = fp_outputparams
exceptions
cancel = 1
usage_error = 2
system_error = 3
internal_error = 4
others = 5.
* Call the generated function module
call function fm_name.
* SECOND CALL ****************************
call function fm_name.
* Close the spool job
call function 'FP_JOB_CLOSE'
* IMPORTING
* E_RESULT =
exceptions
usage_error = 1
system_error = 2
internal_error = 3
others = 4.Hi ZSOLT,
In order to call the form multiple times please do the following,
1) Just before your FP_JOB_OPEN you need to pass the output parameters (good practice). You can also set other parameters as well (for example nodialog, preview, copies., etc)
CLEAR fp_outputparams.
fp_outputparams-dest = 'PDF1'. "Default pdf printer
fp_outputparams-reqnew = 'X'. "New spool request
Now call your FM FP_JOB_OPEN with the above output parameters.
2) Usually this step is processed in a loop. (getting your interface data into a internal table and then looping at it)
But here I am enhancing your example code.
In order to trigger the form multiple times you need to change some input data to the form (for example I have changed date and time below in the prepare test data sections) so that the call function fm_name gets regenerated every time there is new data
data l_datatypes type sfpdatatypes.
prepare test data
l_datatypes-char = '#'.
l_datatypes-string = 'Auf geht''s! '. "#EC NOTEXT
l_datatypes-numc = '42'.
l_datatypes-dec = 0 - ( 12345 / 7 ).
l_datatypes-fltp = 0 - ( 12345 / 7 ).
l_datatypes-int = 4711.
l_datatypes-curr = 0 - ( 12345 / 7 ).
l_datatypes-cuky = 'JPY'. " no decimals
l_datatypes-quan = 12345 / 7.
l_datatypes-unit = 'DEG'. " 1 decimal
l_datatypes-date = '20040613'.
l_datatypes-time = '100600'.
l_datatypes-lang = sy-langu.
FIRST CALL ****************************
Call the generated function module
CLEAR fp_docparams.
fp_docparams-langu = 'EN'.
fp_docparams-country = 'US'.
call function fm_name
exporting
/1bcdwb/docparams = fp_docparams
datatypes = l_datatypes
mychar = l_datatypes-char
mybyte =
mystring = l_datatypes-string
myxstring =
mydate = l_datatypes-date
mytime = l_datatypes-time
mynum = l_datatypes-numc
myint = l_datatypes-int
myfloat = l_datatypes-fltp
mypacked = l_datatypes-dec
IMPORTING
/1BCDWB/FORMOUTPUT =
prepare test data
l_datatypes-char = '#'.
l_datatypes-string = 'Auf geht''s! '. "#EC NOTEXT
l_datatypes-numc = '42'.
l_datatypes-dec = 0 - ( 12345 / 7 ).
l_datatypes-fltp = 0 - ( 12345 / 7 ).
l_datatypes-int = 4711.
l_datatypes-curr = 0 - ( 12345 / 7 ).
l_datatypes-cuky = 'JPY'. " no decimals
l_datatypes-quan = 12345 / 7.
l_datatypes-unit = 'DEG'. " 1 decimal
l_datatypes-date = '20100913'. "You need to change your data in order it to trigger a new form with the new data.
l_datatypes-time = '10700'. "You need to change your data in order it to trigger a new form with the new data.
l_datatypes-lang = sy-langu.
SECOND CALL ****************************
Call the generated function module
CLEAR fp_docparams.
fp_docparams-langu = 'EN'.
fp_docparams-country = 'US'.
call function fm_name
exporting
/1bcdwb/docparams = fp_docparams
datatypes = l_datatypes
mychar = l_datatypes-char
mybyte =
mystring = l_datatypes-string
myxstring =
mydate = l_datatypes-date
mytime = l_datatypes-time
mynum = l_datatypes-numc
myint = l_datatypes-int
myfloat = l_datatypes-fltp
mypacked = l_datatypes-dec
IMPORTING
/1BCDWB/FORMOUTPUT =
Close the spool job
call function 'FP_JOB_CLOSE'
IMPORTING
E_RESULT =
exceptions
usage_error = 1
system_error = 2
internal_error = 3
others = 4.
I have tested the above code and I am getting multiple forms.
Please try on your end and let me know if it works.
Thanks
Raj -
Adobe forms -Can we print multiple forms?
i,
Right now my form has an ability to display a single Order with single Header & line items.
Hi,
I want to enhance the functionality to multiple forms prints.I mean I will be having multiple headers and l ine items.
I can fill my internal tables with multiple records data but what are the other form changes should i take care( hierarchy, data, etc...)
In smartforms I was able to do this because there we can define loops.How do we handle it here in adobe forms?
FYI.. I am filling internal table through WD application.Should I do Some context level changes?
Also,
In Dev environment I can see my Bold objects but when i move it to QA they are disappearing & font is also changing.What could be the reason?
rgds
VaraHi Vara,
Re: Adobe Forms
Regards,
Sravanthi -
Printing multiple forms for one output types.
Hi,
I need to print the form 4 times for one specific output type. My internal table contains only one record, but for that one record also i need to print 4 forms. How can i do this, i tried using control parameters but in vain.
Any suggestions of how to achieve this,
Thanks & Regards,
Ramana.Hi,
I am working with only one smart form. But there are different output types(ZVSL, ZVFX, ZVFE & ZVFI) configured for that form. But for one specific output type (ZVSL), i need to repeat the print for 4 times.
Thanks & Regards,
Ramana -
How to print multiple form for tag printing in smartforms
Dear Experts,
I am working on tag printing in smartforms .in tag printing i am showing
1.material no.
2.material descrption.
3.material doc no.
4.Quantity
5.supplier.
my requirement is that for example , if the mat. document no. has a material of 10,000.00 quantity , in tag printing it should come 1,000.00 of each tag and total no of tag should be 10. and it should come one after another .
and the page format size 8 x 6 cm. is it possible .if possible how ! how the system will know how many tag is to be printed . please reply its urgent.Hi Kumar,
Let me know. is the quantity 1000.00 is fixed? if so thn you can achieve the requirement.
For example:
There are A-material with 20000.00 quantity thn u can first divide the quantity with 1000.00
v_ex = 20000.00/1000.00=20.
thn you can repeat the print of the smartform for 20 times by passing the parameter to form fm.
Please reward if useful. -
Print Multiple forms per Marketing Document SAP B1 2007
When printing the Delivery document, I need to print a Packing list and a Bill of Lading. How can I acheive this in SAP B1 2007? I am hoping there is a way when pressing the Print button that I can have both documents print like when printing and order, having both an Order and a Pick list print.
TIA!!!
DanaDana,
You can have multiple Layout pages to the PLD.
If you open the PLD of the Delivery document / any marketing document
and From the Print layout designer Menu click display document properties... Paper format tab, you can add 2 or more pages in the field <b>Number of Layout Pages</b>.
By this you can design the second page of the layout accordingly.
Regards
Suda -
Printing multiple PDF with single event at client side
Hello,
I have a requirement where I must print multiple different pre-populated Adobe forms (e.g. populated with a name/address) from ABAP WD. These need to be printed at a client side printer, and they don't want to see them first (that would be easy). Just print multiple forms from a single button click.
Has anyone had this requirement? My main question is not how to pre-populate the pdfSource, but how to have the user prompted for a printer 1x and then have the forms sent straight to the local printer without displaying.
Thanks!Sorry to 'hijack' this thread but i was trying to do the same thing but failed EVERYTIME!!!
When i tried to merge just 2 multiple-paged(abt 20+ pages each) pdfs into one, it simply crashed Preview at the end of the process! Tried 'Save', 'Save all' & 'Print as PDF' but all doesn't work!
I tried Combine PDF.app & Automator.app and the same thing happened. The combining process CRASHED the app i used...
Help needed! -
Generate and Print Preview Multiple Forms in a Single PDF
There have been other questions similar to this but none directly address my problem. We have the need to generate multple forms in a .pdf using Adobe interactive forms. We can generate the multiple forms, but the user has to click on each form to view. They want to have the forms in a single document that they can scroll through before printing. We can do this in SmartForms but need to do it in Adobe. Does anyone know how to generate multiple forms, either multiple copies of the same form or various forms, from an ABAP program into a single pdf that can be print previewed, in scrollable form, by the user?
I can describe it one more time, I think:))
You have multiple options, but only one "reasonable" within SAP.
You can call an external application (through command line etc.) to concatenate forms for you.
You can use iText as mentioned in the thread, and write yourself a "tool" which will concatenate the forms for you.
Both these "options" would not be acceptable for my clients, I name them to help you get the whole picture.
Then there is the third option: use a form for a single instance (template/ form A) and create a new form (form B), where you will use the A template:
- you need to: create a new interface where everything from the old interface is a row of the table (example: you have a form to print out the personal card of the employee, so in a new form you will need to use a table, where a row is an employee)
- you need to create a new form layout based on the new interface:
in this new layout you will paste the whole layout of the old form (A/ single instance) and wrap it into a subform. The added subform will work as a table (you will bind that to the table from interface) and everything from the old template within this new subform will work as a "row" (something what you can repeat for each data item).
Does that sound reasonable?
Cheers Otto -
How to print multiple pages of same form with one print command
Hi,
I have created a cheque print form in smartform. There is provision to print multiple cheques. I give multiple cheque numbers from my selection screen and for each cheque the smart form is called in loop. Currently I get preview of 1st cheque then I print 1st cheque then click on back, cancel or exit button and then I get preview of second cheque ans so on...
Now I want to print all the cheques with one print command.
Please advice.
Regards,Instead of looping at the smartform multiple times, pass an internal table with the data content to the smartform and use loop/ Table youroption in ur smartform in the main window.in this way u can achieve printing multiple cheques at once and avoid previewing the document several times.
Edited by: Mithun Shetty on Feb 25, 2011 8:56 PM -
How to print multiple mail forms in a single run?
How can multiple, personalized letters be printed out from SAP CRM 7.0?
Business requirement:
When for example entrance tickets for a trade fair are sent to a group
of customers, the accompanying letters are to be printed out of the CRM
system.
In SAP CRM 5.0 this was done by creating a marketing campaign, linking
a target group & assigning a mail form to it.
By selecting the communication medium "Printer" it was possible to
print multiple letters in one run and send these documents by mail (not e-mail).
The quantities of letters that have to be sent are too small to
outsource the job to an external service provider (e.g. a printing house).
In the latest version of SAP CRM the communication medium "Printer" is
however no longer available in marketing campaigns.
Does anyone know how this requirement can be met in SAP CRM 7.0?
Thanks in advance for your reply,Thanks for your reaction.
We considered working this way, but the idea was dropped because the quantities of letters that have to be sent are too large (several hundreds) & also because no follow-up of these activities is needed. -
Functionality in SAP to allow you to print multiple copies of a form
I've been asked by a SD functional team member how to:
This is the table and field names for Number of Messages functionality in SAP which should allow you to print multiple copies of a form at one time.
Program Name:SAPMV13B
Screen #:0211
Transparent Table: NACH
Field Name: ANZAL
Data Element: NA_ANZAL
How do I go about setting up this functionalilty?
Thanks,
LaurieHi Laurie,
There are three possible ways -
1. Predefined number of copies - You can define number of copies in the print parameters while creating condition record. Ask you functional team member how they are setting up condition records. You have an option to setup print parameters on condition record screen. This is the only option if you are using output determination.
2. If you have an isolated print program then you can choose to let user enter print parameters by using parameter " DIALOG = ' ' " in "open_form".
3. If you have an isolated print program and do not want to let user control other print parameters you can take input from user ( or hard code ) number of copies and use that in parameter " OPTIONS " in "open_form".
Cheers,
Sanjeev -
Print Multiples copies of the same form.
Post Author: Morovis
CA Forum: General
Can I print a multiples copies of the same form using a counter. For example I like to print 200 copies and I have a variable or running toatl that can be incremeted by 1 trought the copies.I used to be able to print multiple copies of the same picture on one page using iphoto. There was a customise button when you went through to print and it was there somewhere. I can't see it anymore - maybe since an upgrade.
It's gone. But as a work-around, duplicate your photo (⌘D) to create as many versions as you want copies and select all at once. Then use the "Custom" print layout and set the photo size you want.
After printing, trash the added versions. -
Smartforms :Multiple forms 2 be printed in single print prog,PDF too
Hello Smartforms Gurus
I need to print 4 forms (Export Invoice, packing List, Enclosure to Packing list, Case marking) within a single print prog .
User will execute this prog and it should print all the 4 forms and then by clicking on a button(Archive) there
it should download a single pdf file containing all 4 forms .
At present my following program directly download this form(only Export Invoice) to a pdf file but doesnt leave options to go to Print or Print Preview .
Plz look into my code , and suggest.
Thnx
Moni
*Printing of Export Invoice, Packing List,Enclosure to Packing List & *
*Case Marking in one SMART FORMS Layout *
REPORT ZSD_REP_MULTI_PRINT.
TABLES :
vbak,
vbap,
vbpa,
vbfa,
VBRK,
VBRP,
LIKP,
LIPS,
KONV,
objk,
tvko,
ser01,
sadr,
equi,
makt,
mast,
t005t,
kna1,
t001w,
T001,
ADRC,
sscrfields,
zpp_plcmi, "Packing list history For Conf: Item data
zplh, "PACKING LIST HISTORY : HEADER DATA
zpli. "PACKING LIST HISTORY : ITEM DATA
DATA: FM_NAME TYPE RS38L_FNAM,
P_E_DEVTYPE TYPE RSPOPTYPE,
P_JOB_OUTPUT_INFO TYPE SSFCRESCL OCCURS 2000 WITH HEADER LINE,
P_OUTPUT_OPTIONS TYPE SSFCOMPOP OCCURS 0 WITH HEADER LINE,
P_CONTROL_PARAMETERS TYPE SSFCTRLOP OCCURS 0 WITH HEADER LINE ,
P_DOC LIKE DOCS OCCURS 2000 WITH HEADER LINE,
P_LINES LIKE TLINE OCCURS 200,
P_BIN_FILESIZE TYPE I,
P_LANGUAGE TYPE SFLANGU,
P_BIN_FILE TYPE XSTRING,
<i>OK_CODE LIKE SY-UCOMM.</i>
DATA: T_ITEM TYPE ZSD_TABL_LITEM,
WA_ITEM TYPE ZSD_STRUCT_LITEM,
T_ADRS LIKE ZSD_STRUCT_ADRS OCCURS 0 WITH HEADER LINE,
MSLINES LIKE TLINE OCCURS 1 WITH HEADER LINE,
TIDNO LIKE STXL-TDID,
TNAME LIKE STXL-TDNAME,
TOBJT LIKE STXL-TDOBJECT,
SSORD LIKE VBAK-VBELN,
TOT LIKE VBAK-NETWR,
WORD LIKE SPELL.
SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001.
PARAMETERS: P_DELNO LIKE LIKP-VBELN OBLIGATORY,
P_INVNO LIKE VBRK-VBELN OBLIGATORY,
P_DATE LIKE SY-DATUM.
SELECTION-SCREEN END OF BLOCK blk1.
AT SELECTION-SCREEN.
CLEAR T_ADRS.
REFRESH T_ITEM.
T_ADRS-INVNO = P_INVNO.
T_ADRS-INVDAT = P_DATE.
SELECT SINGLE VBELV INTO VBFA-VBELV
FROM VBFA
WHERE VBELN = P_DELNO
AND VBTYP_N = 'J' .
SSORD = VBFA-VBELV.
*Exporter's Address
SELECT SINGLE BUKRS_VF INTO VBAK-BUKRS_VF
FROM VBAK
WHERE VBELN = VBFA-VBELV.
SELECT SINGLE ADRNR
INTO T001-ADRNR
FROM T001
WHERE BUKRS = VBAK-BUKRS_VF.
SELECT SINGLE NAME1 STREET CITY1 POST_CODE1 COUNTRY
INTO (T_ADRS-NAME1,T_ADRS-STREET,T_ADRS-CITY1,
T_ADRS-POST_CODE1, ADRC-COUNTRY)
FROM ADRC
WHERE ADDRNUMBER EQ T001-ADRNR.
SELECT SINGLE LANDX
INTO T_ADRS-COUNTRY
FROM T005T
WHERE SPRAS = 'EN'
AND LAND1 = ADRC-COUNTRY.
**BUYERS NO & DATE
SELECT SINGLE BSTNK BSTDK INTO (T_ADRS-BSTNK,T_ADRS-BSTDK)
FROM VBAK
WHERE VBELN = VBFA-VBELV.
*Consignee Address & Buyer Other Than Consignee
SELECT SINGLE KUNNR KUNAG INTO (LIKP-KUNNR, LIKP-KUNAG)
FROM LIKP WHERE VBELN = P_DELNO.
IF LIKP-KUNNR = LIKP-KUNAG.
SELECT SINGLE NAME1 NAME2 STRAS ORT01 PSTLZ REGIO TELF1 ADRNR
INTO (T_ADRS-CNAME1, T_ADRS-CNAME2, T_ADRS-CSTREET,
T_ADRS-CCITY, T_ADRS-CPCODE, T_ADRS-CREGIO,
T_ADRS-CTELF1, KNA1-ADRNR)
FROM KNA1
WHERE KUNNR = LIKP-KUNNR.
SELECT SINGLE COUNTRY INTO ADRC-COUNTRY
FROM ADRC
WHERE ADDRNUMBER EQ KNA1-ADRNR.
SELECT SINGLE LANDX
INTO T_ADRS-CCOUNTRY
FROM T005T
WHERE SPRAS = 'EN'
AND LAND1 = ADRC-COUNTRY.
T_ADRS-ONAME1 = T_ADRS-CNAME1 .
T_ADRS-ONAME2 = T_ADRS-CNAME2 .
T_ADRS-OSTREET = T_ADRS-CSTREET .
T_ADRS-OCITY = T_ADRS-CCITY.
T_ADRS-OPCODE = T_ADRS-CPCODE .
T_ADRS-OREGIO = T_ADRS-CREGIO.
T_ADRS-OTELF1 = T_ADRS-CTELF1 .
T_ADRS-OCOUNTRY = T_ADRS-CCOUNTRY.
ELSE.
SELECT SINGLE NAME1 NAME2 STRAS ORT01 PSTLZ REGIO TELF1 ADRNR
INTO (T_ADRS-CNAME1, T_ADRS-CNAME2, T_ADRS-CSTREET,
T_ADRS-CCITY, T_ADRS-CPCODE, T_ADRS-CREGIO,
T_ADRS-CTELF1, KNA1-ADRNR)
FROM KNA1
WHERE KUNNR = LIKP-KUNNR.
SELECT SINGLE COUNTRY INTO ADRC-COUNTRY
FROM ADRC
WHERE ADDRNUMBER EQ KNA1-ADRNR.
SELECT SINGLE LANDX
INTO T_ADRS-CCOUNTRY
FROM T005T
WHERE SPRAS = 'EN'
AND LAND1 = ADRC-COUNTRY.
*Buyer Other than Consignee
SELECT SINGLE NAME1 NAME2 STRAS ORT01 PSTLZ REGIO TELF1 ADRNR
INTO (T_ADRS-ONAME1, T_ADRS-ONAME2, T_ADRS-OSTREET,
T_ADRS-OCITY, T_ADRS-OPCODE, T_ADRS-OREGIO,
T_ADRS-OTELF1, KNA1-ADRNR)
FROM KNA1
WHERE KUNNR = LIKP-KUNAG.
SELECT SINGLE COUNTRY INTO ADRC-COUNTRY
FROM ADRC
WHERE ADDRNUMBER EQ KNA1-ADRNR.
SELECT SINGLE LANDX
INTO T_ADRS-OCOUNTRY
FROM T005T
WHERE SPRAS = 'EN'
AND LAND1 = ADRC-COUNTRY.
ENDIF.
*Other's Ref
TIDNO = 'Z071'.
TNAME = SSORD.
TOBJT = 'VBBK'.
PERFORM FINDTEXT.
LOOP AT MSLINES.
T_ADRS-OREF = mslines-tdline(25).
EXIT.
ENDLOOP.
*Buyer's Order No Ref
TIDNO = 'Z023'.
TNAME = SSORD.
TOBJT = 'VBBK'.
PERFORM FINDTEXT.
LOOP AT MSLINES.
T_ADRS-BUYER = mslines-tdline(25).
EXIT.
ENDLOOP.
*Exporter Ref
TIDNO = 'Z072'.
TNAME = SSORD.
TOBJT = 'VBBK'.
PERFORM FINDTEXT.
LOOP AT MSLINES.
T_ADRS-XPREF = mslines-tdline(25).
EXIT.
ENDLOOP.
*Pre-Carraige By
TIDNO = 'Z074'.
TNAME = SSORD.
TOBJT = 'VBBK'.
PERFORM FINDTEXT.
LOOP AT MSLINES.
T_ADRS-PCRG = mslines-tdline(25).
EXIT.
ENDLOOP.
*Place Of reciept by Pre-Carraige
TIDNO = 'Z073'.
TNAME = SSORD.
TOBJT = 'VBBK'.
PERFORM FINDTEXT.
LOOP AT MSLINES.
T_ADRS-PLPCRG = mslines-tdline(25).
EXIT.
ENDLOOP.
*Vessel/Flight No
TIDNO = 'Z075'.
TNAME = SSORD.
TOBJT = 'VBBK'.
PERFORM FINDTEXT.
LOOP AT MSLINES.
T_ADRS-VFNO = mslines-tdline(25).
EXIT.
ENDLOOP.
*Port Of Loading
TIDNO = 'Z077'.
TNAME = SSORD.
TOBJT = 'VBBK'.
PERFORM FINDTEXT.
LOOP AT MSLINES.
T_ADRS-PLOAD = mslines-tdline(25).
EXIT.
ENDLOOP.
*Port Of Discharge
TIDNO = 'Z076'.
TNAME = SSORD.
TOBJT = 'VBBK'.
PERFORM FINDTEXT.
LOOP AT MSLINES.
T_ADRS-PDISG = mslines-tdline(25).
EXIT.
ENDLOOP.
*Final Destination
TIDNO = 'Z070'.
TNAME = SSORD.
TOBJT = 'VBBK'.
PERFORM FINDTEXT.
LOOP AT MSLINES.
T_ADRS-FDEST = mslines-tdline(25).
EXIT.
ENDLOOP.
*Terms Of Delivery & Payment
TIDNO = 'Z080'.
TNAME = SSORD.
TOBJT = 'VBBK'.
PERFORM FINDTEXT.
LOOP AT MSLINES.
T_ADRS-TERMS = mslines-tdline(50).
EXIT.
ENDLOOP.
APPEND T_ADRS.
*BODY SECTION FOR LINE ITEMS
SELECT POSNR KWMENG VRKME WAERK
INTO (VBAP-POSNR, VBAP-KWMENG, VBAP-VRKME, VBAP-WAERK)
FROM VBAP
WHERE VBELN = SSORD.
*Mark/Case No
TIDNO = '0002'.
CONCATENATE SSORD
VBAP-POSNR
INTO TNAME.
TOBJT = 'VBBP'.
PERFORM FINDTEXT.
LOOP AT MSLINES.
WA_ITEM-MARKNO = mslines-tdline(40).
EXIT.
ENDLOOP.
*Packing Type
TIDNO = '0003'.
CONCATENATE SSORD
VBAP-POSNR
INTO TNAME.
TOBJT = 'VBBP'.
PERFORM FINDTEXT.
LOOP AT MSLINES.
WA_ITEM-PACKTYP = mslines-tdline(40).
EXIT.
ENDLOOP.
*Goods Description
TIDNO = '0001'.
CONCATENATE SSORD
VBAP-POSNR
INTO TNAME.
TOBJT = 'VBBP'.
PERFORM FINDTEXT.
LOOP AT MSLINES.
WA_ITEM-PACKTYP = mslines-tdline(40).
EXIT.
ENDLOOP.
*Goods Quantity
WA_ITEM-QTY = VBAP-KWMENG.
WA_ITEM-VRKME = VBAP-VRKME.
*Goods Rate
SELECT SINGLE KNUMV INTO VBAK-KNUMV FROM VBAK WHERE VBELN = SSORD.
SELECT SINGLE KBETR WAERS
INTO (WA_ITEM-RATE, WA_ITEM-WAERS)
FROM KONV
WHERE KNUMV = VBAK-KNUMV
AND KPOSN = VBAP-POSNR
AND KSCHL = 'PR00'.
*Goods Amount
WA_ITEM-AMOUNT = WA_ITEM-QTY * WA_ITEM-RATE.
WA_ITEM-WAERK = VBAP-WAERK.
TOT = TOT + WA_ITEM-AMOUNT.
APPEND WA_ITEM TO T_ITEM.
ENDSELECT.
T_ADRS-TOT = TOT.
CALL FUNCTION 'SPELL_AMOUNT'
EXPORTING
AMOUNT = TOT
CURRENCY = VBAP-WAERK
FILLER = ' '
LANGUAGE = SY-LANGU
IMPORTING
IN_WORDS = WORD
EXCEPTIONS
NOT_FOUND = 1
TOO_LARGE = 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.
T_ADRS-TOT_WORDS = WORD-WORD.
APPEND T_ADRS.
START-OF-SELECTION.
<b> SET PF-STATUS '1000'.</b>
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = 'Z_SD_REP_MULTI_PRINT'
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.
P_LANGUAGE = 'EN'.
CALL FUNCTION 'SSF_GET_DEVICE_TYPE'
EXPORTING
I_LANGUAGE = P_LANGUAGE
I_APPLICATION = 'SAPDEFAULT'
IMPORTING
E_DEVTYPE = P_E_DEVTYPE.
P_OUTPUT_OPTIONS-XSFCMODE = 'X'.
P_OUTPUT_OPTIONS-XSF = SPACE.
P_OUTPUT_OPTIONS-XDFCMODE = 'X'.
P_OUTPUT_OPTIONS-XDF = SPACE.
P_OUTPUT_OPTIONS-TDPRINTER = P_E_DEVTYPE.
P_OUTPUT_OPTIONS-TDDEST = 'LOCL'.
APPEND P_OUTPUT_OPTIONS.
P_CONTROL_PARAMETERS-NO_DIALOG = 'X'.
P_CONTROL_PARAMETERS-GETOTF = 'X'.
P_CONTROL_PARAMETERS-NO_CLOSE = SPACE.
APPEND P_CONTROL_PARAMETERS.
CALL FUNCTION FM_NAME
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS = P_CONTROL_PARAMETERS
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS = P_OUTPUT_OPTIONS
USER_SETTINGS = 'X'
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO = P_JOB_OUTPUT_INFO
JOB_OUTPUT_OPTIONS =
TABLES
T_ADRS = T_ADRS
T_ITEM = T_ITEM
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.
<b>AT USER-COMMAND.
OK_CODE = SY-UCOMM.
CASE OK_CODE.
WHEN 'ARCHIVE'.</b>
CALL FUNCTION 'CONVERT_OTF_2_PDF'
EXPORTING
USE_OTF_MC_CMD = 'X'
ARCHIVE_INDEX =
IMPORTING
BIN_FILESIZE = P_BIN_FILESIZE
TABLES
OTF = P_JOB_OUTPUT_INFO-OTFDATA
DOCTAB_ARCHIVE = P_DOC
LINES = P_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 'WS_DOWNLOAD'
EXPORTING
BIN_FILESIZE = P_BIN_FILESIZE
CODEPAGE = ' '
FILENAME = 'C:\sd.pdf'
FILETYPE = 'BIN'
MODE = ''
WK1_N_FORMAT = ' '
WK1_N_SIZE = ' '
WK1_T_FORMAT = ' '
WK1_T_SIZE = ' '
COL_SELECT = ' '
COL_SELECTMASK = ' '
NO_AUTH_CHECK = ' '
IMPORTING
FILELENGTH = P_BIN_FILESIZE
TABLES
DATA_TAB = P_LINES
FIELDNAMES =
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_WRITE_ERROR = 2
INVALID_FILESIZE = 3
INVALID_TYPE = 4
NO_BATCH = 5
UNKNOWN_ERROR = 6
INVALID_TABLE_WIDTH = 7
GUI_REFUSE_FILETRANSFER = 8
CUSTOMER_ERROR = 9
NO_AUTHORITY = 10
OTHERS = 11
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
<b>ENDCASE.</b>
*& Form FINDTEXT
text
FORM FINDTEXT.
REFRESH mslines.
CALL FUNCTION 'READ_TEXT'
EXPORTING
client = sy-mandt
id = tidno
language = sy-langu
name = tname
object = tobjt
TABLES
lines = mslines
EXCEPTIONS
id = 1
language = 2
name = 3
not_found = 4
object = 5
reference_check = 6
wrong_access_to_archive = 7
OTHERS = 8.
DELETE mslines WHERE tdline IS INITIAL.
ENDFORM. "FINDTEXT
Message was edited by: md monirujjaman
Message was edited by: md monirujjaman
Message was edited by: md monirujjamanHello,
You cannot get continuous page numbers, But you will be able to merge all the 4 form outputs into one PDF file.
In yesterdays example you called one form, then converted OTF data into PDF data and downloaded on Presentation server.
In this case, after you call first form, you get the OTF data. Push this OTF data into a MAIN Internal table ( Same type as of OTF dada Int TAB ). Then Call second form. Then you get second set of OTF data. This second set of OTF data may be appended to the MAIN Internal table and the follw same procedure for the rest of the forms. In the end you will have one Internal table which holds OTF data of all the 4 forms.
Now convert the OTD data to PDF Data by the FM and Download one file which has output of all the 4 forms.
I hope my explanation is quite clear.
Regarding your second question, the Archive and Print and archive buttons on the PRINT PREVIEW screen works for Spool archiving which is to be enabled by customizing. If you wish to archive the output as PDF, you may have to do it in program.
I am NOT accessible on YAHOO.
Plz let me know if you are stuck.
Regards, Murugesh AS -
Need to print multiple sections in a group
We have print customer invoices. Along with each invoice, we have to send
1. A Cover Letter that is always one page
2. Terms and conditions. This could be between 1 to 3 pages
Our requirement is to have separate page numbering for each of these sections and each of these should start on a new page. For example if invoice is 5 pages long and Terms & conditions are 3 pages long then
1. Invoice pages should show Page 1 of 5, page 2 of 5, page 3 of 5, Pages 4 of 5 and Page 5 of 5
2. Cover letter should show page 1 of 1
3. Terms and condition page should show Page 1 of 3, page 2 of 3 and Page 3 of three.
By using<?split-by-page-break?> of puttng hard section break in RTF template does not help.
BI Publisher version is 10.1.3.4.1.
I am very new to BI publisher and you help is highly appreciated.Hi,
To send the output of multiple forms called in the same program to same spool follow the instructions
A new spool request is appended to an existing spool request by default only in the following
cases:
1. The attributes such as name, output device, number of copies and formatting type(page format) agree.
The above attributes u can check in the spool dialog box window.
2. The existing spool request is not completed yet.
3. Field TDNEWID in OUTPUT_PARAMETERS is not set to "X".
if any one of these conditions is not met, spool control automatically generates a new spool request.
in order to appended new spool request to an existing spool request set the following parameters
in the CONTROL_PARAMETERS
NO_OPEN NO_CLOSE
1.first form output blank "X"
2.additional output "X" "X"
. "X" "X"
Last output "X" blank -
RetrorespectiveActivation of Multiple Form 16 in mid- of the financial year
Hi All,
We have mainatined TAN as per the company Code in feature 40ECC. Now we want to have multiple Form 16 if there is change in company Code of an employee for the financial year 2009.
We have not activated Multiple Form 16 Switch so far. Now in the last month of financial Year 2009 that in March'2010 (period 12/2009) we want to activate Multiple Form 16 switch from 01.04.2009. After activation Multiple form 16 Switch, we are planning to trigger retro for all employees from 01.04.2009.
But we are not very much sure what will be the impact of activating Multiple Form 16 switch now in the last period of the financial year.
Required your valuable inputs on this.
Thanks,
RavinderHi,
Check whether multiple Form 16 switch is active or not.
In case this is active, then the Form 16 will be generated as under:
Company A - showing earnings from 01.04.08 to 31.12.08 only
Company B - showing earnings from 01.01.09 to 31.03.09 as current earnings and from 01.04.08 to 31.12.08 as income from previous employment.
In case multiple Form 16 is not active, then the Form 16 that you are getting is correct. However, in this case you need not print the Form 16 of company A. Only the Form 16 from the company code where the employee belongs to as on 31.03.2009 (i.e. last day of the FY) will be printed. And in this case the Form 16 will include complete earnings from 01.04.2008 to 31.03.2009 as current earnings.
Hope this clarifies your query.
VK
Maybe you are looking for
-
How to make a field profit center mandatory in sales order?
Dear GURUS, Please help in getting answer for following question. How to make a field profit center mandatory in sales order? With Regards Sandeep D.
-
Switch to External Monitor?
Am a new Mac user...trying to switch to my external monitor from the Mac Pro screen....any suggestions? thanks.
-
Using multiple ODBC Drivers and software
I am tring to connect to both an Oracle 7.3.2 server and an Oracle 8.6.1 server on UNIX machines from the same Windows2000/pro machine. I currently have the 8.1.5 Oracle8i Client package installed and I can access the 8.1.6 server through the provice
-
hi when i am running FAGLF101,it is asking for valuation area.how to define valuation area.
-
Powerpoint full screen/span over two monitors
Hi, I have looked around, but I have not been able to find the answer to this question. I have two monitors where I want powerpoint to display the presentation in full. As it is now you can only have it display on one monitor (no I don't want or am t