Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Hi

Former Member
0 Likes
413

Hi,

can anybody tell me how to do logic by combing these detils

KONV-KBETR if KONV-KSCHL=PSPR

Linked by VBAK-KNUMV=KONV-KNUMV

and

VBAP-VBELN=VBAK-VBELN

Display profit margin only if KNA1- ktokd = BAIC.

knov-kbetr is profit margin

Please help me in this regard

Thanks,

lavanya

2 REPLIES 2
Read only

Former Member
0 Likes
379

Get all the Customers KNA1-KUNNR from KNA1 table for the account group KTOKD = BAIc.

For all these customers find the Sales orders (VBELN)and the Condition records (KNUMV) fromthe VBAK table.

Now retrieve the profit margin(KBETR) from KONV for the above condition records(VBAK-KNUMV). While retrieving put the condition KONV-KSCHL = 'PSPR' also in the WHERE clause of select.

\[removed by moderator\]

Regards,

Kiran Bobbala

Edited by: Jan Stallkamp on Jun 10, 2008 3:38 PM

Read only

0 Likes
379

Hi kiran,

plz tell me why i am getting this error

@8O@ "END" must be a flat structure. You cannot use internal tables, strings, references, or structures as components .

select kunnr from kna1 into table it_kna1 where ktokd = 'baic'.

select vbeln from vbap into table it_vbap for all entries in it_vbak

where vbeln = vbak-vbeln.

select kunnr vbeln knumv from vbak into table it_vbak

for all entries in it_kna1 where kunnr = kna1-kunnr.

select kbetr knumv kschl from table konv into it_konv

for all the entries in it_vbak where knumv = vbak-knumv

and koschl = 'pspr'.

Is my coding correct plz help me.