Print in different page for different material type in Sapscript

Hi all
How do I do the above matter?
Currently I have a script that print all material according to some condition.
My client request to have a different page of material list for different material type.
Please advise
az

Hi,
1) Sort the internal table by material type.
call func 'OPEN_FORM'.
loop at itab.
at new mattype.
if mattype = 'A'.
  call fun 'START_FORM'.
   exporting
    page   =    'PAGEA'.
elseif mattype = 'B'.
  call fun 'START_FORM'.
   exporting
    page   =    'PAGEB'.
endat.
call func 'WRITE_FORM'.
AT end of mattype.
call function 'END_FORM'.
endat.
endloop.
call function 'CLOSE_FORM'.
Thanks,
Nethaji.

Similar Messages

  • How to prevent  a printing of Delivery Note for Spcecific Material Type

    Hi,
    I had a requirement wherein it was required to "Prevent Mask Delivery notes from printing to Shipping dept"
      addition info:  All delivery notes are currently set to print in shipping. We can put in a logic to prevent the printing of
      delivery note for a specific material type (like mask)
      for this i used copy control routine 'RV61B902' in the include  for tcode vl02n or vl01n..
      my logic is fine..
    include 'RV61B902'.
    sy-subrc = 0.
    DATA : w_matnr LIKE lips-MATNR.
    IF T683S-KSCHL = 'LD00'.
      IF sy-tcode = 'VL01N' OR SY-TCODE = 'VL02N'.
        select  matnr into w_matnr  from lips where vbeln eq komkbv2-vbeln.
          condense w_matnr.
          if W_matnr cs '*MASK'.
              SY-SUBRC = 4.
              exit.
            endif.
        ENDSELECT.
      ENDIF.
      ENDIF.
      question : My check was overwritten by the subsequent logic
    please advise.
    ESWAR
    Edited by: tarakeswar  rao on Nov 5, 2008 3:39 PM

    end user wants output to be stopped right, that will be controlleed in Output requirement only.
    What does that has to do witj copy control. It will not do anything in your case

  • Same item used in different pages & for different tables

    Hi,
    i created some items, which work like a filter for my tables. I've got a lot of tables and the items have always the same function. They filter the same column but they're used for different tables! If i want to copy 1 item to another page, it's forbidden to use the same name again and that's the reason why I've got to customize every item for every page. I can copy the items but i have to change the name and thats why i have to update the item name in my SQL Query & the Tablename. All which is marked i have to change for every page(new table)!
    where upper(TABLENAME) like '%' || upper(:P158_FILTER_TABLENAME) || '%'
    AND upper(KEYVALUE) like '%' || upper(:P158_FILTER_KEYVALUE) || '%'
    AND DATE_INSERTED_PDW >= to_date(:P158_FILTER_DATE_INSERTED_PDW,'DD.MM.YYYY')
    P158_FILTER_TABLENAME:
    select distinct TABLENAME d, TABLENAME r
    from ERR_MAPL //it's the tablename I have to update it on every new page/table
    order by 1
    By a Process I created i have the same Problem it's the same Process, it's only used in differnet tables:
    BEGIN
    FOR ii IN 1 .. WWV_Flow.g_f01.COUNT -- the row selector
    LOOP
    UPDATE ERR_MAPL SET RELOAD_FLAG = 1
    WHERE ERR_ID = WWV_Flow.g_f02(WWV_Flow.g_f01(ii));
    END LOOP;
    END;
    THX Mat
    Message was edited by:
    user552848

    Hi Carl Rutter,
    You have to creat 2 special production order for this item. when issue the component make sure you issue the stock as per the cosumption becaue one have 10mmx10mm and the another item have 50x50 in this case you issue component by square inch wise. for example 10*10 = 100 squre inch.
    50*50 = 2500 square inch so the cost will be approtionate. you can Use multiple uom method to obtain this, other wise you have covert into stock then you issue the component. If you want traxk size wise ,you can use batch option for Finishe goods.
    Regards
    Sridharan

  • Different layouts for different pages

    hi all,
    i have created a form in which there are 5 output pages but the print preview shows only the first page out of 5.i want to go to the next page.plz help how would i do that.and  i want different layouts for different pages.
    thnks n regards,
    mukesh.

    Hi Mukesh,
    Read these lines which has been given in help.sap.com and also go through the link given below.
    Main Window on Several Draft Pages :
    if you want the pages on which a table with items is printed to have different layouts. Height and position of the main window may differ on the different pages, but the width must remain the same throughout.
    [Main Window|http://help.sap.com/saphelp_nw70/helpdata/en/b1/243fdabeee11d4b633006094192fe3/content.htm]
    Regards,
    Sravanthi

  • How to Maintain two different prices for same material in different qty?

    Dear all,
    How to maintain two different prices for same material in different batch quantities in purchase order(ie.,info record)?
    (Vendor is supplying quantities in 2 different batches & also in different prices)
    Expecting valuable reply.
    Jeyakanthan

    In a PO you can create 2 items, and each item can be maintained with a different price in the conditions.
    In info record it is not possible to have different prices for the same period, except for scales.
    so if you have a price of e.g. 2 USD for 1000 kg and 1,90 USD for 2000 kg then you can maintain this in scales, but you still have to have 2 items in the PO so that each one can individually find its price.
    Alternative you can create contracts (as well with more than one item) to reflect the different prices and batches.

  • Print different pages in different computers

    Hi Gurus,
    I am using BIP standalone 10.1.3.4. My report seems showing different pages in different computers when I try to print in pdf format. Is there any way to solve it
    E.g.
    Computer A ->7 pgs when I press view in pdf
    Computer B -> 9 pgs when I press view in pdf
    Both on the same template
    Rgds,
    Raymond

    Hi Raymond
    Seeing as the document is generated on the server ie the client has nothing to do with it other than requesting the document I can not see how its generating an extra two pages on one of the clients. Whats the difference between the two documents? Same amount of data?
    Regardsa
    Tim

  • How can i set different font for different tabs/pages

    I want to set different fonts for different tabs/pages?
    is it possible to do the same? If yes how?
    I can change the fonts under tools>options>contents>advanced. but that changes global settings.
    tried some add ons too- but that too changes the global settings.
    some pages like tweetdeck do not display icons etc properly under custom fonts.
    when i check "allow pages to select their own font" tweetdeck shows up fine but a number of other pages show fonts that are too big or some non standard fonts.
    Is there a way where i can select site default fonts for some sites/tabs, and custom fonts for other sites/tabs?
    otherwise i have to open different sites in different browsers- say i use my custom fonts- which apply globally, and open tweetdeck etc in Internet Explorer or Chrome etc. if i can have all tabs in one window/browser, that would be great.

    It's not a built-in feature to override a page's styles on a tab-by-tab or site-by-site basis, but perhaps someone has created an add-on for this?
    It also is possible to create style rules for particular sites and to apply them using either a userContent.css file or the Stylish extension. The Greasemonkey extension allows you to use JavaScript on a site-by-site basis, which provides further opportunity for customization. But these would take time and lots of testing to develop and perfect (and perfection might not be possible)...
    Regarding size, does the zoom feature help solve that part? In case you aren't familiar with the keyboard and mouse shortcuts for quickly changing the zoom level on a page, this article might be useful: [[Font size and zoom - increase the size of web pages]].

  • Customisation for PO Release (different Values for different Doc Types)

    Dear Experts,
    I need to configure for PO release procedure where in the Characteristics would be Plant (2 Plants), Doc Type (3 types - Standard PO, Imports PO & Capital PO) and Value (2 stage release: 0-100000 & >100000 INR for Std PO, 0-200000 & >200000 INR for Imports PO and 0-300000 & >300000 INR for Capital PO).
    Please let me know where I shoud define the different Values for different Docs for the Release procedure to work properly.
    Or let me know the entire procedure for achieving the same.
    Regards,
    MNP

    Hi MNP,
    You have to create different CLASSes in IMG with the possible combination of different characteristics,
    EX. CLASS EKKO11 - Plant A, Doc type- Std PO, Value- 0-100000 & >100000 INR
          CLASS EKKO22-  Plant A, Doc type- Import PO, Value-  0-200000 & >200000 INR
          CLASS EKKO33-  Plant A, Doc type- Capital PO, Value-  0-300000 & >300000 INR  and same for other plant
    then assign these classes to the respective Release group.
    regards,
    Pravin

  • Different sources for different Opportunity transaction types

    Hi Experts,
    We have a requirement where we have two different Opportunity transaction types: Sales and Service Opportunity.
    Now we want to have different surces for these opportunity types i.e. Sales Opportunity Sources should not be viisble in Service Opportunity and vice-versa.
    In SPRO, I checked we can maintain sources but can not link it to a specfic transaction type.
    Any views on how can we achieve this?
    Regards
    Aakshi Suri

    Hi Aakshi,
    You can dynamically determine the follow up transaction types for the sources apart from what is maintained
    in the customizing. It is not the sources that are maintained in the customizing, instead the target transaction types
    are maintained in the sources. So you have to implement your requirement at the source level.
    Regards,
    Leon

  • How to set different header for different Standard report page

    How to set different header for different Standard report page

    Hi,
    A easy answer would be use the 'set report header text.vi' but maybe you are talking about something else ?

  • "Mfr part profile" setup for various material types

    Hello All,
    I'd like to set a default value of "Mfr part profile" field ("Purchasing" screen in 01 Std industry sequence) different for various material types. Currently I have 2 entries maintained in MaterialsManagement>Purchasing>MaterialMaster>DefineManufacturerPartProfile (one with AMPL management and one without). I'd like to get the first entry set as default for HAWA material type and the 2nd for ROH.
    Thanks in advance for your help on this!
    Jacek

    Hi Troinski,
    Its not possible in SAP, you can create Z transaction for create material wth dafult values.
    Thanks
    Bala

  • Tabular form - Different LOV for different rows

    In a tabular form column, is it possible to have a select list whose values depend on some other column in the row? There doesn't appear to be a way to use #COL# notation to refer to current row values in the LOV query definition.
    Ideas? Thanks

    Hi Scott,
    Thanks ..I formed some idea about APEX_UTIL.KEYVAL_NUM. I have a problem where I am not able to decide if I can make use of this package and solve..
    Can you please have a look at this thread.. Re: Tabular form - Different LOV for different rows
    I have a SQL which populates a tabular form on the page.Coulmn1 some text, Column 2 is to show a drop down as YES and NO. i am trying to freeze the option for rows 2,3,4 as NO, if the Option choosen in first is NO.
    So, what I am trying to ask is..can I save my first selection in a global variable and use it in where clause of [select list query] the second drop down..Not sure how I can do this..Appreciate if you can show me a direction.
    Thanks,
    Chaitu.

  • Purchasing info records with different prices for different packaging

    Hi,
    hope, someone can help me.
    We have different prices for different kind of packaging, but all the material is bought in the same unit, i.e. kg.
    Let's say, usually you buy x kg in a drum, but sometimes you buy y (or x) kg in a bottle or in a bag.
    We won't allow variable order units. Even if we would, it's not helpful, because we always order kg.
    So the price depends on a criterion - I don't know, which to take. And we want to maintain the different prices in the info records.
    Is there a solution?

    Hi.
    I went through the history of the problem.It seems that your base unit of measure is KG.Also you have mentined that same material is used in various plants.
    You need to activate the variable ordering unit  2  in material master. This is present in the materila master Purchasing tab.Also note that this data is maintained at plant level. This will not have any impact on the materials which are presnt in the other plants.
    After activating variable order unit in materal master. You need maintains the conversion factors from Order units to Base UOM.(Eg 1 KG = 1 KG, 1BOX = 10 KG etc)
    Create inforecord for the material and maintain price in Base unit of measure.
    In PO enter the order unit as BOX system will automatically calculate the price of BOX based on the conversion factors which are maintained in the material master.
    I belive this is the simple and best solution for your requirement..
    If you have any suggestions please let me know
    Cheers
    Umakanth

  • I new to java but how do you load different settings for different browers?

    Let's say i want the page to be font size 6 on FF but size 8 on IE. I know there is a code like "if firefox" but i'm not sure how to set it up.

    I agree with the previous posts. I think it would be better to learn the fundamentals rather than spend time tweeking a web page for different browsers.
    A java web site is made up of several technologies in addition to java such as javascript, xhml, sql, tomcat, etc, etc in addition to java specialties such as JSP and Servlets that you should learn before tweeking a web page. I suggest reading whole books on these topics such as starting with 'Thinking in Java' (I wonder if I can get a commission from the authors for recommending their book so often in these posts?)

  • Showing different exceptions for different ResultSetTypes??

    For the code below, I am getting different exceptions for different ResultSet types.
    ResultSet rs = stmt.executeQuery("Select * from usermaster");
    rs.absolute(3);
    rs.updateString("emailID", "newID");
    rs.updateRow();
    For ResultSet -> ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY, I am getting following exception
    java.sql.SQLException: [Microsoft][ODBC SQL Server Driver]Invalid attribute/option identifier
         at sun.jdbc.odbc.JdbcOdbcResultSet.setPos(JdbcOdbcResultSet.java:5017)
         at sun.jdbc.odbc.JdbcOdbcResultSet.updateRow(JdbcOdbcResultSet.java:4009)
         at DBConnector.<init>(DBConnector.java:56)
    For ResultSet -> ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE, I am getting following exception
    java.sql.SQLException: [Microsoft][ODBC SQL Server Driver]String data, right truncation
         at sun.jdbc.odbc.JdbcOdbcResultSet.setPos(JdbcOdbcResultSet.java:5017)
         at sun.jdbc.odbc.JdbcOdbcResultSet.updateRow(JdbcOdbcResultSet.java:4009)
         at DBConnector.<init>(DBConnector.java:56)
    I am using SQL Server 2000, and JDK1.4 beta.
    I am not able to identify what is going wrong here? Please help

    ResultSet.absolute(int) is a JDBC 2.0 function,
    currently most JDBC-ODBC driver only support jdbc
    1.1,
    check your jdbc driver.
    It is so common why there is no compilation error, but
    throw exception in Production.
    RexI have JDBC2.0

Maybe you are looking for