Page formats in script its Urgent

Hello all,
I have created one page format through SPAD.. but its getting error :You have selected a page format YPO_PF for which there is no identical formatting type in the spool.
and i saved with same request no but while i was moving it to testing through scc1 i am getting error
please guide me to create page format....?
thanks
regards
aeda
Edited by: Aeda N on Mar 10, 2008 12:21 PM

Hi,
Although I have never done this before, but I hope the below link from SAP help site may help you.
http://help.sap.com/saphelp_nw70/helpdata/en/d9/4a959551ea11d189570000e829fbbd/content.htm
Regards,
Mayank

Similar Messages

  • How to Fix the row in sap script, its urgent......

    Hi Experts,
    first i explain my sap script, i have print void check in my script client give readymade format means box are there, lines are there. i have to fix in box and line data form database table. everthing is working fine. i got all data. i have total 6 window in my script .but i have one issue  In my sap script in header window total five rows... like below
    Check voucher no:8888
    check No: 1234
    Date:1/28/2007
    Bank:xyz
    Batch no: 5678
    now sometime check voucher is balnk....
    Check voucher no: BLANK/NULL
    check No: 1234
    Date:1/28/2007
    Bank:xyz
    Batch no: 5678
    because of that all rows are move up side and all window also move up side and so script not fix to the box and line all data are seen not perfectly... so guru`s how to fix the row and window in script....
    its urgent...
    Waiting for ur reply
    Thanks & regards
    Jigar

    Hi,
    Follow the below steps . Definately your issue will bve resolved.
    Let us suppose you are printing following fields
    PH &v_text&
    PH &v_text1&
    PH &v_text2&
    you will get the output as you expected.
    and if you have any conditions  for these fileds
    /: if v_text is not initial.
    PH &v_text&
    /: endif
    PH &v_text1&
    PH &v_text2&
    if you have data in each field then you will get output as expected .
    But when v_text is initial.
    the data will be moved up wnhich is happening in your case.
    so what you need to do is?
    /: if v_text is not initial.
    PH &v_text&
    /: else
    PH  (Here you need to mention empty line with same paragraph format
    /: endif.
    PH &v_text1&
    PH &v_text2&
    Reward points if useful
    Regards,
    Nageswar

  • Issue with Script its urgent

    Hi,
    Any one please let me know how we can defne new-page with particular page name.
    for example i want to display the newpage 
    All terms & conditions in last page its layout is different.
    if iam using CONTROL_FORM function module its not taking LAstpage as new page
    please let me know urgently.
    thanks & regards...
    Anil.T

    Hi
    The first thing you have to consider is the NEW-PAGE statament can be done in the MAIN only.
    In the SAPSCRIPT you can insert the line:
    /: NEW-PAGE <PAGE NAME>
    so try to transfer the same command to fm CONTROL_FORM
    Max

  • Re : page formats in scripts

    Hi gurus,
        In scripts multiple page formats are not avilable. what exactly it means. can any one pls give the explanation.
    with regards
    aru.

    Hi!
    Multiple page format means landscape and portrait page in one form. This is not possible in SAPscripts.
    Coming to SMARTFORMS this is possible, i.e first page output in portrait and second page output in landscape.
    Regards
    Tamá

  • Error in setting up page format for Script.

    Hi,
        I have set up a customized page format.
    I set up Page format, Format types and Device types.
    I have throughly checked wit the other working formats, everthing seems right..
    Page format : zmed_po - Portait
    Format type : zmed_po
    Error - No Printer font maintained for ZMED_PO.
    Please help me out.
    Cheers,
    Sam

    HI Sam,
    For this u need to setup the printer at OS level. There u need to setup the fonts and etc.. related to the printer. I hope this is eror from OS level...
    regards
    reghu

  • Its urgent:plz tel me what is the steps move to produection oaf page.

    Hi All,
    I developed one oaf page.that page move to production.
    i already move to produection but its not working fine.
    its throw an error.
    plz tell me what is the steps follow when move to production.
    oracle.apps.fnd.framework.OAException: Application: FND, Message Name: FND_NO_REGION_DATA. Tokens: REGIONCODE = /wnsgs/oracle/apps/ap/agingbuckets/webui/AgingBucketsPG;
         at oracle.apps.fnd.framework.webui.JRAD2AKMapper.getRootMElement(JRAD2AKMapper.java:529)
         at oracle.apps.fnd.framework.webui.OAWebBeanFactoryImpl.getWebBeanTypeDataFromJRAD(OAWebBeanFactoryImpl.java:3719)
         at oracle.apps.fnd.framework.webui.OAWebBeanFactoryImpl.getRootApplicationModuleClass(OAWebBeanFactoryImpl.java:3452)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1005)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:508)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:429)
         at oa_html._OA._jspService(_OA.java:85)
         at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
         at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
         at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
         at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
         at oracle.jsp.JspServlet.service(JspServlet.java:156)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
         at oracle.jsp.provider.Jsp20RequestDispatcher.forward(Jsp20RequestDispatcher.java:162)
         at oracle.jsp.runtime.OraclePageContext.forward(OraclePageContext.java:187)
         at oa_html._RF._jspService(_RF.java:102)
         at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
         at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
         at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
         at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
         at oracle.jsp.JspServlet.service(JspServlet.java:156)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
         at org.apache.jserv.JServConnection.processRequest(JServConnection.java:456)
         at org.apache.jserv.JServConnection.run(JServConnection.java:294)
         at java.lang.Thread.run(Thread.java:534)
    ## Detail 0 ##
    Exception:
    oracle.adf.mds.MetadataDefException: Unable to find component with absolute reference = /wnsgs/oracle/apps/ap/agingbuckets/webui/AgingBucketsPG, XML Path = null. Please verify that the reference is valid and the definition of the component exists either on the File System or in the MDS Repository.
         at oracle.adf.mds.internal.MetadataManagerBase.findElement(MetadataManagerBase.java:1350)
         at oracle.adf.mds.MElement.findElement(MElement.java:97)
         at oracle.apps.fnd.framework.webui.JRAD2AKMapper.getRootMElement(JRAD2AKMapper.java:503)
         at oracle.apps.fnd.framework.webui.OAWebBeanFactoryImpl.getWebBeanTypeDataFromJRAD(OAWebBeanFactoryImpl.java:3719)
         at oracle.apps.fnd.framework.webui.OAWebBeanFactoryImpl.getRootApplicationModuleClass(OAWebBeanFactoryImpl.java:3452)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1005)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:508)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:429)
         at oa_html._OA._jspService(_OA.java:85)
         at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
         at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
         at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
         at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
         at oracle.jsp.JspServlet.service(JspServlet.java:156)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
         at oracle.jsp.provider.Jsp20RequestDispatcher.forward(Jsp20RequestDispatcher.java:162)
         at oracle.jsp.runtime.OraclePageContext.forward(OraclePageContext.java:187)
         at oa_html._RF._jspService(_RF.java:102)
         at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
         at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
         at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
         at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
         at oracle.jsp.JspServlet.service(JspServlet.java:156)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
         at org.apache.jserv.JServConnection.processRequest(JServConnection.java:456)
         at org.apache.jserv.JServConnection.run(JServConnection.java:294)
         at java.lang.Thread.run(Thread.java:534)
    Exception:
    oracle.adf.mds.MetadataDefException: Unable to find component with absolute reference = /wnsgs/oracle/apps/ap/agingbuckets/webui/AgingBucketsPG, XML Path = null. Please verify that the reference is valid and the definition of the component exists either on the File System or in the MDS Repository.
         at oracle.adf.mds.internal.MetadataManagerBase.findElement(MetadataManagerBase.java:1350)
         at oracle.adf.mds.MElement.findElement(MElement.java:97)
         at oracle.apps.fnd.framework.webui.JRAD2AKMapper.getRootMElement(JRAD2AKMapper.java:503)
         at oracle.apps.fnd.framework.webui.OAWebBeanFactoryImpl.getWebBeanTypeDataFromJRAD(OAWebBeanFactoryImpl.java:3719)
         at oracle.apps.fnd.framework.webui.OAWebBeanFactoryImpl.getRootApplicationModuleClass(OAWebBeanFactoryImpl.java:3452)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1005)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:508)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:429)
         at oa_html._OA._jspService(_OA.java:85)
         at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
         at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
         at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
         at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
         at oracle.jsp.JspServlet.service(JspServlet.java:156)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
         at oracle.jsp.provider.Jsp20RequestDispatcher.forward(Jsp20RequestDispatcher.java:162)
         at oracle.jsp.runtime.OraclePageContext.forward(OraclePageContext.java:187)
         at oa_html._RF._jspService(_RF.java:102)
         at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
         at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
         at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
         at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
         at oracle.jsp.JspServlet.service(JspServlet.java:156)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
         at org.apache.jserv.JServConnection.processRequest(JServConnection.java:456)
         at org.apache.jserv.JServConnection.run(JServConnection.java:294)
         at java.lang.Thread.run(Thread.java:534)
    thanks
    Seshu.
    Edited by: its urgent on Feb 8, 2012 2:31 AM

    Deployement steps:
    1) Copy the Class files and move to into server
    We can get class file >>F:\OAF\jdevhome\jdev\myclasses\imp
    \myprojects
    (imp) Load into server (java TOP) >>D:\oracle\viscomn\java\
    2) Run the XML import Scripts in Command Prompt
    F:\OAF\jdevbin\jdev\bin
    For every Page and every Lov region
    3) Next Go to apps
    System administrator Create Function for a page
    Description tab:
    Function Name : IMP_STUDENT_REGISTRATION
    User Function Name: Imp Student Registration
    Description : Imp Student Registration
    Properties Tab:
    Type: SSWA JSP function
    WebHTML Tab
    Function:
    HTML call: OA.jsp?page=/imp/oracle/apps/po/student/webui/ImpStudentResitrationPG
    Note: DO the same for all the pages
    4) Attach these Functions to Imp Student Operations menu to Imp Student Operations responsibility to User.
    5) Bounce the apache.
    Regards
    Meher Irk

  • How to print last page in sap script in ladscape format?

    Hi all,
    can any 1 tell me How to print last page in sap script in ladscape format?
    Thanks In advance.
    Pravin

    Hi Pravin Sherkar,
    we can do this in SAP Scripts.
    we need to create two pages, one of landscape and another of potrait.
    now after filling the data at last we need to call the page which is of format landscape using START_FORM  function module.
    You can use condition &PAGE& = &FORMPAGES&.
    Please check this link
    Printing Portrait/Landscape in sapscript
    Re: Landscape and potrait in same layout?
    http://www.sap-img.com/ts013.htm
    Best regards,
    raam

  • Pages 5.2 opens all kinds of other document formats (even old .doc  Versions), but cannot open Pages 08 etc. of its own kind? I have to use NeoOffice to open my documents of many years of work. Is there an option to organize a corporate com

    Pages 5.2 opens all kinds of other document formats (even old .doc  Versions), but cannot open Pages 08 etc. of its own kind?
    I have to use NeoOffice to open my documents of many years of work.
    Is there an option to organize a corporate complain to Apple to be heard?

    We have been doing nothing but for 10 months.
    Here is the response:

  • Page format for SAP-Script not working in 4.6C

    Hi all,
    I have a problem regarding check printing.
    I am using SAP version 4.6C
    The size of paper for check printing is
              width  = 231 mm
              Height = 304 mm
    So for this I have created a new page format with these details in SPAD.
    Then I assigned this Page format to spool format and assigned that spool format to SAPWIN driver. I have assigned this page format to the SCRIPT that is used for check printing .
    But when I am taking the print out for the check with new page format, the printer don’t print till the end of page, it prints till the total amount on check and then stops there. So this creates an alignment problem when taking printout for multiple checks.
    Please give some solution for this.
    Regards,
    Bharat.

    I guess you are printing on dot matrix printer. If yes, try to do some physical printer settings for the dot matrix printer by following the printer manual. I guess you have to change the page size.. or set default printer settings... it may help you to solve your problem...
    if not goto your device types tab in SPAD and select device types.. select your device from the list (for ex, SAPWIN) click format and goto the format that you have inserted for this device types.. double click on your format, you will see printer Indialization.. try to write code like this
    set page length to 8.5 inch (=52 lines at 6 LPI)
    \e\0x43\0x44
    Note the above hexa decimal value can be obtained by going through the printer manual.
    Close the thread once your question is answered.
    Regards,
    SaiRam

  • Use of "Next paragraph same page" check box in paragraph format of SCRIPT?

    Hi Guys,
    What is the use of "Next paragraph same page" check box in paragraph format of SCRIPT?
    Don't Send me the F1 help ....i am not clear with that help it is quite confusing.
    Provide example if possible.
    Solutions will be rewarded.
    Regards,
    GURU

    Hello.
    You probably know the idea of PROTECT command. It makes that a paragraph wont break in two. If it fit's totaly in one page it will print in that page. If not, it will print totaly in the second page (won't break at the middle).
    The checkbox you are asking, makes the same with two paragraphs. This means that if you have paragraphs A and B (A becomes first) and if paragraph A has that option, the next paragraph won't break, and appear in the second page. If paragraph A is in first page, paragraph B will print in first page too, or they will both print in second page.
    Try it.
    Best regards.
    Valter Oliveira.

  • How to enable java script in my Firefox browser? help its urgent.

    how to enable java script in my Firefox browser? help its urgent.

    go to '''about:config''' and search for '''javascript.enabled''' change its value to '''true'''
    *[http://kb.mozillazine.org/About:config about:config]

  • New Page Format implentation in Sap Scripts and Reports

    Hi,
       I want to print Report details and also some of the SAP Script details on the paper size of 350MM width and 310MM Height in the PORTRAIT format.
       So i created new page format with these dimensions.
       How i can use this for reports. So i can set these parameters while taking output from Report.
       Pls specify if any configuration required for this.
    Thanks in Advance,
    Regards,
    Pavan.

    In SAPscript, you set the Page Format for the document in the "Page Format" field of the "Basic Settings" page of the documents "Header" information. The popup list of this field will show all available formats in your system, so this is a ggod way to make sure your new format is set up properly.
    For reports, page format is set either with the LINE-SIZE addition to the REPORT and NEW-PAGE commands, or through the PARAMETERS addition to the NEW-PAGE command. When you use LINE-SIZE the print system picks the format for you, based on the available formats in the systems.
    I don't remember if there is an activation step for Page Formats, or if saving is all you have to do.

  • Urgent - Not able to Print back page for Last Page in SAP Script.

    Hello All,
    I need to Print back page in SAP Script, I am able to do it by setting print mode as D, but now the problem is, it does not print back page for last page.
    For eg. if there are 3 pages it prints back page for first two. If there is only one page then it does not print back page.
    Please Help.
    Thanks.

    hi,
    Yes, we can print logo as water mark in scripts
    Just do as like this....
    Upload your logo via SE78.
    - Select 'Import' button from application toolbar of SE78, and perform upload.
    and write this code in scripts
    BITMAP 'COMPANY_LOGO' OBJECT GRAPHICS ID BMAP TYPE BCOL 
    regards
    Sankar

  • Page format regarding cheque printing in SAP SCRIPTS

    How to create a page format of our own....so that it prints the contents of that layout exactly into the cheque size?

    hi,
    you need to go to <b>SPAD</b> transaction.
    click of <b>full administration</b>
    and then choose tab  <b>device types</b>-> and then click on <b>format types</b>.
    Regards
    vijay

  • Need help in bdc its urgent

    hai friends
    my reequirement is extracting data from 4.6 c for  purchase order me21 into flat file format.(tab delimitter) .currently we are working on ecc 6 version.i had already written bdc code for me21 in ecc6 version for uploading data.
    please help me its urgent.
    give any sample code for writing extract program

    Hi Friend,
    if it help full to u please give me max point.i am sending code.
    REPORT ZMXX0295 LINE-SIZE 132 NO STANDARD PAGE HEADING.
    +
    Comparisom of PIR or Contract price with latest PO price
    +
    This program was created to compare PIR prices or contract prices
    with the latest PO price.
    It reads the source lists for the specified materials to determine
    the PIR or contract prices. Afterwards it reads the PO history to
    get the purchase order prices.
    The material to be processed can either be selected from the data
    base (material master) or via an PC upload file.
    The output can be sorted in different variants.
    +
    +
    *eject
    Definition of database tables --------------------------------------+
    TABLES: EINA,                     "Purchasing Info Record: General Data
            EINE,                     "PIR: Purchasing Organization Data
            EIPA,                     "Order Price History, Info Record
            EKAB,                     "Contract Release Documentation
            *EKKO,                    "Contract / PO header
            EKKO,                     "Contract / PO header
            *EKPO,                    "Contract / PO item
            EKPO,                     "Contract / PO item
            EORD,                     "Source list
            TCURC.                    "Currency codes
    *eject
    Definition of internal tables / data -------------------------------+
    DATA: BEGIN OF MAT_PRICE OCCURS 0,
            VRTYP LIKE EORD-VRTYP,                   "Document type
            INFNR LIKE EINE-INFNR,                   "Info record / Contract
            MATNR LIKE EINA-MATNR,                   "Material
            WERKS LIKE EINE-WERKS,                   "Plant
            EKORG LIKE EINE-EKORG,                   "Purch. organization
            LIFNR LIKE EINA-LIFNR,                   "Vendor
            FLIFN LIKE EORD-FLIFN,                   "Fix Vendor
            IRPRS LIKE EINE-NETPR,                   "Info record price
            PEINH LIKE EINE-PEINH,                   "Price unit
            EBELN LIKE EIPA-EBELN,                   "PO header
            EBELP LIKE EIPA-EBELP,                   "PO item
            BEDAT LIKE EIPA-BEDAT,                   "PO date
            POPRS LIKE EIPA-LPREI,                   "PO price
            LPEIN LIKE EIPA-LPEIN,                   "Price unit
            MENGE LIKE EKPO-MENGE,                   "PO quantity
            MEINS LIKE EKPO-MEINS,                   "PO unit of measure
          END OF MAT_PRICE.
    DATA: BEGIN OF MAT_SEL OCCURS 0,
            MATNR LIKE EINA-MATNR,
          END OF MAT_SEL.
    DATA: T_EORD LIKE EORD OCCURS 0 WITH HEADER LINE.
    DATA: CURSORFIELD(15),                           "Fieldname of Cusor pos
          INV_DATE LIKE SY-DATUM,                    "Inverted date
          W_EFFPR  LIKE EINE-EFFPR.                  "Hiwi price
    DATA: W_FILE TYPE STRING.                        "JAN29NOV05
    CONSTANTS: C_0(01)    TYPE C VALUE '0',
               C_F(01)    TYPE C VALUE 'F',
               C_I(01)    TYPE C VALUE 'I',
               C_K(01)    TYPE C VALUE 'K',
               C_X(01)    TYPE C VALUE 'X'.
    CONSTANTS: C_ASC(10) TYPE C VALUE 'ASC'.           "JAN29NOV05
    *eject
    Definition of selection screen -------------------------------------+
    SELECTION-SCREEN BEGIN OF BLOCK B01 WITH FRAME TITLE TEXT-B01.
    PARAMETERS:     P_DBASE RADIOBUTTON GROUP R01.   "Read mat's via select.
    SELECT-OPTIONS: S_MATNR FOR EINA-MATNR.          "Material
    SELECTION-SCREEN ULINE.
    PARAMETERS:     P_XFILE RADIOBUTTON GROUP R01,   "Read mat's via PC file
                    P_DATEI LIKE RLGRAP-FILENAME.    "PC file with MATNR's
    SELECTION-SCREEN SKIP.
    SELECT-OPTIONS: S_MATKL FOR  EINA-MATKL,         "Material group
                    S_WERKS FOR  EINE-WERKS,         "Plant
                    S_EKORG FOR  EINE-EKORG,         "Purch. organization
                    S_BEDAT FOR  EIPA-BEDAT.         "PO price date
    PARAMETERS:     P_WAERS LIKE EINE-WAERS          "Output currency
                            OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK B01.
    *eject
    Process after input ------------------------------------------------+
    AT SELECTION-SCREEN ON P_WAERS.
      PERFORM READ_TCURC.
    AT SELECTION-SCREEN ON P_DATEI.
      IF NOT P_XFILE IS INITIAL
         AND P_DATEI IS INITIAL.
        MESSAGE E999(ZZ) WITH 'Please sepcify PC file name'.
      ENDIF.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_DATEI.
      PERFORM CALL_WS_EXPLORER.
    *eject
    Start of main program ----------------------------------------------+
    START-OF-SELECTION.
       IF NOT P_XFILE IS INITIAL.
         PERFORM UPLOAD_MATERIAL_SELECTION.          "Read mat's from file
         IF MAT_SEL[] IS INITIAL.
           MESSAGE E999(ZZ) WITH
                  'No records were found in file'(E01) P_DATEI(40).
         ELSE.
           PERFORM GET_MATERIAL_SELECTION.           "Process upload file
         ENDIF.
       ENDIF.
       PERFORM SOME_REWORK.
       PERFORM PROCESS_MATERIALS.                    "Process mat. selection
    END-OF-SELECTION.
    End of Main program ------------------------------------------------+
      SET PF-STATUS 'LIST'.
      SORT MAT_PRICE BY MATNR WERKS EKORG POPRS.
      PERFORM AUSGABE.
      IF SY-SUBRC EQ 0.
        MESSAGE I999(ZZ) WITH TEXT-002.
        MESSAGE S999(ZZ) WITH TEXT-001
                'Material/Plant/PurchOrg/PO Price'(003).
      ENDIF.
    *eject
    User commands - interactive reporting ...
      AT USER-COMMAND.
        IF SY-UCOMM EQ 'ORDR'.
          PERFORM DISPLAY_ORDER.
        ENDIF.
      AT LINE-SELECTION.
        PERFORM CHANGE_SORT_SEQUENCE.
    *eject
    +
          TOP-OF-PAGE
    +
    TOP-OF-PAGE.
      PERFORM LIST_HEADER.
    *eject
    +
          TOP-OF-PAGE during line-selection.
    +
    TOP-OF-PAGE DURING LINE-SELECTION.
      PERFORM LIST_HEADER.
    *eject
          Form  CALL_WS_EXPLORER
    FORM CALL_WS_EXPLORER.
      CALL FUNCTION 'WS_FILENAME_GET'
         EXPORTING
            DEF_FILENAME     = '*.txt,'  "JAN29NOV05
              DEF_FILENAME     = '*.txt'   "JAN29NOV05
              DEF_PATH         = 'D:\'
              MASK             =
                  Block Changed From Here JAN29NOV05
                  'Text files,.txt,Data files,.dat,All files,.,.'(MSK)
                    ' Text files,.txt,Data files,.dat,All files,.,.'(MSK)
                  Block Changed Till Here JAN29NOV05
              MODE             = 'O'
              TITLE            = 'Upload Materials to be processed'(004)
         IMPORTING
              FILENAME         = P_DATEI
         EXCEPTIONS
              INV_WINSYS       = 1
              NO_BATCH         = 2
              SELECTION_CANCEL = 3
              SELECTION_ERROR  = 4.
    ENDFORM.                    " CALL_WS_EXPLORER
    *eject
          Form  PROCESS_MATERIALS
          Read source list for specified materials and then process
          either PIR or contracts.
    FORM PROCESS_MATERIALS.
      PERFORM READ_MATERIAL_SOURCE_LIST.
      LOOP AT T_EORD.
        CLEAR W_EFFPR.
        TRANSLATE T_EORD-VRTYP USING ' I'.           "Set I = Infor record
        IF T_EORD-VRTYP EQ C_I.
          PERFORM GET_PIR_INFORMATION.
        ELSE.
          T_EORD-FLIFN = T_EORD-FEBEL.
          PERFORM GET_CONTRACT_INFORMATION.
        ENDIF.
      ENDLOOP.
    ENDFORM.                    " PROCESS_MATERIALS
    *eject
          Form  GET_MATERIAL_SELECTION
    FORM GET_MATERIAL_SELECTION.
      SORT MAT_SEL.
      CLEAR S_MATNR.
      S_MATNR-OPTION = 'EQ'.
      S_MATNR-SIGN   = 'I'.
      LOOP AT MAT_SEL WHERE
           MATNR CO ' 0123456789'.
        SHIFT MAT_SEL-MATNR RIGHT DELETING TRAILING ' '.
        TRANSLATE MAT_SEL-MATNR USING ' 0'.
        S_MATNR-LOW = MAT_SEL-MATNR.
        APPEND S_MATNR.
      ENDLOOP.
    ENDFORM.                    " GET_MATERIAL_SELECTION
          Form  READ_EIPA
    FORM READ_EIPA.
      SELECT EBELN EBELP BEDAT
             INTO CORRESPONDING FIELDS OF EIPA
             FROM EIPA
             UP TO 1 ROWS
             WHERE INFNR EQ EINA-INFNR
             AND   WERKS EQ T_EORD-WERKS
             AND   EKORG EQ T_EORD-EKORG
             AND   BEDAT IN S_BEDAT
             ORDER BY BEDAT DESCENDING.
        PERFORM READ_ADDITIONAL_PO_DATA
                USING EIPA-EBELN EIPA-EBELP.
        CHECK SY-SUBRC EQ 0.
        PERFORM FILL_MAT_PRICE USING 'X' EINA-INFNR
                EINE-EFFPR EINE-PEINH EINE-WAERS.
        APPEND MAT_PRICE.
      ENDSELECT.
    ENDFORM.                    " READ_EIPA
    *eject
          Form  FILL_MAT_PRICE
    FORM FILL_MAT_PRICE USING
    *ID X_EBELN X_EFFPR X_PEINH X_WAERS                  "JAN29NOV05
       Block added from here JAN29NOV05
                               ID      TYPE C
                               X_EBELN TYPE C
                               X_EFFPR TYPE EINE-EFFPR
                               X_PEINH TYPE EINE-PEINH
                               X_WAERS TYPE EINE-WAERS.
       Block added till here JAN29NOV05
      CLEAR MAT_PRICE.
      IF X_WAERS NE P_WAERS.
        PERFORM CONVERT_TO_OTHER_CURRENCY USING
                X_EFFPR X_WAERS P_WAERS.
      ENDIF.
      MAT_PRICE-VRTYP = T_EORD-VRTYP.                "PIR / Contract no.
      MAT_PRICE-INFNR = X_EBELN.                     "PIR / Contract no.
      MAT_PRICE-MATNR = T_EORD-MATNR.                "Material
      MAT_PRICE-LIFNR = T_EORD-LIFNR.                "Vendor
      MAT_PRICE-FLIFN = T_EORD-FLIFN.                "Fix Vendor
      MAT_PRICE-WERKS = T_EORD-WERKS.                "Plant
      MAT_PRICE-EKORG = T_EORD-EKORG.                "Purch. organization
      MAT_PRICE-IRPRS = X_EFFPR.                     "PIR / Contract price
      MAT_PRICE-PEINH = X_PEINH.                     "PIR / Contract pr.unit
      CHECK ID NE SPACE.                             "PO history found ?
    latest PO data ...
      IF EKKO-WAERS NE P_WAERS.
        PERFORM CONVERT_TO_OTHER_CURRENCY USING
                EKPO-EFFWR EKKO-WAERS P_WAERS.
      ENDIF.
      MAT_PRICE-EBELN = EKPO-EBELN.                  "PO number
      MAT_PRICE-EBELP = EKPO-EBELP.                  "PO item
      MAT_PRICE-BEDAT = EKKO-BEDAT.                  "PO date
      IF EKPO-MENGE NE 0.
        MAT_PRICE-POPRS = EKPO-EFFWR / ( EKPO-MENGE  "Last PO price = value
    EKPO-BPUMZ / EKPO-BPUMN ). " / Qty. in sales unit
      ELSE.
        MAT_PRICE-POPRS = EKPO-EFFWR.                "Last PO value
      ENDIF.                                         "PO price unit
      MAT_PRICE-LPEIN = EKPO-PEINH.                  "PO price unit
      MAT_PRICE-MENGE = EKPO-MENGE.                  "PO quantity
      MAT_PRICE-MEINS = EKPO-MEINS.                  "PO unit of measure
    ENDFORM.                    " FILL_MAT_PRICE
    *eject
          Form  CONVERT_TO_OTHER_CURRENCY
    FORM CONVERT_TO_OTHER_CURRENCY USING
                           XVALUE FR_CURR TO_CURR.     "JAN29NOV05
       Block added from here JAN29NOV05
                               XVALUE  TYPE ANY
                               FR_CURR TYPE EKKO-WAERS
                               TO_CURR TYPE EINE-WAERS.
       Block added till here JAN29NOV05
      CALL FUNCTION 'MS_CONVERT_TO_OTHER_CURRENCY'
           EXPORTING
                DATE             = SY-DATUM
                FROM_CURRENCY    = FR_CURR
                FROM_AMOUNT      = XVALUE
                TO_CURRENCY      = TO_CURR
                COMPANY_CURRENCY = 'EUR'
           IMPORTING
                TO_AMOUNT        = XVALUE
           EXCEPTIONS
                OTHERS           = 1.
      IF SY-SUBRC NE 0.
        MESSAGE E999(ZZ) WITH 'Currency conversion error from'(E02)
                              FR_CURR 'to' TO_CURR.
      ENDIF.
    ENDFORM.                    " CONVERT_TO_OTHER_CURRENCY
    *eject
          Form  UPLOAD_MATERIAL_SELECTION
    FORM UPLOAD_MATERIAL_SELECTION.
       Block commented from here JAN29NOV05
    CALL FUNCTION 'WS_UPLOAD'
          EXPORTING
               FILENAME            = P_DATEI
               FILETYPE            = 'DAT'
          TABLES
               DATA_TAB            = MAT_SEL
          EXCEPTIONS
               CONVERSION_ERROR    = 1
               FILE_OPEN_ERROR     = 2
               FILE_READ_ERROR     = 3
               INVALID_TABLE_WIDTH = 4
               INVALID_TYPE        = 5
               NO_BATCH            = 6
               UNKNOWN_ERROR       = 7
               OTHERS              = 8.
       Block commented till here JAN29NOV05
       Block added from here JAN29NOV05
      MOVE P_DATEI TO W_FILE.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
       FILENAME                      =  W_FILE
       FILETYPE                      =  C_ASC
       HAS_FIELD_SEPARATOR           =  C_X
      TABLES
        DATA_TAB                     = MAT_SEL
    EXCEPTIONS
       FILE_OPEN_ERROR               = 1
       FILE_READ_ERROR               = 2
       NO_BATCH                      = 3
       GUI_REFUSE_FILETRANSFER       = 4
       INVALID_TYPE                  = 5
       NO_AUTHORITY                  = 6
       UNKNOWN_ERROR                 = 7
       BAD_DATA_FORMAT               = 8
       HEADER_NOT_ALLOWED            = 9
       SEPARATOR_NOT_ALLOWED         = 10
       HEADER_TOO_LONG               = 11
       UNKNOWN_DP_ERROR              = 12
       ACCESS_DENIED                 = 13
       DP_OUT_OF_MEMORY              = 14
       DISK_FULL                     = 15
       DP_TIMEOUT                    = 16
       OTHERS                        = 17.
       Block added till here JAN29NOV05
      IF SY-SUBRC NE 0.
        MESSAGE E999(ZZ) WITH 'Error uploading from file'
                         P_DATEI(40).
      ENDIF.
    ENDFORM.                    " UPLOAD_MATERIAL_SELECTION
    *eject
          Form  AUSGABE
    FORM AUSGABE.
      LOOP AT MAT_PRICE.
        FORMAT COLOR 1 INTENSIFIED OFF.
        WRITE: /01 MAT_PRICE-VRTYP,                  "Document type
                03 MAT_PRICE-INFNR,                  "Info record / Contract
                14 MAT_PRICE-MATNR,                  "Material
                23 MAT_PRICE-WERKS,                  "Plant
                28 MAT_PRICE-EKORG,                  "Purch. organization
                33 MAT_PRICE-LIFNR,                  "Vendor
                44 MAT_PRICE-FLIFN,                  "Fixed Vendor
                46 MAT_PRICE-IRPRS NO-SIGN,          "Info record price
                61 MAT_PRICE-PEINH NO-SIGN.          "IR price unit
        FORMAT COLOR 2 INTENSIFIED.
        IF NOT MAT_PRICE-EBELN IS INITIAL.
          WRITE:  68 MAT_PRICE-POPRS NO-SIGN,        "PO price
                  83 MAT_PRICE-LPEIN NO-SIGN,        "PO price unit
                  90 MAT_PRICE-MENGE,                "PO quantity
                 107 MAT_PRICE-MEINS,                "PO unit of measure
                 111 MAT_PRICE-EBELN,                "PO number
                 123 MAT_PRICE-BEDAT.                "PO date
        ELSE.
          WRITE:  74 'No PO price was found'(005),
                 132 ' '.
        ENDIF.
        HIDE MAT_PRICE-VRTYP.
        AT END OF MATNR.
          SKIP.
        ENDAT.
      ENDLOOP.
      CLEAR MAT_PRICE.
    ENDFORM.                    " AUSGABE
    *eject
          Form  READ_TCURC
    FORM READ_TCURC.
      CLEAR TCURC.
      TCURC-WAERS = P_WAERS.
      READ TABLE TCURC.
      IF SY-SUBRC NE 0.
        MESSAGE E999(ZZ) WITH P_WAERS 'Currency code invalid'(E03).
      ENDIF.
    ENDFORM.                    " READ_TCURC
    *eject
          Form  LIST_HEADER
    FORM LIST_HEADER.
      FORMAT INTENSIFIED.
      WRITE: /01 'Output currency'(006), 25 ': ', P_WAERS,
             122 'Page'(007), SY-PAGNO,
             /01 'Plant'(008), 25 ':  from '(009), S_WERKS-LOW,
              46 'to '(010), S_WERKS-HIGH,
             /01 'Purchasing Organization'(011),
              25 ':  from '(009), S_EKORG-LOW,
              46 'to '(010), S_EKORG-HIGH,
             /01 'PO date'(012), 25 ':  from '(009), S_BEDAT-LOW,
              46 'to '(010), S_BEDAT-HIGH.
      ULINE.
      FORMAT COLOR 1.
      WRITE: /01 TEXT-T01.
      ULINE.
    ENDFORM.                    " LIST_HEADER
    *eject
          Form  CHANGE_SORT_SEQUENCE
    FORM CHANGE_SORT_SEQUENCE.
      GET CURSOR FIELD CURSORFIELD.
      CASE CURSORFIELD+10(5).
        WHEN 'EKORG'.
          SORT MAT_PRICE BY MATNR EKORG POPRS.
          PERFORM AUSGABE.
          MESSAGE S999(ZZ) WITH TEXT-001
                  'Material/Purch.Organization/Info Rec.Price'(013).
        WHEN 'BEDAT'.
          SORT MAT_PRICE BY MATNR BEDAT POPRS.
          PERFORM AUSGABE.
          MESSAGE S999(ZZ) WITH TEXT-001
                  'Material/PO Date/Info Rec.Price'(014).
        WHEN 'IRPRS'.
          SORT MAT_PRICE BY MATNR IRPRS.
          PERFORM AUSGABE.
          MESSAGE S999(ZZ) WITH TEXT-001
                  'Material/Plant/Info Rec.Price'(015).
        WHEN 'POPRS'.
          SORT MAT_PRICE BY MATNR POPRS.
          PERFORM AUSGABE.
          MESSAGE S999(ZZ) WITH TEXT-001
                  'Material/Plant/PO Price'(016).
        WHEN 'LIFNR'.
          SORT MAT_PRICE BY MATNR LIFNR POPRS.
          PERFORM AUSGABE.
          MESSAGE S999(ZZ) WITH TEXT-001
                  'Material/Vendor/PO Price'(017).
        WHEN OTHERS.
          SORT MAT_PRICE BY MATNR WERKS EKORG POPRS.
          PERFORM AUSGABE.
          MESSAGE S999(ZZ) WITH TEXT-001
                  'Material/Plant/PurchOrg/PO Price'(018).
      ENDCASE.
      SY-LSIND = 0.
    ENDFORM.                    " CHANGE_SORT_SEQUENCE
    *eject
          Form  DISPLAY_ORDER
    FORM DISPLAY_ORDER.
      DATA: X_BELNR(10) TYPE C.
      CLEAR CURSORFIELD.
      GET CURSOR FIELD CURSORFIELD.
      IF CURSORFIELD+10(5) NE 'EBELN' AND
         CURSORFIELD+10(5) NE 'INFNR'.
        MESSAGE I999(ZZ) WITH 'Invalid cursor position'.
        EXIT.
      ENDIF.
      GET CURSOR FIELD CURSORFIELD  VALUE X_BELNR.
      CASE CURSORFIELD+10(5).
        WHEN 'EBELN'.                                "Purchase order
          SET PARAMETER ID 'BES' FIELD X_BELNR.
          CALL TRANSACTION 'ME23' AND SKIP FIRST SCREEN.
        WHEN 'INFNR'.                                "Info rec. / Contract
          IF MAT_PRICE-VRTYP EQ C_I.                 "Info Record ...
            SET PARAMETER ID 'INF' FIELD X_BELNR.
            CALL TRANSACTION 'ME13' AND SKIP FIRST SCREEN.
          ELSE.                                      "Contract ...
            SET PARAMETER ID 'VRT' FIELD X_BELNR.
            CALL TRANSACTION 'ME33' AND SKIP FIRST SCREEN.
          ENDIF.
      ENDCASE.
      CLEAR MAT_PRICE.
    ENDFORM.
    *eject
          Form  SOME_REWORK
    FORM SOME_REWORK.
       IF NOT S_BEDAT-LOW IS INITIAL AND             "Align date for output
          S_BEDAT-HIGH IS INITIAL.
         S_BEDAT-HIGH = S_BEDAT-LOW.
         MODIFY S_BEDAT INDEX 1.
       ENDIF.
       CONVERT DATE SY-DATUM INTO INVERTED-DATE      "today's inverted date
               INV_DATE.
    ENDFORM.                    " SOME_REWORK
    *eject
          Form  READ_ADDITIONAL_PO_DATA
    FORM READ_ADDITIONAL_PO_DATA USING
                                  X_EBELN X_EBELP.  "JAN29NOV05
       Block added from here JAN29NOV05
                                    X_EBELN TYPE EIPA-EBELN
                                    X_EBELP TYPE EIPA-EBELP.
       Block added till here JAN29NOV05
      SELECT SINGLE WAERS BEDAT
             INTO CORRESPONDING FIELDS OF EKKO
             FROM EKKO
             WHERE EBELN EQ X_EBELN.
      SELECT SINGLE EBELN EBELP MENGE MEINS
                    PEINH EFFWR BPUMZ BPUMN
             INTO CORRESPONDING FIELDS OF EKPO
             FROM EKPO
             WHERE EBELN EQ X_EBELN
             AND   EBELP EQ X_EBELP
             AND   LOEKZ NE 'L'.
    ENDFORM.                    " READ_ADDITIONAL_PO_DATA
    *eject
          Form  READ_MATERIAL_SOURCE_LIST
          Read source list entries for specified materials
    FORM READ_MATERIAL_SOURCE_LIST.
      SELECT * INTO CORRESPONDING FIELDS OF TABLE T_EORD
             FROM EORD
             WHERE MATNR IN S_MATNR
             AND   WERKS IN S_WERKS
             AND   EKORG IN S_EKORG
             AND   VDATU LE SY-DATUM
             AND   BDATU GE SY-DATUM
             AND ( VRTYP EQ SPACE
             OR    VRTYP EQ C_K ).
      IF SY-SUBRC NE 0 OR
         T_EORD[] IS INITIAL.
        MESSAGE S999(ZZ) WITH 'No data found for this selection'(S01).
      ENDIF.
    ENDFORM.                    " READ_MATERIAL_SOURCE_LIST
    *eject
          Form  GET_PIR_INFORMATION
          Process purchase info records --> purchase order history
    FORM GET_PIR_INFORMATION.
      SELECT INFNR
             INTO EINA-INFNR
             FROM EINA
             WHERE LIFNR EQ T_EORD-LIFNR
             AND   MATNR EQ T_EORD-MATNR
             AND   MATKL IN S_MATKL
             AND   LOEKZ EQ SPACE.
        SELECT SINGLE EFFPR PEINH WAERS
               INTO CORRESPONDING FIELDS OF EINE
               FROM EINE
               WHERE INFNR EQ EINA-INFNR
               AND   EKORG EQ T_EORD-EKORG
               AND   ESOKZ EQ C_0
               AND   WERKS EQ T_EORD-WERKS
               AND   LOEKZ EQ SPACE.
        CHECK SY-SUBRC EQ 0.
        PERFORM READ_EIPA.                           "Read PO history
        IF SY-SUBRC NE 0.
          PERFORM FILL_MAT_PRICE USING ' ' EINA-INFNR
                  EINE-EFFPR EINE-PEINH EINE-WAERS.
          APPEND MAT_PRICE.
        ENDIF.
      ENDSELECT.
    ENDFORM.                    " GET_PIR_INFORMATION
    *eject
          Form  GET_CONTRACT_INFORMATION
          text
    FORM GET_CONTRACT_INFORMATION.
      SELECT SINGLE WAERS
             INTO *EKKO-WAERS
             FROM EKKO
             WHERE EBELN EQ T_EORD-EBELN
             AND   LOEKZ EQ SPACE.
      SELECT SINGLE EBELN EBELP EFFWR PEINH
                    KTMNG BPUMZ BPUMN
             INTO CORRESPONDING FIELDS OF *EKPO
             FROM EKPO
             WHERE EBELN EQ T_EORD-EBELN
             AND   EBELP EQ T_EORD-EBELP
             AND   LOEKZ EQ SPACE.
      CHECK SY-SUBRC EQ 0.
    Get effective price in sales unit ...
      IF *EKPO-KTMNG EQ 0 OR
         *EKPO-BPUMN EQ 0.
        W_EFFPR = *EKPO-EFFWR.
      ELSE.
        W_EFFPR = *EKPO-EFFWR / *EKPO-KTMNG
    *EKPO-BPUMZ / *EKPO-BPUMN.
      ENDIF.
      PERFORM READ_EKAB.
      IF SY-SUBRC NE 0.
        PERFORM FILL_MAT_PRICE USING ' ' *EKPO-EBELN
                W_EFFPR *EKPO-PEINH *EKKO-WAERS.
        APPEND MAT_PRICE.
      ENDIF.
    ENDFORM.                    " GET_CONTRACT_INFORMATION
    *eject
          Form  READ_EKAB
          Read released document (PO's) of contract
    FORM READ_EKAB.
      SELECT EBELN EBELP BEDAT
             INTO CORRESPONDING FIELDS OF EKAB
             FROM EKAB
             UP TO 1 ROWS
             WHERE KONNR EQ T_EORD-EBELN
             AND   KTPNR EQ T_EORD-EBELP
             AND   WERKS EQ T_EORD-WERKS
             AND   EKORG EQ T_EORD-EKORG
             AND   BEDAT IN S_BEDAT
             AND   BSTYP EQ C_F
             ORDER BY BEDAT DESCENDING.
        PERFORM READ_ADDITIONAL_PO_DATA
                USING EKAB-EBELN EKAB-EBELP.
        CHECK SY-SUBRC EQ 0.
        PERFORM FILL_MAT_PRICE USING 'X' T_EORD-EBELN
                W_EFFPR *EKPO-PEINH *EKKO-WAERS.
        APPEND MAT_PRICE.
      ENDSELECT.
    ENDFORM.                    " READ_EKAB

Maybe you are looking for

  • How do I delete songs from icloud that aren't on my itunes?

    I have songs that only show up when I turn OFF the option that says "Show All Music" (Settings > Music), but not when that option is enabled. I don't know where to delete these songs, as they aren't showing on my computer either. Thanks for any help.

  • Tomcat error when posting on netpro

    Is there a way to make that tomcat error go away? (when I post I get an error, then I have to go back to the post and edit it to put in the actual text of the post and it sticks.) Just like I had to do on this one.

  • IPod wi-fi

    My iPod touch hasn't been used in three months, and when I tried using it again I couldn't connect to the internet even though i had wifi. So I connected it to iTunes and reset everything, as well as doing it on my iPod. But I still can't get onto th

  • Proceso en fondo

    Como estan generando sus XLM para timbrado real?. Nosotros solo podemos generar los XLM "in front". Ahi podemos bajarlo y enviarlo a timbrar, el problema aque es el numero de empleados que manejamos. Cada site con mas de 3 empleados. Si lo ejecutamos

  • I cannot upload picture using FACEBOOK app. for BB Tour.

    it keeps showing this. can someone help me out? thank you so much.