Smartform print out
hi all
i created a standard text with some part in bold .
now when i am using ths standard text in smartforms they are nt comin bold whereas in print preview at standard text they are coming bold .
can anybody suggest somethn
regards
navjot
Hi,
Just check out in ur paragraph font size...there must be a mistake there....or else there is a problem in ur GUI so just check it out..
with regards,
madhuri.
if useful reward with points...
Similar Messages
-
Smartform prints out Black boxes instead of Shade
Hello Experts,
I have developed some smartforms which have some boxes that are shaded with grey color for heading.
They work fine for some existing printers. But when i issue a print out on a new printer i
see that the shaded boxes are displayed as solid black boxes on the print out.
I also tried to print it in color but invain. Even the LOGO also got blacked out.
Can any one suggest me what to do.
Is it with my smartform or printer settings. Please advice.
Thanks
DanyHi
I don't know if u can't find out a solution.
All device output (printers) having the same divice type have the same behavior, i.e. printers having a different device type can give a different output, so if u'll correct the problem for a certain group of printers u could have a new problem for other group.
I think the best soltion is to use the printer used to test the smartforms
Max -
Smartform print out problem : urgent
Hi,
I have developed a smartform to take the printout of the Sales Order created in VA01.
I am facing a problem while taking the printout only if the line item in the sales order are more than 25.
I the line items are less than 25 then I am able to see to the print preview as well as able to take the print out but if the item are more than 25 then I am not able to see the preview also and even able to take the print.
Kindly anybody suggest
Regards,
shyam,hi shyam..
Remember one thing u <b>always give the first page--> next page will ber first page only.. in u r requirement</b> (because in the firtst u r printing the item details, who knows there colud be chances of items may not fit in 1 page so when the items are more it will give proble if u give the first page next page is second page)
do as follows-- you have 2 pages PAGE1(first page) PAGE2)second Page).. now
1..in PAGE1's give the next page as PAGE1, in the PAGE2 give the next page as PAGE2.
2.. After competion of printing the ITEM details u need to print the ITEM COnditions.. so we will trigger the second page explicitily by using the COMMAND after completion of first page..
for this--> at end of the main window <b>right clice > create>flow logi-->command</b>.
now command widow will be inserted.. in this tick the GOTO NEXT PAGE :inthis give PAGE2. in condition tab of the COMMAND "tick only after end of Main Window.
Please wite if u r proble m is not solved..
Please Close this thread.. when u r problem is solved
Reward if Helpful
Regards
Naresh Reddy K -
Smartform print out orginal and duplicate
Hi,
Can any one tell how to obtain orginal and duplicate copy in smartform for the single invoice ie 2 copies one original and duplicate. And in printout it has to print orignal and in another copyHi,
See below Code, Ask your Technical team to do like below for radio button appearing in selection screen.
SELECTION-SCREEN BEGIN OF BLOCK frame1 WITH FRAME TITLE text-001.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN POSITION 15.
PARAMETERS: r1 RADIOBUTTON GROUP rb .
SELECTION-SCREEN COMMENT 20(77) text-002.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN POSITION 15.
PARAMETERS: r2 RADIOBUTTON GROUP rb.
SELECTION-SCREEN COMMENT 20(77) text-003.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN POSITION 15.
PARAMETERS: r3 RADIOBUTTON GROUP rb.
SELECTION-SCREEN COMMENT 20(77) text-004.
SELECTION-SCREEN END OF LINE.
* SELECTION-SCREEN BEGIN OF LINE.
* SELECTION-SCREEN POSITION 15.
* PARAMETERS: r4 RADIOBUTTON GROUP rb.
* SELECTION-SCREEN COMMENT 20(77) text-005.
* SELECTION-SCREEN END OF LINE.
*selection-screen function key 1.
*selection-screen function key 2.
SELECTION-SCREEN END OF BLOCK frame1. -
hi all
i am priniting a smartform with logo the problem is i a getting inverted logo where as verythn else id gd.
can anyone suggest me what is going wromg
regards
navjotHi
Check the same printing in another printer
because sometimes it will happen due to printer also.
So check and confirm it
and also check the resolution of the graphic technical settings and the output options in smartform
see the steps correctly
1) In Smart Forms Editor, In left pane, right Click any Page (say Page1) and select Create -> Window, Give it a name and Description (Say Window1)
2) Right Click on Window (Window 1) and select Create -> Graphics, Give it a name and description
3) In general Attributes, Select Name, get search help (F4) , you will find a list of pictures
4) Select any picture and set its Resolution in DPI
5) Press F9 to open Smart Forms Builder, Select window (Window1) and In Output options window set, size and position of the Logo
6) Set any other parameters if required, save and activate.
7) If there is only 1 Window in the forms, set it as Main Window in general attributes.
8) Use TCode SE78 to upload new pictures and logos.
look at Thread Dynamic Graph in smartforms
Refer the links also -
Re: Dinamic Graph in smartforms
How to get file perperties in Unix server
Reward points for useful Answers
Regards
Anji -
Font in print out of smartform
Hi All,
I have uploaded a font and it is maintained in both Font & Printer Family. I have created a STYLE for the font and using the same in my Smartform.
When i see the preview of the Smartform, the font is displayed large + Bold ( as per our requirement).
But when i take a print out, a small size font is printed.
Any pointers for the same would be helpful.
Ps. : The font is printed correctly when logged on with EN language but when logged on with JA language then it doesnt print correctly though it displays correctly in print preview.
Best regards,
PrashantHi,
The settings mentioned by Kishan are already in place. Still it doesnt give the desired output.
Also, this is a new Form created in English language.
I have tried the existing fonts as well as uploading fonts, but still no +ve results.
Also, could someone please explain, why the font through STYLE can be entered only of max size 99.00. But in PRINTER the font for 120,160 is also maintained.
Thanks,
Best regards,
Prashant -
Could u tell me how2control printing out the certain page in smartforms?
there are many pages when I preview ,
but I only need one or several of the pages.
How to print the certain page in smartforms?
and if there are several windows in one page
how can I just print out one or several windows of them?
what should I insert "command" or "program lines" into
the "flow logic" ?
It's very kind of you to explain that in detail.
Thanks very much in advance.pls help me,thank you
-
How to avoid that every page of a smartform is going to be printed out
Hi,
I have following problem. In my smartform I builded different pages (like a cover page, different lists etc.). The user should decide by setting parameters what lists he want to print. So if he don´t need the cover page, it should not be printed out.
Is there any way to set this up in the smartform? Right now, the printing parameters (what the user wants to print) are stored in an internal table and should be processed in the smartform. My problem is that there is no way to implement conditions on a page in a smartform.
Please let me know if somebody has a solution for this requirement.
Thanks a lot,
John Caspar
<MOVED TO CORRECT FORUM BY MODERATOR>
Edited by: Alvaro Tejada Galindo on Apr 15, 2009 8:49 AMHi Micky,
The external debugging works. Thank you very much!
And how can I reward you? -
Hi,
I am new to smartforms.i want to develop smartform for PO print out can anybody help?
Moderator message: sorry, these forums cannot replace proper training, please search for available documentation or attend classes.
Edited by: Thomas Zloch on Nov 25, 2010 10:48 AMhai freind,
please go through sap technical ok.
thanks ,
anji.
Moderator message: please do not reply to such questions, you have been warned many times, I will very soon suggest your ID for deletion if you don't change your behaviour.
Edited by: Thomas Zloch on Nov 25, 2010 10:49 AM -
Payment term not appearing in PO print out
Hello all,
We have one PO where Payment term is not appearing in PO print out. I have checked other POs of the same type where its appearing in print out. In PO header payment term is maintained. Does this flow from Vendor mastre?
RegardsHi,
Is this payment term is new one !
Yes, payment term should flow from vendor master to PO.
Now as payment term not printed in PO print, just check with your PO output type & related FORM or PDF/SmartForm in it for application EF in NACE t.code. Also check SmartForm in t.code: SMARTFORMS . Or if FORM check in t.code:SE71 / SE73 the SapScript & see inclusion of all payment term in it with help of with ABAP consultant.
Regards,
Biju K -
(Smartform) Print grand total on the last page
Hi everyone,
I'm trying to print the Grand Totals on the last page of my Smartform. I have two pages - FIRST and SECOND.
What I did was I created a Text to display the grand total, and I specified that this text should be printed 'Only After End of Main Window'. However, the total is not being printed out.
I can't change the condition to 'Not on First Page', because my form has more than two pages, and I only want the grand totals on the last page.
Any help would be appreciated.hi,
we have a window type called final window if u define this type window in second page . create a table in the window and go to calculations tab and define an internal table. i think u can get the grand totals.
if u want maore clearly go throuh this link
https://www.sdn.sap.com/irj/sdn/forums
hope this will help you.
REWARD ME IF USEFUL.
thanks,
gupta
Edited by: gupta pullipudi on Apr 9, 2008 9:23 PM -
Smartforms: print accompanying documents
Hi,
I have to reproduce in Smartforms the same output as the existing legacy system.
Legacy system automatically outputs
1)A Quotation
2)A Condition of Sale document (always printed out)
(PDF file, 2 pages, contents are numbered and appear in
2 columns on each page).
3)A technical document (only printed if a criteria is
satisfied in the logic within the Quotation)
(PDF file, 1 page, contents appear in 2 columns on the
page [which includes some technical drawings])
Smartforms
I have no problem reproducing the Quotation in Smartforms but not so sure how to output the 2 accompanying documents automatically with the Quotation.
Currently, the Smartforms has the following design:
1) First page
2) Next page
Question
a)Does anyone know how to get the 2 PDF files printed automatically with the Quotation without having to bring the contents into Smartforms?
b)If the PDF contents of the 2 files has to be integrated into the Smartform, what would be the best approach?
Bear in mind that one of the documents contain technical drawings.
Am thinking it would be good to create at least another page (ie LAST page) and maybe incorporating the contents of the 2 files in there somehow (maybe the technical file as a scanned object and the other file contents contained in multiple windows of the LAST page). No MAIN window in the LAST page.
Would my proposed approach work? Any ideas, anyone?
c)Have been playing with the order sequence of the different pages. Have not got it quite right yet?
Page Next
First Next
Next Next ?
Last ?
How to get the system to process the last page only once?
Or is there another way???any suggestion?
-
Problem report only print out when i click back button
hi all..i having problem with my report print program. the problem is my report did not immediately print out when i click print button. the program require me to click back button before print out execute. please help me to solve this problem. Thank you.
Edited by: padile on Jan 7, 2010 3:51 AMHi,
In your program, mention the following:
DATA: gs_out_opt TYPE ssfcompop.
gs_out_opt-tdimmed = 'X' "Print immediately
CALL FUNCTION lv_fname "Smartform FM
EXPORTING
output_options = gs_out_opt
Regards,
Dawood. -
Dear All.
Till this day the duty-form for a company were performed through a
special Form Program, it is performed via processing routines.
The first Form Routine's name is entry.
Form was printed-out for each Transport up to now.
Current Requirements are for next time as follows:
Printing out one form for every delivery (shipment) instead of
for each Transport as so far. Please notice one Transport may
consist of many deliveries (Shipment). 1 Transport : n Shipment.
DATA:
lc_wa_usrdata TYPE /Z2a/ty_lw_usrdata.
INCLUDE rvadtabl.
SET EXTENDED CHECK OFF.
TABLES: vbpla, thead, ttxer, ttxit, t005, vbddl, stxh, sadr."SADR40A
INCLUDE vttkdata. "Shipment Header
INCLUDE vttsdata. "Shipment Segment
INCLUDE vttpdata. "Shipment Items
INCLUDE vbpadata. "Partner
INCLUDE vtfadata. "Flow
INCLUDE sadrdata. "Address
INCLUDE vtlfdata. "Delivery Selection
INCLUDE vsedata. "shipping units
INCLUDE rv56acom. "I/O-Structure
SET EXTENDED CHECK ON.
TABLES: /Z2a/tv_schein.
FORM entry USING return_code us_screen.
DATA: lf_retcode TYPE sy-subrc.
screen = 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 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.
DATA: ls_header LIKE /Z2a/ss_pv_kopf.
DATA: tb_daten LIKE /Z2a/ss_pv_daten OCCURS 1.
DATA: lc_va_lfnr TYPE nrlevel.
DATA: lc_va_year TYPE char4.
DATA: lc_va_keyseg_pv TYPE /dca/p000_keyseg.
DATA: lc_tb_bwdat_pv TYPE /dca/p000_ty_tb_bwdat.
DATA: lc_wa_bwdat_pv TYPE /dca/p000_ty_wa_bwdat.
DATA: lc_wa_bwm_res_pv TYPE /Z2a/dat_cu_pvschein.
DATA: lc_va_lifnr TYPE kunnr.
DATA: lc_va_nr TYPE nrnr.
DATA: lc_va_anz TYPE /Z2a/anz_pv.
DATA: lc_va_no TYPE /Z2a/anz_kein_pv.
DATA: lc_wa_pvschein LIKE /Z2a/tv_schein.
DATA: lc_va_line LIKE sy-tabix.
DATA: lc_va_flag_zoll TYPE segal,
lc_va_rqident TYPE rspoid,
lc_va_vsart TYPE vsarttr,
lc_va_tknum TYPE tknum.
DATA: lc_va_obj TYPE nrobj.
DATA: lc_va_printer TYPE rspopname.
DATA: lc_va_pv_kz TYPE char4.
DATA: lc_va_tplst TYPE tplst.
* 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_pv TABLES tb_daten
CHANGING ls_header
lc_va_flag_zoll
lc_va_vsart
lc_va_tplst
cf_retcode.
ENDIF.
lc_va_tknum = nast-objky.
IF cf_retcode = 0.
ELSE.
PERFORM protocol_nast_update.
cf_retcode = 4.
EXIT.
ENDIF.
IF cf_retcode = 0.
* determine smartform function module for delivery note
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING formname = lf_formname
IMPORTING fm_name = lf_fm_name
EXCEPTIONS no_form = 1
no_function_module = 2
OTHERS = 3.
IF sy-subrc <> 0.
ENDIF.
ENDIF.
DESCRIBE TABLE tb_daten LINES lc_va_line.
IF lc_va_line <> 0.
lc_va_pv_kz = 'JA'.
SELECT SINGLE lifnr
FROM vtpa
INTO lc_va_lifnr
WHERE vbeln = nast-objky
AND parvw = 'YL'.
lc_va_keyseg_pv = ls_header-kunnr.
lc_va_keyseg_pv+10(10) = lc_va_lifnr.
lc_va_keyseg_pv+20(2) = lc_va_vsart.
lc_va_keyseg_pv+22(4) = lc_va_pv_kz.
CALL FUNCTION '/ZTR/P000_MCDATA_FROM_'
EXPORTING
cv_va_keytyp = '/Z2a/KEY_CU_PVSCHEIN'
cv_va_keyseg = lc_va_keyseg_pv
TABLES
cr_tb_bwdat = lc_tb_bwdat_pv.
IF lc_tb_bwdat_pv[] IS INITIAL.
cf_retcode = 4.
ELSE.
LOOP AT lc_tb_bwdat_pv INTO lc_wa_bwdat_pv.
lc_wa_bwm_res_pv = lc_wa_bwdat_pv-datseg.
lc_va_obj = lc_wa_bwm_res_pv(10).
lc_va_nr = lc_wa_bwm_res_pv+10(2).
lc_va_anz = lc_wa_bwm_res_pv+12(8).
lc_va_printer = lc_wa_bwm_res_pv+20(4).
SELECT SINGLE pvno
FROM /Z2a/tv_schein
INTO lc_va_lfnr
WHERE tknum = nast-objky.
IF sy-subrc = 0.
ELSE.
CALL FUNCTION 'NUMBER_GET_NEXT'
EXPORTING
nr_range_nr = lc_va_nr
object = lc_va_obj
IMPORTING
number = lc_va_lfnr
IF sy-subrc <> 0.
ENDIF.
ENDIF.
ENDLOOP.
ENDIF.
* call smartform delivery note
ls_composer_param-tddest = lc_va_printer.
* ls_control_param-device = lc_va_printer.
lc_va_year = sy-datum(4).
PERFORM set_print_param USING ls_addr_key
lc_va_lfnr
CHANGING ls_control_param
ls_composer_param
ls_recipient
ls_sender
cf_retcode.
lc_wa_usrdata-mandt = sy-mandt.
lc_wa_usrdata-udate = sy-datum.
lc_wa_usrdata-uzeit = sy-uzeit.
lc_wa_usrdata-usr = sy-uname.
lc_wa_usrdata-sysid = sy-sysid.
DO lc_va_anz TIMES.
CALL FUNCTION lf_fm_name
EXPORTING
archive_index = toa_dara
archive_parameters = arc_params
control_parameters = ls_control_param
mail_recipient = ls_recipient
mail_sender = ls_sender
output_options = ls_composer_param
user_settings = ' '
ls_header = ls_header
lc_va_lfnr = lc_va_lfnr
lc_va_year = lc_va_year
lc_va_tplst = lc_va_tplst
lc_wa_usrdata = lc_wa_usrdata
TABLES
tb_daten = tb_daten
EXCEPTIONS formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
IF sy-subrc <> 0.
ENDIF.
ENDDO.
ELSE.
lc_va_pv_kz = 'NEIN'.
SELECT SINGLE lifnr
FROM vtpa
INTO lc_va_lifnr
WHERE vbeln = nast-objky
AND parvw = 'YL'.
lc_va_keyseg_pv = ls_header-kunnr.
lc_va_keyseg_pv+10(10) = lc_va_lifnr.
lc_va_keyseg_pv+20(2) = lc_va_vsart.
lc_va_keyseg_pv+22(4) = lc_va_pv_kz.
CALL FUNCTION '/ZTR/P000_MCDATA_FROM_'
EXPORTING
cv_va_keytyp = '/Z2a/KEY_CU_PVSCHEIN'
cv_va_keyseg = lc_va_keyseg_pv
TABLES
cr_tb_bwdat = lc_tb_bwdat_pv.
IF lc_tb_bwdat_pv[] IS INITIAL.
cf_retcode = 4.
ELSE.
LOOP AT lc_tb_bwdat_pv INTO lc_wa_bwdat_pv.
lc_wa_bwm_res_pv = lc_wa_bwdat_pv-datseg.
lc_va_obj = lc_wa_bwm_res_pv(10).
lc_va_nr = lc_wa_bwm_res_pv+10(2).
lc_va_anz = lc_wa_bwm_res_pv+12(8).
lc_va_printer = lc_wa_bwm_res_pv+20(4).
SELECT SINGLE pvno
FROM /Z2a/tv_schein
INTO lc_va_lfnr
WHERE tknum = nast-objky.
IF sy-subrc = 0.
UPDATE /Z2a/tv_schein
SET flag_pv = ' '
WHERE tknum = nast-objky.
ELSE.
* laufende nummer füllen, bei keinen PV-Teilen Nummernkreis 99
CALL FUNCTION 'NUMBER_GET_NEXT'
EXPORTING
nr_range_nr = lc_va_nr
object = lc_va_obj
* QUANTITY = '1'
* SUBOBJECT = ' '
* TOYEAR = '0000'
* IGNORE_BUFFER = ' '
IMPORTING
number = lc_va_lfnr
* QUANTITY =
* RETURNCODE =
* EXCEPTIONS
* INTERVAL_NOT_FOUND = 1
* NUMBER_RANGE_NOT_INTERN = 2
* OBJECT_NOT_FOUND = 3
* QUANTITY_IS_0 = 4
* QUANTITY_IS_NOT_1 = 5
* INTERVAL_OVERFLOW = 6
* BUFFER_OVERFLOW = 7
* OTHERS = 8
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF.
ENDLOOP.
lc_va_year = sy-datum(4).
ls_composer_param-tddest = lc_va_printer.
PERFORM set_print_param USING ls_addr_key
lc_va_lfnr
CHANGING ls_control_param
ls_composer_param
ls_recipient
ls_sender
cf_retcode.
lc_wa_usrdata-mandt = sy-mandt.
lc_wa_usrdata-udate = sy-datum.
lc_wa_usrdata-uzeit = sy-uzeit.
lc_wa_usrdata-usr = sy-uname.
lc_wa_usrdata-sysid = sy-sysid.
DO lc_va_anz TIMES.
CALL FUNCTION lf_fm_name
EXPORTING
archive_index = toa_dara
archive_parameters = arc_params
control_parameters = ls_control_param
mail_recipient = ls_recipient
mail_sender = ls_sender
output_options = ls_composer_param
user_settings = ' '
ls_header = ls_header
lc_va_lfnr = lc_va_lfnr
lc_va_year = lc_va_year
lc_va_tplst = lc_va_tplst
lc_wa_usrdata = lc_wa_usrdata
TABLES
tb_daten = tb_daten
EXCEPTIONS formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
IF sy-subrc <> 0.
ENDIF.
ENDDO.
ENDIF.
ENDIF.
SELECT SINGLE *
FROM /Z2a/tv_schein
INTO lc_wa_pvschein
WHERE tknum = nast-objky.
IF sy-subrc = 0.
ELSE.
IF NOT lc_va_lfnr IS INITIAL.
lc_wa_pvschein-mandt = sy-mandt.
lc_wa_pvschein-tknum = nast-objky.
INSERT INTO /Z2a/tv_schein
VALUES lc_wa_pvschein.
UPDATE /Z2a/tv_schein SET
pvno = lc_va_lfnr
vsart = lc_va_vsart
exti1 = ls_header-schiffname
signi = ls_header-siegel
flag_zoll = lc_va_flag_zoll
exti2 = ls_header-contnr
lifex = ls_header-mbcnr
dalen = ls_header-dalen
dptbg = ls_header-dptbg
kunnr = ls_header-kunnr
add03 = ls_header-add03
parnr = lc_va_lifnr
datum_druck = sy-datum
uzeit_druck = sy-uzeit
ernam_druck = sy-ucomm
WHERE tknum = nast-objky.
IF tb_daten IS INITIAL.
UPDATE /Z2a/tv_schein SET
flag_pv = ' '
WHERE tknum = nast-objky.
ELSE.
UPDATE /Z2a/tv_schein SET
flag_pv = 'X'.
ENDIF.
ENDIF.
ENDIF.
* get SmartForm protocoll and store it in the NAST protocoll
* PERFORM ADD_SMFRM_PROT. DEL_HP_335958
ENDFORM.
FORM get_data_pv TABLES lc_tb_daten
CHANGING cs_header TYPE /Z2a/ss_pv_kopf
lc_va_flag_zoll TYPE segal
lc_va_vsart TYPE vsarttr
lc_va_tplst TYPE tplst
cf_retcode.
TYPES: BEGIN OF ty_wa_vbeln,
vbeln TYPE vbeln_vl,
END OF ty_wa_vbeln,
ty_tb_vbeln TYPE STANDARD TABLE OF ty_wa_vbeln
WITH DEFAULT KEY
INITIAL SIZE 0,
ty_wa_lips LIKE lips,
ty_tb_lips TYPE STANDARD TABLE OF ty_wa_lips
WITH DEFAULT KEY
INITIAL SIZE 0.
DATA: lc_tb_cond LIKE /Z2a/ss_pv_daten OCCURS 1.
DATA: lc_wa_daten TYPE /Z2a/ss_pv_daten.
DATA: lc_wa_cond TYPE /Z2a/ss_pv_daten.
DATA: lc_va_tknum TYPE tknum,
lc_tb_lips TYPE ty_tb_lips,
lc_wa_lips TYPE ty_wa_lips,
lc_va_kunnr TYPE kunnr,
lc_va_pvvkz TYPE /Z2a/pvvkz,
lc_va_exprf TYPE exprf,
lc_va_matnr TYPE matnr,
lc_va_menge TYPE lfimg.
DATA: lc_tb_vbeln TYPE ty_tb_vbeln,
lc_wa_vbeln TYPE ty_wa_vbeln,
lc_va_land1 TYPE land1,
lc_va_lifnr TYPE lifnr.
DATA: lc_va_exnum TYPE exnum.
DATA: lc_va_keyseg TYPE /dca/p000_keyseg.
DATA: lc_tb_bwdat TYPE /dca/p000_ty_tb_bwdat.
DATA: lc_wa_bwdat TYPE /dca/p000_ty_wa_bwdat.
DATA: lc_wa_bwm_result TYPE /Z2a/dat_cu_pvabwicklung.
DATA language LIKE nast-spras.
DATA shipment_number LIKE vttk-tknum.
CLEAR cf_retcode.
* get data
language = nast-spras.
shipment_number = nast-objky.
CALL FUNCTION 'RV_SHIPMENT_PRINT_VIEW'
EXPORTING
shipment_number = shipment_number
option_tvtk = 'X' "Shipmenttype J/N
option_ttds = 'X' "Disposition J/N
language = language
option_items = 'X' "Transport Items J/N
option_segments = 'X' "Transport Segments J/N
option_partners = 'X' "Partners J/N
option_sales_orders = 'X' "Sales orders J/N
option_export_data = 'X' "Export data J/N
option_packages = 'X' "Packages J/N
option_flow = ' ' "Flow J/N
option_no_refresh = ' ' "Refresh Tables J/N
IMPORTING
f_vttkvb = vttkvb "Shipment Header
f_tvtk = tvtk "Shipmenttype
f_tvtkt = tvtkt "Description Shipmenttype
f_ttds = ttds "Disposition
f_ttdst = ttdst "Description Disposition
f_vbpla = vbpla "Packages
TABLES
f_vttp = xvttp "Shipment Items
f_trlk = slk "Delivery
f_trlp = slp "Delivery Item
f_vtts = xvtts "Shipment Segments
f_vtsp = xvtsp "Segments/Items
f_vbpa = xvbpa "Partner
f_vbadr = xvbadr "Address
f_vtfa = xvtfa "Flow
f_vbplk = xvbplk "Shipment Unit Header
f_vbplp = xvbplp "Shipment Unit
f_vbpls = xvbpls "Shipment Unit Sum
EXCEPTIONS
not_found = 1.
cs_header-tknum = nast-objky.
cs_header-schiffname = vttkvb-exti1.
cs_header-abfahrt = vttkvb-dptbg.
cs_header-contnr = vttkvb-exti2.
cs_header-normt = vttkvb-add01.
cs_header-siegel = vttkvb-signi.
cs_header-gewbr = vttkvb-text2.
cs_header-gewnt = vttkvb-text3.
cs_header-dalen = vttkvb-dalen.
cs_header-dptbg = vttkvb-dptbg.
cs_header-add03 = vttkvb-add03.
lc_va_tplst = vttkvb-tplst.
lc_va_vsart = vttkvb-vsart.
SELECT vbeln
FROM vttp
INTO TABLE lc_tb_vbeln
WHERE tknum = lc_va_tknum.
LOOP AT lc_tb_vbeln INTO lc_wa_vbeln.
SELECT SINGLE kunnr lifex
FROM likp
INTO (lc_va_kunnr, cs_header-mbcnr)
WHERE vbeln = lc_wa_vbeln-vbeln.
SELECT *
FROM lips
INTO TABLE lc_tb_lips
WHERE vbeln = lc_wa_vbeln-vbeln.
ENDLOOP.
LOOP AT lc_tb_lips INTO lc_wa_lips.
SELECT SINGLE pvvkz
FROM /Z2a/ldm_kun
INTO lc_va_pvvkz
WHERE kunnr = lc_va_kunnr.
IF lc_va_pvvkz NE 'X'.
cf_retcode = 4.
EXIT.
ELSE.
SELECT SINGLE exnum segal
FROM eikp
INTO (lc_va_exnum, lc_va_flag_zoll)
WHERE refnr = lc_wa_lips-vbeln.
SELECT SINGLE exprf
FROM eipo
INTO lc_va_exprf
WHERE exnum = lc_va_exnum
AND expos = lc_wa_lips-posnr.
lc_va_keyseg = lc_va_exprf.
CALL FUNCTION '/ZTR/P000_MCDATA_FROM_'
EXPORTING
cv_va_keytyp = '/Z2a/KEY_CU_PVABWICKLUNG'
cv_va_keyseg = lc_va_keyseg
TABLES
cr_tb_bwdat = lc_tb_bwdat.
IF NOT lc_tb_bwdat[] IS INITIAL.
LOOP AT lc_tb_bwdat INTO lc_wa_bwdat.
lc_wa_bwm_result = lc_wa_bwdat-datseg.
IF lc_wa_bwm_result-pv_relevant = 'X'.
* Kumulieren
lc_wa_cond-matnr = lc_wa_lips-matnr.
SELECT SINGLE maktx
FROM makt
INTO lc_wa_cond-arktx
WHERE matnr = lc_wa_lips-matnr
AND spras = 'DE'.
lc_wa_cond-menge = lc_wa_lips-lfimg.
lc_wa_cond-me = lc_wa_lips-meins.
COLLECT lc_wa_cond INTO lc_tb_cond.
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.
ENDLOOP.
cs_header-kunnr = lc_va_kunnr.
SELECT SINGLE name1 name2 land1
INTO (cs_header-name1,
cs_header-name2,
lc_va_land1)
FROM kna1
WHERE kunnr = lc_va_kunnr.
SELECT SINGLE landx
INTO cs_header-land
FROM t005t
WHERE spras = sy-langu
AND land1 = lc_va_land1.
* Sortieren Aufsteigend nach Materialnr
SORT lc_tb_cond ASCENDING BY matnr.
* Übergabe an Ausgabetabelle
LOOP AT lc_tb_cond INTO lc_wa_cond.
MOVE-CORRESPONDING lc_wa_cond TO lc_wa_daten.
APPEND lc_wa_daten TO lc_tb_daten.
ENDLOOP.
ENDFORM. " get_data_spat
FORM set_print_data_to_read
USING if_formname LIKE tnapr-sform
CHANGING cs_print_data_to_read TYPE ledlv_print_data_to_read
cf_retcode.
FIELD-SYMBOLS: <fs_print_data_to_read> TYPE xfeld.
DATA: lt_fieldlist TYPE tsffields.
DATA: ls_fieldlist TYPE LINE OF tsffields.
DATA: lf_field1 TYPE LINE OF tsffields.
DATA: lf_field2 TYPE LINE OF tsffields.
DATA: lf_field3 TYPE LINE OF tsffields.
CALL FUNCTION 'SSF_FIELD_LIST'
EXPORTING
formname = if_formname
* VARIANT = ' '
IMPORTING
fieldlist = lt_fieldlist
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
IF sy-subrc <> 0.
cf_retcode = sy-subrc.
CLEAR lt_fieldlist.
ELSE.
* set print data requirements
LOOP AT lt_fieldlist INTO ls_fieldlist.
SPLIT ls_fieldlist AT '-' INTO lf_field1 lf_field2 lf_field3.
* <<<< START_OF_INSERTION_HP_350342 >>>>
IF lf_field1 = 'IS_DLV_DELNOTE' AND lf_field2 = 'IT_SERNR'.
lf_field2 = 'IT_SERNO'.
ENDIF.
* <<<< END_OF_INSERTION_HP_350342 >>>>
ASSIGN COMPONENT lf_field2 OF STRUCTURE
cs_print_data_to_read TO <fs_print_data_to_read>.
IF sy-subrc = 0.
<fs_print_data_to_read> = 'X'.
ENDIF.
ENDLOOP.
* header data is always required
cs_print_data_to_read-hd_gen = 'X'.
* adress is always required for print param
cs_print_data_to_read-hd_adr = 'X'.
* organisational data is always required for include texts
cs_print_data_to_read-hd_org = 'X'.
ENDIF.
ENDFORM. " set_print_data_to_read
*& Form set_print_param
* text
* -->P_LS_ADDR_KEY text
* <--P_LS_CONTROL_PARAM text
* <--P_LS_COMPOSER_PARAM text
* <--P_LS_RECIPIENT text
* <--P_LS_SENDER text
* <--P_CF_RETCODE text
FORM set_print_param USING is_addr_key LIKE addr_key
* lc_va_tknum
lc_va_lfnr TYPE nrlevel
CHANGING cs_control_param TYPE ssfctrlop
cs_composer_param TYPE ssfcompop
cs_recipient TYPE swotobjid
cs_sender TYPE swotobjid
cf_retcode TYPE sy-subrc.
DATA: ls_itcpo TYPE itcpo.
DATA: lf_repid TYPE sy-repid.
DATA: lf_device TYPE tddevice.
DATA: ls_recipient TYPE swotobjid.
DATA: ls_sender TYPE swotobjid.
DATA: lc_va_suffix TYPE rspo2name.
lf_repid = sy-repid.
CALL FUNCTION 'WFMC_PREPARE_SMART_FORM'
EXPORTING
pi_nast = nast
pi_addr_key = is_addr_key
pi_repid = lf_repid
IMPORTING
pe_returncode = cf_retcode
pe_itcpo = ls_itcpo
pe_device = lf_device
pe_recipient = cs_recipient
pe_sender = cs_sender.
SHIFT lc_va_lfnr LEFT DELETING LEADING '0'.
CONCATENATE 'PV' lc_va_lfnr INTO lc_va_suffix.
IF cf_retcode = 0.
MOVE-CORRESPONDING ls_itcpo TO cs_composer_param.
cs_composer_param-tdsuffix2 = lc_va_suffix.
cs_control_param-device = lf_device.
cs_control_param-no_dialog = 'X'.
cs_control_param-preview = screen.
cs_control_param-getotf = ls_itcpo-tdgetotf.
cs_control_param-langu = nast-spras.
ENDIF.
ENDFORM. " set_print_param
FORM protocol_nast_update.
CALL FUNCTION 'NAST_PROTOCOL_UPDATE'
EXPORTING
msg_arbgb = '/Z2a/PVSCHEIN'
msg_nr = '001'
msg_ty = 'E'
* MSG_V2 = SYST-MSGV2
* MSG_V3 = SYST-MSGV3
* MSG_V4 = SYST-MSGV4
* MSG_V1 = SYST-MSGV1
EXCEPTIONS
OTHERS = 1.
ENDFORM.Hello!
I have to customize the enclosed source code so it does the following:
print out for each shipment (see FuBa:RV_SHIPMENT_PRINT_VIEW
parameter slp) really seperated by for every shipment item LIKP-VBELN
and not for the whole VTTP-TKNUM.
The parameter "slp" must be stripted so by leaving
of the routine "get_data_pv" has only the datas of the current
LIKP-VBELN, and in the next step taking the next LIKP-VBELN
and so on. Right now it performs only one time for one VTTP-TKNUM.
If you don't understand VTTP-TKNUM and LIKP-VBELN please refer
to Transaction SE11.
Reagrds
Ilhan -
SmartForms : Printing Non-English characters with SWIN output device?
I have a Japanese Text (entered in Unicode at So10) and I want to print it from my SmartForms application using SWIN device type.
I thought SWIN converted all the components into graphics before sending to printer. To my surprise, the Japanese text printed out as "########".
I even tried duplicate the SWIN output device to another output device and changed the character set to 4103 UTF-16LE Unicode / ISO/IEC 10646 but then the print process hang.
Anyone knows how to overcome the problem so that I can print Japanese with SWin output device?I have a Japanese Text (entered in Unicode at So10) and I want to print it from my SmartForms application using SWIN device type.
I thought SWIN converted all the components into graphics before sending to printer. To my surprise, the Japanese text printed out as "########".
I even tried duplicate the SWIN output device to another output device and changed the character set to 4103 UTF-16LE Unicode / ISO/IEC 10646 but then the print process hang.
Anyone knows how to overcome the problem so that I can print Japanese with SWin output device?
Maybe you are looking for
-
How to print Page No. in ALV footer.
I am using the follwoing code but when I got print the page numbers are not displaying. I was copy the code from one of group message. Please tell where I am making mistakes means why page numbers are not displaying at footer. I want to print 30 rows
-
Hi .. I have written a cronjob to invoke a script that would transfer files based on some criteria. Consider folders A and B. Say I FTP a large file to A. Before the file gets fully transfered say the cronjob gets invoked. The script will move the fi
-
MQSeries MDB doesn't received message in WLS7
Hi, Per JMSProviders.doc I have configured the Startup class and deployed the Simple MDB. The MDB gets instantiated but the Messages are not read from the MQSeries Queue. Why this might be happening and how should I go about debugging this. Your help
-
Cairngorm plugin download ?
Any way to get a ZIP of Cairngorm plugin for Eclipse binary distribution ? The company network firewall doesnt let me acces the Update site url :http://download.macromedia.com/pub/opensource/cairngorm/plugin I am surprised that I have to ask for it,
-
Finding Camera's Serial Number
How do I find the camera's serial number that is part of the information included in the picture's file info?