Output type - repeat authmatically
hi,
when i create PO, i need to click the button "repeat output" every time if i want to print it again. Any setting which i dont need to do that, and the output message will be displayed again after the first output is created. thanks
HI,
Why do you want to repeat the output all the time?..
In the Main Screen of Tcode ME9F, choose the "Processing Status" as "1 Successfully processed".
So that you can see the processed PO's also.. and take the print out again.
try
If you want it not to generate automatically everytime then goto NACT, here enter Application as "EF" and go to details of output type, here in "Default values" tab change Dispatch time to 3 i.e. Sent with application own transaction instead of 4 i.e. Send immediately.
Thanks & Regards,
Kiran
Similar Messages
-
Repeat Purchase Order Output Type - Auto Repeat
Hi,
Currently, when we create the Purchase Order the output type will be automatically generated in the message tab once the Purcahse Order is saved. In our Purchase Order process, we have using the function Purchase Order Online Approval and Purchase Order Auto-email to vendor once the Purchase Order is approved.
For the Purchase Auto-email to vendor, we have modified the output type program to enable the Purchase Order auto-email function to vendor once the Purchase Order and it's working successfully and teh email is based on the output type status.
Now we have problem when the approved Purchase Order is revised and requires the reapproval. Once the Purchase Order is reapproved there is no new output type is genereated and therefore now email is out to vendor.Need the expert advice how to configure to repeat the output type when the Purchase Order is reapproved.
Rgds
ZahariYou have to ensure all the changes that are print relevant are included in the following configuration. Basically you have specify the PO fields that are print relevant, which means any change on this field will trigger a new print out message.
Here is the configuration path
SPRO -> Material Management -> Purchasing -> Messages -> Fields Relevant to Printouts of changes -
Repeat Output-Type determination
Dear all,
We have a new output-type for printing invoices. Now we have to reprint a lot of "old" invoices with this new output-type.
Is there a possibility to repeat the output-type determination for a big quantity of invoices (like mass change)?
Thanks for your reply.
Best regards,
ThomasHi,
Use the T.Code "VF31" for this purpose.
Goto the T.Code "VF31".
Give the Output type.
Give the transmission medium.
Give the processing mode as "1" if it is for the first time.Else give the value as "2" for repeat processing.
Enter the sort order as "01".
Enter the billing document number range.
Regards,
Krishna. -
Output type for the managed codes cut letter is hard coded
Hello,
Very Good afternoon!
I have a requirement to create new Output Types for a Smart Form.
The already existing Output types are hard coded as shown Below :
CONSTANTS : c_kschl_order LIKE nast-kschl
VALUE 'ZUS0',
c_kschl_order1 LIKE nast-kschl
VALUE 'ZUS1',
Now they do not want to use ZUS1. Insted they wnat to use New Output Types.
u2022 Remove ZUS1 as we no longer use this one.
u2022 Add ZAU0
u2022 Add ZNZ0
u2022 Add ZJP0
u2022 Add ZCN0
u2022 Add ZKR0
How to add these Output types without Hardcoding as shown ABove.
Any Suggestions will be appreciated.....
For reference..I will paste the code of the Program here.
Here is the code :
PROGRAM DECLARATION
PROGRAM ID Z_RVADOR01_SALES_CUT_LETTER
TABLES: vbak, "Sales Document: Header Data
vbap, "Sales Document: Item Data
vbpa, "Sales Document: Partner
vbep, "Sales Document: Schedule Line Data
kna1, "General Data in Customer Master
MARA, "Material Master
KOMK, "Communicationarea for conditions
KOMP, "Communicationarea for conditions
KOMVD, "Communicationarea for conditions
VBCO3, "Communicationarea for view
VBDKA, "Headerview
VBDPA, "Itemview
VBDPAU, "Subitemnumbers
CONF_OUT, "Configuration data
SADR, "Addresses
TVAG, "Reason for rejection
VEDKA, "Servicecontract head data
VEDPA, "Servicecontract position data
VEDKN, "Servicecontract head notice data
VEDPN, "Servicecontract pos. notice data
RISERLS, "Serialnumbers
KOMSER, "Serialnumbers for print
TVBUR, "Sales office
TVKO, "Sales organisation
ADRS, "Communicationarea for Address
FPLTDR, "billing schedules
WTAD_ADDIS_IN_SO_PRINT, "additional
WTAD_BUYING_PRINT_EXTRA_TEXT, "texts belonging to additional
adrc,
adr6,
t247.
INCLUDE RVADTABL.
INCLUDE RVDIREKT.
INCLUDE VEDADATA.
data for access to central address maintenance
INCLUDE SDZAVDAT.
TYPE-POOLS: ADDI.
DATA PRICE_PRINT_MODE(1) TYPE C. "Print-mode
DATA: RETCODE LIKE SY-SUBRC. "Returncode
DATA: REPEAT(1) TYPE C.
DATA: XSCREEN(1) TYPE C. "Output on printer or screen
DATA: BEGIN OF STEU, "Controldata for output
VDKEX(1) TYPE C,
VDPEX(1) TYPE C,
KBKEX(1) TYPE C,
KBPEX(1) TYPE C,
END OF STEU.
DATA: BEGIN OF TVBDPA OCCURS 0. "Internal table for items
INCLUDE STRUCTURE VBDPA.
DATA: END OF TVBDPA.
DATA: BEGIN OF TKOMV OCCURS 50.
INCLUDE STRUCTURE KOMV.
DATA: END OF TKOMV.
DATA: BEGIN OF TKOMVD OCCURS 50.
INCLUDE STRUCTURE KOMVD.
DATA: END OF TKOMVD.
DATA: BEGIN OF TVBDPAU OCCURS 5.
INCLUDE STRUCTURE VBDPAU.
DATA: END OF TVBDPAU.
DATA: BEGIN OF TKOMCON OCCURS 50.
INCLUDE STRUCTURE CONF_OUT.
DATA: END OF TKOMCON.
DATA: BEGIN OF TKOMSERVH OCCURS 1.
INCLUDE STRUCTURE VEDKA.
DATA: END OF TKOMSERVH.
DATA: BEGIN OF TKOMSERVP OCCURS 5.
INCLUDE STRUCTURE VEDPA.
DATA: END OF TKOMSERVP.
DATA: BEGIN OF TKOMSERVHN OCCURS 5.
INCLUDE STRUCTURE VEDKN.
DATA: END OF TKOMSERVHN.
DATA: BEGIN OF TKOMSERVPN OCCURS 5.
INCLUDE STRUCTURE VEDPN.
DATA: END OF TKOMSERVPN.
DATA: BEGIN OF TKOMSER OCCURS 5.
INCLUDE STRUCTURE RISERLS.
DATA: END OF TKOMSER.
DATA: BEGIN OF TKOMSER_PRINT OCCURS 5.
INCLUDE STRUCTURE KOMSER.
DATA: END OF TKOMSER_PRINT.
DATA: BEGIN OF TFPLTDR OCCURS 5.
INCLUDE STRUCTURE FPLTDR.
DATA: END OF TFPLTDR.
DATA: TADDI_PRINT TYPE ADDI_SO_PRINT_ITAB WITH HEADER LINE.
TYPES:BEGIN OF ty_orders ,
xblnr LIKE mkpf-xblnr, "delivery number
erfmg LIKE mseg-erfmg, "goods issue quantity
custname LIKE kna1-name1, "customer name
bstnk LIKE vbak-bstnk, "purchase order number
ean11 LIKE vbap-ean11, "upc
kdmat LIKE vbap-kdmat, "customer material code
arktx LIKE vbap-arktx, "description
csrno LIKE kna1-kunnr, "customer service rep number
spras LIKE kna1-spras, "customer language key
csrname LIKE kna1-name1, "customer service rep name
csremail LIKE adr6-smtp_addr, "csr email
csrphone LIKE kna1-telf1, "csr telephone
csrext LIKE adrc-tel_extens, "csr extension
csrfax LIKE kna1-telfx, "csr fax
total LIKE lips-lfimg, "cut quantity
ldate(18) TYPE c,
END OF ty_orders.
CONSTANTS: c_kschl_order LIKE nast-kschl
VALUE 'ZUS0',
c_kschl_order1 LIKE nast-kschl
VALUE 'ZUS1', c_parvw_shipto LIKE vbpa-parvw
VALUE 'WE',
c_parvw_csr LIKE vbpa-parvw
VALUE 'ZS',
c_eng(1) TYPE c VALUE 'E',
c_sep(1) TYPE c VALUE '/',
c_sale(25) type c VALUE 'Sales Order'.
DATA: WA_VBAK TYPE VBAK,
tbl_ord TYPE ty_orders OCCURS 0 WITH HEADER LINE,
w_csrname(30) TYPE c,
w_csrno(30) TYPE c,
w_email LIKE adr6-smtp_addr,
f_shipto_found TYPE c,
w_custname(30) TYPE c,
w_month(2),
w_ldate(18),
w_total LIKE lips-lfimg,
w_lines TYPE i VALUE 0,
f_mail(1) TYPE c,
cnt_1 TYPE i VALUE 0,
cnt_2 TYPE i VALUE 0,
tbl_otf LIKE itcoo OCCURS 0 WITH HEADER LINE,
w_type(25) TYPE c,
st_doc_data LIKE sodocchgi1,
tbl_objtxt LIKE solisti1 OCCURS 10 WITH HEADER LINE,
tbl_line LIKE tline OCCURS 0 WITH HEADER LINE,
tbl_attach LIKE solisti1 OCCURS 10 WITH HEADER LINE,
tbl_objhead LIKE solisti1 OCCURS 10 WITH HEADER LINE,
tbl_proc_para LIKE soparai1 OCCURS 10 WITH HEADER LINE,
tbl_maillist LIKE somlreci1 OCCURS 10 WITH HEADER LINE,
tbl_pack_list LIKE sopcklsti1 OCCURS 10 WITH HEADER LINE,
tbl_cpo LIKE itcpo OCCURS 0 WITH HEADER LINE,"SAPscript output
" interface
tbl_cpp LIKE itcpp OCCURS 0 WITH HEADER LINE,"SAPscript output
" parameters
tbl_smtp TYPE szadr_adsmtp_line OCCURS 0 WITH HEADER LINE,
tbl_cdhdpos LIKE cdshw OCCURS 0 WITH HEADER LINE,
tbl_cdpos LIKE cdshw OCCURS 0 WITH HEADER LINE,
wrk_lines LIKE sy-tabix,
hltlines TYPE i,
off1 TYPE p,
fle1(2) TYPE p,
fle2(2) TYPE p,
htabix LIKE sy-tabix,
hfeld(500) TYPE c.
FORM ENTRY USING RETURN_CODE US_SCREEN.
if sy-tcode = 'VA01'.
IF nast-kschl = c_kschl_order.
SELECT SINGLE * FROM VBAK INTO WA_VBAK WHERE vbeln = nast-objky.
IF SY-SUBRC = 0.
CLEAR RETCODE.
XSCREEN = US_SCREEN.
PERFORM PROCESSING USING us_screen.
IF RETCODE NE 0.
RETURN_CODE = 1.
ELSE.
RETURN_CODE = 0.
ENDIF.
ELSE.
retcode = sy-subrc.
syst-msgid = 'ZVERROR'.
syst-msgno = '000'.
syst-msgty = 'E'.
syst-msgv1 = NAST-KSCHL.
syst-msgv1 = 'Sales Order cut letter
for this order already issued'.
syst-msgv2 = ' '.
PERFORM protocol_update.
ENDIF.
ELSE.
CLEAR retcode.
xscreen = us_screen.
PERFORM processing USING us_screen.
IF retcode NE 0.
return_code = 1.
ELSE.
return_code = 0.
ENDIF.
ENDIF.
endif.
ENDFORM.
FORM PROCESSING *
FORM PROCESSING USING proc_screen.
CASE nast-kschl.
WHEN c_kschl_order.
PERFORM get_orders.
CHECK retcode = 0.
PERFORM openform USING proc_screen vbak-landtx.
CHECK retcode = 0.
PERFORM layout.
CHECK retcode = 0.
CHECK proc_screen NE 'X'.
w_type = c_sale.
PERFORM send_email USING proc_screen.
WHEN c_kschl_order1.
PERFORM get_orders.
CHECK retcode = 0.
CHECK proc_screen NE 'X'.
w_type = c_sale.
PERFORM send_email USING proc_screen.
WHEN OTHERS.
retcode = 1.
syst-msgid = 'E0'.
syst-msgno = '430'.
syst-msgty = 'E'.
PERFORM protocol_update.
ENDCASE.
IF retcode EQ 0.
syst-msgid = '69'.
syst-msgno = '254'.
syst-msgty = 'S'.
syst-msgv1 = nast-kschl.
PERFORM protocol_update.
ELSE.
syst-msgid = 'CKCC'.
syst-msgno = '036'.
syst-msgty = 'E'.
PERFORM protocol_update.
ENDIF.
ENDFORM.
FORM PROTOCOL_UPDATE *
The messages are collected for the processing protocol. *
FORM PROTOCOL_UPDATE.
IF xscreen EQ space.
CALL FUNCTION 'NAST_PROTOCOL_UPDATE'
EXPORTING
MSG_ARBGB = SYST-MSGID
MSG_NR = SYST-MSGNO
MSG_TY = SYST-MSGTY
MSG_V1 = SYST-MSGV1
MSG_V2 = SYST-MSGV2
MSG_V3 = SYST-MSGV3
MSG_V4 = SYST-MSGV4
EXCEPTIONS
OTHERS = 1.
ELSE.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM.
*& Form get_orders
text
--> p1 text
<-- p2 text
FORM get_orders.
DATA : f_csr_found TYPE c.
SELECT SINGLE vbeln vkorg vdatu bstnk kunnr
FROM vbak
INTO (vbak-vbeln,vbak-vkorg,vbak-vdatu,vbak-bstnk,vbak-kunnr)
WHERE vbeln EQ nast-objky.
IF sy-subrc NE 0.
retcode = sy-subrc.
syst-msgid = 'VN'.
syst-msgno = '203'.
syst-msgty = 'E'.
syst-msgv1 = 'VBAK'.
syst-msgv2 = sy-subrc.
PERFORM protocol_update.
ENDIF.
SELECT vbeln posnr matnr pmatn arktx abgru kdmat werks
FROM vbap
INTO (vbap-vbeln,vbap-posnr,vbap-matnr,vbap-pmatn,
vbap-arktx,vbap-abgru,vbap-kdmat,vbap-werks)
WHERE vbeln = vbak-vbeln
AND abgru NE space "select items havng Rejection Reason
and PSTYV NE 'ZHDR'.
to check whether the reason for rejection was picked from the
managed codes tables
data: war_abgru type abgru,
w_exist type c.
clear : war_abgru, w_exist.
select single abgru from ZMAT_REJ002
into war_abgru
where vkorg = vbak-vkorg
and kunnr <> vbak-kunnr
and MATNR = vbap-matnr
and datef <= vbak-vdatu
and datet >= vbak-vdatu.
if sy-subrc <> 0.
select single abgru from ZMAT_REJ003
into war_abgru
where vkorg = vbak-vkorg
and kunnr <> vbak-kunnr
and MATNR = vbap-matnr
and datef <= vbak-vdatu
and datet >= vbak-vdatu.
if sy-subrc <> 0.
select single abgru from ZMAT_REJ001
into war_abgru
where vkorg = vbak-vkorg
and werks <> vbap-werks
and matnr = vbap-matnr
and datef <= vbak-vdatu
and datet >= vbak-vdatu.
if sy-subrc <> 0.
select single abgru from ZMAT_REJ004
into war_abgru
where vkorg = vbak-vkorg
and matnr = vbap-matnr
and datef >= vbak-vdatu
and datet <= vbak-vdatu.
if sy-subrc <> 0.
else.
w_exist = 'X'.
endif.
else.
w_exist = 'X'.
endif.
else.
w_exist = 'X'.
endif.
else.
w_exist = 'X'.
endif.
if w_exist = 'X'.
end for check from managed codes table
*to find the quantity fields
SELECT SINGLE wmeng bmeng
FROM vbep
INTO (vbep-wmeng,vbep-bmeng)
WHERE vbeln EQ vbap-vbeln
AND posnr EQ vbap-posnr.
*to get info about the customer
SELECT SINGLE kunnr
FROM vbpa
INTO vbpa-kunnr
WHERE vbeln EQ vbak-vbeln
AND parvw EQ c_parvw_shipto.
IF sy-subrc EQ 0.
f_shipto_found = 'X'.
SELECT SINGLE name1 spras
FROM kna1
INTO (kna1-name1,kna1-spras)
WHERE kunnr EQ vbpa-kunnr.
IF sy-subrc EQ 0.
w_custname = kna1-name1.
CLEAR kna1-name1.
ENDIF.
ENDIF.
SELECT SINGLE kunnr
FROM vbpa
INTO vbpa-kunnr
WHERE vbeln EQ vbak-vbeln
AND parvw EQ c_parvw_csr.
IF SY-SUBRC EQ 0.
f_csr_found = 'X'.
SELECT SINGLE kunnr name1 name2 adrnr
FROM kna1
INTO (kna1-kunnr,kna1-name1,kna1-name2,
kna1-adrnr)
WHERE kunnr EQ vbpa-kunnr.
IF sy-subrc EQ 0.
w_csrno = kna1-kunnr.
w_csrname = kna1-name1.
CLEAR kna1-name1.
SELECT SINGLE tel_number tel_extens fax_number
FROM adrc
INTO (adrc-tel_number,adrc-tel_extens,
adrc-fax_number)
WHERE addrnumber EQ kna1-adrnr.
CLEAR: adr6, w_email.
SELECT SINGLE * FROM adr6 WHERE addrnumber = kna1-adrnr.
IF sy-subrc = 0.
w_email = adr6-smtp_addr.
ENDIF.
ENDIF.
ENDIF.
*to get the date format in french
IF kna1-spras NE c_eng.
w_month = sy-datum+4(2).
SELECT SINGLE ltx
FROM t247
INTO t247-ltx
WHERE spras EQ kna1-spras
AND mnr EQ w_month.
CONCATENATE sy-datum+6(2)
t247-ltx
sy-datum+0(4)
INTO w_ldate
SEPARATED BY space.
ELSE.
CONCATENATE sy-datum+4(2)
sy-datum+6(2)
sy-datum+0(4)
INTO w_ldate
SEPARATED BY c_sep.
ENDIF.
w_total = vbep-wmeng - vbep-bmeng.
IF w_total GT 0.
PERFORM fill_orders.
ELSE.
IF vbap-abgru NE space.
w_total = vbep-wmeng.
PERFORM fill_orders.
ENDIF.
ENDIF.
CLEAR vbap.
endif. " check for w_exist for Managed Codes entry
ENDSELECT.
IF tbl_ord[] IS INITIAL.
retcode = 1.
syst-msgid = 'FZ'.
syst-msgno = '027'.
syst-msgty = 'E'.
PERFORM protocol_update.
ENDIF.
IF f_csr_found IS INITIAL.
syst-msgid = '8B'.
syst-msgno = '127'.
syst-msgty = 'W'.
syst-msgv1 = c_parvw_csr.
PERFORM protocol_update.
ENDIF.
IF f_shipto_found IS INITIAL.
syst-msgid = '8B'.
syst-msgno = '127'.
syst-msgty = 'W'.
syst-msgv1 = c_parvw_shipto.
PERFORM protocol_update.
ENDIF.
ENDFORM. " get_orders
*& Form layout
text
--> p1 text
<-- p2 text
FORM layout.
SORT tbl_ord BY bstnk kdmat.
LOOP AT tbl_ord.
AT FIRST.
PERFORM writeform_text.
ENDAT.
PERFORM writeform.
AT LAST.
PERFORM writeform_footer.
ENDAT.
ENDLOOP.
CLEAR : cnt_1,cnt_2.
PERFORM closeform.
ENDFORM. " layout
*& Form openform
text
FORM openform USING us_screen us_country.
DESCRIBE TABLE tbl_ord LINES w_lines.
IF w_lines EQ 0.
retcode = '1'.
syst-msgid = 'FE'.
syst-msgno = '078'.
syst-msgty = 'E'.
PERFORM protocol_update.
ENDIF.
CHECK retcode EQ 0.
INCLUDE zrvadopfo.
ENDFORM. " openform
*& Form send_email
text
-->P_PROC_SCREEN text
FORM send_email USING PROC_SCREEN.
f_mail = 'X'.
PERFORM openform USING proc_screen vbak-landtx.
LOOP AT tbl_ord.
AT FIRST.
PERFORM writeform_text.
ENDAT.
PERFORM writeform.
AT LAST.
PERFORM writeform_footer.
ENDAT.
ENDLOOP.
CLEAR cnt_2.
PERFORM closeform.
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF' "'ASCII'
IMPORTING
bin_filesize = st_doc_data-doc_size
TABLES
otf = tbl_otf
lines = tbl_line
EXCEPTIONS "DEVK912166
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
OTHERS = 4.
IF sy-subrc NE 0.
retcode = sy-subrc.
syst-msgid = 'OA'. "DEVK912166
syst-msgno = '186'. "DEVK912166
syst-msgty = 'E'. "DEVK912166
PERFORM protocol_update.
ENDIF.
REFRESH tbl_objtxt.
CLEAR tbl_objtxt.
CLEAR tbl_proc_para.
REFRESH tbl_proc_para.
CLEAR tbl_maillist.
REFRESH tbl_maillist.
CLEAR tbl_pack_list.
REFRESH tbl_pack_list.
st_doc_data-obj_name = 'Sales Order Cut Letter'.
st_doc_data-obj_langu = 'E'. "DEVK905849
st_doc_data-sensitivty = 'F'. "DEVK905849
st_doc_data-obj_prio = 1. "DEVK905849
CONCATENATE w_type 'Cut Letter' INTO "#EC NOTEXT
st_doc_data-obj_descr SEPARATED BY space.
DATA w_line(3) TYPE c.
PERFORM format_pdf. "DEVK905849
concatenate VBAK-VBELN '.PDF' into tbl_objhead.
tbl_objhead = 'Sales Order Cut Letter.PDF'.
APPEND tbl_objhead.
"DEVK905849
CLEAR wrk_lines.
DESCRIBE TABLE tbl_attach LINES wrk_lines.
fields needed for email
tbl_maillist-com_type = 'INT'.
tbl_maillist-receiver = w_email.
tbl_maillist-rec_type = 'U'.
APPEND tbl_maillist.
send email
CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
STARTING NEW TASK 'MAIL'
EXPORTING
document_data = st_doc_data
document_type = 'PDF'
COMMIT_WORK = 'X' " added after ECC6.0 upgrade
TABLES
object_header = tbl_objhead
object_content = tbl_objtxt
receivers = tbl_maillist
EXCEPTIONS "DEVK912166
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
OTHERS = 8
IF sy-subrc NE 0.
retcode = sy-subrc.
syst-msgid = 'ZA_G'. "DEVK912166
syst-msgno = '922'. "DEVK912166
syst-msgty = 'E'. "DEVK912166
syst-msgv1 = sy-subrc. "DEVK912166
syst-msgv2 = tbl_smtp-adsmtp-smtp_addr. "DEVK912166
PERFORM protocol_update.
syst-msgid = 'VW'.
syst-msgno = '001'.
syst-msgty = 'E'.
syst-msgv1 = 'Print successful:email Recepient Invalid'."#EC NOTEXT
PERFORM protocol_update.
ENDIF.
ENDFORM. " send_email
*& Form fill_orders
text
--> p1 text
<-- p2 text
FORM fill_orders.
tbl_ord-bstnk = vbak-bstnk.
tbl_ord-kdmat = vbap-kdmat.
tbl_ord-xblnr = vbak-vbeln.
tbl_ord-ean11 = vbap-pmatn.
tbl_ord-arktx = vbap-arktx.
tbl_ord-csrno = w_csrno .
tbl_ord-csremail = w_email.
tbl_ord-spras = kna1-spras .
tbl_ord-csrphone = adrc-tel_number.
tbl_ord-csrfax = adrc-fax_number.
tbl_ord-csrext = adrc-tel_extens.
tbl_ord-total = w_total.
tbl_ord-custname = w_custname.
tbl_ord-csrname = w_csrname .
tbl_ord-ldate = w_ldate.
APPEND tbl_ord.
CLEAR tbl_ord.
CLEAR w_total.
CLEAR w_ldate.
ENDFORM. " fill_orders
*& Form writeform_text
text
--> p1 text
<-- p2 text
FORM writeform_text.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'WTEXT'
window = 'WINDOW2'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
retcode = sy-subrc.
syst-msgid = 'EBR'.
syst-msgno = '056'.
syst-msgty = 'E'.
syst-msgv1 = 'WTEXT'.
syst-msgv2 = 'WINDOW2'.
PERFORM protocol_update.
ENDIF.
ENDFORM. " writeform_text
*& Form writeform
text
--> p1 text
<-- p2 text
FORM writeform.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'EMAIN'
window = 'MAIN'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
retcode = sy-subrc.
syst-msgid = 'EBR'.
syst-msgno = '056'.
syst-msgty = 'E'.
syst-msgv1 = 'WTEXT'.
syst-msgv2 = 'WINDOW2'.
PERFORM protocol_update.
ENDIF.
ENDFORM. " writeform
*& Form writeform_footer
text
--> p1 text
<-- p2 text
FORM writeform_footer.
IF nast-spras = 'N'.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'FOOTER'
window = 'MAIN'
EXCEPTIONS
element = 1
window = 2.
ENDIF.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'WFOOTER'
window = 'WINDOW12'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
retcode = sy-subrc.
syst-msgid = 'EBR'.
syst-msgno = '056'.
syst-msgty = 'E'.
syst-msgv1 = 'WFOOTER'.
syst-msgv2 = 'WINDOW12'.
PERFORM protocol_update.
ENDIF.
ENDFORM. " writeform_footer
*& Form closeform
text
--> p1 text
<-- p2 text
FORM closeform.
CALL FUNCTION 'CLOSE_FORM'
TABLES
otfdata = tbl_otf
EXCEPTIONS
unopened = 1
bad_pageformat_for_print = 2
OTHERS = 3.
IF sy-subrc NE 0.
retcode = sy-subrc.
syst-msgid = 'PS'.
syst-msgno = '005'.
syst-msgty = 'E'.
PERFORM protocol_update.
ENDIF.
ENDFORM. " closeform
*& Form format_pdf
text
--> p1 text
<-- p2 text
FORM format_pdf.
FIELD-SYMBOLS <fs>.
DESCRIBE TABLE tbl_line LINES hltlines.
DESCRIBE FIELD tbl_line LENGTH fle1 IN BYTE MODE . Defect#1579-
DESCRIBE FIELD tbl_objtxt LENGTH fle2 IN BYTE MODE . Defect#1579-
Start of Defect#1579+
DESCRIBE FIELD tbl_line LENGTH fle1 IN CHARACTER MODE.
DESCRIBE FIELD tbl_objtxt LENGTH fle2 IN CHARACTER MODE.
End of Defect#1579+
CLEAR tbl_objtxt.
REFRESH tbl_objtxt.
LOOP AT tbl_line.
htabix = sy-tabix.
MOVE tbl_line TO hfeld+off1.
IF htabix = hltlines.
fle1 = strlen( tbl_line ).
ENDIF.
off1 = off1 + fle1.
IF off1 GE fle2.
CLEAR tbl_objtxt.
tbl_objtxt = hfeld(fle2).
APPEND tbl_objtxt.
SHIFT hfeld BY fle2 PLACES.
off1 = off1 - fle2.
ENDIF.
IF htabix = hltlines.
IF off1 GT 0.
CLEAR tbl_objtxt.
tbl_objtxt = hfeld(off1).
APPEND tbl_objtxt.
ENDIF.
ENDIF.
ENDLOOP.
ENDFORM. " format_pdf
ANy Suggestion or help will be appreciated!
Regards,
Kittu
Edited by: Kittu on Jun 30, 2008 12:32 PMHello Julie Waller,
Very Good evening!
Thank you very much for your response!
Sometimes...I miss the basic things and start concentarcting on typical ways to fix the issue. ....which will only make my issue critical.
Hello Sathya,
Thank you for your response!
POints are rewarded..
Have a great day ahead!
Regards,
Kittu -
Debugging the program that will get triggered for a particular output type
Hi all,
I have one program,which will get triggered when a Sales order of type 'VOR' is created.Whenever 'VOR' order is created it will trigger the 'ZALT' output type.And this output type 'ZALT'has been configured to my program.This output type configuration has been set up by my functional consultant.
My problem is I created Sales order of type 'VOR'.But I want to debug my program,which has to be triggered because of that 'VOR' sales order type,which in turn triggers 'ZALT' output type and in turn triggers my program.
My problem is I created Sales order of type 'VOR' by keeping debugging point in my program.But it is not going to my program and simply displaying sales order has been saved.
So is the outtype has been configured properly?.Do I need to go to my functional consultant?Could anyone explain in this regard?
Rgds,
BalajiHi Balaji,
If possible, try to repeat the output in the output type messages screen of VA02 and change its dipatch time to '1'(Through further data). Now put the break point in the program assigned to output tye 'ZALT'(You can see this in the TNAPR table) and run the program RSNAST00 through SE38. The program will stop at the break point.
If its not possible to repeat the output and if you want to check it the first time the output type is processed, ask the functional consultant to change the dispatch time in the condition record that is being retrieved for proposing the output type to '1'. Now run RSNAST00. The program will stop at the breakpoint.
Thanks,
Vinay -
Hi,
I am trying to send a PO through EDI but I get a status of yellow.
I tried to repeat output for a successfully sent PO but even that gave a status of yellow.
I went to NACE to see the config but everything seems to be alright.
Can't figure out the reason.
Please help.
Thanks,
Sandeep.Hi,
check the following in sequence:
1. In the PO against the Output type you have to assign some Medium on the same line along with Parter fuction and Langu. What was assigned there is it ALE or something?
2. Check in the NACE transaction against that Output type, Print Program,Form what's the medium assigned.
In the above two cases also if you assigned something other than ALE medium if it is still coming as ALE then check in SPRO settings and in Condition records settings,
Some where it was fixed/assigned as ALE to take as Default.
reward if useful
regards,
Anji -
SAP std pgm to re-trigger selected output types associated with sales order
Hi,
Can anyone help me providing the standard SAP Program which will do repeat output action for different output types associated to the sales order.
Output Type
ZA00
ZA01
ZA10
ZA11
ZML0
ZRN0
ZSA0
ZSA1.
Thanks,
Ramya SanjanaHello Ramya Sanjana,
it's MAXDB/liveCache forum.
-> Do you have the MAXDB/liveCache issues?
-> What is the version of your system? SCM?
Regards, Natalia Khlopina -
Maintain archiving parameter(s) for output type RD00(appl.V3)
Hi Guys,
While trying to get the output for billing documents I'm facing a error : Maintain archiving parameter(s) for output type RD00 (appl.V3)
Diagnosis
At the time of output determination,the archiving parameters for output type RD00(application V3) were incorrectly maintained in customizing.
Additional information:
SAP object:
Archiving object:
Procedure
Maintain the archiving parameters and repeat output determination for the required document.
Expecting the solution.
Regards
Raj.Can you check what you have in the Storage System Tab in the fields Storage Mode and Document Type.
It should be Print Only and SDOINVOICE respectively.
Thanks -
Hello ,
I forgot to create a condition record for output type for sales orders........
Is there any program that I can retrigger the Output type now for existing orders?
Thanks and best regards
LHi,
Yes,you can process this output again by using the program "RSNAST0D".
Goto the T.Code "SE38".
Enter the program name as "RSNAST0D".
Enter the Application as "V1(If it is Sales)".
Enter the object Key as "00 followed by your Sales Order Number"(total should be 10 digits).
Enter the output type.
Select your appropriate Transaction medium.
Selection type as "2(Repeat processing)".
Execute.
For Billing,you can use the same program or the T.Code "VF31".
Regards,
Krishna. -
How to control the output types in PO MESSAGES
Hi Friends,
As per the requirement I need to control the message in Standard PO(ME22N). Scenario is like below.
1. I am modifying some field value in PO and saving it. Then clicking on MESSAGES tab. Now I am seeing some output types are adding in EDIT mode.
2. Requirement is , when ever user changed one particular filed(Order acknowledgement ) and saved it, then he doesnu2019t want to see the message in EDIT mode.
Could you please suggest me the way? Any user exit is there to reach this? Please do the needful.
Thanks,
Kumarhi,
its may be useful for u.
In the release strategy,if the indicator changeablity is 1 the system will not allow you to take repeat out put.
Solution is that you have to change the release indicator changeability to 6(SPRO>MM>Purchasing>Purchase order>Define release procedure for purchase order>Release indicator>Changeability).
Another option is that in the message output of the PO in further data change despatch time to 3 and take a repeat out put.
Also check,
SPRO > MM > PO > Release Procedure for PO > Release indicator > Changeability of Purchasing Document During/After Release as 2 for Release ID - G and save
And then Create go to chage mode of PO and repeat the messages
Regards,
venkat m -
Making Output type Default in Sales Order
Hi
I have an isses.
While creating sales order, the user does not want to add manually the output type (extras->output-> header->edit), he wants the things to be populated automatically as soon as SO is created.Can any one tell me how to do that?hi.
check this thread where some sugestions hv been given regarding this,
Re: Default output type
Also u can try this fm inside some exit or some badi
wa_nast is the workarea of nast type,
call function 'RV_MESSAGE_UPDATE_SINGLE'
exporting
msg_nast = wa_nast.
See other Fm's inside the function group of the above fm i think one of the fm's will do ur work.
I used the above fm mostly for repeat processing but never used it to creata a new entry but i think tht can be achived also.
Let me know in case of any issues.
кu03B1ятu03B9к -
How to not retriggered output type when changes are made in Purchase Order
Hi All,
Could you let me know how can I resolve this one?
We have a custom output type. Now this output type should NOT be automatically retriggered if a change is made to the document/purchase order. Currently the system automatically repeating the output type for every change made to the document/purchase order. But there is still an option for the user to be able to manually repeat the output.
TIAHi,
1.In order to restrict the output type to trigger you need to write the requirement routine in transaction
VOFM> requirements>output control.
2. create the requirement routine in application EF and write the required logic and pass the sy-subrc EQ 4 if you not require to trigger the output type and pass sy-subrc equal 0 to trigger the output type.
3. assign this requirement routine to custom output type. -
How can I Replay an output type BA01 on VA02
Hi All,
When a sales order V1 is created, OUTPUT type BA01 generates a smartform and in this code we fill in a table with spool data to generate a PDF. Yhis PDF is stored in specific table.
Manually we can generate VA02 --> EXTRA --> OUTPUT --> Header --> EDIR --> REPEAT OUTPUT a new BA01.
But we have to genearte a lot of!
If we know sales order number, do you know if it exists a program (Standard) or a function which allow us to create 'in masse' OUTPUT TYPE BA01?
Best regards
HenriNot sure of a standard program/FM doing this but try this sample code - fill in the correct values for your system where necessary. Obviously you will have to do this in a loop for multiple sales order numbers
TABLES: nast,
tnapr.
nast-kappl = 'V1'.
nast-spras = sy-langu.
nast-objky = vbeln. "Order number
" get output record
SELECT SINGLE *
FROM nast
WHERE objky = nast-objky AND
kschl = 'BA01' AND "Output type
kappl = nast-kappl AND
spras = nast-spras.
nast-nacha = '1'. "Printer (or whatever you use)
nast-ldest = 'PPPP'. "Printer number
" read configuration to find output program
SELECT SINGLE *
FROM tnapr
WHERE kschl = nast-kschl AND
nacha = '1' AND
kappl = nast-kappl.
" trigger output program
PERFORM (tnapr-ronam) IN PROGRAM (tnapr-pgnam) USING w_subrc
space.
IF w_subrc NE 0.
" handle error...
ELSE.
COMMIT WORK.
ENDIF. -
"change output" feature in output type configuration
Hi
I am trying to find a way of automatically triggering repeat output on change of delivery date in order.
In output type configuration-general data there is a are for change output the F1 helps reada like this "..........The routine in the program checks which changes should result in a changed output being sent. ......"
If anybody has worked on this functionality, please help me by giving any relevant input.
TIATake a copy of output requirement 014 and change the code to make it work for your delivery date. Output requirement 014 is provided in standard SAP for BV - cash sales. In cash sales, if the net value is changed, the output is automatically retriggered.
Remember the KOMKBV1 in the below code represents the sales orders communication structure. If you are doing this requirement for delivery document use KOMKBV2 and for billing document output determination use KOMKBV3.
***INCLUDE LV61B014 .
FORM KOBED_014 *
Requirement to create an new order confirmation / invoice when *
the net value is changed. *
FORM KOBED_014.
SY-SUBRC = 4.
If the net value has changed, resend the Output type RD03
IF KOMKBV1-NETWR NE *KOMKBV1-NETWR OR
*KOMKBV1-NETWR IS INITIAL.
SY-SUBRC = 0.
ENDIF.
ENDFORM.
FORM KOBEV_014 *
Reference to KOBED_014 *
FORM KOBEV_014.
PERFORM KOBED_014.
ENDFORM.
Thanks
Kapil Sharma -
Debugging routine for output type in purchase order
HI all,
I am unable to get breakpoint to stop at a custom requirement routine for a custom output type (ZSND) for purchase order.
I created routine 901 and explicitly add 'break userid' . In ME21N, it stops at the routine. In ME22N, it did not stop at the routine.
I like to it stop during ME22N. I tried adding the custom output in ME22N in Messages details, then save. It still did not stop at the custom routine. Can anyone pls shed lights how i can make it stop ? Or could it be that no output is generated during the ME22N changes, thus it would stop at that routine in ME22N ?
thanks
JoyceHello Joyce
The first output ZSND creates the ORDERS IDoc (ME21N). For this output type you obviously have assigned the VOFM condition (somewhere in the NACE transaction).
Changing the purchase order (ME22N) should create a different output type (-> ORDCHG IDoc). The first output ZSND must not be repeated (or it is defined to be set automatically only once).
Thus, there are two explanations for your observation:
(1) The output ZSND is not created a second time using ME22N
(2) The new output (-> ORDCHG) has not been assigned to the VOFM condition 901.
(1) you can test quite easily by adding the ZSND output manually in transaction ME22N.
(2) you need to check the output customizing.
Regards
Uwe
Maybe you are looking for
-
How do I import all my music into a fresh install of iTunes?
I just installed Windows 7 and iTunes and did something stupid. Before installing iTunes, I moved all my music files (completely intact as the "iTunes Music" folder) into the proper location on my C: drive so iTunes would detect them. But during the
-
How can I save song created in GarageBand as a MIDI file
Is this possible, I'm an old user of Cubase, and before SMPTETrack (someone remembers?) so Midi files are for me an obvious think. In GarageBand a new nice program for begginers and fans of music easily produced I found a little problems finding how
-
Using "v" function in row-level triggers
I have row-level triggers that do l_user := nvl(v('APP_USER'),user); to get the user that is running the app and record that in the table or wherever. Since it is a row-level trigger, the "v" function will be called for each and every row even though
-
How to ensure that the queries are in sync between Web browser and Bex
Hi All, I am struck with this issue for more than a month. Can someone help me in understanding this and resolving? Thanx!! "Ad hoc reports showing in web browser but not showing in BeX, if added to BeX then appearing twice on web browser" Edited b
-
Indesign CS6 einzelne Ecken runden?
Hallo, Versuche eine Quartett - Karte zu entwerfen und möchte einzelne Flächen ziehen und sie mit Rundungen versehen. Habe das Rechteck Werkzeug ausgewählt, ziehe eine Fläche und gehe oben rechts unter "Objektformat" auf "Formatoptionen", "Kontur und