Infoset with sap query

Hello.
I would like to ask about using sap query to extract data from table in infoset. Is it possible to write an abap code and get data from certain table? I ask because I do not have any experience in that. Tried to find any examles, but nothing find.
My question is simple- how to extract data using simple abap program, then creatу an infoset with this query and then how to create attribute list based on infoset?
Thanks a lot.

Hi Aryat,
Yes it is possible to include code in infoset and fetch data from database tables.
Go to tcode- SQ02, and change query area from global->standard and click change.
Now click on Extras,it will enable all the custom fields on right hand side.
Now select the field from the row and click coding for addition symbol as mentioned in below screen shot, it will take you to the program line screen and you can code here.
After completing coding save and generate the infoset and adjust the query again otherwise new changes will not reflect.
Hope it will solve your issue.

Similar Messages

  • Adding Fields to Custom Infotype Using Custom Infoset in SAP QUERY

    Hi All,
    We have a requirement to add fileds to a custom infotype for querying Custom Infoset in SAP Query.
    We are facing problem as the added field is not getting displayed in the Query set so that we can select and display it in the Basic List along with the other filds.
    Kindly suggest a solution.
    Full points will be rewarded.
    Thanks in Advance
    Kumar

    Hi Salman,
    Thank you for your valuable information. I haven't Configured Dynamic Actions yet. Is it simple to write the Logic for Dynamic Actions. Is this the only way to solve this Issue?
    I tried by adding the standard fields, but they are not populating the values; but just appearing as Input Fields with Input help option.
    Please let me know if you have any suggestion in this direction?
    Regards,
    Hems.

  • One more Problem with SAP query

    Hi All,
    I am having a problem with SAP query
    Execution of SAP query transaction is leading to Dump
    the dump says Field 'R01' contains no fields, syntax check on the program shows same error.
    When I tried regenerating the Query in SQ01
    " Query Specification cannot be use to generate list
    Ranked list contains only numeric fields
    Please help me

    Gianpiero Bucchieri wrote:
    > So its important to listening the following tables too: Faktura (invoice), Partner Role, Partnernumber and the requierements number. The table are EKKO EKPO AND VRKPA OR vbkd, but if I join this table the query doesn't listining any results. If I cancel this 3 or 4 table and I start the query, the listening are ok. 
    >
    I am not sure what business process you are describing here - is it some kind of third-party sales order? If so, your join is wrong.
    From VB E P, firled BANFN and BNFPO you can go to table EBAN, where in field EBELN you will find the number of the purchase order (if somebody already had an MRP+Me58 run over the PR) which will lead you to table EKKO, and EKPO.
    So what we have here (essentially is):
    VBAK -> VBAP -> VBEP -> EBAN -> EKKO -> EKPO
    But that only solves one of your problems - you still have a long way to go to get invoices, partner and partner roles into there and I am beginning to ask myself what exactly it is you want to evaluate.
    Care to explain?
    Edited by: Mylène Dorias on Apr 1, 2010 2:10 PM

  • Issue with Infoset of sap query

    Hi All,
    There is an existing 'z' Sap query and the inofet is created using  the data source 'Data retreival by program'(Data structure:BAPIEXPLOSIONLIST).
    I got the requirement to add onemore radiobutton(for Costing Run) to the selection screen of exsiting query and when the radio button is clicked on, it should display two more fields (Costing Run name and Costing Run date).So,I have added the below lines in the existing Infoset.
    1.Under the extras button and in data read program tab,I have added the below code for radio button and the two fields for selection.
    PARAMETERS p_cstrun LIKE jest-inact RADIOBUTTON GROUP cost.
    SELECT-OPTIONS sp_kaid FOR keko-kalaid  MODIF ID s1.
    SELECT-OPTIONS sp_kadt FOR keko-kaladat MODIF ID s1.
    2.Under the extras button and in code tab and in at seletion-screen output,I have added the below logic to enable those fields dynamically.
    LOOP AT SCREEN.
        IF p_CSTRUN EQ 'X' AND SCREEN-GROUP1 EQ 'S1'.
          screen-invisible = 0.
          screen-active = 1.
          MODIFY SCREEN.
          elseif p_CSTRUN NE 'X' AND SCREEN-GROUP1 EQ 'S1' .
          screen-invisible = 1.
          screen-active = 0.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
    After adding this,the existing selection-screen format has been changed.Please look at the below changes.
    ->Actually,there are two blocks in the existing screen with block titles.Now they are replaced with some different text
    ->And one more block for output format and under that the layout field selection was there in previous selection screen.Now this layout field text is changed to 'Sap Listviewer' and some butto has also come additionaly in the output format.
    How to retreive the old selection-screen with previous texts and formats.
    Can any one suggest to resolve the issue?
    Thanks in advance!!
    Best Regards,
    Mounika

    This is the complete code of selection-screen
    SELECTION-SCREEN BEGIN OF BLOCK issel
                              WITH FRAME TITLE text-S01.
    SELECTION-SCREEN SKIP.
    PARAMETERS p_cstcur LIKE jest-inact USER-COMMAND ex DEFAULT 'X'  RADIOBUTTON GROUP cost .
    PARAMETERS p_cstfut LIKE jest-inact RADIOBUTTON GROUP cost.
    PARAMETERS p_cstprv LIKE jest-inact RADIOBUTTON GROUP cost.
    *Begin of Insert CBDK972000
    PARAMETERS p_cstrun LIKE jest-inact RADIOBUTTON GROUP cost.
    SELECT-OPTIONS sp_kaid FOR keko-kalaid  MODIF ID s1.
    SELECT-OPTIONS sp_kadt FOR keko-kaladat MODIF ID s1.
    *End of Insert CBDK97200
    SELECTION-SCREEN SKIP.
    PARAMETERS p_niv_g LIKE jest-inact DEFAULT 'X'.
    PARAMETERS p_niv_a LIKE jest-inact DEFAULT  ''.
    PARAMETERS p_niv_f LIKE jest-inact DEFAULT  ''.
    SELECT-OPTIONS sp_disgr FOR marc-disgr MEMORY ID lev NO-DISPLAY.
    SELECTION-SCREEN SKIP.
    PARAMETERS p_newfil LIKE jest-inact DEFAULT  ''.
    SELECTION-SCREEN END OF BLOCK issel.
    SELECTION-SCREEN BEGIN OF BLOCK csel
                              WITH FRAME TITLE text-s02.
    SELECT-OPTIONS sp_mtart FOR mara-mtart OBLIGATORY
      NO INTERVALS NO-EXTENSION MEMORY ID mta.
    SELECT-OPTIONS sp_werks FOR mbew-bwkey OBLIGATORY
      NO INTERVALS NO-EXTENSION MEMORY ID bwk.
    SELECT-OPTIONS sp_matnr FOR mara-matnr MEMORY ID mat.
    SELECTION-SCREEN END OF BLOCK csel.

  • Change infoset in sap query

    Hi ,
    I want to change infoset name in sap query sq01.
    I dont want to create new query to change infoset name.
    Any other option?
    Regards,
    Satyen Trivedi

    Dear Satyen,
    Go to  menu Edit-->Other user group, choose the user group, where u have assigned the infoset no give the name of ur query and press create button, it will display all the infosets those are assigned with that user group. Now select ur infoset and start developing the query.
    see useful tips:
    10 Useful Tips on Infoset Queries
    Regards,
    Abbas.

  • Autorization issue with SAP Query and RPTQTA10

    Dear all,
    I am having some difficulties with autorisations in SAP Query and Report RPTQTA10.
    in IT2006 I have a subtype 03 which should not be accessible for a group of users.
    Also I have created a test employee with a sybtype of IT2006 which is allowd and one which is not allowed.
    When I run some reports with that user I get a nice result with PT50. Only the allowed subtypes are being displayed.
    When I try to run A SAP Query or report PRTQTA10, the employee is not visible and seems to end op in an error list.
    Can someone shed some light on this issue?
    Kind regards,
    Patrick

    Hallo,
    Follow like this...
    Role 1:-
    authorization level: R, W  (You should not give W, R. You should give either W or M, R, Any way it will not create any problem)
    Infotype: 2006 -Ok
    Pers area: * -Ok
    Emp group: * -Ok
    Emp sub group: * -Ok
    profile: ALL*, ZBHR_OS etc etc -Ok
    Subtype: 01, 02 - Keep only sub type 01, 02
    fuction group: * -Ok
    Role 2:-
    authorization level: R, W  (You should not give W, R. You should give either W or M, R, Any way it will not create any problem)
    Infotype: 2006 -Ok
    Pers area: * -Ok
    Emp group: * -Ok
    Emp sub group: * -Ok
    profile: ALL*, ZBHR_OS etc etc -Ok
    Subtype: 03 - Keep only sub type 03
    fuction group: * -Ok
    Then user who want only sub type 01 & 02 then assign role 1 and he will not have access to sub type 03
    User who want only sub type 03 access, then assign role 2 only so that he will not have access to sub type 01 & 01
    User who want sub type 01, 02 & 03 access, gibe Role 1 & Role 2
    Hope it clarifies.
    Regards,
    Purnima

  • Tarnsport infoset and SAP Query

    Hi All,
    I have created infoset and SAP quesry and user group.
    When i created user group it asked me the transport request.IT has been tarnsported to dev to QA.
    But infoset and query are not moved to QA.
    It is not asking me for create transport reuest.
    Please let me know how to tarnsport infoset(SQ02) and Query(SQ01).
    Thanks

    Hi all,
    Thanks for u r reply.
    My query is in global area not in standard area.
    Any way i solved the problem but how to transport the variant.
    When i read the documentation it is saying that we have create the system variant then only we can transport.
    IS it so pleas let me know.
    Thanks,

  • Infoset Coding (SAP Query)

    Hi, I need a field in a Query that required programming.  I hope someone can help me.
    I need to get the first character that is in the header note of the purchasing requisition (ME53N).  So I am trying to create a Local field in the infoset with some coding that help me to pull that information for any purchasing requisition.
    If any of you guys have and example, please help me.
    Regards,
    Francisco

    Hi Aryat,
    Yes it is possible to include code in infoset and fetch data from database tables.
    Go to tcode- SQ02, and change query area from global->standard and click change.
    Now click on Extras,it will enable all the custom fields on right hand side.
    Now select the field from the row and click coding for addition symbol as mentioned in below screen shot, it will take you to the program line screen and you can code here.
    After completing coding save and generate the infoset and adjust the query again otherwise new changes will not reflect.
    Hope it will solve your issue.

  • Defining Query with SAP Query

    HI All,
    1..While creating an SAP Query, I have selected the field groups, then fields, selected basic list, entered the sequence, etc and then also enetered alternate text for control level. When i execute the report, the error message displayed is 'no data selected'. How can i rectify this issue?
    2. I would also like to add the field 'Deductions' under field group 'Payroll Results'.
    Thanks and Regards,
    AM_BLR

    Using the messaging service in the b1 i achieve this
    SAPbobsCOM.CompanyService oCmpSrv;
    MessagesService oMessageService;
    Message oMessage;
    MessageDataColumns pMessageDataColumns;
    MessageDataColumn pMessageDataColumn;
    MessageDataLines oLines;
    MessageDataLine oLine;
    RecipientCollection oRecipientCollection;
    oCmpSrv = (SAPbobsCOM.CompanyService)oCompany.GetCompanyService();
    oMessageService = (MessagesService)oCmpSrv.GetBusinessService(ServiceTypes.MessagesService);
    oMessage = (Message)oMessageService.GetDataInterface(MessagesServiceDataInterfaces.msdiMessage);
    oMessage.Subject = "My Subject";
    oMessage.Text = "My Text";
    oRecipientCollection = oMessage.RecipientCollection;
    oRecipientCollection.Add();
    oRecipientCollection.Item(0).SendInternal = BoYesNoEnum.tYES;
    oRecipientCollection.Item(0).UserCode = "test";
    pMessageDataColumns = oMessage.MessageDataColumns;
    pMessageDataColumn = pMessageDataColumns.Add();
    pMessageDataColumn.ColumnName = "My Column Name";
    oLines = pMessageDataColumn.MessageDataLines;
    oLine = oLines.Add();
    oLine.Value = "My Value";
    oMessageService.SendMessage(oMessage);

  • Issue with SAP query

    Hi experts,
    I not able to download the user group , infoset and query through standard program RSAQR3TR, even though the user group, infoset and query exists.
    i. e with download option in RSAQR3TR prgram.
    so, can u please guide what exactly might be the problem .
    or is there any other way to download the user group, infoset and query.

    Did you create transaction for query or did you create transaction for the program generated by the query?
    For queries the programs are dynamically generated in every system/client when they are transported. So the program name would be different in each system even though the query infosets etc are same.
    What you have to do is create a parameter transaction (for query).
    In the screen of SE93 give the following informations
    Transaction will be -  START_REPORT                                  
    Down at the bottom define the following parameters as per your Query/infoset
    D_SREPOVARI-REPORTTYPE     AQ (for abap query)
    D_SREPOVARI-REPORT     Z_abap_qryname
    D_SREPOVARI-VARIANT     a_any_variable_for_report
    Hope this helps.
    <removed_by_moderator>
    FY
    Edited by: Julius Bussche on Aug 26, 2008 11:41 AM

  • Problem with SAP Query

    Hi,
    In my Query The Outputs are <b>user ame, role and role discription</b>
    for one language we are having 10 lines of role discriptions .but i need only one role discription to my output for this what i need to do?

    Dear Ferdinando,
    Visit the following link for information on Transport of Queries:
    http://help.sap.com/saphelp_nw04/helpdata/en/d2/cb4699455611d189710000e8322d00/content.htm
    http://www.sap-img.com/basis/transport-of-abap-query.htm
    Reward points if this is helpful.
    Regards,
    Naveen.

  • Assign InfoSet to sap query

    Hi there. I made a copy of 01 Query from /SAPQUERY/AM usergroup.
    But now I've got a problem because there is still a /SAPQUERY/AM01 InfoSet seen as source of new query.
    Where can I change that source InfoSet to my own InfoSet? I'd be thankful for help. Greetings. P.

    Hi,
    Sorry to say that its not possible. You can change your query after copying from the standard one. But the the infoset assigned to the query cannot be changed.
    Regards,
    Soumya.

  • How to add new codes into SAP Query/Infoset

    Hi Experts,
    First time working with SAP Query.
    I need to enhance an existing Query to add a new field into a report.  I have added new tables into this Infoset and joined my new  tables with existing tables and able to extract the new fields out on the report.  But here are my problems:
    Example of original output:
    X88888 500000
    X99999 400000
    Example of new output after adding my 2 new tables to get 1 new field to output:
    X88888 50000  01/08/2009
    X88888 50000  01/25/2009      <--- for X88888 customer, I want only this record w/ latest date to be output
    X88888 50000  01/22/2009   
    X99999 40000  03/09/2009
    X99999 40000  04/18/2009
    X99999 40000  04/19/2009      < -- for X99999, I want only this record w/ latest date to be output
    Where/How i can add the code to control this logic so that only 1 record per customer with the highest date can be output.  I looked at the query program and it looks very confusing and hard to understand.
    Please advise,
    Thanks,
    Sam

    Hi Sam,
    Instead on adding new table/tables , better way to use Direct Read from your single table.
    Please read the below steps to suffice your requirement.
    Assumption: Let your original table be A and second table is B.
                            Tables A and B are having field X1 and X respectively, using these fields, they can be joined.
                             You want field date1 of table B.
    Infoset Changes:
    1. Go to SQ02 (Enter Infoset name, click on Change button)
    2. Create an extra field E_date of type date (Sy-datum), by clicking on 'Extras' (F5) button.
    3. Select that field in one of the field group of your Infoset.
    4. Click on Code Icon (Shift+F8) displayed on application bar, you will be getting lists events in 'Code section'.
    5. In Data Section , declare an internal table like below code (here pseudo code)
    data: begin of itab_date occurs 0,
                       date1  like B-date1,
                       end of itab_date.
    6. In Recod processing Event write the following code.
    CLEAR itab_date.
    CLEAR E_date.
    SELECT date1 FROM B into table itab_date                           " Retrieving date field from table B
    WHERE X = A-X1.
    Sort itab_date by itab_date-date1  DESCENDING.                 "Sort internal table B in decendind order on date1
    READ TABLE itab_date index 1.                                            "Read first record of interanal table
    E_date  = itab_date-date1                                                      "Assigning top most date of internal table into field E_date.
    7. Generate the Infoset
    Query changes
    1.Go To SQ01 (in a new session),
    2.Give your Query name, click on change button, and select that field group in which you have added extra field.
    3.Select extra field.
    4.Go to basic list to select that field in your O/p list.
    5.Click on Test button, and see if you are getting desired result.
    Please let me know if you need further details.
    Regards,
    Dinesh

  • Extracting SAP Query,Infoset  Data from VB Application

    Hi,
    I need to get all SAP Queries,Infosets and SAP Query Group data from a VB application.
    I have found a Remote Enabled Function called    IQAPI_READ_QUERY_CATALOG.
    But when I call the Function from a VB application ,the call is not successful and even I am not getting any exception.
    The call is getting false with null exception .
    Can anyone please guide me.
    Or is there any other function module /procedure / table to extract SAP Query ,Infoset,SAP Query Group data??
    Thanks in Advance.

    http://stackoverflow.com/questions/3765373/how-do-i-do-a-select-distinct-using-a-sap-infoset-query

  • Benefits of SAP Business Warehouse Reporting compared with the Query-tools?

    Hello experts,
    I've been creating reports with SAP Query tools, but been faced with few problems. First of all, there are restricted possibilities in terms of joining tables, and thus I cannot include all the data required for the report.
    One solution for this would have been to create separate queries and join the data together in Excel. The problem with this is that there exists no common field that would make sense as for a selection criterion. If the selection criterion is different in different queries, there is the danger of combining false data together, which would eventually result with distorted data. 
    So I was wondering, could anyone briefly tell me if SAP Business Warehouse reporting would solve these problems? And what other benefits would it provide compared with the SAP Query? I'd urgently need to know if it would be a beneficial investment for the company, since I haven't found solutions for the problems occurred in the creation of reports.
    Thank you in advance for you help!
    Maria

    The answers are yes - and thousands of companies have gone down this route
    Puttingin BW is a strategic aim of the comapny and not to be thought about and discussed in a BI forum such as this
    The costs of implementation and hardware will no doubt make your eyes water.
    To be quite honest SAP BI is a "no brainer" as most of the new e-SOA and new R3 modules reply on BW for their reporting needs

Maybe you are looking for

  • Remote App missing some keys

    I am using the remote app and I have to enter my iTunes password to purchase a movie, the problem is that some of the keys are missing on my remote app, this is on my iphone and my iPad. I am missing the Parenthasis keys. Both open and close. They ar

  • I need help merging an old Mozilla Firefox with a new one, How do I do it?

    Can Firefox merge my two Mozilla Firefox accounts? Between 2010 and 2012 I created to separate Mozilla Firefox accounts. The first was under Teri Muckleroy with the Username savdXGodsgrace and email address (Email removed by mod) that has been change

  • Mail not finding new imap mailboxes

    Hi I have multiple devices Mac, iPhone, iPad and run multiple email accounts. If I create a new mailbox folder on any device other than my MacBook Pro then the mail app on that won't see the new folder - and I can't find a way of making it do so shor

  • Adding Sales Employeed Name to Query

    Hi Guys, I have this query and would like to add to it the name of the Sales Employee that created the Sales Order, I am relatively certain I need to use the OSLP table to get this information but am not so sure on the JOINS required to add it. Any h

  • Workforce Management in CRM

    Hi! Anybody has any experience working with Workforce Management in CRM? How to install/activate this component in CRM? There is limited documentation as to how to activate it. Thanks! Leon