• RELEVANCY SCORE 3.51

    DB:3.51:Merging Data Of Multiple Row Into Single Row Output xj





    rollnonamecity1---XYZ---PuneSuppose this is a student table and I want a output as,rollno name city------------------------------------1 xyz PuneHow can i get it pls tell me,

    DB:3.51:Merging Data Of Multiple Row Into Single Row Output xj

    Hi,Here's one way:SELECT MIN (rollno) AS rollno, MIN (name) AS name, MIN (city) AS cityFROM student;This assumes that each column will have (at most) only 1 non-NULL entry. If my assumption is wrong, then post some sample data (CREATE TABLE and INSERT statements), and the results you want from that data. Explain how you get those results from that data.Always say which version of Oracle you're using (for example, 11.2.0.2.0).See the forum FAQ: https://forums.oracle.com/message/9362002

  • RELEVANCY SCORE 3.45

    DB:3.45:How To Modify Database Table With An Internal Table xk






    Hi, Friends.

    I am coping Data from a Database table to an internal table after modifying data in the internal table I want to modify the db table according to the modification in the internal table. can some one help me out in this way, i am doing this modification in Table Control in Screen programing.

    My Code is as follow.

    MODULE zfsl_stinf_tc_init OUTPUT.

    IF tc_copy IS INITIAL.

    SELECT * INTO CORRESPONDING FIELDS OF TABLE it_zfsl_stinf FROM zfsl_stinf.

    tc_copy = 'X'.

    REFRESH CONTROL 'TC_FOR_ZFSL_STINF' FROM SCREEN '0001'.

    ENDIF.

    ENDMODULE. " zfsl_stinf_init OUTPUT

    ----

    * Module zfsl_stinf_tc_move OUTPUT

    ----

    text

    ----

    MODULE zfsl_stinf_tc_move OUTPUT.

    MOVE-CORRESPONDING wa_it_zfsl_stinf TO zfsl_stinf.

    ENDMODULE. " zfsl_stinf_tc_move OUTPUT

    ----

    * Module STATUS_0001 OUTPUT

    ----

    text

    ----

    MODULE status_0001 OUTPUT.

    SET PF-STATUS 'ZFSL_SCREEN_1ONLY'.

    SET TITLEBAR 'xxx'.

    ENDMODULE. " STATUS_0001 OUTPUT

    ----

    * Module zfsl_stinf_tc_modify INPUT

    ----

    text

    ----

    MODULE zfsl_stinf_tc_modify INPUT.

    MOVE-CORRESPONDING zfsl_stinf TO wa_it_zfsl_stinf.

    MODIFY it_zfsl_stinf FROM wa_it_zfsl_stinf INDEX tc_for_zfsl_stinf-current_line.
    _*"" here i have the modified internal table " it_zfsl_stinf "*_

    DB:3.45:How To Modify Database Table With An Internal Table xk


    Hi,

    After using MODIFY (dbtabname) FROM TABLE itab also give COMMIT statement inorder to commit the records in DB

    Regards,

    Shan

  • RELEVANCY SCORE 3.43

    DB:3.43:Qxml jd





    I know Oracle supports XML and that means we can SELECT data from a table and make an output file as an XML format and INSERT an XML data into a table. QRS an e-commerce corporation develop their own XML format called QXML (QRS XML) and I want to know if Oracle supports such format ?

    DB:3.43:Qxml jd

    No, we don't support this specific format. Can you use XSLT to transform between different formats.

  • RELEVANCY SCORE 3.42

    DB:3.42:Get Table Data Output Into A Text File 81


    Hi Experts,
    I have below code. Which is taking data from 2 tables and archiving it to some archive database. After archived. Its deleting data from the production table for the specified data range... I want to take the count of archived data for both the tables into
    a text file e.g If table 1 has 100 rows and table 2 has 200 rows to archive it can put into text file that
    Total 100 has been moved from T1
    Total 200 has been moved from T2

    DB:3.42:Get Table Data Output Into A Text File 81

    You are developing a dangerously bad habit. Look at your script carefully - what happens if you alter that first use statement by changing the database name? Consistency is a good habit to develop - as is the use of the schema name when referring
    to objects within one. Laziness invites problems.

  • RELEVANCY SCORE 3.39

    DB:3.39:Alv Grid Data 83



    Hi All,

    I developed alv grid.I passed data from it_final table into grid.In our it_final table, there is 10 rows and when I execute report then it comes 10 line item.It is perfect. Now I do subtotal in any field.Then In the

    grid total 15 line item comming.Now I want that 15 line item should come in a table.eithe it_final or

    either any defined table.is it possible?please help me.I want just output alv grid after subtotal(15 lines item) should come in table after pressing in any button.

    Thanks,

    Rakesh

    DB:3.39:Alv Grid Data 83


    You will have to manually loop at it_final and calculate the subtotal for the fields and append this into the it_final while displaying.

    If you r calculating subtotal in sort table by subtos = 'X'. this entry cannot be put into final internal table.

    Regards,

    Mansi.

  • RELEVANCY SCORE 3.36

    DB:3.36:Download Table Data 9s



    Hi All,

    Is it possible to download Table data into file(.xls or xml). is there any FM to od this kind of download. For example, if i enter the table name i need all the data in table as output.

    Thanks Regards

    Arun

    DB:3.36:Download Table Data 9s


    Hi Arun,

    My info is similar to Lokeswari Bandaru, but my answer can be more usefull.

    go to tr: SE11, select table you want to download and make a search.

    Go to SETTING -- User Parameters and select 'Alv grid display'

    Now, you can hide columns that you dont need download.

    Click 'Local file' icon to download file.

    I hope, this is usefull for you.

    Regards.

  • RELEVANCY SCORE 3.33

    DB:3.33:Organizing Proc Reg Data 3f



    I need assistance organizing my regression data when using PROC REG. I basically want to organize outputs for 6 regressions into one table showing the coefficients, the T Statistic and the R Square. I tried using ODS OUTPUT ParameterEstimates but I was only able to retrieve the coefficient and the T statistic (see below). I also tried ODS OUTPUT FitStatistics but that only shows the r squared data. What else can I do to organize my data?

    proc reg data = master;

    model fcinv = unrate homeprice;

    model fcinv = unrate homeprice jud;

    model fcinv=unrate homeprice nonjud;

    model fcinv = unrate homeprice nonjud emp;

    model fcinv = unrate homeprice nonjud unemp;

    model fcinv= unrate homeprice nonjud hpi;

    run;

    ods output close;

    proc print data = a;

    run;

    proc tabulate data = a;

    class model variable;

    var estimate tvalue;

    table variable = ' ' *(estimate = ' ' *sum = ' '

    tvalue = ' ' * sum = ' '),

    model = ' '

    /box = [label = "Parameter"] rts=15 row = float misstext = ' ' ;

    run;

    DB:3.33:Organizing Proc Reg Data 3f


    Use the OUTEST=EST, TABLEOUT, and EDF options, as documented in the syntax for the PROC REG statement:

    http://support.sas.com/documentation/cdl/en/statug/63962/HTML/default/viewer.htm#statug_reg_sect007.htm

    proc print data=EST;

    where _TYPE_="PARMS" | _TYPE_="T";

    var _MODEL_ _TYPE_ Intercept X1 X2 X3 _RSQ_;

    run;

  • RELEVANCY SCORE 3.32

    DB:3.32:Display Column Wise Data Into Rowwise sj


    I have a table which contains data like this format
    sno sname marks
    1ab40
    2 cd 30
    3 xy 50
    i want to display output like this format by using sql query
    1 2 3
    abcd xy
    40 30 50
    Your help is needfull
    Thanks

    DB:3.32:Display Column Wise Data Into Rowwise sj


    Hi Reza,
    By using PIvot we can transfer the data according to row wise but i don't want to change the data as per the row name.
    I only display the columns data in rows manner.
    Thanks,
    Sagar

    You want to do a
    Transpose? Also see this similar thread:
    http://social.msdn.microsoft.com/Forums/en-US/sqlintegrationservices/thread/8ed29d52-5c28-4bba-b4a6-e9b9f9c0c584

    Please mark the post as answered if it answers your question | My SSIS Blog:
    http://microsoft-ssis.blogspot.com

  • RELEVANCY SCORE 3.31

    DB:3.31:Ssrs Stored Procedure Calls. 73


    I am new to SSRS.
    What I need to do is I have two tables. data of second table is dependent on data of first table.
    So I need to pass the output of 1st stored procedure into second. Means I want them to run in a sequential manner.

    Is this possible? If not how Can i achive this functionality.
    Thanks in Advance for any help.

    DB:3.31:Ssrs Stored Procedure Calls. 73

    Hi Moooddy,
    According to your description, it seems that you want to pass some results from table1 to table2 so that the data of table2 depend on the data of table1. In Reporting Service, we can add some parameters which get value from table1 (DataSet1), and then add
    some filters to use those parameters in table2. After testing it in my own environment, we can refer to the following steps (supposing pass a value Group from table1 to table2 by using a parameter):
    1.Add a parameter named Group in the Report Data pane.
    2.Select Get values from a query in Available Values pane, then select DataSet1 and Group field in the following drop-down list.
    3.Right-click the table2 to open Tablix Properties dialog box, click Filter in the left pane.
    4.Add a filter as follows:
    Expression: [Group] Operator: In Value:[@Group]
    5.If we want to pass more than one values from table1 to table2, we can repeat the steps above.
    If I have something misunderstood, please provide us more information about the report. If possible tell me why you want to pass the output of first stored procedure into the second, and what goal you want to achieve. So that we can make further analysis
    and help you out.
    Thanks,
    Katherine Xiong

  • RELEVANCY SCORE 3.30

    DB:3.30:Output Of The Data Profiling Task (Xml Data) Load Into Sql Server sz


    Hi,
    In my source table how many number of the null values is therer I want to find out,for that one I'm using data Profiling(Column null ratio profile) task.Now I want to load that null values into sql table.Can any one help to me regarding to this issue.

    DB:3.30:Output Of The Data Profiling Task (Xml Data) Load Into Sql Server sz

    This question was answered nicely on another post:

    http://social.msdn.microsoft.com/Forums/en-US/sqlintegrationservices/thread/a282bb60-c099-4656-bf71-52ddc6153c28
    Ron

  • RELEVANCY SCORE 3.26

    DB:3.26:Reterieve Data Horizontally z1


    hi,

    I just need a help in regard to extract data horizontally, my input table is given below:

    CREATE TABLE TEMP_HORIZONTAL
    (MONTH VARCHAR2(20), M_VAL NUMBER)

    insert into temp_horizontal ('JAN',1);
    insert into temp_horizontal ('JAN',2);
    insert into temp_horizontal ('JAN',3);
    insert into temp_horizontal ('FEB',1);
    insert into temp_horizontal ('FEB',4);
    insert into temp_horizontal ('FEB',6);

    REQUIRED OUTPUT

    FEB JAN
    6 3
    4 2
    1 1

    i tried to use pivot but didnt work as i dont want to perfrom any group operation, i just want to data with respect to month as heading.

    Thanks in advance,

    Van

    DB:3.26:Reterieve Data Horizontally z1

    Hoek wrote:
    Using PIVOT (w/o group by):
    SQL select feb
    2 , jan
    3 from ( select t.month
    4 , t.m_val
    5 , row_number() over (partition by t.month order by t.m_val desc)
    6 from temp_horizontal t
    7 )
    8 pivot
    9 ( max(m_val) for month in ('FEB' as feb, 'JAN' as jan) );

    FEB JAN
    ---------- ----------
    6 3
    4 2
    1 1

    3 rows selected.How is Hoek's query being evaluated ?
    This inner query is genarting

    select t.month
    , t.m_val
    , row_number() over (partition by t.month order by t.m_val desc)
    from temp_horizontal t;

    MONTHM_VALROW_NUMBER()OVER(PARTITIONBYT.MONTHORDERBYT.M_VALDESC)
    FEB61
    FEB42
    FEB13
    JAN31
    JAN22
    JAN13

  • RELEVANCY SCORE 3.26

    DB:3.26:Sql Use Output Into Twice dc


    Hi There

    I basically have 3 Tables, which all have a P, so they are build as followed:
    Table 1 | Table 2 |Table 3 |
    PK1 | PK2 |PK3 |

    Userdata | Table1 PK |Table2 PK|

    | Other Data | Other Data|
    So i want to add something to Table 1 and in the Same insert i want to insert Data in Table 2 with the just added Table1 PK and then the same with Table 3 and 2
    I got so far, that i am able to insert something in table 1 and 2 at the same time and this seems to work fine with the following Script
    ***********************
    INSERT INTO Customer
    ([Salutation]
    ,[Title]
    ,[Forename]
    ,[Surname]
    ,[Company]
    ,[Department]
    ,[Street]
    ,[Pobox]
    ,[Zipcode]
    ,[City]
    ,[Country]
    ,[State]
    ,[Phone]
    ,[Fax]
    ,[Email]
    ,[Username]
    ,[Password]
    ,[SecretQuestion]
    ,[SecretAnswer]
    ,[CreationTime]
    ,[Lang]
    ,[LastModified]
    ,[Valid])


    OUTPUT
    INSERTED.CustomerID
    ,'4'
    ,'1'

    INTO UsersofCompany
    (CustomerID
    ,CompanyID
    ,valid)

    VALUES('Herr'
    ,'Dr.'
    ,'KP'
    ,'WhoCares'
    ,'BlaBlaAG'
    ,'NOMEIS'
    ,'SugarStreet'
    ,'Zuckerstange3'
    ,'12345'
    ,'SugarRace'
    ,'WreckItRaplh'
    ,'AHHHHH'
    ,'6464'
    ,'65464'
    ,'Unkreativ@kreativ.de'
    ,'OMM'
    ,'ferdammt'
    ,'OM'
    ,'NOM'
    ,GETDATE()
    ,'de'
    ,GETDATE()
    ,'1')
    GO

    ********************
    The issue occurs, once i try to add the third table. I tried it with the following code, but i get an error on the 2nd INTO
    **************************************
    INSERT INTO Customer
    ([Salutation]
    ,[Title]
    ,[Forename]
    ,[Surname]
    ,[Company]
    ,[Department]
    ,[Street]
    ,[Pobox]
    ,[Zipcode]
    ,[City]
    ,[Country]
    ,[State]
    ,[Phone]
    ,[Fax]
    ,[Email]
    ,[Username]
    ,[Password]
    ,[SecretQuestion]
    ,[SecretAnswer]
    ,[CreationTime]
    ,[Lang]
    ,[LastModified]
    ,[Valid])


    OUTPUT
    INSERTED.CustomerID
    ,'4'
    ,'1'

    INTO UsersofCompany
    (CustomerID
    ,CompanyID
    ,valid)

    OUTPUT

    INSERTED.ID
    ,'0'
    ,'0'
    ,'0'

    INTO UserRightsStatistic
    (UOCID
    ,isOwner
    ,RegisterCmContainer
    ,WibuAgent
    ,ModifiedTime)

    VALUES('Herr'
    ,'Dr.'
    ,'KP'
    ,'WhoCares'
    ,'BlaBlaAG'
    ,'NOMEIS'
    ,'SugarStreet'
    ,'Zuckerstange3'
    ,'12345'
    ,'SugarRace'
    ,'WreckItRaplh'
    ,'AHHHHH'
    ,'6464'
    ,'65464'
    ,'Unkreativ@kreativ.de'
    ,'OMM'
    ,'ferdammt'
    ,'OM'
    ,'NOM'
    ,GETDATE()
    ,'de'
    ,GETDATE()
    ,'1')
    GO
    **************************************
    Meldung 156, Ebene 15, Status 1, Zeile 43
    Falsche Syntax in der Nähe des 'INTO'-Schlüsselworts.
    Wrong Syntax near INTO-Keyword
    Is it possible to use the OUTPUT INTO like this, and if, how. Else, is there a other simple way without using 3 selects and inserts?

    DB:3.26:Sql Use Output Into Twice dc

    Wunderbar hat auch so in einem Insert geklappt^^ Danke

    Naja eher in einem Query mit 3 inserts .. aber naja .. eventuell ist das Fehlerhandling nicht so gut.. mal sehen muss ich erst testen

  • RELEVANCY SCORE 3.25

    DB:3.25:How To Insert Records From Table Variable To Table z8


    Hi All,
    Recently i have created a Stored procedure in which i am performing some insertion operation and log that all insert operation using output clause and storing that values in Table variable ,
    After completion of each transaction i want to insert whole record into in a permanent table but data is not loading into Tht table
    For Ex-
    --------------------------Stored procedure---------------------------------------------
    Create procedure Example
    as
    begin
    Declare @RowLog Table (id int ,Status varchar(25))
    insert into Table1
    ( A ,B,C)
    output inserted.a,'Inserted' into @RowLog
    select A,B,C from SrcTable1

    insert into Table2
    ( A ,B,C)
    output inserted.a,'Inserted' into @RowLog
    select A,B,C from SrcTable2

  • RELEVANCY SCORE 3.23

    DB:3.23:Load Output From Stored Process Directly Into A Pivot Table? sk



    Hi,

    SAS 9.3

    SAS Add-in for Microsoft Office (AMO) 5.1 (5.100.0.12019) (32-bit)

    Microsoft Office 2007

    Using SAS AMO, do this:

    SAS Tab-- SAS Data -- Browse to desired dataset (eg. SASHELP.STOCKS) -- Select Pivot Table, New Worksheet

    So far, so good. I can load a SAS dataset directly into a Pivot Table.

    Now, using a stored process (an AMO Report), is there any way to load the output of the stored process directly into a Pivot Table? I know I can load the data into an Excel worksheet, then use that worksheet as a source for the Pivot Table, but that's not what I want.

    I was hoping I could do this using some setting in the stored process, such as a Data Target (output stream) (which I've never used in my stored processes).

    Thanks,

    Scott

    DB:3.23:Load Output From Stored Process Directly Into A Pivot Table? sk


    Ok, I don't know why you want to run a stored process, if it's because you want the most recent data och the ability to subset data before you open the report.

    One way to at least get the latest data is to add your code before the task code. If you open properites from the SAS add-in tab in excel and chose tasks, you can add code before and after the task. I think that if you add code that creates a table which you have registred in metadata you can first update/create that table and then open it in Excel.

    So:

    1. create table

    2. Register in metadata.

    3. create code that updates/recreate table

    4. add code before task in Excel.

    5. open table in pivot.

    Migtht work?!

    Regards Fredrik

  • RELEVANCY SCORE 3.23

    DB:3.23:How To Add Data From Internal Table To A Variable 98


    Hello Experts.I have two entries in internal table , both of the entries are text of length 10chars.Now i want to display that in the output with a single variable.ie for example in itab i have like 1st field = Indian 2nd field = HerosNow i want to display like Indian Heros with the help of a single variable. so please tell me how to populate this internal table data into that single variable and make it as one sentence.Thanks for all the replies

    DB:3.23:How To Add Data From Internal Table To A Variable 98

    hi,do this.data : text1(25) type c, text2(25) type c.loop at itab.if sy-tabix eq = 1.text2 = itab-field.else.concatenate itab-field text2 into text1 separated by space.text2 = text1.clear text1.endif.endloop.text2 contains all the records as concatenated into one string.

  • RELEVANCY SCORE 3.23

    DB:3.23:Sql Insert From Input Form Works Fine - How Also Select To Output Table? sa



    Using a JDBC system to an Oracle DB I am writing SQL to do inserts. This works fine by writing the insert statement in the "SQL_STATEMENT" field found by clicking on the line between the input form and the inpurt port of the data service (db table):

    "insert into felles.vc_test (name, sg, user_id) values ('" @NAME "', " @SG ", '" @USER_ID "')"

    Now I also want the user to see that the insert was successful. I am thinking either to give the user a pop up message showing the data that was inserted, or to automatically update an output table triggered by the submit action on the insert form.

    Dragging an output table from the data service's output port does not work by default. I get an "application error !Null".

    How do I do this?

    Henning

    DB:3.23:Sql Insert From Input Form Works Fine - How Also Select To Output Table? sa


    Remove the output table. If you only have the data service with an entry form and write your insert sql on the line between these, the null message disappears.

    Henning

  • RELEVANCY SCORE 3.23

    DB:3.23:Rows Data Into Columns c8


    HI All,

    I have table like A , B , C are column names.

    A B C
    - - -
    1 2 GG
    1 3 BB
    4 5 HH

    I want to write select query which will give me output as

    GG|BB|HH i.e. rows data into columns

    Please help me.

    DB:3.23:Rows Data Into Columns c8

    user523600 wrote:
    HI All,

    I have table like A , B , C are column names.

    A B C
    - - -
    1 2 GG
    1 3 BB
    4 5 HH

    I want to write select query which will give me output as

    GG|BB|HH i.e. rows data into columns

    Please help me.As Karthick points out, it depends on what you actually need.

    If you know there will be a maximum number of columns then you can pivot using decode:

    SQL ed
    Wrote file afiedt.buf

    1 with t as (select 1 as a, 2 as b, 'GG' as c from dual union all
    2 select 1, 3, 'BB' from dual union all
    3 select 4, 5, 'HH' from dual)
    4 -- end of test data
    5 select max(decode(rn,1,c)) as col1
    6 ,max(decode(rn,2,c)) as col2
    7 ,max(decode(rn,3,c)) as col3
    8 ,max(decode(rn,4,c)) as col4
    9 ,max(decode(rn,5,c)) as col5
    10 ,max(decode(rn,6,c)) as col6
    11 ,max(decode(rn,7,c)) as col7
    12 ,max(decode(rn,8,c)) as col8
    13 ,max(decode(rn,9,c)) as col9
    14 ,max(decode(rn,10,c)) as col10
    15* from (select c, row_number() over (order by a,b) as rn from t)
    SQL /

    CO CO CO CO CO CO CO CO CO CO
    -- -- -- -- -- -- -- -- -- --
    GG BB HHOr in 11g onwards you can lookup the new PIVOT keyword.

    If you don't know the number of columns you can opt for string aggregation, if that suits your requirements:

    SQL ed
    Wrote file afiedt.buf

    1 with t as (select 1 as a, 2 as b, 'GG' as c from dual union all
    2 select 1, 3, 'BB' from dual union all
    3 select 4, 5, 'HH' from dual)
    4 -- end of test data
    5 select ltrim(sys_connect_by_path(c,'|'),'|') as dta
    6 from (select c, row_number() over (order by a,b) as rn from t)
    7 where connect_by_isleaf = 1
    8 connect by rn = prior rn + 1
    9* start with rn = 1
    SQL /

    DTA
    ---------------------------------------------------------------------
    GG|BB|HH

    SQLOr if you really need it as a dynamic number of columns then you're going to have to look at dynamic SQL, most likely using a pipelined function:

    How to pipeline a function with a dynamic number of columns?

    (which is slightly more complicated)

  • RELEVANCY SCORE 3.21

    DB:3.21:How To Get Data From An Internal Table In Some Other Program With Out Displaying The Other Programs Output..? 1c



    Hi Friends,

    How to get data from an internal table in some other program(ZPROG1) .

    with out displaying the other programs output(ZPROG1)..?

    Actually I want data from (ZPROG1) to (ZPROG2),

    for that i used Export/Import....

    By this i am getting data from ZPROG1 to ZPROG2..

    But it displaying ZPROG1's output also but i no need the ZPROG1 output, i want only IMPORT the data only.

    Report ZPROG1.

    LOOP AT IT_FINAL INTO WA_FINAL .

    SUM_OPEN = SUM_OPEN + WA_FINAL-OPEN.

    ENDLOOP.

    EXPORT SUM_OPEN TO MEMORY ID 'ZIT_SUM1'.

    ******************************************************************************

    Report ZPROG2.

    SUBMIT ZPROG1

    WITH S_BUDAT IN S_BUDAT

    AND RETURN.

    IMPORT SUM_OPEN FROM MEMORY ID 'ZIT_GROUP_SUM1'.

    DB:3.21:How To Get Data From An Internal Table In Some Other Program With Out Displaying The Other Programs Output..? 1c


    Hi Bhargav,

    Check out the code below.

    Program1

    DATA ITAB LIKE SBOOK OCCURS 10 WITH HEADER LINE.

    DO 5 TIMES.

    ITAB-BOOKID = 100 + SY-INDEX.

    APPEND ITAB.

    ENDDO.

    EXPORT ITAB

    TO MEMORY ID 'table'.

    Program2

    DATA JTAB LIKE SBOOK OCCURS 10 WITH HEADER LINE.

    IMPORT ITAB TO JTAB FROM MEMORY ID 'table'.

    LOOP AT JTAB.

    WRITE / JTAB-BOOKID.

    ENDLOOP.

    Regards,

    Ravikiran.K

  • RELEVANCY SCORE 3.21

    DB:3.21:Save Report Painter Output Into Internal Table fm


    Hi,
    we have standard report painter S_PL0_86000028. when we are executing it shows the output in drill down format.
    i need to show the data in BAPI as well. so need to save the report painter output into an internal table. can anyone please help me to resolving this.
    regards,
    lakshman.

    DB:3.21:Save Report Painter Output Into Internal Table fm

    Hi,
    we have standard report painter S_PL0_86000028. when we are executing it shows the output in drill down format.
    i need to show the data in BAPI as well. so need to save the report painter output into an internal table. can anyone please help me to resolving this.
    regards,
    lakshman.

  • RELEVANCY SCORE 3.21

    DB:3.21:More Than Five Internal Table Move To Output Internal Table... ss



    i want to move five internal table to one output formate table.

    actually all the internal table having the data some condition wise fetched.

    i want to move the internal table data as field wise because some of table fields are same but not all the internal table.

    the time of moving datas to output table, the datas are overlaped..... so that i want particular table fields wise to move to output table.

    note: some of the table having more records and some of table having low records, but all the records fetched some condition wise at that time , so i used forall entries concept wise.......

    i tried so many logic not working....

    please help me as coding wise....

    iam waiting

    DB:3.21:More Than Five Internal Table Move To Output Internal Table... ss


    hi Santhosh,

    Since your 5 tables should be merged to one table for output, you need to maintain one key (may be a key with multiple fields)..which is common to all the 5 internal tables.

    Then you can follow the steps mentioned below.

    1. Find the table with the largest number of records.

    2. loop this table.

    3. move the required fields to target table.

    4. read records from the rest of the tables using READ statement.

    5. after each read, move the relevant fields to the target table fields.

    6. append the target table.

    7.endloop.

    you now have the synchronized data in the target output table.

    Hope this helps.

    Sajan.

    Annex: Since you populate the internal tables using for all entries select, you may require to loop these tables again, to maintain the common key (for 5 tables), and modify inside the loop with index sy-tabix.

    Message was edited by:

    Sajan Joseph

  • RELEVANCY SCORE 3.20

    DB:3.20:Dynamic Collection Type Declaration 1k


    Hi Freinds,

    Very Urgently need ur help.I have got the following situation...

    I have a procedure whiich is taking several parameters along with the OUTPUT table name which is to be generated dynamically.The output table may have different numbers of column each time.The procedure is performing some statistical calculation and insertting the data into the output table.Presently i am gerenarating the simple insert satetement (INSERT INTO SELECT) dynamically and executing using EXECUTE IMMEDIATE.Now i want to perfom the bulk insertion using FORRALL.And for this i have to populate all the data into a collection.But as my OUPUT table is dymanic and it can have different numbers of columns each time..in this case how can i decide what should be my collection type.is there any way to declare collection type dynamically..

    please help

    thanx
    somy

    DB:3.20:Dynamic Collection Type Declaration 1k

    user579361 wrote:
    The fact is that the reusltant recordset is unknwon to me...and i want to hold this record set into a collection.So in this case what should be the proper way to declare the collection.If the data structure is unknown to the code that is generating it, then it's also going to be unknown to anything that would want to use it. Therefore it's pointless generating unknown structures of data.

    Your business requirements must be flawed.

  • RELEVANCY SCORE 3.20

    DB:3.20:Sas Output When Prompt Value Is Not Located ds



    Hi all,

    I have a dataset that included information for employers. I have created a prompt to create an employer specific table that sums up all the data for that employer by year. The problem I having is that:

    When the employer entered into the prompt (numeric - user enters code) is not contained in the dataset, SAS returns a table that sums up all employers. This is not what I want. I want a table that shows zeros in my cells.

    For example: Prompt: Employer code = 1234 (not found in data set)

    OUTPUT:
    YearTotal201025201150201230
    This is not what I want.

    I want a table like this...

    OUTPUT:
    YearTotal201002011020120

    Any help would be greatly appreciated!!

    Lewinda

    DB:3.20:Sas Output When Prompt Value Is Not Located ds


    Hi all,

    I have a dataset that included information for employers. I have created a prompt to create an employer specific table that sums up all the data for that employer by year. The problem I having is that:

    When the employer entered into the prompt (numeric - user enters code) is not contained in the dataset, SAS returns a table that sums up all employers. This is not what I want. I want a table that shows zeros in my cells.

    For example: Prompt: Employer code = 1234 (not found in data set)

    OUTPUT:
    YearTotal201025201150201230
    This is not what I want.

    I want a table like this...

    OUTPUT:
    YearTotal201002011020120

    Any help would be greatly appreciated!!

    Lewinda

  • RELEVANCY SCORE 3.20

    DB:3.20:Create Table pp


    Hi

    I create a table
    ----------
    Create table fss_rente
    (id number,
    interest_jr number,
    interest_start_date date,
    interest_end_date date,
    );
    ---------
    Then I insert data into the table
    --------
    insert into fss_rente
    (id,
    rente_perc_per_jr,
    rente_begin_dt,
    rente_eind_dt
    )
    values
    (
    1,
    4,
    to_date('01-01-2005','dd-mm-yyyy'),
    to_date('01-01-2009','dd-mm-yyyy')
    );
    ----------
    Then I want to make a function when a date is insert example 31-12-2008
    the output should be the 4(the given interest_yr)

    Can anybody help me?

    DB:3.20:Create Table pp

    Sorry,
    I made a mistake.It should be how to make a function!!
    Thanx for your comments!

  • RELEVANCY SCORE 3.19

    DB:3.19:How To Copy Data From One Table Column Into Another Table? za


    I have large data in one table and i have another table which having data.
    i want to copy first table first column data and paste into second table one column.
    For ex. i have A table and B table.
    A table have notes column and having data.
    B table have col1,col2,notes columns and having data.
    I have to copy all records from A table notes column and paste into B table notes column.

    Please reply.

    DB:3.19:How To Copy Data From One Table Column Into Another Table? za

    Hi,

    Source
    Col1 Col2 Notes
    Target
    Col1 Col2 Notes
    If you just need to insert

    Insert into Target(Notes)
    SElect Notes from Source

    But I strongly believe that you need an update query

    so here is how to do it ( i am assuming col1 is a relationship column here)

    Update TgtSET tgt.Notes=Src.Notes
    from Target Tgt Inner Join Source Src
    on Tgt.Col1=Src.Col1

    Regards
    Satheesh

  • RELEVANCY SCORE 3.19

    DB:3.19:Separate Number And Alphabet x8


    CREATE TABLE TEST(TNO VARCHAR2(10));

    INSERT INTO TEST VALUES(10);
    INSERT INTO TEST VALUES(20);
    INSERT INTO TEST VALUES('ORACLE');
    INSERT INTO TEST VALUES('PLSQL');
    INSERT INTO TEST VALUES('SQL30');

    hi
    i have created table and data..
    i want output like this

    number...character
    10.........
    20.........
    ............oracle
    ............plsql
    30........sql

    DB:3.19:Separate Number And Alphabet x8

    Hi,

    It's messier than REGEXP_REPLACE, but TRANSLATE is more efficient:
    SELECTtno
    ,TRANSLATE ( UPPER (tno)
    , '0ABCDEFGHIJKLMNOPQRSTUVWXYZ'
    , '0'
    )AS tno_number
    ,TRANSLATE ( tno
    , 'a0123456789'
    , 'a'
    )AS tno_letter
    FROM test
    ;Edited by: Frank Kulash on Nov 29, 2010 10:28 AM
    Changed REPLACE to TRANSLATE. (Thanks, Karthick!)

  • RELEVANCY SCORE 3.19

    DB:3.19:Mierge Two Table Data Into One Table 9a



    Hi,

    I have two services one is BW query and another is RFC. I am passing the output of BW query to the RFC to get additional information from OLTP system.

    Now I want to merge the output of these two table views (BW querty and RFC) into One table view.

    How can we do this?

    Any help is appreciated.

    Regards,

    Amit

    DB:3.19:Mierge Two Table Data Into One Table 9a


    Hi,

    you can use the UNION operator in VC, maybe this works not as you want. A better way and in most cases faster is to merge the data in the backend. Write an ABAP RFC which executes the query and calls your RFC, then you can combine the data with the ABAP functionality.

    Best Regards,

    Marcel

  • RELEVANCY SCORE 3.18

    DB:3.18:Enable Corresponding Details In Reports a8



    Hi All,

    I have two table (for ex, AI, AVI), both table having common column is ID this details display into table box, when user click Name filed in AI table, now client want expecting whatever associate record display into AVI table please hel me , what way can I proceed, i am tried Trigger but no propper output?

    AI:

    ID

    Name

    Desccription

    101

    ABC

    Checking data quality

    102
    BCD Maintain data quality 103 CDE Check Data quality

    AVI:

    ID

    Version No

    Status

    101

    1

    Assign

    101

    2

    WIP

    101

    3

    Completed

    Regards,

    Senthil.K

  • RELEVANCY SCORE 3.17

    DB:3.17:Schedule Customization 3f



    Hi,

    I have a client requirement -

    I have 2 reports 1 is generating pdf output and other is generating xls output (When deployed on CMC). I want to send these outputs through single mail as attachment And 2nd, when report runs these details get stored into table CONTROL. In CMC we have static subject line, I want to add 3 fields (market, file type and submission data ) from table CONTROL in the subject line of the mail. In short , I want to schedule a report with custom values in subject line.

    Is it possible in BO? How???

    Thanks in advance.

    DB:3.17:Schedule Customization 3f


    You may want to look into publications and potentially post processing extensions to see if they can accomplish what you are looking for.

    Also, you posted this under the SDK forums and I don't see any mention of a custom application, it might be better to ask this in the appropriate forum [here|/community [original link is broken];

  • RELEVANCY SCORE 3.17

    DB:3.17:Query Of Insert Into Table 8z


    Hi,

    I want to insert data into table by subquery and some value by manully.

    How can I insert data into table.

    DB:3.17:Query Of Insert Into Table 8z

    SQL create table t(no integer, obj_name varchar2(100))
    2 /

    Table created.

    SQL create sequence my_seq
    2 /

    Sequence created.

    SQL create or replace function get_next_val return integer
    2 as
    3 lSeq integer;
    4 begin
    5 select my_seq.nextval into lseq from dual;
    6 return lseq;
    7 end;
    8 /

    Function created.

    SQL insert into t
    2 select get_next_val,
    3 MAX(object_name)
    4 from all_objects
    5 where object_type = 'TABLE' group by owner
    6 /

    17 rows created.

    SQL select * from t
    2 /

    NO OBJ_NAME
    ---------- -----------------------------------------------------------------------------
    1 PSDBOWNER
    2 SDO_XML_SCHEMAS
    3 SRS$
    4 DM$P_MODEL_TABLES
    5 OL$NODES
    6 SYS_IOT_OVER_40928
    7 XML_LOAD_RECORDS
    8 T
    9 SQLPLUS_PRODUCT_PROFILE
    10 SYS_IOT_OVER_42490
    11 SALGRADE

    NO OBJ_NAME
    ---------- -----------------------------------------------------------------------------
    12 MGMT_TEMPT_SQL
    13 SI_VALUES_TAB
    14 SYS_IOT_OVER_49872
    15 xdb-log9_TAB
    16 XDB_INSTALLATION_TAB
    17 WM$WORKSPACE_SAVEPOINTS_TABLE

    17 rows selected.

    SQL

  • RELEVANCY SCORE 3.16

    DB:3.16:Excel By Doi ax



    Hello

    I want to output a internal table to an excel file.

    Now I open an existing file and write data into it.

    Then I have 2 problems: one is how can I save it without prompt a confirm dialog for overwrite the existing file; the other is now the excel is running backgroud, and I want it to be viewable to the user after all the data is output, how to do?.

    DB:3.16:Excel By Doi ax


    Hi Lupin Rabbit,

    about running DOI in background, is like running OLE in background, the question has been asked one hundred times, the answer is that it's impossible (unless you install a server with MS Office/SAP GUI installed, and things like that), and that the easiest workaround to generate Excel files in background is to use CSV or XML or XLSX (using especially abap2xlsx tool - SDN Code Exchange) format depending on the minimum target Excel release instead of DOI/OLE.

    BR

    Sandra

  • RELEVANCY SCORE 3.16

    DB:3.16:Transposing Rows Into Columns In Ssis 3c


    Hi,I have an Employee Table and a dependent table which has dependents for 1 Employee. For EX:Table Emp:    EmpID    Name        1111      Emplo1Table Dependent:    EmpID    DependentName     Age    1111       Dept11                    12    1111       Dept22                    33Now, I want the output as     EmpID    DependentName1      Age1        DependentName2      Age2    1111    Dept11                          12            Dept22                        33    and so on....I want to incorporate this Quert/trasformation in SSIS to generate an output from a table to a text file like the data above. Can anyone please suggest a way?

  • RELEVANCY SCORE 3.15

    DB:3.15:How To Replace Internal Table Data. fz



    Hi,

    My Problem is Ztable have 10 Columns kunnr,year,mic_qty,mic_val ,digital_qty,digital_val,thread_qty,thread_val.

    I Upload data into ztable customer wise and year wise .My problem is when i fetch data into ztable all customer are come to internal table.

    But i want Year wise data into one customer column in the output.

    Ex: I upload data into internal table like : x7931(cust code) 2008(year) mic_qty(111) mic_val(1200) digital_qty(10) digital val(2100)......

    x7931 2010 0 0 21 1254 ....

    Output like x7931 2008(mic_qty) 2008(mic_val) 2010(mic_qty) 2010(mic_val).......................

    111 1200 0 0

    Thanks Regards,

    Balakrishna Gajula.

    DB:3.15:How To Replace Internal Table Data. fz

    Hi,
    As your below code

    Select kunnr year mic_qty mic_val dig_qty dig_val bow_qty bow_val
    into table itab
    from ztable
    where zyear in s_year.

    sort itab by kunnr.

    I display output customer wise. but in the output one customer comes repeat.
    I want output like one customer years wise data in one column.

    ex: x7901 2008mic_qty 2009mic_qty 2010mic_qty 2011mic_qty 2012mic_qty

    After sorting the tab by kunnr.

    Declare the one more internal table(itab1) which is like itab.

    copy the records of itab to itab1.

    itab1[] = itab[].

    delete the adjacent duplicates of itab comparing kunnr.

    now loop at itab.

    loop at itab1 where kunnr eq itab-kunnr.

    do the calculation of quantities year wise here.

    endloop.

    write:/1 kunnr,mic1,mic2,

    endloop.

    Hope this will help.

    ThanksRegards,

    Shankar Darbha

  • RELEVANCY SCORE 3.15

    DB:3.15:Insert Output Of Restore Statement Into A Table; xd


    Hi All, I want to insert the output of this statement into a temp table/table
    RESTORE FILELISTONLY FROM DISK='\\servername\DRIVE\DBNAME.BAK'
    I can create the empty table with the same number of fields as the RESTORE FILELISTONLY OUTPUT Statement
    So that i can query that table to build a restore statement on the fly.
    Thank You

  • RELEVANCY SCORE 3.14

    DB:3.14:How To Load Data Into Dimension j8


    I want to load data from Oracle table(employee) from a DB to a DIMENSION(emp_dim) created in another DB.

    When I try map from employee to emp_dim in mapping, I am getting an error like API8002: connection source is not an output or target is not an input

    Can't we load data from a table(in source db) into dimension(in target db)??

    Appreciate your help..

    Srini.

    DB:3.14:How To Load Data Into Dimension j8

    You can use any data-operator of your source- or target-modules (tables, views, seq, ...) - its up to you to design your dataflow-logic ;-).

  • RELEVANCY SCORE 3.13

    DB:3.13:Loading Xml Data Into Tables Using Ssis pa



    hi, i want to load data from theXMLinto database table.
    for this i am trying to useXMLsource to give input asXMLfile. but while using thiscomponenthe asked for XSD source, if click onauto generatea XSD file is generated. Now when i clicked on the
    column, it shows me multiple output name and when i select this output name corresponding available external column aredisplays.

    I don’t want this output name which includes multiple name, when i clicked any of these name the all available columns present under that name is appeared.
    i want when i clicked on column the all available columns should be shown, instead of showing output name and under that output name column are available.

    if you want more info please let me know.

    DB:3.13:Loading Xml Data Into Tables Using Ssis pa

    in XML scource go in advance editor, right click on nxml source and see advance editor, add columns there

    Please mark as helpful and propose as answer if you find this as correct!!! Thanks,Miss Never Giveup .

  • RELEVANCY SCORE 3.13

    DB:3.13:How To Read Xml Fragment (Rawstring / Xsdany) Data And Move To Internal Table/Fields. fz



    Hi

    Im using methods to read the web services values in ABAP reports.

    CALL METHOD l_proxy-XYZ

    EXPORTING

    INPUT = INPUT

    IMPORTING

    OUTPUT = OUTPUT.

    Im getting the data something like this as OUTPUT and want to convert this values into table structures and fields

    C536561726368486F724163636F756E74526573506F6E736520786D6C6E733D22687474703A2F2F

    D63616665652E666F6D2F73692F77656273657256696365732F2220786D6C6E733A7873643D2268

    i checked and i found its structure data type is RAWSTRING which storing the XML Fragment values. but i want this values converted into table / fields.

    Regards

    Ali

  • RELEVANCY SCORE 3.12

    DB:3.12:Loading Data From Csv To Table fs


    Hi All,
    I have a CSV file , which is having data like 1,2,3,4,5
    i want to load this CSV file into Table .
    OUTPUT:
    ID
    1

    2
    3
    4
    5
    Thanks in advance.

    bala krishna

  • RELEVANCY SCORE 3.11

    DB:3.11:Sql Server Source 79



    Hi,I want to use MS sqlserver table as my source and direct the output into a flat file.Can anyone give me detailed instructions to achieve this.I am using Informatica powercenter 5.1.2 on an unix platform.I need information regarding the odbc.ini file and creating ODBC data sources.Thanks.

    DB:3.11:Sql Server Source 79


    Hi,I want to use MS sqlserver table as my source and direct the output into a flat file.Can anyone give me detailed instructions to achieve this.I am using Informatica powercenter 5.1.2 on an unix platform.I need information regarding the odbc.ini file and creating ODBC data sources.Thanks.

  • RELEVANCY SCORE 3.11

    DB:3.11:Script Problem 8k



    Hiu Experts,

    i have a small doubt in SAP Scripts ,

    if i select some 2 or 3 fields from database table and stored in internal table ,

    i want to print that data into SAP Script how to do this

    if i give directly table name with field name it will give output??

    or i need to do some thing else please guide me

    Thanks

    Surendra

    DB:3.11:Script Problem 8k


    1. First check in which Text Element your are updating database fields in itnernal table.

    2. In SAP Script for the same text element add code for the displaying fields as itab-fieldname.

  • RELEVANCY SCORE 3.10

    DB:3.10:Xml Data Convert Into Only Element Data f8


    Hello everybody,

    I create a form which use the web service. My output is come in xml form like..

    NewDataSet
    Table
    PRIVATE_MARKA_BATCH_NO0622/PRIVATE_MARKA_BATCH_NO
    /Table
    Table
    PRIVATE_MARKA_BATCH_NODOOR CABINET/PRIVATE_MARKA_BATCH_NO
    /Table
    /NewDataSet
    I want only element data like 0622, DOOR CABINET. Is it possible to remove the xml heading?? Please help..

    Forms [32 Bit] Version 10.1.2.0.2 (Production)
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production

    DB:3.10:Xml Data Convert Into Only Element Data f8

    also
    SQL select * from v$version where rownum=1;

    BANNER
    ----------------------------------------------------------------
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod

    SQL
    SQL select trim(column_value)
    2 from (select xmltype('NewDataSet
    3 Table
    4 PRIVATE_MARKA_BATCH_NO0622/PRIVATE_MARKA_BATCH_NO
    5 /Table
    6 Table
    7 PRIVATE_MARKA_BATCH_NODOOR CABINET/PRIVATE_MARKA_BATCH_NO
    8 /Table
    9 /NewDataSet') xml
    10 from dual) t,
    11 xmltable('string-join((for $i in /NewDataSet/Table/PRIVATE_MARKA_BATCH_NO return $i), ",")'
    12 passing t.xml) x
    13 /

    TRIM(COLUMN_VALUE)
    --------------------------------------------------------------------------------
    0622,DOOR CABINET

    SQL

  • RELEVANCY SCORE 3.09

    DB:3.09:Populate 2 Related Tables From A Temp Table j1


    Hi,
    I have a temp table @Output. I want to populate a Details table and an Approvals table from @Output.
    All entries in Approvals table must have a Foreign Key relation in Details table.
    How do I create a query to populate these tables? Below my query to date, and the table designs.
    Thanks!
    INSERT INTO Details(Value)
    SELECT Value1
    FROM @Output

    DECLARE @Identity int = @@IDENTITY

    INSERT INTO Approvals(DetailsId, ApprovalName)
    SELECT @Identity, -- foreign key related to Details table
    Username
    FROM @Output

    DB:3.09:Populate 2 Related Tables From A Temp Table j1

    Try This...
    INSERT INTO Details(Value)
    SELECT Value1
    FROM @Output

    DECLARE @LastID intSET @LastID = SELECT MAX(DetailsId) FROM Details
    INSERT INTO Approvals(DetailsId, ApprovalName)
    SELECT @LastID, -- foreign key related to Details table
    Username
    FROM @OutputIf it did not work then try user COMMIT before DECLARE.Thanks.

  • RELEVANCY SCORE 3.09

    DB:3.09:Report Rm07docs xf



    HI

    I am executing the standard report RM07DOCS in my zrepor through SUBMIT stat.

    In the output of RM07DOCS, one table button is there for detail report.. I want that data into my zreport final internal.

    I am getting the intial output RM07DOCS in my zreport. but details report of the material document list.

    please help me in this.

    Regards,

    Krupa

    DB:3.09:Report Rm07docs xf


    Hi ,

    I did not follow that logic , Instead of that did as follows:

    please go through the thread :

    Thread: call transaction mb51 : performance issue

    TYPES: BEGIN OF is_export_list ,

    matnr TYPE mseg-matnr,

    maktx TYPE makt-maktx,

    werks TYPE mseg-werks,

    name1 TYPE t001w-name1,

    lgort TYPE mseg-lgort,

    charg TYPE mseg-charg, "351455

    bwtar TYPE mseg-bwtar, "351455

    bwart TYPE mseg-bwart,

    sobkz TYPE mseg-sobkz,

    btext TYPE t156t-btext,

    mblnr TYPE mseg-mblnr,

    mjahr TYPE mseg-mjahr,

    zeile TYPE mseg-zeile,

    budat TYPE mkpf-budat,

    erfmg TYPE mseg-erfmg,

    erfme TYPE mseg-erfme,

    lifnr TYPE mseg-lifnr,

    vgart TYPE mkpf-vgart,

    END OF is_export_list.

    DATA: it_export_list TYPE SORTED TABLE OF is_export_list

    WITH UNIQUE KEY matnr budat werks lgort charg bwtar bwart mblnr

    mjahr zeile lifnr vgart.

    DATA: f_date TYPE mkpf-budat, l_date TYPE mkpf-budat.

    DATA: no_list(1),flag(1).

    DATA:f_rec TYPE i VALUE 1.

    no_list = 'X'.

    flag = 'X'.

    EXPORT flag TO MEMORY ID 'MB51_FLAG'.

    EXPORT no_list TO MEMORY ID 'MB51_NOLIST' .

    LOOP AT it_months INTO w_months.

    IF f_rec = 1.

    f_date = w_months-f_day.

    ENDIF.

    f_rec = 0.

    ENDLOOP.

    IF sy-subrc EQ 0.

    l_date = w_months-l_day.

    ENDIF.

    IF s_matnr IS INITIAL.

    LOOP AT it_mb51_parameter INTO w_mb51_parameter.

    s_matnr-sign = 'I'.

    s_matnr-option = 'EQ'.

    s_matnr-low = w_mb51_parameter-matnr.

    APPEND s_matnr.

    ENDLOOP.

    ENDIF.

    SUBMIT rm07docs

    WITH budat BETWEEN f_date AND l_date

    WITH werks IN s_plnt

    WITH matnr IN s_matnr

    WITH bwart IN s_mtyp

    WITH mb51_flag EQ flag

    WITH mb51_nolist EQ no_list

    AND RETURN EXPORTING LIST TO MEMORY.

    IMPORT export_list FROM MEMORY ID 'MB51_EXPORT_LIST'.

    it_export_list = export_list[].

  • RELEVANCY SCORE 3.09

    DB:3.09:Read Table Context Data Into Internal Table as



    Hi All,

    I created a table and filled it with values and bind it to output.

    i have a field in ouput when i change the value in the output i need to change the values in my table.

    how to get the entie table(table context node ) into my method.

    is it possible to get the output table data when "On action " event is triggered.

    DB:3.09:Read Table Context Data Into Internal Table as


    Hello.

    I guess you want to do that with Web Dynpro.

    So you need a function which is called, when your click-event is triggered.

    And within your function you need something like that:

    DATA lo_node_of_table TYPE REF TO if_wd_context_node.

    DATA lo_some_other_node TYPE REF TO if_wd_context_node.

    DATA lo_element TYPE REF TO if_wd_context_element.

    DATA ld_counter TYPE i.

    DATA ld_value TYPE i.

    DATA ld_sum TYPE i.

    lo_node_of_table = wd_context-path_get_node( path = `PATH_TO.CONTEXT_NODE` ).

    ld_counter = lo_node_of_table-get_element_count( ).

    DO ld_counter TIMES.

    lo_element = lo_nd_in-get_element( index = sy-index ).

    lo_element-get_attribute(

    EXPORTING name = 'FIELD_NAME'

    IMPORTING value = ld_value ).

    ld_sum = ld_sum + ld_value.

    ENDDO.

    lo_some_other_node-set_attribute( name = 'SUM_OF_SOMETHING' value = ld_sum ).

    Please reply if you meant something else.

    Regards

    Thomas

  • RELEVANCY SCORE 3.09

    DB:3.09:Get Output Table 8d



    Hi i have a table with data

    Bike_IDBike_Name1Royal1Enfield2Harley2Davidson

    But i want the output data table like

    Bike_IDBike_Name1Royal Enfield2Harley Davidson

    How can we get this?

    DB:3.09:Get Output Table 8d


    Hi Uday,

    You can use Concat Command.

    I have done it for you in attached .qvw document.

    I hope it will help you.

    Best Regards

  • RELEVANCY SCORE 3.09

    DB:3.09:Xml Data Convert Into Only Element Data mm


    Hello everybody,

    I create a form which use the web service. My output is come in xml form like..

    NewDataSet
    Table
    PRIVATE_MARKA_BATCH_NO0622/PRIVATE_MARKA_BATCH_NO
    /Table
    Table
    PRIVATE_MARKA_BATCH_NODOOR CABINET/PRIVATE_MARKA_BATCH_NO
    /Table
    /NewDataSet

    I want only element data like 0622, DOOR CABINET. Is it possible to remove the xml heading?? Please help..

    Forms [32 Bit] Version 10.1.2.0.2 (Production)
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production

    Edited by: Sachingmrt on Nov 28, 2012 3:14 PM

    DB:3.09:Xml Data Convert Into Only Element Data mm

    xml data convert into only element data

    answer is here.

  • RELEVANCY SCORE 3.08

    DB:3.08:Save Data Into Database Table From An Alv Report f1



    Hi Folks,

    I have an alv output and the requirement is to edit the data on the alv output and save the same into a database table.

    Regards

    Moderator message: please work on your task yourself, search for available information, there is plenty of.

    Message was edited by: Thomas Zloch

    DB:3.08:Save Data Into Database Table From An Alv Report f1


    Hi Santhosh,

    if u want to edit one column in alv output

    read table itab into wa with index rs_selfield-tabindex.

    wa-editfield = rs_sefield-fieldvalue.

    then modify.

    Regards

    suri

  • RELEVANCY SCORE 3.08

    DB:3.08:Regarding Downloading Data Into Application Server 9x



    Hi frnds,

    I have an internal table which holds some data.

    I want to download this data into application server.I have written the code as

    data : l_file like rlgrap-filename value '/usr/sap/tmp/file1.txt'.

    open dataset l_file for output in text mode encoding default.

    loop at it_output into wa_output.

    transfer wa_output to l_file.

    endloop.

    close dataset l_file.

    In this case i am getting dump as

    " The current statement is only defined for character-type data objects."

    Please suggest what need to be done.

    regards,

    satish

    DB:3.08:Regarding Downloading Data Into Application Server 9x


    Hi,

    Check this link. May be this is useful

    Re: XML Question - Parse out node

    Regards,

    Anki Reddy

  • RELEVANCY SCORE 3.08

    DB:3.08:A System Error During Import Data From Local File Into Table a7



    Hello Every One

    Today I find a strange promlem about import data from local file into table ,if my table hava a column defined by 'date'. when I want to import data form local file into table. It always output a strange error. Is anybody also met this situation?

    this is my table:

    this is my local file:

    this is the error message:

    Besr Regards,

    Tang

    DB:3.08:A System Error During Import Data From Local File Into Table a7


    The right format for dates is:

    YYYY-MM-DD

    So in your .csv file you should use 2011-03-06

    Greetings,

    Blag.

  • RELEVANCY SCORE 3.08

    DB:3.08:Grouping Value fx


    Hi Team,I have joborder table i want group of column startdate once grouping the data i want grouping the status of the job...create table joborder (jono number,startdate number,status varchar2(22));insert into joborder(1,sysdate,'am');insert into joborder(2,'22-dec-09','am');insert into joborder(3,'23-dec-08','ys');insert into joborder(4,'sysdate','am');my output issysdate(count), status(am count), stauts(ys count)total number of joborder date i have 1 lack

    DB:3.08:Grouping Value fx

    As Frank said, please post proper create and Insert scripts. Check whether it is working properly before posting it. Change the datatype of startdate column to be date instead of Number. Check whether you are looking for this.
    select * from (
    select count(*) count_sysdate
    from joborder
    where to_date(startdate,'dd-mon-yyyy')=to_date(sysdate,'dd-mon-yyyy'))t1,
    (select count(*) count_status_am
    from joborder
    where status = 'am')t2,
    (select count(*) count_status_ys
    from joborder
    where status = 'ys')t3;

    OUTPUT:

    COUNT_SYSDATE COUNT_STATUS_AM COUNT_STATUS_YS
    ------------- --------------- ---------------
    2 3 1

  • RELEVANCY SCORE 3.08

    DB:3.08:Transfer Generate Data Into Table 9m



    I have some generate data in read buffer string ,i want to transfer these data into table, the table also have the time and data automaticly,how do I design the program? this is the gennerate read buffer.










    Attachments:







    1.jpg ‏32 KB

    DB:3.08:Transfer Generate Data Into Table 9m


    Try now. I can help if you tell the details a it but anyways..










    Attachments:







    split.vi ‏46 KB

  • RELEVANCY SCORE 3.08

    DB:3.08:Re: Do I Have To Use Inline View? Unique, Distinct And Rownum 38


    First you said
    I am trying to find out that if 2 different ADDRRECID has the same state and county
    Now you are saying
    count(distinct addrrecid) always return 2, because there are always two different adrrecid. Thant's not what I want.
    So what do you want. Give us the table structure (CREATE TABLE) and sample data (INSERT INTO). And also provide the expected output.

    DB:3.08:Re: Do I Have To Use Inline View? Unique, Distinct And Rownum 38


    Frank Kulash wrote:

    where emp could be a table, a view or the result set of a sub-query. If you added DISTINCT, ROWNUM and/or analytic functions, such as DENSE_RANK, they would all behave the same regardless of whether emp was a table, a view or a result set.
    Yes, of course I know this.

  • RELEVANCY SCORE 3.07

    DB:3.07:How To Get Output From A Plsql Table? mj


    Hi Experts,
    I have a package which when executed gets the data into a plsql table.
    I want to store this data into a custom table .
    How can i do this?

    Thanks,
    PS

    DB:3.07:How To Get Output From A Plsql Table? mj

    Thanks !

    Edited by: user11987301 on Mar 14, 2010 11:11 AM

  • RELEVANCY SCORE 3.07

    DB:3.07:Header Filed In The Output Text File 1p



    Hi all,

    I am extracting the vbak data into one internal table and using GUI_download function module i am creating a text file and sending this vbak data to that file.

    i am getting all the data and fields, but i want to give the header for all the fields(Short text), can any body plz send the code for this.

    BALU.

    DB:3.07:Header Filed In The Output Text File 1p


    Sorry

    The fm is DDIF_FIELDINFO_GET

    So

    DATA: T_HEADER LIKE STANDARD TABLE OF DFIES WITH HEADER LINE,
    T_VBAK LIKE STANDARD TABLE OF VBAK,
    T_FILE(10000) OCCURS 0 WITH HEADER LINE.

    * Download the label:
    DATA: POS.
    LOOP AT T_HEADER.
    WRITE: T_HEADER-SCRTEXT_S TO T_FILE+POS(10).
    POS = POS + 10.
    ENDLOOP.
    APPEND T_FILE.

    * Here append the data from T_VBAK to T_FILE

  • RELEVANCY SCORE 3.07

    DB:3.07:Accumulated Sum 1k



    Hi All,

    I have a table and i want the result shown below

    Data Table

    Required Output

    Thanks

    Rohit

  • RELEVANCY SCORE 3.07

    DB:3.07:Appending Internal Table Data To A String 8z



    Good Morning,

    I have a internal table and i want to append each of the internal table lines to a String. How can i do that?

    Code follows:

    *"----------------------------------------------------------------------
    *"*"Interface local:
    *" EXPORTING
    *" REFERENCE(OUTPUT) TYPE STRING
    *"----------------------------------------------------------------------

    SELECT * FROM pa0002
    INTO TABLE t_pa0002
    ORDER BY gbdat.

    LOOP AT t_pa0002 INTO w_pa0002.
    CONCATENATE sy-datum(4) w_pa0002-gbdat+4(2) w_pa0002-gbdat+6(2)
    INTO w_pa0002-gbdat.

    CHECK w_pa0002-gbdat GE first_day AND w_pa0002-gbdat LE last_day.

    * I need to append the line to the String!!!

    ENDLOOP.

    DB:3.07:Appending Internal Table Data To A String 8z


    hi,

    use field-symbols

    and abap command assign component:

    data str type string.
    loop...
    free str.
    do.
    assign component sy-index of structure w_pa0002 to f.
    if sy-subrc 0.
    exit.
    endif.

    concatenate str f into str.
    enddo.

    transfer str to file.

    endloop.

  • RELEVANCY SCORE 3.07

    DB:3.07:I Want To Output My Table Data Into A Csv File. sz


    I want to output my table data into a csv file.

    My table is

    create Table1(
    item1 number(8),
    item2 number(8),
    item3 number(8)
    )

    My csv file is

    "ITEM1","ITEM2","ITEM3","SUM"
    "1","2","1","4"
    "2","2","2","6"
    "","","",""

    How can I do it?
    I know use PACKAGE "utl_file" CAN DO IT.

    BUT I don't want to use it.

    I want to use UNIX SHELL + AWK to process the sqlplus result.
    Can I do it?

    DB:3.07:I Want To Output My Table Data Into A Csv File. sz

    Spool filename.csv;

    Select To_Char(item1) || ','
    || To_Char(item2) || ','
    || To_Char(item3)
    From table;

    Spool off;

    Ta

    Shailender

  • RELEVANCY SCORE 3.07

    DB:3.07:Fractile / Quartile In Pivot Table Dimension m9



    Hi guys,

    I want to create a pivot table with the which has 2 fields. Cities and Room nights.

    The table needs to be devided into quartiles. according to room nights. There are multiple entries for each city. The data will look something like this.

    CityRNa6b15c4d5e8f7a6a5b2f5e3a9b12c4d8e15

    SUM(RN) = 114

    Desired output

    QQuartile RangeCityRNCumil.RN0-25%0-28.5c88--f122025-50%28.5-57d133350-75%57-85.5e2659--a268575-100%%85.5-114b2911

    Please help me out.

    DB:3.07:Fractile / Quartile In Pivot Table Dimension m9


    Dimension City

    Expressions

    Q=class(rangesum(above(cull).sum(RN))/sum(total RN).0.25)

    Quartile=num(right(class(rangesum(above(cull).sum(RN))/sum(total RN).0.25).len(class(rangesum(above(cull).sum(RN))/sum(total RN).0.25))-index(class(rangesum(above(cull).sum(RN)/sum(total RN).0.25).''.2)-1))*sum(total RN)

    RN=sum(RN)

    Cull=rangesum(above(cull).sum(RN)

  • RELEVANCY SCORE 3.07

    DB:3.07:T-Sql Question 19


    I have data in my table with leading spaces and then zero's. I want to trim the leading spaces and even the zero's and just grab the rest of the number. Below is sample data
    Create table #t1(col char(20))Insert into #t1SELECT ' 00001705'UNION ALLSELECT ' 00001707'
    SELECT * FROM #t1mY output should be: col17051707sqldev

    DB:3.07:T-Sql Question 19

    Hi sqldev,If all records in your table are numeric then I guess the simplest solution is:
    SELECT col=CONVERT(Int, col) FROM #t1
    This one will also not remove the trailing 0's, like REPLACE does:
    Create table #t1 (col char(20))
    Insert into #t1
    SELECT ' 00001705 '
    UNION ALL
    SELECT ' 00001707 '
    UNION ALL
    SELECT ' 00017070'

    SELECT col=CONVERT(Int, col) FROM #t1
    will return:1705170717070

    Doru Sandor, MCDBA/MCSD

  • RELEVANCY SCORE 3.07

    DB:3.07:Tab Control j8



    REPORT ZTABLE .

    tables zpurchase_req.

    CONTROLS : TCL1 TYPE TABLEVIEW USING SCREEN 0001.

    call screen '0001'.

    DATA : BEGIN OF ITAB OCCURS 0,

    PRONO LIKE ZPURCHASE_REQ-PRONO,

    flag,

    END OF ITAB.

    ----

    * Module OUTPUT OUTPUT

    ----

    text

    ----

    MODULE OUTPUT OUTPUT.

    REFRESH ITAB.

    SELECT PRONO FROM ZPURCHASE_REQ INTO TABLE ITAB WHERE PRONO =

    ZPURCHASE_REQ-PRONO.

    ENDMODULE. " OUTPUT OUTPUT

    ----

    * Module DISPLAY OUTPUT

    ----

    text

    ----

    MODULE DISPLAY OUTPUT.

    *MOVE ZPURCHASE_REQ-PRONO TO ITAB-PRONO.

    ITAB-PRONO = zPURCHASE_REQ-PRONO.

    ENDMODULE. " DISPLAY OUTPUT.

    In this program i had used table control for displaying prono.I had set w/selction column as flag....

    The data's are not coming into that table control...

    Reg'

    Zeemaaaa..

    DB:3.07:Tab Control j8


    Hi!

    Check this sample programs

    http://www.planetsap.com/online_pgm_main_page.htm

    http://sap.niraj.tripod.com/id29.html

    http://www.sapdevelopment.co.uk/dialog/tabcontrol/tc_basic.htm

    Regards

    Tam

  • RELEVANCY SCORE 3.06

    DB:3.06:Inserting Page X Of Y In Footer Of Text File mk



    Hi,

    I am printing EG project output into that text file.

    I want to insert "Page X of Y" into footer of text output.

    Example,

    Text file have 4 pages

    I want output like

    HEADER

    data

    Page 1 of 4

    ..

    .

    .

    data

    Page 2 of 4

    .

    .

    .

    .

    data

    Page 4 of 4

    DB:3.06:Inserting Page X Of Y In Footer Of Text File mk


    Hi:

    You CAN get page X of Y page numbering in PDF and RTF result files in EG, but NOT for HTML or TEXT (SAS Listing) output in EG:

    For example, if you run this code in an EG code node:

    Re: Inserting Page X of Y in Footer of Text file

    options nodate nonumber;

    ods rtf file='c:\temp\xofy.rtf';

    ods pdf file='c:\temp\xofy.pdf';

    ods escapechar='~';

    proc print data=sashelp.shoes (obs=200);

    var region product sales;

    footnote 'Page ~ of ~';
    run;
    ods pdf close;
    ods rtf close;
    https://communities.sas.com/pre

    Then you will see how the page numbers get put into the output with batch code. You can get the same kind of page numbering from your EG tasks, by changing the task code.

    To add Page X of Y to an EG project, you would have to:
    1) change your Result type so that PDF and/or RTF files are created
    (under Tools-- Options)
    2) turn off SAS option for numbering and use the ODS ESCAPECHAR statement to "turn on" recognition of the special strings and . The reason you are turning off SAS numbering is that SAS only wants to put numbers in the upper right hand corner. So you need to turn that off (probably the date too) so you can use the special ESCAPECHAR strings in your footnote. Then you also have to tell SAS what the special ESCAPECHAR is going to be. Re: Inserting Page X of Y in Footer of Text file
    -- Preview your task code then click "Insert Code"
    -- At the very top of your code, type: https://communities.sas.com/b[pre]
    options nodate nonumber;
    ods escapechar='~'; https://communities.sas.com/pre
    3) make sure the footnote string in your task is:[pre]
    Page ~ of ~ https://communities.sas.com/pre

    At this point, you have to use the same special 'escape character' -- which in the above instance is the tilde (~) -- as you used in the ODS ESCAPECHAR statement. So if I had this:[pre]

    ods escapechar='#';

    then my footnote text would be:

    Page # of #
    https://communities.sas.com/pre
    4) Run or Save and run the task

    Since HTML does not produced a "paged" file, you will not see any page numbers in the default EG HTML output. You will only see page numbers in the footnote of any RTF and PDF files that you create.

    It -is- possible to get Page X of Y page numbering in a SAS Listing file (which is just an ASCII text file), however the technique requires using SAS macros which were user-contributed and therefore, you have to use them at your own risk. Refer to this site:
    http://support.sas.com/rnd/base/topics/odsprinter/
    and look for the section entitled "Archive: Version 8".

    The new way of doing Page X of Y with ODS ESCAPECHAR and and/or is much easier than any of the macro methods that were formerly required.

    For more help with Page X of Y page numbering and EG, your best bet is to contact SAS Tech Support.

    cynthia

  • RELEVANCY SCORE 3.06

    DB:3.06:I Want To Insert Data Into A Gta From A Nested Table zc


    Hi,
    I want to insert data into a global temporary table from nested table.
    How do i do it?

    DB:3.06:I Want To Insert Data Into A Gta From A Nested Table zc

    Hi
    I prefer to use
    FORALL i in 1..v_rec_num.count
    INSERT INTO record_num_session values v_rec_num(i);
    END LOOP;and please do not use this
    EXCEPTION
    WHEN OTHERS
    THEN
    NULL;Edited by: HGDBA on Sep 15, 2010 11:56 AM

  • RELEVANCY SCORE 3.06

    DB:3.06:How To Process Secondary List Output? zf



    Hi friends,

    My requirement is to process the data that is present in secondary list output. With that selected data I need to display data from another internal table.

    I mean to say that Basic List output to Secondary is coming...but from Secondary i.e., from detailed list output to third list output I want to show details.

    Please help with.

    Is Read Current Line statement works on Secondary list output?

    I need to get the value from secondary list output and from that I need to fetch data from DB table and show the final output.

    Thank you,

    with regards,

    Kumar.

    DB:3.06:How To Process Secondary List Output? zf


    The things is I need to select the records from the secondary list output and store it in a internal table

    you can select only one value(not multiple values) in the secondary list ...

    HIDE: kna1-kunnr

  • RELEVANCY SCORE 3.06

    DB:3.06:Insert Data Into Table pf


    i have archive table and i have a staging table . in archive table there is already a records with filename file1.... in staging table i have 3 records with filenames file1, file 2 and file 3. i would like to insert data into archive table but i
    dont want to insert existing data in archive .....so final output should be file 1 , file 2 and file 3 in archive. and no duplicates in archive.

    DB:3.06:Insert Data Into Table pf

    INSERT INTO Archive_Table
    SELECT * FROM Staging_Table
    WHERE [File_name] NOT IN (SELECT [File_name] FROM Archive_Table)

    This answer is with the assumptions that the table shemas of Staging table and Archive table match.

    Hima, To help the community better identify relevant thread, please don't forget to mark as answer or vote as helpful if and answer helps.

  • RELEVANCY SCORE 3.06

    DB:3.06:Need Another Help 9c



    I'm working with a table which contain alot of duplicate data.

    For example rahim, karim, maksud, alom have $20000

    and remaining person have some unique $.

    Now i want to find out duplicate data and unique data into 2 output table.

    Please help me. I'm completely new in informatica.

    If possible give me the solution step by step.

    Regards

    Reyaz

    DB:3.06:Need Another Help 9c


    You can go through following solutions from Informatica Marketplace. You will also find over 400 mapping samples and many other useful tools on the same webiste.

    https://community.informatica.com/solutions/powercenter_filter_duplicates

    https://community.informatica.com/solutions/remove_duplicate_records_sql_transformation

    https://community.informatica.com/solutions/mapping_remove_duplicates

  • RELEVANCY SCORE 3.06

    DB:3.06:Sql-2008,Execute Sp And Create Temp Table sc


    Hi ,
    I have a Table from Where I give the SELECT col..... from Table Statement as Output ..
    Number of Column is not fix...
    Declare @sql_select nvarchar(max)=(select SQL_text from tbl where id=4)
    select @sql_select: contain Value like
    SELECT A,B,C FROM TABLEx OR
    SELECT A,B FROM TABLEx ..ie Select Query could have any number of Column..
    When I execute above statement I get desire Output ..

    requirement..
    I want to Execute the Output I get in Variable @sql_select and Insert that Data into #Temp Table .
    Or Execute the Output of select SQL_text from tbl where id=4 and Insert the Output into #Temp Table..

    Depending on Select Statement(which could have any number of Columns ) I want to create my #temp table so that I can Use that TEMP table further in sameStoreProcedure where #temp table is Droped and recreated every time depending on above SELECT
    statement which we get as Output ..
    Any help??

    DB:3.06:Sql-2008,Execute Sp And Create Temp Table sc

    Hi SQL_Helpus,
    You have two options:
    1. You can create the temp table inside the same Dynamic SQL and Select the data from the teamp table in the same scope.
    eg:
    declare @sql varchar(max);
    set @sql = 'select into #t1 ....; select * from #t1';
    exec (@sql);
    2. You can still use ##TempTable with a unique id. Try the below:
    DECLARE
    @SQLString varchar(max),
    @TableName varchar(MAX)

    SET @TableName = '[##MyTempTable' cast( NEWID() AS varchar(MAX)) ']'

    SET @SQLString =
    'SELECT *
    INTO ' @TableName '
    FROM tablename Where col1=''idvalue'''

    EXECUTE ( @SQLString )

    EXECUTE ( 'SELECT * from ' @TableName )

    Please use Marked as Answer if my post solved your problem and use
    Vote As Helpful if a post was useful.

  • RELEVANCY SCORE 3.06

    DB:3.06:Create Polymorhpic Output For I32 Input (Select Output Type) 3k


    I am trying to create a File Allocation Table. To save the data into a file, I flatten the data and write it as a byte array. In order to unflatten the data I need to remember the data type. I can store the data type in a cluster, but different data types in the cluster prevent me from doing iterative processing on these clusters. I want to write an I32 index instead into the cluster. What I need is a .vi that accepts this index and returns (any value) in the data type that it is supposed to represent. I can then wire this data type into the unflatten data .vi and I will be OK.Can anyone help me with this?

    DB:3.06:Create Polymorhpic Output For I32 Input (Select Output Type) 3k

    This is not a good workarround. The purpose of this is to load old variables back into the program. I cannot package everything into 1 polymorphic .vi like you suggested.

  • RELEVANCY SCORE 3.05

    DB:3.05:Query mp


    Hi,

    i have table called temp;

    create table temp (workspace varchar2(25),access varchar2(10));
    insert into temp values ('DATA','OWNER');
    insert into temp values ('DATA','OWNER');
    insert into temp values ('DATA','MEMBER');
    insert into temp values ('DATA WAREHOUSE','OWNER');
    insert into temp values ('DATA WAREHOUSE','MEMBER');
    insert into temp values ('DATA WAREHOUSE','MEMBER');

    I NEED OUTPUT LIKE THIE
    WORKSPACE OWNER MEMBER
    DATA 2 1
    DATA WAREHOUSE 1 2

    Thanks in advance....

  • RELEVANCY SCORE 3.05

    DB:3.05:Accessing Report Variable 38



    Hi, i am creating one function module, i need to return one internal table IT_OUTPUT, that is ok, the total logic for filling of IT_OUTPUT is written in one report, this ALV report which is used internal table IT_OUTPUT for grid display, Now my issuse is using this report how to get the data of output internal table ie IT_OUTPUT from that report. There is no export of output table in the report to memory and i don't want to change this report at all. How can i access the variable IT_OUTPUT into my function module.

    DB:3.05:Accessing Report Variable 38


    Hi,

    I understood that you want to use IT_OUTPUT internal table in a function module, and the same table is there in some ALV report. And you do not want to pass any exporting parameters from the program to the function module.

    When ever you want to get some data into the function module, you have to pass it as an importing parameter into the function module and export the same from some program. You can actually populate the table in function module itself with the logic that they are using at the report incase if you want to see how it works.

  • RELEVANCY SCORE 3.05

    DB:3.05:Output System Summary Of Msinfo32 With Tsql kx


    I like the system summary info of msinfo32 and would like to capture that info into a table. I looked at xp_msver and even ran from the command prompt msinfo32 /computer ........../report... /categories systemsummary and it wants to output all the data.
    All i want is the system summary.
    Thanks

    DB:3.05:Output System Summary Of Msinfo32 With Tsql kx

    Thanks for the clarification. I was somewhat confused by your answer but I understand why you wouldn't allow that situation to be part of a computing environment (after some research about xp_cmdshell). You state that this can be done using C# or powershell
    and this is something I would like to explore further. Can you point me in the right direction as I have not been able to find information on how to accomplish this.

  • RELEVANCY SCORE 3.05

    DB:3.05:Creating Multiple Insert Statements With Sql dj


    is there a way to create multiple INSERT staements with SQL .
    Example scenario : This is only example but i have lot of data in the real time.

    sql : Select Emplid from Table A where Emplid between 100 and 350 will retun me 50 rows . i want to insert those rows into another table.

    I am looking for output like below instead of Giving output just as EMPLIDs

    Insert into PS_LM_DATA ( EMPLID ) values ( 123 )
    Insert into PS_LM_DATA ( EMPLID ) values ( 234 )
    Insert into PS_LM_DATA ( EMPLID ) values ( 334 )
    and so on....

    thanks ,
    Karu

    DB:3.05:Creating Multiple Insert Statements With Sql dj

    If you are inserting into another table, you could use
    insert into PS_LM_DATA ( EMPLID )
    select Emplid from Table A where Emplid between 100 and 350Example:
    SQL insert into emp2(empno) select empno from emp;

    14 rows created.

    SQL insert into emp2(empno) select empno from emp where empno between 7369 and 7788;

    8 rows created.

  • RELEVANCY SCORE 3.04

    DB:3.04:Problem In Code.It Is Urgent. 8k



    problem in code.it is urgent.

    i want to display all po,s with all grs from requistion up to inspection. if for a po gr not happend or inspection not happend it must also display leaving blank for that po. actual flow is pur.reqpur.ordergoods receipt---quality inspection. once u copy this code and execute it. u will get better idea.

    regards!

    prasad.

    REPORT Z_MM_REQDETAILS1.

    TABLES: EKKO, EKPO, MSEG, QALS, EBAN, MKPF, MAKT.

    TYPE-POOLS: SLIS.

    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME.

    SELECT-OPTIONS: SBADAT FOR EBAN-BADAT,

    SLIFNR FOR EKKO-LIFNR,

    SEBELN FOR EKKO-EBELN,

    SBEDAT FOR EKKO-BEDAT,

    SBSART FOR EKKO-BSART,

    SMATNR FOR EKPO-MATNR,

    SBUDAT FOR MKPF-BUDAT.

    SELECTION-SCREEN END OF BLOCK B1.

    DATA: BEGIN OF EBAN_TAB OCCURS 0,

    BANFN LIKE EBAN-BANFN,

    BADAT LIKE EBAN-BADAT,

    MENGE LIKE EBAN-MENGE,

    EBELN LIKE EBAN-EBELN,

    AFNAM LIKE EBAN-AFNAM,

    END OF EBAN_TAB.

    DATA: BEGIN OF EKKO_TAB OCCURS 0,

    BSART LIKE EKKO-BSART,

    EBELN LIKE EKKO-EBELN,

    LIFNR LIKE EKKO-LIFNR,

    BEDAT LIKE EKKO-BEDAT,

    END OF EKKO_TAB.

    DATA: BEGIN OF EKPO_TAB OCCURS 0,

    EBELN LIKE EKPO-EBELN,

    MENGE LIKE EKPO-MENGE,

    MATNR LIKE EKPO-MATNR,

    BANFN LIKE EKPO-BANFN,

    EBELP LIKE EKPO-EBELP,

    END OF EKPO_TAB.

    DATA: BEGIN OF MSEG_TAB OCCURS 0,

    EBELN LIKE MSEG-EBELN,

    MBLNR LIKE MSEG-MBLNR,

    MATNR LIKE MSEG-MATNR,

    MENGE LIKE MSEG-MENGE,

    EBELP LIKE MSEG-EBELP,

    END OF MSEG_TAB.

    DATA: BEGIN OF MSEG_TAB1 OCCURS 0,

    MBLNR LIKE MSEG-MBLNR,

    EBELN LIKE MSEG-EBELN,

    END OF MSEG_TAB1.

    DATA: BEGIN OF QALS_TAB OCCURS 0,

    LMENGE01 LIKE QALS-LMENGE01,

    LMENGE07 LIKE QALS-LMENGE07,

    MATNR LIKE QALS-MATNR,

    MBLNR LIKE QALS-MBLNR,

    EBELN LIKE QALS-EBELN,

    EBELP LIKE QALS-EBELP,

    END OF QALS_TAB.

    DATA: BEGIN OF MKPF_TAB OCCURS 0,

    MBLNR LIKE MKPF-MBLNR,

    BUDAT LIKE MKPF-BUDAT,

    END OF MKPF_TAB.

    DATA: BEGIN OF MAKT_TAB OCCURS 0,

    MATNR LIKE MAKT-MATNR,

    MAKTX LIKE MAKT-MAKTX,

    END OF MAKT_TAB.

    DATA: BEGIN OF SELTAB OCCURS 0,

    EBELN LIKE EKKO-EBELN,

    BLDAT LIKE MKPF-BLDAT,

    END OF SELTAB.

    *DATA: BEGIN OF SELTAB1 OCCURS 0,

    BUDAT LIKE MKPF-BUDAT,

    END OF SELTAB1.

    DATA: REPID LIKE SY-REPID.

    DATA: F_OUTPUT1 TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE.

    DATA: IT_SORT TYPE SLIS_T_SORTINFO_ALV WITH HEADER LINE.

    DATA: REMARKS(40) TYPE C.

    DATA: BEGIN OF OUTPUT OCCURS 0,

    BANFN LIKE EBAN-BANFN,

    BADAT LIKE EBAN-BADAT,

    RMENGE LIKE EBAN-MENGE,

    AFNAM LIKE EBAN-AFNAM,

    BSART LIKE EKKO-BSART,

    EBELN LIKE EKKO-EBELN,

    LIFNR LIKE EKKO-LIFNR,

    BEDAT LIKE EKKO-BEDAT,

    PMENGE LIKE EKPO-MENGE,

    MATNR LIKE EKPO-MATNR,

    EBELP LIKE EKPO-EBELP,

    MBLNR LIKE MSEG-MBLNR,

    GMENGE LIKE MSEG-MENGE,

    LMENGE01 LIKE QALS-LMENGE01,

    LMENGE07 LIKE QALS-LMENGE07,

    BUDAT LIKE MKPF-BUDAT,

    MAKTX LIKE MAKT-MAKTX,

    REMARKS(40) TYPE C,

    SL_NO LIKE SY-TABIX,

    END OF OUTPUT.

    START-OF-SELECTION.

    IF SEBELN IS NOT INITIAL OR SLIFNR IS NOT INITIAL OR SBEDAT IS NOT INITIAL OR SBSART IS NOT INITIAL.

    SELECT EBELN

    BSART

    LIFNR

    BEDAT FROM EKKO INTO CORRESPONDING FIELDS OF TABLE EKKO_TAB WHERE EBELN IN SEBELN AND LIFNR IN SLIFNR AND BEDAT IN SBEDAT AND

    BSART IN SBSART.

    ELSEIF SBADAT IS NOT INITIAL.

    SELECT EBELN

    BANFN

    BADAT

    MENGE

    AFNAM FROM EBAN INTO CORRESPONDING FIELDS OF TABLE EBAN_TAB where BADAT IN SBADAT.

    SORT EBAN_TAB BY BADAT ASCENDING.

    select ebeln lifnr bedat bsart from ekko into corresponding fields of table ekko_tab for all entries in eban_tab where ebeln = eban_tab-ebeln.

    ELSEIF SMATNR IS NOT INITIAL.

    SELECT EBELN

    EBELP

    FROM EKPO INTO CORRESPONDING FIELDS OF TABLE SELTAB

    WHERE MATNR IN SMATNR.

    SORT SELTAB BY EBELN ASCENDING.

    DELETE ADJACENT DUPLICATES FROM SELTAB COMPARING EBELN.

    SELECT EBELN

    BSART

    BEDAT

    LIFNR FROM EKKO INTO CORRESPONDING FIELDS OF TABLE EKKO_TAB

    FOR ALL ENTRIES IN SELTAB WHERE EBELN = SELTAB-EBELN.

    ELSEIF SBUDAT IS NOT INITIAL.

    SELECT BUDAT

    MBLNR FROM MKPF INTO CORRESPONDING FIELDS OF TABLE MKPF_TAB WHERE

    BUDAT IN SBUDAT.

    sort mkpf_tab by budat ascending.

    SELECT EBELN FROM MSEG INTO CORRESPONDING FIELDS OF TABLE SELTAB FOR ALL ENTRIES IN

    MKPF_TAB WHERE MBLNR = MKPF_TAB-MBLNR.

    *SELECT EBELN

    FROM QALS INTO CORRESPONDING FIELDS OF TABLE SELTAB FOR ALL ENTRIES IN SELTAB WHERE EBELN = SELTAB-EBELN.

    SORT SELTAB BY EBELN ASCENDING.

    DELETE ADJACENT DUPLICATES FROM SELTAB COMPARING EBELN.

    SELECT EBELN

    BEDAT

    LIFNR

    BSART FROM EKKO INTO CORRESPONDING FIELDS OF TABLE EKKO_TAB

    FOR ALL ENTRIES IN SELTAB WHERE EBELN = SELTAB-EBELN.

    ENDIF.

    SELECT EBELN

    MENGE

    MATNR

    EBELP FROM EKPO INTO CORRESPONDING FIELDS OF TABLE EKPO_TAB FOR ALL ENTRIES IN EKKO_TAB WHERE EBELN = EKKO_TAB-EBELN AND

    MATNR IN SMATNR.

    SELECT EBELN

    BANFN

    BADAT

    MENGE

    AFNAM FROM EBAN INTO CORRESPONDING FIELDS OF TABLE EBAN_TAB FOR ALL ENTRIES IN EKKO_TAB WHERE EBELN = EKKO_TAB-EBELN AND

    BADAT IN SBADAT.

    SELECT EBELN

    MBLNR

    MATNR

    MENGE

    EBELP

    FROM MSEG INTO CORRESPONDING FIELDS OF TABLE MSEG_TAB FOR ALL ENTRIES IN EKPO_TAB WHERE EBELN = EKPO_TAB-EBELN AND

    MATNR = EKPO_TAB-MATNR AND

    EBELP = EKPO_TAB-EBELP AND

    BWART IN ('101','105').

    SELECT LMENGE01

    LMENGE07

    MATNR

    MBLNR

    EBELN FROM QALS INTO CORRESPONDING FIELDS OF TABLE QALS_TAB FOR ALL ENTRIES IN MSEG_TAB WHERE MBLNR = MSEG_TAB-MBLNR AND

    MATNR = MSEG_TAB-MATNR AND

    EBELN = MSEG_TAB-EBELN AND

    EBELP = MSEG_TAB-EBELP.

    SELECT MBLNR

    BUDAT FROM MKPF INTO CORRESPONDING FIELDS OF TABLE MKPF_TAB FOR ALL ENTRIES IN MSEG_TAB WHERE MBLNR = MSEG_TAB-MBLNR AND BUDAT

    IN SBUDAT.

    SELECT MATNR

    MAKTX FROM MAKT INTO CORRESPONDING FIELDS OF TABLE MAKT_TAB FOR ALL ENTRIES IN EKPO_TAB WHERE MATNR = EKPO_TAB-MATNR.

    *LOOP AT OUTPUT.

    **LOOP AT EKKO_TAB.

    **read table EKKO_TAB with key ebeln = output-ebeln.

    **if sy-subrc = 0.

    *READ TABLE EKPO_TAB WITH KEY EBELN = EKKO_TAB-EBELN.

    *IF SY-SUBRC = 0.

    *READ TABLE MSEG_TAB WITH KEY EBELN = EKPO_TAB-EBELN MATNR = EKPO_TAB-MATNR.

    *IF SY-SUBRC = 0.

    *

    **READ TABLE QALS_TAB WITH KEY MBLNR = MSEG_TAB-MBLNR MATNR = MSEG_TAB-MATNR EBELN = MSEG_TAB-EBELN.

    **IF SY-SUBRC = 0.

    *

    o OUTPUT-EBELN = EKKO_TAB-EBELN.

    o OUTPUT-BSART = EKKO_TAB-BSART.

    o OUTPUT-LIFNR = EKKO_TAB-LIFNR.

    o OUTPUT-BEDAT = EKKO_TAB-BEDAT.

    OUTPUT-PMENGE = EKPO_TAB-MENGE.

    OUTPUT-MATNR = EKPO_TAB-MATNR.

    OUTPUT-MBLNR = MSEG_TAB-MBLNR.

    OUTPUT-GMENGE = MSEG_TAB-MENGE.

    o OUTPUT-LMENGE01 = QALS_TAB-LMENGE01.

    o OUTPUT-LMENGE07 = QALS_TAB-LMENGE07.

    modify OUTPUT transporting pmenge matnr MBLNR GMENGE.

    **APPEND OUTPUT.

    *ENDIF.

    *ENDIF.

    *

    *ENDLOOP.

    *

    LOOP AT EKKO_TAB.

    LOOP AT EKPO_TAB WHERE EBELN = EKKO_TAB-EBELN.

    LOOP AT MSEG_TAB WHERE EBELN = OUTPUT-EBELN AND MATNR = output-MATNR AND EBELP = OUTPUT-EBELP.

    OUTPUT-EBELN = EKKO_TAB-EBELN.

    OUTPUT-BSART = EKKO_TAB-BSART.

    OUTPUT-LIFNR = EKKO_TAB-LIFNR.

    OUTPUT-BEDAT = EKKO_TAB-BEDAT.

    OUTPUT-PMENGE = EKPO_TAB-MENGE.

    OUTPUT-MATNR = EKPO_TAB-MATNR.

    OUTPUT-EBELP = EKPO_TAB-EBELP.

    APPEND OUTPUT.

    CLEAR OUTPUT.

    ENDLOOP.

    ENDLOOP.

    *LOOP AT OUTPUT.

    *LOOP AT EKPO_TAB WHERE EBELN = OUTPUT-EBELN.

    OUTPUT-PMENGE = EKPO_TAB-MENGE.

    OUTPUT-MATNR = EKPO_TAB-MATNR.

    OUTPUT-EBELP = EKPO_TAB-EBELP.

    *MODIFY OUTPUT TRANSPORTING PMENGE MATNR EBELP.

    *ENDLOOP.

    *ENDLOOP.

    LOOP AT OUTPUT.

    LOOP AT MSEG_TAB WHERE EBELN = OUTPUT-EBELN AND MATNR = OUTPUT-MATNR AND EBELP = OUTPUT-EBELP.

    *LOOP AT QALS_TAB WHERE MBLNR = MSEG_TAB-MBLNR AND MATNR = OUTPUT-MATNR AND EBELN = OUTPUT-EBELN AND EBELP = OUTPUT-EBELP.

    OUTPUT-MBLNR = MSEG_TAB-MBLNR.

    OUTPUT-GMENGE = MSEG_TAB-MENGE.

    OUTPUT-LMENGE01 = QALS_TAB-LMENGE01.

    OUTPUT-LMENGE07 = QALS_TAB-LMENGE07.

    OUTPUT-EBELP = QALS_TAB-EBELP.

    *APPEND OUTPUT.

    MODIFY OUTPUT TRANSPORTING MBLNR GMENGE.

    *CLEAR OUTPUT.

    *CLEAR MSEG_TAB.

    ENDLOOP.

    ENDLOOP.

    *ENDLOOP.

    LOOP AT OUTPUT.

    LOOP AT QALS_TAB WHERE MBLNR = OUTPUT-MBLNR AND MATNR = OUTPUT-MATNR AND EBELN = OUTPUT-EBELN.

    OUTPUT-LMENGE01 = QALS_TAB-LMENGE01.

    OUTPUT-LMENGE07 = QALS_TAB-LMENGE07.

    OUTPUT-EBELP = QALS_TAB-EBELP.

    MODIFY OUTPUT TRANSPORTING LMENGE01 LMENGE07.

    ENDLOOP.

    ENDLOOP.

    LOOP AT OUTPUT.

    LOOP AT EBAN_TAB WHERE EBELN = OUTPUT-EBELN.

    OUTPUT-BANFN = EBAN_TAB-BANFN.

    OUTPUT-BADAT = EBAN_TAB-BADAT.

    OUTPUT-RMENGE = EBAN_TAB-MENGE.

    OUTPUT-AFNAM = EBAN_TAB-AFNAM.

    MODIFY OUTPUT TRANSPORTING BANFN BADAT RMENGE AFNAM.

    ENDLOOP.

    ENDLOOP.

    LOOP AT OUTPUT.

    LOOP AT MKPF_TAB WHERE MBLNR = OUTPUT-MBLNR.

    OUTPUT-BUDAT = MKPF_TAB-BUDAT.

    MODIFY OUTPUT TRANSPORTING BUDAT.

    ENDLOOP.

    ENDLOOP.

    *LOOP AT OUTPUT.

    *

    *SELECT SINGLE MATNR FROM EKPO INTO OUTPUT-MATNR WHERE EBELN = OUTPUT-EBELN.

    *MODIFY OUTPUT TRANSPORTING MATNR.

    *

    *SELECT SINGLE MBLNR FROM MSEG INTO OUTPUT-MBLNR WHERE MATNR = OUTPUT-MATNR.

    *MODIFY OUTPUT TRANSPORTING MBLNR.

    *ENDLOOP.

    LOOP AT OUTPUT.

    LOOP AT MAKT_TAB WHERE MATNR = OUTPUT-MATNR.

    OUTPUT-MAKTX = MAKT_TAB-MAKTX.

    MODIFY OUTPUT TRANSPORTING MAKTX.

    ENDLOOP.

    ENDLOOP.

    *LOOP AT EKKO_TAB.

    LOOP AT EKPO_TAB WHERE EBELN = EKKO_TAB-EBELN.

    o LOOP AT MSEG_TAB WHERE EBELN = EKPO_TAB-EBELN AND MATNR = EKPO_TAB-MATNR.

    o LOOP AT QALS_TAB WHERE MBLNR = MSEG_TAB-MBLNR AND MATNR = MSEG_TAB-MATNR AND EBELN = MSEG_TAB-EBELN.

    o LOOP AT MKPF_TAB WHERE MBLNR = MSEG_TAB-MBLNR.

    OUTPUT-EBELN = EKKO_TAB-EBELN.

    OUTPUT-BSART = EKKO_TAB-BSART.

    OUTPUT-LIFNR = EKKO_TAB-LIFNR.

    OUTPUT-BEDAT = EKKO_TAB-BEDAT.

    OUTPUT-PMENGE = EKPO_TAB-MENGE.

    OUTPUT-MATNR = EKPO_TAB-MATNR.

    OUTPUT-EBELP = EKPO_TAB-EBELP.

    o OUTPUT-MBLNR = MSEG_TAB-MBLNR.

    o OUTPUT-GMENGE = MSEG_TAB-MENGE.

    o OUTPUT-BUDAT = MKPF_TAB-BUDAT.

    o OUTPUT-LMENGE01 = QALS_TAB-LMENGE01.

    o OUTPUT-LMENGE07 = QALS_TAB-LMENGE07.

    o MODIFY OUTPUT TRANSPORTING BSART LIFNR BEDAT PMENGE MATNR.

    APPEND OUTPUT.

    CLEAR OUTPUT.

    o CLEAR QALS_TAB.

    o ENDLOOP.

    o CLEAR MKPF_TAB.

    o ENDLOOP.

    o CLEAR MSEG_TAB.

    o ENDLOOP.

    CLEAR EKPO_TAB.

    ENDLOOP.

    CLEAR EKKO_TAB.

    ENDLOOP.

    *

    *

    *

    *

    **SELECT MBLNR EBELN FROM MSEG INTO TABLE MSEG_TAB1 FOR ALL ENTRIES IN EKKO_TAB WHERE EBELN = EKKO_TAB-EBELN.

    **

    *

    o LOOP AT OUTPUT.

    o MOVE-CORRESPONDING MSEG_TAB1 TO OUTPUT.

    o OUTPUT-MBLNR = MSEG_TAB1-MBLNR.

    o MODIFY OUTPUT TRANSPORTING MBLNR.

    o ENDLOOP.

    *

    *

    *

    *

    *

    *

    *LOOP AT OUTPUT.

    LOOP AT MSEG_TAB WHERE EBELN = output-EBELN AND MATNR = output-MATNR AND EBELP = OUTPUT-EBELP.

    **READ TABLE MSEG_TAB WITH KEY EBELN = OUTPUT-EBELN MATNR = OUTPUT-MATNR.

    *IF SY-SUBRC = 0.

    OUTPUT-MBLNR = MSEG_TAB-MBLNR.

    OUTPUT-GMENGE = MSEG_TAB-MENGE.

    *MODIFY OUTPUT TRANSPORTING MBLNR GMENGE.

    *ENDIF.

    *clear output.

    *ENDLOOP.

    *endloop.

    *

    *

    *

    *LOOP AT OUTPUT.

    READ TABLE QALS_TAB WITH KEY MBLNR = OUTPUT-MBLNR MATNR = OUTPUT-MATNR EBELN = OUTPUT-EBELN.

    *IF SY-SUBRC = 0.

    *OUTPUT-LMENGE01 = QALS_TAB-LMENGE01.

    *OUTPUT-LMENGE07 = QALS_TAB-LMENGE07.

    *

    *MODIFY OUTPUT TRANSPORTING LMENGE01 LMENGE07.

    *ENDIF.

    *ENDLOOP.

    *

    *

    *

    *

    LOOP AT OUTPUT.

    READ TABLE EBAN_TAB WITH KEY EBELN = OUTPUT-EBELN.

    IF SY-SUBRC = 0.

    OUTPUT-BANFN = EBAN_TAB-BANFN.

    OUTPUT-BADAT = EBAN_TAB-BADAT.

    OUTPUT-RMENGE = EBAN_TAB-MENGE.

    OUTPUT-AFNAM = EBAN_TAB-AFNAM.

    MODIFY OUTPUT TRANSPORTING BANFN BADAT RMENGE AFNAM.

    ENDIF.

    ENDLOOP.

    *

    *

    *

    *

    *

    *

    *

    *

    *

    *LOOP AT OUTPUT.

    *

    READ TABLE MKPF_TAB WITH KEY MBLNR = OUTPUT-MBLNR.

    IF SY-SUBRC = 0.

    OUTPUT-BUDAT = MKPF_TAB-BUDAT.

    MODIFY OUTPUT TRANSPORTING BUDAT.

    ENDIF.

    ENDLOOP.

    *

    *

    *

    *

    *

    *

    *LOOP AT OUTPUT.

    *READ TABLE MAKT_TAB WITH KEY MATNR = OUTPUT-MATNR.

    *IF SY-SUBRC = 0.

    *OUTPUT-MAKTX = MAKT_TAB-MAKTX.

    *MODIFY OUTPUT TRANSPORTING MAKTX.

    *ENDIF.

    *ENDLOOP.

    PERFORM F_OUTPUT.

    PERFORM SORT.

    PERFORM GRID.

    FORM F_OUTPUT.

    F_OUTPUT1-FIELDNAME = 'MATNR'.

    F_OUTPUT1-REF_TABNAME = 'EKPO'.

    F_OUTPUT1-REF_FIELDNAME = 'MATNR'.

    APPEND F_OUTPUT1.

    CLEAR F_OUTPUT1.

    F_OUTPUT1-FIELDNAME ='MAKTX'.

    F_OUTPUT1-SELTEXT_M = 'DESCRIPTION.'.

    APPEND F_OUTPUT1.

    CLEAR F_OUTPUT1.

    F_OUTPUT1-FIELDNAME = 'LIFNR'.

    F_OUTPUT1-REF_TABNAME = 'EKKO'.

    F_OUTPUT1-REF_FIELDNAME = 'LIFNR'.

    F_OUTPUT1-SELTEXT_M = 'SUPPLIER'.

    APPEND F_OUTPUT1.

    CLEAR F_OUTPUT1.

    F_OUTPUT1-FIELDNAME = 'AFNAM'.

    F_OUTPUT1-REF_TABNAME = 'EBAN'.

    F_OUTPUT1-REF_FIELDNAME = 'AFNAM'.

    APPEND F_OUTPUT1.

    CLEAR F_OUTPUT1.

    F_OUTPUT1-FIELDNAME = 'BANFN'.

    F_OUTPUT1-REF_TABNAME = 'EBAN'.

    F_OUTPUT1-REF_FIELDNAME = 'BANFN'.

    APPEND F_OUTPUT1.

    CLEAR F_OUTPUT1.

    F_OUTPUT1-FIELDNAME = 'BADAT'.

    F_OUTPUT1-SELTEXT_M = 'PRS DATE'.

    F_OUTPUT1-REF_TABNAME = 'EBAN'.

    F_OUTPUT1-REF_FIELDNAME = 'BADAT'.

    APPEND F_OUTPUT1.

    CLEAR F_OUTPUT1.

    F_OUTPUT1-FIELDNAME ='RMENGE'.

    *F_OUTPUT1-REF_TABNAME = 'MSEG'.

    *F_OUTPUT1-REF_FIELDNAME = 'MBLNR'.

    F_OUTPUT1-SELTEXT_M = 'PRS QTY'.

    APPEND F_OUTPUT1.

    CLEAR F_OUTPUT1.

    F_OUTPUT1-FIELDNAME = 'EBELN'.

    F_OUTPUT1-REF_TABNAME = 'EKKO'.

    F_OUTPUT1-REF_FIELDNAME = 'EBELN'.

    APPEND F_OUTPUT1.

    CLEAR F_OUTPUT1.

    F_OUTPUT1-FIELDNAME = 'BSART'.

    F_OUTPUT1-REF_TABNAME = 'EKKO'.

    F_OUTPUT1-REF_FIELDNAME = 'BSART'.

    APPEND F_OUTPUT1.

    CLEAR F_OUTPUT1.

    F_OUTPUT1-FIELDNAME = 'BEDAT'.

    F_OUTPUT1-REF_TABNAME = 'EKKO'.

    F_OUTPUT1-REF_FIELDNAME = 'BEDAT'.

    F_OUTPUT1-SELTEXT_M = 'PO DATE'.

    APPEND F_OUTPUT1.

    CLEAR F_OUTPUT1.

    F_OUTPUT1-FIELDNAME ='PMENGE'.

    F_OUTPUT1-SELTEXT_M = 'PO QTY'.

    APPEND F_OUTPUT1.

    CLEAR F_OUTPUT1.

    F_OUTPUT1-FIELDNAME = 'MBLNR'.

    F_OUTPUT1-REF_TABNAME = 'MSEG'.

    F_OUTPUT1-REF_FIELDNAME = 'MBLNR'.

    F_OUTPUT1-SELTEXT_M = 'GR NUMBER'.

    APPEND F_OUTPUT1.

    CLEAR F_OUTPUT1.

    F_OUTPUT1-FIELDNAME ='BUDAT'.

    F_OUTPUT1-SELTEXT_M = 'GR DATE'.

    APPEND F_OUTPUT1.

    CLEAR F_OUTPUT1.

    F_OUTPUT1-FIELDNAME ='GMENGE'.

    *F_OUTPUT1-REF_TABNAME = 'MSEG'.

    *F_OUTPUT1-REF_FIELDNAME = 'MBLNR'.

    F_OUTPUT1-SELTEXT_M = 'RECEIVED QTY'.

    APPEND F_OUTPUT1.

    CLEAR F_OUTPUT1.

    F_OUTPUT1-FIELDNAME = 'LMENGE01'.

    F_OUTPUT1-REF_TABNAME = 'QALS'.

    F_OUTPUT1-REF_FIELDNAME = 'LMENGE01'.

    F_OUTPUT1-SELTEXT_M = 'ACCEPTED QTY'.

    APPEND F_OUTPUT1.

    CLEAR F_OUTPUT1.

    F_OUTPUT1-FIELDNAME = 'LMENGE07'.

    F_OUTPUT1-REF_TABNAME = 'QALS'.

    F_OUTPUT1-REF_FIELDNAME = 'LMENGE07'.

    F_OUTPUT1-SELTEXT_M = 'REJECTED QTY'.

    APPEND F_OUTPUT1.

    CLEAR F_OUTPUT1.

    *

    F_OUTPUT1-FIELDNAME ='REMARKS'.

    **F_OUTPUT1-REF_TABNAME = 'MSEG'.

    **F_OUTPUT1-REF_FIELDNAME = 'MBLNR'.

    F_OUTPUT1-SELTEXT_M = 'REMARKS'.

    APPEND F_OUTPUT1.

    CLEAR F_OUTPUT1.

    ENDFORM.

    FORM SORT.

    IT_SORT-FIELDNAME = 'MATNR'.

    IT_SORT-UP = 'X'.

    APPEND IT_SORT.

    CLEAR IT_SORT.

    IT_SORT-FIELDNAME = 'MAKTX'.

    IT_SORT-UP = 'X'.

    APPEND IT_SORT.

    CLEAR IT_SORT.

    IT_SORT-FIELDNAME = 'LIFNR'.

    IT_SORT-UP = 'X'.

    APPEND IT_SORT.

    CLEAR IT_SORT.

    IT_SORT-FIELDNAME = 'AFNAM'.

    IT_SORT-UP = 'X'.

    APPEND IT_SORT.

    CLEAR IT_SORT.

    IT_SORT-FIELDNAME = 'BANFN'.

    IT_SORT-UP = 'X'.

    APPEND IT_SORT.

    CLEAR IT_SORT.

    IT_SORT-FIELDNAME = 'BADAT'.

    IT_SORT-UP = 'X'.

    APPEND IT_SORT.

    CLEAR IT_SORT.

    IT_SORT-FIELDNAME = 'RMENGE'.

    IT_SORT-UP = 'X'.

    APPEND IT_SORT.

    CLEAR IT_SORT.

    IT_SORT-FIELDNAME = 'EBELN'.

    IT_SORT-UP = 'X'.

    APPEND IT_SORT.

    CLEAR IT_SORT.

    IT_SORT-FIELDNAME = 'BSART'.

    IT_SORT-UP = 'X'.

    APPEND IT_SORT.

    CLEAR IT_SORT.

    IT_SORT-FIELDNAME = 'BEDAT'.

    IT_SORT-UP = 'X'.

    APPEND IT_SORT.

    CLEAR IT_SORT.

    IT_SORT-FIELDNAME = 'PMENGE'.

    IT_SORT-UP = 'X'.

    APPEND IT_SORT.

    CLEAR IT_SORT.

    IT_SORT-FIELDNAME = 'MBLNR'.

    IT_SORT-UP = 'X'.

    APPEND IT_SORT.

    CLEAR IT_SORT.

    IT_SORT-FIELDNAME = 'BUDAT'.

    IT_SORT-UP = 'X'.

    APPEND IT_SORT.

    CLEAR IT_SORT.

    IT_SORT-FIELDNAME = 'GMENGE'.

    IT_SORT-UP = 'X'.

    APPEND IT_SORT.

    CLEAR IT_SORT.

    IT_SORT-FIELDNAME = 'LMENGE01'.

    IT_SORT-UP = 'X'.

    APPEND IT_SORT.

    CLEAR IT_SORT.

    IT_SORT-FIELDNAME = 'LMENGE07'.

    IT_SORT-UP = 'X'.

    APPEND IT_SORT.

    CLEAR IT_SORT.

    ENDFORM.

    FORM GRID.

    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

    EXPORTING

    I_INTERFACE_CHECK = ' '

    I_BYPASSING_BUFFER = ' '

    I_BUFFER_ACTIVE = ' '

    I_CALLBACK_PROGRAM = 'REPID'

    I_CALLBACK_PF_STATUS_SET = ' '

    I_CALLBACK_USER_COMMAND = ' '

    I_CALLBACK_TOP_OF_PAGE = ' '

    I_CALLBACK_HTML_TOP_OF_PAGE = ' '

    I_CALLBACK_HTML_END_OF_LIST = ' '

    I_STRUCTURE_NAME =

    I_BACKGROUND_ID = ' '

    I_GRID_TITLE =

    I_GRID_SETTINGS =

    IS_LAYOUT =

    IT_FIELDCAT = F_OUTPUT1[]

    IT_EXCLUDING =

    IT_SPECIAL_GROUPS =

    IT_SORT =

    IT_FILTER =

    IS_SEL_HIDE =

    I_DEFAULT = 'X'

    I_SAVE = ' '

    IS_VARIANT =

    IT_EVENTS =

    IT_EVENT_EXIT =

    IS_PRINT =

    IS_REPREP_ID =

    I_SCREEN_START_COLUMN = 0

    I_SCREEN_START_LINE = 0

    I_SCREEN_END_COLUMN = 0

    I_SCREEN_END_LINE = 0

    I_HTML_HEIGHT_TOP = 0

    I_HTML_HEIGHT_END = 0

    IT_ALV_GRAPHICS =

    IT_HYPERLINK =

    IT_ADD_FIELDCAT =

    IT_EXCEPT_QINFO =

    IR_SALV_FULLSCREEN_ADAPTER =

    IMPORTING

    E_EXIT_CAUSED_BY_CALLER =

    ES_EXIT_CAUSED_BY_USER =

    TABLES

    T_OUTTAB = OUTPUT[].

    EXCEPTIONS

    PROGRAM_ERROR = 1

    OTHERS = 2

    .

    IF SY-SUBRC 0.

    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

    ENDIF.

    ENDFORM.

    DB:3.04:Problem In Code.It Is Urgent. 8k


    Hi prasad,

    Whats the problem exactly. Is it not displaying any records ?

    Thanks,

    bsv.

  • RELEVANCY SCORE 3.04

    DB:3.04:Store The Output Of Plsql Table Of Records fm


    Hi Experts,

    I have a procedure which when executed gets the data into a plsql table.
    I want to store this data into a temp table .

    Example : Procedure( p_empno in number,p_rec out p_record_type)
    is
    begin
    select ...into...p_rec

    end;

    Now i want to see the output of p_rec .
    How to achieve this?
    Thanks

    DB:3.04:Store The Output Of Plsql Table Of Records fm

    Have a look at FORALL and record-based INSERT. There are examples on oracle-developer.net.

    Edited by: William Robertson on Mar 14, 2010 6:55 PM
    Just noticed this was already answered in your duplicate thread X-(

  • RELEVANCY SCORE 3.04

    DB:3.04:How Can I Get The Pulish Data For Price Change? 1d


    From the rpm-1205-og.pdf document, the RegularPriceChangePublishBatch Batch can formats and stages output of regular price change price events.

    but I can't get data from rpm_price_publish_stage table after I run the batch.

    if I want generate data into rpm_price_publish_stage, how can I do?

    Please help me. thanks.

    Daniel

  • RELEVANCY SCORE 3.04

    DB:3.04:Help In Query Please 78


    Hi, How I can get the exptected output. I wan to join both table.
    I want to get correct the actualtravaldate. I have dates in #travalplan. These dates should match with the dates of actualtravaldate, if dates doesn't match then take the nearest ahead data. Please help on this.
    create table #travalplan (name char(20),traveldate datetime)
    insert into #travalplan values ('Yousuf','2014-05-01')
    insert into #travalplan values ('Hira','2014-06-20')
    create table #traval (plan_code numeric,actualtraveldate datetime)
    insert into #traval values (200,'2014-04-20')
    insert into #traval values (300,'2014-04-30')
    insert into #traval values (301,'2014-05-15')
    insert into #traval values (302,'2014-06-15')
    insert into #traval values (303,'2014-06-23')

    --Exppected Output
    name traveldate actualtraveldate

    Yousuf,2014-05-01 2014-05-15
    Hira,2014-06-01 2014-06-23

    DB:3.04:Help In Query Please 78

    CREATE TABLE Travel_Plans
    (traveler_name CHAR(20) NOT NULL,
    travel_date DATE NOT NULL,
    PRIMARY KEY (traveler_name, travel_date));

    INSERT INTO Travel_Plans
    VALUES ('Yousuf', '2014-05-01'),
    ('Hira', '2014-06-20');

    CREATE TABLE Trips
    (plan_code CHAR(3) NOT NULL PRIMARY KEY,
    actual_travel_date DATE NOT NULL);

    INSERT INTO Trips
    VALUES (200, '2014-04-20'),
    (300, '2014-04-30'),
    (301, '2014-05-15'),
    (302, '2014-06-15'),
    (303, '2014-06-23');

    WITH Candidate_Trips
    AS
    (SELECT P.traveler_name, P.travel_date, T.actual_travel_date
    FROM Travel_Plans AS P, Trips AS T
    WHERE P.travel_date = T.actual_travel_date)

    SELECT C.traveler_name, MIN(C.actual_travel_date)
    FROM Candidate_Trips AS C
    GROUP BY C.traveler_name;--CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • RELEVANCY SCORE 3.04

    DB:3.04:Table Control Display Proble. a7



    Dear Friends,

    I have a table control with 4 colums, The Table control is designed as input enabled ( Input/output possible ) for all lines.

    The data is comming in my internal table ( The internal table which I am looping for table control data display ) from selection screen.

    Now the problem is I am having only one record in my internal table, and it is displaying in table control in first line with input enable but the remaining lines are greyed out ( display only ).

    Now I want to make every line as input enable for the changes or to add the data into another lines.

    Note : Internal table colums are like:

    CHK F1 F2 F3.

    is it possible???

    Thanks,

    Sridhar.

    DB:3.04:Table Control Display Proble. a7


    hi,

    you include a module and that module, you write a loop to enable the recods all.

    Regards.

  • RELEVANCY SCORE 3.03

    DB:3.03:Output Format aj


    hi,

    i want that when i run script it automatically take which user is owner of table like SCOTT.EMP. and give following output. basically i get this output in SQL file,after executing this SQL file, data will be inserted into table.

    what would be the script that will give follwoing output.

    INSERT INTO SCOTT.EMP ( EMPNO, ENAME, JOB, MGR, HIREDATE, SAL, COMM, DEPTNO) VALUES ( 7839, 'KING', 'PRESIDENT', NULL, '17-11-1981', 5000, NULL, 10);

    INSERT INTO SCOTT.EMP ( EMPNO, ENAME, JOB, MGR, HIREDATE, SAL, COMM, DEPTNO) VALUES ( 7499, 'ALLEN', 'SALESMAN', 7698, '20-02-1981', 1600, 300, 30);

    thanks

    DB:3.03:Output Format aj

    Hi,

    Try the following...

    pre
    DECLARE
    v_table varchar2(20) := 'SCOTT.EMP';
    r_cur sys_refcursor;
    CURSOR c_tab_col IS
    select column_name, data_type from all_tab_columns where owner = substr(v_table, 1, instr(v_table, '.')-1) and table_name = substr(v_table, instr(v_table, '.') + 1);
    v_ins_str varchar2(2000);
    v_sel_str varchar2(2000);
    v_col_val varchar2(32767);
    procedure print(p_in_str varchar2) is
    v_str varchar2(32767) := p_in_str;
    v_str2 varchar2(32767);
    begin
    loop
    exit when v_str is null;
    v_str2 := substr(v_str, 1, 255);
    v_str := substr(v_str, 256);
    dbms_output.put_line(v_str2);
    end loop;
    end;
    BEGIN
    for i in c_tab_col loop
    v_ins_str := v_ins_str || ',' || i.column_name;
    if i.data_type = 'DATE' then
    v_sel_str := v_sel_str || '|| '','''''' ||NVL(TO_CHAR(' || i.column_name || ', ''DD-MON-YYYY'') || '''''''',''NULL'')';

    elsif i.data_type in ('VARCHAR2','CHAR') then
    v_sel_str := v_sel_str || '|| '','''''' ||NVL(' || i.column_name || '|| '''''''',''NULL'')';
    else
    v_sel_str := v_sel_str || '|| '','' ||NVL(TO_CHAR(' || i.column_name || '),''NULL'')';
    end if;
    end loop;
    v_sel_str := ltrim(v_sel_str, '|| '',''');
    print(v_sel_str);
    v_ins_str := 'INSERT INTO ' || v_table || '( ' || ltrim(v_ins_str, ',') || ') VALUES ';
    open r_cur for 'SELECT ' || v_sel_str || ' FROM ' || v_table;

    LOOP
    FETCH r_cur into v_col_val;
    EXIT WHEN r_cur%NOTFOUND;
    print(v_ins_str || '(' || v_col_val || ');');
    END LOOP;
    END;
    /pre

    ~ KK

  • RELEVANCY SCORE 3.03

    DB:3.03:How To Store Query Results Into A Table zk


    I want to store the query results to a table. Is there a way to automatically redirect output to a table without using a PL/SQL script.

    DB:3.03:How To Store Query Results Into A Table zk

    Run the following step only once unless you want to create the tabX everytime

    Create tabX as select x,y,z from tabY;

    Next time when you want to store the new results, run the following statement

    Insert into tabX select x,y,z from tabY;

  • RELEVANCY SCORE 3.03

    DB:3.03:Alv Display 18



    Hi all,

    In my program output is getting displayed in Reuse_alv_list_display, data from my int. table ITAB. Here in ITAB , i have took sum of all values and taken it's average and APPEND the value into ITAB . Now i want this particular average value ROW which is getting appear in output, should come in some particular color . IS it possible in ALV to color a particular row. Please Suggest your valuable suggestions.

    Thanks in advance,

    Regards,

    Vivek

    DB:3.03:Alv Display 18


    Hi,

    Line Color in ALV Example

    An example of using linecolor (ALV).

    Here you have a good example of coloring rows, columns and specific cells in alvs. It comes in an example of how to use hashed tables.

    For coloured rows and cols check gp_bymat

    for coloured specific rows uncheck gp_bymat.

    report zuseofhashedtables.

    ************************************************************************

    Program: ZUseOfHashedTables **

    ************************************************************************

    Author: Horacio Zapettini **

    **

    Versions: 4.6b - 4.6c **

    ************************************************************************

    Notes: **

    this program shows how we can use hashed tables to improve **

    the responce time. **

    It shows, **

    1. how to declare hashed tables **

    2. a cache-like technique to improve access to master data **

    3. how to collect data using hashed tables **

    4. how to avoid deletions of unwanted data **

    ************************************************************************

    Results: the test we run read about 31000 rows from mkpf, 150000 **

    rows from mseg, 500 rows from makt and 400 from lfa1. **

    it filled ht_lst with 24500 rows and displayed them in **

    alv grid format. **

    **

    It took about 65 secodns to perform this task (first time **

    we run it when all the db buffers are empty. **

    **

    The same program with standard tables needed 140 seconds **

    to run with the same recordset and with buffers filled in **

    **

    A simmilar test over more than a million rows

    ************************************************************************

    Objetive: show a list that consists of all the material movements **

    '101' - '901' for a certain range of dates in mkpf-budat. **

    the columns to be displayed are: **

    mkpf-budat, **

    mkpf-mblnr, **

    mseg-lifnr, **

    lfa1-name1, **

    mkpf-xblnr, **

    mseg-zeile **

    mseg-charg, **

    mseg-matnr, **

    makt-maktx, **

    mseg-erfmg, **

    mseg-erfme. **

    or show a sumary list by matnr - menge **

    **

    You'll have to create a pf-status called vista - **

    See form set_pf_status for details **

    ************************************************************************

    tables used -

    tables: mkpf,

    mseg,

    lfa1,

    makt.

    global hashed tables used

    *

    data: begin of wa_mkpf, "header

    mblnr like mkpf-mblnr,

    mjahr like mkpf-mjahr,

    budat like mkpf-budat,

    xblnr like mkpf-xblnr,

    end of wa_mkpf.

    data: ht_mkpf like hashed table of wa_mkpf

    with unique key mblnr mjahr

    with header line.

    data: st_mkpf like standard table of wa_mkpf

    with header line.

    *

    data: begin of wa_mseg, " line items

    mblnr like mseg-mblnr,

    mjahr like mseg-mjahr,

    zeile like mseg-zeile,

    bwart like mseg-bwart,

    charg like mseg-charg,

    matnr like mseg-matnr,

    lifnr like mseg-lifnr,

    erfmg like mseg-erfmg,

    erfme like mseg-erfme,

    end of wa_mseg.

    data ht_mseg like hashed table of wa_mseg

    with unique key mblnr mjahr zeile

    with header line.

    data st_mseg like standard table of wa_mseg

    with header line.

    cache structure for lfa1 records

    data: begin of wa_lfa1,

    lifnr like lfa1-lifnr,

    name1 like lfa1-name1,

    end of wa_lfa1.

    data ht_lfa1 like hashed table of wa_lfa1

    with unique key lifnr

    with header line.

    cache structure for material related data

    data: begin of wa_material,

    matnr like makt-matnr,

    maktx like makt-maktx,

    end of wa_material.

    data: ht_material like hashed table of wa_material

    with unique key matnr

    with header line.

    result table

    data: begin of wa_lst, "

    budat like mkpf-budat,

    mblnr like mseg-mblnr,

    lifnr like mseg-lifnr,

    name1 like lfa1-name1,

    xblnr like mkpf-xblnr,

    zeile like mseg-zeile,

    charg like mseg-charg,

    matnr like mseg-matnr,

    maktx like makt-maktx,

    erfmg like mseg-erfmg,

    erfme like mseg-erfme,

    mjahr like mseg-mjahr,

    end of wa_lst.

    data: ht_lst like hashed table of wa_lst

    with unique key mblnr mjahr zeile

    with header line.

    data: begin of wa_lst1, " sumary by material

    matnr like mseg-matnr,

    maktx like makt-maktx,

    erfmg like mseg-erfmg,

    erfme like mseg-erfme,

    color_line(4) TYPE c, " Line color

    color_cell TYPE lvc_t_scol, " Cell color

    celltab type LVC_T_STYL,

    end of wa_lst1.

    data: ht_lst1 like hashed table of wa_lst1

    with unique key matnr

    with header line.

    structures for alv grid display.

    itabs

    type-pools: slis.

    data: it_lst like standard table of wa_lst with header line,

    it_fieldcat_lst type slis_t_fieldcat_alv with header line,

    it_sort_lst type slis_t_sortinfo_alv,

    it_lst1 like standard table of wa_lst1 with header line,

    it_fieldcat_lst1 type slis_t_fieldcat_alv with header line,

    it_sort_lst1 type slis_t_sortinfo_alv.

    structures

    data: wa_sort type slis_sortinfo_alv,

    ls_layout type slis_layout_alv.

    color management.

    DATA : wa_color TYPE lvc_s_scol.

    Internal table for color management.

    DATA : it_color TYPE TABLE OF lvc_s_scol.

    itab for input enabling.

    DATA: lt_celltab TYPE lvc_t_styl. "

    global varialbes

    data: g_lines type i.

    data: g_repid like sy-repid,

    ok_code like sy-ucomm.

    selection-screen

    "text: Dates:

    select-options: so_budat for mkpf-budat default sy-datum.

    "text: Material numbers.

    select-options: so_matnr for mseg-matnr.

    selection-screen uline.

    selection-screen skip 1.

    "Text: show summary by material.

    parameters: gp_bymat as checkbox default ''.

    parameters: gp_hier as checkbox default 'X'.

    start-of-selection.

    perform get_data.

    perform show_data.

    end-of-selection.

    *----

    *

    FORM get_data *

    *----

    *

    ........ *

    *----

    *

    form get_data.

    select mblnr mjahr budat xblnr

    into table ht_mkpf

    from mkpf

    where budat in so_budat. " make use of std index.

    have we retrieved data from mkpf?

    describe table ht_mkpf lines g_lines.

    if g_lines 0.

    if true then retrieve all related records from mseg.

    Doing this way we make sure that the access is by primary key

    of mseg.

    The reason is that is faster to filter them in memory

    than to allow the db server to do it.

    select mblnr mjahr zeile bwart charg

    matnr lifnr erfmg erfme

    into table ht_mseg

    from mseg

    for all entries in ht_mkpf

    where mblnr = ht_mkpf-mblnr

    and mjahr = ht_mkpf-mjahr.

    endif.

    fill t_lst or t_lst1 according to user's choice.

    if gp_bymat = ' '.

    perform fill_ht_lst.

    else.

    perform fill_ht_lst1.

    endif.

    endform.

    form fill_ht_lst.

    refresh ht_lst.

    Example: how to discard unwanted data in an efficient way.

    loop at ht_mseg.

    filter unwanted data

    check ht_mseg-bwart = '101' or ht_mseg-bwart = '901'.

    check ht_mseg-matnr in so_matnr.

    read header line.

    read table ht_mkpf with table key mblnr = ht_mseg-mblnr

    mjahr = ht_mseg-mjahr.

    clear ht_lst.

    * note : this may be faster if you specify field by field.

    move-corresponding ht_mkpf to ht_lst.

    move-corresponding ht_mseg to ht_lst.

    perform read_lfa1 using ht_mseg-lifnr changing ht_lst-name1.

    perform read_material using ht_mseg-matnr changing ht_lst-maktx.

    insert table ht_lst.

    endloop.

    endform.

    form fill_ht_lst1.

    data: colorear.

    refresh ht_lst1.

    Example: how to discard unwanted data in an efficient way.

    hot to simulate a collect in a faster way

    loop at ht_mseg.

    filter unwanted data

    check ht_mseg-bwart = '101' or ht_mseg-bwart = '901'.

    check ht_mseg-matnr in so_matnr.

    * note : this may be faster if you specify field by field.

    read table ht_lst1 with table key matnr = ht_mseg-matnr

    transporting erfmg.

    if sy-subrc 0. " if matnr doesn't exist in sumary table

    " insert a new record

    clear ht_lst1.

    ht_lst1-matnr = ht_mseg-matnr.

    perform read_material using ht_mseg-matnr changing ht_lst1-maktx.

    ht_lst1-erfmg = ht_mseg-erfmg.

    ht_lst1-erfme = ht_mseg-erfme.

    if colorear = ''.

    colorear = 'X'.

    refresh it_color.

    ht_lst1-color_cell[] = it_color[].

    MOVE 'C410' TO ht_lst1-color_line.

    else.

    colorear = ' '.

    refresh it_color. clear it_color.

    MOVE 'MATNR' TO wa_color-fname.

    MOVE '6' TO wa_color-color-col.

    MOVE '1' TO wa_color-color-int.

    MOVE '1' TO wa_color-color-inv.

    APPEND wa_color TO it_color.

    MOVE 'MAKTX' TO wa_color-fname.

    MOVE '3' TO wa_color-color-col.

    MOVE '1' TO wa_color-color-int.

    MOVE '1' TO wa_color-color-inv.

    APPEND wa_color TO it_color.

    MOVE 'ERFMG' TO wa_color-fname.

    MOVE '5' TO wa_color-color-col.

    MOVE '1' TO wa_color-color-int.

    MOVE '1' TO wa_color-color-inv.

    APPEND wa_color TO it_color.

    ht_lst1-color_cell[] = it_color[].

    clear ht_lst1-color_line.

    endif.

    insert table ht_lst1.

    else." a record was found.

    " collect erfmg. To do so, fill in the unique key and add

    " the numeric fields.

    ht_lst1-matnr = ht_mseg-matnr.

    add ht_mseg-erfmg to ht_lst1-erfmg.

    modify table ht_lst1 transporting erfmg.

    endif.

    endloop.

    endform.

    implementation of cache for lfa1.

    form read_lfa1 using p_lifnr changing p_name1.

    read table ht_lfa1 with table key lifnr = p_lifnr

    transporting name1.

    if sy-subrc 0.

    clear ht_lfa1.

    ht_lfa1-lifnr = p_lifnr.

    select single name1

    into ht_lfa1-name1

    from lfa1

    where lifnr = p_lifnr.

    if sy-subrc 0. ht_lfa1-name1 = 'n/a in lfa1'. endif.

    insert table ht_lfa1.

    endif.

    p_name1 = ht_lfa1-name1.

    endform.

    implementation of cache for material data

    form read_material using p_matnr changing p_maktx.

    read table ht_material with table key matnr = p_matnr

    transporting maktx.

    if sy-subrc 0.

    ht_material-matnr = p_matnr.

    select single maktx into ht_material-maktx

    from makt

    where spras = sy-langu

    and matnr = p_matnr.

    if sy-subrc 0. ht_material-maktx = 'n/a in makt'. endif.

    insert table ht_material.

    endif.

    p_maktx = ht_material-maktx.

    endform.

    form show_data.

    if gp_hier = 'X'. "no anda.

    perform show_hierarchicalALV.

    else.

    if gp_bymat = ' '.

    perform show_ht_lst.

    else.

    perform show_ht_lst1.

    endif.

    endif.

    endform.

    form show_hierarchicalALV.

    st_mkpf[] = ht_mkpf[].

    st_mseg[] = ht_mseg[].

    call function 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'

    exporting

    I_INTERFACE_CHECK = ' '

    I_CALLBACK_PROGRAM =

    I_CALLBACK_PF_STATUS_SET = ' '

    I_CALLBACK_USER_COMMAND = ' '

    IS_LAYOUT =

    IT_FIELDCAT =

    IT_EXCLUDING =

    IT_SPECIAL_GROUPS =

    IT_SORT =

    IT_FILTER =

    IS_SEL_HIDE =

    I_SCREEN_START_COLUMN = 0

    I_SCREEN_START_LINE = 0

    I_SCREEN_END_COLUMN = 0

    I_SCREEN_END_LINE = 0

    I_DEFAULT = 'X'

    I_SAVE = ' '

    IS_VARIANT =

    IT_EVENTS =

    IT_EVENT_EXIT =

    i_tabname_header =

    i_tabname_item =

    I_STRUCTURE_NAME_HEADER =

    I_STRUCTURE_NAME_ITEM =

    is_keyinfo =

    IS_PRINT =

    IS_REPREP_ID =

    I_BUFFER_ACTIVE =

    I_BYPASSING_BUFFER =

    IMPORTING

    E_EXIT_CAUSED_BY_CALLER =

    ES_EXIT_CAUSED_BY_USER =

    tables

    t_outtab_header = st_mkpf

    t_outtab_item = st_mseg

    EXCEPTIONS

    PROGRAM_ERROR = 1

    OTHERS = 2

    .

    if sy-subrc 0.

    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

    endif.

    endform.

    form show_ht_lst.

    "needed because the FM can't use a hashed table.

    it_lst[] = ht_lst[].

    perform fill_layout using 'full display'

    changing ls_layout.

    perform fill_columns_lst.

    perform sort_lst.

    g_repid = sy-repid.

    call function 'REUSE_ALV_GRID_DISPLAY'

    exporting

    i_callback_program = g_repid

    i_callback_pf_status_set = 'SET_PF_STATUS'

    is_layout = ls_layout

    it_fieldcat = it_fieldcat_lst[]

    it_sort = it_sort_lst

    tables

    t_outtab = it_lst

    exceptions

    program_error = 1

    others = 2.

    endform.

    form show_ht_lst1.

    "needed because the FM can't use a hashed table.

    it_lst1[] = ht_lst1[].

    perform fill_layout using 'Sumary by matnr'

    changing ls_layout.

    perform fill_columns_lst1.

    perform sort_lst.

    g_repid = sy-repid.

    call function 'REUSE_ALV_GRID_DISPLAY'

    exporting

    i_callback_program = g_repid

    i_callback_pf_status_set = 'SET_PF_STATUS'

    is_layout = ls_layout

    it_fieldcat = it_fieldcat_lst1[]

    it_sort = it_sort_lst

    tables

    t_outtab = it_lst1

    exceptions

    program_error = 1

    others = 2.

    endform.

    form fill_layout using p_window_titlebar

    changing cs_layo type slis_layout_alv.

    clear cs_layo.

    cs_layo-window_titlebar = p_window_titlebar.

    cs_layo-edit = 'X'.

    cs_layo-edit_mode = space.

    MOVE 'COLOR_LINE' TO cs_layo-info_fieldname.

    Field that identify cell color in inetrnal table

    MOVE 'COLOR_CELL' TO cs_layo-coltab_fieldname.

    move 'CELLTAB' TO cs_layo-stylefname.

    endform. " armar_layout_stock

    form set_pf_status using rt_extab type slis_t_extab.

    create a new status

    and then select extras - adjust template - listviewer

    set pf-status 'VISTA'.

    endform. "set_pf_status

    define add_lst.

    clear it_fieldcat_lst.

    it_fieldcat_lst-fieldname = 1.

    it_fieldcat_lst-outputlen = 2.

    it_fieldcat_lst-ddictxt = 'L'.

    it_fieldcat_lst-seltext_l = 1.

    it_fieldcat_lst-seltext_m = 1.

    it_fieldcat_lst-seltext_m = 1.

    if 1 = 'MATNR'.

    it_fieldcat_lst-emphasize = 'C111'.

    endif.

    append it_fieldcat_lst.

    end-of-definition.

    define add_lst1.

    clear it_fieldcat_lst.

    it_fieldcat_lst1-fieldname = 1.

    it_fieldcat_lst1-outputlen = 2.

    it_fieldcat_lst1-ddictxt = 'L'.

    it_fieldcat_lst1-seltext_l = 1.

    it_fieldcat_lst1-seltext_m = 1.

    it_fieldcat_lst1-seltext_m = 1.

    append it_fieldcat_lst1.

    end-of-definition.

    form fill_columns_lst.

    set columns for output.

    refresh it_fieldcat_lst.

    *

    add_lst 'BUDAT' 10.

    add_lst 'MBLNR' 10.

    add_lst 'LIFNR' 10.

    add_lst 'NAME1' 35.

    add_lst 'XBLNR' 15.

    add_lst 'ZEILE' 5.

    add_lst 'CHARG' 10.

    add_lst 'MATNR' 18.

    add_lst 'MAKTX' 30.

    add_lst 'ERFMG' 17.

    add_lst 'ERFME' 5.

    add_lst 'MJAHR' 4.

    endform.

    form fill_columns_lst1.

    set columns for output.

    refresh it_fieldcat_lst1.

    add_lst1 'MATNR' 18.

    add_lst1 'MAKTX' 30.

    add_lst1 'ERFMG' 17.

    add_lst1 'ERFME' 5..

    endform.

    Horacio Zapettini

    -

    -

    Program to Calculate FI Opening Balance

    How to find the Opening balance for a given period in FI Module for a Particular GL A/c.

    I was calculated opening balance, code is below maybe it will be helpful.

    *find period.

    CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'

    EXPORTING

    i_date = s_budat-low

    i_periv = i_tab-periv "'K4'

    IMPORTING

    e_buper = v_donem

    e_gjahr = v_gjahr

    EXCEPTIONS

    input_false = 1

    t009_notfound = 2

    t009b_notfound = 3

    OTHERS = 4.

    *calc opening balance hesab

    SELECT * FROM knc1 WHERE kunnr = i_tab-kunnr

    AND bukrs = i_tab-bukrs " s_bukrs

    AND gjahr EQ v_gjahr.

    v_dnm = v_donem.

    opening balance first calc old year ,

    WHILE v_dnm 1.

    v_dnm = v_dnm - 1.

    CONCATENATE 'knc1-um' v_dnm 's' INTO v_field_name_borc.

    CONCATENATE 'knc1-um' v_dnm 'h' INTO v_field_name_alacak.

    ASSIGN (v_field_name_borc) TO old

    add days which is from selected date-low month

    IF v_donem 1.

    v_dnm = v_donem - 1.

    ELSE.

    v_dnm = v_donem.

    ENDIF.

    SELECT SINGLE * FROM t009b WHERE periv = i_tab-periv "'K4'

    AND bdatj = s_budat-low+0(4)

    AND poper = v_dnm.

    t009b-butag = t009b-butag + 1.

    IF s_budat-low+6(2) NE t009b-butag.

    v_date_high = s_budat-low - 1.

    IF v_donem = 1.

    v_date_low = s_budat-low.

    v_date_low+4(4) = '0101'.

    ELSE.

    CONCATENATE t009b-bdatj t009b-bumon t009b-butag INTO

    v_date_low.

    ENDIF.

    SELECT * FROM bsad WHERE bukrs EQ i_tab-bukrs "IN s_bukrs

    AND kunnr = i_tab-kunnr

    AND budat BETWEEN v_date_low AND

    v_date_high

    AND umskz = space

    AND blart IN s_blart.

    IF bsad-shkzg = 'S'.

    i_tab-dmbtr_s = i_tab-dmbtr_s + ( bsad-dmbtr ).

    ELSEIF bsad-shkzg = 'H'.

    i_tab-dmbtr_h = i_tab-dmbtr_h + ( bsad-dmbtr ).

    ENDIF.

    ENDSELECT.

    SELECT * FROM bsid WHERE bukrs EQ i_tab-bukrs "IN s_bukrs

    AND kunnr = i_tab-kunnr

    AND budat BETWEEN v_date_low AND

    v_date_high

    AND umskz = space

    AND blart IN s_blart.

    AND gsber IN gsber.

    IF bsid-shkzg = 'S'.

    i_tab-dmbtr_s = i_tab-dmbtr_s + ( bsid-dmbtr ).

    ELSEIF bsid-shkzg = 'H'.

    i_tab-dmbtr_h = i_tab-dmbtr_h + ( bsid-dmbtr ).

    ENDIF.

    ENDSELECT.

    ENDIF.

    "opening balance ( irket bazl )z1 degeri

    i_tab-z1 = i_tab-z1 + ( knc1-umsav + i_tab-dmbtr_s - i_tab-dmbtr_h ).

    for israel

    i_tab-dmbtril_s = i_tab-dmbtr_s .

    i_tab-dmbtril_h = i_tab-dmbtr_h .

    ENDSELECT.

    Regards

    Sudheer

  • RELEVANCY SCORE 3.03

    DB:3.03:Inserting Data From One Table To Another Table.... jc


    Hi DB Gurus,

    I have two table like table A in instance X and table B in instance Y. I want to insert data into table A from table B.If data in table B already exist in table A then that should not insert .if data In table B is not present in table A then that data should insert into table A.

    please help me to how insert this kind of data.I am trying to insert data by using "insert into" statement.Is it correct way or not. please let me know...

    Thanks in advance

    Best regards
    kumar

    DB:3.03:Inserting Data From One Table To Another Table.... jc

    MERGE is tailored for your purpose. There's other way to do that but I doubt they are going to be better than merge unless you are talking about 100G of data and 100 million rows.

    Get a explain plan of your merge statement, make sure the join condition is correct and proper column indexed.

  • RELEVANCY SCORE 3.03

    DB:3.03:Query Problem-- z7


    Hi, I need one query

    I want a query with out using union

    select pno from temp where pno not like '9%'
    union select pno from temp2

    select all pno from temp table
    which are not like 9% but it can include
    the pno with 9 if it is exist in table temp2

    I have the following data

    select * from temp

    create table temp(pno number)

    insert into temp values(1)
    insert into temp values(2)
    insert into temp values(3)
    insert into temp values(4)

    insert into temp values(91)

    insert into temp values(92)
    insert into temp values(93)
    insert into temp values(94)
    insert into temp values(90)
    insert into temp values(99)
    temp
    1
    2
    3
    90
    91
    92
    4
    99

    create table temp2 (pno number)

    insert into temp2 values(99)
    insert into temp2 values(90)

    temp 2

    99
    90

    output

    1
    2
    3
    4
    99
    90

    Thank you

    DB:3.03:Query Problem-- z7

    Thank you, i was also doing some thing like this

    select * from temp where
    (pno not like ('9%') or pno in (select pno from temp2))

  • RELEVANCY SCORE 3.03

    DB:3.03:Min And Max Values From Entire Table kz



    Hi,
    i have requirement in which i need to find the min and max values from the entire table.
    See the sample data
    create table test
    (
    Sal1 int,
    Sal2 int,
    Sal3 int
    )

    insert into test values (100,700,5700)
    insert into test values (200,3300,5300)
    insert into test values (4400,1200,3500)
    insert into test values (5400,5600,3100)
    i want the output as 100 and 5700.. how can i achieve this in a single query. Please through some light on this topic..!
    Thanking you in advance
    Regards,
    Balaji Prasad B

    Balaji - BI Developer

    DB:3.03:Min And Max Values From Entire Table kz

    Below is an example with a subquery for each of the queries Mohammad posted in order to return both min and max in a single result set.
    SELECT ( SELECT MAX(Maxx) AS Maxx
    FROM test UNPIVOT
    ( Maxx FOR E IN ( Sal1, Sal2, Sal3 ) ) AS unpvt
    ) AS Maxx
    , ( SELECT MIN(Minn) Minn
    FROM test UNPIVOT
    ( Minn FOR E IN ( Sal1, Sal2, Sal3 ) ) AS unpvt
    ) AS Minxx;

    Dan Guzman, SQL Server MVP, http://www.dbdelta.com

  • RELEVANCY SCORE 3.03

    DB:3.03:Removing Gridlines In Excel z7



    I am using ODS tagsets.excelxp to output data into excel.

    There are two tables that are generated using PROC REPORT.

    I am using style for both the table to supress the borderlines.

    The first table / PROC REPORT has only two columns and the

    second one has 5 columns.

    PROBLEM:

    Borders are invisible only in the first two columns shown by table 1 and I want to remove borders from the 3rd 4th and 5th column as well from the first table.

    This is because it should be consistent with the second table.

    DB:3.03:Removing Gridlines In Excel z7


    Hi:

    Web Report Studio will NOT use your custom style -- unless you are deploying the style as a CSS definition in the XML that runs on the web tier. Web Report Studio only has 4 styles that it uses by default: FESTIVAL, MEADOW, PLATEAU and SEASIDE.

    When you run a stored process in Web Report Studio, your output is generated as SASReport XML -- borders and gridlines on the WRS screen are controlled by the interaction between the SASReport XML and the CSS version of the styles that are defined specifically for WRS.

    When you do an "Export to Excel" from within WRS, the export happens using WRS and Java technology. There is a huge difference between running TAGSETS.EXCELXP code in local SAS or in EG and running a stored process in Web Report Studio. My recommendation is that you work with Tech Support on this question.

    cynthia

  • RELEVANCY SCORE 3.03

    DB:3.03:Mb5b T.Code mx



    Hi friends,

    i want to add material group in selection-screen. of t.code mb5b.

    (means In input area).

    And also want to display output according to material groupwise.

    i alsready converted standard program into Z programm but i don't find where they r selecting data which is display in output.

    I also don't find internal table.

    So how can i add material group?

    so plz send me reply its argent.

    Thanks in advance.

    DB:3.03:Mb5b T.Code mx


    I don't ask for making transaction code i want how to add material group field in input and output.

  • RELEVANCY SCORE 3.03

    DB:3.03:Code Problem 98



    i want to display all po,s with all grs from requistion up to inspection. if for a po gr not happend or inspection not happend it must also display leaving blank for that po. actual flow is pur.reqpur.ordergoods receipt---quality inspection. once u copy this code and execute it. u will get better idea.

    regards!

    prasad.

    REPORT Z_MM_REQDETAILS1.

    TABLES: EKKO, EKPO, MSEG, QALS, EBAN, MKPF, MAKT.

    TYPE-POOLS: SLIS.

    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME.

    SELECT-OPTIONS: SBADAT FOR EBAN-BADAT,

    SLIFNR FOR EKKO-LIFNR,

    SEBELN FOR EKKO-EBELN,

    SBEDAT FOR EKKO-BEDAT,

    SBSART FOR EKKO-BSART,

    SMATNR FOR EKPO-MATNR,

    SBUDAT FOR MKPF-BUDAT.

    SELECTION-SCREEN END OF BLOCK B1.

    DATA: BEGIN OF EBAN_TAB OCCURS 0,

    BANFN LIKE EBAN-BANFN,

    BADAT LIKE EBAN-BADAT,

    MENGE LIKE EBAN-MENGE,

    EBELN LIKE EBAN-EBELN,

    AFNAM LIKE EBAN-AFNAM,

    END OF EBAN_TAB.

    DATA: BEGIN OF EKKO_TAB OCCURS 0,

    BSART LIKE EKKO-BSART,

    EBELN LIKE EKKO-EBELN,

    LIFNR LIKE EKKO-LIFNR,

    BEDAT LIKE EKKO-BEDAT,

    END OF EKKO_TAB.

    DATA: BEGIN OF EKPO_TAB OCCURS 0,

    EBELN LIKE EKPO-EBELN,

    MENGE LIKE EKPO-MENGE,

    MATNR LIKE EKPO-MATNR,

    BANFN LIKE EKPO-BANFN,

    EBELP LIKE EKPO-EBELP,

    END OF EKPO_TAB.

    DATA: BEGIN OF MSEG_TAB OCCURS 0,

    EBELN LIKE MSEG-EBELN,

    MBLNR LIKE MSEG-MBLNR,

    MATNR LIKE MSEG-MATNR,

    MENGE LIKE MSEG-MENGE,

    EBELP LIKE MSEG-EBELP,

    END OF MSEG_TAB.

    DATA: BEGIN OF MSEG_TAB1 OCCURS 0,

    MBLNR LIKE MSEG-MBLNR,

    EBELN LIKE MSEG-EBELN,

    END OF MSEG_TAB1.

    DATA: BEGIN OF QALS_TAB OCCURS 0,

    LMENGE01 LIKE QALS-LMENGE01,

    LMENGE07 LIKE QALS-LMENGE07,

    MATNR LIKE QALS-MATNR,

    MBLNR LIKE QALS-MBLNR,

    EBELN LIKE QALS-EBELN,

    EBELP LIKE QALS-EBELP,

    END OF QALS_TAB.

    DATA: BEGIN OF MKPF_TAB OCCURS 0,

    MBLNR LIKE MKPF-MBLNR,

    BUDAT LIKE MKPF-BUDAT,

    END OF MKPF_TAB.

    DATA: BEGIN OF MAKT_TAB OCCURS 0,

    MATNR LIKE MAKT-MATNR,

    MAKTX LIKE MAKT-MAKTX,

    END OF MAKT_TAB.

    DATA: BEGIN OF SELTAB OCCURS 0,

    EBELN LIKE EKKO-EBELN,

    BLDAT LIKE MKPF-BLDAT,

    END OF SELTAB.

    *DATA: BEGIN OF SELTAB1 OCCURS 0,

    BUDAT LIKE MKPF-BUDAT,

    END OF SELTAB1.

    DATA: REPID LIKE SY-REPID.

    DATA: F_OUTPUT1 TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE.

    DATA: IT_SORT TYPE SLIS_T_SORTINFO_ALV WITH HEADER LINE.

    DATA: REMARKS(40) TYPE C.

    DATA: BEGIN OF OUTPUT OCCURS 0,

    BANFN LIKE EBAN-BANFN,

    BADAT LIKE EBAN-BADAT,

    RMENGE LIKE EBAN-MENGE,

    AFNAM LIKE EBAN-AFNAM,

    BSART LIKE EKKO-BSART,

    EBELN LIKE EKKO-EBELN,

    LIFNR LIKE EKKO-LIFNR,

    BEDAT LIKE EKKO-BEDAT,

    PMENGE LIKE EKPO-MENGE,

    MATNR LIKE EKPO-MATNR,

    EBELP LIKE EKPO-EBELP,

    MBLNR LIKE MSEG-MBLNR,

    GMENGE LIKE MSEG-MENGE,

    LMENGE01 LIKE QALS-LMENGE01,

    LMENGE07 LIKE QALS-LMENGE07,

    BUDAT LIKE MKPF-BUDAT,

    MAKTX LIKE MAKT-MAKTX,

    REMARKS(40) TYPE C,

    SL_NO LIKE SY-TABIX,

    END OF OUTPUT.

    START-OF-SELECTION.

    IF SEBELN IS NOT INITIAL OR SLIFNR IS NOT INITIAL OR SBEDAT IS NOT INITIAL OR SBSART IS NOT INITIAL.

    SELECT EBELN

    BSART

    LIFNR

    BEDAT FROM EKKO INTO CORRESPONDING FIELDS OF TABLE EKKO_TAB WHERE EBELN IN SEBELN AND LIFNR IN SLIFNR AND BEDAT IN SBEDAT AND

    BSART IN SBSART.

    ELSEIF SBADAT IS NOT INITIAL.

    SELECT EBELN

    BANFN

    BADAT

    MENGE

    AFNAM FROM EBAN INTO CORRESPONDING FIELDS OF TABLE EBAN_TAB where BADAT IN SBADAT.

    SORT EBAN_TAB BY BADAT ASCENDING.

    select ebeln lifnr bedat bsart from ekko into corresponding fields of table ekko_tab for all entries in eban_tab where ebeln = eban_tab-ebeln.

    ELSEIF SMATNR IS NOT INITIAL.

    SELECT EBELN

    EBELP

    FROM EKPO INTO CORRESPONDING FIELDS OF TABLE SELTAB

    WHERE MATNR IN SMATNR.

    SORT SELTAB BY EBELN ASCENDING.

    DELETE ADJACENT DUPLICATES FROM SELTAB COMPARING EBELN.

    SELECT EBELN

    BSART

    BEDAT

    LIFNR FROM EKKO INTO CORRESPONDING FIELDS OF TABLE EKKO_TAB

    FOR ALL ENTRIES IN SELTAB WHERE EBELN = SELTAB-EBELN.

    ELSEIF SBUDAT IS NOT INITIAL.

    SELECT BUDAT

    MBLNR FROM MKPF INTO CORRESPONDING FIELDS OF TABLE MKPF_TAB WHERE

    BUDAT IN SBUDAT.

    sort mkpf_tab by budat ascending.

    SELECT EBELN FROM MSEG INTO CORRESPONDING FIELDS OF TABLE SELTAB FOR ALL ENTRIES IN

    MKPF_TAB WHERE MBLNR = MKPF_TAB-MBLNR.

    *SELECT EBELN

    FROM QALS INTO CORRESPONDING FIELDS OF TABLE SELTAB FOR ALL ENTRIES IN SELTAB WHERE EBELN = SELTAB-EBELN.

    SORT SELTAB BY EBELN ASCENDING.

    DELETE ADJACENT DUPLICATES FROM SELTAB COMPARING EBELN.

    SELECT EBELN

    BEDAT

    LIFNR

    BSART FROM EKKO INTO CORRESPONDING FIELDS OF TABLE EKKO_TAB

    FOR ALL ENTRIES IN SELTAB WHERE EBELN = SELTAB-EBELN.

    ENDIF.

    SELECT EBELN

    MENGE

    MATNR

    EBELP FROM EKPO INTO CORRESPONDING FIELDS OF TABLE EKPO_TAB FOR ALL ENTRIES IN EKKO_TAB WHERE EBELN = EKKO_TAB-EBELN AND

    MATNR IN SMATNR.

    SELECT EBELN

    BANFN

    BADAT

    MENGE

    AFNAM FROM EBAN INTO CORRESPONDING FIELDS OF TABLE EBAN_TAB FOR ALL ENTRIES IN EKKO_TAB WHERE EBELN = EKKO_TAB-EBELN AND

    BADAT IN SBADAT.

    SELECT EBELN

    MBLNR

    MATNR

    MENGE

    EBELP

    FROM MSEG INTO CORRESPONDING FIELDS OF TABLE MSEG_TAB FOR ALL ENTRIES IN EKPO_TAB WHERE EBELN = EKPO_TAB-EBELN AND

    MATNR = EKPO_TAB-MATNR AND

    EBELP = EKPO_TAB-EBELP AND

    BWART IN ('101','105').

    SELECT LMENGE01

    LMENGE07

    MATNR

    MBLNR

    EBELN FROM QALS INTO CORRESPONDING FIELDS OF TABLE QALS_TAB FOR ALL ENTRIES IN MSEG_TAB WHERE MBLNR = MSEG_TAB-MBLNR AND

    MATNR = MSEG_TAB-MATNR AND

    EBELN = MSEG_TAB-EBELN AND

    EBELP = MSEG_TAB-EBELP.

    SELECT MBLNR

    BUDAT FROM MKPF INTO CORRESPONDING FIELDS OF TABLE MKPF_TAB FOR ALL ENTRIES IN MSEG_TAB WHERE MBLNR = MSEG_TAB-MBLNR AND BUDAT

    IN SBUDAT.

    SELECT MATNR

    MAKTX FROM MAKT INTO CORRESPONDING FIELDS OF TABLE MAKT_TAB FOR ALL ENTRIES IN EKPO_TAB WHERE MATNR = EKPO_TAB-MATNR.

    *LOOP AT OUTPUT.

    **LOOP AT EKKO_TAB.

    **read table EKKO_TAB with key ebeln = output-ebeln.

    **if sy-subrc = 0.

    *READ TABLE EKPO_TAB WITH KEY EBELN = EKKO_TAB-EBELN.

    *IF SY-SUBRC = 0.

    *READ TABLE MSEG_TAB WITH KEY EBELN = EKPO_TAB-EBELN MATNR = EKPO_TAB-MATNR.

    *IF SY-SUBRC = 0.

    *

    **READ TABLE QALS_TAB WITH KEY MBLNR = MSEG_TAB-MBLNR MATNR = MSEG_TAB-MATNR EBELN = MSEG_TAB-EBELN.

    **IF SY-SUBRC = 0.

    *

    o OUTPUT-EBELN = EKKO_TAB-EBELN.

    o OUTPUT-BSART = EKKO_TAB-BSART.

    o OUTPUT-LIFNR = EKKO_TAB-LIFNR.

    o OUTPUT-BEDAT = EKKO_TAB-BEDAT.

    OUTPUT-PMENGE = EKPO_TAB-MENGE.

    OUTPUT-MATNR = EKPO_TAB-MATNR.

    OUTPUT-MBLNR = MSEG_TAB-MBLNR.

    OUTPUT-GMENGE = MSEG_TAB-MENGE.

    o OUTPUT-LMENGE01 = QALS_TAB-LMENGE01.

    o OUTPUT-LMENGE07 = QALS_TAB-LMENGE07.

    modify OUTPUT transporting pmenge matnr MBLNR GMENGE.

    **APPEND OUTPUT.

    *ENDIF.

    *ENDIF.

    *

    *ENDLOOP.

    *

    LOOP AT EKKO_TAB.

    LOOP AT EKPO_TAB WHERE EBELN = EKKO_TAB-EBELN.

    LOOP AT MSEG_TAB WHERE EBELN = OUTPUT-EBELN AND MATNR = output-MATNR AND EBELP = OUTPUT-EBELP.

    OUTPUT-EBELN = EKKO_TAB-EBELN.

    OUTPUT-BSART = EKKO_TAB-BSART.

    OUTPUT-LIFNR = EKKO_TAB-LIFNR.

    OUTPUT-BEDAT = EKKO_TAB-BEDAT.

    OUTPUT-PMENGE = EKPO_TAB-MENGE.

    OUTPUT-MATNR = EKPO_TAB-MATNR.

    OUTPUT-EBELP = EKPO_TAB-EBELP.

    APPEND OUTPUT.

    CLEAR OUTPUT.

    ENDLOOP.

    ENDLOOP.

    *LOOP AT OUTPUT.

    *LOOP AT EKPO_TAB WHERE EBELN = OUTPUT-EBELN.

    OUTPUT-PMENGE = EKPO_TAB-MENGE.

    OUTPUT-MATNR = EKPO_TAB-MATNR.

    OUTPUT-EBELP = EKPO_TAB-EBELP.

    *MODIFY OUTPUT TRANSPORTING PMENGE MATNR EBELP.

    *ENDLOOP.

    *ENDLOOP.

    LOOP AT OUTPUT.

    LOOP AT MSEG_TAB WHERE EBELN = OUTPUT-EBELN AND MATNR = OUTPUT-MATNR AND EBELP = OUTPUT-EBELP.

    *LOOP AT QALS_TAB WHERE MBLNR = MSEG_TAB-MBLNR AND MATNR = OUTPUT-MATNR AND EBELN = OUTPUT-EBELN AND EBELP = OUTPUT-EBELP.

    OUTPUT-MBLNR = MSEG_TAB-MBLNR.

    OUTPUT-GMENGE = MSEG_TAB-MENGE.

    OUTPUT-LMENGE01 = QALS_TAB-LMENGE01.

    OUTPUT-LMENGE07 = QALS_TAB-LMENGE07.

    OUTPUT-EBELP = QALS_TAB-EBELP.

    *APPEND OUTPUT.

    MODIFY OUTPUT TRANSPORTING MBLNR GMENGE.

    *CLEAR OUTPUT.

    *CLEAR MSEG_TAB.

    ENDLOOP.

    ENDLOOP.

    *ENDLOOP.

    LOOP AT OUTPUT.

    LOOP AT QALS_TAB WHERE MBLNR = OUTPUT-MBLNR AND MATNR = OUTPUT-MATNR AND EBELN = OUTPUT-EBELN.

    OUTPUT-LMENGE01 = QALS_TAB-LMENGE01.

    OUTPUT-LMENGE07 = QALS_TAB-LMENGE07.

    OUTPUT-EBELP = QALS_TAB-EBELP.

    MODIFY OUTPUT TRANSPORTING LMENGE01 LMENGE07.

    ENDLOOP.

    ENDLOOP.

    LOOP AT OUTPUT.

    LOOP AT EBAN_TAB WHERE EBELN = OUTPUT-EBELN.

    OUTPUT-BANFN = EBAN_TAB-BANFN.

    OUTPUT-BADAT = EBAN_TAB-BADAT.

    OUTPUT-RMENGE = EBAN_TAB-MENGE.

    OUTPUT-AFNAM = EBAN_TAB-AFNAM.

    MODIFY OUTPUT TRANSPORTING BANFN BADAT RMENGE AFNAM.

    ENDLOOP.

    ENDLOOP.

    LOOP AT OUTPUT.

    LOOP AT MKPF_TAB WHERE MBLNR = OUTPUT-MBLNR.

    OUTPUT-BUDAT = MKPF_TAB-BUDAT.

    MODIFY OUTPUT TRANSPORTING BUDAT.

    ENDLOOP.

    ENDLOOP.

    *LOOP AT OUTPUT.

    *

    *SELECT SINGLE MATNR FROM EKPO INTO OUTPUT-MATNR WHERE EBELN = OUTPUT-EBELN.

    *MODIFY OUTPUT TRANSPORTING MATNR.

    *

    *SELECT SINGLE MBLNR FROM MSEG INTO OUTPUT-MBLNR WHERE MATNR = OUTPUT-MATNR.

    *MODIFY OUTPUT TRANSPORTING MBLNR.

    *ENDLOOP.

    LOOP AT OUTPUT.

    LOOP AT MAKT_TAB WHERE MATNR = OUTPUT-MATNR.

    OUTPUT-MAKTX = MAKT_TAB-MAKTX.

    MODIFY OUTPUT TRANSPORTING MAKTX.

    ENDLOOP.

    ENDLOOP.

    *LOOP AT EKKO_TAB.

    LOOP AT EKPO_TAB WHERE EBELN = EKKO_TAB-EBELN.

    o LOOP AT MSEG_TAB WHERE EBELN = EKPO_TAB-EBELN AND MATNR = EKPO_TAB-MATNR.

    o LOOP AT QALS_TAB WHERE MBLNR = MSEG_TAB-MBLNR AND MATNR = MSEG_TAB-MATNR AND EBELN = MSEG_TAB-EBELN.

    o LOOP AT MKPF_TAB WHERE MBLNR = MSEG_TAB-MBLNR.

    OUTPUT-EBELN = EKKO_TAB-EBELN.

    OUTPUT-BSART = EKKO_TAB-BSART.

    OUTPUT-LIFNR = EKKO_TAB-LIFNR.

    OUTPUT-BEDAT = EKKO_TAB-BEDAT.

    OUTPUT-PMENGE = EKPO_TAB-MENGE.

    OUTPUT-MATNR = EKPO_TAB-MATNR.

    OUTPUT-EBELP = EKPO_TAB-EBELP.

    o OUTPUT-MBLNR = MSEG_TAB-MBLNR.

    o OUTPUT-GMENGE = MSEG_TAB-MENGE.

    o OUTPUT-BUDAT = MKPF_TAB-BUDAT.

    o OUTPUT-LMENGE01 = QALS_TAB-LMENGE01.

    o OUTPUT-LMENGE07 = QALS_TAB-LMENGE07.

    o MODIFY OUTPUT TRANSPORTING BSART LIFNR BEDAT PMENGE MATNR.

    APPEND OUTPUT.

    CLEAR OUTPUT.

    o CLEAR QALS_TAB.

    o ENDLOOP.

    o CLEAR MKPF_TAB.

    o ENDLOOP.

    o CLEAR MSEG_TAB.

    o ENDLOOP.

    CLEAR EKPO_TAB.

    ENDLOOP.

    CLEAR EKKO_TAB.

    ENDLOOP.

    *

    *

    *

    *

    **SELECT MBLNR EBELN FROM MSEG INTO TABLE MSEG_TAB1 FOR ALL ENTRIES IN EKKO_TAB WHERE EBELN = EKKO_TAB-EBELN.

    **

    *

    o LOOP AT OUTPUT.

    o MOVE-CORRESPONDING MSEG_TAB1 TO OUTPUT.

    o OUTPUT-MBLNR = MSEG_TAB1-MBLNR.

    o MODIFY OUTPUT TRANSPORTING MBLNR.

    o ENDLOOP.

    *

    *

    *

    *

    *

    *

    *LOOP AT OUTPUT.

    LOOP AT MSEG_TAB WHERE EBELN = output-EBELN AND MATNR = output-MATNR AND EBELP = OUTPUT-EBELP.

    **READ TABLE MSEG_TAB WITH KEY EBELN = OUTPUT-EBELN MATNR = OUTPUT-MATNR.

    *IF SY-SUBRC = 0.

    OUTPUT-MBLNR = MSEG_TAB-MBLNR.

    OUTPUT-GMENGE = MSEG_TAB-MENGE.

    *MODIFY OUTPUT TRANSPORTING MBLNR GMENGE.

    *ENDIF.

    *clear output.

    *ENDLOOP.

    *endloop.

    *

    *

    *

    *LOOP AT OUTPUT.

    READ TABLE QALS_TAB WITH KEY MBLNR = OUTPUT-MBLNR MATNR = OUTPUT-MATNR EBELN = OUTPUT-EBELN.

    *IF SY-SUBRC = 0.

    *OUTPUT-LMENGE01 = QALS_TAB-LMENGE01.

    *OUTPUT-LMENGE07 = QALS_TAB-LMENGE07.

    *

    *MODIFY OUTPUT TRANSPORTING LMENGE01 LMENGE07.

    *ENDIF.

    *ENDLOOP.

    *

    *

    *

    *

    LOOP AT OUTPUT.

    READ TABLE EBAN_TAB WITH KEY EBELN = OUTPUT-EBELN.

    IF SY-SUBRC = 0.

    OUTPUT-BANFN = EBAN_TAB-BANFN.

    OUTPUT-BADAT = EBAN_TAB-BADAT.

    OUTPUT-RMENGE = EBAN_TAB-MENGE.

    OUTPUT-AFNAM = EBAN_TAB-AFNAM.

    MODIFY OUTPUT TRANSPORTING BANFN BADAT RMENGE AFNAM.

    ENDIF.

    ENDLOOP.

    *

    *

    *

    *

    *

    *

    *

    *

    *

    *LOOP AT OUTPUT.

    *

    READ TABLE MKPF_TAB WITH KEY MBLNR = OUTPUT-MBLNR.

    IF SY-SUBRC = 0.

    OUTPUT-BUDAT = MKPF_TAB-BUDAT.

    MODIFY OUTPUT TRANSPORTING BUDAT.

    ENDIF.

    ENDLOOP.

    *

    *

    *

    *

    *

    *

    *LOOP AT OUTPUT.

    *READ TABLE MAKT_TAB WITH KEY MATNR = OUTPUT-MATNR.

    *IF SY-SUBRC = 0.

    *OUTPUT-MAKTX = MAKT_TAB-MAKTX.

    *MODIFY OUTPUT TRANSPORTING MAKTX.

    *ENDIF.

    *ENDLOOP.

    PERFORM F_OUTPUT.

    PERFORM SORT.

    PERFORM GRID.

    FORM F_OUTPUT.

    F_OUTPUT1-FIELDNAME = 'MATNR'.

    F_OUTPUT1-REF_TABNAME = 'EKPO'.

    F_OUTPUT1-REF_FIELDNAME = 'MATNR'.

    APPEND F_OUTPUT1.

    CLEAR F_OUTPUT1.

    F_OUTPUT1-FIELDNAME ='MAKTX'.

    F_OUTPUT1-SELTEXT_M = 'DESCRIPTION.'.

    APPEND F_OUTPUT1.

    CLEAR F_OUTPUT1.

    F_OUTPUT1-FIELDNAME = 'LIFNR'.

    F_OUTPUT1-REF_TABNAME = 'EKKO'.

    F_OUTPUT1-REF_FIELDNAME = 'LIFNR'.

    F_OUTPUT1-SELTEXT_M = 'SUPPLIER'.

    APPEND F_OUTPUT1.

    CLEAR F_OUTPUT1.

    F_OUTPUT1-FIELDNAME = 'AFNAM'.

    F_OUTPUT1-REF_TABNAME = 'EBAN'.

    F_OUTPUT1-REF_FIELDNAME = 'AFNAM'.

    APPEND F_OUTPUT1.

    CLEAR F_OUTPUT1.

    F_OUTPUT1-FIELDNAME = 'BANFN'.

    F_OUTPUT1-REF_TABNAME = 'EBAN'.

    F_OUTPUT1-REF_FIELDNAME = 'BANFN'.

    APPEND F_OUTPUT1.

    CLEAR F_OUTPUT1.

    F_OUTPUT1-FIELDNAME = 'BADAT'.

    F_OUTPUT1-SELTEXT_M = 'PRS DATE'.

    F_OUTPUT1-REF_TABNAME = 'EBAN'.

    F_OUTPUT1-REF_FIELDNAME = 'BADAT'.

    APPEND F_OUTPUT1.

    CLEAR F_OUTPUT1.

    F_OUTPUT1-FIELDNAME ='RMENGE'.

    *F_OUTPUT1-REF_TABNAME = 'MSEG'.

    *F_OUTPUT1-REF_FIELDNAME = 'MBLNR'.

    F_OUTPUT1-SELTEXT_M = 'PRS QTY'.

    APPEND F_OUTPUT1.

    CLEAR F_OUTPUT1.

    F_OUTPUT1-FIELDNAME = 'EBELN'.

    F_OUTPUT1-REF_TABNAME = 'EKKO'.

    F_OUTPUT1-REF_FIELDNAME = 'EBELN'.

    APPEND F_OUTPUT1.

    CLEAR F_OUTPUT1.

    F_OUTPUT1-FIELDNAME = 'BSART'.

    F_OUTPUT1-REF_TABNAME = 'EKKO'.

    F_OUTPUT1-REF_FIELDNAME = 'BSART'.

    APPEND F_OUTPUT1.

    CLEAR F_OUTPUT1.

    F_OUTPUT1-FIELDNAME = 'BEDAT'.

    F_OUTPUT1-REF_TABNAME = 'EKKO'.

    F_OUTPUT1-REF_FIELDNAME = 'BEDAT'.

    F_OUTPUT1-SELTEXT_M = 'PO DATE'.

    APPEND F_OUTPUT1.

    CLEAR F_OUTPUT1.

    F_OUTPUT1-FIELDNAME ='PMENGE'.

    F_OUTPUT1-SELTEXT_M = 'PO QTY'.

    APPEND F_OUTPUT1.

    CLEAR F_OUTPUT1.

    F_OUTPUT1-FIELDNAME = 'MBLNR'.

    F_OUTPUT1-REF_TABNAME = 'MSEG'.

    F_OUTPUT1-REF_FIELDNAME = 'MBLNR'.

    F_OUTPUT1-SELTEXT_M = 'GR NUMBER'.

    APPEND F_OUTPUT1.

    CLEAR F_OUTPUT1.

    F_OUTPUT1-FIELDNAME ='BUDAT'.

    F_OUTPUT1-SELTEXT_M = 'GR DATE'.

    APPEND F_OUTPUT1.

    CLEAR F_OUTPUT1.

    F_OUTPUT1-FIELDNAME ='GMENGE'.

    *F_OUTPUT1-REF_TABNAME = 'MSEG'.

    *F_OUTPUT1-REF_FIELDNAME = 'MBLNR'.

    F_OUTPUT1-SELTEXT_M = 'RECEIVED QTY'.

    APPEND F_OUTPUT1.

    CLEAR F_OUTPUT1.

    F_OUTPUT1-FIELDNAME = 'LMENGE01'.

    F_OUTPUT1-REF_TABNAME = 'QALS'.

    F_OUTPUT1-REF_FIELDNAME = 'LMENGE01'.

    F_OUTPUT1-SELTEXT_M = 'ACCEPTED QTY'.

    APPEND F_OUTPUT1.

    CLEAR F_OUTPUT1.

    F_OUTPUT1-FIELDNAME = 'LMENGE07'.

    F_OUTPUT1-REF_TABNAME = 'QALS'.

    F_OUTPUT1-REF_FIELDNAME = 'LMENGE07'.

    F_OUTPUT1-SELTEXT_M = 'REJECTED QTY'.

    APPEND F_OUTPUT1.

    CLEAR F_OUTPUT1.

    *

    F_OUTPUT1-FIELDNAME ='REMARKS'.

    **F_OUTPUT1-REF_TABNAME = 'MSEG'.

    **F_OUTPUT1-REF_FIELDNAME = 'MBLNR'.

    F_OUTPUT1-SELTEXT_M = 'REMARKS'.

    APPEND F_OUTPUT1.

    CLEAR F_OUTPUT1.

    ENDFORM.

    FORM SORT.

    IT_SORT-FIELDNAME = 'MATNR'.

    IT_SORT-UP = 'X'.

    APPEND IT_SORT.

    CLEAR IT_SORT.

    IT_SORT-FIELDNAME = 'MAKTX'.

    IT_SORT-UP = 'X'.

    APPEND IT_SORT.

    CLEAR IT_SORT.

    IT_SORT-FIELDNAME = 'LIFNR'.

    IT_SORT-UP = 'X'.

    APPEND IT_SORT.

    CLEAR IT_SORT.

    IT_SORT-FIELDNAME = 'AFNAM'.

    IT_SORT-UP = 'X'.

    APPEND IT_SORT.

    CLEAR IT_SORT.

    IT_SORT-FIELDNAME = 'BANFN'.

    IT_SORT-UP = 'X'.

    APPEND IT_SORT.

    CLEAR IT_SORT.

    IT_SORT-FIELDNAME = 'BADAT'.

    IT_SORT-UP = 'X'.

    APPEND IT_SORT.

    CLEAR IT_SORT.

    IT_SORT-FIELDNAME = 'RMENGE'.

    IT_SORT-UP = 'X'.

    APPEND IT_SORT.

    CLEAR IT_SORT.

    IT_SORT-FIELDNAME = 'EBELN'.

    IT_SORT-UP = 'X'.

    APPEND IT_SORT.

    CLEAR IT_SORT.

    IT_SORT-FIELDNAME = 'BSART'.

    IT_SORT-UP = 'X'.

    APPEND IT_SORT.

    CLEAR IT_SORT.

    IT_SORT-FIELDNAME = 'BEDAT'.

    IT_SORT-UP = 'X'.

    APPEND IT_SORT.

    CLEAR IT_SORT.

    IT_SORT-FIELDNAME = 'PMENGE'.

    IT_SORT-UP = 'X'.

    APPEND IT_SORT.

    CLEAR IT_SORT.

    IT_SORT-FIELDNAME = 'MBLNR'.

    IT_SORT-UP = 'X'.

    APPEND IT_SORT.

    CLEAR IT_SORT.

    IT_SORT-FIELDNAME = 'BUDAT'.

    IT_SORT-UP = 'X'.

    APPEND IT_SORT.

    CLEAR IT_SORT.

    IT_SORT-FIELDNAME = 'GMENGE'.

    IT_SORT-UP = 'X'.

    APPEND IT_SORT.

    CLEAR IT_SORT.

    IT_SORT-FIELDNAME = 'LMENGE01'.

    IT_SORT-UP = 'X'.

    APPEND IT_SORT.

    CLEAR IT_SORT.

    IT_SORT-FIELDNAME = 'LMENGE07'.

    IT_SORT-UP = 'X'.

    APPEND IT_SORT.

    CLEAR IT_SORT.

    ENDFORM.

    FORM GRID.

    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

    EXPORTING

    I_INTERFACE_CHECK = ' '

    I_BYPASSING_BUFFER = ' '

    I_BUFFER_ACTIVE = ' '

    I_CALLBACK_PROGRAM = 'REPID'

    I_CALLBACK_PF_STATUS_SET = ' '

    I_CALLBACK_USER_COMMAND = ' '

    I_CALLBACK_TOP_OF_PAGE = ' '

    I_CALLBACK_HTML_TOP_OF_PAGE = ' '

    I_CALLBACK_HTML_END_OF_LIST = ' '

    I_STRUCTURE_NAME =

    I_BACKGROUND_ID = ' '

    I_GRID_TITLE =

    I_GRID_SETTINGS =

    IS_LAYOUT =

    IT_FIELDCAT = F_OUTPUT1[]

    IT_EXCLUDING =

    IT_SPECIAL_GROUPS =

    IT_SORT =

    IT_FILTER =

    IS_SEL_HIDE =

    I_DEFAULT = 'X'

    I_SAVE = ' '

    IS_VARIANT =

    IT_EVENTS =

    IT_EVENT_EXIT =

    IS_PRINT =

    IS_REPREP_ID =

    I_SCREEN_START_COLUMN = 0

    I_SCREEN_START_LINE = 0

    I_SCREEN_END_COLUMN = 0

    I_SCREEN_END_LINE = 0

    I_HTML_HEIGHT_TOP = 0

    I_HTML_HEIGHT_END = 0

    IT_ALV_GRAPHICS =

    IT_HYPERLINK =

    IT_ADD_FIELDCAT =

    IT_EXCEPT_QINFO =

    IR_SALV_FULLSCREEN_ADAPTER =

    IMPORTING

    E_EXIT_CAUSED_BY_CALLER =

    ES_EXIT_CAUSED_BY_USER =

    TABLES

    T_OUTTAB = OUTPUT[].

    EXCEPTIONS

    PROGRAM_ERROR = 1

    OTHERS = 2

    .

    IF SY-SUBRC 0.

    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

    ENDIF.

    ENDFORM.

    DB:3.03:Code Problem 98


    i want to display all po,s with all grs from requistion up to inspection. if for a po gr not happend or inspection not happend it must also display leaving blank for that po. actual flow is pur.reqpur.ordergoods receipt---quality inspection. once u copy this code and execute it. u will get better idea.

    regards!

    prasad.

    REPORT Z_MM_REQDETAILS1.

    TABLES: EKKO, EKPO, MSEG, QALS, EBAN, MKPF, MAKT.

    TYPE-POOLS: SLIS.

    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME.

    SELECT-OPTIONS: SBADAT FOR EBAN-BADAT,

    SLIFNR FOR EKKO-LIFNR,

    SEBELN FOR EKKO-EBELN,

    SBEDAT FOR EKKO-BEDAT,

    SBSART FOR EKKO-BSART,

    SMATNR FOR EKPO-MATNR,

    SBUDAT FOR MKPF-BUDAT.

    SELECTION-SCREEN END OF BLOCK B1.

    DATA: BEGIN OF EBAN_TAB OCCURS 0,

    BANFN LIKE EBAN-BANFN,

    BADAT LIKE EBAN-BADAT,

    MENGE LIKE EBAN-MENGE,

    EBELN LIKE EBAN-EBELN,

    AFNAM LIKE EBAN-AFNAM,

    END OF EBAN_TAB.

    DATA: BEGIN OF EKKO_TAB OCCURS 0,

    BSART LIKE EKKO-BSART,

    EBELN LIKE EKKO-EBELN,

    LIFNR LIKE EKKO-LIFNR,

    BEDAT LIKE EKKO-BEDAT,

    END OF EKKO_TAB.

    DATA: BEGIN OF EKPO_TAB OCCURS 0,

    EBELN LIKE EKPO-EBELN,

    MENGE LIKE EKPO-MENGE,

    MATNR LIKE EKPO-MATNR,

    BANFN LIKE EKPO-BANFN,

    EBELP LIKE EKPO-EBELP,

    END OF EKPO_TAB.

    DATA: BEGIN OF MSEG_TAB OCCURS 0,

    EBELN LIKE MSEG-EBELN,

    MBLNR LIKE MSEG-MBLNR,

    MATNR LIKE MSEG-MATNR,

    MENGE LIKE MSEG-MENGE,

    EBELP LIKE MSEG-EBELP,

    END OF MSEG_TAB.

    DATA: BEGIN OF MSEG_TAB1 OCCURS 0,

    MBLNR LIKE MSEG-MBLNR,

    EBELN LIKE MSEG-EBELN,

    END OF MSEG_TAB1.

    DATA: BEGIN OF QALS_TAB OCCURS 0,

    LMENGE01 LIKE QALS-LMENGE01,

    LMENGE07 LIKE QALS-LMENGE07,

    MATNR LIKE QALS-MATNR,

    MBLNR LIKE QALS-MBLNR,

    EBELN LIKE QALS-EBELN,

    EBELP LIKE QALS-EBELP,

    END OF QALS_TAB.

    DATA: BEGIN OF MKPF_TAB OCCURS 0,

    MBLNR LIKE MKPF-MBLNR,

    BUDAT LIKE MKPF-BUDAT,

    END OF MKPF_TAB.

    DATA: BEGIN OF MAKT_TAB OCCURS 0,

    MATNR LIKE MAKT-MATNR,

    MAKTX LIKE MAKT-MAKTX,

    END OF MAKT_TAB.

    DATA: BEGIN OF SELTAB OCCURS 0,

    EBELN LIKE EKKO-EBELN,

    BLDAT LIKE MKPF-BLDAT,

    END OF SELTAB.

    *DATA: BEGIN OF SELTAB1 OCCURS 0,

    BUDAT LIKE MKPF-BUDAT,

    END OF SELTAB1.

    DATA: REPID LIKE SY-REPID.

    DATA: F_OUTPUT1 TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE.

    DATA: IT_SORT TYPE SLIS_T_SORTINFO_ALV WITH HEADER LINE.

    DATA: REMARKS(40) TYPE C.

    DATA: BEGIN OF OUTPUT OCCURS 0,

    BANFN LIKE EBAN-BANFN,

    BADAT LIKE EBAN-BADAT,

    RMENGE LIKE EBAN-MENGE,

    AFNAM LIKE EBAN-AFNAM,

    BSART LIKE EKKO-BSART,

    EBELN LIKE EKKO-EBELN,

    LIFNR LIKE EKKO-LIFNR,

    BEDAT LIKE EKKO-BEDAT,

    PMENGE LIKE EKPO-MENGE,

    MATNR LIKE EKPO-MATNR,

    EBELP LIKE EKPO-EBELP,

    MBLNR LIKE MSEG-MBLNR,

    GMENGE LIKE MSEG-MENGE,

    LMENGE01 LIKE QALS-LMENGE01,

    LMENGE07 LIKE QALS-LMENGE07,

    BUDAT LIKE MKPF-BUDAT,

    MAKTX LIKE MAKT-MAKTX,

    REMARKS(40) TYPE C,

    SL_NO LIKE SY-TABIX,

    END OF OUTPUT.

    START-OF-SELECTION.

    IF SEBELN IS NOT INITIAL OR SLIFNR IS NOT INITIAL OR SBEDAT IS NOT INITIAL OR SBSART IS NOT INITIAL.

    SELECT EBELN

    BSART

    LIFNR

    BEDAT FROM EKKO INTO CORRESPONDING FIELDS OF TABLE EKKO_TAB WHERE EBELN IN SEBELN AND LIFNR IN SLIFNR AND BEDAT IN SBEDAT AND

    BSART IN SBSART.

    ELSEIF SBADAT IS NOT INITIAL.

    SELECT EBELN

    BANFN

    BADAT

    MENGE

    AFNAM FROM EBAN INTO CORRESPONDING FIELDS OF TABLE EBAN_TAB where BADAT IN SBADAT.

    SORT EBAN_TAB BY BADAT ASCENDING.

    select ebeln lifnr bedat bsart from ekko into corresponding fields of table ekko_tab for all entries in eban_tab where ebeln = eban_tab-ebeln.

    ELSEIF SMATNR IS NOT INITIAL.

    SELECT EBELN

    EBELP

    FROM EKPO INTO CORRESPONDING FIELDS OF TABLE SELTAB

    WHERE MATNR IN SMATNR.

    SORT SELTAB BY EBELN ASCENDING.

    DELETE ADJACENT DUPLICATES FROM SELTAB COMPARING EBELN.

    SELECT EBELN

    BSART

    BEDAT

    LIFNR FROM EKKO INTO CORRESPONDING FIELDS OF TABLE EKKO_TAB

    FOR ALL ENTRIES IN SELTAB WHERE EBELN = SELTAB-EBELN.

    ELSEIF SBUDAT IS NOT INITIAL.

    SELECT BUDAT

    MBLNR FROM MKPF INTO CORRESPONDING FIELDS OF TABLE MKPF_TAB WHERE

    BUDAT IN SBUDAT.

    sort mkpf_tab by budat ascending.

    SELECT EBELN FROM MSEG INTO CORRESPONDING FIELDS OF TABLE SELTAB FOR ALL ENTRIES IN

    MKPF_TAB WHERE MBLNR = MKPF_TAB-MBLNR.

    *SELECT EBELN

    FROM QALS INTO CORRESPONDING FIELDS OF TABLE SELTAB FOR ALL ENTRIES IN SELTAB WHERE EBELN = SELTAB-EBELN.

    SORT SELTAB BY EBELN ASCENDING.

    DELETE ADJACENT DUPLICATES FROM SELTAB COMPARING EBELN.

    SELECT EBELN

    BEDAT

    LIFNR

    BSART FROM EKKO INTO CORRESPONDING FIELDS OF TABLE EKKO_TAB

    FOR ALL ENTRIES IN SELTAB WHERE EBELN = SELTAB-EBELN.

    ENDIF.

    SELECT EBELN

    MENGE

    MATNR

    EBELP FROM EKPO INTO CORRESPONDING FIELDS OF TABLE EKPO_TAB FOR ALL ENTRIES IN EKKO_TAB WHERE EBELN = EKKO_TAB-EBELN AND

    MATNR IN SMATNR.

    SELECT EBELN

    BANFN

    BADAT

    MENGE

    AFNAM FROM EBAN INTO CORRESPONDING FIELDS OF TABLE EBAN_TAB FOR ALL ENTRIES IN EKKO_TAB WHERE EBELN = EKKO_TAB-EBELN AND

    BADAT IN SBADAT.

    SELECT EBELN

    MBLNR

    MATNR

    MENGE

    EBELP

    FROM MSEG INTO CORRESPONDING FIELDS OF TABLE MSEG_TAB FOR ALL ENTRIES IN EKPO_TAB WHERE EBELN = EKPO_TAB-EBELN AND

    MATNR = EKPO_TAB-MATNR AND

    EBELP = EKPO_TAB-EBELP AND

    BWART IN ('101','105').

    SELECT LMENGE01

    LMENGE07

    MATNR

    MBLNR

    EBELN FROM QALS INTO CORRESPONDING FIELDS OF TABLE QALS_TAB FOR ALL ENTRIES IN MSEG_TAB WHERE MBLNR = MSEG_TAB-MBLNR AND

    MATNR = MSEG_TAB-MATNR AND

    EBELN = MSEG_TAB-EBELN AND

    EBELP = MSEG_TAB-EBELP.

    SELECT MBLNR

    BUDAT FROM MKPF INTO CORRESPONDING FIELDS OF TABLE MKPF_TAB FOR ALL ENTRIES IN MSEG_TAB WHERE MBLNR = MSEG_TAB-MBLNR AND BUDAT

    IN SBUDAT.

    SELECT MATNR

    MAKTX FROM MAKT INTO CORRESPONDING FIELDS OF TABLE MAKT_TAB FOR ALL ENTRIES IN EKPO_TAB WHERE MATNR = EKPO_TAB-MATNR.

    *LOOP AT OUTPUT.

    **LOOP AT EKKO_TAB.

    **read table EKKO_TAB with key ebeln = output-ebeln.

    **if sy-subrc = 0.

    *READ TABLE EKPO_TAB WITH KEY EBELN = EKKO_TAB-EBELN.

    *IF SY-SUBRC = 0.

    *READ TABLE MSEG_TAB WITH KEY EBELN = EKPO_TAB-EBELN MATNR = EKPO_TAB-MATNR.

    *IF SY-SUBRC = 0.

    *

    **READ TABLE QALS_TAB WITH KEY MBLNR = MSEG_TAB-MBLNR MATNR = MSEG_TAB-MATNR EBELN = MSEG_TAB-EBELN.

    **IF SY-SUBRC = 0.

    *

    o OUTPUT-EBELN = EKKO_TAB-EBELN.

    o OUTPUT-BSART = EKKO_TAB-BSART.

    o OUTPUT-LIFNR = EKKO_TAB-LIFNR.

    o OUTPUT-BEDAT = EKKO_TAB-BEDAT.

    OUTPUT-PMENGE = EKPO_TAB-MENGE.

    OUTPUT-MATNR = EKPO_TAB-MATNR.

    OUTPUT-MBLNR = MSEG_TAB-MBLNR.

    OUTPUT-GMENGE = MSEG_TAB-MENGE.

    o OUTPUT-LMENGE01 = QALS_TAB-LMENGE01.

    o OUTPUT-LMENGE07 = QALS_TAB-LMENGE07.

    modify OUTPUT transporting pmenge matnr MBLNR GMENGE.

    **APPEND OUTPUT.

    *ENDIF.

    *ENDIF.

    *

    *ENDLOOP.

    *

    LOOP AT EKKO_TAB.

    LOOP AT EKPO_TAB WHERE EBELN = EKKO_TAB-EBELN.

    LOOP AT MSEG_TAB WHERE EBELN = OUTPUT-EBELN AND MATNR = output-MATNR AND EBELP = OUTPUT-EBELP.

    OUTPUT-EBELN = EKKO_TAB-EBELN.

    OUTPUT-BSART = EKKO_TAB-BSART.

    OUTPUT-LIFNR = EKKO_TAB-LIFNR.

    OUTPUT-BEDAT = EKKO_TAB-BEDAT.

    OUTPUT-PMENGE = EKPO_TAB-MENGE.

    OUTPUT-MATNR = EKPO_TAB-MATNR.

    OUTPUT-EBELP = EKPO_TAB-EBELP.

    APPEND OUTPUT.

    CLEAR OUTPUT.

    ENDLOOP.

    ENDLOOP.

    *LOOP AT OUTPUT.

    *LOOP AT EKPO_TAB WHERE EBELN = OUTPUT-EBELN.

    OUTPUT-PMENGE = EKPO_TAB-MENGE.

    OUTPUT-MATNR = EKPO_TAB-MATNR.

    OUTPUT-EBELP = EKPO_TAB-EBELP.

    *MODIFY OUTPUT TRANSPORTING PMENGE MATNR EBELP.

    *ENDLOOP.

    *ENDLOOP.

    LOOP AT OUTPUT.

    LOOP AT MSEG_TAB WHERE EBELN = OUTPUT-EBELN AND MATNR = OUTPUT-MATNR AND EBELP = OUTPUT-EBELP.

    *LOOP AT QALS_TAB WHERE MBLNR = MSEG_TAB-MBLNR AND MATNR = OUTPUT-MATNR AND EBELN = OUTPUT-EBELN AND EBELP = OUTPUT-EBELP.

    OUTPUT-MBLNR = MSEG_TAB-MBLNR.

    OUTPUT-GMENGE = MSEG_TAB-MENGE.

    OUTPUT-LMENGE01 = QALS_TAB-LMENGE01.

    OUTPUT-LMENGE07 = QALS_TAB-LMENGE07.

    OUTPUT-EBELP = QALS_TAB-EBELP.

    *APPEND OUTPUT.

    MODIFY OUTPUT TRANSPORTING MBLNR GMENGE.

    *CLEAR OUTPUT.

    *CLEAR MSEG_TAB.

    ENDLOOP.

    ENDLOOP.

    *ENDLOOP.

    LOOP AT OUTPUT.

    LOOP AT QALS_TAB WHERE MBLNR = OUTPUT-MBLNR AND MATNR = OUTPUT-MATNR AND EBELN = OUTPUT-EBELN.

    OUTPUT-LMENGE01 = QALS_TAB-LMENGE01.

    OUTPUT-LMENGE07 = QALS_TAB-LMENGE07.

    OUTPUT-EBELP = QALS_TAB-EBELP.

    MODIFY OUTPUT TRANSPORTING LMENGE01 LMENGE07.

    ENDLOOP.

    ENDLOOP.

    LOOP AT OUTPUT.

    LOOP AT EBAN_TAB WHERE EBELN = OUTPUT-EBELN.

    OUTPUT-BANFN = EBAN_TAB-BANFN.

    OUTPUT-BADAT = EBAN_TAB-BADAT.

    OUTPUT-RMENGE = EBAN_TAB-MENGE.

    OUTPUT-AFNAM = EBAN_TAB-AFNAM.

    MODIFY OUTPUT TRANSPORTING BANFN BADAT RMENGE AFNAM.

    ENDLOOP.

    ENDLOOP.

    LOOP AT OUTPUT.

    LOOP AT MKPF_TAB WHERE MBLNR = OUTPUT-MBLNR.

    OUTPUT-BUDAT = MKPF_TAB-BUDAT.

    MODIFY OUTPUT TRANSPORTING BUDAT.

    ENDLOOP.

    ENDLOOP.

    *LOOP AT OUTPUT.

    *

    *SELECT SINGLE MATNR FROM EKPO INTO OUTPUT-MATNR WHERE EBELN = OUTPUT-EBELN.

    *MODIFY OUTPUT TRANSPORTING MATNR.

    *

    *SELECT SINGLE MBLNR FROM MSEG INTO OUTPUT-MBLNR WHERE MATNR = OUTPUT-MATNR.

    *MODIFY OUTPUT TRANSPORTING MBLNR.

    *ENDLOOP.

    LOOP AT OUTPUT.

    LOOP AT MAKT_TAB WHERE MATNR = OUTPUT-MATNR.

    OUTPUT-MAKTX = MAKT_TAB-MAKTX.

    MODIFY OUTPUT TRANSPORTING MAKTX.

    ENDLOOP.

    ENDLOOP.

    *LOOP AT EKKO_TAB.

    LOOP AT EKPO_TAB WHERE EBELN = EKKO_TAB-EBELN.

    o LOOP AT MSEG_TAB WHERE EBELN = EKPO_TAB-EBELN AND MATNR = EKPO_TAB-MATNR.

    o LOOP AT QALS_TAB WHERE MBLNR = MSEG_TAB-MBLNR AND MATNR = MSEG_TAB-MATNR AND EBELN = MSEG_TAB-EBELN.

    o LOOP AT MKPF_TAB WHERE MBLNR = MSEG_TAB-MBLNR.

    OUTPUT-EBELN = EKKO_TAB-EBELN.

    OUTPUT-BSART = EKKO_TAB-BSART.

    OUTPUT-LIFNR = EKKO_TAB-LIFNR.

    OUTPUT-BEDAT = EKKO_TAB-BEDAT.

    OUTPUT-PMENGE = EKPO_TAB-MENGE.

    OUTPUT-MATNR = EKPO_TAB-MATNR.

    OUTPUT-EBELP = EKPO_TAB-EBELP.

    o OUTPUT-MBLNR = MSEG_TAB-MBLNR.

    o OUTPUT-GMENGE = MSEG_TAB-MENGE.

    o OUTPUT-BUDAT = MKPF_TAB-BUDAT.

    o OUTPUT-LMENGE01 = QALS_TAB-LMENGE01.

    o OUTPUT-LMENGE07 = QALS_TAB-LMENGE07.

    o MODIFY OUTPUT TRANSPORTING BSART LIFNR BEDAT PMENGE MATNR.

    APPEND OUTPUT.

    CLEAR OUTPUT.

    o CLEAR QALS_TAB.

    o ENDLOOP.

    o CLEAR MKPF_TAB.

    o ENDLOOP.

    o CLEAR MSEG_TAB.

    o ENDLOOP.

    CLEAR EKPO_TAB.

    ENDLOOP.

    CLEAR EKKO_TAB.

    ENDLOOP.

    *

    *

    *

    *

    **SELECT MBLNR EBELN FROM MSEG INTO TABLE MSEG_TAB1 FOR ALL ENTRIES IN EKKO_TAB WHERE EBELN = EKKO_TAB-EBELN.

    **

    *

    o LOOP AT OUTPUT.

    o MOVE-CORRESPONDING MSEG_TAB1 TO OUTPUT.

    o OUTPUT-MBLNR = MSEG_TAB1-MBLNR.

    o MODIFY OUTPUT TRANSPORTING MBLNR.

    o ENDLOOP.

    *

    *

    *

    *

    *

    *

    *LOOP AT OUTPUT.

    LOOP AT MSEG_TAB WHERE EBELN = output-EBELN AND MATNR = output-MATNR AND EBELP = OUTPUT-EBELP.

    **READ TABLE MSEG_TAB WITH KEY EBELN = OUTPUT-EBELN MATNR = OUTPUT-MATNR.

    *IF SY-SUBRC = 0.

    OUTPUT-MBLNR = MSEG_TAB-MBLNR.

    OUTPUT-GMENGE = MSEG_TAB-MENGE.

    *MODIFY OUTPUT TRANSPORTING MBLNR GMENGE.

    *ENDIF.

    *clear output.

    *ENDLOOP.

    *endloop.

    *

    *

    *

    *LOOP AT OUTPUT.

    READ TABLE QALS_TAB WITH KEY MBLNR = OUTPUT-MBLNR MATNR = OUTPUT-MATNR EBELN = OUTPUT-EBELN.

    *IF SY-SUBRC = 0.

    *OUTPUT-LMENGE01 = QALS_TAB-LMENGE01.

    *OUTPUT-LMENGE07 = QALS_TAB-LMENGE07.

    *

    *MODIFY OUTPUT TRANSPORTING LMENGE01 LMENGE07.

    *ENDIF.

    *ENDLOOP.

    *

    *

    *

    *

    LOOP AT OUTPUT.

    READ TABLE EBAN_TAB WITH KEY EBELN = OUTPUT-EBELN.

    IF SY-SUBRC = 0.

    OUTPUT-BANFN = EBAN_TAB-BANFN.

    OUTPUT-BADAT = EBAN_TAB-BADAT.

    OUTPUT-RMENGE = EBAN_TAB-MENGE.

    OUTPUT-AFNAM = EBAN_TAB-AFNAM.

    MODIFY OUTPUT TRANSPORTING BANFN BADAT RMENGE AFNAM.

    ENDIF.

    ENDLOOP.

    *

    *

    *

    *

    *

    *

    *

    *

    *

    *LOOP AT OUTPUT.

    *

    READ TABLE MKPF_TAB WITH KEY MBLNR = OUTPUT-MBLNR.

    IF SY-SUBRC = 0.

    OUTPUT-BUDAT = MKPF_TAB-BUDAT.

    MODIFY OUTPUT TRANSPORTING BUDAT.

    ENDIF.

    ENDLOOP.

    *

    *

    *

    *

    *

    *

    *LOOP AT OUTPUT.

    *READ TABLE MAKT_TAB WITH KEY MATNR = OUTPUT-MATNR.

    *IF SY-SUBRC = 0.

    *OUTPUT-MAKTX = MAKT_TAB-MAKTX.

    *MODIFY OUTPUT TRANSPORTING MAKTX.

    *ENDIF.

    *ENDLOOP.

    PERFORM F_OUTPUT.

    PERFORM SORT.

    PERFORM GRID.

    FORM F_OUTPUT.

    F_OUTPUT1-FIELDNAME = 'MATNR'.

    F_OUTPUT1-REF_TABNAME = 'EKPO'.

    F_OUTPUT1-REF_FIELDNAME = 'MATNR'.

    APPEND F_OUTPUT1.

    CLEAR F_OUTPUT1.

    F_OUTPUT1-FIELDNAME ='MAKTX'.

    F_OUTPUT1-SELTEXT_M = 'DESCRIPTION.'.

    APPEND F_OUTPUT1.

    CLEAR F_OUTPUT1.

    F_OUTPUT1-FIELDNAME = 'LIFNR'.

    F_OUTPUT1-REF_TABNAME = 'EKKO'.

    F_OUTPUT1-REF_FIELDNAME = 'LIFNR'.

    F_OUTPUT1-SELTEXT_M = 'SUPPLIER'.

    APPEND F_OUTPUT1.

    CLEAR F_OUTPUT1.

    F_OUTPUT1-FIELDNAME = 'AFNAM'.

    F_OUTPUT1-REF_TABNAME = 'EBAN'.

    F_OUTPUT1-REF_FIELDNAME = 'AFNAM'.

    APPEND F_OUTPUT1.

    CLEAR F_OUTPUT1.

    F_OUTPUT1-FIELDNAME = 'BANFN'.

    F_OUTPUT1-REF_TABNAME = 'EBAN'.

    F_OUTPUT1-REF_FIELDNAME = 'BANFN'.

    APPEND F_OUTPUT1.

    CLEAR F_OUTPUT1.

    F_OUTPUT1-FIELDNAME = 'BADAT'.

    F_OUTPUT1-SELTEXT_M = 'PRS DATE'.

    F_OUTPUT1-REF_TABNAME = 'EBAN'.

    F_OUTPUT1-REF_FIELDNAME = 'BADAT'.

    APPEND F_OUTPUT1.

    CLEAR F_OUTPUT1.

    F_OUTPUT1-FIELDNAME ='RMENGE'.

    *F_OUTPUT1-REF_TABNAME = 'MSEG'.

    *F_OUTPUT1-REF_FIELDNAME = 'MBLNR'.

    F_OUTPUT1-SELTEXT_M = 'PRS QTY'.

    APPEND F_OUTPUT1.

    CLEAR F_OUTPUT1.

    F_OUTPUT1-FIELDNAME = 'EBELN'.

    F_OUTPUT1-REF_TABNAME = 'EKKO'.

    F_OUTPUT1-REF_FIELDNAME = 'EBELN'.

    APPEND F_OUTPUT1.

    CLEAR F_OUTPUT1.

    F_OUTPUT1-FIELDNAME = 'BSART'.

    F_OUTPUT1-REF_TABNAME = 'EKKO'.

    F_OUTPUT1-REF_FIELDNAME = 'BSART'.

    APPEND F_OUTPUT1.

    CLEAR F_OUTPUT1.

    F_OUTPUT1-FIELDNAME = 'BEDAT'.

    F_OUTPUT1-REF_TABNAME = 'EKKO'.

    F_OUTPUT1-REF_FIELDNAME = 'BEDAT'.

    F_OUTPUT1-SELTEXT_M = 'PO DATE'.

    APPEND F_OUTPUT1.

    CLEAR F_OUTPUT1.

    F_OUTPUT1-FIELDNAME ='PMENGE'.

    F_OUTPUT1-SELTEXT_M = 'PO QTY'.

    APPEND F_OUTPUT1.

    CLEAR F_OUTPUT1.

    F_OUTPUT1-FIELDNAME = 'MBLNR'.

    F_OUTPUT1-REF_TABNAME = 'MSEG'.

    F_OUTPUT1-REF_FIELDNAME = 'MBLNR'.

    F_OUTPUT1-SELTEXT_M = 'GR NUMBER'.

    APPEND F_OUTPUT1.

    CLEAR F_OUTPUT1.

    F_OUTPUT1-FIELDNAME ='BUDAT'.

    F_OUTPUT1-SELTEXT_M = 'GR DATE'.

    APPEND F_OUTPUT1.

    CLEAR F_OUTPUT1.

    F_OUTPUT1-FIELDNAME ='GMENGE'.

    *F_OUTPUT1-REF_TABNAME = 'MSEG'.

    *F_OUTPUT1-REF_FIELDNAME = 'MBLNR'.

    F_OUTPUT1-SELTEXT_M = 'RECEIVED QTY'.

    APPEND F_OUTPUT1.

    CLEAR F_OUTPUT1.

    F_OUTPUT1-FIELDNAME = 'LMENGE01'.

    F_OUTPUT1-REF_TABNAME = 'QALS'.

    F_OUTPUT1-REF_FIELDNAME = 'LMENGE01'.

    F_OUTPUT1-SELTEXT_M = 'ACCEPTED QTY'.

    APPEND F_OUTPUT1.

    CLEAR F_OUTPUT1.

    F_OUTPUT1-FIELDNAME = 'LMENGE07'.

    F_OUTPUT1-REF_TABNAME = 'QALS'.

    F_OUTPUT1-REF_FIELDNAME = 'LMENGE07'.

    F_OUTPUT1-SELTEXT_M = 'REJECTED QTY'.

    APPEND F_OUTPUT1.

    CLEAR F_OUTPUT1.

    *

    F_OUTPUT1-FIELDNAME ='REMARKS'.

    **F_OUTPUT1-REF_TABNAME = 'MSEG'.

    **F_OUTPUT1-REF_FIELDNAME = 'MBLNR'.

    F_OUTPUT1-SELTEXT_M = 'REMARKS'.

    APPEND F_OUTPUT1.

    CLEAR F_OUTPUT1.

    ENDFORM.

    FORM SORT.

    IT_SORT-FIELDNAME = 'MATNR'.

    IT_SORT-UP = 'X'.

    APPEND IT_SORT.

    CLEAR IT_SORT.

    IT_SORT-FIELDNAME = 'MAKTX'.

    IT_SORT-UP = 'X'.

    APPEND IT_SORT.

    CLEAR IT_SORT.

    IT_SORT-FIELDNAME = 'LIFNR'.

    IT_SORT-UP = 'X'.

    APPEND IT_SORT.

    CLEAR IT_SORT.

    IT_SORT-FIELDNAME = 'AFNAM'.

    IT_SORT-UP = 'X'.

    APPEND IT_SORT.

    CLEAR IT_SORT.

    IT_SORT-FIELDNAME = 'BANFN'.

    IT_SORT-UP = 'X'.

    APPEND IT_SORT.

    CLEAR IT_SORT.

    IT_SORT-FIELDNAME = 'BADAT'.

    IT_SORT-UP = 'X'.

    APPEND IT_SORT.

    CLEAR IT_SORT.

    IT_SORT-FIELDNAME = 'RMENGE'.

    IT_SORT-UP = 'X'.

    APPEND IT_SORT.

    CLEAR IT_SORT.

    IT_SORT-FIELDNAME = 'EBELN'.

    IT_SORT-UP = 'X'.

    APPEND IT_SORT.

    CLEAR IT_SORT.

    IT_SORT-FIELDNAME = 'BSART'.

    IT_SORT-UP = 'X'.

    APPEND IT_SORT.

    CLEAR IT_SORT.

    IT_SORT-FIELDNAME = 'BEDAT'.

    IT_SORT-UP = 'X'.

    APPEND IT_SORT.

    CLEAR IT_SORT.

    IT_SORT-FIELDNAME = 'PMENGE'.

    IT_SORT-UP = 'X'.

    APPEND IT_SORT.

    CLEAR IT_SORT.

    IT_SORT-FIELDNAME = 'MBLNR'.

    IT_SORT-UP = 'X'.

    APPEND IT_SORT.

    CLEAR IT_SORT.

    IT_SORT-FIELDNAME = 'BUDAT'.

    IT_SORT-UP = 'X'.

    APPEND IT_SORT.

    CLEAR IT_SORT.

    IT_SORT-FIELDNAME = 'GMENGE'.

    IT_SORT-UP = 'X'.

    APPEND IT_SORT.

    CLEAR IT_SORT.

    IT_SORT-FIELDNAME = 'LMENGE01'.

    IT_SORT-UP = 'X'.

    APPEND IT_SORT.

    CLEAR IT_SORT.

    IT_SORT-FIELDNAME = 'LMENGE07'.

    IT_SORT-UP = 'X'.

    APPEND IT_SORT.

    CLEAR IT_SORT.

    ENDFORM.

    FORM GRID.

    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

    EXPORTING

    I_INTERFACE_CHECK = ' '

    I_BYPASSING_BUFFER = ' '

    I_BUFFER_ACTIVE = ' '

    I_CALLBACK_PROGRAM = 'REPID'

    I_CALLBACK_PF_STATUS_SET = ' '

    I_CALLBACK_USER_COMMAND = ' '

    I_CALLBACK_TOP_OF_PAGE = ' '

    I_CALLBACK_HTML_TOP_OF_PAGE = ' '

    I_CALLBACK_HTML_END_OF_LIST = ' '

    I_STRUCTURE_NAME =

    I_BACKGROUND_ID = ' '

    I_GRID_TITLE =

    I_GRID_SETTINGS =

    IS_LAYOUT =

    IT_FIELDCAT = F_OUTPUT1[]

    IT_EXCLUDING =

    IT_SPECIAL_GROUPS =

    IT_SORT =

    IT_FILTER =

    IS_SEL_HIDE =

    I_DEFAULT = 'X'

    I_SAVE = ' '

    IS_VARIANT =

    IT_EVENTS =

    IT_EVENT_EXIT =

    IS_PRINT =

    IS_REPREP_ID =

    I_SCREEN_START_COLUMN = 0

    I_SCREEN_START_LINE = 0

    I_SCREEN_END_COLUMN = 0

    I_SCREEN_END_LINE = 0

    I_HTML_HEIGHT_TOP = 0

    I_HTML_HEIGHT_END = 0

    IT_ALV_GRAPHICS =

    IT_HYPERLINK =

    IT_ADD_FIELDCAT =

    IT_EXCEPT_QINFO =

    IR_SALV_FULLSCREEN_ADAPTER =

    IMPORTING

    E_EXIT_CAUSED_BY_CALLER =

    ES_EXIT_CAUSED_BY_USER =

    TABLES

    T_OUTTAB = OUTPUT[].

    EXCEPTIONS

    PROGRAM_ERROR = 1

    OTHERS = 2

    .

    IF SY-SUBRC 0.

    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

    ENDIF.

    ENDFORM.

  • RELEVANCY SCORE 3.03

    DB:3.03:Suppressing Output cs



    I'm running a cluster analysis in which I want to feed in all the columns of my data table DT2WAY into the analysis, perform the analysis and then append the resulting allocation into 4 clusters to the right of that table, but without seeing any output. The following script does that for me, but leaves a dendrogram on the screen. Obviously I can simply delete it immediately afterwards, but I'd much prefer to suppress it altogether. How can I do that, please?

    DB:3.03:Suppressing Output cs


    From the JMP 8 docs:

    Platform launches have an invisible option, which suppresses the showing of the window. Using this option on a Fit Model script suppresses both the model dialog and the results window.

    When using this option, be careful to keep track of the window in the script and close it when the script is done with it, because the invisible windows use resources that must be manually freed.

  • RELEVANCY SCORE 3.03

    DB:3.03:How Store Sp_Executesql Output To A Global Temporary Table? jz


    I have been reading some information about to store data to a global temparary table. I spent hours and hours to modify my code to do it, it always give me error. I guess I don't know how to define output parameter, what would be in output parameters if my sp_executesql have fields isn, url and description? If I gte the output, how do I store them to a golobal temp and get the result? Here is my code:
     

    declare @query_id int

     

    declare @query_statement nvarchar(300)

     

    declare @row int

     

    declare @output Table (ISN int,URL nvarchar(300), Description nvarchar(500))

     

    declare @ParamDef nvarchar(1000)

     

    DECLARE @sql nvarchar(1000)

     

    set @query_id=1
     

    DECLARE query_cursor CURSOR FOR select query from tbl_queries where id=@query_id AND notes LIKE '%find%'

     

    OPEN
    query_cursor
    NEXT FROM query_cursor INTO @query_statement
     

    --@query_statement contains query like: select * from tbl_url where url like 'ttp:%'FETCH
    Set @ParamDef = N'@output table (ISN int, URL nvarchar(300), Description nvarchar(500), URL_ISN int) OUTPUT'

     

    -- here is running the query statement to get rows(isn, url, description) with url missing h from http://: -- how to get the output????EXEC sp_executesql @query_statement, @ParamDef, @output OUTPUT
    -- here I want to store thoese rows to global temp table, how do I do this????

    SET @sql = N'CREATE TABLE ##myTemp (ISN int, URL nvarchar(300), Description nvarchar(500))'set @sql = @sql + N'INSERT INTO ##myTemp Select * from @output'

    -- here I want to get the row numbers of url missing hset @row=@@rowcount
     

    select @row [num]

     

    CLOSE query_cursor
     

    DEALLOCATE query_cursor
    Current error message is:
    Msg 137, Level 15, State 2, Line 16
    Must declare the scalar variable @output.
     I know above code have a lot problems, I am learning it. Any help will be greatly appreciatedBest RegardsLynda

    DB:3.03:How Store Sp_Executesql Output To A Global Temporary Table? jz

    Thank you both for being kind and patient with me. yes, it works now.I will try AMB' solution also. Best RegardsLynda

  • RELEVANCY SCORE 3.02

    DB:3.02:Save Report Painter Output Into Internal Table pz



    Hi,

    i have created a report painter for vendor aging report. got output in drill down format.

    i need to show the data in smartform as well. so need to save the report painter output into an internal table. can anyone please help me resolving this.

    regards,

    sudha.m

  • RELEVANCY SCORE 3.02

    DB:3.02:Re: How To Create Temp Table 83


    I want to create temp table insert some data into that table. dual is predefined temp table. I want user defined temp table.

    DB:3.02:Re: How To Create Temp Table 83

    Hmn..how does the cursor impacts the performance as compared to having another table to store those records?

    Do you know first you have to select the row then insert into global table and then again fetch to loop? the loop can be for anything (e.g to check, update etc.)

    (The reason I am taking looping in picture is because you are involving discussion of cursor with table.)

    Regards
    Raghvendra

  • RELEVANCY SCORE 3.02

    DB:3.02:Can I Specify Where To Insert Rows Returned Via Output Clause Adding A Where Clause? zs


    I want to insert some rows in table A, and then obtain the newly created Identity values for each inserted rows, without having to query for them. Ok, using Insert with the OUTPUT clause solves this. But - say the destination table to where I am outputting
    is not an empty table, rather, every row there is filled in such a way that I need the OUTPUT clause to complete the missing data, so I can afterwards use this destination table as the source for a later insert. So - would it be possible to, say, specify
    a WHERE after an OUTPUT clause so that it puts the data in a specific row (this would mean the row is actually being updated and not inserted, I know... I could simply update the table, but I want to avoid having issue a SELECT for the sole purpose of obtaining
    the newly added identity values in table A, so I would very much like to take benefit of OUTPUT) WHERE ID = 11 and not as a new record?
    An example: suppose table A is c1, c2, c3. My destination table (which I will call DT from now on) is ID, c1, c2, c3. Would it be possible to do something like
    INSERT INTO A (c2, c3) OUTPUT Inserted.c2, Inserted.c3 INTO DT (c2, c3) WHERE ID = 11
    ?

    Thanks in advance.

    DB:3.02:Can I Specify Where To Insert Rows Returned Via Output Clause Adding A Where Clause? zs

    If you are using SS 2008 or greater, then take advantage of a new feature known as
    composable DML.
    SET NOCOUNT ON;
    USE tempdb;
    GO
    DECLARE @T1 TABLE (
    c1 int,
    c2 int
    );

    DECLARE @T2 TABLE (
    c1 int,
    c2 int
    );

    INSERT INTO @T2 (c1, c2)
    SELECT c1, c2
    FROM (
    INSERT INTO @T1 (c1, c2)
    OUTPUT INSERTED.c1, INSERTED.c2
    VALUES (1, 1), (2, 2), (3, 3), (4, 4), (5, 5)
    ) AS T (c1, c2)
    WHERE c1 % 2 = 0;

    SELECT * FROM @T1;
    SELECT * FROM @T2;
    GO
    AMB
    Some guidelines for posting questions...

  • RELEVANCY SCORE 3.02

    DB:3.02:Looking For Some Way Without Cursor..Please Suggest sj


    Hi,
    I having 2 table with below data ,

    DECLARE

    @MENU TABLE(MENUID
    INT

    )

    INSERT

    INTO @MENU
    SELECT 21
    UNION
    SELECT 22

    SELECT

    *
    FROM @MENU

    DECLARE

    @EMPLOYEE TABLE(EMPLOYEEID
    INT

    )

    INSERT

    INTO @EMPLOYEE
    SELECT 1
    UNION
    SELECT 2

    SELECT

    *
    FROM @EMPLOYEE
    and below is the 3rd table and I want to filled this table by above table's data for below output without cursor,

    DECLARE

    @EMPLOYEE_MENU TABLE(EMPLOYEEID
    INT,
    MENUID INT)

    DB:3.02:Looking For Some Way Without Cursor..Please Suggest sj

    Try this -
    DECLARE

    @MENU TABLE(MENUID INT

    )

    INSERT

    INTO @MENU SELECT 21 UNION SELECT 22

    SELECT

    * FROM @MENU

    DECLARE

    @EMPLOYEE TABLE(EMPLOYEEID INT

    )

    INSERT

    INTO @EMPLOYEE SELECT 1 UNION SELECT 2

    SELECT

    * FROM @EMPLOYEE

    DECLARE

    @EMPLOYEE_MENU TABLE(EMPLOYEEID INT, MENUID INT)

    Insert into @EMPLOYEE_MENU
    select * from @EMPLOYEE
    Cross join @MENU

    select * from @EMPLOYEE_MENUhttp://uk.linkedin.com/in/ramjaddu

  • RELEVANCY SCORE 3.02

    DB:3.02:Insert Into A Table zm


    For a table tab the values are:
    tab
    id() value1 value2 value3 vale4 value5
    001 state wb
    001 year 2012
    001 dist kol
    001 age 27

    Now I want to insert this data in another table tab1 and the output of that table will be

    id value1 value2value3 value4
    001 wb 2012 kol 27

    Please can you help me to find out how i can insert the date like this.

    DB:3.02:Insert Into A Table zm

    thanks I got my answer anyways and next time I will create a table and insert data

  • RELEVANCY SCORE 3.02

    DB:3.02:Sql Script In Abap x9



    Hi Everyone,

    I have sql script which gives certain output from the data base files, is it possible to execute this script in ABAP, I want to embed this sql script in ABAP and get the output into an internal table how is it possible.

    Can anyone suggest me on this, it will be of great use to me.

    Thanks,

    Prashant.

    DB:3.02:Sql Script In Abap x9


    Hi,

    To check the table space we have a program .....

    RSORAT01 - Check Table Space

    RSORATC5 - Check Table Extent

    http://www.saptechies.com/sap-table-space-daily-check-list/

    same like you will find the Program name for entire database also.. i do not know about the program, but Basis people will definetly helpyou out in this one

    Regards

    Sudheer

  • RELEVANCY SCORE 3.02

    DB:3.02:Load Data Into A Exisisting Table p7


    Hi All,
     
    I'm trying to create a package which will be used to load data into a existing table. The table already has data. I want to keep that data when I load new data into that table.
    Can anyone tell me how to do this?
     
    Thanks
     

    DB:3.02:Load Data Into A Exisisting Table p7

    Assuming you are familair to basic SSIS concepts, you can use one of the techniques described in the FAQ thread:Checking to see if a record exists, if so update, else insert If you are not familiar with SSIS, then you can go through BOL tutorials, also in the FAQ thread.

  • RELEVANCY SCORE 3.02

    DB:3.02:Loading Table After Getting The Name Of Table From Query ms



    How to load a table after getting the name of table from different table.

    I have a requirement into which 1st step will get data from different tables.

    2nd step will have to get the name of table from different table.

    3rd step I have to load the data from 1st step into the table(as output) from 2nd step.

    DB:3.02:Loading Table After Getting The Name Of Table From Query ms


    Hi Joamon,

    Firstly on PreSQL you do following tasks within DB2 procedure:

    1. drop synonym/alias

    2. your query to get target table name

    3. Create synonym/alias over table name from step2

    Because PreSQL will be done after validation of metadata, and before opening pipelines between source and target, you can drop and create synonym/alias on target table.

    Set name of target table as DYNAMIC_TABLE_NAME or something similar, and in practice, that name is name of synonym

    Regards,

    Tomislav

  • RELEVANCY SCORE 3.01

    DB:3.01:How Do You Input A Ms Word Table Into Labwindows? mf


    Hi,Using this message board, i managed to output a table of data to a MS Word document, but now i want to open this table within LABWINDOWS, how is this possible?any help would be much appreciatedcheersJustin

    DB:3.01:How Do You Input A Ms Word Table Into Labwindows? mf

    Hi,Using this message board, i managed to output a table of data to a MS Word document, but now i want to open this table within LABWINDOWS, how is this possible?any help would be much appreciatedcheersJustin

  • RELEVANCY SCORE 3.01

    DB:3.01:Internal Table zf



    hi,

    i want to pass a data from different internal table into single internal table like i had a data in ekko,ekpo,stxh...iam picking the data from this table into different internal tables...now i want to pass all the datas from different internal table into one internal table ..plz tel me how to do it...

    DB:3.01:Internal Table zf


    check this simple example.....

    read the table with keyfield...

    tables:mara,marc.

    data:begin of itab occurs 0,

    matnr like mara-matnr,

    end of itab.

    data:begin of itab1 occurs 0,

    matnr like marc-matnr,

    werks like marc-werks,

    end of itab1.

    select matnr

    from mara

    into corresponding fields of table itab.

    if itab is initial.

    select matnr

    werks

    from marc

    into table itab1

    for all entries in itab

    where matnr = itab-matnr.

    loop at itab1.

    read table itab with key matnr = itab-matnr.

    write:/ itab1-matnr,itab1-werks.

    endloop.

    endif.

  • RELEVANCY SCORE 3.01

    DB:3.01:Abap Scripts as



    Hi All,

    I'm new to ABAP.

    I created script by using user defined table zemploye by using select-options.I got output only one record.I want to display multiple records in output.

    my output is like this.

    10... abcd..

    MY PROGRAM:

    data : begin of abc,

    empno type zemploye-empno,

    empname type zemploye-empname,

    end of abc.

    data: itab type table of abc,

    wa type abc.

    data v1 type zemploye-empno.

    select-options : s_empno for v1.

    select empno empname from zemployee

    into table itab

    where empno in s_empno.

    perform open_form.

    perform start_form.

    loopat itab into wa.

    perform write_form.

    endloop.

    perform end_form.

    perform close_form.

    IN SCRIPTS FORM:

    I wrote text element like below this:

    P1: wa-empno...wa-empname...

    Thank You..

    DB:3.01:Abap Scripts as


    Define a text element in your script pass this in your wirte_form between loops.

    Refer old post of SDN :http://scn.sap.com/thread/3412533

  • RELEVANCY SCORE 3.01

    DB:3.01:Insert Statement Problem kz


    Hi,

    I have a scenario while Inserting into table 'TABLEA' iam am getting error 'EXACT QUERY FETCHES MORE THAN ROWS'

    I have a TABLEA where i want to insert data:

    i have a TABLEB where I want to fetch data and insert into TABLEA

    i have written the query as

    INSERT INTO TABLEA(MSISDN,DATA)
    SELECT MSISDN FROM RAW_IND,SELECT OTHER_MSISDN FROM TABLE(get_sud1('8615025402003')) .

    get_sud1 is a function where the value '8615025402003' is passed and it generates the output as :
    21
    23
    24
    25
    26

    Any help will be benefitial

    DB:3.01:Insert Statement Problem kz

    because ur table is not temp1 but tablea right?

  • RELEVANCY SCORE 3.01

    DB:3.01:Xml Data Convert Into Only Element Data ps


    Hello everybody,

    I create a form which use the web service. My output is come in xml form like..

    NewDataSet
    Table
    PRIVATE_MARKA_BATCH_NO0622/PRIVATE_MARKA_BATCH_NO
    /Table
    Table
    PRIVATE_MARKA_BATCH_NODOOR CABINET/PRIVATE_MARKA_BATCH_NO
    /Table
    /NewDataSet
    I want only element data like 0622, DOOR CABINET. Is it possible to remove the xml heading?? Please help..

    Forms [32 Bit] Version 10.1.2.0.2 (Production)
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production

  • RELEVANCY SCORE 3.01

    DB:3.01:Getting Error Column And Errorreason For Data Conversion s1


    Hi,
    I have one Prep Table from which im pulling the data into Destination table. Between prep and destination table i have Data conversion Transformation. While converting the data if any records are failed for conversion they are put into
    rejection table which is being set on Data conversion error output. In rejection table i have two columns being declared namely
    Errorcolumn,ErrorText.
    My requirement is that when some records doesnt pass the conversion and those are put into rejection table i want the columns which failed conversion and reason for failure.
    Please let me know how this can be done.
    Regards
    Gokul

    DB:3.01:Getting Error Column And Errorreason For Data Conversion s1

    Jamie Thomson did it perfect: Here it is :
    http://consultingblogs.emc.com/jamiethomson/archive/2005/08/08/SSIS-Nugget_3A00_-Get-error-descriptions.aspx
    BI and ERP Senior Consultant @ Nexum Bogazici
    If it is, Please dont forget to mark as answered or at least vote as helpful if the post helps you in any ways.

  • RELEVANCY SCORE 3.01

    DB:3.01:Output An Internal Table To Application Server Using Field Separator 88



    Hi guys,

    I want to output the contents of a rather large internal table to the application server with the columns tab separated. Is there an easy way to do this?

    Here is the general idea:

    data: begin of large_itab occurs 100,
    field1(10) type c,
    field2(8) type c,
    ...
    field50(3) type c.
    data: end of large_itab.

    data: l_file type string.
    l_file = '/tmp/tst.txt'

    * Fill the table with data

    open dataset l_file in text mode for output type 'UNIX' encoding default.
    loop at large_itab into wa_large.
    transfer wa_large to l_file.
    endloop.
    close dataset l_file.

    DB:3.01:Output An Internal Table To Application Server Using Field Separator 88


    Thanks MJ, your answer did the trick. All I needed to add was the "NO END OF LINE" parameter to the transfer statement, and add some logic to enter a newline character at the end of the table row.

    do count times.
    assign component sy-index of structure wa_large to field.
    if sy-subrc = 0.
    transfer field to l_file NO END OF LINE.
    if sy-index = count.
    transfer cl_abap_char_utilities=newline to l_file NO END OF LINE.
    else.
    transfer cl_abap_char_utilities=horizontal_tab to l_file NO END OF LINE.
    endif.
    endif.
    enddo.

  • RELEVANCY SCORE 3.01

    DB:3.01:Capture Xml Data Payload Into Database Table (Oracle Ebs R12) k1


    Hi All,

    We have a XML Publisher report which generates output in PDF format. We want to capture the XML data payload generated by this report and put it into a DB table once the PDF is generated.

    This report is generated through Oracle EBS R12 and XML Payload is stored by oracle by default in $APPLCSF/out directory.

    Any pointers would be helpful

    br

    DB:3.01:Capture Xml Data Payload Into Database Table (Oracle Ebs R12) k1

    Somewhere, some way, somehow, you have to intercept the code or output. Where that takes place is up to you. Modify the request to do the insert, capture an XML output file and use a loader API to upload the contents into a table. Or, what I am suggesting, you know what the query is in the report, and you don't have to modify the report at all. Just re-run the report query to do the same select, but this time you are channeling the data into XML format, either directly or into a normal table and converted to XML output when re-queried.