Creating a service report using SQVI

Hi experts
I am creating a service report using SQVI
The report should have the following fiels
SrvPO No | SrvPO Data | vendor | Stata  | City | Type of Srv (Ad\banner|maintnc.)  | Amount | Status(open or closed)
I am using the following tables using table join fnc
1. EKKO
  EBELN-PO No
AEDAT - PO Data
LIFNR - Vendor
PROCSTAT - Status of PO doc
2.LIFNR
REGIO - State
ORTO1 - City
3. ESSR
TXZ01 - Type of Service (Short text)
4.EKPO
NETWE - Net amount of PO
All the tables are legally join but after executing I am not able to fetch any data or hardly one service PO.
And the selection field will be only From Date and To date.or the Service PO No.
Immediate response is urgent
Regards
Partha

Moderator message: you said your  issue is solved but did not mark your discussion as such, please see
How to close a discussion and why

Similar Messages

  • Creating a service order using FM

    Hello everyone,
    I am new to CRM technical. I have a requirement to create a service order using standard function module passing only 3 parametrs like category1, category2 and short text. How should I start the report. Can anyone help me in posting the code and the approach.
    Thanks in advance!

    Hi Sandeep,
    The best approach to learn this development is to debug the standard functionality by providing the data which you need in your requirement. Then you will get familiar with what are structures which needs to be populated and send to One Order API - CRM_ORDER_MAINTAIN.
    This above mentioned API will be the one which you need to use in the creation of Service Order. So, you can also search with the above mentioned Module.
    Hope this helps. Scan the Forum for FAQ's on problems that you might get in the development.
    Thanks,
    Samantak.

  • Creating a sample report using JAVA SDK

    Hi,
    I am trying to create a sample report using JAVA SDK.
    I slelect 4 "free cells" and pass 4 different strings to it.
    I even slelect the font colour and size. When i run the class and try to view the report in Infoview, I only seeblank blocks without any data. Now if I edit the report from infoview, and save the changes, I am able to see the data.
    My issue is, Why am I not able to see the data when I run the java code.
    Please find teh code below.
    package com;
    import java.awt.Color;
    import java.io.FileOutputStream;
    import java.util.ArrayList;
    import java.util.Date;
    import java.util.List;
    import com.businessobjects.rebean.wi.BinaryView;
    import com.businessobjects.rebean.wi.DataProvider;
    import com.businessobjects.rebean.wi.DataProviders;
    import com.businessobjects.rebean.wi.DataSource;
    import com.businessobjects.rebean.wi.DataSourceObject;
    import com.businessobjects.rebean.wi.DocumentInstance;
    import com.businessobjects.rebean.wi.DocumentLocaleType;
    import com.businessobjects.rebean.wi.FontImpl;
    import com.businessobjects.rebean.wi.FreeCell;
    import com.businessobjects.rebean.wi.HTMLView;
    import com.businessobjects.rebean.wi.OutputFormatType;
    import com.businessobjects.rebean.wi.PageHeaderFooter;
    import com.businessobjects.rebean.wi.Query;
    import com.businessobjects.rebean.wi.Recordset;
    import com.businessobjects.rebean.wi.Report;
    import com.businessobjects.rebean.wi.ReportBody;
    import com.businessobjects.rebean.wi.ReportCell;
    import com.businessobjects.rebean.wi.ReportContainer;
    import com.businessobjects.rebean.wi.ReportElement;
    import com.businessobjects.rebean.wi.ReportEngine;
    import com.crystaldecisions.sdk.framework.CrystalEnterprise;
    import com.crystaldecisions.sdk.framework.IEnterpriseSession;
    import com.crystaldecisions.sdk.framework.ISessionMgr;
    import com.crystaldecisions.sdk.occa.infostore.IInfoObject;
    import com.crystaldecisions.sdk.occa.infostore.IInfoObjects;
    import com.crystaldecisions.sdk.occa.infostore.IInfoStore;
    import com.crystaldecisions.sdk.plugin.CeKind;
    public class Aug7th {
          * @param args
         public static void main(String[] args) {
              // TODO Auto-generated method stub
              String CMS = "pundl8136:6400";
              String userID = "srivas";
              String password = "morcom123";
              String auth = "secEnterprise";
              List<String> entire =new ArrayList<String>();
              List<String> country =new ArrayList<String>();
              List<String> resort =new ArrayList<String>();
              IEnterpriseSession enterpriseSession;
              try
                   ISessionMgr mySessionMgr = CrystalEnterprise.getSessionMgr();
                   enterpriseSession = mySessionMgr.logon(userID, password, CMS,auth);
                   if (enterpriseSession != null)
                   {//Create and store useful objects for the session.
                        IInfoStore iStore = (IInfoStore)enterpriseSession.getService("InfoStore");
                        ReportEngine reportEngine = (ReportEngine)enterpriseSession.getService("WebiReportEngine");
                        IInfoObject infoView = null;
                        String str = "SELECT SI_ID, SI_NAME, SI_PARENTID FROM CI_INFOOBJECTS WHERE (SI_KIND = '"+CeKind.WEBI+"' OR SI_KIND='FullClient') " +
                        "AND SI_INSTANCE = 'false' AND SI_NAME='Structure Test_001_Java' ORDER BY SI_NAME ASC ";
                        //String str = "SELECT SI_ID, SI_NAME, SI_PARENTID FROM CI_INFOOBJECTS ORDER BY SI_NAME ASC ";
                        IInfoObjects objInfoObjectsWIDs = (IInfoObjects) iStore.query(str);
                        System.out.println(objInfoObjectsWIDs.size());
                        IInfoObject objInfoObjectWID = (IInfoObject) objInfoObjectsWIDs.get(0);
                        DocumentInstance doc = reportEngine.openDocument(objInfoObjectWID.getID());
                        DataProviders dps = doc.getDataProviders();
    //                     Retrieve the 1st data provider
                        DataProvider dp = dps.getItem(0);
    //                     Retrieve the universe objects
                        DataSource ds = dp.getDataSource ();
                        Query q = dp.getQuery();
                        Recordset rs = dp.getResult(0);
    //                     0: assume query has one flow
                        rs.first();
    //                     Print the column types. They can be Integer, String,
    //                     or Date.
                        for (int i = 0; i < rs.getColumnCount(); i++) {
                        Class c = rs.getColumnType(i);
                        StringBuffer sbt = new StringBuffer();
                        if ( c.equals(Integer.class) )
                        sbt.append("Integer");
                        if ( c.equals(String.class) )
                        sbt.append("String");
                        if ( c.equals(Date.class) )
                        sbt.append("Date");
                        sbt.append(";");
                        System.out.println(sbt.toString());
                        System.out.println(rs.getColumnCount());
                        while (!rs.isLast()) {
    //                          column names
                             StringBuffer sbn = new StringBuffer();
                             StringBuffer sbd = new StringBuffer();
                             for (int j = 0; j < rs.getColumnCount(); j++) {
                             sbn.append( rs.getColumnName(j).toString() );
                             sbn.append(";");
                             System.out.println("sbn "+sbn.toString());
    //                          data
                             for (int k= 0; k< rs.getColumnCount(); k++) {
                             sbd.append( rs.getCellObject(k).toString() );
                             sbd.append(";");
                             entire.add(rs.getCellObject(k).toString());
                             System.out.println("sbd "+sbd.toString());
                             rs.next();
                        System.out.println(entire.size());
                        for(int i=0;i<entire.size();i++){
                             country.add(entire.get(i));
                             i++;
                             System.out.println("entireList "+entire.get(i));
                             resort.add(entire.get(i));
                        DataSourceObject city = ds.getClasses().getChildByName("Country");
                        DataSourceObject resorts = ds.getClasses().getChildAt(1);
                        dp.runQuery();
                        ReportContainer report = doc.createReport("Resort");
                        PageHeaderFooter header = report.getPageHeader();
                        FreeCell headerCell = header.createFreeCell("Resort Report");
                        PageHeaderFooter footer = report.getPageFooter();
                        FreeCell footerCell = footer.createFreeCell("Report Ends");
                        ReportBody body =  report.createReportBody();
                        for(int k=0;k<resort.size();k++){
                        FreeCell res=body.createFreeCell(resort.get(k));
                        res.getAttachTo();
                        res.setHeight(15d);
                        res.setWidth(30d);
                        Color c = new Color(255,255,255);
                        Color c1 = new Color(255,0,0);
                        FontImpl fnt = (FontImpl)res.getFont();
                        fnt.getDecoration().setTextColor(c1);
                        res.setFont(fnt);
                        //res.deleteAttachment();
                        //res.setAttachTo(body,VAnchorType.BOTTOM,HAnchorType.NONE);
                        doc.applyFormat();
                        doc.refresh();
                        final String l_docToken = doc.getStorageToken();
                        final DocumentInstance l_docToSave = reportEngine.getDocumentFromStorageToken(l_docToken);
                        doc.saveAs("mor31",835,null,null);
                        doc.closeDocument();
                        str = "SELECT SI_ID, SI_NAME, SI_PARENTID FROM CI_INFOOBJECTS WHERE (SI_KIND = '"+CeKind.WEBI+"' OR SI_KIND='FullClient') " +
                        "AND SI_INSTANCE = 'false' AND SI_NAME='mor31' ORDER BY SI_NAME ASC ";
                        //String str = "SELECT SI_ID, SI_NAME, SI_PARENTID FROM CI_INFOOBJECTS ORDER BY SI_NAME ASC ";
                        objInfoObjectsWIDs = (IInfoObjects) iStore.query(str);
                        System.out.println(objInfoObjectsWIDs.size());
                        objInfoObjectWID = (IInfoObject) objInfoObjectsWIDs.get(0);
                        DocumentInstance doc1 = reportEngine.openDocument(objInfoObjectWID.getID());
                        String token = doc1.getStorageToken();
                        DocumentInstance doc2 = reportEngine.getDocumentFromStorageToken(token);
                        doc2.saveAs("123123", 835, null, null);
                   //     doc.refresh();
                        //doc.save();
                   enterpriseSession.logoff();
              catch(Exception e)
                   e.printStackTrace();

    duplicate post:
    Sample report using JAVA SDK

  • How to create a new report using MS Word add-ins?

    Hi, I am a newbie. I am using BI Publisher 10.1.3.4 and l want to create a simple report using BI Publisher from MS Word add-ins. I don't have a default template. What are the steps to create a new report from scratch. I want to create a simple report for one table contains 4 columns & 2 rows data, and then save the report under my folder.
    I am in an urgent need to learn this, any suggestions are highly appreciated.
    Thanks all.

    Thx Everyone, I figured that out. It's simple and clear to me.

  • How to create a crystal Report using C# and SQL Server

    Hi, im new in creating crystal report using SQL Server, and im making a project.. and could someone help me how to connect your .sdf (SQL Server File) from the bin to your crystal report? thanks a lot.. i followed some instructions like this one (https://social.msdn.microsoft.com/Forums/vstudio/en-US/48c0dd48-5b23-49da-8601-878f8406125e/how-to-create-a-crystal-report-using-sql-server-visual-c?referrer=http://social.msdn.microsoft.com/Forums/vstudio/en-US/48c0dd48-5b23-49da-8601-878f8406125e/how-to-create-a-crystal-report-using-sql-server-visual-c?referrer=http://social.msdn.microsoft.com/Forums/vstudio/en-US/48c0dd48-5b23-49da-8601-878f8406125e/how-to-create-a-crystal-report-using-sql-server-visual-c?referrer=http://social.msdn.microsoft.com/Forums/vstudio/en-US/48c0dd48-5b23-49da-8601-878f8406125e/how-to-create-a-crystal-report-using-sql-server-visual-c?forum=csharpgeneral)
    but i got an error on the adding of server name and database portion.. thanks a lot in advance

    Hello,
    Crystal Reports are supported on
    http://scn.sap.com/community/crystal-reports.
    Karl
    When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer.
    My Blog: Unlock PowerShell
    My Book:
    Windows PowerShell 2.0 Bible
    My E-mail: -join ('6F6C646B61726C406F75746C6F6F6B2E636F6D'-split'(?<=\G.{2})'|%{if($_){[char][int]"0x$_"}})

  • XML Parser Error while creating Web service Client using JAX RPC

    hello evryone,
    Im facing XML Parser Error while creating web service client using JAX RPC. Im using Net Beans IDE for development purpose. I have wrote configuration file for client. Now i want to create Client stub. However i dont know how to do this in Net Beans. So i tried to do it from Command promt using command :
    wscompile -gen:client -d build -classpath build config-wsdl.xml
    here im getting Error:
    error parsing configuration file: XML parsing error: com.sun.xml.rpc.sp.ParseException:10: XML declaration may only begin entities
    Please help me out.
    Many thanks in advance,
    Kacee

    Can i use the client generated using jdeveloper 11g to import into the oracle forms 10g, i.e., form builder 10g. Currently this is the version we have in our office.

  • How to create a single report using 5 difftent reports

    Hi Experts
    how to create a single report using 5 repors in it.
    Example
    I have to create a Survey history report using
    Reports like Surevy 1
                      Surevy 2
                      Surevy 3
                      Surevy 4
                      Surevy 5
    Please suggest me.
    Santosh

    Use Analysis Process Designer (RSANWB) to feed each of the survey BEX reports to one DSO.  Assuming each of the surveys has something in common to compare.  Could also be used as a snapshot storage for the surveys in case history needs to be compared/archived. 
    Build the Direct update DSO with the survey objects.  Add needed time characteristics and/or version control objects to the key. 
    Data sources  will be the 5 surveys. 
    Add formula to hardcode version/time for history.
    Data target is the direct update DSO.
    http://help.sap.com/saphelp_nw2004s/helpdata/EN/49/7e960481916448b20134d471d36a6b/frameset.htm
    -SM

  • Create a Webi report using QAAWS as a data source

    Hi Experts,
    I am on BO 4.1 SP 3, and using the Webi Rich Client to create a WEBi report using a QAAWS url as a data soruce.
    This is the first time I am trying this, so any tips/helpful links are welcome.
    I get the below error, when I try to map the fields. But I do not have any personal data files involved.
    Thanks,
    Vasu Natari.

    Hi Vasu,
    We can create webi report with QAAWS.When creating the report on webservices /Personal data providers we'll not get prompt/query filters option .
    Are you trying to change source ? Instead create new source and get data.

  • Create Oracle Service Bus using BEA workshop

    Can someone please help with BEA Workshop developer guide/tutorial detailing how to create Oracle Service Bus using workshop IDE.
    IDE - BEA Workshop 10gR3
    OSB version - Oracle Service Bus 10gR3
    Thank you

    Thanks for your response Eric.
    The tutorials that I've seen so far deal with OSB console, none of them talk about creating OSB using BEA-workshop.
    On workshop IDE there is some help on OSB workshop plug-ins, but those are mostly one liners about the plug-in features
    Please advice if you've link to OSB-Workshop tutorial.
    Thanks

  • How to create a crystal report using secured web service as a datasource?

    Hi All Expert,
    I having some challenges on how to create a report using secured web service as a datasource in crystal report designer (CR11 R3).
    Secured Web Service including the certificate trusting, token authentication, header and/or body encryption. All web services running on https protocal.
    Could you please suggest me on the solution?
    Thank you and Best Regards,
    Cherr

    Please re-post if this is still an issue or purchase a case and have a dedicated support engineer work with you directly:
    http://store.businessobjects.com/store/bobjamer/DisplayProductByTypePage&parentCategoryID=&categoryID=11522300?resid=-Z5tUwoHAiwAAA8@NLgAAAAS&rests=1254701640551

  • How to print pdf file in SQL Server Reporting services report using command prompt?

    Is there a way to automatically print a SQL Server Reporting services report on command prompt? For eg: We can save a pdf file using rs.exe utility. I want to print a pdf using rs.exe utility. Is it possible? I don't want to install any 3rd party software.

    Thanks Simon for replying to my question.
    In oracle form, there is oracle command to print the report from command prompt with the help of rwrun.exe
    e.g: rwrun.exe   REPORT="D:\Test\REP_25\MLA.REP" DESNAME="testprinter" DESTYPE="PRINTER" P_FORMNAME="MLA.FMX" P_SPRACHE="E" P_SPRACHE_NR2="1" P_WHERE_BEDINGUNG="order by land_nr" USERID="test/test.world" PSV_NAME="PSV_DEMO" PSV_JOB_ID="PS$9583" RECURSIVE_LOAD="NO"
    BATCH="YES" NONBLOCKSQL="NO" ARRAYSIZE="1" PARAMFORM="NO" ERRFILE="c:\temp\psv16.tmp"<
    and to save the report we just need to change DESNAME="c:\temp\OC_100001349.pdf" DESTYPE="FILE" in above command instead of DESNAME="testprinter" DESTYPE="PRINTER".
    DESNAME and DESTYPE are the input parameters of the respective report.
    In SSRS, we can run the file from the command prompt and save it.
    rs -i "C:\Users\pujarswa\Documents\reports\new\LoadReport.rss" -s ww2004760:80/ReportServer_MSSQL -v fileName="C:\Users\pujarswa\Desktop\TipsReportLoad.pdf"
    -v reportPath="/TipsReport/LoadListTabular" -t -v format="PDF" -v LandNr=4 -u ap\swati -p test@# -e Exec2005
    But we cannot use same command for printing as you said we need to create another script for printing files.
    I have gone through the links but I dont want to use Adobe Acrobat Reader exe for printing because client it may not have Adobe Acrobat Reader on their machine.
    Also I want to pass a input parameter as type="Printer" to my report which will print directly for me and same I can acheive in command prompt passing type="Printer" fileName="C:\Users\pujarswa\Desktop\TipsReportLoad.pdf"

  • How to Create Power View Report using power pivot file in SharePoint 2013

    H,
    I have power pivot and Power View excel files. Now i want to create the Power View report in SharePoint 2013.
    What steps should i use?
    Can anyone help me on it.
    I need detailed step by step procedure.
    Thanks & Regards
    Poomani Sankaran

    Hi Aditya,
    Thanks for your reply.
    I am using Enterprise edition of SharePoint 2013 only. SQL Server 2012 SP1.
    I have configured Reporing Services also successfully. I got "Reporting" folder in "15" hive location "C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\WebServices"
    SSRS Service application also i have created success in CA Manage Service Application.
    I have done "Reporting Services Add-in for SharePoint" also which is "rsSharePoint.msi".
    What should i do apart from this? Can you tell me. Its frustrating like anything. 
    I have added the "PowerPivot" excel in "PowerPivot Gallery" and clicked the icon "Create Power View Report"
    Thanks in Advance.
    Poomani Sankaran

  • Error  while creating a Service PO using BAPI_PO_CREATE1

    Hi,
    Im facing Error as "In case of account assignment, please enter acc. assignment data for item" while creating Service PO using BAPI_PO_CREATE1.
    Header Data
          w_poheader-comp_code = w_src-bukrs.  "Company Code
          w_poheader-doc_type = w_src-bsart.   "Document type
         w_poheader-delete_ind = w_src-vrtkz. "Deletion Indicator
          CLEAR: lv_date.
          CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
            EXPORTING
              date_external            = w_src-aedat
            IMPORTING
              date_internal            = lv_date
            EXCEPTIONS
              date_external_is_invalid = 1
              OTHERS                   = 2.
          w_poheader-creat_date = lv_date.    "Creation Date
          w_poheader-created_by = sy-uname.    "Creator Name
          w_poheader-vendor = w_src-lifnr.     "Vendor
          w_poheader-pmnttrms = w_src-zterm.   "Payment Terms
          w_poheader-purch_org = w_src-ekorg.  "Purchase Organization
          w_poheader-pur_group = w_src-ekgrp.  "Purchase Group
          w_poheader-ref_1    = w_src-ihrez.   "OLD PO
          w_poheaderx-comp_code = 'X'.  "Company Code
          w_poheaderx-doc_type = 'X'.   "Document type
         w_poheaderx-delete_ind = 'X'.      "Deletion Indicator
          w_poheaderx-creat_date = 'X'.    "Creation Date
          w_poheaderx-created_by = 'X'.
          w_poheaderx-vendor = 'X'.
          w_poheaderx-pmnttrms = 'X'.   "Payment Terms
          w_poheaderx-purch_org = 'X'.  "Purchase Organization
          w_poheaderx-pur_group = 'X'.  "Purchase Group
          w_poheaderx-ref_1 = 'X'.
    Item Data
          w_poitem-po_item = w_src-ebelp.
          IF NOT w_src-elikz IS INITIAL.
            w_poitem-delete_ind = w_src-elikz.
          ENDIF.
          IF NOT w_src-txz01 IS INITIAL.
            w_poitem-short_text = w_src-txz01.
          ENDIF.
          IF NOT w_src-werks IS INITIAL.
            w_poitem-plant = w_src-werks.
          ENDIF.
    Material group
          IF NOT w_src-matkl IS INITIAL.
            w_poitem-matl_group = w_src-matkl.
          ENDIF.
    Open or Partial Qty
          IF w_src-opqty IS  NOT INITIAL.
            w_poitem-quantity = w_src-opqty.
          ELSEIF NOT w_src-paqty IS INITIAL.
            w_poitem-quantity = w_src-paqty.
          ENDIF.
          IF NOT w_src-meins IS INITIAL.
            w_poitem-po_unit = w_src-meins. "Base Unit of Measure
          ENDIF.
          IF NOT w_src-netpr IS INITIAL.
            w_poitem-net_price = w_src-netpr.  "Net Price
          ENDIF.
          IF NOT w_src-mwskz IS INITIAL.
            w_poitem-tax_code = w_src-mwskz.
          ENDIF.
          IF NOT w_src-pstyp IS INITIAL.
            w_poitem-item_cat = w_src-pstyp.
          ENDIF.
          IF NOT w_src-knttp IS INITIAL.
            w_poitem-acctasscat = w_src-knttp.
          ENDIF.
          IF NOT w_src-vrtkz IS INITIAL.
            w_poitem-distrib = w_src-vrtkz.
          ENDIF.
    Package No
          IF NOT w_src-packno IS INITIAL.
            w_poitem-pckg_no = w_src-packno.  "Package no
          ENDIF.
          IF w_poitem-delete_ind IS INITIAL AND
             w_poitem-short_text IS INITIAL AND
             w_poitem-plant IS INITIAL AND
             w_poitem-matl_group IS INITIAL AND
             w_poitem-quantity IS INITIAL AND
             w_poitem-po_unit IS INITIAL AND
             w_poitem-net_price IS INITIAL AND
             w_poitem-tax_code IS INITIAL.
            CLEAR lv_item.
          ELSE.
            APPEND w_poitem TO i_poitem.
            CLEAR: w_poitem.
            lv_item = 'X'.
          ENDIF.
          w_poitemx-po_item = w_src-ebelp.
          w_poitemx-delete_ind = 'X'.
          w_poitemx-short_text = 'X'.
          w_poitemx-plant = 'X'.
          w_poitemx-matl_group = 'X'.
          w_poitemx-quantity = 'X'.
          w_poitemx-po_unit = 'X'.
          w_poitemx-net_price = 'X'.
          w_poitemx-tax_code = 'X'.
          w_poitemx-item_cat = 'X'.
          w_poitemx-acctasscat = 'X'.
          w_poitemx-distrib = 'X'.
          IF NOT w_src-packno IS INITIAL.
            w_poitemx-pckg_no = 'X'.
          ENDIF.
          IF lv_item = 'X'.
            APPEND w_poitemx TO i_poitemx.
            CLEAR: w_poitemx,
                   lv_item.
          ENDIF.
    PO Deliery Address
          w_poaddrdelivery-po_item = w_src-ebelp.
          IF NOT w_src-adrn2 IS INITIAL.
            w_poaddrdelivery-addr_no = w_src-adrn2.
            APPEND w_poaddrdelivery TO i_poaddrdelivery.
            CLEAR w_poaddrdelivery.
          ENDIF.
    POschedule
          w_poschedule-po_item = w_src-ebelp.
          CLEAR: lv_date.
          CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
            EXPORTING
              date_external            = w_src-eindt
            IMPORTING
              date_internal            = lv_date
            EXCEPTIONS
              date_external_is_invalid = 1
              OTHERS                   = 2.
          IF NOT lv_date IS INITIAL.
            w_poschedule-del_datcat_ext = 'D'. "Delivery Date in Day Format
            w_poschedule-delivery_date = lv_date.
            w_poschedule-quantity = w_src-menge.
            APPEND w_poschedule TO i_poschedule.
            CLEAR w_poschedule.
            lv_schd = 'X'.
          ENDIF.
          w_poschedulex-po_item = w_src-ebelp.
          w_poschedulex-del_datcat_ext = 'X'.
          w_poschedulex-delivery_date = 'X'.
          w_poschedulex-quantity = 'X'.
          IF lv_schd = 'X'.
            APPEND w_poschedulex TO i_poschedulex.
            CLEAR : w_poschedulex,
                    lv_schd.
          ENDIF.
    PO Account Assignment
          w_poaccount-po_item = w_src-ebelp.
          w_poaccount-serial_no = w_src-zekkn.
    Distribution Indicator is 1
          IF w_src-vrtkz EQ '1'.
            w_poaccount-distr_perc = w_src-vproz.
            IF NOT w_src-menge IS INITIAL.
              CLEAR lv_menge.
              lv_menge = w_src-menge.
            ENDIF.
            lv_acct_qty = lv_menge * w_src-vproz / 100.
    Get Round value of Quanity
            frac = FRAC( lv_acct_qty ).
            IF frac EQ 0.
              lv_acct_qty = FLOOR( lv_acct_qty ).
            ELSE.
              lv_acct_qty = CEIL( lv_acct_qty ).
            ENDIF.
            w_poaccount-quantity = lv_acct_qty.
          ELSEIF w_src-vrtkz IS INITIAL.
            w_poaccount-quantity = w_src-menge.
          ENDIF.
          w_poaccount-gl_account = w_src-saknr.
          w_poaccount-costcenter = w_src-kostl.
          w_poaccount-asset_no = w_src-anln1.
          w_poaccount-wbs_element = w_src-wbs.
          w_poaccount-network = w_src-nplnr.
          w_poaccount-tax_code = w_src-mwskz.
          w_poaccount-activity = w_src-vornr.
          APPEND w_poaccount TO i_poaccount.
          CLEAR w_poaccount.
          w_poaccountx-po_item = w_src-ebelp.
          w_poaccountx-serial_no = w_src-zekkn.
          IF w_src-vrtkz EQ '1'.
            w_poaccountx-distr_perc =  'X'.
          ENDIF.
          w_poaccountx-quantity = 'X'.
          w_poaccountx-gl_account = 'X'.
          w_poaccountx-costcenter = 'X'.
          w_poaccountx-wbs_element = 'X'.
          w_poaccountx-network = 'X'.
          w_poaccountx-tax_code = 'X'.
          w_poaccountx-activity = 'X'.
          APPEND w_poaccountx TO i_poaccountx.
          CLEAR w_poaccountx.
    PO Services
          w_poservices-pckg_no = w_src-packno.  "Package no
          w_poservices-line_no = w_src-srv_line_no.    "Line item
          w_poservices-ext_line = w_src-extrow.    "External line
         w_poservices-outl_level = 0.
         w_poservices-outl_ind = 'X'.
          w_poservices-subpckg_no = w_src-sub_packno.  "Sub package no
          w_poservices-quantity = w_src-srqty.  "Service Quantity
          w_poservices-base_uom = w_src-srmeins.  "Service Basic unit of Measure
          w_poservices-price_unit = '1'.
         w_poservices-from_line = '1'.
          w_poservices-gr_price  = w_src-brtwr.  "GR Price
          w_poservices-short_text = w_src-sh_text1.    "Service Short Text
         w_poservices-matl_group = w_src-matkl.  "Material Group
          APPEND w_poservices TO i_poservices.
          CLEAR w_poservices.
    PO Service Access values
          w_posrvacc-pckg_no = w_src-packno.  "Package no
          w_posrvacc-line_no = w_src-srv_line_no. "Line item
          w_posrvacc-serno_line = w_src-zekkn.                  "'01'..
          IF w_src-vproz IS INITIAL.
            w_posrvacc-percentage = '100.0'.
          ENDIF.
          w_posrvacc-serial_no = w_src-zekkn.                   "'01'.
          w_posrvacc-quantity = w_src-srqty.  "Service Quantity
          w_posrvacc-net_value = w_src-srqty.  "Net value
          APPEND w_posrvacc TO i_posrvacc.
          CLEAR w_posrvacc.
        ENDIF.
    ***Create a NEW PO
        AT END OF ihrez.
    Call BAPI
          CALL FUNCTION 'BAPI_PO_CREATE1'
            EXPORTING
              poheader          = w_poheader
              poheaderx         = w_poheaderx
            IMPORTING
              exppurchaseorder  = gv_ebeln
            TABLES
              return            = i_return
              poitem            = i_poitem[]
              poitemx           = i_poitemx[]
              poaddrdelivery    = i_poaddrdelivery[]
              poschedule        = i_poschedule[]
              poschedulex       = i_poschedulex[]
              poaccount         = i_poaccount[]
              poaccountx        = i_poaccountx[]
              poservices        = i_poservices[]
              posrvaccessvalues = i_posrvacc[]
              extensionin       = i_extensionin[].
    Commit the Transaction
          CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
           EXPORTING
             WAIT          = 'X'.
    Regards,
    Deepthi.

    1. If we get error as  "In case of account assignment, please enter acc. assignment data for item" than First cehck whetaher u have authorization to Tcode ME23n or not. In my case, I din't had authorization to Me23n tcode.
    2. If we get Error as "Please Mainatain Services or Limits". Please create a Service PO in the following Order.
    *& Internal Table Declaration
    DATA : i_intern         TYPE STANDARD TABLE OF alsmex_tabline WITH HEADER LINE,
           i_poitem         TYPE STANDARD TABLE OF bapimepoitem,
           i_poitemx        TYPE STANDARD TABLE OF bapimepoitemx,
           i_poaddrdelivery TYPE STANDARD TABLE OF bapimepoaddrdelivery,
           i_poschedule     TYPE STANDARD TABLE OF bapimeposchedule,
           i_poschedulex    TYPE STANDARD TABLE OF bapimeposchedulx,
           i_poaccount      TYPE STANDARD TABLE OF bapimepoaccount,
           i_poaccountx     TYPE STANDARD TABLE OF bapimepoaccountx,
           i_poservices     TYPE STANDARD TABLE OF bapiesllc,
           i_posrvacc       TYPE STANDARD TABLE OF bapiesklc,
           i_extensionin    TYPE STANDARD TABLE OF bapiparex,
           i_return         TYPE STANDARD TABLE OF bapiret2.
    *& Work Area Declaration
    DATA:
          w_poheader       TYPE bapimepoheader,
          w_poheaderx      TYPE bapimepoheaderx,
          w_poitem         TYPE bapimepoitem,
          w_poitemx        TYPE bapimepoitemx,
          w_poaddrdelivery TYPE bapimepoaddrdelivery,
          w_poschedule     TYPE bapimeposchedule,
          w_poschedulex    TYPE bapimeposchedulx,
          w_poaccount      TYPE bapimepoaccount,
          w_poaccountx     TYPE bapimepoaccountx,
          w_poservices     TYPE bapiesllc,
          w_posrvacc       TYPE bapiesklc,
          w_extensionin    TYPE bapiparex,
          w_return         TYPE bapiret2.
    START-OF-SELECTION.
    Header Data
      w_poheader-comp_code = '5791'.  "Company Code
      w_poheader-doc_type = 'Z0CM'.   "Document type
      w_poheader-creat_date = sy-datum.  "lv_date.    "Creation Date
      w_poheader-created_by = sy-uname.    "Creator Name
      w_poheader-vendor = '0005012343'.     "Vendor
      w_poheader-pmnttrms = 'Z004'.   "Payment Terms
      w_poheader-purch_org = 'P000'.  "Purchase Organization
      w_poheader-pur_group = '001'.  "Purchase Group
      w_poheader-ref_1    = '004500007671'.   "OLD PO
      w_poheaderx-comp_code = 'X'.  "Company Code
      w_poheaderx-doc_type = 'X'.   "Document type
      w_poheaderx-creat_date = 'X'.    "Creation Date
      w_poheaderx-created_by = 'X'.
      w_poheaderx-vendor = 'X'.
      w_poheaderx-pmnttrms = 'X'.   "Payment Terms
      w_poheaderx-purch_org = 'X'.  "Purchase Organization
      w_poheaderx-pur_group = 'X'.  "Purchase Group
      w_poheaderx-ref_1 = 'X'.
    Item Data
      w_poitem-po_item = '000010'.
      w_poitem-short_text = 'Z0CM - Default Appr. Test  '.
      w_poitem-plant = '5368'.
      Trackign no
      w_poitem-trackingno = ''.
    Material group
      w_poitem-matl_group = '119'.
      w_poitem-po_unit = 'EA'. "Base Unit of Measure
      w_poitem-net_price = '17500.00'.  "Net Price
      w_poitem-tax_code = 'I0'.
      w_poitem-item_cat = '9'.
      w_poitem-acctasscat = 'K'.
      w_poitem-distrib = space.
    Package must be given in item to create Service PO
      w_poitem-pckg_no = 0000000001.
      APPEND w_poitem TO i_poitem.
      CLEAR: w_poitem.
      w_poitemx-po_item = '000010'.
      w_poitemx-delete_ind = 'X'.
      w_poitemx-short_text = 'X'.
      w_poitemx-plant = 'X'.
      w_poitemx-trackingno = 'X'.
      w_poitemx-matl_group = 'X'.
      w_poitemx-quantity = 'X'.
      w_poitemx-po_unit = 'X'.
      w_poitemx-net_price = 'X'.
      w_poitemx-tax_code = 'X'.
      w_poitemx-item_cat = 'X'.
      w_poitemx-acctasscat = 'X'.
      w_poitemx-distrib = 'X'.
      w_poitemx-pckg_no = 'X'.
      APPEND w_poitemx TO i_poitemx.
      CLEAR: w_poitemx.
    PO Deliery Address
          w_poaddrdelivery-po_item = '000010'.
            w_poaddrdelivery-addr_no = '0000061208'.
            APPEND w_poaddrdelivery TO i_poaddrdelivery.
            CLEAR w_poaddrdelivery.
    POschedule
          w_poschedule-po_item = '000010'..
    DATA : LV_DATE TYPE SY-DATUM,
           lv_schd.
          CLEAR: lv_date.
          CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
            EXPORTING
              date_external            = '12/2/2009'
            IMPORTING
              date_internal            = lv_date
            EXCEPTIONS
              date_external_is_invalid = 1
              OTHERS                   = 2.
          IF NOT lv_date IS INITIAL.
            w_poschedule-del_datcat_ext = 'D'. "Delivery Date in Day Format
            w_poschedule-delivery_date = lv_date.
            w_poschedule-quantity = '1.000'.
            APPEND w_poschedule TO i_poschedule.
            CLEAR w_poschedule.
            lv_schd = 'X'.
          ENDIF.
          w_poschedulex-po_item = '000010'.
          w_poschedulex-del_datcat_ext = 'X'.
          w_poschedulex-delivery_date = 'X'.
          w_poschedulex-quantity = 'X'.
          IF lv_schd = 'X'.
            APPEND w_poschedulex TO i_poschedulex.
            CLEAR : w_poschedulex,
                    lv_schd.
          ENDIF.
    PO Account Assignment
      w_poaccount-po_item = '000010'.
      w_poaccount-serial_no = '01'.
      w_poaccount-distr_perc = ''.
      w_poaccount-quantity = '1.000'.
      w_poaccount-gl_account = '0000603064'.
      w_poaccount-costcenter = '0053680100'.
      w_poaccount-asset_no = ''.
      w_poaccount-wbs_element = ''.
      w_poaccount-network = ''.
      w_poaccount-tax_code = 'I0'.
      w_poaccount-activity = ''.
      APPEND w_poaccount TO i_poaccount.
      CLEAR w_poaccount.
      w_poaccountx-po_item = '000010'.
      w_poaccountx-serial_no = '01'.
      w_poaccountx-distr_perc =  'X'.
      w_poaccountx-quantity = 'X'.
      w_poaccountx-gl_account = 'X'.
      w_poaccountx-costcenter = 'X'.
      w_poaccountx-wbs_element = 'X'.
      w_poaccountx-network = 'X'.
      w_poaccountx-tax_code = 'X'.
      w_poaccountx-activity = 'X'.
      w_poaccountx-cmmt_item = 'X'.
      APPEND w_poaccountx TO i_poaccountx.
      CLEAR w_poaccountx.
    Extension for ZZSub
      w_extensionin-structure = 'BAPI_TE_MEPOACCOUNTING'.
      w_extensionin-valuepart1+0(5) = '00010'..
      w_extensionin-valuepart1+5(2) = '01'.
      w_extensionin-valuepart1+28(5) = ''.
      APPEND w_extensionin TO i_extensionin.
      CLEAR w_extensionin.
      w_extensionin-structure = 'BAPI_TE_MEPOACCOUNTINGX'.
      w_extensionin-valuepart1+0(5) = '00010'.
      w_extensionin-valuepart1+5(2) = '01'.
      w_extensionin-valuepart1+11(1) = 'X'.
      APPEND w_extensionin TO i_extensionin.
      CLEAR w_extensionin.
    Extension to add Expense Type only
      w_extensionin-structure = 'BAPI_TE_MEPOHEADER'.
      w_extensionin-valuepart1+10(4) = '0131'.
      APPEND w_extensionin TO i_extensionin.
      CLEAR w_extensionin.
      w_extensionin-structure = 'BAPI_TE_MEPOHEADERX'.
      w_extensionin-valuepart1+10(4) = 'X'.
      APPEND w_extensionin TO i_extensionin.
      CLEAR w_extensionin.
      EXPORT i_extensionin[] TO MEMORY ID 'SUB'.
    PO Services
    PO Services( One Line Iem)
    Assign the dummy no as Pacakage no
      w_poservices-pckg_no = 0000000001.  "(assign package no as a dummy number)
      w_poservices-line_no = 0000000001.      "Line item
      w_poservices-outl_ind = 'X'.
    Assign Dummy no as sub package no
      w_poservices-subpckg_no = 0000000003.   "(Dummy No.) "Sub package no
      w_poservices-from_line = '1'.
      APPEND w_poservices TO i_poservices.
      CLEAR w_poservices.
    PO Services(Second Line Item )
    Assign the same sub package dummy no which is mentioned above
      w_poservices-pckg_no = 0000000003.   "(Dummy No.) "Sub package no
      w_poservices-line_no = 0000000002.
      w_poservices-ext_line = '0000000010'.     "External line
      w_poservices-quantity = '17500.0'.    "Service Quantity
      w_poservices-base_uom = 'EA'.    "Service Basic unit of Measure
      w_poservices-price_unit = '1'.
      w_poservices-gr_price  = '1'.    "GR Price
      w_poservices-short_text = 'Z0CM - Default Appr. T'.      "Service Short Text
    w_poservices-matl_group = '119'.  "w_src-matkl.  "Material Group
      APPEND w_poservices TO i_poservices.
      CLEAR w_poservices.
    PO Service Access values
      w_posrvacc-pckg_no = 0000000003.  "w_src-sub_packno.  "Sub package no
      w_posrvacc-line_no = 0000000002.  "w_src-srv_line_no. "Line item
      w_posrvacc-serno_line = '01'.
      w_posrvacc-percentage = '100.0'.
      w_posrvacc-serial_no = '01'.
      w_posrvacc-quantity = '17500.0'.  "w_src-srqty.  "Service Quantity
      APPEND w_posrvacc TO i_posrvacc.
      CLEAR w_posrvacc.
      DATA : gv_ebeln TYPE ebeln.
    Call BAPI
      CALL FUNCTION 'BAPI_PO_CREATE1'
        EXPORTING
          poheader          = w_poheader
          poheaderx         = w_poheaderx
        IMPORTING
          exppurchaseorder  = gv_ebeln
        TABLES
          return            = i_return
          poitem            = i_poitem[]
          poitemx           = i_poitemx[]
          poaddrdelivery    = i_poaddrdelivery[]
          poschedule        = i_poschedule[]
          poschedulex       = i_poschedulex[]
          poaccount         = i_poaccount[]
          poaccountx        = i_poaccountx[]
          poservices        = i_poservices[]
          posrvaccessvalues = i_posrvacc[]
          extensionin       = i_extensionin[].
    Commit the Transaction
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
        EXPORTING
          wait = 'X'.
      WRITE:/5 gv_ebeln COLOR 5.
      SKIP 2.
      DATA : lv_msg TYPE string.
      LOOP AT i_return INTO w_return WHERE type = 'E'.
        CALL FUNCTION 'FORMAT_MESSAGE'
          EXPORTING
            id        = w_return-id
            lang      = 'EN'
            no        = w_return-number
            v1        = w_return-message_v1
            v2        = w_return-message_v2
            v3        = w_return-message_v3
            v4        = w_return-message_v4
          IMPORTING
            msg       = lv_msg
          EXCEPTIONS
            not_found = 1
            OTHERS    = 2.
        WRITE:/10 lv_msg.
      ENDLOOP.

  • Creating a crystal report using excel

    I have an excel spreadsheet that I would like to access to create a crystal reports.  But it seems that I have to first save it as an access or other database file.  But this information changes frequently so I it would be more efficient to access the excel file directly.  I tried using the crystal wizard addin in excel, but then when I run the report I get the error message "Server has not yet been opened".  Any other ideas on how to create report of excel data directly?

    Hello Guys ,
    I have something similar problem ,but not exactly.
    our requirement is We are scheduling one crystal report to generate excel and sent to FTP location.This Excel file (in FTP) should be the input of new Crystal Report using ODBC (RDO) connection.
    I am able to create the ODBC connection,but that ODBC connection is not showing me the selected excel sheet in the Crystal Report ODBC Connection.I tried with Remote as well as local drive Excel also.
    I tried on different machine (thought ,it could be Driver specific),but all machines does have same issue.
    Is there any settings or driver upgrades require for CR XI R2 /2008 in order to use ODBC (RDO) for EXCEL FILES.I didnt find any comments /resolution in Google too.
    My steps -
    1) Create a sample Excel file - only few records
    2) Created a System ODBC connection pointing this excel file say "TEST1"
    3) Opened A Blank Crystal Report
    4) Create a New connection
    5) Select ODBC RDO
    6) Create new connection and selected the newly created SYSTEM DSN "TEST1"
    7) check the selected excel is displayed in ODBC RDO connection??
    If it is a Crystal Report issue or ODBC Driver issue ,please let me know if anyone have came across similar issues.
    thanks in advance.
    Nitin

  • ABAP REPORT using SQVI, need to hide Layout section

    HI,
    I have created report in Sqvi and imported in ABAP (se38) now I want to hide "Output Specification" block which asks for layout, how do I hide that? See attachment

    You'll need to add some code inside a "at selection-screen output." event - something like:
    loop at screen.
      if screen-name cs '%LAYOUT'.
        screen-active = '0'.
        modify screen.
      endif.
    endloop.
    Jonathan

Maybe you are looking for

  • Color washed out when using image processor in Bridge CC

    Hi, When I use the image processor - Tool>PhotoShopS>Image Processor, via bridge my colors appear wrong and washed out. When i choose "Include ICC profile" in the process dialog it has no effect - the colors are still wrong. In PhotoShop my profile i

  • Calling EJB deployed on Weblogic 10.3 from WebSphere Application Server 6

    Hi, We are trying to call an EJB(2.1) deployed in Weblogic 10.3 from WebSphere Application Server 6. The problem is that the jars containing Weblogic's initial context factory are compiled with JDK5. (Client jar was built as per [http://download.orac

  • Loading data from R/3 to infoobject

    Dear All I am very new to BI . I want to see 0RTYPE infoobject in BEX for currency translation . As of now I can this only in Infoobject tree . To make it avialble for query level how should I go about . Please give me step by step approach . Thank y

  • Mycuarea in Include Giving Issue !!!

    Hi Experts, For adjusting my standard RF screens over Mobile Device(Intermec 700C). I am using my customized css(copied from standard mobile.css and edited ) plus include files(mucuarea.html). Issue is, when i am using ~ITSMOBILECUAINCLUDE pointing t

  • Copy header text of Delivery to Shipment

    Hi All, Please let me know the user/customer exit to copy the header text of delivery to shipment while creation(VT01N) or deletion(VT02N) of shipment for deliveries. Please provide the code samples or procedure, if you have any. Thanks in advance an