cancel
Showing results for 
Search instead for 
Did you mean: 

SQ02 - Query with adicional fields

Former Member
0 Kudos

Hi, I need your help to develop a query with additional fields.

The case is that:

In my query I only have a table VBAK and my propose is that this query returns me the quantity that are in a sales document for some material that should be selection parameters.

So I create 2 additional fields: one that is the u2018 Material u2018 that have no codification and other that is the quantity that have the code:

select single ZMENG into quantity from VBAK where matnr = material.

But the result is null, I don't know why.

Can you help me?

Thanks in advance.

Dora

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

MATNR is not available in VBAK !

You have to create first an info-set using SQ02 : here you link VBAK and VBAP, and select the fields you need.

From SQ01, create a new query where matnr is a selection field ....

Former Member
0 Kudos

I

You are right.

In the adicional field the code is:

select single ZMENG from vbap into quantity

where vbeln = vbak-vbeln and matnr = material.

I can't join vbak and vbap because I just want one row for document.

Dora