cancel
Showing results for 
Search instead for 
Did you mean: 

ABAP QUERY REPORT on Sales Revenue.

Former Member
0 Kudos

Dear SAP Experts!

Can anyone tell me the step by step procedure to create the new additional feilds in Sq02 extras , The Feilds and the Code for the following report.

I am working on the Total Sales Revenue.

Tables Used :BSID BSAD

I want to Show a the difference of the Credit-debit amount (BSID-WRBTR) in a user defined feild.

Please tell me the step by step proceudre for entering the new feilds from extras in SQ02 and what code to be written.

regards,

A S

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

If you are not comfortable using ABAP, ask the code part to be handled by abaper.

Find below the steps:

1) In SQ02 click on extras. Click on new icon. In the popup select radio button field and give a field name (say BAL). Give the description and reference table-field name.

2) Place the cursor on the field and click on code icon. Here, write the code as BAL = tablename1-fieldname1 - tablename2-fieldname2.

3) Add the extra field to the field group.

4) In SQ01, select the checkbox output field.

Regards,

GSL.

Former Member
0 Kudos

Dear GSL,

I have Done as Stated.

In the extras I have taken BSID-WBRTR as the name of the New Feild as BAL.

Now I have Defined in the code as follows:

bal= bsid-wrbtr - bsad-wrbtr.

The error is as follows.

Field "BAL" is unknown. It is neither in one of the specified tables

nor defined by a "DATA" statement . . . . . . . . . .

Please suggest what is to be done.

How to get the following

BSID-wbrtr (Credit entries) - BSID-wbrtr (Debit entries).

regards,

A S

Answers (2)

Answers (2)

Former Member
0 Kudos

solved

Former Member
0 Kudos

When you generated the infoset did you receive any errors? Did you give the reference table and field name for the field BAL?

Regards,

GSL.

Former Member
0 Kudos

Yes I had given the Reference Like as BSID-WRBTR.

and then In the Code : BAL = BSID-wrbtr

The Error Was.

Field "BAL" is unknown. It is neither in one of the specified tables

nor defined by a "DATA" statement . . . . . . . . . .

While generationg the query it says :

Global Syntax Check

Error in Data Code

Field "BAL" is unknown. It is neither in one of the specified tables

nor defined by a "DATA" statement . . . . . . . . . .

What should I define.

regards,

A S

Former Member
0 Kudos

There is no need to define BAL again. I think the mistake is due to BAL= .......... try with BAL = .. i.e. space in between BAL and = .

Regards,

GSL.