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

multiple choices in d input

Former Member
0 Likes
1,516

in d "sales order status" report

selection screen parameters r plant : P_WERKS(VBAP-WERKS),sales doc : S_VBELN(VBAP-VBELN) & sales doc item : S_POSNR(VBAP-POSNR).

rite now im using d query :

select VBELV LFIMG from LIPS into table ITAB where VBELV in S_VBELN and POSNV in S_POSNR.

now this query is not workin if we give multiple choices in d input.

so wat modifications it requires.....

pls help...

1 ACCEPTED SOLUTION
Read only

rahulkavuri
Active Contributor
0 Likes
1,482

hi if u have given the correct declaration like

parameters :P_WERKS(VBAP-WERKS),

select-options: S_VBELN for VBAP-VBELN, S_POSNR for VBAP-POSNR.

then it should be working, otherwise it means that the values arent existing in the database for ur defined selection...

check it... award points if found helpful

hi if u have given the correct declaration like

parameters :P_WERKS(VBAP-WERKS),

select-options: S_VBELN for VBAP-VBELN, S_POSNR for VBAP-POSNR.

then it should be working, otherwise it means that the values arent existing in the database for ur defined selection...

check it... award points if found helpful

12 REPLIES 12
Read only

dani_mn
Active Contributor
0 Likes
1,482

HI,

use 'SELECT-OPTONS'.

<b>

SELECT-OPTIONS: S_VBELN FOR VBAP-VBELN.

SELECT-OPTIONS: S_POSNR FOR VBAP-POSNR.</b>

Read only

Former Member
0 Likes
1,482

Hi Priya ,

Tell me if s_vbeln and s_posnr are declared as paramters then only one value can work .

declared them like this

<b>parameters p_werks like vbap-werks.

select-options : s_vbeln for vbak-vbeln,

s_posnr for vbap-posnr.</b>

Now your query will work fine.

Read only

Former Member
0 Likes
1,482

your query is looking ok. i dont know why it is not working ?

select VBELV LFIMG from LIPS <b>into corresponding fields of</b> table ITAB where VBELV in S_VBELN and POSNV in S_POSNR.

just try this query with corresponding fields addition.

regards

shiba dutta

Read only

rahulkavuri
Active Contributor
0 Likes
1,483

hi if u have given the correct declaration like

parameters :P_WERKS(VBAP-WERKS),

select-options: S_VBELN for VBAP-VBELN, S_POSNR for VBAP-POSNR.

then it should be working, otherwise it means that the values arent existing in the database for ur defined selection...

check it... award points if found helpful

Read only

Former Member
0 Likes
1,482

hi

i have already used SELECT-OPTIONS only for S_VBELN & S_POSNR.

code i've used :

parameters: p_werks like vbap-werks.

SELECT-OPTIONS: s_vbeln FOR vbap-vbeln,

s_posnr for vbap-posnr.

but still it is not comin.....

pls tell some other alternative...

Read only

0 Likes
1,482

if you have done corresponding field addition also then pls check the table whether as per your selection criteria data is there or not..

regards

shiba dutta

Read only

Former Member
0 Likes
1,482

hi....

data is present. i dont know wat is goin wrong.......

now wen u give POSNR as from 100 to 200 then it is showing output for POSNR = 100 but for POSNR = 200 d values r comin wrong. and also values of POSNR = 100 r gettin carry forward......

wat modifications r needed.....

Read only

Former Member
0 Likes
1,482

can you check in debug mode for S_POSNR.

this table contains

S_POSNR-sign = I.

S_POSNR-option = BT

S_POSNR-low = 100

and

S_POSNR-high = 200

or not.

just give these values and check. if it is not let me know.

regards

shiba dutta

Read only

Former Member
0 Likes
1,482

Hi Priya ,

I have coded your example and it works fine for me

Please have see at the code.

tables : lips,vbak,vbap.

data : begin of itab occurs 0 ,

vbelv like lips-vbelv,

lfimg like lips-lfimg,

end of itab.

PARAMETER: p_werks like vbap-werks.

select-options : s_vbeln for vbak-vbeln,

s_posnr for vbap-posnr.

select VBELV LFIMG from LIPS into corresponding fields of table ITAB where VBELV in S_VBELN and POSNV in S_POSNR.

I had entered value for s_vbeln 31 from 331

and s_posnr 10 20 and it gave me correct entries coz for order number 331 there were two entries in lips so multiple entries worked.

Please check the code with my code.

Please reward if useful.

Read only

0 Likes
1,482

hi.........

i've used d same code but still it is not comin....& also values of eg.

posnr = 100 r gettin carry forward to d values of posnr = 200.

how shuold i proceed now???

Read only

Former Member
0 Likes
1,482

hi.....

yes they are comin :

s_posnr-sign = I.

s_posnr-option = BT.

s_posnr-low = 000100.

s_posnr-high = 000200.

now how should i proceed??

Read only

Former Member
0 Likes
1,482

i think you have declared like

SELECT-OPTIONS : S_POSNR FOR VBAP-POSNR.

NOW CHECK IN LIPS WHETHER POSNV IS 100 OR 00100. IF NOT

DO LIKE THIS

SHIFT S_POSNR-LOW LEFT DELETING LEADING '0'.

OR USE CONVERSION_EXIT_ALPHA_OUTPUT FM .

JUST CHECK WHETHER LEADING 0 ARE MAKING THE PROBLEM OR NOT?

REGARDS

SHIBA DUTTA