cancel
Showing results for 
Search instead for 
Did you mean: 

Query to extract T lane data

former_member406212
Participant
0 Kudos


Hello All,

I have written a query to get T lane data for following fields,

1. Source

2. Destination

3. Product

4. MoT

5. Product Specific MoT

This report is getting executed successfully only when it finds product specific MoT data other wise it is not getting output.

Requirement is, if Product Specific MoT is data not available then it should get data of Source, Destination, Product & MoT.

Any suggestion would be much appreciated.

thanks.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Shaiz,

Try removing link /SAPAPO/TRPROD-TRPID to /SAPAPO/TRPRODM-TRPID.

Then add link /SAPAPO/TRM-TRMID to /SAPAPO/TRPRODM-TRMID.

It works for me.

Best regards,

Mike

former_member406212
Participant
0 Kudos

Hi Maclean,

Thanks for the suggestion, I did the way you suggested but it didn't worked for me.

When executed the query, system is issuing message "No Data found"

Requirement is simple, if Product Specific MoT is data not available then it should get data of Source, Destination, Product & MoT.

Thanks.

Former Member
0 Kudos

Shaiz,

In general, SAP Query doesn't do 'if-then-else' very well when extracting data from tables.

You can write two queries, one for product specific, and one for general

or

You can have an ABAPer modify your infoset with code

or

You can commission a custom program.

If it were me, I would spec this out and send it to an ABAPer.  As you say, the specs should be easy to write.

Best Regards,

DB49

Former Member
0 Kudos

Shaiz,

You're right. Without product-specific MOT data, my Quickview failed.

Mike

former_member406212
Participant
0 Kudos

Thanks DB,

I was aware of fact that query will fetch the data from standard table and gives the output flat. & will not work with 'if-then-else' conditions .

Appreciate your suggestions.

Thanks.

Former Member
0 Kudos

Hi Shaiz,

I think that you need to add also Logical system, Business system group, model 000 and active version 000. Maybe location type also!

Thanks,

Regards, Marius