Code of /SMB40/FM06P

Hi,
there is someone could post me the code of the program /SMB40/FM06P (print program for best-practice smartforms Request Order) ?
I have lost the source of the code during the upgrade from ECC 5.0 to ECC 6.0.
(the version of the ECC 5.0).
Thanks
Fred.

Hi Frederic Girod,
Here i'm sending the code for program /SMB40/FM06P.
Subroutine pool /SMB40/FM06P
  Smart Form Print Program                              *
*Data
INCLUDE /SMB40/FM06TOP.
Subroutines for the Print Program
INCLUDE /SMB40/FM06PE02.
program /smb40/fm06p message-id me.
type-pools:   addi, meein,
              mmpur.
tables: nast,                          "Messages
        *nast,                         "Messages
        tnapr,                         "Programs & Forms
        itcpo,                         "Communicationarea for Spool
        arc_params,                    "Archive parameters
        toa_dara,                      "Archive parameters
        addr_key.                      "Adressnumber for ADDRESS
type-pools szadr.
tables : varposr,
         rwerter,
         mtxh.
data  umbruch type i value 4.
data  headerflag.
data  begin of vartab occurs 15.
        include structure varposr.
data  end   of vartab.
data  tabn type i.
data  taba type i.
data  ebelph like ekpo-ebelp.
data  bis type i.
data  xmax type i.
data  tab like varposr-yzeile.
data  diff type i.
data  ldat_sam like eket-eindt.
data: s, v type i.
data: sampr like pekpov-netpr, varpr like pekpov-netpr.
Struktur zur Variantenbildung
data: begin of wertetab occurs 30.
        include structure rwerter.
data: atzhl like econf_out-atzhl,
      end of wertetab.
Interne Tabelle fuer Konditionen
data: begin of kond occurs 30.
        include structure komvd.
data: end of kond.
Hilfsfelder
data:
      merknamex(15) type c,            "Merkmalname x-Achse
      merknamey(15) type c,            "Merkmalname y-Achse
      merknrx like rwerter-nr,         "Int. Merkmal x-Achse
      merknry like rwerter-nr,         "Int. Merkmal y-Achse
      i type i value 1,
      nr like cawn-atinn.
data: inserterror(1),sum type i,menge type i,gsumh type i, xmaxh type i.
data: gsumv type i.
Matrixflag
data: m_flag value 'x'.
*- Tabellen -
tables: cpkme,
        ekvkp,
        ekko,
        pekko,
        rm06p,
        ekpo,
        pekpo,
        pekpov,
        pekpos,
        eket,
        ekek,
        ekes,
        ekeh,
        ekkn,
        ekpa,
        ekbe,
        eine, *eine,
        lfa1,
        likp,
       *lfa1,
        kna1,
        komk,
        komp,
        komvd,
        ekomd,
        econf_out,
        thead, *thead,
        sadr,
        mdpa,
        mdpm,
        mkpf,
        tinct,
        ttxit,
        tmsi2,
        tq05,
        tq05t,
        t001,
        t001w,
        t006, *t006,
        t006a, *t006a,
        t024,
        t024e,
        t027a,
        t027b,
        t052,
        t161n,
        t163d,
        t166a,
        t165p,
        t166c,
        t166k,
        t166p,
        t166t,
        t166u,
        t165m,
        t165a,
        tmamt,
       *mara,                          "HTN 4.0C
        mara,
        marc,
        mt06e,
        makt,
        vbak,
        vbkd,
       *vbkd,
        vbap.
tables: drad,
        drat.
tables: addr1_sel,
        addr1_val.
tables: v_htnm, rampl,tmppf.           "HTN-Abwicklung
tables: stxh.              "schnellerer Zugriff auf Texte Dienstleistung
tables: t161.              "Abgebotskennzeichen für Dienstleistung
*- INTERNE TABELLEN -
*- Tabelle der Positionen -
data: begin of xekpo occurs 10.
        include structure ekpo.
data:     bsmng like ekes-menge,
      end of xekpo.
*- Key für xekpo -
data: begin of xekpokey,
         mandt like ekpo-mandt,
         ebeln like ekpo-ebeln,
         ebelp like ekpo-ebelp,
      end of xekpokey.
*- Tabelle der Einteilungen -
data: begin of xeket occurs 10.
        include structure eket.
data:     fzete like pekpo-wemng,
      end of xeket.
*- Tabelle der Einteilungen temporär -
data: begin of teket occurs 10.
        include structure beket.
data: end of teket.
data: begin of zeket.
        include structure eket.
data:  end of zeket.
*- Tabelle der Positionszusatzdaten -
data: begin of xpekpo occurs 10.
        include structure pekpo.
data: end of xpekpo.
*- Tabelle der Positionszusatzdaten -
data: begin of xpekpov occurs 10.
        include structure pekpov.
data: end of xpekpov.
*- Tabelle der Zahlungbedingungen----
data: begin of zbtxt occurs 5,
         line(50),
      end of zbtxt.
*- Tabelle der Merkmalsausprägungen -
data: begin of tconf_out occurs 50.
        include structure econf_out.
data: end of tconf_out.
*- Tabelle der Konditionen -
data: begin of tkomv occurs 50.
        include structure komv.
data: end of tkomv.
data: begin of tkomk occurs 1.
        include structure komk.
data: end of tkomk.
data: begin of tkomvd occurs 50.       "Belegkonditionen
        include structure komvd.
data: end of tkomvd.
data: begin of tekomd occurs 50.       "Stammkonditionen
        include structure ekomd.
data: end of tekomd.
*- Tabelle der Bestellentwicklung -
data: begin of xekbe occurs 10.
        include structure ekbe.
data: end of xekbe.
*- Tabelle der Bezugsnebenkosten -
data: begin of xekbz occurs 10.
        include structure ekbz.
data: end of xekbz.
*- Tabelle der WE/RE-Zuordnung -
data: begin of xekbez occurs 10.
        include structure ekbez.
data: end of xekbez.
*- Tabelle der Positionssummen der Bestellentwicklung -
data: begin of tekbes occurs 10.
        include structure ekbes.
data: end of tekbes.
*- Tabelle der Bezugsnebenkosten der Bestandsführung -
data: begin of xekbnk occurs 10.
        include structure ekbnk.
data: end of xekbnk.
- Tabelle für Kopieren Positionstexte (hier wegen Infobestelltext) ---
data: begin of xt165p occurs 10.
        include structure t165p.
data: end of xt165p.
*- Tabelle der Kopftexte -
data: begin of xt166k occurs 10.
        include structure t166k.
data: end of xt166k.
*- Tabelle der Positionstexte -
data: begin of xt166p occurs 10.
        include structure t166p.
data: end of xt166p.
*- Tabelle der Anahngstexte -
data: begin of xt166a occurs 10.
        include structure t166a.
data: end of xt166a.
*- Tabelle der Textheader -
data: begin of xthead occurs 10.
        include structure thead.
data: end of xthead.
data: begin of xtheadkey,
         tdobject like thead-tdobject,
         tdname like thead-tdname,
         tdid like thead-tdid,
      end of xtheadkey.
data: begin of qm_text_key occurs 5,
         tdobject like thead-tdobject,
         tdname like thead-tdname,
         tdid like thead-tdid,
         tdtext like ttxit-tdtext,
      end of qm_text_key.
*- Tabelle der Nachrichten alt/neu -
data: begin of xnast occurs 10.
        include structure nast.
data: end of xnast.
data: begin of ynast occurs 10.
        include structure nast.
data: end of ynast.
*------ Struktur zur Übergabe der Adressdaten -
data:    begin of addr_fields.
        include structure sadrfields.
data:    end of addr_fields.
*------ Struktur zur Übergabe der Adressreferenz -
data:    begin of addr_reference.
        include structure addr_ref.
data:    end of addr_reference.
*------ Tabelle zur Übergabe der Fehler -
data:    begin of error_table occurs 10.
        include structure addr_error.
data:    end of error_table.
*------ Tabelle zur Übergabe der Adressgruppen -
data:    begin of addr_groups occurs 3.
        include structure adagroups.
data:    end of addr_groups.
*- Tabelle der Aenderungsbescheibungen -
data: begin of xaend occurs 10,
         ebelp like ekpo-ebelp,
         zekkn like ekkn-zekkn,
         etenr like eket-etenr,
         ctxnr like t166c-ctxnr,
         rounr like t166c-rounr,
         insert,
         flag_adrnr,
      end of xaend.
data: begin of xaendkey,
         ebelp like ekpo-ebelp,
         zekkn like ekkn-zekkn,
         etenr like eket-etenr,
         ctxnr like t166c-ctxnr,
         rounr like t166c-rounr,
         insert,
         flag_adrnr,
      end of xaendkey.
*- Tabelle der Textänderungen -
data: begin of xaetx occurs 10,
         ebelp like ekpo-ebelp,
         textart like cdshw-textart,
         chngind like cdshw-chngind,
      end of xaetx.
*- Tabelle der geänderten Adressen -
data: begin of xadrnr occurs 5,
         adrnr like sadr-adrnr,
         tname like cdshw-tabname,
         fname like cdshw-fname,
      end of xadrnr.
*- Tabelle der gerade bearbeiteten aktive Komponenten -
data begin of mdpmx occurs 10.
        include structure mdpm.
data end of mdpmx.
*- Tabelle der gerade bearbeiteten Sekundärbedarfe -
data begin of mdsbx occurs 10.
        include structure mdsb.
data end of mdsbx.
*- Struktur des Archivobjekts -
data: begin of xobjid,
        objky  like nast-objky,
        arcnr  like nast-optarcnr,
      end of xobjid.
Struktur für zugehörigen Sammelartikel
data: begin of sekpo.
        include structure ekpo.
data:   first_varpos,
      end of sekpo.
*- Struktur für Ausgabeergebnis zB Spoolauftragsnummer -
data: begin of result.
        include structure itcpp.
data: end of result.
*- Struktur für Internet NAST -
data: begin of intnast.
        include structure snast.
data: end of intnast.
*- HTN-Abwicklung
data: begin of htnmat occurs 0.
        include structure v_htnm.
data:  revlv like rampl-revlv,
      end of htnmat.
data  htnamp like rampl  occurs 0 with header line.
*- Hilfsfelder -
data: hadrnr(8),                       "Key TSADR
      elementn(30),                    "Name des Elements
      save_el(30),                     "Rettfeld für Element
      retco like sy-subrc,             "Returncode Druck
      insert,                          "Kz. neue Position
      h-ind like sy-tabix,             "Hilfsfeld Index
      h-ind1 like sy-tabix,            "Hilfsfeld Index
      f1 type f,                       "Rechenfeld
      h-menge like ekpo-menge,         "Hilfsfeld Mengenumrechnung
      h-meng1 like ekpo-menge,         "Hilfsfeld Mengenumrechnung
      h-meng2 like ekpo-menge,         "Hilfsfeld Mengenumrechnung
      ab-menge like ekes-menge,        "Hilfsfeld bestätigte Menge
      kzbzg like konp-kzbzg,           "Staffeln vorhanden?
      hdatum like eket-eindt,          "Hilfsfeld Datum
      hmahnz like ekpo-mahnz,          "Hilfsfeld Mahnung
      addressnum like ekpo-adrn2,      "Hilfsfeld Adressnummer
      tablines like sy-tabix,          "Zähler Tabelleneinträge
      entries  like sy-tfill,          "Zähler Tabelleneinträge
      hstap,                           "statistische Position
      hsamm,                           "Positionen mit Sammelartikel
      hloep,                           "Gelöschte Positionen im Spiel
      hkpos,                           "Kondition zu löschen
      kopfkond,                        "Kopfkonditionen vorhanden
      no_zero_line,                    "keine Nullzeilen
      xdrflg like t166p-drflg,         "Hilfsfeld Textdruck
      xprotect,                        "Kz. protect erfolgt
      archiv_object like toa_dara-ar_object, "für opt. Archivierung
      textflag,                        "Kz. druckrel. Positionstexte
      flag,                            "allgemeines Kennzeichen
      spoolid(10),                     "Spoolidnummer
      xprogram like sy-repid,          "Programm
      lvs_recipient like swotobjid,    "Internet
      lvs_sender like swotobjid,       "Internet
      timeflag,                        "Kz. Uhrzeit bei mind. 1 Eint.
      h_vbeln like vbak-vbeln,
      h_vbelp like vbap-posnr.
*- Drucksteuerung -
data: aendernsrv.
data: xdruvo.                          "Druckvorgang
data: neu  value '1',                  "Neudruck
      aend value '2',                  "Änderungsdruck
      mahn value '3',                  "Mahnung
      absa value '4',                  "Absage
      lpet value '5',                  "Lieferplaneinteilung
      lpma value '6',                  "Mahnung Lieferplaneinteilung
      aufb value '7',                  "Auftragsbestätigung
      lpae value '8',                  "Änderung Lieferplaneinteilung
      lphe value '9',                  "Historisierte Einteilungen
      preisdruck,                      "Kz. Gesamtpreis drucken
      kontrakt_preis,                  "Kz. Kontraktpreise drucken
      we   value 'E'.                  "Wareneingangswert
*- Hilfsfelder Lieferplaneinteilung -
data:
      xlpet,                           "Lieferplaneinteilung
      xfz,                             "Fortschrittszahlendarstellung
      xoffen,                          "offene WE-Menge
      xlmahn,                          "Lieferplaneinteilungsmahnung
      fzflag,                          "KZ. Abstimmdatum erreicht
      xnoaend,                         "keine Änderungsbelege da  LPET
      xetdrk,                        "Druckrelevante Positionen da LPET
      xetefz like eket-menge,          "Einteilungsfortschrittszahl
      xwemfz like eket-menge,          "Lieferfortschrittszahl
      xabruf like ekek-abruf,          "Alter Abruf
      p_abart like ekek-abart.         "Abrufart
*data: sum-euro-price like komk-fkwrt.                       "302203
data: sum-euro-price like komk-fkwrt_euro.                  "302203
data: euro-price like ekpo-effwr.
*- Hilfsfelder für Ausgabemedium -
data: xdialog,                         "Kz. POP-UP
      xscreen,                         "Kz. Probeausgabe
      xformular like tnapr-fonam,      "Formular
      xdevice(10).                     "Ausgabemedium
*- Hilfsfelder für QM -
data: qv_text_i like tq09t-kurztext,   "Bezeichnung Qualitätsvereinb.
      tl_text_i like tq09t-kurztext,   "Bezeichnung Technische Lieferb.
      zg_kz.                           "Zeugnis erforderlich
*- Hilfsfelder für Änderungsbeleg -
data: objectid              like cdhdr-objectid,
      tcode                 like cdhdr-tcode,
      planned_change_number like cdhdr-planchngnr,
      utime                 like cdhdr-utime,
      udate                 like cdhdr-udate,
      username              like cdhdr-username,
      cdoc_planned_or_real  like cdhdr-change_ind,
      cdoc_upd_object       like cdhdr-change_ind value 'U',
      cdoc_no_change_pointers like cdhdr-change_ind.
*- Common-Part für Änderungsbeleg -
*include zzfm06lccd.
data:    begin of common part fm06lccd.
*------- Tabelle der Änderunsbelegzeilen (temporär) -
data: begin of edit occurs 50.             "Änderungsbelegzeilen temp.
        include structure cdshw.
data: end of edit.
data: begin of editd occurs 50.             "Änderungsbelegzeilen temp.
        include structure cdshw.            "für Dienstleistungen
data: end of editd.
*------- Tabelle der Änderunsbelegzeilen (Ausgabeform) -
data: begin of ausg occurs 50.             "Änderungsbelegzeilen
        include structure cdshw.
data:   changenr like cdhdr-changenr,
        udate    like cdhdr-udate,
        utime    like cdhdr-utime,
      end of ausg.
*------- Tabelle der Änderunsbelegköpfe -
data: begin of icdhdr occurs 50.           "Änderungbelegköpfe
        include structure cdhdr.
data: end of icdhdr.
*------- Key Tabelle der Änderunsbelegköpfe -
data: begin of hkey,                       "Key für ICDHDR
        mandt like cdhdr-mandant,
        objcl like cdhdr-objectclas,
        objid like cdhdr-objectid,
        chang like cdhdr-changenr,
      end of hkey.
*------- Key der geänderten Tabelle für Ausgabe -
data: begin of ekkey,                    "Tabellenkeyausgabe
        ebeln like ekko-ebeln,
        ebelp like ekpo-ebelp,
        zekkn like ekkn-zekkn,
        etenr like eket-etenr,
        abruf like ekek-abruf,
        ekorg like ekpa-ekorg,           "Änderungsbelege Partner
        ltsnr like ekpa-ltsnr,           "Änderungsbelege Partner
        werks like ekpa-werks,           "Änderungsbelege Partner
        parvw like ekpa-parvw,           "Änderungsbelege Partner
        parza like ekpa-parza,           "Änderungsbelege Partner
        consnumber like adr2-consnumber, "Änderungsbelege Adressen
        comm_type  like adrt-comm_type,  "Änderungsbelege Adressen
      end of ekkey.
data:    end of common part.
*- Direktwerte -
         Direktwerte                                                 *
*------- Werte zu Trtyp und Aktyp:
constants:  hin value 'H',             "Hinzufuegen
            ver value 'V',             "Veraendern
            anz value 'A',             "Anzeigen
            erw value 'E'.             "Bestellerweiterung
constants:
BSTYP
  bstyp-info value 'I',
  bstyp-ordr value 'W',
  bstyp-banf value 'B',
  bstyp-best value 'F',
  bstyp-anfr value 'A',
  bstyp-kont value 'K',
  bstyp-lfpl value 'L',
  bstyp-lerf value 'Q',
BSAKZ
  bsakz-norm value ' ',
  bsakz-tran value 'T',
  bsakz-rahm value 'R',
BSAKZ-BEIS VALUE 'B',  "not used
BSAKZ-KONS VALUE 'K',  "not used
BSAKZ-LOHN VALUE 'L', "not used
BSAKZ-STRE VALUE 'S', "not used
BSAKZ-MENG VALUE 'M', "not used
BSAKZ-WERT VALUE 'W', "not used
PSTYP
  pstyp-lagm value '0',
  pstyp-blnk value '1',
  pstyp-kons value '2',
  pstyp-lohn value '3',
  pstyp-munb value '4',
  pstyp-stre value '5',
  pstyp-text value '6',
  pstyp-umlg value '7',
  pstyp-wagr value '8',
  pstyp-dien value '9',
Kzvbr
  kzvbr-anla value 'A',
  kzvbr-unbe value 'U',
  kzvbr-verb value 'V',
  kzvbr-einz value 'E',
  kzvbr-proj value 'P',
ESOKZ
  esokz-pipe value 'P',
  esokz-lohn value '3',
  esokz-konsi value '2',               "konsi
  esokz-charg value '1',               "sc-jp
  esokz-norm value '0'.
constants:
Handling von Unterpositionsdaten
       sihan-nix  value ' ',           "keine eigenen Daten
       sihan-anz  value '1', "Daten aus Hauptposition kopiert, nicht änd
       sihan-kop  value '2', "Daten aus Hauptposition kopiert, aber ände
       sihan-eig  value '3'. "eigene Daten (nicht aus Hauptposition kopi
Unterpositionstypen
constants:
  uptyp-hpo value ' ',                 "Hauptposition
  uptyp-var value '1',                 "Variante
  uptyp-nri value '2',           "Naturalrabatt Inklusive (=Dreingabe)
  uptyp-ler value '3',                 "Leergut
  uptyp-nre value '4',           "Naturalrabatt Exklusive (=Draufgabe)
  uptyp-lot value '5',                 "Lot Position
  uptyp-dis value '6',                 "Display Position
  uptyp-vks value '7',                 "VK-Set Position
  uptyp-mpn value '8',                 "Austauschposition (A&D)
  uptyp-sls value '9',           "Vorkommisionierungsposition (retail)
  uptyp-div value 'X'.           "HP hat UP's mit verschiedenen Typen
Artikeltypen
constants:
  attyp-sam(2) value '01',             "Sammelartikel
  attyp-var(2) value '02',             "Variante
  attyp-we1(2) value '20',             "Wertartikel
  attyp-we2(2) value '21',             "Wertartikel
  attyp-we3(2) value '22',             "Wertartikel
  attyp-vks(2) value '10',             "VK-Set
  attyp-lot(2) value '11',             "Lot-Artikel
  attyp-dis(2) value '12'.             "Display
Konfigurationsherkunft
constants:
  kzkfg-fre value ' ',                 "Konfiguration sonst woher
  kzkfg-kan value '1',                 "noch nicht konfiguriert
  kzkfg-eig value '2'.                 "Eigene Konfiguration
constants:
  c_ja   type c value 'X',
  c_nein type c value ' '.
Vorgangsart, welche Anwendung den Fkt-Baustein aufruft
constants:
  cva_ab(1) value 'B',     "Automatische bestellung (aus banfen)
  cva_we(1) value 'C',                 "Wareneingang
  cva_bu(1) value 'D',     "Übernahme bestellungen aus fremdsystem
  cva_au(1) value 'E',                 "Aufteiler
  cva_kb(1) value 'F',                 "Kanban
  cva_fa(1) value 'G',                 "Filialauftrag
  cva_dr(1) value 'H',                                      "DRP
  cva_en(1) value '9',                 "Enjoy
  cva_ap(1) value '1',                                      "APO
  cva_ed(1) value 'T'.     "EDI-Eingang Auftragsbestätigung Update Preis
Status des Einkaufsbeleges (EKKO-STATU)
constants:
  cks_ag(1) value 'A',                 "Angebot vorhanden für Anfrage
  cks_ab(1) value 'B',     "Automatische Bestellung (aus Banfen) ME59
  cks_we(1) value 'C',                 "Bestellung aus Wareneingang
  cks_bu(1) value 'D',                 "Bestellung aus Datenübernahme
  cks_au(1) value 'E',     "Bestellung aus Aufteiler (IS-Retail)
  cks_kb(1) value 'F',                 "Bestellung aus Kanban
  cks_fa(1) value 'G',     "Bestellung aus Filialauftrag (IS-Retail)
  cks_dr(1) value 'H',                 "Bestellung aus DRP
  cks_ba(1) value 'I',                 "Bestellung aus BAPI
  cks_al(1) value 'J',                 "Bestellung aus ALE-Szenario
  cks_sb(1) value 'S',                 "Sammelbestellung (IS-Retail)
  cks_ap(1) value '1',                                      "APO
  cks_en(1) value '9',                 "Enjoy Bestellung
  cks_fb(1) value 'X'.                 "Bestellung aus Funktionsbaustein
Vorgang aus T160
constants:
  vorga-angb(2) value 'AG',   "Angebot zur Anfrage    ME47, ME48
  vorga-lpet(2) value 'LE',   "Lieferplaneinteilung   ME38, ME39
  vorga-frge(2) value 'EF',   "Einkaufsbelegfreigabe  ME28, ME35, ME45
  vorga-frgb(2) value 'BF',   "Banffreigabe           ME54, ME55
  vorga-bgen(2) value 'BB',            "Best. Lief.unbekannt   ME25
  vorga-anha(2) value 'FT',   "Textanhang             ME24, ME26,...
  vorga-banf(2) value 'B ',   "Banf                   ME51, ME52, ME53
  vorga-anfr(2) value 'A ',   "Anfrage                ME41, ME42, ME43
  vorga-best(2) value 'F ',   "Bestellung             ME21, ME22, ME23
  vorga-kont(2) value 'K ',   "Kontrakt               ME31, ME32, ME33
  vorga-lfpl(2) value 'L ',   "Lieferplan             ME31, ME32, ME33
  vorga-mahn(2) value 'MA',            "Liefermahnung          ME91
  vorga-aufb(2) value 'AB'.            "Bestätigungsmahnung    ME92
Felder für Feldauswahl (früher FMMEXCOM)
data:       endmaske(210) type c,
            kmaske(140) type c,
            auswahl0 type brefn,
            auswahl1 type brefn,
            auswahl2 type brefn,
            auswahl3 type brefn,
            auswahl4 type brefn,
            auswahl5 type brefn,
            auswahl6 type brefn.
Sonderbestandskennzeichen
constants:
  sobkz-kdein value 'E',               "Kundeneinzel
  sobkz-prein value 'Q',               "Projekteinzel
  sobkz-lohnb value 'O'.               "Lohnbearbeiterbeistell
Min-/Maxwerte für Datenelemente
constants:
offener Rechnungseingangswert / Feldlänge: 13 / Dezimalstellen: 2
  c_max_orewr       like rm06a-orewr   value '99999999999.99',
  c_max_orewr_f     type f             value '99999999999.99',
  c_max_orewr_x(15) type c             value '**************',
  c_max_proz_p(3)   type p decimals 2  value '999.99',          "@80545
  c_max_proz_x(6)   type c             value '******',          "@80545
  c_max_menge       like ekpo-menge  value '9999999999.999',    "@83886
  c_max_menge_f     type f           value '9999999999.999',    "@83886
  c_max_netwr       like ekpo-netwr  value '99999999999.99',    "@83886
  c_max_netwr_f     type f           value '99999999999.99'.    "@83886
Distribution Indicator Account assignment
constants:
  c_dist_ind-single   value ' ',       "no multiple = single
  c_dist_ind-quantity value '1',       "quantity distribution
  c_dist_ind-percent  value '2'.       "percentag
Datendefinitionen für Dienstleistungen
tables: eslh,
        esll,
        ml_esll,
        rm11p.
data  begin of gliederung occurs 50.
        include structure ml_esll.
data  end   of gliederung.
data  begin of leistung occurs 50.
        include structure ml_esll.
data  end   of leistung.
data  return.
*- interne Tabelle für Abrufköpfe -
data: begin of xekek          occurs 20.
        include structure iekek.
data: end of xekek.
*- interne Tabelle für Abrufköpfe alt----
data: begin of pekek          occurs 20.
        include structure iekek.
data: end of pekek.
*- interne Tabelle für Abrufeinteilungen -
data: begin of xekeh          occurs 20.
        include structure iekeh.
data: end of xekeh.
*- interne Tabelle für Abrufeinteilungen -
data: begin of tekeh          occurs 20.
        include structure iekeh.
data: end of tekeh.
*- Zusatztabelle Abruf nicht vorhanden XEKPO----
data: begin of xekpoabr occurs 20,
         mandt like ekpo-mandt,
         ebeln like ekpo-ebeln,
         ebelp like ekpo-ebelp,
      end of xekpoabr.
*-- Daten Hinweis 39234 -
*- Hilfstabelle Einteilungen -
data: begin of heket occurs 10.
        include structure eket.
data:       tflag like sy-calld,
      end of heket.
*- Key für HEKET -
data: begin of heketkey,
         mandt like eket-mandt,
         ebeln like eket-ebeln,
         ebelp like eket-ebelp,
         etenr like eket-etenr,
      end of heketkey.
data: h_subrc like sy-subrc,
      h_tabix like sy-tabix,
      h_field like cdshw-f_old,
      h_eindt like rvdat-extdatum.
data  z type i.
Defintionen für Formeln
type-pools msfo.
data: variablen type msfo_tab_variablen with header line.
data: formel type msfo_formel.
Definition für Rechnungsplan
data: tfpltdr like fpltdr occurs 0 with header line.
data: fpltdr like fpltdr.
Definiton Defaultschema für Dienstleistung
constants: default_kalsm like t683-kalsm value 'MS0000',
           default_kalsm_stamm like t683-kalsm value 'MS0001'.
data: bstyp like ekko-bstyp,
      bsart like ekko-bsart.
data dkomk like komk.
Defintion für Wartungsplan
tables: rmipm.
data: mpos_tab like mpos occurs 0 with header line,
      zykl_tab like mmpt occurs 0 with header line.
data: print_schedule.
data: begin of d_tkomvd occurs 50.
        include structure komvd.
data: end of d_tkomvd.
data: begin of d_tkomv occurs 50.
        include structure komv.
data: end of d_tkomv.
Definition Drucktabellen blockweises Lesen
data: leistung_thead like stxh occurs 1 with header line.
data: gliederung_thead like stxh occurs 1 with header line. "HS
data: begin of thead_key,
        mandt    like sy-mandt,
        tdobject like stxh-tdobject,
        tdname   like stxh-tdname,
        tdid     like stxh-tdid,
        tdspras  like stxh-tdspras.
data: end of thead_key.
ranges: r1_tdname for stxh-tdname,
        r2_tdname for stxh-tdname.
data: begin of doktab occurs 0.
        include structure drad.
data  dktxt like drat-dktxt.
data: end of doktab.
Additionals Tabelle (CvB/4.0c)
data: l_addis_in_orders type line of addi_buying_print_itab
                                        occurs 0 with header line.
Die Additionals-Strukturen müssen bekannt sein
tables: wtad_buying_print_addi, wtad_buying_print_extra_text.
data: ls_print_data_to_read type lbbil_print_data_to_read.
data: ls_bil_invoice type lbbil_invoice.
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,
      dunwitheket           type xfeld.
data: l_zekko                  like ekko,
      l_xpekko                 like pekko,
      l_xekpo                like table of ekpo,
      l_wa_xekpo             like ekpo.
data: l_xekpa like ekpa occurs 0,
      l_wa_xekpa like ekpa.
data: l_xpekpo  like pekpo occurs 0,
      l_wa_xpekpo like pekpo,
      l_xeket   like table of eket with header line,
      l_xekkn  like table of ekkn with header line,
      l_xekek  like table of ekek with header line,
      l_xekeh   like table of ekeh with header line,
      l_xkomk like table of komk with header line,
      l_xtkomv  type komv occurs 0,
      l_wa_xtkomv type komv.
data   ls_ssfcompop  type     ssfcompop.
*&  Include           /SMB40/FM06PE02
*&      Form  GET_PLANT_ADDRESS
FORM get_plant_address USING    p_werks LIKE t001w-werks
                       CHANGING p_adrnr
                                p_sadr  LIKE sadr.
parameter P_ADRNR without type since there are several address
fields with different domains
  DATA: l_ekko LIKE ekko,
        l_address LIKE addr1_val.
  CHECK NOT p_werks IS INITIAL.
  l_ekko-reswk = p_werks.
  l_ekko-bsakz = 'T'.
  CALL FUNCTION 'MM_ADDRESS_GET'
    EXPORTING
      i_ekko    = l_ekko
    IMPORTING
      e_address = l_address
      e_sadr    = p_sadr.
  p_adrnr = l_address-addrnumber.
ENDFORM.                    " GET_PLANT_ADDRESS
*&      Form  GET_CUSTOMER_ADDRESS
FORM get_customer_address USING    p_kunnr LIKE ekpo-kunnr
                          CHANGING p_adrnr.
parameter P_ADRNR without type since there are several address
fields with different domains
  DATA: l_adrnr LIKE kna1-adrnr.
  CHECK NOT p_kunnr IS INITIAL.
  SELECT SINGLE adrnr FROM  kna1 INTO (l_adrnr)
         WHERE  kunnr  = p_kunnr.
  IF sy-subrc EQ 0.
    p_adrnr = l_adrnr.
  ELSE.
    CLEAR p_adrnr.
  ENDIF.
ENDFORM.                    " GET_CUSTOMER_ADDRESS
*&      Form  GET_VENDOR_ADDRESS
FORM get_vendor_address USING    p_emlif LIKE lfa1-lifnr
                        CHANGING p_adrnr.
parameter P_ADRNR without type since there are several address
fields with different domains
  DATA: l_lfa1 LIKE lfa1.
  CHECK NOT p_emlif IS INITIAL.
  CALL FUNCTION 'VENDOR_MASTER_DATA_SELECT_00'
    EXPORTING
      i_lfa1_lifnr     = p_emlif
      i_data           = 'X'
      i_partner        = ' '
    IMPORTING
      a_lfa1           = l_lfa1
    EXCEPTIONS
      vendor_not_found = 1.
  IF sy-subrc EQ 0.
    p_adrnr = l_lfa1-adrnr.
  ELSE.
    CLEAR p_adrnr.
  ENDIF.
ENDFORM.                               " GET_VENDOR_ADDRESS
*&      Form  get_addr_key
      text
     -->P_CS_BIL_INVOICE_HD_ADR  text
     <--P_CS_ADDR_KEY  text
FORM get_addr_key
     USING    l_xekko LIKE ekko
     CHANGING l_addr_key.
  DATA: l_lfa1 LIKE lfa1.
  IF l_xekko-lifnr NE space.
    CALL FUNCTION 'MM_ADDRESS_GET'
      EXPORTING
        i_ekko = l_xekko
      IMPORTING
        e_sadr = sadr
      EXCEPTIONS
        OTHERS = 1.
    MOVE-CORRESPONDING sadr TO l_lfa1.
    IF sy-subrc = 0.
      MOVE l_lfa1-adrnr TO ls_addr_key.
    ENDIF.
  ENDIF.
ENDFORM.                               " get_addr_key
*&      Form  protocol_update_I
      text
-->  p1        text
<--  p2        text
FORM protocol_update_i.
  CHECK xscreen = 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.
ENDFORM.                               " protocol_update_I
*&      Form  add_smfrm_prot
      text
-->  p1        text
<--  p2        text
FORM add_smfrm_prot.
  DATA: lt_errortab             TYPE tsferror.
  DATA: lf_msgnr                TYPE sy-msgno.
  DATA:  l_s_log          TYPE bal_s_log,
         p_loghandle      TYPE balloghndl,
       l_s_msg          TYPE bal_s_msg.
  FIELD-SYMBOLS:   TYPE LINE OF tsferror.
get smart form protocoll
  CALL FUNCTION 'SSF_READ_ERRORS'
    IMPORTING
      errortab = lt_errortab.
  SORT lt_errortab.
delete adjacent duplicates from lt_errortab comparing errnumber.
add smartform protocoll to nast protocoll
  LOOP AT lt_errortab ASSIGNING -msgv4
      EXCEPTIONS
        OTHERS    = 1.
  ENDLOOP.
open the application log
  l_s_log-extnumber    = sy-uname.
  CALL FUNCTION 'BAL_LOG_CREATE'
    EXPORTING
      i_s_log      = l_s_log
    IMPORTING
      e_log_handle = p_loghandle
    EXCEPTIONS
      OTHERS       = 1.
  IF sy-subrc  0.
    ENDIF.
  ENDLOOP.
Function module to display error logs during
smart form processing
Notice , the function 'BAL_DSP_LOG_DISPLAY' can
not be used when you using output dispatch time
4 (Send immediately), so the statement is comment
out by default.
You can enable the function call statement
if your form can not be output and you want to
see the error log. Set output dispatch time to 3
before save your order, then print or preview the
output.
  DATA lv_debug.
  IF NOT lv_debug IS INITIAL.
    CALL FUNCTION 'BAL_DSP_LOG_DISPLAY'.
  ENDIF.
ENDFORM.                               " add_smfrm_prot
*&      Form  ENTRY_NEU
      text
     -->ENT_RETCO  text
     -->ENT_SCREEN text
FORM entry_neu USING ent_retco ent_screen.
  DATA: l_druvo LIKE t166k-druvo.
  DATA: ls_xfz  TYPE char1.
  xscreen = ent_screen.
  CLEAR ent_retco.
  IF nast-aende EQ space.
    l_druvo = '1'.
  ELSE.
    l_druvo = '2'.
  ENDIF.
*>>> Start of Insertion >>> OSS 754573 (Liu Ke)
  IF xscreen EQ 'X' AND ( nast-tdarmod EQ '2' OR nast-tdarmod EQ '3').
    nast-tdarmod = '1'.
  ENDIF.
*<<< End of Insertion <<<
  PERFORM processing_po USING nast ls_xfz
                     CHANGING ent_retco ent_screen l_druvo.
ENDFORM.                    "entry_neu

Similar Messages

  • ENTRY_NEU doesn't exist in program /SMB40/FM06P

    We are getting the above error when trying to print the PO.  The log says ENTRY_NEU doesn't exist in program /SMB40/FM06P.  There is short dump for CALL_FUNCTION_PARM_MISSING.
    We are doing an upgrade and this has occured as part of the upgrade.  PRD on the old system is fine, but the new system gives this error and All the config, is correct and the same.

    if this is full sap standard program, ask sap support. Note that the 2 messages are not directly related (one is for a missing subroutine, the other is for a mandatory parameter in a function module that is not passed in the CALL FUNCTION). Maybe you use best practices of the wrong release or something like that...

  • Driver program for Purchase Order form "/SMB40/MMPO_A"

    Hi All
    Could you please suggest me Driver program for Purchase Order form "/SMB40/MMPO_A" ?
    Driver program "/SMB40/FM06P" does not have the same interface structure as this form, hence can not be used.
    << Text removed>>.
    Regards
    Ansh
    Edited by: Matt on Mar 27, 2009 7:22 AM - Please do not offer points

    Hi Ansh
    see this link
    [Driver program |https://forums.sdn.sap.com/click.jspa?searchID=24089230&messageID=6810108]
    Regards
    HAreesh Menon

  • Formatting error : Style /SMB40/SF not found

    Hi,
    I have downloaded a smartform from systemA to another systemB. In systemA there is a style /SMB40/SF. But it is not present in systemB. So i created a smartstyle Z_SMB40_SF and replaced all the occurences of /SMB40/SF with Z_SMB40_SF in systemB. But when i execute it i am getting an error "Style /SMB40/SF not found". When i checked in the function module i have some piece of code with /SMB40/SF. But in the smartform the style doesnot exist. Could anyone please figure where the problem is and how to resolve the issue.
    Thanks in advance.

    here is what we did to solved this problem with style /SMB40/SF. Here are the steps which I followed to resolve the error.
    Step. 1: From SMARTFORMS transaction, Execute the form with Error you will get a FM name, Now display the form and Click on Find Button, Select mainprogram Radio button and search the style /SMB40/SF. Note down all the nodes where this style is used.
    Step 2: Remove the style from the nodes and activate. If you still find the style in form then note down the nodes above and below the style.
    Step 3: Download the form for Backup first. Now remove both the nodes which were noted in step 2. Activate the form and now add the two nodes again back to form which were removed earlier.
    Step 4: Activate the form and the Issue is Resolved.
    Rajkumar

  • Condition types not getting displayed

    i have uploaded a smartform & copied the standard program(/SMB40/FM06P) of it into my system.the condition type texts & their amounts are getting displayed  for import purchase order(conditions are getting picked from me22n--->conditions) but for domestic invoice  im unable to display condition type texts & their amounts.(these are picked from me22n-->invoice---->taxes).
    in program lines this code exists.
    <FS>   like EKPO.
    <KO>  like  KOMV.
    input parameters            output parameters
    ZXEKKO                        G_KSCHL
    L_NETWR                      G_VTEXT
    <KO>                             G_KWERT
    G_VTEXT                        G_FRAKWERT
    G_FRAKWERT               G_TAX
    G_TOTAL
    <FS>
    G_TAX
    L_KWERT
    CLEAR: g_vtext,g_kwert,l_kwert.
    CHECK NOT <ko>-kwert = <fs>-netwr.
    Get Condition Type Text from table T685T and the value
    SELECT SINGLE vtext INTO g_vtext FROM t685t
    WHERE spras = sy-langu
    AND kschl = <ko>-kschl.
    IF sy-subrc = 0.
    MOVE <ko>-kwert TO g_kwert.
    ENDIF.
    Check document currency
    IF NOT l_netwr IS INITIAL.
    WRITE g_kwert TO l_kwert CURRENCY zxekko-waers.
    ENDIF.
    *Determine if the discount is based on %
    IF g_vtext CS '%' OR
    g_vtext CS 'percentage' OR
    <ko>-kschl = 'SKTO'.
    <ko>-kbetr = <ko>-kbetr / 10.
    MOVE '%' TO <ko>-waers.
    ENDIF.
    Determine Tax
    IF g_vtext CS 'tax'.
    ADD <ko>-kwert TO g_tax.
    CLEAR g_kwert.
    ENDIF.
    Determine Freight Charges
    IF g_vtext CS 'Freight'.
    ADD: <ko>-kwert TO g_frakwert.
    CLEAR g_kwert.
    ENDIF.
    i feel the data is coming from above code only.please suggest where i have to make changes so that it picks data from ME22N->INVOICE--->TAXES which has conditions for domestic purchase order.please help.

    Hi
    Keep a break-point (hard) in these program lines and debug and see that whether the condition type(KSCHL) related to Taxes is appearing here or not.
    If the condition type for taxes is coming then you can print the taxes.
    First check the related condition type for Taxes in T685 table and see here in the code.
    <b>Reward points for useful Answers</b>
    Regards
    Anji

  • Error when trying to mail PO to a vendor

    Hi,
    we're on ECC 5.0. SAPKB64015.
    I'm testing the email of a PO to a vendor. I've set up the condition record, and the vendor has an email address. I'm using output type NEU. This is set up with the standard smartform /SMB40/MMPO_L program /SMB40/FM06P form routine ENTRY_NEU. When I create a PO - I go into messages and get the error 'Archiving format not equal to PDF.' - message number SSFCOMPOSER 017.
    Any ideas why this isn't working?
    Thanks
    Richard

    Hi,
    1.Go to the output type NEU which is used to send email. Go to the change mode-->Storage tab and make it like this. Storage mode=Print and archive
    Document type=xxxxxx note down this
    2. Now go to transaction code OAC2, Position your document type from step 1 and assign document class as PDF
    3. Go to OAC3 and assign object type bus2012 to ur document type. Give the content repository which u r using save it
    4. Maintain the work flow in OAD5 with ur doc type maintained in step 1. Maintain the presetting save it.
    5. now go to me22n and try to send your message it will work.
    Cheers
    Sirfraz

  • ECC 6.0 with baseline - send PO via e-mail

    Hi forum experts,
    We are having some problems with configuring our system to send POs via e-mail. We are trying to use the following setting, but when the PO is saved (and triggers an output) an error appears without any items in processing log. No e-mail is queued in SOST.
    Medium: 5 - external send
    Program: YBAA_FM06P.
    FORM routine: ENTRY_NEU
    Form: <blank>
    PDF/Smartform form: YBAA_MMPO
    When performing a normal "Print output, medium 1", the PO is successfully printed.
    When changing the program to SAPFM06P, a sapscript form is successfully genereated and queued as an e-mail. We simply don't get it to work using program YBAA_MMPO.
    Are we using the correct program? I have read som discussion threads about it and some experts have suggested to use program /SMB40/FM06P instead. That does not work either.
    Best regards and thanks in advance for your help!
    Magnus

    Hi,
    You are using PDF/Smartform form: YBAA_MMPO for  your PO output and to send mail.
    Use t.code:NACE,select application EF.
    1.Now for your Output type, keep Replacement of text symbols give programm as SAPMM06E and Form Routine as TEXT_SYMBOL_REPLACE in General data  TAB.
    2. Keep Communication Method as CS01
    3. Keep entry of medium as 5 and function as VN
    4.For subject of the mail goto Mail Title and Texts give PO No. &EKKO-EBELN& .
    5.Keep condition record with your PO output type and have medium 5 with function VN
    6. For sending PO by e-mail- you should an e-mail ID in your vendor master
    Regards,
    Biju K

  • How to send external email of a Purchase Order

    Hello,
    I have to send an external email (pdf attachment) of a Purchase Order.
    I use the standard sap program: /SMB40/FM06P and the smartform: /SMB40/MMPO_L.
    Within transaction NACE I used the following entries:
    Medium: 5 (External Send), Program: /SMB40/FM06P, Form routine: ENTRY NEU and Smartform: /SMB40/MMPO_L.
    After running transaction ME22n (messages: External Send) I got the following error-messages in processing log:
    - Please maintain an output device in your user master data.
    - Archiving format not equal to PDF.
    Please, can someone help me to solve this problem.
    Regards,
    Rajesh

    hi
    U need to write the code to convert the smartform to PDF using FM Convert_otf and also for sending mail
    The standard program has to be copied to Z and write ur code..to perform u requirements
    Check the below links
    SO_NEW_DOCUMENT_ATT_SEND_API1
    http://www.sapdevelopment.co.uk/reporting/rep_spooltopdf.htm
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/8cd6adbb-0301-0010-39ba-938c601d5db9
    Email Invoices to customer as a PDF attachment
    surya

  • Purchase order smartform

    Hi Guys,
                I have a po smartform to do. need ur help in this regards.
    if u go to t.code me22n , in the iten details , material data tab we have a push button for configuration where the charecteristics of the material comes up. Now my client wants that all these charecteristcs should come up in the form. And for the values he selects a yes should be prefixed with those values. Please help me out. its very urgent.

    Hi
    In the smartform CREATE the PROGRAM LINES and fetch the Characteristics of the Materisl using the fun module CLAF_CLASSIFICATION_OF_OBJECTS or Bapi
    BAPI_OBJCL_GETDETAIL
    with the help of them you will get the characteristics
    PUCHASE ORDER
    Output type         : NEU
    ScriptForm Name     : MEDRUCK
    Driver Program Name : SAPMF06P
    smartform name      : /SMB40/MMPO_L
    smartform driver program: /SMB40/FM06P
    How to create a New smartfrom, it is having step by step procedure
    http://sap.niraj.tripod.com/id67.html
    Here is the procedure
    1. Create a new smartforms
    Transaction code SMARTFORMS
    Create new smartforms call ZSMART
    2. Define looping process for internal table
    Pages and windows
    First Page -> Header Window (Cursor at First Page then click Edit -> Node -> Create)
    Here, you can specify your title and page numbering
    &SFSY-PAGE& (Page 1) of &SFSY-FORMPAGES(Z4.0)& (Total Page)
    Main windows -> TABLE -> DATA
    In the Loop section, tick Internal table and fill in
    ITAB1 (table in ABAP SMARTFORM calling function) INTO ITAB2
    3. Define table in smartforms
    Global settings :
    Form interface
    Variable name Type assignment Reference type
    ITAB1 TYPE Table Structure
    Global definitions
    Variable name Type assignment Reference type
    ITAB2 TYPE Table Structure
    4. To display the data in the form
    Make used of the Table Painter and declare the Line Type in Tabstrips Table
    e.g. HD_GEN for printing header details,
    IT_GEN for printing data details.
    You have to specify the Line Type in your Text elements in the Tabstrips Output options.
    Tick the New Line and specify the Line Type for outputting the data.
    Declare your output fields in Text elements
    Tabstrips - Output Options
    For different fonts use this Style : IDWTCERTSTYLE
    For Quantity or Amout you can used this variable &GS_ITAB-AMOUNT(12.2)&
    5. Calling SMARTFORMS from your ABAP program
    REPORT ZSMARTFORM.
    Calling SMARTFORMS from your ABAP program.
    Collecting all the table data in your program, and pass once to SMARTFORMS
    SMARTFORMS
    Declare your table type in :-
    Global Settings -> Form Interface
    Global Definintions -> Global Data
    Main Window -> Table -> DATA
    Written by : SAP Hints and Tips on Configuration and ABAP/4 Programming
    http://sapr3.tripod.com
    TABLES: MKPF.
    DATA: FM_NAME TYPE RS38L_FNAM.
    DATA: BEGIN OF INT_MKPF OCCURS 0.
    INCLUDE STRUCTURE MKPF.
    DATA: END OF INT_MKPF.
    SELECT-OPTIONS S_MBLNR FOR MKPF-MBLNR MEMORY ID 001.
    SELECT * FROM MKPF WHERE MBLNR IN S_MBLNR.
    MOVE-CORRESPONDING MKPF TO INT_MKPF.
    APPEND INT_MKPF.
    ENDSELECT.
    At the end of your program.
    Passing data to SMARTFORMS
    call function 'SSF_FUNCTION_MODULE_NAME'
    exporting
    formname = 'ZSMARTFORM'
    VARIANT = ' '
    DIRECT_CALL = ' '
    IMPORTING
    FM_NAME = FM_NAME
    EXCEPTIONS
    NO_FORM = 1
    NO_FUNCTION_MODULE = 2
    OTHERS = 3.
    if sy-subrc <> 0.
    WRITE: / 'ERROR 1'.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    call function FM_NAME
    EXPORTING
    ARCHIVE_INDEX =
    ARCHIVE_INDEX_TAB =
    ARCHIVE_PARAMETERS =
    CONTROL_PARAMETERS =
    MAIL_APPL_OBJ =
    MAIL_RECIPIENT =
    MAIL_SENDER =
    OUTPUT_OPTIONS =
    USER_SETTINGS = 'X'
    IMPORTING
    DOCUMENT_OUTPUT_INFO =
    JOB_OUTPUT_INFO =
    JOB_OUTPUT_OPTIONS =
    TABLES
    GS_MKPF = INT_MKPF
    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>Reward points for useful Answers</b>
    Regards
    Anji

  • Smart forms background logo

    Hi
    Please clarify me regarding smart forms background logo. I'm trying to migrate sap script into smart forms, for the background logo in smart form is it required to write ABAP code, please let me know?
    2) Is it possible for background pictures in script? Is there any document regarding logo/pictures in sap script or smartforms? is there standard forms like purchase order etc., in smart forms? Please correct me If i'm wrong...
    Regards
    sree reddy

    Hi
    Background LOGOS are possible only in smartforms not in Scripts
    see the logo printing for Scripts and Smartforms and the important smartforms and scripts with their programs
                   SAP SCRIPT
    To create a logo in SAP printouts just do the following
    1. Save a Logo using Imaging, Paint shop Pro or Corel Draw as Tiff file.
    2. Run  program RSTXLDMC and enter the following parameters
       Enter file name                     C:\COMPLOGO.TIF
       UOM                           CM
        Line width for text                132
        Text name                     ZHEX-MACRO-COMPLOGO
        Text ID                          ST
        Text language = E
        Number of Tiff gray levels (2,4,9) 2
    3.  Then Create a new window 'COMP' with attributes;
    Window COMP description Company Logo
    Left margin 7.00 CH window width 10.00 CH
    Upper margin LN window height 8.00 LN
    Finally in the text element, mention
            /: INCLUDE 'ZHEX-MACRO-COMPLOGO' OBJECT TEXT ID ST LANGUAGE 'E'.
    Please note that if object name is not indicated as 'ZHEX...’ the logo may not be printed!
    You will not be able to see the logo in a test print. The same will be printed in actual printout.
                          SMARTFORM
    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
    SD
    SALES ORDER/ENQUIRY/QUOTATION
    Output type         : BA00
    ScriptForm Name     : RVORDER01
    Driver Program Name : RVADOR01
    smartform name
    DELIVERY NOTE
    Output type         : LD00
    ScriptForm Name     : RVDELNOTE
    Driver Program Name : RVADDN01
    smartform name      : LE_SHP_DELNOTE
    Smartform Driver Pgm: RLE_DELNOTE
    INVOICE
    Output type         : RD00
    ScriptForm Name     : RVINVOICE01
    Driver Program Name : RVADIN01
    smartform name      : LB_BIL_INVOICE
    Smartform Driver Pgm: RLB_INVOICE
    MM
    PUCHASE ORDER/RFQ/CONTRACT
    Output type         : NEU
    ScriptForm Name     : MEDRUCK
    Driver Program Name : SAPMF06P
    smartform name      : /SMB40/MMPO_L
    smartform driver program: /SMB40/FM06P
    GOODS RECEIPT
    Output type         : WE01
    ScriptForm Name     : WESCHEINVERS1
    smartform name      : /SMB40/MMGR1_A
    smartform driver program: /SMB40/M07DR
    GOODS ISSUE
    Output type         : WA01
    ScriptForm Name     : WA_SCHEINVERS1
    smartform name      : /SMB40/MMGI1_A
    smartform driver program: /SMB40/M07DR
    FI Forms
    Account Statement   : F140_ACC_STAT_01
    Cheque Printing     : F110_PRENUM_CHEK
    Balance Confirmation: F130_confirm_01
    Dunning Form:         F150_DUNN_01
    check the link below it provides steps to convert sap scripts to smartforms
    http://www.ficoexpertonline.com/downloads/Iyer_SmartForms.pdf
    SMARTFORMS -Driver Program
    PO: /SMB40/FM06P
    SO: /SMB40/RVADOR01
    GR: /SMB40/M07DR
    Reward if useful
    regards
    Anji

  • Hi all, i didn't get my output using smartform?

    Hi,
    Can i copy standard program sapfm06p to zprogram.where can i write my code for smartform(my zprogram).in that program.plz help me urgent.

    Hi,
    1.For PO ,the smartform driver program is not sapmf06p.The form name is /smb40/mmpo_A or _l.
    2.Copy this form and write code in program lines of smart layout.
    3.For help :
    http://www.****************/Tutorials/Smartforms/SFMain.htm
    4.Driver program is :
    PUCHASE ORDER
    Output type : NEU
    ScriptForm Name : MEDRUCK
    Driver Program Name : SAPMF06P
    smartform name : /SMB40/MMPO_L
    smartform driver program : /SMB40/FM06P
    Regards,
    Shiva Kumar

  • Form with logo

    hii,
    1. provide me a form with logo so tht i can test in IDES.
    regards
    rahul
    Title was edited by:
            Alvaro Tejada Galindo

    Hi
    There are some Standard Sap Scripts in SAP. We cant directly execute them in scripts we have to use some T-codes and by giving some input to the required fields we can see the output printform.
    I will show one example. There are some Standard Sap Scripts such as MEDRUCK which is a standard Sap Script for Purchase Order and RVINVOICE01 for billing and so on...
    To see oupt of MEDRUCK go to T-code ME9F give purchase order number and execute select one number and click on dislplay messages button on application tool bar you can find the print form of MEDRUCK.
    You cannot change the Standard Sap Scripts but you can use Standard Sap Scripts and Copy them to userdefined Script and can make changes to them and replace standard Sap Script with usedefind script.
    Ex: Go to SE71,
    on menu bar u find Utilities->copy from Client. click on it u ll find new screen showing
    Form name:
    Source Clinet:
    Target Form:
    give Form name as usedefined form name EX: ZFORM1
    Source client as 000 and
    Target form as MEDRUCK.
    execute.
    Now, the standard from MEDRUCK is copyied to your form ZFORM1.
    NOW, go to SE71 and give form name as ZFORM1 and do some changes to the form such as adding logo any thing. save and Activate.
    Now, you have done changes to the Form ZFORM1 and u have to replace your form with standard SAP Script.
    Go to NACE Transaction.
    on Applications select EF for purchase order and click Output types button on application tool bar.
    now select NEU as output types dobule click on Processing Routines.
    now click on Change option on application tool bar and on right side u find MEDRUCK in form place replace MEDRUCK with ZFORM1 and SAVE.
    go back twice and now go to T-code ME9F give the purchase order number and execute and select one option and click on display messges button .
    you will find the changes that you have done in ZFORM1. so we cant chage the standard Sap Scripts by copying the Standard Sap Scripts we can chage and replace with our forms.
    SD
    SALES ORDER/ENQUIRY/QUOTATION
    Output type         : BA00
    ScriptForm Name     : RVORDER01
    Driver Program Name : RVADOR01
    smartform name
    DELIVERY NOTE
    Output type         : LD00
    ScriptForm Name     : RVDELNOTE
    Driver Program Name : RVADDN01
    smartform name      : LE_SHP_DELNOTE
    Smartform Driver Pgm: RLE_DELNOTE
    INVOICE
    Output type         : RD00
    ScriptForm Name     : RVINVOICE01
    Driver Program Name : RVADIN01
    smartform name      : LB_BIL_INVOICE
    Smartform Driver Pgm: RLB_INVOICE
    MM
    PUCHASE ORDER/RFQ/CONTRACT
    Output type         : NEU
    ScriptForm Name     : MEDRUCK
    Driver Program Name : SAPMF06P
    smartform name      : /SMB40/MMPO_L
    smartform driver program: /SMB40/FM06P
    GOODS RECEIPT
    Output type         : WE01
    ScriptForm Name     : WESCHEINVERS1
    smartform name      : /SMB40/MMGR1_A
    smartform driver program: /SMB40/M07DR
    GOODS ISSUE
    Output type         : WA01
    ScriptForm Name     : WA_SCHEINVERS1
    smartform name      : /SMB40/MMGI1_A
    smartform driver program: /SMB40/M07DR
    FI Forms
    Account Statement   : F140_ACC_STAT_01
    Cheque Printing     : F110_PRENUM_CHEK
    Balance Confirmation: F130_confirm_01
    Dunning Form:         F150_DUNN_01
    check the link below it provides steps to convert sap scripts to smartforms
    http://www.ficoexpertonline.com/downloads/Iyer_SmartForms.pdf
    SMARTFORMS -Driver Program
    PO: /SMB40/FM06P
    SO: /SMB40/RVADOR01
    GR: /SMB40/M07DR
    Regards
    Anji

  • Sending purchase order through fax

    What points to be considered in configuring the option of sending fax to supplier ?

    Follow the steps below
    1.Use tcode SCOT to config your SAP server for Fax
    2.Use tcode NACE to config your Fax output type for PO
    3. and MAintain you MN04 for your faxt putput type
    MG -MM - Purchasing - Messages - Output control - Message types - Define Message Types for Purchase Order
    Define new message type for Fax
    4.5.10     Output type Configuration (MM)
    Use 
    In this activity you will create the output type configuration (MM).
    Procedure
    1.     Start the following activity:
    Transaction Code     SPRO
    IMG Menu     Materials Management &#61664; Purchasing&#61664; Messages &#61664; Output Control &#61664;  Message Types &#61664; Define Message Types for Purchase Order
    2.     On the Change View “Procedures” Overview screen, make the following entries, followed by Save:
    Output Type     Trans
    mission
    Medium     Appln     Program     FORM routine     Form Name
    NEU     1     EV     /SMB40/FM06P     ENTRY_NEU     /SMB11/BL_MMCON_L
    3.     In output table V_166U make the following entries, followed by Save:
    LA     Operation     Cat     Type     Title     Doc.Typ     Heading No
    EN     1     A     AN     Request for Quotation          RFQ number/date
    EN     2     A     AN     Change to     Purchase RFQ     RFQ number/date
    EN     3     A     AN     Reminder relating to     Purchase RFQ     RFQ number/date
    EN     4     A     AN     Rejection letter relating to     Purchase RFQ     RFQ number/date
    4.     In Output table VN_TNAPR make the following entries, followed by Save:
    Out     Med     App     Program     FORM routine
    NEU     8     EF          ENTRY_BLANK
    5.     In Output table VN_T685B make the following entries, followed by Save:
    Usage     Ap     Out     AcSq     P1     Prnt
    Paremtr criteria     Time     Med     Cond
    Acc     LA     Name
    B     ME     WA01     0003     X     7     4     1     X     EN     GI Note Vers.1.
                   0003     X     7     4     1     X          
    6.     In Output table V_T685 make the following entries, followed by Save:
    Usage     App     CTyp     AcSq     LA     Name
    H     ME     ME01     ME01     EN     MovType/Plnt/MatlNo.
    H     ME     ME02     ME02     EN     Plant
    7.     In Output table V_159N make the following entries, followed by Save:
    Program     P     Act     Form
    RM07IDRU     4     X     /SMB11/BL_INVENT
    8.     In Output table V_TNAD7 make the following entries, followed by Save:
    App     CTyp     Plnt     SLoc     ODev     I
    ME     WA01     BP01     0002     LOCL     X
    ME     WA01     BP01     0003     LOCL     X
    ME     WA01     BP01     0005     LOCL     X
    ME     WA01     BP01     0002     LOCL     X
    ME     WA01     BP01     0003     LOCL     X
    ME     WA01     BP01     0005     LOCL     X
    9.     In Output table VN_TNAPN make the following entries, followed by Save:
    App      Out     Med     Function
    EF     NEU     5     LF

  • P.O. printing

    Hii all,
    I have created one smart form n program for printing purchase order, now i want to assign that in nace in place of medruck or by creating another o/p type  but it giving me form routine error..
    how can i rectify that? is it necessary to give form routine?

    Hi
    THOUGH YOU ATTACHED THE ZSMARTFORM IN nace AGAINST THE OUTPUT TYPE THE
    Std Driver Program SAPMF06P will not trigger the Smartform at all.
    You have to modify it to trigger the smartform by copying it and writing some code.
    see the std smartform and program type  of PO
    PUCHASE ORDER/RFQ/CONTRACT
    Output type         : NEU
    ScriptForm Name     : MEDRUCK
    Driver Program Name : SAPMF06P
    smartform name      : /SMB40/MMPO_L
    smartform driver program: /SMB40/FM06P
    Regards
    Anji

  • Scripts and Smartorms

    Hello friends,
    I have some general questions in Scripts and smartforms.
    1- How would i upload a text in smartforms. I have done using SO10 in scripts and in the editior window i import the text. But I am unable to do it in smartforms.
    2- When i created text in SO10 it didnt ask for a package so how would i transport it.
    3- In scripts if i want to find all the scripts starting with Z i tried F4 help using Z*. It dosent work so how would i find.
    4- I have a include program can i use it in scripts.
    5- Some standard scripts and smartforms along with the driver programs..
    And any real time tips and suggestions..
    Thanks,
    Madhu..

    1.To upload the text module, from the menu choose Utility -> Upload Text Module
    2. use RSTXTRAN
    3. check TNAPR table
    4. you can use in driver program
    5. <b>SMARTFORMS</b>
    Document Types Output Types Transaction Code Smart Form Program Smart Form
    Sales Inquiry AF00 (Inquiry) V/G7 /SMB40/RVADOR01 /SMB40/SDINQ_L/SMB40/SDINQ_A
    Quotation AN00 (Quotation) V/G7 /SMB40/RVADOR01 /SMB40/SDQUO_L/SMB40/SDQUO_A
    Order Confirmation BA00 (Order Confirmation) V/G7 /SMB40/RVADOR01 /SMB40/SDORC_L/SMB40/SDORC_A
    Cash Sales Receipt RD03 (Cash Sales) V/G7 /SMB40/RVADOR01 /SMB40/SDCSH_L/SMB40/SDCSH_A
    Contract KO00 (Contract) V/G7 /SMB40/RVADOR01 /SMB40/SDCON_L/SMB40/SDCON_A
    Scheduling Agreement LP00 (Scheduling Agreement) V/G7 /SMB40/RVADOR01 /SMB40/SDSDA_L/SMB40/SDSDA_A
    Delivery Note LD00 (Delivery Note) V/G9 RLE_DELNOTE /SMB40/SDDLN_L/SMB40/SDDLN_A
    Sales Invoice RD00 (Invoice) v/83 RLB_INVOICE /SMB40/SDINV_L/SMB40/SDINV_A
    Picking List EK00 v/38 /SMB40/RVADEK01 /SMB40/SDPIK_L/SMB40/SDPIK_A
    Request for Quotation EA NEU (RFQ) /SMB40/FM06P /SMB40/MMRFQ_L/SMB40/MMRFQ_A
    Purchase Order EF NEU (Purchase Order) /SMB40/FM06P /SMB40/MMPO_L/SMB40/MMPO_A
    Contract/Scheduling Agreement EV NEU (Outline agreement) /SMB40/FM06P /SMB40/MMCON_L/SMB40/MMCON_A
    Delivery Schedule EL LPET (SchedAgrmtSchedLine) /SMB40/FM06P /SMB40/MMDLS_L/SMB40/MMDLS_A
    Goods Receipt Slip (Individual Item) WE01 (GR Note Vers.1) M706 /SMB40/M07DR /SMB40/MMGR1_L/SMB40/MMGR1_A
    Goods Receipt Slip (Individual Item with Inspection text) WE02 (GR Note Vers.2) M706 /SMB40/M07DR /SMB40/MMGR2_L/SMB40/MMGR2_A
    Goods Receipt Slip (Multiple Items) WE03 (GR Note Vers.3) M706 /SMB40/M07DR /SMB40/MMGR3_L/SMB40/MMGR3_A
    Goods Issue 1 (Individual Item with Inspection text) WA01 (GI Note Vers.2) M706 /SMB40/M07DR /SMB40/MMGI1_L/SMB40/MMGI1_A
    Goods Issue 2 (Individual Item with Inspection text) WA02 (GI Note Vers.2) M706 /SMB40/M07DR /SMB40/MMGI2_L/SMB40/MMGI2_A
    Goods Issue 3 (Multiple Items) WA03 (GI Note Vers.3) M706 /SMB40/M07DR /SMB40/MMGI3_L/SMB40/MMGI3_A
    Dunning Notice FIBF, F150 FI_PRINT_DUNNING_NOTICE_SMARTF /SMB40/FIDUN_L/SMB40/FIDUN_A
    http://www.sap-img.com/sapscripts.htm

Maybe you are looking for

  • SQL 2012 Reporting Services Print Control... FIX?

    I have an web site that uses ActiveX print control and when there is a SQL update it breaks the print control for all the end users and I have to walk around and enter my admin username/pass to fix this.I have tried a number of fixes such as:Batch sc

  • Problem in Spl Characters handling

    Hi Friends, We are developing a applicatio using J2EE Tech., Problem which we face now is with spl character. There is text box in our application, If are entering the data(even spl char) it is storing in the database properly and diaplays it correct

  • BI drill down reports

    Hi all, I need to show a sample of drill down BI reports (by customer) to a client.Would any one have something they can share. A link or file would help. Thanks [email protected]

  • IOS 5.0.1 Can't Show OS X Lion Address Book Profile Fields?

    In OS X Lion, Apple introduced Profile fields into the Address Book: Social network profiles Address Book lets you quickly access the social network profiles of your contacts, including Facebook. Press and hold an email address to select the appropri

  • Why do applications become "Unresponsive"?

    This has been bugging me for awhile. Both on my iMac running SL and my clients G5 running Tiger, we regularly get the "Application Unresponsive" message. SL will not give me the option to quit, but rather shows the "Force Quit" message. Adobe apps ha