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

Doubt in Select statement

Former Member
0 Likes
578

Hi Friends,

I have a small doubt in select statement.

select a~kunnr into table li_kunnr from kna1 as a inner join vbpa as b

on akunnr = bkunnr where akunnr in fp_kunnr and bparvw = 'SH'.

I ahve written this select statement even though the value is there in the database no output coming in the select statement.

I think the error because of this line "b~parvw = 'SH' ".

when i tried with value from select option like the output is correct

which is

select a~kunnr into table li_kunnr from kna1 as a inner join vbpa as b

on akunnr = bkunnr where akunnr in fp_kunnr and bparvw in fp_parvw.

for the above query output is correct if i give value 'SH' in the selection screen.

please help is there any mistake in the query or any other way to write the query.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
559

actually for parvw you have to use conversion exit fn module becuase the internal representation pf SH is WE.

so you can not hard code it

you can use fm CONVERSION_EXIT_PARVW_INPUT and pass SH and use the return value(WE) or

select a~kunnr into table li_kunnr from kna1 as a inner join vbpa as b

on akunnr = bkunnr where akunnr in fp_kunnr and bparvw = 'WE'.

regards

shiba dutta

2 REPLIES 2
Read only

Former Member
0 Likes
560

actually for parvw you have to use conversion exit fn module becuase the internal representation pf SH is WE.

so you can not hard code it

you can use fm CONVERSION_EXIT_PARVW_INPUT and pass SH and use the return value(WE) or

select a~kunnr into table li_kunnr from kna1 as a inner join vbpa as b

on akunnr = bkunnr where akunnr in fp_kunnr and bparvw = 'WE'.

regards

shiba dutta

Read only

Former Member
0 Likes
559

HI,

Define a constant of a same type as parvw ,and default it to 'WE'.(Conversion for SH)

Then use that constant in your select query.

Thanks,CSR.

****Reward if helpful

Message was edited by:

CSR