Interactivity in ABAP Query [SQ01]. Working on ABAP 4.6C version.

Hi,
I have created a Infoset[SQ02]( basically selecting data from VBAK and VBAP for Sales Order) and assigned this infoset to user group[SQ03]. Using this i have created a Query [SQ01].
In the output i have the "<b>SALES ORDER NUMBER</b>".
Once the sales order number is double-clicked on i have to display the VA03 transaction with the sales order number in it.
My doubt is, how is this interactivity acheived. I am working on ABAP 4.6C.
Thanks in Advance for your esteemed replies.
Regards,
Raghavendra Goutham P.

AT LINE-SELECTION.
case sy-cucol.
when 16 OR 17 . "Col No
DATA: BDCDATA TYPE TABLE OF BDCDATA.
DATA: ITAB TYPE TABLE OF BDCMSGCOLL.
DATA: PROGRAM LIKE SY-REPID,
      WA_BDCDATA TYPE BDCDATA.
WA_BDCDATA-PROGRAM  = 'SAPMV45A'.
WA_BDCDATA-DYNPRO   = '0102'.
WA_BDCDATA-DYNBEGIN = 'X'.
WA_BDCDATA-FNAM     = 'VBAK-VBELN'.
WA_BDCDATA-FVAL     = IT_ITAB-VBELN.
APPEND WA_BDCDATA TO BDCDATA.
CLEAR WA_BDCDATA.
CALL TRANSACTION 'VA03'  USING BDCDATA  MODE 'A'
                         MESSAGES INTO ITAB.
Regards
Ravi

Similar Messages

  • ABAp query SQ01

    Hi guys,
    I want to make a ABAP Query via SQ01on SAP ECC.
    First i had created an infoset, that only based on one table.
    My requirement is to fetch alle data from this table grouped by customer number.
    Using an sql statement is this very easy to do, but in i had trouble making this in SAP (SQ01):
    SELECT CUST_ID, COUNT(ORDERID)
    FROM
    TABLE
    WHRE CONDITIONS
    GROUP by CUST_ID
    HAVING COUNT(ORDERID) > 1
    My question is where to put my requirement in order to get result using standard ABAP query SQ01.
    I will really appreciate your help.
    nabil

    Hi,
    Welcome to SDN.
    This is not possible exactly with ABAP Query but can be easily done by ADHOC query. Using Set operation A-B.
    Check the links for ADHOC Query -
    <a href="http://www.sap.cmich.edu/fihr/hr/adhoc-query.doc">http://www.sap.cmich.edu/fihr/hr/adhoc-query.doc</a>
    Regards,
    Amit
    Reward all helpful replies.

  • PNPCE in ABAP Query(SQ01) Selection is not working completely

    Hi All,
    I have developed an ABAP query using LDB PNPCE. I am reading data from IT000,IT0001 etc . I test the query in QA and I noticed that the PNCPCE screen doesn’t care about the selection in query. Like I have given the date range in PNCPE default screen. But it’s not filtering that data at all. It pulling up the employee’s regardless of date, it behaves the same for field action type (P0000-MASSn). The surprising thing is that for company code its working fine. My question is that Why PNPCE standard screen-selection not filtering data in ABAP query.
    Did any one of you also experience that?
    FYI
    I also find an OSS note # 730005 but we are already on 52 Patch !!
    OSS note :PNPCE: Incorrect data of infotype 0000 and 0001
    Symptom
    When you carry out a reprot which is based on logical database PNPCE, errors occur during the processing of infotypes 0000 and 0001.
    Other terms
    PNPCE, AS PERSON, P0000, P0001, data selection period, person selection period, CHECK_IT_0000_DATA_RESTRICTED, CHECK_IT_0001_DATA_RESTRICTED
    Reason and Prerequisites
    You start a report which is based on logical database PNPCE. In the report, infotype 0000 or 0001 is processed (that is, it was declared via the INFOTYPES statement). At event 'GET GROUP' or 'GET PERAS', the system either returns too few data records in the infotype tables or it returns data records twice.
    The error (missing data records) has only occured since the implementation of Note 687004 or the import of Support Package SAPKE47028.
    Solution
    Implement the attached corrections. or import the corresponding Support Package.
    Thanks,
    Saquib Khan

    Hi Saquib,
       Recently i am facing the same issue can u pls do reply how you have overcome this issue..The data is not getting picked up at the right time it is lately picked up by the program . Earlier it was PNP and it has been changed to PNPCE also we had implemented OSS Note 687004 and the later's Notes  were also implemented but still now we are unable to track down why there is delay in picking up the records this has been happening for the past 8-10 Months(i m not sure far more before). I am finding 2 main issues,
    1. we are using GET peras in PNPCE and no other event after that may be this is not fetching all the data because my selection screen does contain PERSONID where i suppose there should be GET PERSON event to define it
    2. RP_READ_INFOTYPE macro while using for P0000 ,, the code in the macro is such that it fetches using P0001 also ...I suppose if there are any inconsistency between IT0 and IT1 then this might one to take care ...
    kindly let me know how you have approached to resolve this issue.

  • User restrictions in a ABAP Query (sq01)

    Hello,
    I'm new into queries so I have a question for you gurus...
    I have a working abap query, created via SQ01 but this is showing all the data to all the users who have rights to call this transaction.
    BUT
    for example
    user A works for plant X
    user B works for plant Y
    if user A calls the query, he should only see the data from plant X
    if user B calls the query, he should only see the data from plant Y
    Can you guys please help me out to get this thing working...
    Since i'm new in SAP I don't know alot about restrictions etc
    so please help me out with a newbie-answer
    (please describe évery step that i should do so the users only get their local data)
    thank you very much for your help!

    We're looking into restrictions on SQ01 too.  We thought that creating protected variants would solve our issue; but, we can't prevent a user from copying or creating their own variant.  When the user can create his or her own variant, then all the protection we built into our admin team's variants are gone.

  • ABAP Query (SQ01) Compare bewteen 2 selected fields

    Hello, In ABAP Query has selected fields (say) Fld1 Fld2 Fld3...  I need to output / show only those records where Fld1 not equal to Fld3. Any ideas ?? Both the fields are from the same table in a functional area.
    Thank You,
    Deb

    Hi,
    Welcome to SDN.
    This is not possible exactly with ABAP Query but can be easily done by ADHOC query. Using Set operation A-B.
    Check the links for ADHOC Query -
    <a href="http://www.sap.cmich.edu/fihr/hr/adhoc-query.doc">http://www.sap.cmich.edu/fihr/hr/adhoc-query.doc</a>
    Regards,
    Amit
    Reward all helpful replies.

  • ABAP Query (SQ01) Challenge

    I asked this question last time as well but with no positive/helpful answer. I need to develop a query ( SQ01) in which the user just wants to see when was the most recent posting done in the given G/L account. If i pull posting date it will give me all the dates in  chronical order or so which i dont really want.
    Lets get your gray/sap matter working
    THanks

    sameer
    if you know how to create query.
    code is
    Select requred data from BSIS into internal table (I_BSIS).
    Sort I_BSIS by key field date desending.
    when you sort this you will get the latest record in first by date.
    take that date in one temp field.
    LOOP AT I_BSIS.
       AT END OF key field
      SUM amount .
    move both date and sum amount to final internal table.
    ENDLOOP.
    At last take final internal table and use  in below FM
    WS_EXCEL.
    you will get output.
    Pls. reward if helpful

  • ABAP Query (Sq01)Modification

    Hi Experts,
    I am new to ABAP queries. I need to add an additonal field (optional field) into the output of an existing ABAP query. On the selection screen i am planning to include this field along with a check box such that if i click on the check box then this field wil be displayed in the output.
    Please tell me the steps as to how do i do this.
    Thanks
    Dany

    Hi Dany,
    This document will help you.
    http://www.sappoint.com/abap/ab4query.pdf
    Reward points if it helps,
    Satish

  • ABAP Query: Access variables in ABAP Program through InfoSet Query.

    Hi,
    While generating a report using ABAP Query Tool, how can we access the variables in the ABAP Program in the InfoSet Query?
    Thanks in Advance!!!

    HI,
    Dear, it seems that you have changed the query in SQ02 and then just save it and not generated.
    or may be after generation again clicked on SAVE button.
    So untill unless you will not generate the query, it won't work.
    Secondly, by chanegs in the query, i don't think it changes the name of the main program.
    Regds,
    Anil

  • How to modify standerd abap query  (SQ01) ...

    hi all,
    i am having one abap standard query, i have to modify that one and i have to include another colum which needs the requirment.
    07 Depreciation /SAPQUERY/AM07 ADA FIAA - DEPRECIATION
    the above i mentioned is the query, how ever i tryed this standared to copy but i am not able to connect infoset and all stuff.
    pls guide me how to insert additional colum in that standard report or query.
    pls guide me
    thanks and regards,
    sai

    s shiva,
    my query is that one only.
    i am having one formula depreciation = ( previous year / aquesition value ) * 100
    this formula i have to insert.
    how can i proced.
    pls guid me.
    thankx and regards,
    sai

  • Creation of Program using ABAP Query (SQ01)

    Hi All,
    I have a program called "AQL4FI==========INVOICE_CHECK=" in my 4.6 server but a similar program doesnot exist in ECC.
    From the name, it looks like a program created using SQ01.
    Can anyone please help as to how to create the same program in ECC using SQ01 by looking at the program in 4.6?
    Please help.
    Helpful answers will be fully rewarded.
    Thanks a ton.
    Naba

    First thing is this is not the way to convert the SAP Query to Report.
    First check that how many table in your query they have used.To check this if you go in SQ02 press display button left side you can see the tables.To check the fields selecting from tables check in field groups.
    In record processing check are there any conditions are there.
    Now wrire a select statement by joing all tables which you found above and in this select statement extract all fields which you found in field group into one internal table .Here you give the selection screen fields as condition fields in select statement.If you found any conditions in record processing event ,Loop that internal table and check the conditions or modifications.
    If you need more help let me know.
    Pls. reward points for helpful answers
    Thanks
    Murali Poli

  • Modifying an existing ABAP Query - sq01 (tcode)

    Hi All,
      We have a query develped (Z) long before .Now we have a requirment where in which we need to add one   more table to the existing query.Kindly let me know how can we proceed.
      When am giving the query name and clicked on change , am not able to find any option which allows the  user to add one more table.
      looking for valuble inputs on the same.
    Regards,
    Zareena.

    Hi ,
    u need to follow these steps when u are working on queries.
    Step1-->SQ03->Give ur user group here ->then /nSQ02->here it will display all ur Infosets those belongs to ur user Group--->then go in Change Mode, after u know wat u have to do.
    Regards
    Prabhu

  • Inserting addition field in ABAP query (SQ01) while generating reports.

    Please let me know the procedure of adding field and applying mathematical  formula in the query.

    Hi,
    have a look at the help <a href="http://help.sap.com/saphelp_erp2005/helpdata/EN/d2/cb4138455611d189710000e8322d00/frameset.htm">Creating and Changing Queries</a>. I doubt that you can add real formulas besides the predefined statistics.
    Regards,
    Christian

  • ABAP Query Need to Convert ABAP Report

    Dear All,
    We have 3 queries which are linked to service management, now, user wants to consolidated one ABAP report with feilds of 3 queries, which consist of total 100 feilds. he want provision of downloading each single query (in ABAP report).
    Is ther anyway whee we can pass all the 3 quries values in internal tables and pass to ABAP report?? is there any better way so that we will reduce the writing of big logic for 100 feilds??
    Thanks in advance.
    Regards
    Ramki

    Hi ,
    you can do this way..
    for every query there is a
    *     Validating Variant name for Query Name
          CONCATENATE '%' <query group> '%' <Query name > '%' INTO w_rname.
          SELECT SINGLE * FROM varid WHERE report LIKE w_rname
                                     AND   variant EQ p_variant.
          IF sy-subrc NE 0.
         ENDIF.
    *   Submit report in background and creating spool
      SUBMIT (w_rname) USING SELECTION-SET p_variant
          TO SAP-SPOOL WITHOUT SPOOL DYNPRO
          SPOOL PARAMETERS wa_pri_params AND RETURN.
      COMMIT WORK AND WAIT.
    "create spool like above for three query and and capture in Spool and format the three spools
    "into one internal table and form one report.
    Prabhudas

  • ABAP Query Extracts

    hello experts ,
                              i am using ABAP query (sq01) infoset ( logical database ).Is it possible to add extract feature in the abap query selection screen . if possible then how?
    thanks
    vivek

    Hi Vivek,
    Its not possible. Whenever you activate your query it generates a standard program & its not modifiable.
    Regards
    Abhii

  • Hyperlink on field in Basic list of ABAP Query

    Dear All,
    Could somebody tell me, if its possible to have a hyperlink on a field in the Basic list of ABAP Query (SQ01,SQ02).
    Example :- There is a basic list which has the field MARA-MATNR displayed.There should be a hyperlink on this field, such that when the user clicks on it , the transaction MM03 is called.
    Thanking You.
    Ranu

    Hi,
    Loop at itab.
    write:/ itab-matnr hotspot,
              itab-maktx.
    hide: itab-matnr.
    endloop.
    data: c_field(16).
    at line-selection.
      get cursor field c_field.
      if c_field  = 'ITAB-MATNR'.
        check not itab-matnr is initial.
        set parameter id 'MAT' field itab-matnr.
        call transaction 'MM03' and skip first screen.
      endif.
    This is one example to call the transaction.
    If this helps you award points.
    Thanks,
    Deepak.

Maybe you are looking for