Skip to Content
author's profile photo Former Member
Former Member

SQ02 - Plant Maintenance Report


Hi all,

I'm trying to create a report that links water measurement documents to functional locations.

I currently have IMRG - IMPTT - EQUI - EQUZ - ILOA.

I want to retrieve the functional location site name, which is IFLO-PLTXT. The problem is the equipment numbers are linked to functional locations at different levels (C, D, E etc), but i want the functional location name from level B only. Would it be possible to do a select statement on IFLO using the first 11 characters of the functional location from ILOA?

Eg functional location is SA02-123456-01-012, i need to select SA02-123456 into IFLO-TPLNR.

I would also like to retrieve IHPA-PARNR for the B level functional location from IHPA, where IHPA-PARVW = ZB, ZC or ZE.

Is this possible in SQ02?

Many thanks and kind regards,

Dave

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    Posted on Dec 19, 2013 at 08:23 PM

    To my knowledge, it's not feasible to insert additional rows using Extra fields in the infoset. Extra fields/tables may only add more information to the rows that were read based on the JOIN.

    You'd have to add IHPA table to the JOIN and then use selection criteria to select just 3 partner types needed. If it's not an option then I'm afraid you'd have to write a custom ABAP report.

    Add a comment
    10|10000 characters needed characters exceeded

    • The question was marked as answered, so I'm not sure if there is still an issue, but normally if SELECT doesn't bring the desired results then either the conditons are incorrect or you're looking for the wrong values. In the case above it's not clear if OBJ even has any value, so I'd start from there. Also do a JOIN instead of two separate SELECTs, if possible.

  • author's profile photo Former Member
    Former Member
    Posted on Dec 18, 2013 at 04:37 PM

    I've figured out the first part:

    clear fl.

    select single pltxt from iflo into fl
    where tplnr = iloa-tplnr(11).

    Will see if I can get the other info with the same method.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 19, 2013 at 11:06 AM

    Hi,

    I've created a field with the code below. This works ok but is only returning one row for each functional location. If there are 3 partners assigned to a functional location i want three rows to be returned in the report, each with a different partner name. Does anyone know how to aceive this? Many thanks

    clear par.
    select single parnr from ihpa into par
    where objnr = ob.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.