PIR Text in SQ02 SQ01

I created a SQ02 SQ01 to pull the PIR Text data. Below is my code.
[code]
v_name = EINA-INFNR.
CALL FUNCTION 'READ_TEXT'
  EXPORTING
    "client   = '120'
    client   = sy-mandt
    id       = 'AT'
    language = 'E'
    name     = v_name    "'5300000001'
    object   = 'EINA'
  TABLES
    lines    = i_tline
  EXCEPTIONS
    ID = 1
    LANGUAGE = 2
    NAME = 3
    NOT_FOUND = 4
    OBJECT = 5
    REFERENCE_CHECK = 6
    WRONG_ACCESS_TO_ARCHIVE = 7
    OTHERS = 8.
LOOP AT i_tline INTO k_tline.
  PIR_TEXT = k_tline-tdline.
ENDLOOP.
[/code]
My problem now is that when i put a range of PIR number, there are duplicates
[code]
PIR | SQ01 | Actual |
#01 | XXYY | XXYY   |
#02 | YYZZ | YYZZ   |
#03 | YYZZ |        |
[/code]
Above is a sample of my output. If i go to ME13 to view my PIR #01, the text is XXYY which is correct. If PIR#02, the text is YYZZ
But if i view PIR #03 at ME13, it is empty which is correct. But my SQ01 gives me YYZZ
How do i clear the variable?

Dear All,
i managed to do it. It seems i need to clear PIR_TEXT and CLEAR i_tline.
CLEAR PIR_TEXT.
CLEAR i_tline.
"CLEAR k_tline.
"CLEAR k_tline-tdline.
v_name = EINA-INFNR.
CALL FUNCTION 'READ_TEXT'
  EXPORTING
    client   = sy-mandt
    id       = 'AT'
    language = 'E'
    name     = v_name    "'5300000001'
    object   = 'EINA'
  TABLES
    lines    = i_tline
  EXCEPTIONS
    ID = 1
    LANGUAGE = 2
    NAME = 3
    NOT_FOUND = 4
    OBJECT = 5
    REFERENCE_CHECK = 6
    WRONG_ACCESS_TO_ARCHIVE = 7
    OTHERS = 8.
LOOP AT i_tline INTO k_tline.
    PIR_TEXT = k_tline-tdline.
ENDLOOP.

Similar Messages

  • Assigning a Tcode for SQ02/SQ01 query

    Dear All,
    To create query i have used following steps
    1. In SQVI check the Infoset name associated with the query you are trying to run.
    2. Go to SQ02 using the infoset name.
    3. Select "Field Groups" on the toolbar. Add the field in this field group.
    4. Go to the "Code" tab on the next screen.
    5. Select "Code Section" as "Record Processing" and write the code to populate the
    column.
    6. Activate the Infoset and then activate the Query also.
    After this how to assign a tcode for the query
    pls explain in detail.
    Thanks.

    Hi,
       Follow the below mentioned steps:
    Go to Tcode SE93  give the name of the tcode which you want to be create. Give description in the next screen and select last or 5th radio button(Transaction with Parameters) and press enter in the next screen give the Transaction as START_REPORT,  next check the skip initial screen check box, next select all the GUI support check boxes, next in default values section D_SREPOVARI-REPORTTYPE = ‘AQ’(Give your own text), D_SREPOVARI-REPORT = your query name, then save it and check it.
    Cheers,
    Bujji

  • Delete duplication in infoset query sq02 sq01

    i use a join which give many entrites same i want to remove all duplicates.

    Please check out this link and let me know if it is helpful..
    http://help.sap.com/erp2005_ehp_02/helpdata/en/d2/cb449c455611d189710000e8322d00/frameset.htm
    When outputting using the SAP List Viewer, the code at TOP-OF-PAGE has no significance

  • Purchase Info Record Texts Upload

    Hello all,
    I am using the standard upload program RM06IBI0 for data migration of PIRs. I have a seperate file that has PO texts.
    When I upload the texts I use the structure BRM06I --> BLINES to transport the text.
    However, there seems to be no way of forcing the text to go into the right PIR text. I only have PO texts to upload but no matter what data I place in the BRM06I structure the LSMW always places the text into the Info Record Note text.
    Can anyone help?

    Hi
    I have encountered the same problem with material BOM creation.
    The reason you get this message is probably because you didn't define correctly the identification field in the source structures.
    In step 'Maintain source fields' you should define the first field of every structure as identification field by creating char field of length 1. Then from the tree view of source fields, double click this field (in change mode) and give appropriate value in field 'Identifying Field Content', meaning 1 for header structure, 2 for items structure etc.
    This should fix the problem.
    Best regards

  • SQ01 - Need an input field for query report as mandatory

    Hi Guys
    I have created a report using SQ03,SQ02 & SQ01. The report is running fine. But i want to make one of the input field as manadatory
    Guys have any suggestion for the same
    I tried in SQ02, a field named DBPAOBLIG
    I got the above mentioned field when i clicked the extras tab in SQ02 - But the field is not in change mode
    Please suggest me how to make the field as mandatory
    Warm Regards
    Bala

    Hi,
    Create a variant, when you run a query - make it to be run only with this variant (via definition in a transaction for this query). In variant, you can define required fields.
    Regards,
    Eli

  • Using SQ02 for writing ABAP programs

    Hello,
    I am using SQ02 coding section for writing some simple ABAP programs, mainly for reporting purposes. I would like introduce more power into my programs, but SQ02/SQ01 reports return "ACCESS_DENIED" when I for example try to call a function (GUI_DOWNLOAD).
    Can You advise how to extend SQ02 authorization to enable function calls?
    Maybe You know other place from which You can write programs without a developer key?
    Thanks,
    Pawel

    Hi Uday,
    do You mean that I have to first make a recording on cg3y using transaction shdb, then create a function module basing on this recording, and then use this function module in my code?
    Pawel

  • SAP Queries using Transaction sq02

    Hi Sap all.
    i have recently joined in the SAP Retail project where they using the SAP Queries to get the info of unfinished Sites,Articles,Vendors,etc.
    i dont have any knowledge and experience on SAP QUERIES,so could any body help in this b sending the related scenarios and material,links.
    will be waiting for the best response.
    regards.
    Varma.
    Moderator message: don't just wait for others to search for you, please search for available information/documentation, don't ask for documents being sent to you.
    Edited by: Thomas Zloch on Jun 1, 2011 1:44 PM

    These are normal infoset queries which we create using transaction SQ03, SQ02/SQ01/SQ00.

  • Report needed - Open materials on PO, sorted by material and not PO number

    Hello,
    I've been trying to obtain a report that can give me a list of materials that are open for all PO numbers.  Instead of this being sorted by PO number, I want it sorted by material number.
    I've gone through all the ME2 transactions (i.e. ME2L, ME2M, ME2N, etc.) and all iterations of the scope of list with the selelction parameter WE101, but every time it comes up sorting by Purchase Order and then listing the open materials on the specific PO.
    I've gone through transaction ME80FN, which gives all the proper information I need, but there's no indicator in there looking for materials with only open quantities...it only gives both open and closed.
    Does anyone have any recommendations for a standard SAP report that can be accessed?
    Edited by: Andy Slania on Sep 27, 2010 9:15 PM

    Andy,
    I don't think there is one in the older R/3 systems.  I don't really know, because I quit looking after I discovered SAP Query (SQ01)..
    If a standard SAP report doesn't meet business requirements, one can have an ABAPer create a custom (Z) report.  However, another path is to use SQ02/SQ01 to create reports that may meet the needs, without commissioning a new ABAP report.
    In 4.6C it is possible to create Queries that have all the data found in the ME2* reports, but additionally can have ALV output.  Of course, in your case, since you can define 'sorts' in queries, ALV becomes a moot point.
    A Query expert can create enhanced PO reports that will satisfy most any requirement.  If the query infoset uses a SAP database, such as MEPOLDB, then it is not even necessary to create joins of tables - SAP has already done the heavy lifting.
    Best Regards,
    DB49

  • Report on sales orders

    hi all,
    i need to develop a report which has Purchase order number, sold to party, sales order number, required delivery date and confirmed delivery date by system. i tried to to do this by sqvi, but here requirement is some group of users have to run this not restricted to single user, and when ever i use shedule line tables it is doubling the lines per schedule line, can we display that in just two columns as required delivery date and confirmed date by system.
    Thank you gurus in advance,
    Naga.

    Hi
    SAP1 & SAP2
    theer r 2 stsndard report for Sales view as per ur requirement.
    However u can go for SAP Query .
    there u can joint two tables and field as per ur requirement and crete a infosat with respect to User.
    T.code
    SQ03-SQ02-SQ01
    thanks
    Mk

  • Re: Query for logical database

    Hi Experts,
    can anybody giveme any link of step-by-step how to create a query from sq03,sq02,sq01 with logical database for CIK.
    if anybody have done the query for logical databse for CIK give me ur input how to create.
    Thanks in advance,
    KK.

    Hi
    Go to SQ01 -- Enviornment --Query area - select Standard area or global as you require.
    Then go to Enviornment - Infoset - search for the existing infoset if available as per your requirement or create an infoset here.
    Write the name of Infoset and click on create . Fill all the required field like name , logical database - CIK, press enter it will populate the structure of logical database CIK, you may include /exclude here the nodes, or keep it as it is.
    And press enter.
    Now you have to create Field group and the fields inside the each group.
    You may create thefield group by clicking the create icone in the right hand side of teh screen and may drag the then fields by double clicking inside the group.
    Please mainatin sequence as per the characteristic of the table, like first select masterdata then transactuional!
    Save it. It will ask you for package, but click on local object and save it.
    Go back , it will prompt for generate infoset, say yes.
    Now your new infoset is coming among other infosets. (it is advisable to search for the existing infoset if available to avoide inconsistency in infosets).
    Now select your infoset and assign this to user groups by clicking the tab for this, you need to select user groups for this infoset here, who will be authorised to use this query.You need to take care about the user group, as this will allow you to see your infoset at the time of query generation / display.
    Save it and go back and again go back.Cross check that you are in standard query area (as selected in first step)
    Now give the query name and click on create. It will show you your infoset , select that.
    It will propmt you the next screen for name , no.of columns required, output formats etc.
    Fill as required and go to basic list now you will have screen as SQVI and have to select your selection field and output filed. After selecting the required fileds save it and execute this .
    Cheers
    Mukta
    Edited by: MUKTAKUMARI on Aug 3, 2009 11:45 AM

  • Material identification by vendor or Manufacturer part number details??

    Dear Experts,
    I have a scenario where we create a material say A and available vendors X, Y and Z.
    Same material are called as AX, AY and AZ by vendors X, Y and Z respectively.
    But when we raise a Purchase Order and Print it I need to get the description by which that vendor calls it..
    This can be possible by ABAP development, But I want to know is there any standard functionality in SAP. If it relates to MPN then let me know how to implement it. Hope for the better reply.
    Regards
    Lakshminath Gunda

    You can do it through Purchase Info Record (PIR), plant wise and define the PIR Text in config
    Material Management --> Purchase Order --> Texts for Purchase Orders --> Define Copying Rules for Item Texts with Text ID mapping in output form.
    Or if you are using PIR as mandetory for all procurement, you can use "Vendor Mat. No." of PIR which you will get in EINA-IDNLF field for your PO output.
    Regards,
    Vikas

  • Convert from Quick Viewer to Infoset.

    Can I convert from Quick Viewer (SQVI) to Infoset/Query (SQ02/SQ01)?   
    Thanks.
    Best regards.   
    Gustavo.

    If you have created a QuickView and you want to convert it to an SAP Query
    report, simply follow these three quick steps:
    1. Navigate to the main screen of the SAP Query (SQ01).
    2. Follow the menu path Queries > Convert QuickViews.
    3. Select your QuickView from the drop-down box and press the Enter button.
    You are prompted to type a name for the query; press Enter again to convert
    the QuickView.
    Here is the document which says how to convert QickVier to SAP Query.
    http://searchsap.techtarget.com/searchSAP/downloads/Teach_yourself_SAP_C20.pdf
    Regds
    Manohar

  • Freight Report

    Hi
    I have an issue in which I need to see the total freight amount for a particular material. I have added material and Purchasing document as special field in Line Line Item Display. So for a combination of material and  profit center, I am able to know what is the total freight cost for a material and out of the total cost of freight, how much bills hve been booked.Now the requirement is that for teh total freight cost booked, how much bills have been paid. We are inventorizing the material cost.
    At MIGO, A/c entry is
    Stock DR
         GR/IR CR
         Freight Clearing CR
    So in T Code FAGLL03, i am able to know what is the total cost of the freight that is booked for the company code at plant level.
    AT MIRO, The A/c Entry is
    Fright Clearing A/c Dr
        Vendor A/c Cr
    So In T Code FAGLL03, i know how much bills have been booked for freight.
    Now the query is how to know for the bills booked for freight, how much bills have been paid.
    Regards
    Sanil K Bhandari

    Hello,
    If you want to assign this to a user group, you have to go create in SQ03, SQ02, SQ01 then come to SQ00. But, this is a long procedure,so I am directly explaining you the SQ00. (Quick Viewer)
    Click on Quick Viewer
    Quick View give name ZREPORT (example)
    Click on "Create" Button
    Give the title of the report = For example "Freight Account Payments Details"
    Select Data Source = Table Join
    Click OK
    Click Shift+F1 or Second button or Insert Table button
    ,Enter Table BSAS
    Again click the second button
    Enter table BSAK
    By default system will give you lot of links. Right click on all the links and delete all those links, except BELNR, BUKRS and GJAHR links. Ultimately there should be only two link that is BELNR Company code BUKRS and fiscal year GJAHR. Note instead of document number if you want to link them based on the clearing document number, you can link them.
    F3 (back)
    Select your list fields on the left hand area menu (these will appear in your report)
    Whatever you have selected as selection fields will appear as selection criteria in your report.
    Execute the report.
    Please let me know if you need further help.
    Regards,
    Ravi

  • Table Link for EQUNR (Eqpt Number) and GEWRK (Main Work Center)

    Hello,
    I need to fetch the main work center from equipment master. I need a direct table link between the equipment number and mainwork center. We are getting a link of equipment number (EQUNR) to work center (ARBPL) and a link of work center (ARBPL) to main work center (GEWRK). But the problem with this scenario is - main work center is not getting fetched from equipment master once work center is missing.
    We want a direct link through some table between EQUNR and GEWRK.
    Puneet

    Hi Puneet,
    Appreciate your problem !
    Many a times in such a situation (which I presume exists where no direct link is available between fields); we have 2 clear cut approaches -
    Approach 1:
    Develop a SAP Query, Functional Area/Infoset, and User Group ( using T code :SQ03,SQ02,SQ01 respectively )
    While developing Functional Area feed in these 2 tables (Table 1- equipment number (EQUNR) & work center (ARBPL) and Table 2 - work center (ARBPL) to main work center (GEWRK) with  work center (ARBPL) as the Primary Key- bridge to join these 2 tables.
    In SAP Query Development; you may take Plant as the Selection Field or any other field as per business requirement to make a search in the query.
    Now when you execute this query, you will get a complete Download of (EQUNR),work center (ARBPL)  and main work center (GEWRK) in one table.
    For SAP Query, you may also approach your ABAP Team Member. This is a cleaner approach than the other one.
    Approach 2:
    Take SE16 download of the Table 1 and Table 2 and join them in Excel (using vlookup if required).This approach is however limited to the data volume that you have to process.
    Please let me know, if you get stuck !
    Thanks,
    RAVI.

  • Report for Special pricing condition than Std discount???

    Hi Everyone,
    Is there a standard report in SD where I can track all the sales orders where in a special pricing condition was given to the customer instead of the standard discount structure? if not, how do I create one?
    Thanks a lot!
    Swapna

    you need to use tranz SQ03,SQ02,SQ01
    start from SQ02 - build your info-set (func.area)
    use "table join" for VBAK...
    then run SQ03
    then SQ01
    play in DEV

Maybe you are looking for