PS:Copy of MBBS report with Date(GR) selection option in selection screen.

Hi,
We are developing a report, which is Copy of MBBS report, addition as Date(GR) selection option in selection screen to view historical data {i.e.Project Stock(Q) on back dates}.
MBBS is showing Project Stock w.r.t. WBS. So pls suggest Table, which can fulfill the requirement to show the Project Stock from GR w.r.t. Purchase and Production order in back date w.r.t. that WBS.
Pls do the needful.
Thanks,
Amit Jain.

Hi Amit ,
The Project Stock Table is MSPR , and the Project stock history table is MSPRH .
Though not through with your actual requirement , There is a standard Report MB5B -- Stock on Posting Date . In the selection screen , we can have the Special Stock Q (Project Stock ) .
If you can develop copying this report instead of MBBS , it would take care of receipts as well as issues ,and from the material Document you can build a relation to the account assignment  WBS/Network Activity through MSEG Table .
Hope it helps .
thanks and regards
Kish

Similar Messages

  • How to create a report with data using the Crystal Reports for Java SDK

    Hi,
    How do I create a report with data that can be displayed via the Crystal Report for Java SDK and the Viewers API?
    I am writing my own report designer, and would like to use the Crystal Runtime Engine to display my report in DHTML, PDF, and Excel formats.  I can create my own report through the following code snippet:
    ReportClientDocument boReportClientDocument = new ReportClientDocument();
    boReportClientDocument.newDocument();
    However, I cannot find a way to add data elements to the report without specifying an RPT file.  Is this possible?  I seems like it is since the Eclipse Plug In allows you to specify your database parameters when creating an RPT file.
    is there a way to do this through these packages?
    com.crystaldecisions.sdk.occa.report.data
    com.crystaldecisions.sdk.occa.report.definition
    Am I forced to create a RPT file for the different table and column structures I have? 
    Thank you in advance for any insights.
    Ted Jenney

    Hi Rameez,
    After working through the example code some more, and doing some more research, I remain unable to populate a report with my own data and view the report in a browser.  I realize this is a long post, but there are multiple errors I am receiving, and these are the seemingly essential ones that I am hitting.
    Modeling the Sample code from Create_Report_From_Scratch.zip to add a database table, using the following code:
    <%@ page import="com.crystaldecisions.sdk.occa.report.application.*"%>
    <%@ page import="com.crystaldecisions.sdk.occa.report.data.*"%>
    <%@ page import="com.crystaldecisions.sdk.occa.report.document.*"%>
    <%@ page import="com.crystaldecisions.sdk.occa.report.definition.*"%>
    <%@ page import="com.crystaldecisions.sdk.occa.report.lib.*" %>
    <%@ page import = "com.crystaldecisions.report.web.viewer.*"%>
    <%
    try { 
                ReportClientDocument rcd = new ReportClientDocument();
                rcd.newDocument();
    // Setup the DB connection
                String database_dll = "Sqlsrv32.dll";
                String db = "qa_start_2012";
                String dsn = "SQL Server";
                String userName = "sa";
                String pwd = "sa";
                // Create the DB connection
                ConnectionInfo oConnectionInfo = new ConnectionInfo();
                PropertyBag oPropertyBag1 = oConnectionInfo.getAttributes();
                // Set new table logon properties
                PropertyBag oPropertyBag2 = new PropertyBag();
                oPropertyBag2.put("DSN", dsn);
                oPropertyBag2.put("Data Source", db);
                // Set the connection info objects members
                // 1. Pass the Logon Properties to the main PropertyBag
                // 2. Set the Server Description to the new **System DSN**
                oPropertyBag1.put(PropertyBagHelper.CONNINFO_CRQE_LOGONPROPERTIES, oPropertyBag2);
                oPropertyBag1.put(PropertyBagHelper.CONNINFO_CRQE_SERVERDESCRIPTION, dsn);
                oPropertyBag1.put("Database DLL", database_dll);
                oConnectionInfo.setAttributes(oPropertyBag1);
                oConnectionInfo.setUserName(userName);
                oConnectionInfo.setPassword(pwd);
                // The Kind of connectionInfos is CRQE (Crystal Reports Query Engine).
                oConnectionInfo.setKind(ConnectionInfoKind.CRQE);
    // Add a Database table
              String tableName = "Building";
                Table oTable = new Table();
                oTable.setName(tableName);
                oTable.setConnectionInfo(oConnectionInfo);
                rcd.getDatabaseController().addTable(oTable, null);
        catch(ReportSDKException RsdkEx) {
                out.println(RsdkEx);  
        catch (Exception ex) {
              out.println(ex);  
    %>
    Throws the exception
    com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: java.lang.NullPointerException---- Error code:-2147467259 Error code name:failed
    There was other sample code on SDN which suggested the following - adding the table after calling table.setDataFields() as in:
              String tableName = "Building";
                String fieldname = "Building_Name";
                Table oTable = new Table();
                oTable.setName(tableName);
                oTable.setAlias(tableName);
                oTable.setQualifiedName(tableName);
                oTable.setDescription(tableName) ;
                Fields fields = new Fields();
                DBField field = new DBField();
                field.setDescription(fieldname);
                field.setHeadingText(fieldname);
                field.setName(fieldname);
                field.setType(FieldValueType.stringField);
                field.setLength(40);
                fields.add(field);
                oTable.setDataFields(fields);
                oTable.setConnectionInfo(oConnectionInfo);
                rcd.getDatabaseController().addTable(oTable, null);
    This code succeeds, but it is not clear how to add that database field to a section.  If I attempt to call the following:
    FieldObject oFieldObject = new FieldObject();
                oFieldObject.setDataSourceName(field.getFormulaForm());
                oFieldObject.setFieldValueType(field.getType());
                // Now add it to the section
                oFieldObject.setLeft(3120);
                oFieldObject.setTop(120);
                oFieldObject.setWidth(1911);
                oFieldObject.setHeight(226);
                rcd.getReportDefController().getReportObjectController().add(oFieldObject, rcd.getReportDefController().getReportDefinition().getDetailArea().getSections().getSection(0), -1);
    Then I get an error (which is not unexpected)
    com.crystaldecisions.sdk.occa.report.lib.ReportDefControllerException: The field was not found.---- Error code:-2147213283 Error code name:invalidFieldObject
    How do I add one of the table.SetDataFields()  to my report to be displayed?
    Are there any other pointers or suggestions you may have?
    Thank you

  • Crystal Report 2008 - Save Report with Data

    I saved a Crystal report with data in Dev Environment on BOE Server (Infoview Folder) and this is transported to Quality Environment. In the quality environment, when I try to view this report, initial screen comes up with data of Development, instead of Quality environment.
    I am expecting that it will load the default data from Quality environment for the stored selection.
    Is there any settings to be done in the report settings, so that i can view the saved report in Quality Environment with Quality Env data instead of Dev Env Data?

    Thanks Don for the reply.
    In case, If we save the report with data in Dev, we need to update DB configuration to point to Quality Env using "Use Custom databse Logon Information".
    But when it gets transported to production (From Quality), it will show up Quality Envdata. So should i have to update the BOE in Q Environment, to point to Production and transport it?
    Is there any automated way that the system will point to right systems appropriately based on transport landscape?
    Does the functionality of "Save the report with data" used mainly for user friendliness for analysis in one environment and this functionality is not supported to move between environments?
    rgds
    Karthi

  • Easyest way to "copy-paste" a schema with data?

    Hi,
    what is the easiest way to make a copy of a schema with data to another (new) schema?
    Thanks

    Hi Jernej Kase
    Q:what is the easiest way to make a copy of a schema with data to another (new) schema?
    A: Oracle 10g datapump’s Network_link option allows us to copy data between schemas without even creating an export dump file.
    I have tried this option and it reduced my copy procedure timings from 2 hours ( with regular exp/imp) to 15 mins.
    all you need to do is
    1. create a DB link pointing to target schema.
    2. run the impdb command
    example:
    impdp uname/pwd@dbname directory=<dir name> logfile=<logfile name> network_link=<dblink name> remap_schema=source_user:target_user parallel=2
    Krishna.B

  • Please help me out with  "Data only excel option "

    Post Author: pavan pusuluri
    CA Forum: Crystal Reports
    When i am trying to spool the data with data only excel option using crystal reports XI, the records are appearing in two rows instead of single row. i have studied that when we use data only excel option entire record will be displayed in a single row,but it is not appearing in that way.Please help me out in fixing this bug. I am very much new to crytal reports.

    Post Author: pavan pusuluri
    CA Forum: Crystal Reports
    I thank you for the prompt reply.  
    All the field are of same size and height.  The format is fine.  The report is designed in such a way that data is   displayed in three detail sections. What i would like to have is " i want the data in these three sections to be displayed in a single row when i select the data only excel  export option".Please help me  out in fixing this issue.
    Thanks in anticipation

  • Problem with table-indexes when using select-options in select

    Hello experts,
    is it right that table-indexes will not be used if you take select-options to select data from the database?
    in detail:
    i have build up an table-index for one of our db-tables and test it via an test-programm. The first test with '=' comparisons worked fine. Every key of the index was used; checked via ST05!
    e.g.:    SELECT * FROM TABLEA INTO ITAB WHERE keya = '1' AND keyb = '2' AND keyc = '3'.
    Now i startet the test with select-options
    e.g.:   SELECT * FROM TABLEA INTO ITAB WHERE keya IN seltabA  AND keyb IN seltabB AND keyc IN seltabC.
    First of all i just filled the seltabs with only 1 value:    eg:  seltabA=      SIGN = 'I'   OPTION = 'EQ'   LOW = '1'     etc.
    Everything worked fine. Every key of the index was used.
    But now, I putted more than one entries in the seltabs e.g.
    seltabA:      SIGN = 'I'   OPTION = 'EQ'   LOW = '1'
                       SIGN = 'I'   OPTION = 'EQ'   LOW = '2'   
                       SIGN = 'I'   OPTION = 'EQ'   LOW = '3'
    From now on, the indexed was not used completely (with all keys).
    Isn't that strange? How can i use select-options or sel-ranges with using the complete table-indexes?
    Thanks a lot,
    Marcel

    Hi Hermann,
    i hope this helps:
    this is the first one, which uses the complete index:
    SELECT                                                                     
      "KOWID" , "LIFNR" , "KLPOS" , "ORGID" , "KOART" , "MATNR" , "GLTVON" ,   
      "GLTBIS" , "WERT" , "ABLIF" , "FAKIV" , "AENAM" , "AEDAT" , "AFORM" ,    
      "HERSTELLER" , "ARTGRP" , "OE_FREITXT" , "ARTFREITEXT" , "STATUS" ,      
      "TERDAT"                                                                 
    FROM                                                                       
      "/dbcon/01_con"                                                       
    WHERE                                                                      
      "MANDT" = ? AND "LIFNR" = ? AND "ORGID" = ? AND "KOART_BASIS" = ? AND    
      "STATUS" = ? AND "GEWAEHR_KOWID" < ? AND ( "STATUS" = ? OR "STATUS" = ? OR
      "STATUS" = ? )  WITH UR                 
    RESULT: 5 IXSCAN /dbcon/01_con05 #key columns:  4
    And the second one, which does not use the complete index! The 3 ranges are filled each with 2 values. Remember; when i fill them each with only one value, the result is the same as you can see above(/dbcon/01_con05 #key columns:  4):
    SELECT                                                                     
      "KOWID" , "LIFNR" , "KLPOS" , "ORGID" , "KOART" , "MATNR" , "GLTVON" ,   
      "GLTBIS" , "WERT" , "ABLIF" , "FAKIV" , "AENAM" , "AEDAT" , "AFORM" ,    
      "HERSTELLER" , "ARTGRP" , "OE_FREITXT" , "ARTFREITEXT" , "STATUS" ,      
      "TERDAT"                                                                 
    FROM                                                                       
      "/dbcon/01_con"                                                       
    WHERE                                                                      
      "MANDT" = ? AND "LIFNR" IN ( ? , ? ) AND "ORGID" IN ( ? , ? ) AND        
      "KOART_BASIS" IN ( ? , ? ) AND "GEWAEHR_KOWID" < ? AND ( "STATUS" = ? OR 
      "STATUS" = ? OR "STATUS" = ? )  WITH UR                                  
    and here the access-plan
       0 SELECT STATEMENT ( Estimated Costs =  5,139E+01 [timerons] )                                                                               
    5     1 RETURN                                                                               
    5     2 NLJOIN                                                                               
    5     3 [O] TBSCAN                                                                               
    5     4 SORT                                                                               
    5 TBSCAN GENROW                                                                               
    5     6 <i> FETCH /dbcon/01_con                                                                               
    7 IXSCAN /dbcon/01_con05 #key columns:  2   
    As you can see, only 2 keys were taken for indexed selection!
    Any idea?
    Kind regards,
    MArcel
    Edited by: Marcel Ebert on Jul 28, 2009 5:25 PM

  • Issue with Select options in select statement - ABAP Question

    Hi
    I am facing an issue with select options. Select statement is returning sy-subrc as 4.
    I wrote the program as below:
    SELECT-OPTIONS:
    s_kunnr FOR bsad-kunnr,
    s_lifnr FOR bsak-lifnr,
    s_gjahr FOR bsad-gjahr,
    s_bukrs FOR bsad-bukrs,
    s_saknr FOR bsad-saknr,
    s_budat FOR bsak-budat.
    In start of selection I have written the select statement as
    SELECT * FROM bsak INTO TABLE lt_bsak
    WHERE bukrs IN s_bukrs AND lifnr = s_lifnr AND gjahr IN s_gjahr AND budat IN s_budat AND saknr IN s_saknr.
    In selection screen I have not entered any values and executed the program. I am not getting any result. When I debug that, sy-subrc is 4 at above select statement. But table has records.
    If am removing the "lifnr = s_lifnr " condition in select then select is returning values.
    I am not getting where I made the mistake. Please suggest.
    Thank you
    Hanu

    Hi,
    The problem here with where condition select option lifnr = s_lifnr.
    Use below select query.
    SELECT * FROM bsak INTO TABLE lt_bsak
    WHERE bukrs IN s_bukrs
        AND lifnr     IN s_lifnr
        AND gjahr   IN s_gjahr
        AND budat  IN s_budat
        AND saknr  IN s_saknr.
    s_lifnr is a select option and you are passing it as parameter lifnr = s_lifnr.
    if you want to pass this s_lifnr as single vale then pass in below mentioned way.
    lifnr = s_lifnr-low
    BR,
    Vijay

  • Stock report with date range

    Hi Experts.
    Material stock report (unrestricted, blocked, quality) with in date range.
    getting information in T-CODE:  MB52 but not in date range.
    In mard table i did't find the date for unrestricted, blocked and quality.
    from where can i get that information and how should i link all
    Need a psudo code for it.
    If any one worked on this kind of object plz send me the code.
    Points assured..
    Regards..
    Ravi Reddy.

    Hi
    Check this sample code hope it will helpfull for you
    *DATA: ED TYPE F.
    DATA : ED(15) TYPE N .
    TABLES: EKKO, EKBE, EKPO, KONH , KONV ,LFA1 ,ESLL.
    TYPE-POOLS: SLIS.
    DATA: val1  like konh-vakey.
    Data:GS_LAYOUT TYPE SLIS_LAYOUT_ALV,
         G_REPID LIKE SY-REPID,
         G_GRID_TITLE TYPE LVC_TITLE.
    Data:G_USER_COMMAND TYPE SLIS_FORMNAME VALUE 'USER_COMMAND'.
    DATA:G_TABNAME TYPE SLIS_TABNAME VALUE 'ITAB1',
    G_SAVE .
    DATA:GS_VARIANT LIKE DISVARIANT.
    DATA:LS_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
    DATA:GT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE.
         G_SAVE = 'A'.
    DATA: BEGIN OF ITAB OCCURS 10,
              EBELN LIKE EKKO-EBELN,
    *          LIFNR  like p_vendor,
              LIFNR LIKE EKKO-LIFNR,
              NAME1 LIKE LFA1-NAME1,
              NAME2 LIKE LFA1-NAME2,
    *          EBELP LIKE EKBE-EBELP,
              BELNR LIKE EKBE-BELNR,
              VGABE LIKE EKBE-VGABE,
              GJAHR LIKE EKBE-GJAHR,
              KNUMV LIKE EKKO-KNUMV,
              EKORG LIKE EKKO-EKORG,
              BEDAT LIKE EKKO-BEDAT,
    *          VAKEY LIKE KONH-VAKEY,
         END OF ITAB.
    DATA: BEGIN OF ITAB1 OCCURS 10,
              NAME1 LIKE LFA1-NAME1,
              NAME2 LIKE LFA1-NAME2,
              EBELN LIKE EKPO-EBELN,
              LIFNR LIKE EKKO-LIFNR,
              EBELP LIKE EKPO-EBELP,
    *          EBELP LIKE EKBE-EBELP,
              KNUMH LIKE KONH-KNUMH,
              BELNR LIKE EKBE-BELNR,
              MATNR LIKE EKPO-MATNR,
              TXZ01 LIKE EKPO-TXZ01,
              PS_PSP_PNR LIKE EKKN-PS_PSP_PNR,
              EXTROW LIKE ESLL-EXTROW,
              SRVPOS LIKE ESLL-SRVPOS,
              KTEXT1 LIKE ESLL-KTEXT1,
              KOSTL LIKE EKKN-KOSTL,
              NETPR LIKE EKPO-NETPR,
              NETWR LIKE EKPO-NETWR,
              ED1  TYPE p decimals 2,
              KBETR2 LIKE KONV-KBETR,
              KBETR1 LIKE KONV-KBETR,
              KBETR LIKE KONV-KBETR,
    *          KBETR3 LIKE KONV-KBETR,
              KWERT LIKE KONV-KWERT, " THIS IS FOR FREIGHT
              KWERT1 LIKE KONV-KWERT, " THIS IS FOR PBXX OR PB00
              KWERT2 LIKE KONV-KWERT, " THIS FOR OTHER CONDITION
              MENGE LIKE EKPO-MENGE,
    *          TOTAL(15) type  .
              TOTAL TYPE p decimals 2,
              VAKEY LIKE KONH-VAKEY,
              WERKS LIKE EKPO-WERKS,
              MWSKZ LIKE EKPO-MWSKZ,
              PACKNO LIKE EKPO-PACKNO,
              KNUMV LIKE KONV-KNUMV,
              SUB_PACKNO LIKE ESLL-SUB_PACKNO,
              GJAHR LIKE RSEG-GJAHR,
          END OF ITAB1.
    DATA: BEGIN OF ITAB2 OCCURS 10,
             EBELN LIKE EKKN-EBELN,
             EBELP LIKE EKKN-EBELP,
             PS_PSP_PNR LIKE EKKN-PS_PSP_PNR,
             KOSTL      LIKE EKKN-KOSTL,
          END OF ITAB2.
    data: begin of itab3 occurs 10,
            KNUMH LIKE KONH-KNUMH,
            KSCHL LIKE KONH-KSCHL,
         end of itab3.
    data: begin of itab4 occurs 10,
            KBETR LIKE KONP-KBETR,
          end of itab4.
    data: begin of itab5 occurs 10,
            KPOSN LIKE KONV-KPOSN,
            KNUMV LIKE KONV-KNUMV,
            KSCHL LIKE KONV-KSCHL,
            KBETR LIKE KONV-KBETR,
            KWERT LIKE KONV-KWERT, " THIS IS FOR FREIGHT
    *          KAWRT LIKE KONV-KAWRT,
         end of itab5.
    DATA: BEGIN OF ITAB6 OCCURS 10,
    *          PACKNO LIKE EKPO-PACKNO,
              SUB_PACKNO LIKE ESLL-SUB_PACKNO,
            END OF ITAB6.
    DATA: BEGIN OF ITAB7 OCCURS 10,
           BELNR LIKE RSEG-BELNR,
           GJAHR LIKE RSEG-GJAHR,
    END OF ITAB7.
    DATA: BEGIN OF ITAB8 OCCURS 10,
           SUB_PACKNO LIKE ESLL-SUB_PACKNO,
           SRVPOS LIKE ESLL-SRVPOS,
           EXTROW LIKE ESLL-EXTROW,
           KTEXT1 LIKE ESLL-KTEXT1,
    END OF ITAB8.
    *selection-screen
    *SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    *SELECTION-SCREEN SKIP 2.
    *SELECTION-SCREEN BEGIN OF LINE.
    *SELECTION-SCREEN COMMENT 25(23) text-002.
    **SELECT-OPTIONS: s_lifnr FOR ekko-lifnr.
    *PARAMETERS:p_lifnr LIKE ekko-lifnr obligatory.
    *SELECTION-SCREEN END OF LINE.
    *SELECTION-SCREEN END OF BLOCK b1.
    START-OF-SELECTION.
      PERFORM get_data.
    *  PERFORM field_catalog.
    *  PERFORM display_data.
    END-OF-SELECTION.
    **&      Form  display_data
    **       text
    *FORM display_data.
    *data: new(15) TYPE N.
    *  CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    *    EXPORTING
    *      i_callback_program = sy-repid
    *      it_fieldcat        = int_cat[]
    *    TABLES
    *      t_outtab           = int_out
    *    EXCEPTIONS
    *      program_error      = 1
    *      OTHERS             = 2.
    *ENDFORM.                    "display_data
    PERFORM GET_DATA.
    PERFORM CALL_ALV_GRID.
    FORM CALL_ALV_GRID.
    PERFORM FIELDCAT_INIT USING GT_FIELDCAT[].
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          I_CALLBACK_PROGRAM                = G_repid
          I_CALLBACK_USER_COMMAND           = G_USER_COMMAND
          I_GRID_TITLE                      = G_GRID_TITLE
          IT_FIELDCAT                       = GT_FIELDCAT[]
          I_DEFAULT                         = 'X'
          I_SAVE                            =  G_SAVE
          IS_VARIANT                        =  Gs_VARIANT
        TABLES
          T_OUTTAB                          = ITAB1.
    ENDFORM.
    FORM FIELDCAT_INIT
           USING RT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-TABNAME       = G_TABNAME.
      LS_FIELDCAT-seltext_l     = 'Vendo No'.
      LS_FIELDCAT-FIELDNAME     = 'LIFNR'.
      LS_FIELDCAT-REF_FIELDNAME = 'LIFNR'.
      LS_FIELDCAT-REF_TABNAME   = 'EKKO'.
      APPEND LS_FIELDCAT TO  RT_FIELDCAT.
       CLEAR LS_FIELDCAT.
      LS_FIELDCAT-TABNAME       = G_TABNAME.
      LS_FIELDCAT-SELTEXT_L  = 'Vendor Name'.
      LS_FIELDCAT-FIELDNAME     = 'NAME1'.
      LS_FIELDCAT-REF_FIELDNAME = 'NAME1'.
      LS_FIELDCAT-REF_TABNAME   = 'LFA1'.
      APPEND LS_FIELDCAT TO  RT_FIELDCAT.
    * CLEAR LS_FIELDCAT.
    *  LS_FIELDCAT-TABNAME       = G_TABNAME.
    *  LS_FIELDCAT-FIELDNAME     = 'NAME2'.
    *  LS_FIELDCAT-REF_FIELDNAME = 'NAME2'.
    *  LS_FIELDCAT-REF_TABNAME   = 'LFA1'.
    *  APPEND LS_FIELDCAT TO  RT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-TABNAME       = G_TABNAME.
      LS_FIELDCAT-seltext_l   = 'Purchase Document No'.
      LS_FIELDCAT-FIELDNAME     = 'EBELN'.
      LS_FIELDCAT-REF_FIELDNAME = 'EBELN'.
      LS_FIELDCAT-REF_TABNAME   = 'EKKO'.
      APPEND LS_FIELDCAT TO  RT_FIELDCAT.
    *  CLEAR LS_FIELDCAT.
    *  LS_FIELDCAT-TABNAME       = G_TABNAME.
    *  LS_FIELDCAT-FIELDNAME     = 'VGABE'.
    *  LS_FIELDCAT-REF_FIELDNAME = 'VGABE'.
    *  LS_FIELDCAT-REF_TABNAME   = 'EKBE'.
    *  APPEND LS_FIELDCAT TO  RT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-TABNAME       = G_TABNAME.
      LS_FIELDCAT-SELTEXT_L     = 'Item No'.
      LS_FIELDCAT-FIELDNAME     = 'EBELP'.
      LS_FIELDCAT-REF_FIELDNAME = 'EBELP'.
      LS_FIELDCAT-REF_TABNAME   = 'EKPO'.
      APPEND LS_FIELDCAT TO  RT_FIELDCAT.
    *  CLEAR LS_FIELDCAT.
    *  LS_FIELDCAT-TABNAME       = G_TABNAME.
    *  LS_FIELDCAT-FIELDNAME     = 'BELNR'.
    *  LS_FIELDCAT-REF_FIELDNAME = 'BELNR'.
    *  LS_FIELDCAT-REF_TABNAME   = 'EKBE'.
    *  APPEND LS_FIELDCAT TO  RT_FIELDCAT.
       CLEAR LS_FIELDCAT.
      LS_FIELDCAT-TABNAME       = G_TABNAME.
      LS_FIELDCAT-SELTEXT_L     = 'Document Con'.
      LS_FIELDCAT-FIELDNAME     = 'KNUMH'.
      LS_FIELDCAT-REF_FIELDNAME = 'KNUMH'.
      LS_FIELDCAT-REF_TABNAME   = 'KONH'.
      APPEND LS_FIELDCAT TO  RT_FIELDCAT.
    *   CLEAR LS_FIELDCAT.
    *  LS_FIELDCAT-TABNAME       = G_TABNAME.
    *  LS_FIELDCAT-SELTEXT_L = 'Service/Material No'.
    *  LS_FIELDCAT-FIELDNAME     = 'MATNR'.
    *  LS_FIELDCAT-REF_FIELDNAME = 'MATNR'.
    *  LS_FIELDCAT-REF_TABNAME   = 'EKPO'.
    *  APPEND LS_FIELDCAT TO  RT_FIELDCAT.
    *   CLEAR LS_FIELDCAT.
    *  LS_FIELDCAT-TABNAME       = G_TABNAME.
    *  LS_FIELDCAT-SELTEXT_L = 'Service / Material description' .
    *  LS_FIELDCAT-FIELDNAME     = 'TXZ01'.
    *  LS_FIELDCAT-REF_FIELDNAME = 'TXZ01'.
    *  LS_FIELDCAT-REF_TABNAME   = 'EKPO'.
    *  APPEND LS_FIELDCAT TO  RT_FIELDCAT.
    *   CLEAR LS_FIELDCAT.
    *  LS_FIELDCAT-TABNAME       = G_TABNAME.
    *  LS_FIELDCAT-SELTEXT_L =  'WBS Element' .
    *  LS_FIELDCAT-FIELDNAME     = 'PS_PSP_PNR'.
    *  LS_FIELDCAT-REF_FIELDNAME = 'PS_PSP_PNR'.
    *  LS_FIELDCAT-REF_TABNAME   = 'EKKN'.
    *  APPEND LS_FIELDCAT TO  RT_FIELDCAT.
    *   CLEAR LS_FIELDCAT.
    *  LS_FIELDCAT-TABNAME       = G_TABNAME.
    *  LS_FIELDCAT-SELTEXT_L =  'Serial Number' .
    *  LS_FIELDCAT-FIELDNAME     = 'EXTROW'.
    *  LS_FIELDCAT-REF_FIELDNAME = 'PACKNO'.
    *  LS_FIELDCAT-REF_TABNAME   = 'ESLL'.
    *  APPEND LS_FIELDCAT TO  RT_FIELDCAT.
    *  CLEAR LS_FIELDCAT.
    *  LS_FIELDCAT-TABNAME       = G_TABNAME.
    *  LS_FIELDCAT-SELTEXT_L =  'Service Number' .
    *  LS_FIELDCAT-FIELDNAME     = 'SRVPOS'.
    *  LS_FIELDCAT-REF_FIELDNAME = 'SRVPOS'.
    *  LS_FIELDCAT-REF_TABNAME   = 'ESLL'.
    *  APPEND LS_FIELDCAT TO  RT_FIELDCAT.
    *   CLEAR LS_FIELDCAT.
    *  LS_FIELDCAT-TABNAME       = G_TABNAME.
    *  LS_FIELDCAT-SELTEXT_L =  'Dscription' .
    *  LS_FIELDCAT-FIELDNAME     = 'KTEXT1'.
    *  LS_FIELDCAT-REF_FIELDNAME = 'KTEXT1'.
    *  LS_FIELDCAT-REF_TABNAME   = 'ESLL'.
    *  APPEND LS_FIELDCAT TO  RT_FIELDCAT.
    *   CLEAR LS_FIELDCAT.
    *  LS_FIELDCAT-TABNAME       = G_TABNAME.
    *    LS_FIELDCAT-SELTEXT_L = 'Cost Center'.
    *  LS_FIELDCAT-FIELDNAME     = 'KOSTL'.
    *  LS_FIELDCAT-REF_FIELDNAME = 'KOSTL'.
    *  LS_FIELDCAT-REF_TABNAME   = 'EKKN'.
    *  APPEND LS_FIELDCAT TO  RT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-TABNAME       = G_TABNAME.
    *  LS_FIELDCAT-FIELDNAME     = 'NETWR'.
      LS_FIELDCAT-FIELDNAME     = 'NETPR'.
      LS_FIELDCAT-reptext_ddic = 'Basic'.
    *  LS_FIELDCAT-SELTEXT_L    = 'Basic'.
       LS_FIELDCAT-REF_FIELDNAME = 'NETPR'.
      LS_FIELDCAT-REF_TABNAME   = 'EKPO'.
      APPEND LS_FIELDCAT TO  RT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-TABNAME       = G_TABNAME.
      LS_FIELDCAT-FIELDNAME     = 'NETWR'.
    *  LS_FIELDCAT-FIELDNAME     = 'NETPR'.
    *  LS_FIELDCAT-reptext_ddic = ''.
    *  LS_FIELDCAT-SELTEXT_L    = 'Basic'.
       LS_FIELDCAT-REF_FIELDNAME = 'NETWR'.
      LS_FIELDCAT-REF_TABNAME   = 'EKPO'.
      APPEND LS_FIELDCAT TO  RT_FIELDCAT.
    CLEAR LS_FIELDCAT.
      LS_FIELDCAT-TABNAME       = G_TABNAME.
        LS_FIELDCAT-SELTEXT_L = 'Excise'.
      LS_FIELDCAT-FIELDNAME     = 'ED1'.
      LS_FIELDCAT-REF_FIELDNAME = 'ED1'.
    *  LS_FIELDCAT-REF_TABNAME   = 'EKKN'.
      APPEND LS_FIELDCAT TO  RT_FIELDCAT.
       CLEAR LS_FIELDCAT.
      LS_FIELDCAT-TABNAME       = G_TABNAME.
      LS_FIELDCAT-SELTEXT_L = 'Insurance'.
      LS_FIELDCAT-FIELDNAME     = 'KBETR2'.
        LS_FIELDCAT-REF_FIELDNAME = 'KBETR'.
      LS_FIELDCAT-REF_TABNAME   = 'KONV'.
      APPEND LS_FIELDCAT TO  RT_FIELDCAT.
    CLEAR LS_FIELDCAT.
      LS_FIELDCAT-TABNAME       = G_TABNAME.
      LS_FIELDCAT-SELTEXT_L     = 'Frieght'.
      LS_FIELDCAT-FIELDNAME     = 'KWERT'.
      LS_FIELDCAT-REF_FIELDNAME = 'KWERT'.
      LS_FIELDCAT-REF_TABNAME   = 'KONV'.
      APPEND LS_FIELDCAT TO  RT_FIELDCAT.
    * CLEAR LS_FIELDCAT.
    *  LS_FIELDCAT-TABNAME       = G_TABNAME.
    *  LS_FIELDCAT-SELTEXT_L     = '' .
    *  LS_FIELDCAT-FIELDNAME     = 'KBETR1'.
    *  LS_FIELDCAT-REF_FIELDNAME = 'KBETR'.
    *  LS_FIELDCAT-REF_TABNAME   = 'KONV'.
    *  APPEND LS_FIELDCAT TO  RT_FIELDCAT.
    *CLEAR LS_FIELDCAT.
    *  LS_FIELDCAT-TABNAME       = G_TABNAME.
    *  LS_FIELDCAT-SELTEXT_L     = 'PBXX'.
    *  LS_FIELDCAT-FIELDNAME     = 'KWERT1'.
    *  LS_FIELDCAT-REF_FIELDNAME = 'KWERT'.
    *  LS_FIELDCAT-REF_TABNAME   = 'KONV'.
    *  APPEND LS_FIELDCAT TO  RT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-TABNAME       = G_TABNAME.
      LS_FIELDCAT-SELTEXT_L     = 'VAT/ST '.
      LS_FIELDCAT-FIELDNAME     = 'KBETR'.
      LS_FIELDCAT-REF_FIELDNAME = "KBETR".
      LS_FIELDCAT-REF_TABNAME   = 'KONV'.
      APPEND LS_FIELDCAT TO  RT_FIELDCAT.
    CLEAR LS_FIELDCAT.
      LS_FIELDCAT-TABNAME       = G_TABNAME.
      LS_FIELDCAT-SELTEXT_L     = 'OTHER '.
      LS_FIELDCAT-FIELDNAME     = 'KWERT2'.
      LS_FIELDCAT-REF_FIELDNAME = "KWERT".
      LS_FIELDCAT-REF_TABNAME   = 'KONV'.
      APPEND LS_FIELDCAT TO  RT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-TABNAME       = G_TABNAME.
      LS_FIELDCAT-SELTEXT_L = 'TOTAL'.
      LS_FIELDCAT-FIELDNAME     = 'TOTAL'.
      LS_FIELDCAT-REF_FIELDNAME = 'TOTAL'.
    *  LS_FIELDCAT-REF_TABNAME   = 'EKKN'.
      APPEND LS_FIELDCAT TO  RT_FIELDCAT.
       ENDFORM.                    " FIELDCAT_INIT
       FORM GET_DATA.
       SELECT  A~EBELN A~LIFNR  A~EKORG A~KNUMV B~VGABE  B~GJAHR B~BELNR
               L~NAME1 L~NAME2
            FROM  EKKO AS A
                          INNER JOIN EKBE  AS B ON  B~EBELN = A~EBELN
                          INNER JOIN LFA1 AS L ON L~LIFNR = A~LIFNR
                          INTO  CORRESPONDING
                          FIELDS OF TABLE ITAB.
    *                      WHERE B~VGABE = '2'.
    SELECT EKPO~EBELN EKPO~EBELP EKPO~MATNR EKPO~TXZ01 EKPO~WERKS
              EKPO~NETWR EKPO~MENGE EKPO~MWSKZ  EKPO~NETPR EKPO~PACKNO
              FROM EKPO
                        INTO CORRESPONDING FIELDS OF TABLE ITAB1
                        FOR ALL ENTRIES IN ITAB
                        WHERE EKPO~EBELN = ITAB-EBELN and
                              EKPO~BUKRS = 'company code'.
       SELECT EKKN~EBELN EKKN~EBELP EKKN~KOSTL EKKN~PS_PSP_PNR
          FROM EKKN
                   INTO CORRESPONDING FIELDS OF TABLE ITAB2
                   FOR ALL ENTRIES IN ITAB1
                   WHERE EKKN~EBELN = ITAB1-EBELN  AND
                         EKKN~EBELP = ITAB1-EBELP.
       SELECT KONV~KNUMV KONV~KSCHL KONV~KBETR KONV~KWERT KONV~KWERT
                  KONV~KPOSN
          FROM KONV
              INTO CORRESPONDING FIELDS OF TABLE ITAB5
              WHERE KONV~KNUMV =   ITAB1-KNUMV AND
                    KONV~KPOSN = ITAB1-EBELP.
    *    SELECT LFA1~NAME1 LFA1~NAME2 FROM LFA1
    *    INTO CORRESPONDING FIELDS OF TABLE ITAB1
    *    WHERE  LFA1~LIFNR = ITAB-LIFNR.
    *  SELECT ESLL~SUB_PACKNO ESLL~SRVPOS
    *           ESLL~EXTROW  ESLL~KTEXT1 FROM ESLL
    *       INTO CORRESPONDING FIELDS OF TABLE ITAB6
    *       FOR ALL ENTRIES IN ITAB1
    *       WHERE ESLL~PACKNO = ITAB1-PACKNO .
    **         SELECT ESLL~SUB_PACKNO FROM ESLL
    **       INTO CORRESPONDING FIELDS OF TABLE ITAB6
    **       FOR ALL ENTRIES IN ITAB1
    **       WHERE ESLL~PACKNO = ITAB1-PACKNO.
    *        SELECT ESLL~SUB_PACKNO ESLL~SRVPOS
    *           ESLL~EXTROW  ESLL~KTEXT1 FROM ESLL
    *       INTO CORRESPONDING FIELDS OF TABLE ITAB8
    *       FOR ALL ENTRIES IN ITAB6
    *       WHERE ESLL~PACKNO = ITAB6-SUB_PACKNO .
    * SELECT RSEG~BELNR RSEG~GJAHR FROM RSEG
    *        INTO CORRESPONDING FIELDS OF TABLE  ITAB7
    *        FOR ALL ENTRIES IN ITAB
    *        WHERE RSEG~BELNR = ITAB-BELNR AND
    *              RSEG~GJAHR = ITAB-GJAHR.
    *LOOP AT ITAB1.
    LOOP AT ITAB.
                  READ TABLE ITAB1 WITH KEY EBELN = ITAB-EBELN.
    *         IF ITAB1-EBELN = ITAB-EBELN.
                    IF sy-subrc eq 0.
    *                          ITAB1-EBELN = ITAB-EBELN.
                              ITAB1-LIFNR = ITAB-LIFNR.
    *                          ITAB1-EBELP = ITAB-EBELP.
                              ITAB1-BELNR = ITAB-BELNR.
                              ITAB1-KNUMV = ITAB-KNUMV.
                              ITAB1-NAME1  = ITAB-NAME1.
                              ITAB-NAME2 = ITAB-NAME2.
                              ITAB1-GJAHR = ITAB-GJAHR.
                    modify itab1 index   sy-tabix.
            ENDIF.
    ENDLOOP.
    *LOOP AT ITAB2.
    *         READ TABLE ITAB1 WITH KEY EBELN = ITAB2-EBELN.
    *          IF sy-subrc eq 0.
    *              ITAB1-EBELN = ITAB2-EBELN.
    *              ITAB1-PS_PSP_PNR = ITAB2-PS_PSP_PNR.
    *              ITAB1-KOSTL = ITAB2-KOSTL.
    *               modify itab1 transporting ps_psp_pnr kostl
    *               where ebeln = Itab2-ebeln AND EBELP = ITAB2-EBELP.
    *          ENDIF.
    *ENDLOOP.
    LOOP AT ITAB1.
    **ON CHANGE OF   ITAB1-ebeln or itab1-ebelp.
    *     concatenate itab1-werks itab1-lifnr itab1-matnr
    *         into val1.
    *   MOVE VAL1 TO ITAB1-VAKEY.
    *   MODIFY ITAB1.
    *    SELECT KONH~KNUMH KONH~KSCHL FROM KONH
    *        INTO  CORRESPONDING FIELDS OF TABLE ITAB3
    *        FOR ALL ENTRIES IN ITAB1
    *        WHERE KONH~VAKEY = ITAB1-VAKEY.
    **endon.
    **        sort Itab3 by kschl descending.
    **        Select konp-kbetr  from konp into itab4 where
    **        KONP~KNUMH = ITAB3-KNUMH AND KONP~KSCHL = ITAB3-KSCHL.
    **ON CHANGE OF  ITAB1-ebelp.
    **LOOP AT ITAB3
    **  ON CHANGE OF  ITAB1-ebelp.
    *              itab1-knumh = itab3-knumh.
    **              SELECT  KONP~KBETR FROM KONP INTO CORRESPONDING FIELDS
    **              OF  TABLE  ITAB4
    **              FOR ALL ENTRIES IN ITAB3   WHERE
    **              KONP~KNUMH = ITAB3-KNUMH AND KONP~KSCHL = ITAB3-KSCHL .
    **              IF ITAB3-KSCHL = 'JMOP' .
    **               ED = ITAB4-KBETR / 1000 * ITAB1-NETWR .
    **              ENDIF.
    **             IF ITAB3-KSCHL = 'JEC1'.
    **              Itab1-ed1 = ITAB4-KBETR / 1000 * ED.
    **              ADD ED TO ITAB1-ED1.
    **             modify  ITAB1 transporting ed1.
    **             ENDIF.
    *              IF ITAB3-KSCHL = 'JMOP' .
    *               ED = 16 / 100 * ITAB1-NETWR .
    *              ENDIF.
    *             IF ITAB3-KSCHL = 'JEC1'.
    *              Itab1-ed1 = 2 / 100 * ED.
    *              ADD ED TO ITAB1-ED1.
    *             modify  ITAB1 transporting ed1.
    *             ENDIF.
    **        ENDLOOP.
    **endon.
    modify  ITAB1.
    *endon.
      LOOP AT ITAB5.
         IF ITAB5-KSCHL = 'NAVS' OR ITAB5-KSCHL = 'NAVM'.
                ITAB1-KBETR = ITAB5-KBETR.
                 modify  ITAB1 transporting KBETR
                 where  KNUMV =  ITAB1-KNUMV AND EBELP = ITAB1-EBELP .
               ELSEIF ITAB5-KSCHL = 'FRA1' OR ITAB5-KSCHL = 'FRC1' OR
                    ITAB5-KSCHL = 'FRB1'.
                       ITAB1-KWERT = ITAB5-KWERT .
                       modify  ITAB1 transporting KWERT
                       where  KNUMV =  ITAB1-KNUMV AND EBELP = ITAB1-EBELP
    *               IF ITAB5-KSCHL = 'FRA1'.
    *                    ITAB1-KBETR1 = ITAB5-KBETR / 1000 * ITAB1-NETWR .
    *                   modify  ITAB1 transporting KBETR1
    *                   where  KNUMV =  ITAB1-KNUMV AND EBELP = ITAB1-EBELP
    *                 ELSEIF ITAB5-KSCHL = 'FRC1' .
    *                   ITAB1-KBETR1 = ITAB5-KBETR * ITAB1-MENGE .
    *                   modify  ITAB1 transporting KBETR1
    *                   where  KNUMV =  ITAB1-KNUMV AND EBELP = ITAB1-EBELP
    *                 ELSEIF ITAB5-KSCHL = 'FRB1' .
    *                    ITAB1-KBETR1 = ITAB5-KBETR .
    *                   modify  ITAB1 transporting KBETR1
    *                   where  KNUMV =  ITAB1-KNUMV AND EBELP = ITAB1-EBELP
    *              ENDIF.
    *           **THIS  CODE IS FOR iNSURANCE  CONDITION
               ELSEIF ITAB5-KSCHL = 'ZGIN' OR ITAB5-KSCHL = 'ZIN2'.
                       ITAB1-KBETR2 = ITAB5-KBETR.
                       modify  ITAB1 transporting KBETR2
                       where  KNUMV =  ITAB1-KNUMV AND EBELP = ITAB1-EBELP
    *           **THIS  CODE IS FOR PBXX OR PB00  CONDITION
    *          ELSEIF ITAB5-KSCHL = 'PBXX' OR ITAB5-KSCHL = 'PB00'.
    *                   ITAB1-KWERT1 = ITAB5-KWERT1.
    *                   modify  ITAB1 transporting KWERT1
    *                   where  KNUMV =  ITAB1-KNUMV AND EBELP = ITAB1-EBELP
    **          ELSEIF ITAB5-KSCHL = 'JOCM' OR ITAB5-KSCHL = 'RA00' OR
    **                 ITAB5-KSCHL = 'RA01' OR ITAB5-KSCHL = 'RB00' OR
    **                 ITAB5-KSCHL = 'RC00' OR
    **THIS  CODE IS FOR OTHER CONDITION
               ELSEIF ITAB5-KSCHL = 'RL01' OR ITAB5-KSCHL = 'ZA00' OR
                     ITAB5-KSCHL = 'ZA01' OR ITAB5-KSCHL = 'ZAE1' OR
                     ITAB5-KSCHL = 'ZAED' OR
                     ITAB5-KSCHL = 'ZAFR' OR ITAB5-KSCHL = 'ZB00' OR
                     ITAB5-KSCHL = 'ZBCH' OR ITAB5-KSCHL = 'ZBED' OR
                     ITAB5-KSCHL = 'ZC00' OR
                     ITAB5-KSCHL = 'ZCEX' OR ITAB5-KSCHL = 'ZCIF' OR
                     ITAB5-KSCHL = 'ZHC1' OR ITAB5-KSCHL = 'ZHC2' OR
                     ITAB5-KSCHL = 'ZHCT' OR
                     ITAB5-KSCHL = 'ZHCV' OR ITAB5-KSCHL = 'ZJOC' OR
                     ITAB5-KSCHL = 'ZOTH' OR ITAB5-KSCHL = 'ZOTP' OR
                     ITAB5-KSCHL = 'ZOTT' OR
                     ITAB5-KSCHL = 'ZPK1' OR ITAB5-KSCHL = 'ZPK2' OR
                     ITAB5-KSCHL = 'ZPK3' OR ITAB5-KSCHL = 'ZPK4' OR
                     ITAB5-KSCHL = 'ZRPO' OR
                     ITAB5-KSCHL = 'ZSE1' OR ITAB5-KSCHL = 'ZSED' OR
                     ITAB5-KSCHL = 'ZSFR' OR ITAB5-KSCHL = 'ZSTX' OR
                     ITAB5-KSCHL = 'ZTPI' OR
                     ITAB5-KSCHL = 'ZTPV' OR ITAB5-KSCHL = 'ZTRD' OR
                     ITAB5-KSCHL = 'ZWCT'.
                       ITAB1-KWERT2 = ITAB5-KWERT.
                       modify  ITAB1 transporting KWERT2
                       where  KNUMV =  ITAB1-KNUMV AND EBELP = ITAB1-EBELP
              modify itab1.
           ENDIF.
    ENDLOOP .
    ITAB1-TOTAL = ITAB1-NETWR + ITAB1-KWERT2 + ITAB1-KWERT + ITAB1-KBETR.
    *              ITAB1-TOTAL = ITAB1-NETWR + ITAB1-ED1 + ITAB1-KBETR2 +
    *                     ITAB1-KBETR1 + ITAB1-KBETR + ITAB1-KWERT   .
                     modify  ITAB1 transporting TOTAL.
    LOOP AT ITAB6.
              ITAB1-SUB_PACKNO = ITAB6-SUB_PACKNO.
    *           modify  ITAB1.
    ENDLOOP.
    LOOP AT ITAB7.
            ITAB1-BELNR = ITAB7-BELNR.
            ITAB1-GJAHR = ITAB7-GJAHR.
      ENDLOOP.
    LOOP AT ITAB8.
              ITAB1-SUB_PACKNO = ITAB8-SUB_PACKNO.
              ITAB1-SRVPOS  = ITAB8-SRVPOS.
              ITAB1-EXTROW = ITAB8-EXTROW.
              ITAB1-KTEXT1 = ITAB8-KTEXT1.
              modify  ITAB1.
    ENDLOOP.
    * SELECT ESLL~PACKNO ESLL~SUB_PACKNO ESLL~SRVPOS ESLL~KTEXT1
    *          FROM ESLL
    *          INTO CORRESPONDING FIELDS OF TABLE ITAB6
    *          WHERE ESLL~PACKNO = ITAB1-PACKNO.
    ** delete  adjacent  duplicates  from itab1 comparing EBELN .
    modify  ITAB1.
    endloop.
    sort Itab1 by EBELN Ascending.
            SELECT KONV~KBETR FROM KONV
            INTO ITAB1-KBETR
            WHERE KONV~KSCHL =  'NAVS' OR KONV~KSCHL = 'NAVM'.
            ENDSELECT.
            ITAB1-KBETR = ITAB5-KBETR.
    *ENDLOOP.
    *ENDLOOP.
    *ENDLOOP.
    ENDFORM.
    Reward all helpfull answers
    Regards
    Pavan

  • Calling the selection screen of report with data for the selection field

    I have the selection screen with 2 fileds.
    sales order and  payment terms.
    My requirement is to update the payment terms into the ztable for the given order.
    Sometimes the payment terms will be there ie already maintained ,in that case i need to show to the user the existing payment term ,so that he can modify and save that one.If the payment term is not existing then simply i can go inside the program and update the payment term.
    What I thought of doing is , writing a report program and then after the user inputs the selection screen ie order number , I Will check in the ztable and if the payment terms is found then i will use the key word leave list processing. But i dont know how to populate the payement term in the selection screen oncegaing from the program

    Hi shiva,
    when the user enters sales order number on screen, in parameter 1,
    you want to show payment term, on selection screen itself, in parameter 2.
    We can use the event
    AT SELECTION-SCREEN.
    Eg. PO Number <----
    > User
    Below is sample code for same.
    If you enter PO Number, the system will show the corresponding user in parameter2.
    Just copy paste.
    REPORT  YAM_TEMPA09.
    PARAMETERS : EBELN LIKE EKKO-EBELN.
    PARAMETERS : ERNAM LIKE EKKO-ERNAM.
    AT SELECTION-SCREEN.
    ERNAM = ''.
    SELECT SINGLE ERNAM
    FROM EKKO
    INTO ERNAM
    WHERE EBELN = EBELN.
    regards,
    amit m.

  • Matrix report with Date

    Hi All,
    How do I generate a report with colum is data and row is date like below, and then generate a chart that show the progress by each day. Thanks so much for your help.
    Date 03/17/2006 03/18/2006 03/19/2006 03/20/2006 .........
    My Data
    Data 1 2 20 3 28
    Data 2 3 35 0 0
    Data 3 6 88 9 7
    Data 4 8 123 100 88
    Best Regards,
    Andy Pham

    Hi Andy,
    In a matrix report, the usual problem with reporting by all the dates in a period is that they may be gaps in dates where there is no data for that day.
    Therefore, you will need to have a workaround by having a view with all the possible dates using something like the following SQL.
    eg
    CREATE VIEW MY_VIEW AS
    SELECT (TRUNC(sysdate) -30 + ROWNUM) DATES FROM user_objects WHERE rownum < 31;
    You can play around with this SQL to suit your requirements.
    In your query for the matrix report, include MY_VIEW to the query and outer join your date column to DATES. ie DATES = your_date_column(+)
    Use DATES as a MATRIX column field and it will give you 30 columns. The MATRX row field and MATRIX cell field will be your own data.
    One very important thing to note is your date column must be truncated to 0 hours and minutes otherwise you will not get matching records.
    Regards,
    John

  • Copy of an InfoCube with Data

    Hi,
    I want to make a copy of an infocube with the data.
    I tried creating the cube by copying it from the original one. The new cube got created but without data.
    Can anyone please help.
    Thanks
    Ramesh

    Hi,
    Actually you can try these options:
    1. since you have created a similar cube with hope fully similar info source,
        then you can go to the info package and this time select your new cube
       as target and reload the data..
    2. Other wise, generate export data source from the original cube, make a copy
        cube from the original durig the update rule creation for second cube select
        the souce as info cube and put the name of the cube..
    3. Then go to the data mart info source area for copy cube create a package
        and then run the init/full load..
    Hope it helps..
    thanks=points.

  • Generate report with data from database package

    Hi
    Is it possible to generate a report where the values come from an oracle database package instead of from an sql query declared in the report itself?
    If yes, how is it done?
    Appreciate any help. Thx.

    Hi,
    You can use REF CURSORs to generate reports from a database package.
    For information about REF CURSORs, please see Chapter 40 'Building a Paper Report with REF CURSORs' of the Oracle Reports Building Reports manual.
    This chapter is at:
    http://download-uk.oracle.com/docs/html/B13895_01/orbr_refcur.htm#i1011693
    Hope this helps.
    Regards,
    Panna

  • Report Painter - data not shown at first selection

    Hello,
    we have a Report Painter report for cost centers.
    If we start the report with normal selection the values of the cost centers are not shown at the first look.
    The window on the right side only shows the sum for the whole cost center group, but if we select one single cost center the report shows
    "This report has no pages. Check the following layout settings: Threshold values, Summation levels, Zero line suppression."
    But there are values, but they are only shown if we switch to another cost center and then switch back.
    All rows that are selected the first time show no values, at the second time the values are there.
    Does anybody know the reason for this?
    Thank you & regards
    Britta

    Hello,
    starting the report with the selection of a cost center group.
    This group is shown on the left side, the values in sum of the right side.
    To have a detailled look on the single values of the cost centers I expand the cost center group by clicking on the small triangle, all included cost centers are now showns on the left side.
    To see the value of a cost center I click on the respective cost center, on the right side the "no data" information is shown.
    Clicking on the next cost center also the "no data" information is shown.
    Now switch back to the first cost center on the left side and then the values are shown on the right side.

  • Web Dynpro Abap: Select-Options: Save Selection Data

    Hello,
    I am using select-options in web dynpro abap.  Need to add a feature where the user can save his selection values as a variant. 
    All I can think of is getting all the selection values and saving these into a Z table.
    Can you suggest a better way?
    Thank you.
    Irene

    Hi Irene,
    Alas, it's currently not possible. You could write your own wrapper though adding a save button. Inside of the action handler you could retrieve the range tables of all fields, convert their content to a structure you like and save it a fitting db table. My suggestion is to use XML and a DB table with a XSTRING field in the data section to store the range table values.
    Using personalization will allow you to customize your ui and to hide certain select option fields.
    Best regards,
    Thomas

  • Innput field with Select option on custom screen

    Hi,
    I need to create an Input field with Select Option(No interval) button on Custom dialog screen .
    Is there any idea how can I create it on screen ?
    Thanks
    Sachin

    create a normal inputfield and place an icon next to it. then in the pai on click of that button use the following code.
    data: wf_tab_field like rstabfield occurs 0 with header line ,
          wf_exl_opt like rsoptions .
    refresh: wf_tab_field  .
        move: 'KOSTL' to wf_tab_field-fieldname ,
              'CSKS' to wf_tab_field-tablename .
        append wf_tab_field .
        clear wf_tab_field .
        move: 'X' to wf_exl_opt-bt ,
              'X' to wf_exl_opt-cp ,
              'X' to wf_exl_opt-ge ,
              'X' to wf_exl_opt-gt ,
              'X' to wf_exl_opt-le ,
              'X' to wf_exl_opt-lt ,
              'X' to wf_exl_opt-nb ,
              'X' to wf_exl_opt-np .
    call function 'COMPLEX_SELECTIONS_DIALOG'
         exporting
           title                   = 'Select Cost Centers'
           text                    = 'Cost Center'
    *         SIGNED                  = 'X'
    *         LOWER_CASE              = ' '
    *         NO_INTERVAL_CHECK       = ' '
    *         JUST_DISPLAY            = ' '
    *         JUST_INCL               = ' '
            excluded_options        = wf_exl_opt
    *         DESCRIPTION             =
            help_field              = 'CSKS-KOSTL'
    *          SEARCH_HELP             = 'KOST'
            tab_and_field           = wf_tab_field
          tables
            range                   = r_kostl
         exceptions
           no_range_tab            = 1
           cancelled               = 2
           internal_error          = 3
           invalid_fieldname       = 4
           others                  = 5
        if sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        endif.
        if not r_kostl[] is initial .
          read table r_kostl index 1 .
          if sy-subrc eq 0 .
            move: r_kostl-low to wf_t_kostl .
          endif .
        endif .
    wf_t_kostl  is the screen field name.
    Raja

Maybe you are looking for

  • How do I pass parameter to different portlet regions from another page?

    How do I pass parameter to different portlet regions from another page? I have a page that with two regions. Each region has a report that uses the same information to generate its report. Individually running the reports, I can use p_arg_names and p

  • Leopard and G4 performance

    I'm thinking of upgrading to Leopard, but concerned that it might slow things down a bit, as my G4 only has 500mb RAM. Any opinions?

  • Help: Creating a Dynamic TreeView Using JSP

    I'm involved in a research project developing a webclient for the subversion VCS. I was able to access the repository and get the content as a string using the JavaSVN Library. It is like follows A/ A/1.txt A/B/2.txt A/B/3.txt C/ C/4.txt The problem

  • Mac App Store says "Unknown error."

    The Mac App store is giving me an "unknown error" when I try to install a purchased app or but another app.  I *think* this is a result of me running a chmod or chown recursively on the wrong directory.  I've run the "Restore Disk Permissions" on my

  • You can't open the application NotificationExecbecause PowerPC applications are no longer supported

    I have Lion on my mac and I've tried to install an application for an external Maxtor hard drive. But it seems to be compatable only with previous Operating Systems because now every 5 seconds I get the popup "You can't open the application Notificat